diff
stringlengths 41
2.03M
| msg
stringlengths 1
1.5k
⌀ | repo
stringlengths 5
40
| sha
stringlengths 40
40
| time
stringlengths 20
20
|
---|---|---|---|---|
deleted file mode 100644 <nl> index 259918c5e . . 000000000 <nl> mmm a / src / gui / Src / Gui / BreakpointMenu . cpp <nl> ppp / dev / null <nl> <nl> - # include " BreakpointMenu . h " <nl> - # include " MenuBuilder . h " <nl> - # include < QAction > <nl> - # include < QMessageBox > <nl> - # include " StringUtil . h " <nl> - # include " MiscUtil . h " <nl> - # include " Breakpoints . h " <nl> - <nl> - <nl> - BreakpointMenu : : BreakpointMenu ( QWidget * parent , ActionHelperFuncs funcs , GetSelectionFunc getSelection ) <nl> - : QObject ( parent ) , ActionHelperProxy ( funcs ) , mGetSelection ( getSelection ) <nl> - { <nl> - } <nl> - <nl> - void BreakpointMenu : : build ( MenuBuilder * builder ) <nl> - { <nl> - QAction * toggleBreakpointAction = makeShortcutAction ( DIcon ( " breakpoint_toggle . png " ) , tr ( " Toggle " ) , std : : bind ( & BreakpointMenu : : toggleInt3BPActionSlot , this ) , " ActionToggleBreakpoint " ) ; <nl> - QAction * editSoftwareBreakpointAction = makeShortcutAction ( DIcon ( " breakpoint_edit_alt . png " ) , tr ( " Edit " ) , std : : bind ( & BreakpointMenu : : editSoftBpActionSlot , this ) , " ActionEditBreakpoint " ) ; <nl> - QAction * setHwBreakpointAction = makeShortcutAction ( DIcon ( " breakpoint_execute . png " ) , tr ( " Set Hardware on Execution " ) , std : : bind ( & BreakpointMenu : : toggleHwBpActionSlot , this ) , " ActionSetHwBpE " ) ; <nl> - QAction * removeHwBreakpointAction = makeShortcutAction ( DIcon ( " breakpoint_remove . png " ) , tr ( " Remove Hardware " ) , std : : bind ( & BreakpointMenu : : toggleHwBpActionSlot , this ) , " ActionRemoveHwBp " ) ; <nl> - <nl> - QMenu * replaceSlotMenu = makeMenu ( DIcon ( " breakpoint_execute . png " ) , tr ( " Set Hardware on Execution " ) ) ; <nl> - / / Replacement slot menu are only used when the breakpoints are full , so using " Unknown " as the placeholder . Might want to change this in case we display the menu when there are still free slots . <nl> - QAction * replaceSlot0Action = makeMenuAction ( replaceSlotMenu , DIcon ( " breakpoint_execute_slot1 . png " ) , tr ( " Replace Slot 0 ( Unknown ) " ) , std : : bind ( & BreakpointMenu : : setHwBpOnSlot0ActionSlot , this ) ) ; <nl> - QAction * replaceSlot1Action = makeMenuAction ( replaceSlotMenu , DIcon ( " breakpoint_execute_slot2 . png " ) , tr ( " Replace Slot 1 ( Unknown ) " ) , std : : bind ( & BreakpointMenu : : setHwBpOnSlot1ActionSlot , this ) ) ; <nl> - QAction * replaceSlot2Action = makeMenuAction ( replaceSlotMenu , DIcon ( " breakpoint_execute_slot3 . png " ) , tr ( " Replace Slot 2 ( Unknown ) " ) , std : : bind ( & BreakpointMenu : : setHwBpOnSlot2ActionSlot , this ) ) ; <nl> - QAction * replaceSlot3Action = makeMenuAction ( replaceSlotMenu , DIcon ( " breakpoint_execute_slot4 . png " ) , tr ( " Replace Slot 3 ( Unknown ) " ) , std : : bind ( & BreakpointMenu : : setHwBpOnSlot3ActionSlot , this ) ) ; <nl> - <nl> - builder - > addMenu ( makeMenu ( DIcon ( " breakpoint . png " ) , tr ( " Breakpoint " ) ) , [ = ] ( QMenu * menu ) <nl> - { <nl> - auto selection = mGetSelection ( ) ; <nl> - if ( selection = = 0 ) <nl> - return false ; <nl> - BPXTYPE bpType = DbgGetBpxTypeAt ( selection ) ; <nl> - if ( ( bpType & bp_normal ) = = bp_normal | | ( bpType & bp_hardware ) = = bp_hardware ) <nl> - editSoftwareBreakpointAction - > setText ( tr ( " Edit " ) ) ; <nl> - else <nl> - editSoftwareBreakpointAction - > setText ( tr ( " Set Conditional Breakpoint " ) ) ; <nl> - menu - > addAction ( editSoftwareBreakpointAction ) ; <nl> - <nl> - menu - > addAction ( toggleBreakpointAction ) ; <nl> - <nl> - if ( ( bpType & bp_hardware ) = = bp_hardware ) <nl> - { <nl> - menu - > addAction ( removeHwBreakpointAction ) ; <nl> - } <nl> - else <nl> - { <nl> - BPMAP bpList ; <nl> - DbgGetBpList ( bp_hardware , & bpList ) ; <nl> - <nl> - / / get enabled hwbp count <nl> - int enabledCount = bpList . count ; <nl> - for ( int i = 0 ; i < bpList . count ; i + + ) <nl> - if ( ! bpList . bp [ i ] . enabled ) <nl> - enabledCount - - ; <nl> - <nl> - if ( enabledCount < 4 ) <nl> - { <nl> - menu - > addAction ( setHwBreakpointAction ) ; <nl> - } <nl> - else <nl> - { <nl> - for ( int i = 0 ; i < bpList . count ; i + + ) <nl> - { <nl> - if ( bpList . bp [ i ] . enabled ) <nl> - { <nl> - switch ( bpList . bp [ i ] . slot ) <nl> - { <nl> - case 0 : <nl> - replaceSlot0Action - > setText ( tr ( " Replace Slot % 1 ( 0x % 2 ) " ) . arg ( 1 ) . arg ( ToPtrString ( bpList . bp [ i ] . addr ) ) ) ; <nl> - break ; <nl> - case 1 : <nl> - replaceSlot1Action - > setText ( tr ( " Replace Slot % 1 ( 0x % 2 ) " ) . arg ( 2 ) . arg ( ToPtrString ( bpList . bp [ i ] . addr ) ) ) ; <nl> - break ; <nl> - case 2 : <nl> - replaceSlot2Action - > setText ( tr ( " Replace Slot % 1 ( 0x % 2 ) " ) . arg ( 3 ) . arg ( ToPtrString ( bpList . bp [ i ] . addr ) ) ) ; <nl> - break ; <nl> - case 3 : <nl> - replaceSlot3Action - > setText ( tr ( " Replace Slot % 1 ( 0x % 2 ) " ) . arg ( 4 ) . arg ( ToPtrString ( bpList . bp [ i ] . addr ) ) ) ; <nl> - break ; <nl> - default : <nl> - break ; <nl> - } <nl> - } <nl> - } <nl> - menu - > addMenu ( replaceSlotMenu ) ; <nl> - } <nl> - if ( bpList . count ) <nl> - BridgeFree ( bpList . bp ) ; <nl> - } <nl> - return true ; <nl> - } ) ; <nl> - } <nl> - <nl> - void BreakpointMenu : : toggleInt3BPActionSlot ( ) <nl> - { <nl> - if ( ! DbgIsDebugging ( ) ) <nl> - return ; <nl> - duint wVA = mGetSelection ( ) ; <nl> - BPXTYPE wBpType = DbgGetBpxTypeAt ( wVA ) ; <nl> - QString wCmd ; <nl> - <nl> - if ( ( wBpType & bp_normal ) = = bp_normal ) <nl> - { <nl> - wCmd = " bc " + ToPtrString ( wVA ) ; <nl> - } <nl> - else <nl> - { <nl> - if ( DbgFunctions ( ) - > IsDepEnabled ( ) & & ! DbgFunctions ( ) - > MemIsCodePage ( wVA , false ) ) <nl> - { <nl> - QMessageBox msgyn ( QMessageBox : : Warning , tr ( " Current address is not executable " ) , <nl> - tr ( " Setting software breakpoint here may result in crash . Do you really want to continue ? " ) , QMessageBox : : Yes | QMessageBox : : No , ( QWidget * ) parent ( ) ) ; <nl> - msgyn . setWindowIcon ( DIcon ( " compile - warning . png " ) ) ; <nl> - msgyn . setParent ( ( QWidget * ) parent ( ) , Qt : : Dialog ) ; <nl> - msgyn . setWindowFlags ( msgyn . windowFlags ( ) & ( ~ Qt : : WindowContextHelpButtonHint ) ) ; <nl> - if ( msgyn . exec ( ) = = QMessageBox : : No ) <nl> - return ; <nl> - } <nl> - wCmd = " bp " + ToPtrString ( wVA ) ; <nl> - } <nl> - <nl> - DbgCmdExec ( wCmd ) ; <nl> - / / emit Disassembly : : repainted ( ) ; <nl> - } <nl> - <nl> - void BreakpointMenu : : editSoftBpActionSlot ( ) <nl> - { <nl> - auto selection = mGetSelection ( ) ; <nl> - if ( selection = = 0 ) <nl> - return ; <nl> - BPXTYPE bpType = DbgGetBpxTypeAt ( selection ) ; <nl> - if ( ( bpType & bp_hardware ) = = bp_hardware ) <nl> - Breakpoints : : editBP ( bp_hardware , ToHexString ( selection ) , dynamic_cast < QWidget * > ( parent ( ) ) ) ; <nl> - else if ( ( bpType & bp_normal ) = = bp_normal ) <nl> - Breakpoints : : editBP ( bp_normal , ToHexString ( selection ) , dynamic_cast < QWidget * > ( parent ( ) ) ) ; <nl> - else <nl> - { <nl> - DbgCmdExecDirect ( QString ( " bp % 1 " ) . arg ( ToHexString ( selection ) ) ) ; / / Blocking call <nl> - if ( ! Breakpoints : : editBP ( bp_normal , ToHexString ( selection ) , dynamic_cast < QWidget * > ( parent ( ) ) ) ) <nl> - Breakpoints : : removeBP ( bp_normal , selection ) ; <nl> - } <nl> - } <nl> - <nl> - void BreakpointMenu : : toggleHwBpActionSlot ( ) <nl> - { <nl> - duint wVA = mGetSelection ( ) ; <nl> - BPXTYPE wBpType = DbgGetBpxTypeAt ( wVA ) ; <nl> - QString wCmd ; <nl> - <nl> - if ( ( wBpType & bp_hardware ) = = bp_hardware ) <nl> - { <nl> - wCmd = " bphwc " + ToPtrString ( wVA ) ; <nl> - } <nl> - else <nl> - { <nl> - wCmd = " bphws " + ToPtrString ( wVA ) ; <nl> - } <nl> - <nl> - DbgCmdExec ( wCmd ) ; <nl> - } <nl> - <nl> - <nl> - void BreakpointMenu : : setHwBpOnSlot0ActionSlot ( ) <nl> - { <nl> - setHwBpAt ( mGetSelection ( ) , 0 ) ; <nl> - } <nl> - <nl> - void BreakpointMenu : : setHwBpOnSlot1ActionSlot ( ) <nl> - { <nl> - setHwBpAt ( mGetSelection ( ) , 1 ) ; <nl> - } <nl> - <nl> - void BreakpointMenu : : setHwBpOnSlot2ActionSlot ( ) <nl> - { <nl> - setHwBpAt ( mGetSelection ( ) , 2 ) ; <nl> - } <nl> - <nl> - void BreakpointMenu : : setHwBpOnSlot3ActionSlot ( ) <nl> - { <nl> - setHwBpAt ( mGetSelection ( ) , 3 ) ; <nl> - } <nl> - <nl> - void BreakpointMenu : : setHwBpAt ( duint va , int slot ) <nl> - { <nl> - int wI = 0 ; <nl> - int wSlotIndex = - 1 ; <nl> - BPMAP wBPList ; <nl> - QString wCmd = " " ; <nl> - <nl> - DbgGetBpList ( bp_hardware , & wBPList ) ; <nl> - <nl> - / / Find index of slot slot in the list <nl> - for ( wI = 0 ; wI < wBPList . count ; wI + + ) <nl> - { <nl> - if ( wBPList . bp [ wI ] . slot = = ( unsigned short ) slot ) <nl> - { <nl> - wSlotIndex = wI ; <nl> - break ; <nl> - } <nl> - } <nl> - <nl> - if ( wSlotIndex < 0 ) / / Slot not used <nl> - { <nl> - wCmd = " bphws " + ToPtrString ( va ) ; <nl> - DbgCmdExec ( wCmd ) ; <nl> - } <nl> - else / / Slot used <nl> - { <nl> - wCmd = " bphwc " + ToPtrString ( ( duint ) ( wBPList . bp [ wSlotIndex ] . addr ) ) ; <nl> - DbgCmdExec ( wCmd ) ; <nl> - <nl> - Sleep ( 200 ) ; <nl> - <nl> - wCmd = " bphws " + ToPtrString ( va ) ; <nl> - DbgCmdExec ( wCmd ) ; <nl> - } <nl> - if ( wBPList . count ) <nl> - BridgeFree ( wBPList . bp ) ; <nl> - } <nl> deleted file mode 100644 <nl> index e1c884682 . . 000000000 <nl> mmm a / src / gui / Src / Gui / BreakpointMenu . h <nl> ppp / dev / null <nl> <nl> - # pragma once <nl> - <nl> - # include < QObject > <nl> - # include < functional > <nl> - # include " ActionHelpers . h " <nl> - # include " Imports . h " <nl> - <nl> - class BreakpointMenu : public QObject , public ActionHelperProxy <nl> - { <nl> - Q_OBJECT <nl> - public : <nl> - using GetSelectionFunc = std : : function < duint ( ) > ; <nl> - <nl> - explicit BreakpointMenu ( QWidget * parent , ActionHelperFuncs funcs , GetSelectionFunc getSelection ) ; <nl> - void build ( MenuBuilder * builder ) ; <nl> - <nl> - public slots : <nl> - void toggleInt3BPActionSlot ( ) ; <nl> - void editSoftBpActionSlot ( ) ; <nl> - void toggleHwBpActionSlot ( ) ; <nl> - void setHwBpOnSlot0ActionSlot ( ) ; <nl> - void setHwBpOnSlot1ActionSlot ( ) ; <nl> - void setHwBpOnSlot2ActionSlot ( ) ; <nl> - void setHwBpOnSlot3ActionSlot ( ) ; <nl> - void setHwBpAt ( duint va , int slot ) ; <nl> - <nl> - private : <nl> - GetSelectionFunc mGetSelection ; <nl> - } ; <nl> mmm a / src / gui / Src / Gui / BreakpointsView . cpp <nl> ppp b / src / gui / Src / Gui / BreakpointsView . cpp <nl> BreakpointsView : : BreakpointsView ( QWidget * parent ) <nl> <nl> void BreakpointsView : : setupContextMenu ( ) <nl> { <nl> - mMenuBuilder = new MenuBuilder ( this , [ this ] ( QMenu * ) <nl> + mMenuBuilder = new MenuBuilder ( this , [ ] ( QMenu * ) <nl> { <nl> return DbgIsDebugging ( ) ; <nl> } ) ; <nl> void BreakpointsView : : setupContextMenu ( ) <nl> { <nl> return isValidBp ( ) ; <nl> } ; <nl> - <nl> + mMenuBuilder - > addAction ( makeAction ( DIcon ( ArchValue ( " processor32 . png " , " processor64 . png " ) ) , tr ( " Follow breakpoint " ) , SLOT ( followBreakpointSlot ( ) ) ) , [ this ] ( QMenu * ) <nl> + { <nl> + if ( ! isValidBp ( ) ) <nl> + return false ; <nl> + if ( selectedBp ( ) . type = = bp_exception ) <nl> + return false ; <nl> + return true ; <nl> + } ) ; <nl> mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " breakpoint_remove . png " ) , tr ( " & Remove " ) , SLOT ( removeBreakpointSlot ( ) ) , " ActionDeleteBreakpoint " ) , validBp ) ; <nl> QAction * enableDisableBreakpoint = makeShortcutAction ( DIcon ( " breakpoint_disable . png " ) , tr ( " Disable " ) , SLOT ( toggleBreakpointSlot ( ) ) , " ActionEnableDisableBreakpoint " ) ; <nl> mMenuBuilder - > addAction ( enableDisableBreakpoint , [ this , enableDisableBreakpoint ] ( QMenu * ) <nl> void BreakpointsView : : followBreakpointSlot ( ) <nl> return ; <nl> auto & bp = selectedBp ( ) ; <nl> if ( bp . type = = bp_exception | | ! bp . active ) <nl> + { <nl> + GuiAddStatusBarMessage ( tr ( " Cannot follow this breakpoint . \ n " ) . toUtf8 ( ) . constData ( ) ) ; <nl> return ; <nl> + } <nl> duint addr = bp . type = = bp_dll ? DbgModBaseFromName ( bp . mod ) : bp . addr ; <nl> if ( ! DbgMemIsValidReadPtr ( addr ) ) <nl> + { <nl> + GuiAddStatusBarMessage ( tr ( " Cannot follow this breakpoint . \ n " ) . toUtf8 ( ) . constData ( ) ) ; <nl> return ; <nl> + } <nl> if ( DbgFunctions ( ) - > MemIsCodePage ( addr , false ) ) <nl> DbgCmdExecDirect ( QString ( " disasm % 1 " ) . arg ( ToPtrString ( addr ) ) ) ; <nl> else <nl> mmm a / src / gui / Src / Gui / CPUDisassembly . cpp <nl> ppp b / src / gui / Src / Gui / CPUDisassembly . cpp <nl> <nl> # include " HexEditDialog . h " <nl> # include " AssembleDialog . h " <nl> # include " StringUtil . h " <nl> - # include " Breakpoints . h " <nl> # include " XrefBrowseDialog . h " <nl> # include " SourceViewerManager . h " <nl> # include " MiscUtil . h " <nl> # include " MemoryPage . h " <nl> - # include " BreakpointMenu . h " <nl> + # include " CommonActions . h " <nl> # include " BrowseDialog . h " <nl> <nl> CPUDisassembly : : CPUDisassembly ( QWidget * parent , bool isMain ) : Disassembly ( parent , isMain ) <nl> void CPUDisassembly : : mouseDoubleClickEvent ( QMouseEvent * event ) <nl> <nl> / / ( Opcodes ) Set INT3 breakpoint <nl> case 1 : <nl> - mBreakpointMenu - > toggleInt3BPActionSlot ( ) ; <nl> + mCommonActions - > toggleInt3BPActionSlot ( ) ; <nl> break ; <nl> <nl> / / ( Disassembly ) Assemble dialog <nl> void CPUDisassembly : : mouseDoubleClickEvent ( QMouseEvent * event ) <nl> <nl> / / ( Comments ) Set comment dialog <nl> case 3 : <nl> - setCommentSlot ( ) ; <nl> + mCommonActions - > setCommentSlot ( ) ; <nl> break ; <nl> <nl> / / Undefined area <nl> void CPUDisassembly : : setupRightClickContextMenu ( ) <nl> return DbgFunctions ( ) - > PatchInRange ( start , end ) ; / / something patched in selected range <nl> } ) ; <nl> <nl> - mBreakpointMenu = new BreakpointMenu ( this , getActionHelperFuncs ( ) , [ this ] ( ) <nl> + mCommonActions = new CommonActions ( this , getActionHelperFuncs ( ) , [ this ] ( ) <nl> { <nl> return rvaToVa ( getInitialSelection ( ) ) ; <nl> } ) ; <nl> - mBreakpointMenu - > build ( mMenuBuilder ) ; <nl> + mCommonActions - > build ( mMenuBuilder , CommonActions : : ActionBreakpoint ) ; <nl> <nl> mMenuBuilder - > addMenu ( makeMenu ( DIcon ( " dump . png " ) , tr ( " & Follow in Dump " ) ) , [ this ] ( QMenu * menu ) <nl> { <nl> void CPUDisassembly : : setupRightClickContextMenu ( ) <nl> return menu - > actions ( ) . length ( ) ! = 0 ; / / only add this menu if there is something to follow <nl> } ) ; <nl> <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " memmap_find_address_page . png " ) , tr ( " Follow in Memory Map " ) , SLOT ( followInMemoryMapSlot ( ) ) , " ActionFollowMemMap " ) ) ; <nl> + mCommonActions - > build ( mMenuBuilder , CommonActions : : ActionMemoryMap | CommonActions : : ActionGraph ) ; <nl> <nl> mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " source . png " ) , tr ( " Open Source File " ) , SLOT ( openSourceSlot ( ) ) , " ActionOpenSourceFile " ) , [ this ] ( QMenu * ) <nl> { <nl> return DbgFunctions ( ) - > GetSourceFromAddr ( rvaToVa ( getInitialSelection ( ) ) , 0 , 0 ) ; <nl> } ) ; <nl> <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " graph . png " ) , tr ( " Graph " ) , SLOT ( graphSlot ( ) ) , " ActionGraph " ) ) ; <nl> - <nl> mMenuBuilder - > addMenu ( makeMenu ( DIcon ( " help . png " ) , tr ( " Help on Symbolic Name " ) ) , [ this ] ( QMenu * menu ) <nl> { <nl> QSet < QString > labels ; <nl> void CPUDisassembly : : setupRightClickContextMenu ( ) <nl> return DbgMemIsValidReadPtr ( addr ) ; <nl> } ) ; <nl> mMenuBuilder - > addMenu ( makeMenu ( DIcon ( " label . png " ) , tr ( " Label " ) ) , labelMenu ) ; <nl> + mCommonActions - > build ( mMenuBuilder , CommonActions : : ActionComment | CommonActions : : ActionBookmark ) ; <nl> <nl> QAction * traceRecordDisable = makeAction ( DIcon ( " close - all - tabs . png " ) , tr ( " Disable " ) , SLOT ( ActionTraceRecordDisableSlot ( ) ) ) ; <nl> QAction * traceRecordEnableBit = makeAction ( DIcon ( " bit . png " ) , tr ( " Bit " ) , SLOT ( ActionTraceRecordBitSlot ( ) ) ) ; <nl> void CPUDisassembly : : setupRightClickContextMenu ( ) <nl> return true ; <nl> } ) ; <nl> <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " comment . png " ) , tr ( " Comment " ) , SLOT ( setCommentSlot ( ) ) , " ActionSetComment " ) ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " bookmark_toggle . png " ) , tr ( " Toggle Bookmark " ) , SLOT ( setBookmarkSlot ( ) ) , " ActionToggleBookmark " ) ) ; <nl> mMenuBuilder - > addSeparator ( ) ; <nl> <nl> MenuBuilder * analysisMenu = new MenuBuilder ( this ) ; <nl> void CPUDisassembly : : setupRightClickContextMenu ( ) <nl> removeAction ( mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " patch . png " ) , tr ( " Patches " ) , SLOT ( showPatchesSlot ( ) ) , " ViewPatches " ) ) ) ; / / prevent conflicting shortcut with the MainWindow <nl> mMenuBuilder - > addSeparator ( ) ; <nl> <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " neworigin . png " ) , tr ( " Set New Origin Here " ) , SLOT ( setNewOriginHereActionSlot ( ) ) , " ActionSetNewOriginHere " ) ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " createthread . png " ) , tr ( " Create New Thread Here " ) , SLOT ( createThreadSlot ( ) ) , " ActionCreateNewThreadHere " ) ) ; <nl> - <nl> + mCommonActions - > build ( mMenuBuilder , CommonActions : : ActionNewOrigin | CommonActions : : ActionNewThread ) ; <nl> MenuBuilder * gotoMenu = new MenuBuilder ( this ) ; <nl> gotoMenu - > addAction ( makeShortcutAction ( DIcon ( " cbp . png " ) , tr ( " Origin " ) , SLOT ( gotoOriginSlot ( ) ) , " ActionGotoOrigin " ) ) ; <nl> gotoMenu - > addAction ( makeShortcutAction ( DIcon ( " previous . png " ) , tr ( " Previous " ) , SLOT ( gotoPreviousSlot ( ) ) , " ActionGotoPrevious " ) , [ this ] ( QMenu * ) <nl> void CPUDisassembly : : gotoOriginSlot ( ) <nl> gotoAddress ( DbgValFromString ( " cip " ) ) ; <nl> } <nl> <nl> - void CPUDisassembly : : setNewOriginHereActionSlot ( ) <nl> - { <nl> - if ( ! DbgIsDebugging ( ) ) <nl> - return ; <nl> - duint wVA = rvaToVa ( getInitialSelection ( ) ) ; <nl> - if ( DbgFunctions ( ) - > IsDepEnabled ( ) & & ! DbgFunctions ( ) - > MemIsCodePage ( wVA , false ) ) <nl> - { <nl> - QMessageBox msg ( QMessageBox : : Warning , tr ( " Current address is not executable " ) , <nl> - tr ( " Setting new origin here may result in crash . Do you really want to continue ? " ) , QMessageBox : : Yes | QMessageBox : : No , this ) ; <nl> - msg . setWindowIcon ( DIcon ( " compile - warning . png " ) ) ; <nl> - msg . setParent ( this , Qt : : Dialog ) ; <nl> - msg . setWindowFlags ( msg . windowFlags ( ) & ( ~ Qt : : WindowContextHelpButtonHint ) ) ; <nl> - if ( msg . exec ( ) = = QMessageBox : : No ) <nl> - return ; <nl> - } <nl> - QString wCmd = " cip = " + ToPtrString ( wVA ) ; <nl> - DbgCmdExec ( wCmd ) ; <nl> - } <nl> - <nl> void CPUDisassembly : : setLabelSlot ( ) <nl> { <nl> if ( ! DbgIsDebugging ( ) ) <nl> void CPUDisassembly : : setLabelAddressSlot ( ) <nl> GuiUpdateAllViews ( ) ; <nl> } <nl> <nl> - void CPUDisassembly : : setCommentSlot ( ) <nl> - { <nl> - if ( ! DbgIsDebugging ( ) ) <nl> - return ; <nl> - duint wVA = rvaToVa ( getInitialSelection ( ) ) ; <nl> - LineEditDialog mLineEdit ( this ) ; <nl> - mLineEdit . setTextMaxLength ( MAX_COMMENT_SIZE - 2 ) ; <nl> - QString addr_text = ToPtrString ( wVA ) ; <nl> - char comment_text [ MAX_COMMENT_SIZE ] = " " ; <nl> - if ( DbgGetCommentAt ( ( duint ) wVA , comment_text ) ) <nl> - { <nl> - if ( comment_text [ 0 ] = = ' \ 1 ' ) / / automatic comment <nl> - mLineEdit . setText ( QString ( comment_text + 1 ) ) ; <nl> - else <nl> - mLineEdit . setText ( QString ( comment_text ) ) ; <nl> - } <nl> - mLineEdit . setWindowTitle ( tr ( " Add comment at " ) + addr_text ) ; <nl> - if ( mLineEdit . exec ( ) ! = QDialog : : Accepted ) <nl> - return ; <nl> - QString comment = mLineEdit . editText . replace ( ' \ r ' , " " ) . replace ( ' \ n ' , " " ) ; <nl> - if ( ! DbgSetCommentAt ( wVA , comment . toUtf8 ( ) . constData ( ) ) ) <nl> - SimpleErrorBox ( this , tr ( " Error ! " ) , tr ( " DbgSetCommentAt failed ! " ) ) ; <nl> - <nl> - static bool easter = isEaster ( ) ; <nl> - if ( easter & & comment . toLower ( ) = = " oep " ) <nl> - { <nl> - QFile file ( " : / icons / images / egg . wav " ) ; <nl> - if ( file . open ( QIODevice : : ReadOnly ) ) <nl> - { <nl> - QByteArray egg = file . readAll ( ) ; <nl> - PlaySoundA ( egg . data ( ) , 0 , SND_MEMORY | SND_ASYNC | SND_NODEFAULT ) ; <nl> - } <nl> - } <nl> - <nl> - GuiUpdateAllViews ( ) ; <nl> - } <nl> - <nl> - void CPUDisassembly : : setBookmarkSlot ( ) <nl> - { <nl> - if ( ! DbgIsDebugging ( ) ) <nl> - return ; <nl> - duint wVA = rvaToVa ( getInitialSelection ( ) ) ; <nl> - bool result ; <nl> - if ( DbgGetBookmarkAt ( wVA ) ) <nl> - result = DbgSetBookmarkAt ( wVA , false ) ; <nl> - else <nl> - result = DbgSetBookmarkAt ( wVA , true ) ; <nl> - if ( ! result ) <nl> - { <nl> - QMessageBox msg ( QMessageBox : : Critical , tr ( " Error ! " ) , tr ( " DbgSetBookmarkAt failed ! " ) ) ; <nl> - msg . setWindowIcon ( DIcon ( " compile - error . png " ) ) ; <nl> - msg . setParent ( this , Qt : : Dialog ) ; <nl> - msg . setWindowFlags ( msg . windowFlags ( ) & ( ~ Qt : : WindowContextHelpButtonHint ) ) ; <nl> - msg . exec ( ) ; <nl> - } <nl> - <nl> - GuiUpdateAllViews ( ) ; <nl> - } <nl> - <nl> void CPUDisassembly : : toggleFunctionSlot ( ) <nl> { <nl> if ( ! DbgIsDebugging ( ) ) <nl> void CPUDisassembly : : setEncodeTypeSlot ( ) <nl> GuiUpdateDisassemblyView ( ) ; <nl> } <nl> <nl> - void CPUDisassembly : : graphSlot ( ) <nl> - { <nl> - if ( DbgCmdExecDirect ( QString ( " graph % 1 " ) . arg ( ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ) . toUtf8 ( ) . constData ( ) ) ) <nl> - GuiFocusView ( GUI_GRAPH ) ; <nl> - } <nl> - <nl> void CPUDisassembly : : analyzeModuleSlot ( ) <nl> { <nl> DbgCmdExec ( " cfanal " ) ; <nl> DbgCmdExec ( " analx " ) ; <nl> } <nl> <nl> - void CPUDisassembly : : createThreadSlot ( ) <nl> - { <nl> - duint addr = rvaToVa ( getSelectionStart ( ) ) ; <nl> - if ( DbgFunctions ( ) - > IsDepEnabled ( ) & & ! DbgFunctions ( ) - > MemIsCodePage ( addr , false ) ) <nl> - { <nl> - QMessageBox msg ( QMessageBox : : Warning , tr ( " Current address is not executable " ) , <nl> - tr ( " Creating new thread here may result in crash . Do you really want to continue ? " ) , QMessageBox : : Yes | QMessageBox : : No , this ) ; <nl> - msg . setWindowIcon ( DIcon ( " compile - warning . png " ) ) ; <nl> - msg . setParent ( this , Qt : : Dialog ) ; <nl> - msg . setWindowFlags ( msg . windowFlags ( ) & ( ~ Qt : : WindowContextHelpButtonHint ) ) ; <nl> - if ( msg . exec ( ) = = QMessageBox : : No ) <nl> - return ; <nl> - } <nl> - WordEditDialog argWindow ( this ) ; <nl> - argWindow . setup ( tr ( " Argument for the new thread " ) , 0 , sizeof ( duint ) ) ; <nl> - if ( argWindow . exec ( ) ! = QDialog : : Accepted ) <nl> - return ; <nl> - DbgCmdExec ( QString ( " createthread % 1 , % 2 " ) . arg ( ToPtrString ( addr ) ) . arg ( ToPtrString ( argWindow . getVal ( ) ) ) ) ; <nl> - } <nl> - <nl> void CPUDisassembly : : copyTokenTextSlot ( ) <nl> { <nl> Bridge : : CopyToClipboard ( mHighlightToken . text ) ; <nl> bool CPUDisassembly : : getTokenValueText ( QString & text ) <nl> return true ; <nl> } <nl> <nl> - void CPUDisassembly : : followInMemoryMapSlot ( ) <nl> - { <nl> - DbgCmdExec ( QString ( " memmapdump % 1 " ) . arg ( ToHexString ( rvaToVa ( getInitialSelection ( ) ) ) ) ) ; <nl> - } <nl> - <nl> void CPUDisassembly : : downloadCurrentSymbolsSlot ( ) <nl> { <nl> char module [ MAX_MODULE_SIZE ] = " " ; <nl> mmm a / src / gui / Src / Gui / CPUDisassembly . h <nl> ppp b / src / gui / Src / Gui / CPUDisassembly . h <nl> <nl> # define CPUDISASSEMBLY_H <nl> <nl> # include " Disassembly . h " <nl> - # include " BreakpointMenu . h " <nl> <nl> / / Needed forward declaration for parent container class <nl> class CPUSideBar ; <nl> class GotoDialog ; <nl> class XrefBrowseDialog ; <nl> + class CommonActions ; <nl> <nl> class CPUDisassembly : public Disassembly <nl> { <nl> class CPUDisassembly : public Disassembly <nl> void displaySymbolsWidget ( ) ; <nl> <nl> public slots : <nl> - void setNewOriginHereActionSlot ( ) ; <nl> void gotoOriginSlot ( ) ; <nl> void setLabelSlot ( ) ; <nl> void setLabelAddressSlot ( ) ; <nl> - void setCommentSlot ( ) ; <nl> - void setBookmarkSlot ( ) ; <nl> void toggleFunctionSlot ( ) ; <nl> void toggleArgumentSlot ( ) ; <nl> void addLoopSlot ( ) ; <nl> public slots : <nl> void removeAnalysisModuleSlot ( ) ; <nl> void setEncodeTypeSlot ( ) ; <nl> void setEncodeTypeRangeSlot ( ) ; <nl> - void graphSlot ( ) ; <nl> void analyzeModuleSlot ( ) ; <nl> - void createThreadSlot ( ) ; <nl> void copyTokenTextSlot ( ) ; <nl> void copyTokenValueSlot ( ) ; <nl> - void followInMemoryMapSlot ( ) ; <nl> void downloadCurrentSymbolsSlot ( ) ; <nl> <nl> protected : <nl> public slots : <nl> MenuBuilder * mMenuBuilder ; <nl> MenuBuilder * mHighlightMenuBuilder ; <nl> bool mHighlightContextMenu = false ; <nl> - BreakpointMenu * mBreakpointMenu ; <nl> + CommonActions * mCommonActions ; <nl> } ; <nl> <nl> # endif / / CPUDISASSEMBLY_H <nl> mmm a / src / gui / Src / Gui / CPUDump . cpp <nl> ppp b / src / gui / Src / Gui / CPUDump . cpp <nl> <nl> # include < QToolTip > <nl> # include " Configuration . h " <nl> # include " Bridge . h " <nl> - # include " LineEditDialog . h " <nl> # include " HexEditDialog . h " <nl> # include " CPUMultiDump . h " <nl> # include " GotoDialog . h " <nl> # include " CPUDisassembly . h " <nl> + # include " CommonActions . h " <nl> # include " WordEditDialog . h " <nl> # include " CodepageSelectionDialog . h " <nl> # include " MiscUtil . h " <nl> void CPUDump : : setupContextMenu ( ) <nl> return DbgIsDebugging ( ) ; <nl> } ) ; <nl> <nl> + mCommonActions = new CommonActions ( this , getActionHelperFuncs ( ) , [ this ] ( ) <nl> + { <nl> + return rvaToVa ( getSelectionStart ( ) ) ; <nl> + } ) ; <nl> + <nl> MenuBuilder * wBinaryMenu = new MenuBuilder ( this ) ; <nl> wBinaryMenu - > addAction ( makeShortcutAction ( DIcon ( " binary_edit . png " ) , tr ( " & Edit " ) , SLOT ( binaryEditSlot ( ) ) , " ActionBinaryEdit " ) ) ; <nl> wBinaryMenu - > addAction ( makeShortcutAction ( DIcon ( " binary_fill . png " ) , tr ( " & Fill . . . " ) , SLOT ( binaryFillSlot ( ) ) , " ActionBinaryFill " ) ) ; <nl> void CPUDump : : setupContextMenu ( ) <nl> { <nl> return DbgFunctions ( ) - > PatchInRange ( rvaToVa ( getSelectionStart ( ) ) , rvaToVa ( getSelectionEnd ( ) ) ) ; <nl> } ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " stack . png " ) , tr ( " Follow in Stack " ) , SLOT ( followStackSlot ( ) ) , " ActionFollowStack " ) , [ this ] ( QMenu * ) <nl> - { <nl> - auto start = rvaToVa ( getSelectionStart ( ) ) ; <nl> - return ( DbgMemIsValidReadPtr ( start ) & & DbgMemFindBaseAddr ( start , 0 ) = = DbgMemFindBaseAddr ( DbgValFromString ( " csp " ) , 0 ) ) ; <nl> - } ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " memmap_find_address_page . png " ) , tr ( " Follow in Memory Map " ) , SLOT ( followInMemoryMapSlot ( ) ) , " ActionFollowMemMap " ) ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( ArchValue ( " processor32 . png " , " processor64 . png " ) ) , tr ( " Follow in Disassembler " ) , SLOT ( followInDisasmSlot ( ) ) , " ActionFollowDisasm " ) ) ; <nl> + <nl> + mCommonActions - > build ( mMenuBuilder , CommonActions : : ActionDisasm | CommonActions : : ActionMemoryMap | CommonActions : : ActionDumpData | CommonActions : : ActionDumpN <nl> + | CommonActions : : ActionDisasmData | CommonActions : : ActionStackDump | CommonActions : : ActionLabel | CommonActions : : ActionWatch ) ; <nl> auto wIsValidReadPtrCallback = [ this ] ( QMenu * ) <nl> { <nl> duint ptr = 0 ; <nl> void CPUDump : : setupContextMenu ( ) <nl> return DbgMemIsValidReadPtr ( ptr ) ; <nl> } ; <nl> <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " processor32 . png " ) , ArchValue ( tr ( " & Follow DWORD in Disassembler " ) , tr ( " & Follow QWORD in Disassembler " ) ) , SLOT ( followDataSlot ( ) ) , " ActionFollowDwordQwordDisasm " ) , wIsValidReadPtrCallback ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " dump . png " ) , ArchValue ( tr ( " & Follow DWORD in Current Dump " ) , tr ( " & Follow QWORD in Current Dump " ) ) , SLOT ( followDataDumpSlot ( ) ) , " ActionFollowDwordQwordDump " ) , wIsValidReadPtrCallback ) ; <nl> - <nl> - MenuBuilder * wFollowInDumpMenu = new MenuBuilder ( this , [ wIsValidReadPtrCallback , this ] ( QMenu * menu ) <nl> - { <nl> - if ( ! wIsValidReadPtrCallback ( menu ) ) <nl> - return false ; <nl> - QList < QString > tabNames ; <nl> - mMultiDump - > getTabNames ( tabNames ) ; <nl> - for ( int i = 0 ; i < tabNames . length ( ) ; i + + ) <nl> - mFollowInDumpActions [ i ] - > setText ( tabNames [ i ] ) ; <nl> - return true ; <nl> - } ) ; <nl> - int maxDumps = mMultiDump - > getMaxCPUTabs ( ) ; <nl> - for ( int i = 0 ; i < maxDumps ; i + + ) <nl> - { <nl> - QAction * action = makeAction ( DIcon ( " dump . png " ) , QString ( ) , SLOT ( followInDumpNSlot ( ) ) ) ; <nl> - wFollowInDumpMenu - > addAction ( action ) ; <nl> - mFollowInDumpActions . push_back ( action ) ; <nl> - } <nl> - mMenuBuilder - > addMenu ( makeMenu ( DIcon ( " dump . png " ) , ArchValue ( tr ( " & Follow DWORD in Dump " ) , tr ( " & Follow QWORD in Dump " ) ) ) , wFollowInDumpMenu ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " label . png " ) , tr ( " Set & Label " ) , SLOT ( setLabelSlot ( ) ) , " ActionSetLabel " ) ) ; <nl> mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " modify . png " ) , tr ( " & Modify Value " ) , SLOT ( modifyValueSlot ( ) ) , " ActionModifyValue " ) , [ this ] ( QMenu * ) <nl> { <nl> return getSizeOf ( mDescriptor . at ( 0 ) . data . itemSize ) < = sizeof ( duint ) ; <nl> void CPUDump : : setupContextMenu ( ) <nl> { <nl> return ( DbgGetBpxTypeAt ( rvaToVa ( getSelectionStart ( ) ) ) & bp_memory ) = = 0 ; <nl> } ) ; <nl> - wHardwareAccessMenu - > addAction ( makeAction ( DIcon ( " breakpoint_byte . png " ) , tr ( " & Byte " ) , SLOT ( hardwareAccess1Slot ( ) ) ) ) ; <nl> - wHardwareAccessMenu - > addAction ( makeAction ( DIcon ( " breakpoint_word . png " ) , tr ( " & Word " ) , SLOT ( hardwareAccess2Slot ( ) ) ) ) ; <nl> - wHardwareAccessMenu - > addAction ( makeAction ( DIcon ( " breakpoint_dword . png " ) , tr ( " & Dword " ) , SLOT ( hardwareAccess4Slot ( ) ) ) ) ; <nl> + wHardwareAccessMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_byte . png " ) , tr ( " & Byte " ) , " bphws $ , r , 1 " ) ) ; <nl> + wHardwareAccessMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_word . png " ) , tr ( " & Word " ) , " bphws $ , r , 2 " ) ) ; <nl> + wHardwareAccessMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_dword . png " ) , tr ( " & Dword " ) , " bphws $ , r , 4 " ) ) ; <nl> # ifdef _WIN64 <nl> - wHardwareAccessMenu - > addAction ( makeAction ( DIcon ( " breakpoint_qword . png " ) , tr ( " & Qword " ) , SLOT ( hardwareAccess8Slot ( ) ) ) ) ; <nl> + wHardwareAccessMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_qword . png " ) , tr ( " & Qword " ) , " bphws $ , r , 8 " ) ) ; <nl> # endif / / _WIN64 <nl> - wHardwareWriteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_byte . png " ) , tr ( " & Byte " ) , SLOT ( hardwareWrite1Slot ( ) ) ) ) ; <nl> - wHardwareWriteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_word . png " ) , tr ( " & Word " ) , SLOT ( hardwareWrite2Slot ( ) ) ) ) ; <nl> - wHardwareWriteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_dword . png " ) , tr ( " & Dword " ) , SLOT ( hardwareWrite4Slot ( ) ) ) ) ; <nl> + wHardwareWriteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_byte . png " ) , tr ( " & Byte " ) , " bphws $ , w , 1 " ) ) ; <nl> + wHardwareWriteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_word . png " ) , tr ( " & Word " ) , " bphws $ , w , 2 " ) ) ; <nl> + wHardwareWriteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_dword . png " ) , tr ( " & Dword " ) , " bphws $ , w , 4 " ) ) ; <nl> # ifdef _WIN64 <nl> - wHardwareWriteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_qword . png " ) , tr ( " & Qword " ) , SLOT ( hardwareWrite8Slot ( ) ) ) ) ; <nl> + wHardwareWriteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_qword . png " ) , tr ( " & Qword " ) , " bphws $ , w , 8 " ) ) ; <nl> # endif / / _WIN64 <nl> wBreakpointMenu - > addMenu ( makeMenu ( DIcon ( " breakpoint_access . png " ) , tr ( " Hardware , & Access " ) ) , wHardwareAccessMenu ) ; <nl> wBreakpointMenu - > addMenu ( makeMenu ( DIcon ( " breakpoint_write . png " ) , tr ( " Hardware , & Write " ) ) , wHardwareWriteMenu ) ; <nl> - wBreakpointMenu - > addAction ( makeAction ( DIcon ( " breakpoint_execute . png " ) , tr ( " Hardware , & Execute " ) , SLOT ( hardwareExecuteSlot ( ) ) ) , [ this ] ( QMenu * ) <nl> + wBreakpointMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_execute . png " ) , tr ( " Hardware , & Execute " ) , " bphws $ , x " ) , [ this ] ( QMenu * ) <nl> { <nl> return ( DbgGetBpxTypeAt ( rvaToVa ( getSelectionStart ( ) ) ) & bp_hardware ) = = 0 ; <nl> } ) ; <nl> - wBreakpointMenu - > addAction ( makeAction ( DIcon ( " breakpoint_remove . png " ) , tr ( " Remove & Hardware " ) , SLOT ( hardwareRemoveSlot ( ) ) ) , [ this ] ( QMenu * ) <nl> + wBreakpointMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_remove . png " ) , tr ( " Remove & Hardware " ) , " bphwc $ " ) , [ this ] ( QMenu * ) <nl> { <nl> return ( DbgGetBpxTypeAt ( rvaToVa ( getSelectionStart ( ) ) ) & bp_hardware ) ! = 0 ; <nl> } ) ; <nl> wBreakpointMenu - > addSeparator ( ) ; <nl> - wMemoryAccessMenu - > addAction ( makeAction ( DIcon ( " breakpoint_memory_singleshoot . png " ) , tr ( " & Singleshoot " ) , SLOT ( memoryAccessSingleshootSlot ( ) ) ) ) ; <nl> - wMemoryAccessMenu - > addAction ( makeAction ( DIcon ( " breakpoint_memory_restore_on_hit . png " ) , tr ( " & Restore on hit " ) , SLOT ( memoryAccessRestoreSlot ( ) ) ) ) ; <nl> - wMemoryReadMenu - > addAction ( makeAction ( DIcon ( " breakpoint_memory_singleshoot . png " ) , tr ( " & Singleshoot " ) , SLOT ( memoryReadSingleshootSlot ( ) ) ) ) ; <nl> - wMemoryReadMenu - > addAction ( makeAction ( DIcon ( " breakpoint_memory_restore_on_hit . png " ) , tr ( " & Restore on hit " ) , SLOT ( memoryReadRestoreSlot ( ) ) ) ) ; <nl> - wMemoryWriteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_memory_singleshoot . png " ) , tr ( " & Singleshoot " ) , SLOT ( memoryWriteSingleshootSlot ( ) ) ) ) ; <nl> - wMemoryWriteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_memory_restore_on_hit . png " ) , tr ( " & Restore on hit " ) , SLOT ( memoryWriteRestoreSlot ( ) ) ) ) ; <nl> - wMemoryExecuteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_memory_singleshoot . png " ) , tr ( " & Singleshoot " ) , SLOT ( memoryExecuteSingleshootSlot ( ) ) ) ) ; <nl> - wMemoryExecuteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_memory_restore_on_hit . png " ) , tr ( " & Restore on hit " ) , SLOT ( memoryExecuteRestoreSlot ( ) ) ) ) ; <nl> + wMemoryAccessMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_memory_singleshoot . png " ) , tr ( " & Singleshoot " ) , " bpm $ , 0 , a " ) ) ; <nl> + wMemoryAccessMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_memory_restore_on_hit . png " ) , tr ( " & Restore on hit " ) , " bpm $ , 1 , a " ) ) ; <nl> + wMemoryReadMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_memory_singleshoot . png " ) , tr ( " & Singleshoot " ) , " bpm $ , 0 , r " ) ) ; <nl> + wMemoryReadMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_memory_restore_on_hit . png " ) , tr ( " & Restore on hit " ) , " bpm $ , 1 , r " ) ) ; <nl> + wMemoryWriteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_memory_singleshoot . png " ) , tr ( " & Singleshoot " ) , " bpm $ , 0 , w " ) ) ; <nl> + wMemoryWriteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_memory_restore_on_hit . png " ) , tr ( " & Restore on hit " ) , " bpm $ , 1 , w " ) ) ; <nl> + wMemoryExecuteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_memory_singleshoot . png " ) , tr ( " & Singleshoot " ) , " bpm $ , 0 , x " ) ) ; <nl> + wMemoryExecuteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_memory_restore_on_hit . png " ) , tr ( " & Restore on hit " ) , " bpm $ , 1 , x " ) ) ; <nl> wBreakpointMenu - > addMenu ( makeMenu ( DIcon ( " breakpoint_memory_access . png " ) , tr ( " Memory , Access " ) ) , wMemoryAccessMenu ) ; <nl> wBreakpointMenu - > addMenu ( makeMenu ( DIcon ( " breakpoint_memory_read . png " ) , tr ( " Memory , Read " ) ) , wMemoryReadMenu ) ; <nl> wBreakpointMenu - > addMenu ( makeMenu ( DIcon ( " breakpoint_memory_write . png " ) , tr ( " Memory , Write " ) ) , wMemoryWriteMenu ) ; <nl> wBreakpointMenu - > addMenu ( makeMenu ( DIcon ( " breakpoint_memory_execute . png " ) , tr ( " Memory , Execute " ) ) , wMemoryExecuteMenu ) ; <nl> - wBreakpointMenu - > addAction ( makeAction ( DIcon ( " breakpoint_remove . png " ) , tr ( " Remove & Memory " ) , SLOT ( memoryRemoveSlot ( ) ) ) , [ this ] ( QMenu * ) <nl> + wBreakpointMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_remove . png " ) , tr ( " Remove & Memory " ) , " bpmc $ " ) , [ this ] ( QMenu * ) <nl> { <nl> return ( DbgGetBpxTypeAt ( rvaToVa ( getSelectionStart ( ) ) ) & bp_memory ) ! = 0 ; <nl> } ) ; <nl> void CPUDump : : setupContextMenu ( ) <nl> mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " find . png " ) , tr ( " Find & References " ) , SLOT ( findReferencesSlot ( ) ) , " ActionFindReferences " ) ) ; <nl> <nl> mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " sync . png " ) , tr ( " & Sync with expression " ) , SLOT ( syncWithExpressionSlot ( ) ) , " ActionSyncWithExpression " ) ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " animal - dog . png " ) , ArchValue ( tr ( " Watch DWORD " ) , tr ( " Watch QWORD " ) ) , SLOT ( watchSlot ( ) ) , " ActionWatchDwordQword " ) ) ; <nl> mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " memmap_alloc_memory . png " ) , tr ( " Allocate Memory " ) , SLOT ( allocMemorySlot ( ) ) , " ActionAllocateMemory " ) ) ; <nl> <nl> MenuBuilder * wGotoMenu = new MenuBuilder ( this ) ; <nl> void CPUDump : : mouseMoveEvent ( QMouseEvent * event ) <nl> HexDump : : mouseMoveEvent ( event ) ; <nl> } <nl> <nl> - void CPUDump : : setLabelSlot ( ) <nl> - { <nl> - if ( ! DbgIsDebugging ( ) ) <nl> - return ; <nl> - <nl> - duint wVA = rvaToVa ( getSelectionStart ( ) ) ; <nl> - LineEditDialog mLineEdit ( this ) ; <nl> - mLineEdit . setTextMaxLength ( MAX_LABEL_SIZE - 2 ) ; <nl> - QString addr_text = ToPtrString ( wVA ) ; <nl> - char label_text [ MAX_LABEL_SIZE ] = " " ; <nl> - if ( DbgGetLabelAt ( ( duint ) wVA , SEG_DEFAULT , label_text ) ) <nl> - mLineEdit . setText ( QString ( label_text ) ) ; <nl> - mLineEdit . setWindowTitle ( tr ( " Add label at " ) + addr_text ) ; <nl> - restart : <nl> - if ( mLineEdit . exec ( ) ! = QDialog : : Accepted ) <nl> - return ; <nl> - QByteArray utf8data = mLineEdit . editText . toUtf8 ( ) ; <nl> - if ( ! utf8data . isEmpty ( ) & & DbgIsValidExpression ( utf8data . constData ( ) ) & & DbgValFromString ( utf8data . constData ( ) ) ! = wVA ) <nl> - { <nl> - QMessageBox msg ( QMessageBox : : Warning , tr ( " The label may be in use " ) , <nl> - tr ( " The label \ " % 1 \ " may be an existing label or a valid expression . Using such label might have undesired effects . Do you still want to continue ? " ) . arg ( mLineEdit . editText ) , <nl> - QMessageBox : : Yes | QMessageBox : : No , this ) ; <nl> - msg . setWindowIcon ( DIcon ( " compile - warning . png " ) ) ; <nl> - msg . setParent ( this , Qt : : Dialog ) ; <nl> - msg . setWindowFlags ( msg . windowFlags ( ) & ( ~ Qt : : WindowContextHelpButtonHint ) ) ; <nl> - if ( msg . exec ( ) = = QMessageBox : : No ) <nl> - goto restart ; <nl> - } <nl> - if ( ! DbgSetLabelAt ( wVA , utf8data . constData ( ) ) ) <nl> - SimpleErrorBox ( this , tr ( " Error ! " ) , tr ( " DbgSetLabelAt failed ! " ) ) ; <nl> - GuiUpdateAllViews ( ) ; <nl> - } <nl> - <nl> void CPUDump : : modifyValueSlot ( ) <nl> { <nl> dsint addr = getSelectionStart ( ) ; <nl> void CPUDump : : selectionSet ( const SELECTIONDATA * selection ) <nl> Bridge : : getBridge ( ) - > setResult ( BridgeResult : : SelectionSet , 1 ) ; <nl> } <nl> <nl> - void CPUDump : : memoryAccessSingleshootSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpm " + addr_text + " , 0 , a " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : memoryAccessRestoreSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpm " + addr_text + " , 1 , a " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : memoryReadSingleshootSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpm " + addr_text + " , 0 , r " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : memoryReadRestoreSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpm " + addr_text + " , 1 , r " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : memoryWriteSingleshootSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpm " + addr_text + " , 0 , w " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : memoryWriteRestoreSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpm " + addr_text + " , 1 , w " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : memoryExecuteSingleshootSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpm " + addr_text + " , 0 , x " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : memoryExecuteRestoreSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpm " + addr_text + " , 1 , x " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : memoryRemoveSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpmc " + addr_text ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : hardwareAccess1Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , r , 1 " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : hardwareAccess2Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , r , 2 " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : hardwareAccess4Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , r , 4 " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : hardwareAccess8Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , r , 8 " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : hardwareWrite1Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , w , 1 " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : hardwareWrite2Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , w , 2 " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : hardwareWrite4Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , w , 4 " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : hardwareWrite8Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , w , 8 " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : hardwareExecuteSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , x " ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : hardwareRemoveSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphwc " + addr_text ) ) ; <nl> - } <nl> - <nl> void CPUDump : : findReferencesSlot ( ) <nl> { <nl> QString addrStart = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> void CPUDump : : undoSelectionSlot ( ) <nl> reloadData ( ) ; <nl> } <nl> <nl> - void CPUDump : : followStackSlot ( ) <nl> - { <nl> - DbgCmdExec ( QString ( " sdump " + ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : followInDisasmSlot ( ) <nl> - { <nl> - DbgCmdExec ( QString ( " disasm " + ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : followDataSlot ( ) <nl> - { <nl> - DbgCmdExec ( QString ( " disasm \ " [ % 1 ] \ " " ) . arg ( ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : followDataDumpSlot ( ) <nl> - { <nl> - DbgCmdExec ( QString ( " dump \ " [ % 1 ] \ " " ) . arg ( ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ) ) ; <nl> - } <nl> - <nl> void CPUDump : : selectionUpdatedSlot ( ) <nl> { <nl> QString selStart = ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ; <nl> void CPUDump : : syncWithExpressionSlot ( ) <nl> updateDumpSlot ( ) ; <nl> } <nl> <nl> - void CPUDump : : followInDumpNSlot ( ) <nl> - { <nl> - for ( int i = 0 ; i < mFollowInDumpActions . length ( ) ; i + + ) <nl> - if ( mFollowInDumpActions [ i ] = = sender ( ) ) <nl> - DbgCmdExec ( QString ( " dump \ " [ % 1 ] \ " , \ " % 2 \ " " ) . arg ( ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ) . arg ( i + 1 ) ) ; <nl> - } <nl> - <nl> - void CPUDump : : watchSlot ( ) <nl> - { <nl> - DbgCmdExec ( QString ( " AddWatch \ " [ % 1 ] \ " , \ " uint \ " " ) . arg ( ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ) ) ; <nl> - } <nl> - <nl> void CPUDump : : allocMemorySlot ( ) <nl> { <nl> WordEditDialog mLineEdit ( this ) ; <nl> void CPUDump : : setView ( ViewEnum_t view ) <nl> } <nl> } <nl> <nl> - void CPUDump : : followInMemoryMapSlot ( ) <nl> - { <nl> - DbgCmdExec ( QString ( " memmapdump % 1 " ) . arg ( ToHexString ( rvaToVa ( getSelectionStart ( ) ) ) ) ) ; <nl> - } <nl> - <nl> void CPUDump : : headerButtonReleasedSlot ( int colIndex ) <nl> { <nl> auto callback = mDescriptor [ colIndex ] . columnSwitch ; <nl> mmm a / src / gui / Src / Gui / CPUDump . h <nl> ppp b / src / gui / Src / Gui / CPUDump . h <nl> <nl> class CPUMultiDump ; <nl> class CPUDisassembly ; <nl> class GotoDialog ; <nl> + class CommonActions ; <nl> <nl> class CPUDump : public HexDump <nl> { <nl> class CPUDump : public HexDump <nl> void showDisassemblyTab ( duint selectionStart , duint selectionEnd , duint firstAddress ) ; <nl> <nl> public slots : <nl> - void memoryAccessSingleshootSlot ( ) ; <nl> - void memoryAccessRestoreSlot ( ) ; <nl> - void memoryReadSingleshootSlot ( ) ; <nl> - void memoryReadRestoreSlot ( ) ; <nl> - void memoryWriteSingleshootSlot ( ) ; <nl> - void memoryWriteRestoreSlot ( ) ; <nl> - void memoryExecuteSingleshootSlot ( ) ; <nl> - void memoryExecuteRestoreSlot ( ) ; <nl> - void memoryRemoveSlot ( ) ; <nl> - void hardwareAccess1Slot ( ) ; <nl> - void hardwareAccess2Slot ( ) ; <nl> - void hardwareAccess4Slot ( ) ; <nl> - void hardwareAccess8Slot ( ) ; <nl> - void hardwareWrite1Slot ( ) ; <nl> - void hardwareWrite2Slot ( ) ; <nl> - void hardwareWrite4Slot ( ) ; <nl> - void hardwareWrite8Slot ( ) ; <nl> - void hardwareExecuteSlot ( ) ; <nl> - void hardwareRemoveSlot ( ) ; <nl> - <nl> - void setLabelSlot ( ) ; <nl> void modifyValueSlot ( ) ; <nl> void gotoExpressionSlot ( ) ; <nl> void gotoFileOffsetSlot ( ) ; <nl> public slots : <nl> void findPattern ( ) ; <nl> void copyFileOffsetSlot ( ) ; <nl> void undoSelectionSlot ( ) ; <nl> - void followStackSlot ( ) ; <nl> void findReferencesSlot ( ) ; <nl> - void followInDisasmSlot ( ) ; <nl> - void followDataSlot ( ) ; <nl> - void followDataDumpSlot ( ) ; <nl> - <nl> - void watchSlot ( ) ; <nl> <nl> void selectionUpdatedSlot ( ) ; <nl> void syncWithExpressionSlot ( ) ; <nl> - void followInDumpNSlot ( ) ; <nl> void allocMemorySlot ( ) ; <nl> <nl> - void followInMemoryMapSlot ( ) ; <nl> void headerButtonReleasedSlot ( int colIndex ) ; <nl> <nl> private : <nl> MenuBuilder * mMenuBuilder ; <nl> + CommonActions * mCommonActions ; <nl> <nl> QMenu * mPluginMenu ; <nl> QMenu * mFollowInDumpMenu ; <nl> mmm a / src / gui / Src / Gui / CPUStack . cpp <nl> ppp b / src / gui / Src / Gui / CPUStack . cpp <nl> <nl> # include < QClipboard > <nl> # include " Configuration . h " <nl> # include " Bridge . h " <nl> + # include " CommonActions . h " <nl> # include " HexEditDialog . h " <nl> # include " WordEditDialog . h " <nl> # include " CPUMultiDump . h " <nl> void CPUStack : : setupContextMenu ( ) <nl> { <nl> return DbgIsDebugging ( ) ; <nl> } ) ; <nl> + mCommonActions = new CommonActions ( this , getActionHelperFuncs ( ) , [ this ] ( ) <nl> + { <nl> + return rvaToVa ( getSelectionStart ( ) ) ; <nl> + } ) ; <nl> <nl> / / Push <nl> mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " arrow - small - down . png " ) , ArchValue ( tr ( " P & ush DWORD . . . " ) , tr ( " P & ush QWORD . . . " ) ) , SLOT ( pushSlot ( ) ) , " ActionPush " ) ) ; <nl> void CPUStack : : setupContextMenu ( ) <nl> <nl> / / Breakpoint ( hardware access ) menu <nl> auto hardwareAccessMenu = makeMenu ( DIcon ( " breakpoint_access . png " ) , tr ( " Hardware , Access " ) ) ; <nl> - hardwareAccessMenu - > addAction ( makeAction ( DIcon ( " breakpoint_byte . png " ) , tr ( " & Byte " ) , SLOT ( hardwareAccess1Slot ( ) ) ) ) ; <nl> - hardwareAccessMenu - > addAction ( makeAction ( DIcon ( " breakpoint_word . png " ) , tr ( " & Word " ) , SLOT ( hardwareAccess2Slot ( ) ) ) ) ; <nl> - hardwareAccessMenu - > addAction ( makeAction ( DIcon ( " breakpoint_dword . png " ) , tr ( " & Dword " ) , SLOT ( hardwareAccess4Slot ( ) ) ) ) ; <nl> + hardwareAccessMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_byte . png " ) , tr ( " & Byte " ) , " bphws $ , r , 1 " ) ) ; <nl> + hardwareAccessMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_word . png " ) , tr ( " & Word " ) , " bphws $ , r , 2 " ) ) ; <nl> + hardwareAccessMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_dword . png " ) , tr ( " & Dword " ) , " bphws $ , r , 4 " ) ) ; <nl> # ifdef _WIN64 <nl> - hardwareAccessMenu - > addAction ( makeAction ( DIcon ( " breakpoint_qword . png " ) , tr ( " & Qword " ) , SLOT ( hardwareAccess8Slot ( ) ) ) ) ; <nl> + hardwareAccessMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_qword . png " ) , tr ( " & Qword " ) , " bphws $ , r , 8 " ) ) ; <nl> # endif / / _WIN64 <nl> <nl> / / Breakpoint ( hardware write ) menu <nl> auto hardwareWriteMenu = makeMenu ( DIcon ( " breakpoint_write . png " ) , tr ( " Hardware , Write " ) ) ; <nl> - hardwareWriteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_byte . png " ) , tr ( " & Byte " ) , SLOT ( hardwareWrite1Slot ( ) ) ) ) ; <nl> - hardwareWriteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_word . png " ) , tr ( " & Word " ) , SLOT ( hardwareWrite2Slot ( ) ) ) ) ; <nl> - hardwareWriteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_dword . png " ) , tr ( " & Dword " ) , SLOT ( hardwareWrite4Slot ( ) ) ) ) ; <nl> + hardwareWriteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_byte . png " ) , tr ( " & Byte " ) , " bphws $ , w , 1 " ) ) ; <nl> + hardwareWriteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_word . png " ) , tr ( " & Word " ) , " bphws $ , w , 2 " ) ) ; <nl> + hardwareWriteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_dword . png " ) , tr ( " & Dword " ) , " bphws $ , w , 4 " ) ) ; <nl> # ifdef _WIN64 <nl> - hardwareWriteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_qword . png " ) , tr ( " & Qword " ) , SLOT ( hardwareAccess8Slot ( ) ) ) ) ; <nl> + hardwareWriteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_qword . png " ) , tr ( " & Qword " ) , " bphws $ , r , 8 " ) ) ; <nl> # endif / / _WIN64 <nl> <nl> / / Breakpoint ( remove hardware ) <nl> - auto hardwareRemove = makeAction ( DIcon ( " breakpoint_remove . png " ) , tr ( " Remove & Hardware " ) , SLOT ( hardwareRemoveSlot ( ) ) ) ; <nl> + auto hardwareRemove = mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_remove . png " ) , tr ( " Remove & Hardware " ) , " bphwc $ " ) ; <nl> <nl> / / Breakpoint ( memory access ) menu <nl> auto memoryAccessMenu = makeMenu ( DIcon ( " breakpoint_memory_access . png " ) , tr ( " Memory , Access " ) ) ; <nl> - memoryAccessMenu - > addAction ( makeAction ( DIcon ( " breakpoint_memory_singleshoot . png " ) , tr ( " & Singleshoot " ) , SLOT ( memoryAccessSingleshootSlot ( ) ) ) ) ; <nl> - memoryAccessMenu - > addAction ( makeAction ( DIcon ( " breakpoint_memory_restore_on_hit . png " ) , tr ( " & Restore on hit " ) , SLOT ( memoryAccessRestoreSlot ( ) ) ) ) ; <nl> + memoryAccessMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_memory_singleshoot . png " ) , tr ( " & Singleshoot " ) , " bpm $ , 0 , a " ) ) ; <nl> + memoryAccessMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_memory_restore_on_hit . png " ) , tr ( " & Restore on hit " ) , " bpm $ , 1 , a " ) ) ; <nl> <nl> / / Breakpoint ( memory write ) menu <nl> auto memoryWriteMenu = makeMenu ( DIcon ( " breakpoint_memory_write . png " ) , tr ( " Memory , Write " ) ) ; <nl> - memoryWriteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_memory_singleshoot . png " ) , tr ( " & Singleshoot " ) , SLOT ( memoryWriteSingleshootSlot ( ) ) ) ) ; <nl> - memoryWriteMenu - > addAction ( makeAction ( DIcon ( " breakpoint_memory_restore_on_hit . png " ) , tr ( " & Restore on hit " ) , SLOT ( memoryWriteRestoreSlot ( ) ) ) ) ; <nl> + memoryWriteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_memory_singleshoot . png " ) , tr ( " & Singleshoot " ) , " bpm $ , 0 , w " ) ) ; <nl> + memoryWriteMenu - > addAction ( mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_memory_restore_on_hit . png " ) , tr ( " & Restore on hit " ) , " bpm $ , 1 , w " ) ) ; <nl> <nl> / / Breakpoint ( remove memory ) menu <nl> - auto memoryRemove = makeAction ( DIcon ( " breakpoint_remove . png " ) , tr ( " Remove & Memory " ) , SLOT ( memoryRemoveSlot ( ) ) ) ; <nl> + auto memoryRemove = mCommonActions - > makeCommandAction ( DIcon ( " breakpoint_remove . png " ) , tr ( " Remove & Memory " ) , " bpmc $ " ) ; <nl> <nl> / / Breakpoint menu <nl> auto breakpointMenu = new MenuBuilder ( this ) ; <nl> void CPUStack : : setupContextMenu ( ) <nl> <nl> / / Follow CSP <nl> mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " neworigin . png " ) , ArchValue ( tr ( " Follow E & SP " ) , tr ( " Follow R & SP " ) ) , SLOT ( gotoCspSlot ( ) ) , " ActionGotoOrigin " ) ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " cbp . png " ) , ArchValue ( tr ( " Follow E & BP " ) , tr ( " Follow R & BP " ) ) , SLOT ( gotoCbpSlot ( ) ) , " ActionGotoCBP " ) , [ this ] ( QMenu * ) <nl> + mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " cbp . png " ) , ArchValue ( tr ( " Follow E & BP " ) , tr ( " Follow R & BP " ) ) , SLOT ( gotoCbpSlot ( ) ) , " ActionGotoCBP " ) , [ ] ( QMenu * ) <nl> { <nl> return DbgMemIsValidReadPtr ( DbgValFromString ( " cbp " ) ) ; <nl> } ) ; <nl> void CPUStack : : setupContextMenu ( ) <nl> mFreezeStack - > setCheckable ( true ) ; <nl> <nl> / / Follow in Memory Map <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " memmap_find_address_page . png " ) , ArchValue ( tr ( " Follow DWORD in Memory Map " ) , tr ( " Follow QWORD in Memory Map " ) ) , SLOT ( followInMemoryMapSlot ( ) ) , " ActionFollowMemMap " ) , [ this ] ( QMenu * ) <nl> - { <nl> - duint ptr ; <nl> - return DbgMemRead ( rvaToVa ( getInitialSelection ( ) ) , ( unsigned char * ) & ptr , sizeof ( ptr ) ) & & DbgMemIsValidReadPtr ( ptr ) ; <nl> - } ) ; <nl> + mCommonActions - > build ( mMenuBuilder , CommonActions : : ActionMemoryMap | CommonActions : : ActionDump | CommonActions : : ActionDumpData ) ; <nl> <nl> + / / Follow in Stack <nl> auto followStackName = ArchValue ( tr ( " Follow DWORD in & Stack " ) , tr ( " Follow QWORD in & Stack " ) ) ; <nl> mFollowStack = makeAction ( DIcon ( " stack . png " ) , followStackName , SLOT ( followStackSlot ( ) ) ) ; <nl> mFollowStack - > setShortcutContext ( Qt : : WidgetShortcut ) ; <nl> void CPUStack : : setupContextMenu ( ) <nl> return DbgMemRead ( rvaToVa ( getInitialSelection ( ) ) , ( unsigned char * ) & ptr , sizeof ( ptr ) ) & & DbgMemIsValidReadPtr ( ptr ) ; <nl> } ) ; <nl> <nl> - / / Follow in Dump <nl> - mMenuBuilder - > addAction ( makeAction ( DIcon ( " dump . png " ) , tr ( " Follow in Dump " ) , SLOT ( followInDumpSlot ( ) ) ) ) ; <nl> - <nl> / / Follow PTR in Dump <nl> auto followDumpName = ArchValue ( tr ( " Follow DWORD in & Dump " ) , tr ( " Follow QWORD in & Dump " ) ) ; <nl> - mMenuBuilder - > addAction ( makeAction ( DIcon ( " dump . png " ) , followDumpName , SLOT ( followDumpPtrSlot ( ) ) ) , [ this ] ( QMenu * ) <nl> - { <nl> - duint ptr ; <nl> - return DbgMemRead ( rvaToVa ( getInitialSelection ( ) ) , ( unsigned char * ) & ptr , sizeof ( ptr ) ) & & DbgMemIsValidReadPtr ( ptr ) ; <nl> - } ) ; <nl> <nl> - / / Follow in Dump N menu <nl> - auto followDumpNMenu = new MenuBuilder ( this , [ this ] ( QMenu * ) <nl> - { <nl> - duint ptr ; <nl> - return DbgMemRead ( rvaToVa ( getInitialSelection ( ) ) , ( unsigned char * ) & ptr , sizeof ( ptr ) ) & & DbgMemIsValidReadPtr ( ptr ) ; <nl> - } ) ; <nl> - int maxDumps = mMultiDump - > getMaxCPUTabs ( ) ; <nl> - for ( int i = 0 ; i < maxDumps ; i + + ) <nl> - { <nl> - auto action = makeAction ( tr ( " Dump % 1 " ) . arg ( i + 1 ) , SLOT ( followinDumpNSlot ( ) ) ) ; <nl> - followDumpNMenu - > addAction ( action ) ; <nl> - mFollowInDumpActions . push_back ( action ) ; <nl> - } <nl> - mMenuBuilder - > addMenu ( makeMenu ( DIcon ( " dump . png " ) , followDumpName . replace ( " & " , " " ) ) , followDumpNMenu ) ; <nl> - <nl> - / / Watch data <nl> - auto watchDataName = ArchValue ( tr ( " & Watch DWORD " ) , tr ( " & Watch QWORD " ) ) ; <nl> - mMenuBuilder - > addAction ( makeAction ( DIcon ( " animal - dog . png " ) , watchDataName , SLOT ( watchDataSlot ( ) ) ) ) ; <nl> + mCommonActions - > build ( mMenuBuilder , CommonActions : : ActionDumpN | CommonActions : : ActionWatch ) ; <nl> <nl> mPluginMenu = new QMenu ( this ) ; <nl> Bridge : : getBridge ( ) - > emitMenuAddToList ( this , mPluginMenu , GUI_STACK_MENU ) ; <nl> void CPUStack : : followDisasmSlot ( ) <nl> } <nl> } <nl> <nl> - void CPUStack : : followDumpPtrSlot ( ) <nl> - { <nl> - duint selectedData ; <nl> - if ( mMemPage - > read ( ( byte_t * ) & selectedData , getInitialSelection ( ) , sizeof ( duint ) ) ) <nl> - if ( DbgMemIsValidReadPtr ( selectedData ) ) / / data is a pointer <nl> - { <nl> - QString addrText = ToPtrString ( selectedData ) ; <nl> - DbgCmdExec ( QString ( " dump " + addrText ) ) ; <nl> - } <nl> - } <nl> - <nl> - void CPUStack : : followinDumpNSlot ( ) <nl> - { <nl> - duint selectedData = rvaToVa ( getInitialSelection ( ) ) ; <nl> - <nl> - if ( DbgMemIsValidReadPtr ( selectedData ) ) <nl> - { <nl> - for ( int i = 0 ; i < mFollowInDumpActions . length ( ) ; i + + ) <nl> - { <nl> - if ( mFollowInDumpActions [ i ] = = sender ( ) ) <nl> - { <nl> - QString addrText = QString ( " % 1 " ) . arg ( ToPtrString ( selectedData ) ) ; <nl> - DbgCmdExec ( QString ( " dump [ % 1 ] , % 2 " ) . arg ( addrText . toUtf8 ( ) . constData ( ) ) . arg ( i + 1 ) ) ; <nl> - } <nl> - } <nl> - } <nl> - } <nl> - <nl> void CPUStack : : followStackSlot ( ) <nl> { <nl> duint selectedData ; <nl> void CPUStack : : followStackSlot ( ) <nl> } <nl> } <nl> <nl> - void CPUStack : : watchDataSlot ( ) <nl> - { <nl> - DbgCmdExec ( QString ( " AddWatch \ " [ % 1 ] \ " , \ " uint \ " " ) . arg ( ToPtrString ( rvaToVa ( getSelectionStart ( ) ) ) ) ) ; <nl> - } <nl> - <nl> void CPUStack : : binaryEditSlot ( ) <nl> { <nl> HexEditDialog hexEdit ( this ) ; <nl> void CPUStack : : binaryPasteIgnoreSizeSlot ( ) <nl> GuiUpdateAllViews ( ) ; <nl> } <nl> <nl> - / / Copied from " CPUDump . cpp " . <nl> - void CPUStack : : hardwareAccess1Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , r , 1 " ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : hardwareAccess2Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , r , 2 " ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : hardwareAccess4Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , r , 4 " ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : hardwareAccess8Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , r , 8 " ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : hardwareWrite1Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , w , 1 " ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : hardwareWrite2Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , w , 2 " ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : hardwareWrite4Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , w , 4 " ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : hardwareWrite8Slot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphws " + addr_text + " , w , 8 " ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : hardwareRemoveSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bphwc " + addr_text ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : memoryAccessSingleshootSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpm " + addr_text + " , 0 , a " ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : memoryAccessRestoreSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpm " + addr_text + " , 1 , a " ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : memoryWriteSingleshootSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpm " + addr_text + " , 0 , w " ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : memoryWriteRestoreSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpm " + addr_text + " , 1 , w " ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : memoryRemoveSlot ( ) <nl> - { <nl> - QString addr_text = ToPtrString ( rvaToVa ( getInitialSelection ( ) ) ) ; <nl> - DbgCmdExec ( QString ( " bpmc " + addr_text ) ) ; <nl> - } <nl> - <nl> void CPUStack : : findPattern ( ) <nl> { <nl> HexEditDialog hexEdit ( this ) ; <nl> void CPUStack : : dbgStateChangedSlot ( DBGSTATE state ) <nl> updateFreezeStackAction ( ) ; <nl> } <nl> } <nl> - <nl> - void CPUStack : : followInMemoryMapSlot ( ) <nl> - { <nl> - DbgCmdExec ( QString ( " memmapdump [ % 1 ] " ) . arg ( ToHexString ( rvaToVa ( getInitialSelection ( ) ) ) ) ) ; <nl> - } <nl> - <nl> - void CPUStack : : followInDumpSlot ( ) <nl> - { <nl> - DbgCmdExec ( QString ( " dump % 1 " ) . arg ( ToHexString ( rvaToVa ( getInitialSelection ( ) ) ) ) ) ; <nl> - } <nl> mmm a / src / gui / Src / Gui / CPUStack . h <nl> ppp b / src / gui / Src / Gui / CPUStack . h <nl> <nl> / / forward declaration <nl> class CPUMultiDump ; <nl> class GotoDialog ; <nl> + class CommonActions ; <nl> <nl> class CPUStack : public HexDump <nl> { <nl> public slots : <nl> void selectionSet ( const SELECTIONDATA * selection ) ; <nl> void selectionUpdatedSlot ( ) ; <nl> void followDisasmSlot ( ) ; <nl> - void followDumpPtrSlot ( ) ; <nl> - void followinDumpNSlot ( ) ; <nl> void followStackSlot ( ) ; <nl> - void watchDataSlot ( ) ; <nl> void binaryEditSlot ( ) ; <nl> void binaryFillSlot ( ) ; <nl> void binaryCopySlot ( ) ; <nl> void binaryPasteSlot ( ) ; <nl> - void memoryAccessSingleshootSlot ( ) ; <nl> - void memoryAccessRestoreSlot ( ) ; <nl> - void memoryWriteSingleshootSlot ( ) ; <nl> - void memoryWriteRestoreSlot ( ) ; <nl> - void memoryRemoveSlot ( ) ; <nl> - void hardwareAccess1Slot ( ) ; <nl> - void hardwareAccess2Slot ( ) ; <nl> - void hardwareAccess4Slot ( ) ; <nl> - void hardwareAccess8Slot ( ) ; <nl> - void hardwareWrite1Slot ( ) ; <nl> - void hardwareWrite2Slot ( ) ; <nl> - void hardwareWrite4Slot ( ) ; <nl> - void hardwareWrite8Slot ( ) ; <nl> - void hardwareRemoveSlot ( ) ; <nl> void findPattern ( ) ; <nl> void binaryPasteIgnoreSizeSlot ( ) ; <nl> void undoSelectionSlot ( ) ; <nl> public slots : <nl> void realignSlot ( ) ; <nl> void freezeStackSlot ( ) ; <nl> void dbgStateChangedSlot ( DBGSTATE state ) ; <nl> - void followInMemoryMapSlot ( ) ; <nl> - void followInDumpSlot ( ) ; <nl> void updateSlot ( ) ; <nl> <nl> private : <nl> public slots : <nl> QAction * mFreezeStack ; <nl> QAction * mFollowStack ; <nl> QAction * mFollowDisasm ; <nl> - QList < QAction * > mFollowInDumpActions ; <nl> QMenu * mPluginMenu ; <nl> <nl> GotoDialog * mGoto ; <nl> public slots : <nl> } ; <nl> <nl> MenuBuilder * mMenuBuilder ; <nl> + CommonActions * mCommonActions ; <nl> <nl> std : : vector < CPUCallStack > mCallstack ; <nl> static int CPUStack : : getCurrentFrame ( const std : : vector < CPUStack : : CPUCallStack > & mCallstack , duint wVA ) ; <nl> mmm a / src / gui / Src / Gui / CPUWidget . cpp <nl> ppp b / src / gui / Src / Gui / CPUWidget . cpp <nl> CPUWidget : : CPUWidget ( QWidget * parent ) : QWidget ( parent ) , ui ( new Ui : : CPUWidget ) <nl> <nl> connect ( mDisas , SIGNAL ( selectionChanged ( dsint ) ) , mInfo , SLOT ( disasmSelectionChanged ( dsint ) ) ) ; <nl> <nl> - mDump = new CPUMultiDump ( mDisas , 5 , 0 ) ; / / dump widget <nl> + mDump = new CPUMultiDump ( mDisas , 5 , this ) ; / / dump widget <nl> ui - > mBotLeftFrameLayout - > addWidget ( mDump ) ; <nl> <nl> mGeneralRegs = new CPURegistersView ( this ) ; <nl> mmm a / src / gui / Src / Gui / DisassemblerGraphView . cpp <nl> ppp b / src / gui / Src / Gui / DisassemblerGraphView . cpp <nl> <nl> # include " QBeaEngine . h " <nl> # include " GotoDialog . h " <nl> # include " XrefBrowseDialog . h " <nl> - # include " LineEditDialog . h " <nl> # include < vector > <nl> # include < QPainter > <nl> # include < QScrollBar > <nl> <nl> # include < QMimeData > <nl> # include < QFileDialog > <nl> # include < QMessageBox > <nl> - # include " BreakpointMenu . h " <nl> + # include " CommonActions . h " <nl> # include " StringUtil . h " <nl> # include " MiscUtil . h " <nl> # include < QMainWindow > <nl> void DisassemblerGraphView : : setupContextMenu ( ) <nl> return DbgIsDebugging ( ) & & this - > ready ; <nl> } ) ; <nl> <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( QString ( " processor % 1 . png " ) . arg ( ArchValue ( " 32 " , " 64 " ) ) ) , tr ( " Follow in & Disassembler " ) , SLOT ( followDisassemblerSlot ( ) ) , " ActionGraphFollowDisassembler " ) , [ this ] ( QMenu * ) <nl> - { <nl> - return this - > cur_instr ! = 0 ; <nl> - } ) ; <nl> mMenuBuilder - > addSeparator ( ) ; <nl> <nl> - auto breakpointMenu = new BreakpointMenu ( this , getActionHelperFuncs ( ) , [ this ] ( ) <nl> + mCommonActions = new CommonActions ( this , getActionHelperFuncs ( ) , [ this ] ( ) <nl> { <nl> return zoomActionHelper ( ) ; <nl> } ) ; <nl> - breakpointMenu - > build ( mMenuBuilder ) ; <nl> + mCommonActions - > build ( mMenuBuilder , CommonActions : : ActionBreakpoint | CommonActions : : ActionMemoryMap | CommonActions : : ActionBookmark | CommonActions : : ActionLabel | <nl> + CommonActions : : ActionComment | CommonActions : : ActionDisasm | CommonActions : : ActionNewOrigin | CommonActions : : ActionNewThread ) ; <nl> <nl> auto zoomActionHelperNonZero = [ this ] ( QMenu * ) <nl> { <nl> return zoomActionHelper ( ) ! = 0 ; <nl> } ; <nl> <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " comment . png " ) , tr ( " & Comment " ) , SLOT ( setCommentSlot ( ) ) , " ActionSetComment " ) , zoomActionHelperNonZero ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " label . png " ) , tr ( " & Label " ) , SLOT ( setLabelSlot ( ) ) , " ActionSetLabel " ) , zoomActionHelperNonZero ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " bookmark_toggle . png " ) , tr ( " Toggle Bookmark " ) , SLOT ( setBookmarkSlot ( ) ) , " ActionToggleBookmark " ) ) ; <nl> mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " xrefs . png " ) , tr ( " Xrefs . . . " ) , SLOT ( xrefSlot ( ) ) , " ActionXrefs " ) , zoomActionHelperNonZero ) ; <nl> <nl> MenuBuilder * gotoMenu = new MenuBuilder ( this ) ; <nl> void DisassemblerGraphView : : keyPressEvent ( QKeyEvent * event ) <nl> } <nl> } <nl> <nl> - void DisassemblerGraphView : : followDisassemblerSlot ( ) <nl> - { <nl> - DbgCmdExec ( QString ( " disasm % 1 " ) . arg ( ToPtrString ( this - > cur_instr ) ) ) ; <nl> - } <nl> - <nl> void DisassemblerGraphView : : colorsUpdatedSlot ( ) <nl> { <nl> disassemblyBackgroundColor = ConfigColor ( " DisassemblyBackgroundColor " ) ; <nl> void DisassemblerGraphView : : saveImageSlot ( ) <nl> this - > viewport ( ) - > update ( ) ; <nl> } <nl> <nl> - void DisassemblerGraphView : : setCommentSlot ( ) <nl> - { <nl> - duint wVA = this - > get_cursor_pos ( ) ; <nl> - LineEditDialog mLineEdit ( this ) ; <nl> - mLineEdit . setTextMaxLength ( MAX_COMMENT_SIZE - 2 ) ; <nl> - QString addr_text = ToPtrString ( wVA ) ; <nl> - char comment_text [ MAX_COMMENT_SIZE ] = " " ; <nl> - if ( ! DbgIsDebugging ( ) ) <nl> - return ; <nl> - if ( ! DbgMemIsValidReadPtr ( wVA ) ) <nl> - return ; <nl> - <nl> - if ( DbgGetCommentAt ( ( duint ) wVA , comment_text ) ) <nl> - { <nl> - if ( comment_text [ 0 ] = = ' \ 1 ' ) / / automatic comment <nl> - mLineEdit . setText ( QString ( comment_text + 1 ) ) ; <nl> - else <nl> - mLineEdit . setText ( QString ( comment_text ) ) ; <nl> - } <nl> - <nl> - mLineEdit . setWindowTitle ( tr ( " Add comment at " ) + addr_text ) ; <nl> - <nl> - if ( mLineEdit . exec ( ) ! = QDialog : : Accepted ) <nl> - return ; <nl> - <nl> - if ( ! DbgSetCommentAt ( wVA , mLineEdit . editText . replace ( ' \ r ' , " " ) . replace ( ' \ n ' , " " ) . toUtf8 ( ) . constData ( ) ) ) <nl> - SimpleErrorBox ( this , tr ( " Error ! " ) , tr ( " DbgSetCommentAt failed ! " ) ) ; <nl> - <nl> - this - > refreshSlot ( ) ; <nl> - } <nl> - <nl> - void DisassemblerGraphView : : setLabelSlot ( ) <nl> - { <nl> - duint wVA = this - > get_cursor_pos ( ) ; <nl> - LineEditDialog mLineEdit ( this ) ; <nl> - mLineEdit . setTextMaxLength ( MAX_LABEL_SIZE - 2 ) ; <nl> - QString addr_text = ToPtrString ( wVA ) ; <nl> - char label_text [ MAX_LABEL_SIZE ] = " " ; <nl> - if ( ! DbgIsDebugging ( ) ) <nl> - return ; <nl> - if ( ! DbgMemIsValidReadPtr ( wVA ) ) <nl> - return ; <nl> - <nl> - if ( DbgGetLabelAt ( ( duint ) wVA , SEG_DEFAULT , label_text ) ) <nl> - mLineEdit . setText ( QString ( label_text ) ) ; <nl> - <nl> - mLineEdit . setWindowTitle ( tr ( " Add label at " ) + addr_text ) ; <nl> - restart : <nl> - if ( mLineEdit . exec ( ) ! = QDialog : : Accepted ) <nl> - return ; <nl> - <nl> - QByteArray utf8data = mLineEdit . editText . toUtf8 ( ) ; <nl> - if ( ! utf8data . isEmpty ( ) & & DbgIsValidExpression ( utf8data . constData ( ) ) & & DbgValFromString ( utf8data . constData ( ) ) ! = wVA ) <nl> - { <nl> - QMessageBox msg ( QMessageBox : : Warning , tr ( " The label may be in use " ) , <nl> - tr ( " The label \ " % 1 \ " may be an existing label or a valid expression . Using such label might have undesired effects . Do you still want to continue ? " ) . arg ( mLineEdit . editText ) , <nl> - QMessageBox : : Yes | QMessageBox : : No , this ) ; <nl> - msg . setWindowIcon ( DIcon ( " compile - warning . png " ) ) ; <nl> - msg . setParent ( this , Qt : : Dialog ) ; <nl> - msg . setWindowFlags ( msg . windowFlags ( ) & ( ~ Qt : : WindowContextHelpButtonHint ) ) ; <nl> - if ( msg . exec ( ) = = QMessageBox : : No ) <nl> - goto restart ; <nl> - } <nl> - if ( ! DbgSetLabelAt ( wVA , utf8data . constData ( ) ) ) <nl> - SimpleErrorBox ( this , tr ( " Error ! " ) , tr ( " DbgSetLabelAt failed ! " ) ) ; <nl> - <nl> - this - > refreshSlot ( ) ; <nl> - } <nl> - <nl> - void DisassemblerGraphView : : setBookmarkSlot ( ) <nl> - { <nl> - if ( ! DbgIsDebugging ( ) ) <nl> - return ; <nl> - duint wVA = this - > get_cursor_pos ( ) ; <nl> - bool result ; <nl> - if ( DbgGetBookmarkAt ( wVA ) ) <nl> - result = DbgSetBookmarkAt ( wVA , false ) ; <nl> - else <nl> - result = DbgSetBookmarkAt ( wVA , true ) ; <nl> - if ( ! result ) <nl> - { <nl> - QMessageBox msg ( QMessageBox : : Critical , tr ( " Error ! " ) , tr ( " DbgSetBookmarkAt failed ! " ) ) ; <nl> - msg . setWindowIcon ( DIcon ( " compile - error . png " ) ) ; <nl> - msg . setParent ( this , Qt : : Dialog ) ; <nl> - msg . setWindowFlags ( msg . windowFlags ( ) & ( ~ Qt : : WindowContextHelpButtonHint ) ) ; <nl> - msg . exec ( ) ; <nl> - } <nl> - <nl> - GuiUpdateAllViews ( ) ; <nl> - } <nl> - <nl> void DisassemblerGraphView : : xrefSlot ( ) <nl> { <nl> if ( ! DbgIsDebugging ( ) ) <nl> mmm a / src / gui / Src / Gui / DisassemblerGraphView . h <nl> ppp b / src / gui / Src / Gui / DisassemblerGraphView . h <nl> class MenuBuilder ; <nl> class CachedFontMetrics ; <nl> class GotoDialog ; <nl> class XrefBrowseDialog ; <nl> + class CommonActions ; <nl> <nl> class DisassemblerGraphView : public QAbstractScrollArea , public ActionHelper < DisassemblerGraphView > <nl> { <nl> class DisassemblerGraphView : public QAbstractScrollArea , public ActionHelper < Di <nl> std : : tuple < duint , duint > get_selection_range ( ) ; <nl> void set_selection_range ( std : : tuple < duint , duint > range ) ; <nl> void copy_address ( ) ; <nl> - / / void analysis_thread_proc ( ) ; <nl> - / / void closeRequest ( ) ; <nl> void paintNormal ( QPainter & p , QRect & viewportRect , int xofs , int yofs ) ; <nl> void paintOverview ( QPainter & p , QRect & viewportRect , int xofs , int yofs ) ; <nl> void paintEvent ( QPaintEvent * event ) ; <nl> public slots : <nl> void loadGraphSlot ( BridgeCFGraphList * graph , duint addr ) ; <nl> void graphAtSlot ( duint addr ) ; <nl> void updateGraphSlot ( ) ; <nl> - void followDisassemblerSlot ( ) ; <nl> void colorsUpdatedSlot ( ) ; <nl> void fontsUpdatedSlot ( ) ; <nl> void shortcutsUpdatedSlot ( ) ; <nl> public slots : <nl> void followActionSlot ( ) ; <nl> void refreshSlot ( ) ; <nl> void saveImageSlot ( ) ; <nl> - void setCommentSlot ( ) ; <nl> - void setLabelSlot ( ) ; <nl> - void setBookmarkSlot ( ) ; <nl> void xrefSlot ( ) ; <nl> void mnemonicHelpSlot ( ) ; <nl> void fitToWindowSlot ( ) ; <nl> public slots : <nl> std : : vector < int > row_edge_y ; <nl> CachedFontMetrics * mFontMetrics ; <nl> MenuBuilder * mMenuBuilder ; <nl> + CommonActions * mCommonActions ; <nl> QMenu * mPluginMenu ; <nl> bool drawOverview ; <nl> bool onlySummary ; <nl> mmm a / src / gui / Src / Gui / SourceView . cpp <nl> ppp b / src / gui / Src / Gui / SourceView . cpp <nl> <nl> # include " SourceView . h " <nl> # include < QFileDialog > <nl> - # include < QMessageBox > <nl> # include < QDesktopServices > <nl> # include < QProcess > <nl> # include < QInputDialog > <nl> # include < memory > <nl> # include " FileLines . h " <nl> # include " Bridge . h " <nl> + # include " CommonActions . h " <nl> <nl> SourceView : : SourceView ( QString path , duint addr , QWidget * parent ) <nl> : AbstractStdTable ( parent ) , <nl> void SourceView : : contextMenuSlot ( const QPoint & pos ) <nl> wMenu . exec ( mapToGlobal ( pos ) ) ; <nl> } <nl> <nl> - void SourceView : : followDisassemblerSlot ( ) <nl> - { <nl> - duint addr = addrFromIndex ( getInitialSelection ( ) ) ; <nl> - if ( ! DbgMemIsValidReadPtr ( addr ) ) <nl> - return ; <nl> - DbgCmdExec ( QString ( " disasm % 1 " ) . arg ( ToPtrString ( addr ) ) ) ; <nl> - } <nl> - <nl> - void SourceView : : followDumpSlot ( ) <nl> - { <nl> - duint addr = addrFromIndex ( getInitialSelection ( ) ) ; <nl> - if ( ! DbgMemIsValidReadPtr ( addr ) ) <nl> - return ; <nl> - DbgCmdExec ( QString ( " dump % 1 " ) . arg ( ToPtrString ( addr ) ) ) ; <nl> - } <nl> - <nl> - void SourceView : : toggleBookmarkSlot ( ) <nl> - { <nl> - duint addr = addrFromIndex ( getInitialSelection ( ) ) ; <nl> - if ( ! DbgMemIsValidReadPtr ( addr ) ) <nl> - return ; <nl> - <nl> - bool result ; <nl> - if ( DbgGetBookmarkAt ( addr ) ) <nl> - result = DbgSetBookmarkAt ( addr , false ) ; <nl> - else <nl> - result = DbgSetBookmarkAt ( addr , true ) ; <nl> - if ( ! result ) <nl> - SimpleErrorBox ( this , tr ( " Error ! " ) , tr ( " DbgSetBookmarkAt failed ! " ) ) ; <nl> - GuiUpdateAllViews ( ) ; <nl> - } <nl> - <nl> void SourceView : : gotoLineSlot ( ) <nl> { <nl> bool ok = false ; <nl> void SourceView : : showInDirectorySlot ( ) <nl> void SourceView : : setupContextMenu ( ) <nl> { <nl> mMenuBuilder = new MenuBuilder ( this ) ; <nl> - mMenuBuilder - > addAction ( makeAction ( DIcon ( ArchValue ( " processor32 . png " , " processor64 . png " ) ) , tr ( " & Follow in Disassembler " ) , SLOT ( followDisassemblerSlot ( ) ) ) , [ this ] ( QMenu * ) <nl> - { <nl> - return DbgMemIsValidReadPtr ( addrFromIndex ( getInitialSelection ( ) ) ) ; <nl> - } ) ; <nl> - mMenuBuilder - > addAction ( makeAction ( DIcon ( " dump . png " ) , tr ( " Follow in & Dump " ) , SLOT ( followDumpSlot ( ) ) ) , [ this ] ( QMenu * ) <nl> - { <nl> - return DbgMemIsValidReadPtr ( addrFromIndex ( getInitialSelection ( ) ) ) ; <nl> - } ) ; <nl> - mMenuBuilder - > addSeparator ( ) ; <nl> - mBreakpointMenu = new BreakpointMenu ( this , getActionHelperFuncs ( ) , [ this ] ( ) <nl> + mCommonActions = new CommonActions ( this , getActionHelperFuncs ( ) , [ this ] ( ) <nl> { <nl> return addrFromIndex ( getInitialSelection ( ) ) ; <nl> } ) ; <nl> - mBreakpointMenu - > build ( mMenuBuilder ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " bookmark_toggle . png " ) , tr ( " Toggle Bookmark " ) , SLOT ( toggleBookmarkSlot ( ) ) , " ActionToggleBookmark " ) ) ; <nl> + mCommonActions - > build ( mMenuBuilder , CommonActions : : ActionDisasm | CommonActions : : ActionDump | CommonActions : : ActionBreakpoint | CommonActions : : ActionLabel | CommonActions : : ActionComment <nl> + | CommonActions : : ActionBookmark | CommonActions : : ActionMemoryMap | CommonActions : : ActionNewOrigin | CommonActions : : ActionNewThread ) ; <nl> mMenuBuilder - > addSeparator ( ) ; <nl> mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " geolocation - goto . png " ) , tr ( " Go to line " ) , SLOT ( gotoLineSlot ( ) ) , " ActionGotoExpression " ) ) ; <nl> mMenuBuilder - > addAction ( makeAction ( DIcon ( " source . png " ) , tr ( " Open source file " ) , SLOT ( openSourceFileSlot ( ) ) ) ) ; <nl> void SourceView : : loadFile ( ) <nl> mFileLines - > open ( mSourcePath . toStdWString ( ) . c_str ( ) ) ; <nl> if ( ! mFileLines - > isopen ( ) ) <nl> { <nl> - QMessageBox : : warning ( this , " Error " , " Failed to open file ! " ) ; <nl> + SimpleWarningBox ( this , tr ( " Error " ) , tr ( " Failed to open file ! " ) ) ; <nl> delete mFileLines ; <nl> mFileLines = nullptr ; <nl> return ; <nl> } <nl> if ( ! mFileLines - > parse ( ) ) <nl> { <nl> - QMessageBox : : warning ( this , " Error " , " Failed to parse file ! " ) ; <nl> + SimpleWarningBox ( this , tr ( " Error " ) , tr ( " Failed to parse file ! " ) ) ; <nl> delete mFileLines ; <nl> mFileLines = nullptr ; <nl> return ; <nl> mmm a / src / gui / Src / Gui / SourceView . h <nl> ppp b / src / gui / Src / Gui / SourceView . h <nl> <nl> <nl> # include < QWidget > <nl> # include < AbstractStdTable . h > <nl> - # include " BreakpointMenu . h " <nl> <nl> class FileLines ; <nl> + class CommonActions ; <nl> <nl> class SourceView : public AbstractStdTable <nl> { <nl> class SourceView : public AbstractStdTable <nl> <nl> private slots : <nl> void contextMenuSlot ( const QPoint & pos ) ; <nl> - void followDisassemblerSlot ( ) ; <nl> - void followDumpSlot ( ) ; <nl> - void toggleBookmarkSlot ( ) ; <nl> void gotoLineSlot ( ) ; <nl> void openSourceFileSlot ( ) ; <nl> void showInDirectorySlot ( ) ; <nl> <nl> private : <nl> MenuBuilder * mMenuBuilder = nullptr ; <nl> - BreakpointMenu * mBreakpointMenu = nullptr ; <nl> + CommonActions * mCommonActions = nullptr ; <nl> QString mSourcePath ; <nl> duint mModBase ; <nl> int mTabSize = 4 ; / / TODO : make customizable ? <nl> mmm a / src / gui / Src / Tracer / TraceBrowser . cpp <nl> ppp b / src / gui / Src / Tracer / TraceBrowser . cpp <nl> <nl> # include " BrowseDialog . h " <nl> # include " QBeaEngine . h " <nl> # include " GotoDialog . h " <nl> + # include " CommonActions . h " <nl> # include " LineEditDialog . h " <nl> # include " WordEditDialog . h " <nl> # include " CachedFontMetrics . h " <nl> - # include " BreakpointMenu . h " <nl> # include " MRUList . h " <nl> # include < QFileDialog > <nl> <nl> void TraceBrowser : : prepareData ( ) <nl> void TraceBrowser : : setupRightClickContextMenu ( ) <nl> { <nl> mMenuBuilder = new MenuBuilder ( this ) ; <nl> + mCommonActions = new CommonActions ( this , getActionHelperFuncs ( ) , [ this ] <nl> + { <nl> + if ( mTraceFile = = nullptr | | mTraceFile - > Progress ( ) < 100 | | mTraceFile - > Length ( ) = = 0 ) <nl> + return ( duint ) 0 ; <nl> + else <nl> + return mTraceFile - > Registers ( getInitialSelection ( ) ) . regcontext . cip ; <nl> + } ) ; <nl> QAction * toggleRunTrace = makeShortcutAction ( DIcon ( " trace . png " ) , tr ( " Start Run Trace " ) , SLOT ( toggleRunTraceSlot ( ) ) , " ActionToggleRunTrace " ) ; <nl> mMenuBuilder - > addAction ( toggleRunTrace , [ toggleRunTrace ] ( QMenu * ) <nl> { <nl> void TraceBrowser : : setupRightClickContextMenu ( ) <nl> copyMenu - > addAction ( makeAction ( DIcon ( " copy_address . png " ) , tr ( " Index " ) , SLOT ( copyIndexSlot ( ) ) ) ) ; <nl> <nl> mMenuBuilder - > addMenu ( makeMenu ( DIcon ( " copy . png " ) , tr ( " & Copy " ) ) , copyMenu ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( ArchValue ( " processor32 . png " , " processor64 . png " ) ) , tr ( " & Follow in Disassembler " ) , SLOT ( followDisassemblySlot ( ) ) , " ActionFollowDisasm " ) , isValid ) ; <nl> <nl> - mBreakpointMenu = new BreakpointMenu ( this , getActionHelperFuncs ( ) , [ this , isValid ] ( ) <nl> - { <nl> - if ( isValid ( nullptr ) ) <nl> - return mTraceFile - > Registers ( getInitialSelection ( ) ) . regcontext . cip ; <nl> - else <nl> - return ( duint ) 0 ; <nl> - } ) ; <nl> - mBreakpointMenu - > build ( mMenuBuilder ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " label . png " ) , tr ( " Label Current Address " ) , SLOT ( setLabelSlot ( ) ) , " ActionSetLabel " ) , isDebugging ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " comment . png " ) , tr ( " & Comment " ) , SLOT ( setCommentSlot ( ) ) , " ActionSetComment " ) , isDebugging ) ; <nl> - mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " bookmark_toggle . png " ) , tr ( " Toggle Bookmark " ) , SLOT ( setBookmarkSlot ( ) ) , " ActionToggleBookmark " ) , isDebugging ) ; <nl> + mCommonActions - > build ( mMenuBuilder , CommonActions : : ActionDisasm | CommonActions : : ActionBreakpoint | CommonActions : : ActionLabel | CommonActions : : ActionComment | CommonActions : : ActionBookmark ) ; <nl> mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " highlight . png " ) , tr ( " & Highlighting mode " ) , SLOT ( enableHighlightingModeSlot ( ) ) , " ActionHighlightingMode " ) , isValid ) ; <nl> mMenuBuilder - > addAction ( makeShortcutAction ( DIcon ( " helpmnemonic . png " ) , tr ( " Help on mnemonic " ) , SLOT ( mnemonicHelpSlot ( ) ) , " ActionHelpOnMnemonic " ) , isValid ) ; <nl> QAction * mnemonicBrief = makeShortcutAction ( DIcon ( " helpbrief . png " ) , tr ( " Show mnemonic brief " ) , SLOT ( mnemonicBriefSlot ( ) ) , " ActionToggleMnemonicBrief " ) ; <nl> void TraceBrowser : : mouseDoubleClickEvent ( QMouseEvent * event ) <nl> switch ( getColumnIndexFromX ( event - > x ( ) ) ) <nl> { <nl> case Index : / / Index : follow <nl> - followDisassemblySlot ( ) ; <nl> + mCommonActions - > followDisassemblySlot ( ) ; <nl> break ; <nl> case Address : / / Address : set RVA <nl> if ( mRvaDisplayEnabled & & mTraceFile - > Registers ( getInitialSelection ( ) ) . regcontext . cip = = mRvaDisplayBase ) <nl> void TraceBrowser : : mouseDoubleClickEvent ( QMouseEvent * event ) <nl> reloadData ( ) ; <nl> break ; <nl> case Opcode : / / Opcode : Breakpoint <nl> - mBreakpointMenu - > toggleInt3BPActionSlot ( ) ; <nl> + mCommonActions - > toggleInt3BPActionSlot ( ) ; <nl> break ; <nl> case Disassembly : / / Instructions : follow <nl> - followDisassemblySlot ( ) ; <nl> + mCommonActions - > followDisassemblySlot ( ) ; <nl> break ; <nl> case Comments : / / Comment <nl> - setCommentSlot ( ) ; <nl> + mCommonActions - > setCommentSlot ( ) ; <nl> break ; <nl> } <nl> } <nl> void TraceBrowser : : keyPressEvent ( QKeyEvent * event ) <nl> void TraceBrowser : : onSelectionChanged ( unsigned long long selection ) <nl> { <nl> if ( mAutoDisassemblyFollowSelection ) <nl> - followDisassemblySlot ( ) ; <nl> + mCommonActions - > followDisassemblySlot ( ) ; <nl> } <nl> <nl> void TraceBrowser : : tokenizerConfigUpdatedSlot ( ) <nl> void TraceBrowser : : exportSlot ( ) <nl> } ) ; <nl> } <nl> <nl> - void TraceBrowser : : setCommentSlot ( ) <nl> - { <nl> - if ( ! DbgIsDebugging ( ) | | mTraceFile = = nullptr | | mTraceFile - > Progress ( ) < 100 ) <nl> - return ; <nl> - duint wVA = mTraceFile - > Registers ( getInitialSelection ( ) ) . regcontext . cip ; <nl> - LineEditDialog mLineEdit ( this ) ; <nl> - mLineEdit . setTextMaxLength ( MAX_COMMENT_SIZE - 2 ) ; <nl> - QString addr_text = ToPtrString ( wVA ) ; <nl> - char comment_text [ MAX_COMMENT_SIZE ] = " " ; <nl> - if ( DbgGetCommentAt ( ( duint ) wVA , comment_text ) ) <nl> - { <nl> - if ( comment_text [ 0 ] = = ' \ 1 ' ) / / automatic comment <nl> - mLineEdit . setText ( QString ( comment_text + 1 ) ) ; <nl> - else <nl> - mLineEdit . setText ( QString ( comment_text ) ) ; <nl> - } <nl> - mLineEdit . setWindowTitle ( tr ( " Add comment at " ) + addr_text ) ; <nl> - if ( mLineEdit . exec ( ) ! = QDialog : : Accepted ) <nl> - return ; <nl> - QString comment = mLineEdit . editText . replace ( ' \ r ' , " " ) . replace ( ' \ n ' , " " ) ; <nl> - if ( ! DbgSetCommentAt ( wVA , comment . toUtf8 ( ) . constData ( ) ) ) <nl> - SimpleErrorBox ( this , tr ( " Error ! " ) , tr ( " DbgSetCommentAt failed ! " ) ) ; <nl> - <nl> - static bool easter = isEaster ( ) ; <nl> - if ( easter & & comment . toLower ( ) = = " oep " ) <nl> - { <nl> - QFile file ( " : / icons / images / egg . wav " ) ; <nl> - if ( file . open ( QIODevice : : ReadOnly ) ) <nl> - { <nl> - QByteArray egg = file . readAll ( ) ; <nl> - PlaySoundA ( egg . data ( ) , 0 , SND_MEMORY | SND_ASYNC | SND_NODEFAULT ) ; <nl> - } <nl> - } <nl> - <nl> - GuiUpdateAllViews ( ) ; <nl> - } <nl> - <nl> - void TraceBrowser : : setBookmarkSlot ( ) <nl> - { <nl> - if ( ! DbgIsDebugging ( ) ) <nl> - return ; <nl> - duint wVA = mTraceFile - > Registers ( getInitialSelection ( ) ) . regcontext . cip ; <nl> - bool result ; <nl> - if ( DbgGetBookmarkAt ( wVA ) ) <nl> - result = DbgSetBookmarkAt ( wVA , false ) ; <nl> - else <nl> - result = DbgSetBookmarkAt ( wVA , true ) ; <nl> - if ( ! result ) <nl> - { <nl> - QMessageBox msg ( QMessageBox : : Critical , tr ( " Error ! " ) , tr ( " DbgSetBookmarkAt failed ! " ) ) ; <nl> - msg . setWindowIcon ( DIcon ( " compile - error . png " ) ) ; <nl> - msg . setParent ( this , Qt : : Dialog ) ; <nl> - msg . setWindowFlags ( msg . windowFlags ( ) & ( ~ Qt : : WindowContextHelpButtonHint ) ) ; <nl> - msg . exec ( ) ; <nl> - } <nl> - <nl> - GuiUpdateAllViews ( ) ; <nl> - } <nl> - <nl> - void TraceBrowser : : setLabelSlot ( ) <nl> - { <nl> - if ( ! DbgIsDebugging ( ) | | mTraceFile = = nullptr | | mTraceFile - > Progress ( ) < 100 ) <nl> - return ; <nl> - duint wVA = mTraceFile - > Registers ( getInitialSelection ( ) ) . regcontext . cip ; <nl> - LineEditDialog mLineEdit ( this ) ; <nl> - mLineEdit . setTextMaxLength ( MAX_LABEL_SIZE - 2 ) ; <nl> - QString addr_text = ToPtrString ( wVA ) ; <nl> - char label_text [ MAX_COMMENT_SIZE ] = " " ; <nl> - if ( DbgGetLabelAt ( ( duint ) wVA , SEG_DEFAULT , label_text ) ) <nl> - mLineEdit . setText ( QString ( label_text ) ) ; <nl> - mLineEdit . setWindowTitle ( tr ( " Add label at " ) + addr_text ) ; <nl> - restart : <nl> - if ( mLineEdit . exec ( ) ! = QDialog : : Accepted ) <nl> - return ; <nl> - QByteArray utf8data = mLineEdit . editText . toUtf8 ( ) ; <nl> - if ( ! utf8data . isEmpty ( ) & & DbgIsValidExpression ( utf8data . constData ( ) ) & & DbgValFromString ( utf8data . constData ( ) ) ! = wVA ) <nl> - { <nl> - QMessageBox msg ( QMessageBox : : Warning , tr ( " The label may be in use " ) , <nl> - tr ( " The label \ " % 1 \ " may be an existing label or a valid expression . Using such label might have undesired effects . Do you still want to continue ? " ) . arg ( mLineEdit . editText ) , <nl> - QMessageBox : : Yes | QMessageBox : : No , this ) ; <nl> - msg . setWindowIcon ( DIcon ( " compile - warning . png " ) ) ; <nl> - msg . setParent ( this , Qt : : Dialog ) ; <nl> - msg . setWindowFlags ( msg . windowFlags ( ) & ( ~ Qt : : WindowContextHelpButtonHint ) ) ; <nl> - if ( msg . exec ( ) = = QMessageBox : : No ) <nl> - goto restart ; <nl> - } <nl> - if ( ! DbgSetLabelAt ( wVA , utf8data . constData ( ) ) ) <nl> - SimpleErrorBox ( this , tr ( " Error ! " ) , tr ( " DbgSetLabelAt failed ! " ) ) ; <nl> - <nl> - GuiUpdateAllViews ( ) ; <nl> - } <nl> - <nl> void TraceBrowser : : enableHighlightingModeSlot ( ) <nl> { <nl> if ( mHighlightingMode ) <nl> void TraceBrowser : : enableHighlightingModeSlot ( ) <nl> reloadData ( ) ; <nl> } <nl> <nl> - void TraceBrowser : : followDisassemblySlot ( ) <nl> - { <nl> - if ( mTraceFile = = nullptr | | mTraceFile - > Progress ( ) < 100 ) <nl> - return ; <nl> - <nl> - duint cip = mTraceFile - > Registers ( getInitialSelection ( ) ) . regcontext . cip ; <nl> - if ( DbgMemIsValidReadPtr ( cip ) ) <nl> - DbgCmdExec ( QString ( " dis " ) . append ( ToPtrString ( cip ) ) ) ; <nl> - else <nl> - GuiAddStatusBarMessage ( tr ( " Cannot follow % 1 . Address is invalid . \ n " ) . arg ( ToPtrString ( cip ) ) . toUtf8 ( ) . constData ( ) ) ; <nl> - } <nl> - <nl> void TraceBrowser : : searchConstantSlot ( ) <nl> { <nl> WordEditDialog constantDlg ( this ) ; <nl> mmm a / src / gui / Src / Tracer / TraceBrowser . h <nl> ppp b / src / gui / Src / Tracer / TraceBrowser . h <nl> <nl> class TraceFileReader ; <nl> class BreakpointMenu ; <nl> class MRUList ; <nl> + class CommonActions ; <nl> <nl> class TraceBrowser : public AbstractTableView <nl> { <nl> class TraceBrowser : public AbstractTableView <nl> ZydisTokenizer : : InstructionToken registersTokens ( unsigned long long atIndex ) ; <nl> VaHistory mHistory ; <nl> MenuBuilder * mMenuBuilder ; <nl> + CommonActions * mCommonActions ; <nl> bool mRvaDisplayEnabled ; <nl> duint mRvaDisplayBase ; <nl> <nl> public slots : <nl> void gotoSlot ( ) ; <nl> void gotoPreviousSlot ( ) ; <nl> void gotoNextSlot ( ) ; <nl> - void followDisassemblySlot ( ) ; <nl> void enableHighlightingModeSlot ( ) ; <nl> - void setLabelSlot ( ) ; <nl> - void setCommentSlot ( ) ; <nl> - void setBookmarkSlot ( ) ; <nl> void mnemonicBriefSlot ( ) ; <nl> void mnemonicHelpSlot ( ) ; <nl> void copyDisassemblySlot ( ) ; <nl> new file mode 100644 <nl> index 000000000 . . aab6075ce <nl> mmm / dev / null <nl> ppp b / src / gui / Src / Utils / CommonActions . cpp <nl> <nl> + # include " CommonActions . h " <nl> + # include " MenuBuilder . h " <nl> + # include < QAction > <nl> + # include < QMessageBox > <nl> + # include < QFile > <nl> + # include " StringUtil . h " <nl> + # include " MiscUtil . h " <nl> + # include " Breakpoints . h " <nl> + # include " LineEditDialog . h " <nl> + # include " WordEditDialog . h " <nl> + <nl> + CommonActions : : CommonActions ( QWidget * parent , ActionHelperFuncs funcs , GetSelectionFunc getSelection ) <nl> + : QObject ( parent ) , ActionHelperProxy ( funcs ) , mGetSelection ( getSelection ) <nl> + { <nl> + } <nl> + <nl> + void CommonActions : : build ( MenuBuilder * builder , int actions ) <nl> + { <nl> + / / Condition Lambda <nl> + auto wIsDebugging = [ this ] ( QMenu * ) <nl> + { <nl> + return mGetSelection ( ) ! = 0 & & DbgIsDebugging ( ) ; <nl> + } ; <nl> + auto wIsValidReadPtrCallback = [ this ] ( QMenu * ) <nl> + { <nl> + duint ptr = 0 ; <nl> + DbgMemRead ( mGetSelection ( ) , ( unsigned char * ) & ptr , sizeof ( duint ) ) ; <nl> + return DbgMemIsValidReadPtr ( ptr ) ; <nl> + } ; <nl> + <nl> + / / Menu action <nl> + if ( actions & ActionDisasm ) <nl> + { <nl> + builder - > addAction ( makeShortcutAction ( DIcon ( ArchValue ( " processor32 . png " , " processor64 . png " ) ) , tr ( " Follow in Disassembler " ) , std : : bind ( & CommonActions : : followDisassemblySlot , this ) , " ActionFollowDisasm " ) , wIsDebugging ) ; <nl> + } <nl> + if ( actions & ActionDisasmData ) <nl> + { <nl> + builder - > addAction ( makeCommandAction ( DIcon ( " processor32 . png " ) , ArchValue ( tr ( " & Follow DWORD in Disassembler " ) , tr ( " & Follow QWORD in Disassembler " ) ) , " disasm [ $ ] " , " ActionFollowDwordQwordDisasm " ) , wIsValidReadPtrCallback ) ; <nl> + } <nl> + if ( actions & ActionDump ) <nl> + { <nl> + builder - > addAction ( makeCommandAction ( DIcon ( " dump . png " ) , tr ( " Follow in Dump " ) , " dump $ " ) ) ; <nl> + } <nl> + if ( actions & ActionDumpData ) <nl> + { <nl> + builder - > addAction ( makeCommandAction ( DIcon ( " dump . png " ) , ArchValue ( tr ( " & Follow DWORD in Current Dump " ) , tr ( " & Follow QWORD in Current Dump " ) ) , " dump [ $ ] " , " ActionFollowDwordQwordDump " ) , wIsValidReadPtrCallback ) ; <nl> + } <nl> + if ( actions & ActionDumpN ) <nl> + { <nl> + / / Follow in Dump N menu <nl> + MenuBuilder * followDumpNMenu = new MenuBuilder ( this , [ this ] ( QMenu * ) <nl> + { <nl> + duint ptr ; <nl> + return DbgMemRead ( mGetSelection ( ) , ( unsigned char * ) & ptr , sizeof ( ptr ) ) & & DbgMemIsValidReadPtr ( ptr ) ; <nl> + } ) ; <nl> + const int maxDumps = 5 ; / / TODO : get this value from CPUMultiDump <nl> + for ( int i = 0 ; i < maxDumps ; i + + ) <nl> + / / TODO : Get dump tab names <nl> + followDumpNMenu - > addAction ( makeAction ( tr ( " Dump % 1 " ) . arg ( i + 1 ) , [ i , this ] <nl> + { <nl> + duint selectedData = mGetSelection ( ) ; <nl> + if ( DbgMemIsValidReadPtr ( selectedData ) ) <nl> + DbgCmdExec ( QString ( " dump [ % 1 ] , % 2 " ) . arg ( ToPtrString ( selectedData ) ) . arg ( i + 1 ) ) ; <nl> + } ) ) ; <nl> + builder - > addMenu ( makeMenu ( DIcon ( " dump . png " ) , ArchValue ( tr ( " Follow DWORD in Dump " ) , tr ( " Follow QWORD in Dump " ) ) ) , followDumpNMenu ) ; <nl> + } <nl> + if ( actions & ActionStackDump ) <nl> + { <nl> + builder - > addAction ( makeCommandAction ( DIcon ( " stack . png " ) , tr ( " Follow in Stack " ) , " sdump $ " , " ActionFollowStack " ) , [ this ] ( QMenu * ) <nl> + { <nl> + auto start = mGetSelection ( ) ; <nl> + return ( DbgMemIsValidReadPtr ( start ) & & DbgMemFindBaseAddr ( start , 0 ) = = DbgMemFindBaseAddr ( DbgValFromString ( " csp " ) , 0 ) ) ; <nl> + } ) ; <nl> + } <nl> + if ( actions & ActionMemoryMap ) <nl> + { <nl> + builder - > addAction ( makeCommandAction ( DIcon ( " memmap_find_address_page . png " ) , tr ( " Follow in Memory Map " ) , " memmapdump $ " , " ActionFollowMemMap " ) , wIsDebugging ) ; <nl> + } <nl> + if ( actions & ActionGraph ) <nl> + { <nl> + builder - > addAction ( makeShortcutAction ( DIcon ( " graph . png " ) , tr ( " Graph " ) , std : : bind ( & CommonActions : : graphSlot , this ) , " ActionGraph " ) ) ; <nl> + } <nl> + if ( actions & ActionBreakpoint ) <nl> + { <nl> + struct ActionHolder <nl> + { <nl> + QAction * toggleBreakpointAction ; <nl> + QAction * editSoftwareBreakpointAction ; <nl> + QAction * setHwBreakpointAction ; <nl> + QAction * removeHwBreakpointAction ; <nl> + QMenu * replaceSlotMenu ; <nl> + QAction * replaceSlotAction [ 4 ] ; <nl> + } hodl ; <nl> + <nl> + hodl . toggleBreakpointAction = makeShortcutAction ( DIcon ( " breakpoint_toggle . png " ) , tr ( " Toggle " ) , std : : bind ( & CommonActions : : toggleInt3BPActionSlot , this ) , " ActionToggleBreakpoint " ) ; <nl> + hodl . editSoftwareBreakpointAction = makeShortcutAction ( DIcon ( " breakpoint_edit_alt . png " ) , tr ( " Edit " ) , std : : bind ( & CommonActions : : editSoftBpActionSlot , this ) , " ActionEditBreakpoint " ) ; <nl> + hodl . setHwBreakpointAction = makeShortcutAction ( DIcon ( " breakpoint_execute . png " ) , tr ( " Set Hardware on Execution " ) , std : : bind ( & CommonActions : : toggleHwBpActionSlot , this ) , " ActionSetHwBpE " ) ; <nl> + hodl . removeHwBreakpointAction = makeShortcutAction ( DIcon ( " breakpoint_remove . png " ) , tr ( " Remove Hardware " ) , std : : bind ( & CommonActions : : toggleHwBpActionSlot , this ) , " ActionRemoveHwBp " ) ; <nl> + <nl> + hodl . replaceSlotMenu = makeMenu ( DIcon ( " breakpoint_execute . png " ) , tr ( " Set Hardware on Execution " ) ) ; <nl> + / / Replacement slot menu are only used when the breakpoints are full , so using " Unknown " as the placeholder . Might want to change this in case we display the menu when there are still free slots . <nl> + hodl . replaceSlotAction [ 0 ] = makeMenuAction ( hodl . replaceSlotMenu , DIcon ( " breakpoint_execute_slot1 . png " ) , tr ( " Replace Slot % 1 ( Unknown ) " ) . arg ( 1 ) , std : : bind ( & CommonActions : : setHwBpOnSlot0ActionSlot , this ) ) ; <nl> + hodl . replaceSlotAction [ 1 ] = makeMenuAction ( hodl . replaceSlotMenu , DIcon ( " breakpoint_execute_slot2 . png " ) , tr ( " Replace Slot % 1 ( Unknown ) " ) . arg ( 2 ) , std : : bind ( & CommonActions : : setHwBpOnSlot1ActionSlot , this ) ) ; <nl> + hodl . replaceSlotAction [ 2 ] = makeMenuAction ( hodl . replaceSlotMenu , DIcon ( " breakpoint_execute_slot3 . png " ) , tr ( " Replace Slot % 1 ( Unknown ) " ) . arg ( 3 ) , std : : bind ( & CommonActions : : setHwBpOnSlot2ActionSlot , this ) ) ; <nl> + hodl . replaceSlotAction [ 3 ] = makeMenuAction ( hodl . replaceSlotMenu , DIcon ( " breakpoint_execute_slot4 . png " ) , tr ( " Replace Slot % 1 ( Unknown ) " ) . arg ( 4 ) , std : : bind ( & CommonActions : : setHwBpOnSlot3ActionSlot , this ) ) ; <nl> + <nl> + builder - > addMenu ( makeMenu ( DIcon ( " breakpoint . png " ) , tr ( " Breakpoint " ) ) , [ this , hodl ] ( QMenu * menu ) <nl> + { <nl> + auto selection = mGetSelection ( ) ; <nl> + if ( selection = = 0 ) <nl> + return false ; <nl> + BPXTYPE bpType = DbgGetBpxTypeAt ( selection ) ; <nl> + if ( ( bpType & bp_normal ) = = bp_normal | | ( bpType & bp_hardware ) = = bp_hardware ) <nl> + hodl . editSoftwareBreakpointAction - > setText ( tr ( " Edit " ) ) ; <nl> + else <nl> + hodl . editSoftwareBreakpointAction - > setText ( tr ( " Set Conditional Breakpoint " ) ) ; <nl> + menu - > addAction ( hodl . editSoftwareBreakpointAction ) ; <nl> + <nl> + menu - > addAction ( hodl . toggleBreakpointAction ) ; <nl> + <nl> + if ( ( bpType & bp_hardware ) = = bp_hardware ) <nl> + { <nl> + menu - > addAction ( hodl . removeHwBreakpointAction ) ; <nl> + } <nl> + else <nl> + { <nl> + BPMAP bpList ; <nl> + DbgGetBpList ( bp_hardware , & bpList ) ; <nl> + <nl> + / / get enabled hwbp count <nl> + int enabledCount = bpList . count ; <nl> + for ( int i = 0 ; i < bpList . count ; i + + ) <nl> + if ( ! bpList . bp [ i ] . enabled ) <nl> + enabledCount - - ; <nl> + <nl> + if ( enabledCount < 4 ) <nl> + { <nl> + menu - > addAction ( hodl . setHwBreakpointAction ) ; <nl> + } <nl> + else <nl> + { <nl> + for ( int i = 0 ; i < bpList . count ; i + + ) <nl> + { <nl> + if ( bpList . bp [ i ] . enabled & & bpList . bp [ i ] . slot < 4 ) <nl> + { <nl> + hodl . replaceSlotAction [ bpList . bp [ i ] . slot ] - > setText ( tr ( " Replace Slot % 1 ( 0x % 2 ) " ) . arg ( bpList . bp [ i ] . slot + 1 ) . arg ( ToPtrString ( bpList . bp [ i ] . addr ) ) ) ; <nl> + } <nl> + } <nl> + menu - > addMenu ( hodl . replaceSlotMenu ) ; <nl> + } <nl> + if ( bpList . count ) <nl> + BridgeFree ( bpList . bp ) ; <nl> + } <nl> + return true ; <nl> + } ) ; <nl> + } <nl> + if ( actions & ActionLabel ) <nl> + { <nl> + builder - > addAction ( makeShortcutAction ( DIcon ( " label . png " ) , tr ( " Label Current Address " ) , std : : bind ( & CommonActions : : setLabelSlot , this ) , " ActionSetLabel " ) , wIsDebugging ) ; <nl> + } <nl> + if ( actions & ActionComment ) <nl> + { <nl> + builder - > addAction ( makeShortcutAction ( DIcon ( " comment . png " ) , tr ( " Comment " ) , std : : bind ( & CommonActions : : setCommentSlot , this ) , " ActionSetComment " ) , wIsDebugging ) ; <nl> + } <nl> + if ( actions & ActionBookmark ) <nl> + { <nl> + builder - > addAction ( makeShortcutAction ( DIcon ( " bookmark_toggle . png " ) , tr ( " Toggle Bookmark " ) , std : : bind ( & CommonActions : : setBookmarkSlot , this ) , " ActionToggleBookmark " ) , wIsDebugging ) ; <nl> + } <nl> + if ( actions & ActionNewOrigin ) <nl> + { <nl> + builder - > addAction ( makeShortcutAction ( DIcon ( " neworigin . png " ) , tr ( " Set New Origin Here " ) , std : : bind ( & CommonActions : : setNewOriginHereActionSlot , this ) , " ActionSetNewOriginHere " ) ) ; <nl> + } <nl> + if ( actions & ActionNewThread ) <nl> + { <nl> + builder - > addAction ( makeShortcutAction ( DIcon ( " createthread . png " ) , tr ( " Create New Thread Here " ) , std : : bind ( & CommonActions : : createThreadSlot , this ) , " ActionCreateNewThreadHere " ) ) ; <nl> + } <nl> + if ( actions & ActionWatch ) <nl> + { <nl> + builder - > addAction ( makeCommandAction ( DIcon ( " animal - dog . png " ) , ArchValue ( tr ( " & Watch DWORD " ) , tr ( " & Watch QWORD " ) ) , " AddWatch \ " [ $ ] \ " , \ " uint \ " " , " ActionWatchDwordQword " ) ) ; <nl> + } <nl> + } <nl> + <nl> + QAction * CommonActions : : makeCommandAction ( const QIcon & icon , const QString & text , const char * cmd , const char * shortcut ) <nl> + { <nl> + / / sender ( ) doesn ' t work in slots <nl> + return makeShortcutAction ( icon , text , [ cmd , this ] ( ) <nl> + { <nl> + DbgCmdExec ( QString ( cmd ) . replace ( " $ " , ToPtrString ( mGetSelection ( ) ) ) ) ; <nl> + } , shortcut ) ; <nl> + } <nl> + <nl> + QAction * CommonActions : : makeCommandAction ( const QIcon & icon , const QString & text , const char * cmd ) <nl> + { <nl> + return makeAction ( icon , text , [ cmd , this ] ( ) <nl> + { <nl> + DbgCmdExec ( QString ( cmd ) . replace ( " $ " , ToPtrString ( mGetSelection ( ) ) ) ) ; <nl> + } ) ; <nl> + } <nl> + <nl> + QWidget * CommonActions : : widgetparent ( ) <nl> + { <nl> + return dynamic_cast < QWidget * > ( parent ( ) ) ; <nl> + } <nl> + <nl> + / / Actions slots <nl> + / / Follow in disassembly <nl> + void CommonActions : : followDisassemblySlot ( ) <nl> + { <nl> + duint cip = mGetSelection ( ) ; <nl> + if ( DbgMemIsValidReadPtr ( cip ) ) <nl> + DbgCmdExec ( QString ( " dis " ) . append ( ToPtrString ( cip ) ) ) ; <nl> + else <nl> + GuiAddStatusBarMessage ( tr ( " Cannot follow % 1 . Address is invalid . \ n " ) . arg ( ToPtrString ( cip ) ) . toUtf8 ( ) . constData ( ) ) ; <nl> + } <nl> + <nl> + void CommonActions : : setLabelSlot ( ) <nl> + { <nl> + duint wVA = mGetSelection ( ) ; <nl> + LineEditDialog mLineEdit ( widgetparent ( ) ) ; <nl> + mLineEdit . setTextMaxLength ( MAX_LABEL_SIZE - 2 ) ; <nl> + QString addr_text = ToPtrString ( wVA ) ; <nl> + char label_text [ MAX_COMMENT_SIZE ] = " " ; <nl> + if ( DbgGetLabelAt ( ( duint ) wVA , SEG_DEFAULT , label_text ) ) <nl> + mLineEdit . setText ( QString ( label_text ) ) ; <nl> + mLineEdit . setWindowTitle ( tr ( " Add label at " ) + addr_text ) ; <nl> + restart : <nl> + if ( mLineEdit . exec ( ) ! = QDialog : : Accepted ) <nl> + return ; <nl> + QByteArray utf8data = mLineEdit . editText . toUtf8 ( ) ; <nl> + if ( ! utf8data . isEmpty ( ) & & DbgIsValidExpression ( utf8data . constData ( ) ) & & DbgValFromString ( utf8data . constData ( ) ) ! = wVA ) <nl> + { <nl> + QMessageBox msg ( QMessageBox : : Warning , tr ( " The label may be in use " ) , <nl> + tr ( " The label \ " % 1 \ " may be an existing label or a valid expression . Using such label might have undesired effects . Do you still want to continue ? " ) . arg ( mLineEdit . editText ) , <nl> + QMessageBox : : Yes | QMessageBox : : No , widgetparent ( ) ) ; <nl> + msg . setWindowIcon ( DIcon ( " compile - warning . png " ) ) ; <nl> + msg . setParent ( widgetparent ( ) , Qt : : Dialog ) ; <nl> + msg . setWindowFlags ( msg . windowFlags ( ) & ( ~ Qt : : WindowContextHelpButtonHint ) ) ; <nl> + if ( msg . exec ( ) = = QMessageBox : : No ) <nl> + goto restart ; <nl> + } <nl> + if ( ! DbgSetLabelAt ( wVA , utf8data . constData ( ) ) ) <nl> + SimpleErrorBox ( widgetparent ( ) , tr ( " Error ! " ) , tr ( " DbgSetLabelAt failed ! " ) ) ; <nl> + <nl> + GuiUpdateAllViews ( ) ; <nl> + } <nl> + <nl> + void CommonActions : : setCommentSlot ( ) <nl> + { <nl> + if ( ! DbgIsDebugging ( ) ) <nl> + return ; <nl> + duint wVA = mGetSelection ( ) ; <nl> + LineEditDialog mLineEdit ( widgetparent ( ) ) ; <nl> + mLineEdit . setTextMaxLength ( MAX_COMMENT_SIZE - 2 ) ; <nl> + QString addr_text = ToPtrString ( wVA ) ; <nl> + char comment_text [ MAX_COMMENT_SIZE ] = " " ; <nl> + if ( DbgGetCommentAt ( ( duint ) wVA , comment_text ) ) <nl> + { <nl> + if ( comment_text [ 0 ] = = ' \ 1 ' ) / / automatic comment <nl> + mLineEdit . setText ( QString ( comment_text + 1 ) ) ; <nl> + else <nl> + mLineEdit . setText ( QString ( comment_text ) ) ; <nl> + } <nl> + mLineEdit . setWindowTitle ( tr ( " Add comment at " ) + addr_text ) ; <nl> + if ( mLineEdit . exec ( ) ! = QDialog : : Accepted ) <nl> + return ; <nl> + QString comment = mLineEdit . editText . replace ( ' \ r ' , " " ) . replace ( ' \ n ' , " " ) ; <nl> + if ( ! DbgSetCommentAt ( wVA , comment . toUtf8 ( ) . constData ( ) ) ) <nl> + SimpleErrorBox ( widgetparent ( ) , tr ( " Error ! " ) , tr ( " DbgSetCommentAt failed ! " ) ) ; <nl> + <nl> + static bool easter = isEaster ( ) ; <nl> + if ( easter & & comment . toLower ( ) = = " oep " ) <nl> + { <nl> + QFile file ( " : / icons / images / egg . wav " ) ; <nl> + if ( file . open ( QIODevice : : ReadOnly ) ) <nl> + { <nl> + QByteArray egg = file . readAll ( ) ; <nl> + PlaySoundA ( egg . data ( ) , 0 , SND_MEMORY | SND_ASYNC | SND_NODEFAULT ) ; <nl> + } <nl> + } <nl> + <nl> + GuiUpdateAllViews ( ) ; <nl> + } <nl> + <nl> + void CommonActions : : setBookmarkSlot ( ) <nl> + { <nl> + if ( ! DbgIsDebugging ( ) ) <nl> + return ; <nl> + duint wVA = mGetSelection ( ) ; <nl> + bool result ; <nl> + result = DbgSetBookmarkAt ( wVA , ! DbgGetBookmarkAt ( wVA ) ) ; <nl> + if ( ! result ) <nl> + SimpleErrorBox ( widgetparent ( ) , tr ( " Error ! " ) , tr ( " DbgSetBookmarkAt failed ! " ) ) ; <nl> + GuiUpdateAllViews ( ) ; <nl> + } <nl> + <nl> + / / Give a warning about the selected address is not executable <nl> + bool CommonActions : : WarningBoxNotExecutable ( const QString & text , duint wVA ) <nl> + { <nl> + if ( DbgFunctions ( ) - > IsDepEnabled ( ) & & ! DbgFunctions ( ) - > MemIsCodePage ( wVA , false ) ) <nl> + { <nl> + QMessageBox msgyn ( QMessageBox : : Warning , tr ( " Current address is not executable " ) , text , QMessageBox : : Yes | QMessageBox : : No , widgetparent ( ) ) ; <nl> + msgyn . setWindowIcon ( DIcon ( " compile - warning . png " ) ) ; <nl> + msgyn . setParent ( widgetparent ( ) , Qt : : Dialog ) ; <nl> + msgyn . setWindowFlags ( msgyn . windowFlags ( ) & ( ~ Qt : : WindowContextHelpButtonHint ) ) ; <nl> + if ( msgyn . exec ( ) = = QMessageBox : : No ) <nl> + return false ; <nl> + } <nl> + return true ; <nl> + } <nl> + <nl> + void CommonActions : : toggleInt3BPActionSlot ( ) <nl> + { <nl> + if ( ! DbgIsDebugging ( ) ) <nl> + return ; <nl> + duint wVA = mGetSelection ( ) ; <nl> + BPXTYPE wBpType = DbgGetBpxTypeAt ( wVA ) ; <nl> + QString wCmd ; <nl> + <nl> + if ( ( wBpType & bp_normal ) = = bp_normal ) <nl> + wCmd = " bc " + ToPtrString ( wVA ) ; <nl> + else <nl> + { <nl> + if ( ! WarningBoxNotExecutable ( tr ( " Setting software breakpoint here may result in crash . Do you really want to continue ? " ) , wVA ) ) <nl> + return ; <nl> + wCmd = " bp " + ToPtrString ( wVA ) ; <nl> + } <nl> + <nl> + DbgCmdExec ( wCmd ) ; <nl> + / / emit Disassembly : : repainted ( ) ; <nl> + } <nl> + <nl> + / / Display the edit breakpoint dialog <nl> + void CommonActions : : editSoftBpActionSlot ( ) <nl> + { <nl> + auto selection = mGetSelection ( ) ; <nl> + if ( selection = = 0 ) <nl> + return ; <nl> + BPXTYPE bpType = DbgGetBpxTypeAt ( selection ) ; <nl> + if ( ( bpType & bp_hardware ) = = bp_hardware ) <nl> + Breakpoints : : editBP ( bp_hardware , ToHexString ( selection ) , widgetparent ( ) ) ; <nl> + else if ( ( bpType & bp_normal ) = = bp_normal ) <nl> + Breakpoints : : editBP ( bp_normal , ToHexString ( selection ) , widgetparent ( ) ) ; <nl> + else <nl> + { <nl> + DbgCmdExecDirect ( QString ( " bp % 1 " ) . arg ( ToHexString ( selection ) ) ) ; / / Blocking call <nl> + if ( ! Breakpoints : : editBP ( bp_normal , ToHexString ( selection ) , widgetparent ( ) ) ) <nl> + Breakpoints : : removeBP ( bp_normal , selection ) ; <nl> + } <nl> + } <nl> + <nl> + void CommonActions : : toggleHwBpActionSlot ( ) <nl> + { <nl> + duint wVA = mGetSelection ( ) ; <nl> + BPXTYPE wBpType = DbgGetBpxTypeAt ( wVA ) ; <nl> + QString wCmd ; <nl> + <nl> + if ( ( wBpType & bp_hardware ) = = bp_hardware ) <nl> + { <nl> + wCmd = " bphwc " + ToPtrString ( wVA ) ; <nl> + } <nl> + else <nl> + { <nl> + wCmd = " bphws " + ToPtrString ( wVA ) ; <nl> + } <nl> + <nl> + DbgCmdExec ( wCmd ) ; <nl> + } <nl> + <nl> + <nl> + void CommonActions : : setHwBpOnSlot0ActionSlot ( ) <nl> + { <nl> + setHwBpAt ( mGetSelection ( ) , 0 ) ; <nl> + } <nl> + <nl> + void CommonActions : : setHwBpOnSlot1ActionSlot ( ) <nl> + { <nl> + setHwBpAt ( mGetSelection ( ) , 1 ) ; <nl> + } <nl> + <nl> + void CommonActions : : setHwBpOnSlot2ActionSlot ( ) <nl> + { <nl> + setHwBpAt ( mGetSelection ( ) , 2 ) ; <nl> + } <nl> + <nl> + void CommonActions : : setHwBpOnSlot3ActionSlot ( ) <nl> + { <nl> + setHwBpAt ( mGetSelection ( ) , 3 ) ; <nl> + } <nl> + <nl> + void CommonActions : : setHwBpAt ( duint va , int slot ) <nl> + { <nl> + int wI = 0 ; <nl> + int wSlotIndex = - 1 ; <nl> + BPMAP wBPList ; <nl> + QString wCmd = " " ; <nl> + <nl> + DbgGetBpList ( bp_hardware , & wBPList ) ; <nl> + <nl> + / / Find index of slot slot in the list <nl> + for ( wI = 0 ; wI < wBPList . count ; wI + + ) <nl> + { <nl> + if ( wBPList . bp [ wI ] . slot = = ( unsigned short ) slot ) <nl> + { <nl> + wSlotIndex = wI ; <nl> + break ; <nl> + } <nl> + } <nl> + <nl> + if ( wSlotIndex < 0 ) / / Slot not used <nl> + { <nl> + wCmd = " bphws " + ToPtrString ( va ) ; <nl> + DbgCmdExec ( wCmd ) ; <nl> + } <nl> + else / / Slot used <nl> + { <nl> + wCmd = " bphwc " + ToPtrString ( ( duint ) ( wBPList . bp [ wSlotIndex ] . addr ) ) ; <nl> + DbgCmdExec ( wCmd ) ; <nl> + <nl> + Sleep ( 200 ) ; <nl> + <nl> + wCmd = " bphws " + ToPtrString ( va ) ; <nl> + DbgCmdExec ( wCmd ) ; <nl> + } <nl> + if ( wBPList . count ) <nl> + BridgeFree ( wBPList . bp ) ; <nl> + } <nl> + <nl> + void CommonActions : : graphSlot ( ) <nl> + { <nl> + if ( DbgCmdExecDirect ( QString ( " graph % 1 " ) . arg ( ToPtrString ( mGetSelection ( ) ) ) ) ) <nl> + GuiFocusView ( GUI_GRAPH ) ; <nl> + } <nl> + <nl> + void CommonActions : : setNewOriginHereActionSlot ( ) <nl> + { <nl> + if ( ! DbgIsDebugging ( ) ) <nl> + return ; <nl> + duint wVA = mGetSelection ( ) ; <nl> + if ( ! WarningBoxNotExecutable ( tr ( " Setting new origin here may result in crash . Do you really want to continue ? " ) , wVA ) ) <nl> + return ; <nl> + QString wCmd = " cip = " + ToPtrString ( wVA ) ; <nl> + DbgCmdExec ( wCmd ) ; <nl> + } <nl> + <nl> + void CommonActions : : createThreadSlot ( ) <nl> + { <nl> + duint wVA = mGetSelection ( ) ; <nl> + if ( ! WarningBoxNotExecutable ( tr ( " Creating new thread here may result in crash . Do you really want to continue ? " ) , wVA ) ) <nl> + return ; <nl> + WordEditDialog argWindow ( widgetparent ( ) ) ; <nl> + argWindow . setup ( tr ( " Argument for the new thread " ) , 0 , sizeof ( duint ) ) ; <nl> + if ( argWindow . exec ( ) ! = QDialog : : Accepted ) <nl> + return ; <nl> + DbgCmdExec ( QString ( " createthread % 1 , % 2 " ) . arg ( ToPtrString ( wVA ) ) . arg ( ToPtrString ( argWindow . getVal ( ) ) ) ) ; <nl> + } <nl> new file mode 100644 <nl> index 000000000 . . c6790e8ed <nl> mmm / dev / null <nl> ppp b / src / gui / Src / Utils / CommonActions . h <nl> <nl> + # ifndef COMMONACTIONS_H <nl> + # define COMMONACTIONS_H <nl> + <nl> + # include < QAction > <nl> + # include < functional > <nl> + # include " ActionHelpers . h " <nl> + <nl> + class MenuBuilder ; <nl> + <nl> + class CommonActions : public QObject , public ActionHelperProxy <nl> + { <nl> + Q_OBJECT <nl> + <nl> + public : <nl> + typedef enum <nl> + { <nl> + ActionDisasm = 1 , / / Follow in Disassembly <nl> + ActionDisasmMore = 1 < < 1 , / / Follow in Disassembly ( submenu ) <nl> + ActionDisasmDump = 1 < < 2 , / / Follow in Dump in Disassembly Mode <nl> + ActionDisasmDumpMore = 1 < < 3 , / / Follow in Dump in Disassembly Mode ( submenu ) <nl> + ActionDisasmData = 1 < < 4 , / / Follow DWORD in Disassembly <nl> + ActionDump = 1 < < 5 , / / Follow in Dump <nl> + ActionDumpMore = 1 < < 6 , / / Follow in Dump ( submenu ) <nl> + ActionDumpN = 1 < < 7 , / / Follow in Dump N ( submenu ) <nl> + ActionDumpData = 1 < < 8 , / / Follow DWORD in Dump <nl> + ActionStackDump = 1 < < 9 , / / Follow in Stack <nl> + ActionMemoryMap = 1 < < 10 , / / Follow in Memory Map <nl> + ActionGraph = 1 < < 11 , / / Graph <nl> + ActionBreakpoint = 1 < < 12 , / / Breakpoint <nl> + ActionMemoryBreakpoint = 1 < < 13 , / / Memory Breakpoint <nl> + ActionMnemonicHelp = 1 < < 14 , / / Mnemonic Help <nl> + ActionLabel = 1 < < 15 , / / Label <nl> + ActionLabelMore = 1 < < 16 , / / Label ( submenu ) <nl> + ActionComment = 1 < < 17 , / / Comment <nl> + ActionCommentMore = 1 < < 18 , / / Comment ( submenu ) <nl> + ActionBookmark = 1 < < 19 , / / Bookmark <nl> + ActionBookmarkMore = 1 < < 20 , / / Bookmark ( submenu ) <nl> + ActionFindref = 1 < < 21 , / / Find references <nl> + ActionFindrefMore = 1 < < 22 , / / Find references ( submenu ) <nl> + ActionXref = 1 < < 23 , / / Xref <nl> + ActionXrefMore = 1 < < 24 , / / Xref ( submenu ) <nl> + ActionNewOrigin = 1 < < 25 , / / Set New Origin Here <nl> + ActionNewThread = 1 < < 26 , / / Create New Thread Here <nl> + ActionWatch = 1 < < 27 / / Watch DWORD <nl> + } CommonActionsList ; <nl> + <nl> + using GetSelectionFunc = std : : function < duint ( ) > ; <nl> + <nl> + explicit CommonActions ( QWidget * parent , ActionHelperFuncs funcs , GetSelectionFunc getSelection ) ; <nl> + void build ( MenuBuilder * builder , int actions ) ; <nl> + / / Reserved for future use ( submenu for Dump and Search with more addresses ) <nl> + / / void build ( MenuBuilder * builder , int actions , std : : function < void ( QList < std : : pair < QString , duint > > & , CommonActionsList ) > additionalAddress ) ; <nl> + <nl> + QAction * makeCommandAction ( const QIcon & icon , const QString & text , const char * cmd , const char * shortcut ) ; <nl> + QAction * makeCommandAction ( const QIcon & icon , const QString & text , const char * cmd ) ; <nl> + public slots : <nl> + void followDisassemblySlot ( ) ; <nl> + void setLabelSlot ( ) ; <nl> + void setCommentSlot ( ) ; <nl> + void setBookmarkSlot ( ) ; <nl> + <nl> + void toggleInt3BPActionSlot ( ) ; <nl> + void editSoftBpActionSlot ( ) ; <nl> + void toggleHwBpActionSlot ( ) ; <nl> + void setHwBpOnSlot0ActionSlot ( ) ; <nl> + void setHwBpOnSlot1ActionSlot ( ) ; <nl> + void setHwBpOnSlot2ActionSlot ( ) ; <nl> + void setHwBpOnSlot3ActionSlot ( ) ; <nl> + void setHwBpAt ( duint va , int slot ) ; <nl> + <nl> + void graphSlot ( ) ; <nl> + void setNewOriginHereActionSlot ( ) ; <nl> + void createThreadSlot ( ) ; <nl> + private : <nl> + GetSelectionFunc mGetSelection ; <nl> + bool WarningBoxNotExecutable ( const QString & text , duint wVA ) ; <nl> + QWidget * widgetparent ( ) ; <nl> + } ; <nl> + <nl> + <nl> + # endif / / COMMONACTIONS_H <nl> mmm a / src / gui / Src / Utils / MiscUtil . cpp <nl> ppp b / src / gui / Src / Utils / MiscUtil . cpp <nl> QIcon getFileIcon ( QString file ) <nl> return result ; <nl> } <nl> <nl> + / / Export table in CSV . TODO : Display a dialog where the user choose what column to export and in which encoding <nl> bool ExportCSV ( dsint rows , dsint columns , std : : vector < QString > headers , std : : function < QString ( dsint , dsint ) > getCellContent ) <nl> { <nl> BrowseDialog browse ( nullptr , QApplication : : translate ( " ExportCSV " , " Export data in CSV format " ) , QApplication : : translate ( " ExportCSV " , " Enter the CSV file name to export " ) , QApplication : : translate ( " ExportCSV " , " CSV files ( * . csv ) ; ; All files ( * . * ) " ) , QApplication : : applicationDirPath ( ) + QDir : : separator ( ) + " db " , true ) ; <nl> mmm a / src / gui / x64dbg . pro <nl> ppp b / src / gui / x64dbg . pro <nl> SOURCES + = \ <nl> Src / Imports . cpp \ <nl> Src / Tracer / TraceRegisters . cpp \ <nl> Src / Tracer / TraceWidget . cpp \ <nl> + Src / Utils / CommonActions . cpp \ <nl> Src / main . cpp \ <nl> Src / Gui / MainWindow . cpp \ <nl> Src / Gui / CPUWidget . cpp \ <nl> SOURCES + = \ <nl> Src / Gui / LocalVarsView . cpp \ <nl> Src / Gui / MessagesBreakpoints . cpp \ <nl> Src / Gui / AboutDialog . cpp \ <nl> - Src / Gui / BreakpointMenu . cpp \ <nl> Src / Gui / ComboBoxDialog . cpp \ <nl> Src / Utils / SymbolAutoCompleteModel . cpp \ <nl> Src / Tracer / TraceBrowser . cpp \ <nl> HEADERS + = \ <nl> Src / Gui / SystemBreakpointScriptDialog . h \ <nl> Src / Tracer / TraceRegisters . h \ <nl> Src / Tracer / TraceWidget . h \ <nl> + Src / Utils / CommonActions . h \ <nl> Src / main . h \ <nl> Src / Gui / MainWindow . h \ <nl> Src / Gui / CPUWidget . h \ <nl> HEADERS + = \ <nl> Src / Gui / LocalVarsView . h \ <nl> Src / Gui / MessagesBreakpoints . h \ <nl> Src / Gui / AboutDialog . h \ <nl> - Src / Gui / BreakpointMenu . h \ <nl> Src / Gui / ComboBoxDialog . h \ <nl> Src / Utils / VaHistory . h \ <nl> Src / Utils / SymbolAutoCompleteModel . h \ <nl> mmm a / src / x64dbg_translations . pro <nl> ppp b / src / x64dbg_translations . pro <nl> SOURCES + = \ <nl> gui / Src / Gui / LocalVarsView . cpp \ <nl> gui / Src / Gui / MessagesBreakpoints . cpp \ <nl> gui / Src / Gui / AboutDialog . cpp \ <nl> - gui / Src / Gui / BreakpointMenu . cpp \ <nl> + gui / Src / Gui / CommonActions . cpp \ <nl> gui / Src / Utils / SymbolAutoCompleteModel . cpp \ <nl> gui / Src / Tracer / TraceBrowser . cpp \ <nl> gui / Src / Tracer / TraceFileReader . cpp \ <nl> HEADERS + = \ <nl> gui / Src / Gui / LocalVarsView . h \ <nl> gui / Src / Gui / MessagesBreakpoints . h \ <nl> gui / Src / Gui / AboutDialog . h \ <nl> - gui / Src / Gui / BreakpointMenu . h \ <nl> + gui / Src / Gui / CommonActions . h \ <nl> gui / Src / Utils / SymbolAutoCompleteModel . h \ <nl> gui / Src / Tracer / TraceBrowser . h \ <nl> gui / Src / Tracer / TraceFileReader . h \ <nl> | Merge pull request from torusrxxx / patch000000a7 | x64dbg/x64dbg | 47313dee8ab1ab942e2c4a02936be9382c5e1ff8 | 2020-12-06T19:16:01Z |
mmm a / Code / Sandbox / Plugins / EditorCommon / AssetSystem / AssetGenerator . cpp <nl> ppp b / Code / Sandbox / Plugins / EditorCommon / AssetSystem / AssetGenerator . cpp <nl> void CAssetGenerator : : OnFileChange ( const char * szFilename , EChangeType changeTyp <nl> m_fileQueue . ProcessItemUniqueAsync ( filePath , [ this , updateExisting ] ( const string & path ) <nl> { <nl> / / It can be that the file is still being opened for writing . <nl> - if ( m_waitForTextureCompiler | | IsFileOpened ( path ) ) <nl> + if ( m_pTextureCompilerProgress | | IsFileOpened ( path ) ) <nl> { <nl> / / Try again <nl> return false ; <nl> void CAssetGenerator : : OnCompilationQueueTriggered ( int nPending ) <nl> { <nl> std : : unique_lock < std : : mutex > lock ( m_textureCompilerMutex ) ; <nl> <nl> - if ( ! m_waitForTextureCompiler ) <nl> + if ( ! m_pTextureCompilerProgress ) <nl> { <nl> m_pTextureCompilerProgress . reset ( new CProgressNotification ( QObject : : tr ( " Compiling textures " ) , QString ( ) ) ) ; <nl> } <nl> - <nl> - + + m_waitForTextureCompiler ; <nl> } <nl> <nl> void CAssetGenerator : : OnCompilationQueueDepleted ( ) <nl> { <nl> std : : unique_lock < std : : mutex > lock ( m_textureCompilerMutex ) ; <nl> <nl> - if ( m_waitForTextureCompiler > 0 ) <nl> - { <nl> - - - m_waitForTextureCompiler ; <nl> - } <nl> - <nl> - if ( ! m_waitForTextureCompiler ) <nl> + if ( m_pTextureCompilerProgress ) <nl> { <nl> m_pTextureCompilerProgress . reset ( ) ; <nl> } <nl> - <nl> } <nl> <nl> } <nl> \ No newline at end of file <nl> mmm a / Code / Sandbox / Plugins / EditorCommon / AssetSystem / AssetGenerator . h <nl> ppp b / Code / Sandbox / Plugins / EditorCommon / AssetSystem / AssetGenerator . h <nl> class CAssetGenerator : public IFileChangeListener , public IAsyncTextureCompileL <nl> std : : unique_ptr < CProgressNotification > m_pTextureCompilerProgress ; <nl> string m_rcSettings ; <nl> std : : mutex m_textureCompilerMutex ; <nl> - size_t m_waitForTextureCompiler = 0 ; <nl> } ; <nl> <nl> } ; <nl> | ! I integrate from / / ce / main . . . | CRYTEK/CRYENGINE | 4b717fa630985f75f2bedddb0f652b7e55ab3cc3 | 2018-09-20T10:02:06Z |
mmm a / test / SILGen / tsan_instrumentation . swift <nl> ppp b / test / SILGen / tsan_instrumentation . swift <nl> <nl> / / RUN : % target - swift - emit - silgen - sanitize = thread % s | % FileCheck % s <nl> / / REQUIRES : tsan_runtime <nl> <nl> + / / FIXME : This should be covered by " tsan_runtime " ; older versions of Apple OSs <nl> + / / don ' t support TSan . <nl> + / / UNSUPPORTED : remote_run <nl> + <nl> func takesInout ( _ p : inout Int ) { } <nl> func takesInout ( _ p : inout MyStruct ) { } <nl> <nl> mmm a / test / Sanitizers / tsan - norace - block - release . swift <nl> ppp b / test / Sanitizers / tsan - norace - block - release . swift <nl> <nl> / / REQUIRES : objc_interop <nl> / / REQUIRES : tsan_runtime <nl> <nl> + / / FIXME : This should be covered by " tsan_runtime " ; older versions of Apple OSs <nl> + / / don ' t support TSan . <nl> + / / UNSUPPORTED : remote_run <nl> + <nl> / / Test that we do not report a race on block release operation . <nl> import Foundation <nl> <nl> mmm a / test / Sanitizers / tsan - norace - deinit - run - time . swift <nl> ppp b / test / Sanitizers / tsan - norace - deinit - run - time . swift <nl> <nl> / / REQUIRES : objc_interop <nl> / / REQUIRES : tsan_runtime <nl> <nl> + / / FIXME : This should be covered by " tsan_runtime " ; older versions of Apple OSs <nl> + / / don ' t support TSan . <nl> + / / UNSUPPORTED : remote_run <nl> + <nl> / / Test that we do not report a race on deinit ; the synchronization is guaranteed by runtime . <nl> import Foundation <nl> <nl> mmm a / test / Sanitizers / tsan - static - exclusivity . swift <nl> ppp b / test / Sanitizers / tsan - static - exclusivity . swift <nl> <nl> / / RUN : % target - swift - frontend - enforce - exclusivity = checked - sanitize = thread - emit - sil - primary - file % s - o / dev / null - verify <nl> / / REQUIRES : tsan_runtime <nl> <nl> + / / FIXME : This should be covered by " tsan_runtime " ; older versions of Apple OSs <nl> + / / don ' t support TSan . <nl> + / / UNSUPPORTED : remote_run <nl> + <nl> <nl> struct OtherStruct { <nl> mutating <nl> mmm a / test / Sanitizers / tsan . swift <nl> ppp b / test / Sanitizers / tsan . swift <nl> <nl> / / REQUIRES : tsan_runtime <nl> / / UNSUPPORTED : OS = tvos <nl> <nl> + / / FIXME : This should be covered by " tsan_runtime " ; older versions of Apple OSs <nl> + / / don ' t support TSan . <nl> + / / UNSUPPORTED : remote_run <nl> + <nl> / / https : / / bugs . swift . org / browse / SR - 6622 <nl> / / XFAIL : linux <nl> <nl> mmm a / test / stdlib / MapKit . swift <nl> ppp b / test / stdlib / MapKit . swift <nl> func spansEqual ( _ x : MKCoordinateSpan , _ y : MKCoordinateSpan ) <nl> <nl> if # available ( tvOS 9 . 2 , * ) { <nl> mapKit . test ( " NSValue bridging " ) <nl> - . skip ( . iOSMinor ( 9 , 3 , reason : " < rdar : / / problem / 41440036 > " ) ) . code { <nl> + . xfail ( . iOSMinor ( 9 , 3 , reason : " < rdar : / / problem / 41440036 > " ) ) <nl> + . xfail ( . osxMinorRange ( 10 , 9 . . . 10 , reason : " < rdar : / / problem / 44866579 > " ) ) <nl> + . code { <nl> expectBridgeToNSValue ( CLLocationCoordinate2D ( latitude : 17 , longitude : 38 ) , <nl> nsValueInitializer : { NSValue ( mkCoordinate : $ 0 ) } , <nl> nsValueGetter : { $ 0 . mkCoordinateValue } , <nl> mmm a / test / stdlib / SwiftObjectNSObject . swift <nl> ppp b / test / stdlib / SwiftObjectNSObject . swift <nl> <nl> / / RUN : % target - clang % S / Inputs / SwiftObjectNSObject / SwiftObjectNSObject . m - c - o % t / SwiftObjectNSObject . o - g <nl> / / RUN : % target - build - swift % s - I % S / Inputs / SwiftObjectNSObject / - Xlinker % t / SwiftObjectNSObject . o - o % t / SwiftObjectNSObject <nl> / / RUN : % target - codesign % t / SwiftObjectNSObject <nl> - / / RUN : % target - run % t / SwiftObjectNSObject 2 > & 1 | % FileCheck % s <nl> + / / RUN : % target - run % t / SwiftObjectNSObject 2 > % t / log . txt <nl> + / / RUN : % FileCheck % s < % t / log . txt <nl> / / REQUIRES : executable_test <nl> <nl> / / REQUIRES : objc_interop <nl> mmm a / test / stdlib / TestLocale . swift <nl> ppp b / test / stdlib / TestLocale . swift <nl> class TestLocale : TestLocaleSuper { <nl> <nl> expectEqual ( " . " , locale . decimalSeparator ) <nl> expectEqual ( " , " , locale . groupingSeparator ) <nl> - expectEqual ( " HK $ " , locale . currencySymbol ) <nl> + if # available ( macOS 10 . 11 , * ) { <nl> + expectEqual ( " HK $ " , locale . currencySymbol ) <nl> + } <nl> expectEqual ( " HKD " , locale . currencyCode ) <nl> <nl> expectTrue ( Locale . availableIdentifiers . count > 0 ) <nl> | Merge remote - tracking branch ' origin / master ' into master - next | apple/swift | 184326cbf49a0bf4dda3a296c5b0904cb919aa9b | 2018-10-01T04:29:23Z |
mmm a / js / client / modules / @ arangodb / foxx / manager . js <nl> ppp b / js / client / modules / @ arangodb / foxx / manager . js <nl> <nl> / * jshint unused : false * / <nl> + / * global ARANGODB_CLIENT_VERSION * / <nl> ' use strict ' ; <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> var help = function ( ) { <nl> arangodb . print ( ) ; <nl> arangodb . print ( ' Use foxx - manager - - help to show a list of global options \ n ' ) ; <nl> arangodb . print ( ' There is also an online manual available at : ' ) ; <nl> - arangodb . print ( ' https : / / docs . arangodb . com / Foxx / Install / ' ) ; <nl> + <nl> + / / extract current version <nl> + var version ; <nl> + try { <nl> + version = ARANGODB_CLIENT_VERSION ( ) . replace ( / ^ ( \ d + \ . \ d + ) . * / , " $ 1 " ) ; <nl> + } catch ( err ) { } <nl> + if ( ! version . match ( / ^ ( \ d + \ . \ d + ) $ / ) ) { <nl> + version = ' latest ' ; <nl> + } <nl> + arangodb . print ( ' https : / / docs . arangodb . com / ' + version + ' / Manual / Foxx / ' ) ; <nl> <nl> / / additional newline <nl> arangodb . print ( ) ; <nl> | fixed issue | arangodb/arangodb | e7abe1e7ca739c3a5500bc51d920916ccb1adbf9 | 2017-04-20T13:42:16Z |
mmm a / jvm - packages / pom . xml <nl> ppp b / jvm - packages / pom . xml <nl> <nl> <nl> < groupId > ml . dmlc < / groupId > <nl> < artifactId > xgboost - jvm < / artifactId > <nl> - < version > 0 . 80 < / version > <nl> + < version > 0 . 81 - SNAPSHOT < / version > <nl> < packaging > pom < / packaging > <nl> < name > XGBoost JVM Package < / name > <nl> < description > JVM Package for XGBoost < / description > <nl> mmm a / jvm - packages / xgboost4j - example / pom . xml <nl> ppp b / jvm - packages / xgboost4j - example / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc < / groupId > <nl> < artifactId > xgboost - jvm < / artifactId > <nl> - < version > 0 . 80 < / version > <nl> + < version > 0 . 81 - SNAPSHOT < / version > <nl> < / parent > <nl> < artifactId > xgboost4j - example < / artifactId > <nl> - < version > 0 . 80 < / version > <nl> + < version > 0 . 81 - SNAPSHOT < / version > <nl> < packaging > jar < / packaging > <nl> < build > <nl> < plugins > <nl> <nl> < dependency > <nl> < groupId > ml . dmlc < / groupId > <nl> < artifactId > xgboost4j - spark < / artifactId > <nl> - < version > 0 . 80 < / version > <nl> + < version > 0 . 81 - SNAPSHOT < / version > <nl> < / dependency > <nl> < dependency > <nl> < groupId > org . apache . spark < / groupId > <nl> <nl> < dependency > <nl> < groupId > ml . dmlc < / groupId > <nl> < artifactId > xgboost4j - flink < / artifactId > <nl> - < version > 0 . 80 < / version > <nl> + < version > 0 . 81 - SNAPSHOT < / version > <nl> < / dependency > <nl> < dependency > <nl> < groupId > org . apache . commons < / groupId > <nl> mmm a / jvm - packages / xgboost4j - flink / pom . xml <nl> ppp b / jvm - packages / xgboost4j - flink / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc < / groupId > <nl> < artifactId > xgboost - jvm < / artifactId > <nl> - < version > 0 . 80 < / version > <nl> + < version > 0 . 81 - SNAPSHOT < / version > <nl> < / parent > <nl> < artifactId > xgboost4j - flink < / artifactId > <nl> - < version > 0 . 80 < / version > <nl> + < version > 0 . 81 - SNAPSHOT < / version > <nl> < build > <nl> < plugins > <nl> < plugin > <nl> <nl> < dependency > <nl> < groupId > ml . dmlc < / groupId > <nl> < artifactId > xgboost4j < / artifactId > <nl> - < version > 0 . 80 < / version > <nl> + < version > 0 . 81 - SNAPSHOT < / version > <nl> < / dependency > <nl> < dependency > <nl> < groupId > org . apache . commons < / groupId > <nl> mmm a / jvm - packages / xgboost4j - spark / pom . xml <nl> ppp b / jvm - packages / xgboost4j - spark / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc < / groupId > <nl> < artifactId > xgboost - jvm < / artifactId > <nl> - < version > 0 . 80 < / version > <nl> + < version > 0 . 81 - SNAPSHOT < / version > <nl> < / parent > <nl> < artifactId > xgboost4j - spark < / artifactId > <nl> < build > <nl> <nl> < dependency > <nl> < groupId > ml . dmlc < / groupId > <nl> < artifactId > xgboost4j < / artifactId > <nl> - < version > 0 . 80 < / version > <nl> + < version > 0 . 81 - SNAPSHOT < / version > <nl> < / dependency > <nl> < dependency > <nl> < groupId > org . apache . spark < / groupId > <nl> mmm a / jvm - packages / xgboost4j / pom . xml <nl> ppp b / jvm - packages / xgboost4j / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc < / groupId > <nl> < artifactId > xgboost - jvm < / artifactId > <nl> - < version > 0 . 80 < / version > <nl> + < version > 0 . 81 - SNAPSHOT < / version > <nl> < / parent > <nl> < artifactId > xgboost4j < / artifactId > <nl> - < version > 0 . 80 < / version > <nl> + < version > 0 . 81 - SNAPSHOT < / version > <nl> < packaging > jar < / packaging > <nl> <nl> < dependencies > <nl> | Update JVM packages version to 0 . 81 - SNAPSHOT ( ) | dmlc/xgboost | 6288f6d5632ef5660be70f30484f8a46c90c36f9 | 2018-08-13T17:17:52Z |
mmm a / include / swift / AST / Import . h <nl> ppp b / include / swift / AST / Import . h <nl> <nl> # include " swift / Basic / OptionSet . h " <nl> # include " llvm / ADT / ArrayRef . h " <nl> # include " llvm / ADT / DenseMapInfo . h " <nl> + # include " llvm / ADT / PointerIntPair . h " <nl> # include " llvm / ADT / SmallVector . h " <nl> # include " llvm / ADT / STLExtras . h " <nl> # include " llvm / ADT / StringRef . h " <nl> enum class ImportKind : uint8_t { <nl> Func <nl> } ; <nl> <nl> + inline bool isScopedImportKind ( ImportKind importKind ) { <nl> + return importKind ! = ImportKind : : Module ; <nl> + } <nl> + <nl> / / / Possible attributes for imports in source files . <nl> enum class ImportFlags { <nl> / / / The imported module is exposed to anyone who imports the parent module . <nl> namespace detail { <nl> <nl> template < typename Subclass > <nl> class ImportPathBuilder { <nl> - llvm : : SmallVector < ImportPathElement , 4 > scratch ; <nl> + using Scratch = llvm : : SmallVector < ImportPathElement , 4 > ; <nl> + Scratch scratch ; <nl> <nl> public : <nl> + using value_type = Scratch : : value_type ; <nl> + using reference = Scratch : : reference ; <nl> + using iterator = Scratch : : iterator ; <nl> + using const_iterator = Scratch : : const_iterator ; <nl> + using difference_type = Scratch : : difference_type ; <nl> + using size_type = Scratch : : size_type ; <nl> + <nl> Subclass get ( ) const { <nl> return Subclass ( scratch ) ; <nl> } <nl> class ImportPath : public detail : : ImportPathBase < ImportPath > { <nl> / / / including submodules , assuming the \ c ImportDecl has the indicated <nl> / / / \ c importKind . <nl> Module getModulePath ( ImportKind importKind ) const { <nl> - return getModulePath ( importKind ! = ImportKind : : Module ) ; <nl> + return getModulePath ( isScopedImportKind ( importKind ) ) ; <nl> } <nl> <nl> / / / Extracts the portion of the \ c ImportPath which represents a scope for the <nl> / / / import , assuming the \ c ImportDecl has the indicated \ c importKind . <nl> Access getAccessPath ( ImportKind importKind ) const { <nl> - return getAccessPath ( importKind ! = ImportKind : : Module ) ; <nl> + return getAccessPath ( isScopedImportKind ( importKind ) ) ; <nl> } <nl> } ; <nl> <nl> / / MARK : - Abstractions of imports <nl> <nl> + / / / Convenience struct to keep track of an import path and whether or not it <nl> + / / / is scoped . <nl> + class UnloadedImportedModule { <nl> + / / This is basically an ArrayRef with a bit stolen from the pointer . <nl> + / / FIXME : Extract an ArrayRefIntPair type from this . <nl> + llvm : : PointerIntPair < ImportPath : : Raw : : iterator , 1 , bool > dataAndIsScoped ; <nl> + ImportPath : : Raw : : size_type length ; <nl> + <nl> + ImportPath : : Raw : : iterator data ( ) const { <nl> + return dataAndIsScoped . getPointer ( ) ; <nl> + } <nl> + <nl> + bool isScoped ( ) const { <nl> + return dataAndIsScoped . getInt ( ) ; <nl> + } <nl> + <nl> + ImportPath : : Raw getRaw ( ) const { <nl> + return ImportPath : : Raw ( data ( ) , length ) ; <nl> + } <nl> + <nl> + UnloadedImportedModule ( ImportPath : : Raw raw , bool isScoped ) <nl> + : dataAndIsScoped ( raw . data ( ) , isScoped ) , length ( raw . size ( ) ) { } <nl> + <nl> + public : <nl> + UnloadedImportedModule ( ImportPath importPath , bool isScoped ) <nl> + : UnloadedImportedModule ( importPath . getRaw ( ) , isScoped ) { } <nl> + <nl> + UnloadedImportedModule ( ImportPath importPath , ImportKind importKind ) <nl> + : UnloadedImportedModule ( importPath , isScopedImportKind ( importKind ) ) { } <nl> + <nl> + ImportPath getImportPath ( ) const { <nl> + return ImportPath ( getRaw ( ) ) ; <nl> + } <nl> + <nl> + ImportPath : : Module getModulePath ( ) const { <nl> + return getImportPath ( ) . getModulePath ( isScoped ( ) ) ; <nl> + } <nl> + <nl> + ImportPath : : Access getAccessPath ( ) const { <nl> + return getImportPath ( ) . getAccessPath ( isScoped ( ) ) ; <nl> + } <nl> + <nl> + friend bool operator = = ( const UnloadedImportedModule & lhs , <nl> + const UnloadedImportedModule & rhs ) { <nl> + return ( lhs . getRaw ( ) = = rhs . getRaw ( ) ) & & <nl> + ( lhs . isScoped ( ) = = rhs . isScoped ( ) ) ; <nl> + } <nl> + } ; <nl> + <nl> / / / Convenience struct to keep track of a module along with its access path . <nl> struct alignas ( uint64_t ) ImportedModule { <nl> / / / The access path from an import : ` import Foo . Bar ` - > ` Foo . Bar ` . <nl> struct AttributedImport { <nl> } <nl> } ; <nl> <nl> - using ImportedModuleDesc = AttributedImport < ImportedModule > ; <nl> - <nl> / / MARK : - Implicit imports <nl> <nl> / / / A module which has been implicitly imported . <nl> mmm a / lib / Sema / ImportResolution . cpp <nl> ppp b / lib / Sema / ImportResolution . cpp <nl> namespace { <nl> / / / source , or it may represent a cross - import overlay that has been found and <nl> / / / needs to be loaded . <nl> struct UnboundImport { <nl> + / / / Information about the import . Use this field , not \ c getImportDecl ( ) , to <nl> + / / / determine the behavior expected for this import . <nl> + AttributedImport < UnloadedImportedModule > import ; <nl> + <nl> / / / The source location to use when diagnosing errors for this import . <nl> SourceLoc importLoc ; <nl> <nl> - / / / The options for this import , such as " exported " or <nl> - / / / " implementation - only " . Use this field , not \ c attrs , to determine the <nl> - / / / behavior expected for this import . <nl> - ImportOptions options ; <nl> - <nl> - / / / If \ c options includes \ c PrivateImport , the filename we should import <nl> - / / / private declarations from . <nl> - StringRef sourceFileArg ; <nl> - <nl> - / / / The module names being imported . There will usually be just one for the <nl> - / / / top - level module , but a submodule import will have more . <nl> - ImportPath : : Module modulePath ; <nl> - <nl> - / / / If this is a scoped import , the names of the declaration being imported ; <nl> - / / / otherwise empty . ( Currently the compiler doesn ' t support nested scoped <nl> - / / / imports , so there should always be zero or one elements , but <nl> - / / / \ c ImportPath : : Access is the common currency type for this . ) <nl> - ImportPath : : Access accessPath ; <nl> - <nl> - / / Names of explicitly imported SPI groups via @ _spi . <nl> - ArrayRef < Identifier > spiGroups ; <nl> - <nl> / / / If this UnboundImport directly represents an ImportDecl , contains the <nl> / / / ImportDecl it represents . This should only be used for diagnostics and <nl> / / / for updating the AST ; if you want to read information about the import , <nl> - / / / get it from the other fields in \ c UnboundImport rather than from the <nl> - / / / \ c ImportDecl . <nl> + / / / get it from the \ c import field rather than from the \ c ImportDecl . <nl> / / / <nl> / / / If this UnboundImport represents a cross - import , contains the declaring <nl> / / / module ' s \ c ModuleDecl . <nl> struct UnboundImport { <nl> / / / UnboundImport . <nl> AttributedImport < ImportedModule > <nl> makeAttributedImport ( ModuleDecl * module ) const { <nl> - return { ImportedModule { accessPath , module } , <nl> - options , sourceFileArg , spiGroups } ; <nl> + return { ImportedModule { import . module . getAccessPath ( ) , module } , <nl> + import . options , import . sourceFileArg , import . spiGroups } ; <nl> } <nl> <nl> private : <nl> void ImportResolver : : bindImport ( UnboundImport & & I ) { <nl> return ; <nl> } <nl> <nl> - ModuleDecl * M = getModule ( I . modulePath ) ; <nl> + ModuleDecl * M = getModule ( I . import . module . getModulePath ( ) ) ; <nl> if ( ! I . checkModuleLoaded ( M , SF ) ) { <nl> / / Can ' t process further . checkModuleLoaded ( ) will have diagnosed this . <nl> if ( ID ) <nl> ImportResolver : : getModule ( ImportPath : : Module modulePath ) { <nl> <nl> NullablePtr < ModuleDecl > <nl> UnboundImport : : getTopLevelModule ( ModuleDecl * M , SourceFile & SF ) { <nl> - if ( modulePath . size ( ) = = 1 ) <nl> + if ( import . module . getModulePath ( ) . size ( ) = = 1 ) <nl> return M ; <nl> <nl> / / If we imported a submodule , import the top - level module as well . <nl> - Identifier topLevelName = modulePath . front ( ) . Item ; <nl> + Identifier topLevelName = import . module . getModulePath ( ) . front ( ) . Item ; <nl> ModuleDecl * topLevelModule = SF . getASTContext ( ) . getLoadedModule ( topLevelName ) ; <nl> <nl> if ( ! topLevelModule ) { <nl> ModuleImplicitImportsRequest : : evaluate ( Evaluator & evaluator , <nl> <nl> / / / Create an UnboundImport for a user - written import declaration . <nl> UnboundImport : : UnboundImport ( ImportDecl * ID ) <nl> - : importLoc ( ID - > getLoc ( ) ) , options ( ) , sourceFileArg ( ) , <nl> - modulePath ( ID - > getModulePath ( ) ) , accessPath ( ID - > getAccessPath ( ) ) , <nl> - importOrUnderlyingModuleDecl ( ID ) <nl> + : import ( UnloadedImportedModule ( ID - > getImportPath ( ) , ID - > getImportKind ( ) ) , <nl> + { } ) , <nl> + importLoc ( ID - > getLoc ( ) ) , importOrUnderlyingModuleDecl ( ID ) <nl> { <nl> if ( ID - > isExported ( ) ) <nl> - options | = ImportFlags : : Exported ; <nl> + import . options | = ImportFlags : : Exported ; <nl> <nl> if ( ID - > getAttrs ( ) . hasAttribute < TestableAttr > ( ) ) <nl> - options | = ImportFlags : : Testable ; <nl> + import . options | = ImportFlags : : Testable ; <nl> <nl> if ( ID - > getAttrs ( ) . hasAttribute < ImplementationOnlyAttr > ( ) ) <nl> - options | = ImportFlags : : ImplementationOnly ; <nl> + import . options | = ImportFlags : : ImplementationOnly ; <nl> <nl> if ( auto * privateImportAttr = <nl> ID - > getAttrs ( ) . getAttribute < PrivateImportAttr > ( ) ) { <nl> - options | = ImportFlags : : PrivateImport ; <nl> - sourceFileArg = privateImportAttr - > getSourceFile ( ) ; <nl> + import . options | = ImportFlags : : PrivateImport ; <nl> + import . sourceFileArg = privateImportAttr - > getSourceFile ( ) ; <nl> } <nl> <nl> SmallVector < Identifier , 4 > spiGroups ; <nl> for ( auto attr : ID - > getAttrs ( ) . getAttributes < SPIAccessControlAttr > ( ) ) { <nl> - options | = ImportFlags : : SPIAccessControl ; <nl> + import . options | = ImportFlags : : SPIAccessControl ; <nl> auto attrSPIs = attr - > getSPIGroups ( ) ; <nl> spiGroups . append ( attrSPIs . begin ( ) , attrSPIs . end ( ) ) ; <nl> } <nl> - this - > spiGroups = ID - > getASTContext ( ) . AllocateCopy ( spiGroups ) ; <nl> + import . spiGroups = ID - > getASTContext ( ) . AllocateCopy ( spiGroups ) ; <nl> } <nl> <nl> bool UnboundImport : : checkNotTautological ( const SourceFile & SF ) { <nl> / / Exit early if this is not a self - import . <nl> + auto modulePath = import . module . getModulePath ( ) ; <nl> if ( modulePath . front ( ) . Item ! = SF . getParentModule ( ) - > getName ( ) | | <nl> / / Overlays use an @ _exported self - import to load their clang module . <nl> - options . contains ( ImportFlags : : Exported ) | | <nl> + import . options . contains ( ImportFlags : : Exported ) | | <nl> / / Imports of your own submodules are allowed in cross - language libraries . <nl> modulePath . size ( ) ! = 1 | | <nl> / / SIL files self - import to get decls from the rest of the module . <nl> bool UnboundImport : : checkModuleLoaded ( ModuleDecl * M , SourceFile & SF ) { <nl> ASTContext & ctx = SF . getASTContext ( ) ; <nl> <nl> SmallString < 64 > modulePathStr ; <nl> - llvm : : interleave ( modulePath , [ & ] ( ImportPath : : Element elem ) { <nl> + llvm : : interleave ( import . module . getModulePath ( ) , <nl> + [ & ] ( ImportPath : : Element elem ) { <nl> modulePathStr + = elem . Item . str ( ) ; <nl> } , <nl> [ & ] { modulePathStr + = " . " ; } ) ; <nl> void UnboundImport : : validatePrivate ( ModuleDecl * topLevelModule ) { <nl> assert ( topLevelModule ) ; <nl> ASTContext & ctx = topLevelModule - > getASTContext ( ) ; <nl> <nl> - if ( ! options . contains ( ImportFlags : : PrivateImport ) ) <nl> + if ( ! import . options . contains ( ImportFlags : : PrivateImport ) ) <nl> return ; <nl> <nl> if ( topLevelModule - > arePrivateImportsEnabled ( ) ) <nl> void UnboundImport : : validatePrivate ( ModuleDecl * topLevelModule ) { <nl> <nl> diagnoseInvalidAttr ( DAK_PrivateImport , ctx . Diags , <nl> diag : : module_not_compiled_for_private_import ) ; <nl> - sourceFileArg = StringRef ( ) ; <nl> + import . sourceFileArg = StringRef ( ) ; <nl> } <nl> <nl> void UnboundImport : : validateImplementationOnly ( ASTContext & ctx ) { <nl> - if ( ! options . contains ( ImportFlags : : ImplementationOnly ) | | <nl> - ! options . contains ( ImportFlags : : Exported ) ) <nl> + if ( ! import . options . contains ( ImportFlags : : ImplementationOnly ) | | <nl> + ! import . options . contains ( ImportFlags : : Exported ) ) <nl> return ; <nl> <nl> / / Remove one flag to maintain the invariant . <nl> - options - = ImportFlags : : ImplementationOnly ; <nl> + import . options - = ImportFlags : : ImplementationOnly ; <nl> <nl> diagnoseInvalidAttr ( DAK_ImplementationOnly , ctx . Diags , <nl> diag : : import_implementation_cannot_be_exported ) ; <nl> void UnboundImport : : validateTestable ( ModuleDecl * topLevelModule ) { <nl> assert ( topLevelModule ) ; <nl> ASTContext & ctx = topLevelModule - > getASTContext ( ) ; <nl> <nl> - if ( ! options . contains ( ImportFlags : : Testable ) | | <nl> + if ( ! import . options . contains ( ImportFlags : : Testable ) | | <nl> topLevelModule - > isTestingEnabled ( ) | | <nl> topLevelModule - > isNonSwiftModule ( ) | | <nl> ! ctx . LangOpts . EnableTestableAttrRequiresTestableModule ) <nl> void UnboundImport : : validateTestable ( ModuleDecl * topLevelModule ) { <nl> <nl> void UnboundImport : : validateResilience ( NullablePtr < ModuleDecl > topLevelModule , <nl> SourceFile & SF ) { <nl> - if ( options . contains ( ImportFlags : : ImplementationOnly ) ) <nl> + if ( import . options . contains ( ImportFlags : : ImplementationOnly ) ) <nl> return ; <nl> <nl> / / Per getTopLevelModule ( ) , we ' ll only get nullptr here for non - Swift modules , <nl> void UnboundImport : : validateResilience ( NullablePtr < ModuleDecl > topLevelModule , <nl> return ; <nl> <nl> ASTContext & ctx = SF . getASTContext ( ) ; <nl> - ctx . Diags . diagnose ( modulePath . front ( ) . Loc , <nl> + ctx . Diags . diagnose ( import . module . getModulePath ( ) . front ( ) . Loc , <nl> diag : : module_not_compiled_with_library_evolution , <nl> topLevelModule . get ( ) - > getName ( ) , <nl> SF . getParentModule ( ) - > getName ( ) ) ; <nl> void UnboundImport : : validateResilience ( NullablePtr < ModuleDecl > topLevelModule , <nl> void UnboundImport : : diagnoseInvalidAttr ( DeclAttrKind attrKind , <nl> DiagnosticEngine & diags , <nl> Diag < Identifier > diagID ) { <nl> - auto diag = diags . diagnose ( modulePath . front ( ) . Loc , diagID , <nl> - modulePath . front ( ) . Item ) ; <nl> + auto diag = diags . diagnose ( import . module . getModulePath ( ) . front ( ) . Loc , diagID , <nl> + import . module . getModulePath ( ) . front ( ) . Item ) ; <nl> <nl> auto * ID = getImportDecl ( ) . getPtrOrNull ( ) ; <nl> if ( ! ID ) return ; <nl> static bool canCrossImport ( const AttributedImport < ImportedModule > & import ) { <nl> return true ; <nl> } <nl> <nl> + static UnloadedImportedModule makeUnimportedCrossImportOverlay ( <nl> + ASTContext & ctx , <nl> + Identifier overlayName , <nl> + const UnboundImport & base , <nl> + const AttributedImport < ImportedModule > & declaringImport ) { <nl> + ImportPath : : Builder <nl> + builder ( overlayName , base . import . module . getModulePath ( ) [ 0 ] . Loc ) ; <nl> + <nl> + / / If the declaring import was scoped , inherit that scope in the overlay ' s <nl> + / / import . <nl> + llvm : : copy ( declaringImport . module . accessPath , std : : back_inserter ( builder ) ) ; <nl> + <nl> + / / Cross - imports are not backed by an ImportDecl , so we need to provide <nl> + / / our own storage for their module paths . <nl> + return UnloadedImportedModule ( builder . copyTo ( ctx ) , <nl> + / * isScoped = * / ! declaringImport . module . accessPath . empty ( ) ) ; <nl> + } <nl> + <nl> / / / Create an UnboundImport for a cross - import overlay . <nl> UnboundImport : : UnboundImport ( <nl> ASTContext & ctx , const UnboundImport & base , Identifier overlayName , <nl> const AttributedImport < ImportedModule > & declaringImport , <nl> const AttributedImport < ImportedModule > & bystandingImport ) <nl> - : importLoc ( base . importLoc ) , options ( ) , sourceFileArg ( ) , <nl> - / / Cross - imports are not backed by an ImportDecl , so we need to provide <nl> - / / our own storage for their module paths . <nl> - modulePath ( <nl> - ImportPath : : Module : : Builder ( overlayName , base . modulePath [ 0 ] . Loc ) <nl> - . copyTo ( ctx ) ) , <nl> - / / If the declaring import was scoped , inherit that scope in the <nl> - / / overlay ' s import . <nl> - accessPath ( declaringImport . module . accessPath ) , <nl> + : import ( makeUnimportedCrossImportOverlay ( ctx , overlayName , base , <nl> + declaringImport ) , { } ) , <nl> + importLoc ( base . importLoc ) , <nl> importOrUnderlyingModuleDecl ( declaringImport . module . importedModule ) <nl> { <nl> / / A cross - import is never private or testable , and never comes from a private <nl> UnboundImport : : UnboundImport ( <nl> / / If both are exported , the cross - import is exported . <nl> if ( declaringOptions . contains ( ImportFlags : : Exported ) & & <nl> bystandingOptions . contains ( ImportFlags : : Exported ) ) <nl> - options | = ImportFlags : : Exported ; <nl> + import . options | = ImportFlags : : Exported ; <nl> <nl> / / If either are implementation - only , the cross - import is <nl> / / implementation - only . <nl> if ( declaringOptions . contains ( ImportFlags : : ImplementationOnly ) | | <nl> bystandingOptions . contains ( ImportFlags : : ImplementationOnly ) ) <nl> - options | = ImportFlags : : ImplementationOnly ; <nl> + import . options | = ImportFlags : : ImplementationOnly ; <nl> } <nl> <nl> void ImportResolver : : crossImport ( ModuleDecl * M , UnboundImport & I ) { <nl> void ImportResolver : : findCrossImports ( <nl> name ) ; <nl> <nl> LLVM_DEBUG ( { <nl> - auto & crossImportOptions = unboundImports . back ( ) . options ; <nl> + auto & crossImportOptions = unboundImports . back ( ) . import . options ; <nl> llvm : : dbgs ( ) < < " " ; <nl> if ( crossImportOptions . contains ( ImportFlags : : Exported ) ) <nl> llvm : : dbgs ( ) < < " @ _exported " ; <nl> | [ NFC ] Use AttributedImport in import resolution | apple/swift | 8070e8aaedf662bceea1483840cf0f61d5a8b8a4 | 2020-10-10T01:58:03Z |
mmm a / xbmc / cores / dvdplayer / DVDCodecs / Video / DVDVideoCodecOpenMax . cpp <nl> ppp b / xbmc / cores / dvdplayer / DVDCodecs / Video / DVDVideoCodecOpenMax . cpp <nl> bool CDVDVideoCodecOpenMax : : Open ( CDVDStreamInfo & hints , CDVDCodecOptions & option <nl> } <nl> m_omx_input_port = port_param . nStartPortNumber ; <nl> m_omx_output_port = m_omx_input_port + 1 ; <nl> - # if defined ( OMX_DEBUG_VERBOSE ) <nl> + # if defined ( OMX_DEBUG_VERBOSE ) <nl> CLog : : Log ( LOGDEBUG , " % s - decoder_component ( 0x % p ) , input_port ( 0x % x ) , output_port ( 0x % x ) \ n " , <nl> __FUNCTION__ , m_omx_decoder , m_omx_input_port , m_omx_output_port ) ; <nl> - # endif <nl> + # endif <nl> <nl> / / TODO : Set role for the component because components could have multiple roles . <nl> <nl> int CDVDVideoCodecOpenMax : : Decode ( BYTE * pData , int iSize , double dts , double pts <nl> omx_buffer - > pAppPrivate = this ; <nl> omx_buffer - > nInputPortIndex = m_omx_input_port ; <nl> <nl> - # if defined ( OMX_DEBUG_EMPTYBUFFERDONE ) <nl> + # if defined ( OMX_DEBUG_EMPTYBUFFERDONE ) <nl> CLog : : Log ( LOGDEBUG , " % s - feeding decoder , omx_buffer - > pBuffer ( 0x % p ) , demuxer_bytes ( % d ) \ n " , <nl> __FUNCTION__ , omx_buffer - > pBuffer , demuxer_bytes ) ; <nl> - # endif <nl> + # endif <nl> / / Give this omx_buffer to OpenMax to be decoded . <nl> omx_err = OMX_EmptyThisBuffer ( m_omx_decoder , omx_buffer ) ; <nl> if ( omx_err ) <nl> int CDVDVideoCodecOpenMax : : Decode ( BYTE * pData , int iSize , double dts , double pts <nl> if ( m_omx_input_avaliable . empty ( ) & & ! m_demux_queue . empty ( ) ) <nl> m_input_consumed_event . WaitMSec ( 100 ) ; <nl> <nl> - # if defined ( OMX_DEBUG_VERBOSE ) <nl> + # if defined ( OMX_DEBUG_VERBOSE ) <nl> if ( m_omx_input_avaliable . empty ( ) ) <nl> CLog : : Log ( LOGDEBUG , " % s - buffering demux , m_demux_queue_size ( % d ) , demuxer_bytes ( % d ) \ n " , <nl> __FUNCTION__ , m_demux_queue . size ( ) , demuxer_bytes ) ; <nl> - # endif <nl> + # endif <nl> } <nl> <nl> if ( m_omx_output_ready . empty ( ) ) <nl> bool CDVDVideoCodecOpenMax : : GetPicture ( DVDVideoPicture * pDvdVideoPicture ) <nl> image_buffer + = chroma_pixels ; <nl> memcpy ( m_videobuffer . data [ 2 ] , image_buffer , chroma_pixels ) ; <nl> } <nl> - # if defined ( OMX_DEBUG_VERBOSE ) <nl> + # if defined ( OMX_DEBUG_VERBOSE ) <nl> else <nl> { <nl> - CLog : : Log ( LOGWARNING , " % s - nAllocLen ( % lu ) , nFilledLen ( % lu ) should be filled_size ( % lu ) \ n " , <nl> + CLog : : Log ( LOGDEBUG , " % s - nAllocLen ( % lu ) , nFilledLen ( % lu ) should be filled_size ( % lu ) \ n " , <nl> __FUNCTION__ , omx_buffer - > nAllocLen , omx_buffer - > nFilledLen , filled_size ) ; <nl> } <nl> - # endif <nl> + # endif <nl> <nl> / / release the omx buffer back to OpenMax to fill . <nl> OMX_ERRORTYPE omx_err = OMX_FillThisBuffer ( m_omx_decoder , omx_buffer ) ; <nl> - # if defined ( OMX_DEBUG_VERBOSE ) <nl> if ( omx_err ) <nl> - CLog : : Log ( LOGDEBUG , " % s - OMX_FillThisBuffer , omx_err ( 0x % x ) \ n " , __FUNCTION__ , omx_err ) ; <nl> + CLog : : Log ( LOGERROR , " % s - OMX_FillThisBuffer , omx_err ( 0x % x ) \ n " , __FUNCTION__ , omx_err ) ; <nl> } <nl> + # if defined ( OMX_DEBUG_VERBOSE ) <nl> else <nl> { <nl> CLog : : Log ( LOGDEBUG , " % s - called but m_omx_output_ready is empty \ n " , __FUNCTION__ ) ; <nl> - # endif <nl> } <nl> + # endif <nl> } <nl> <nl> / / copy out our current video buffer and update it ' s flags . <nl> OMX_ERRORTYPE CDVDVideoCodecOpenMax : : DecoderEventHandler ( <nl> CDVDVideoCodecOpenMax * ctx = ( CDVDVideoCodecOpenMax * ) pAppData ; <nl> <nl> / * <nl> - # if defined ( OMX_DEBUG_VERBOSE ) <nl> + # if defined ( OMX_DEBUG_VERBOSE ) <nl> CLog : : Log ( LOGDEBUG , " % s - hComponent ( 0x % p ) , eEvent ( 0x % x ) , nData1 ( 0x % lx ) , nData2 ( 0x % lx ) , pEventData ( 0x % p ) \ n " , <nl> __FUNCTION__ , hComponent , eEvent , nData1 , nData2 , pEventData ) ; <nl> - # endif <nl> + # endif <nl> * / <nl> <nl> switch ( eEvent ) <nl> OMX_ERRORTYPE CDVDVideoCodecOpenMax : : DecoderEventHandler ( <nl> case OMX_CommandStateSet : <nl> ctx - > m_omx_state = ( int ) nData2 ; <nl> sem_post ( ctx - > m_omx_state_change ) ; <nl> - # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> + # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> switch ( ctx - > m_omx_state ) <nl> { <nl> case OMX_StateInvalid : <nl> OMX_ERRORTYPE CDVDVideoCodecOpenMax : : DecoderEventHandler ( <nl> CLog : : Log ( LOGDEBUG , " % s - OMX_StateWaitForResources \ n " , __FUNCTION__ ) ; <nl> break ; <nl> } <nl> - # endif <nl> + # endif <nl> break ; <nl> case OMX_CommandFlush : <nl> / * <nl> OMX_ERRORTYPE CDVDVideoCodecOpenMax : : DecoderEventHandler ( <nl> else <nl> * / <nl> { <nl> + # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> CLog : : Log ( LOGDEBUG , " % s - OMX_CommandFlush , nData2 ( 0x % lx ) \ n " , __FUNCTION__ , nData2 ) ; <nl> + # endif <nl> } <nl> break ; <nl> case OMX_CommandPortDisable : <nl> - # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> + # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> CLog : : Log ( LOGDEBUG , " % s - OMX_CommandPortDisable , nData1 ( 0x % lx ) , nData2 ( 0x % lx ) \ n " , <nl> __FUNCTION__ , nData1 , nData2 ) ; <nl> - # endif <nl> + # endif <nl> if ( ctx - > m_omx_output_port = = ( int ) nData2 ) <nl> { <nl> / / Got OMX_CommandPortDisable event , alloc new buffers for the output port . <nl> OMX_ERRORTYPE CDVDVideoCodecOpenMax : : DecoderEventHandler ( <nl> } <nl> break ; <nl> case OMX_CommandPortEnable : <nl> - # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> + # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> CLog : : Log ( LOGDEBUG , " % s - OMX_CommandPortEnable , nData1 ( 0x % lx ) , nData2 ( 0x % lx ) \ n " , <nl> __FUNCTION__ , nData1 , nData2 ) ; <nl> - # endif <nl> + # endif <nl> if ( ctx - > m_omx_output_port = = ( int ) nData2 ) <nl> { <nl> / / Got OMX_CommandPortEnable event . <nl> OMX_ERRORTYPE CDVDVideoCodecOpenMax : : DecoderEventHandler ( <nl> ctx - > PrimeFillBuffers ( ) ; <nl> } <nl> break ; <nl> - # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> + # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> case OMX_CommandMarkBuffer : <nl> CLog : : Log ( LOGDEBUG , " % s - OMX_CommandMarkBuffer , nData1 ( 0x % lx ) , nData2 ( 0x % lx ) \ n " , <nl> __FUNCTION__ , nData1 , nData2 ) ; <nl> break ; <nl> - # endif <nl> + # endif <nl> } <nl> break ; <nl> case OMX_EventBufferFlag : <nl> if ( ctx - > m_omx_decoder = = hComponent & & ( nData2 & OMX_BUFFERFLAG_EOS ) ) { <nl> - # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> + # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> if ( ctx - > m_omx_input_port = = ( int ) nData1 ) <nl> CLog : : Log ( LOGDEBUG , " % s - OMX_EventBufferFlag ( input ) \ n " , __FUNCTION__ ) ; <nl> - # endif <nl> + # endif <nl> if ( ctx - > m_omx_output_port = = ( int ) nData1 ) <nl> { <nl> ctx - > m_videoplayback_done = true ; <nl> - # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> + # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> CLog : : Log ( LOGDEBUG , " % s - OMX_EventBufferFlag ( output ) \ n " , __FUNCTION__ ) ; <nl> - # endif <nl> + # endif <nl> } <nl> } <nl> break ; <nl> case OMX_EventPortSettingsChanged : <nl> - # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> - CLog : : Log ( LOGDEBUG , " % s - OMX_EventPortSettingsChanged ( output ) \ n " , __FUNCTION__ ) ; <nl> - # endif <nl> + # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> + CLog : : Log ( LOGDEBUG , " % s - OMX_EventPortSettingsChanged ( output ) \ n " , __FUNCTION__ ) ; <nl> + # endif <nl> / / not sure nData2 is the input / output ports in this call , docs don ' t say <nl> if ( ctx - > m_omx_output_port = = ( int ) nData2 ) <nl> { <nl> OMX_ERRORTYPE CDVDVideoCodecOpenMax : : DecoderEventHandler ( <nl> omx_err = OMX_SendCommand ( ctx - > m_omx_decoder , OMX_CommandPortDisable , ctx - > m_omx_output_port , NULL ) ; <nl> } <nl> break ; <nl> - # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> + # if defined ( OMX_DEBUG_EVENTHANDLER ) <nl> case OMX_EventMark : <nl> CLog : : Log ( LOGDEBUG , " % s - OMX_EventMark \ n " , __FUNCTION__ ) ; <nl> break ; <nl> case OMX_EventResourcesAcquired : <nl> CLog : : Log ( LOGDEBUG , " % s - OMX_EventResourcesAcquired \ n " , __FUNCTION__ ) ; <nl> break ; <nl> - # endif <nl> + # endif <nl> case OMX_EventError : <nl> switch ( ( OMX_S32 ) nData1 ) <nl> { <nl> OMX_ERRORTYPE CDVDVideoCodecOpenMax : : DecoderFillBufferDone ( <nl> OMX_PTR pAppData , <nl> OMX_BUFFERHEADERTYPE * pBufferHeader ) <nl> { <nl> - # if defined ( OMX_DEBUG_FILLBUFFERDONE ) <nl> + # if defined ( OMX_DEBUG_FILLBUFFERDONE ) <nl> CLog : : Log ( LOGDEBUG , " % s - buffer_size ( % lu ) , timestamp ( % f ) \ n " , <nl> __FUNCTION__ , pBufferHeader - > nFilledLen , ( double ) pBufferHeader - > nTimeStamp / 1000 . 0 ) ; <nl> - # endif <nl> + # endif <nl> CDVDVideoCodecOpenMax * ctx = ( CDVDVideoCodecOpenMax * ) pAppData ; <nl> <nl> / / queue output omx buffer to ready list . <nl> OMX_ERRORTYPE CDVDVideoCodecOpenMax : : AllocOMXInputBuffers ( void ) <nl> port_format . nPortIndex = m_omx_input_port ; <nl> OMX_GetParameter ( m_omx_decoder , OMX_IndexParamPortDefinition , & port_format ) ; <nl> <nl> - # if defined ( OMX_DEBUG_VERBOSE ) <nl> + # if defined ( OMX_DEBUG_VERBOSE ) <nl> CLog : : Log ( LOGDEBUG , " % s - iport ( % d ) , nBufferCountMin ( % lu ) , nBufferSize ( % lu ) \ n " , <nl> __FUNCTION__ , m_omx_input_port , port_format . nBufferCountMin , port_format . nBufferSize ) ; <nl> - # endif <nl> + # endif <nl> for ( size_t i = 0 ; i < port_format . nBufferCountMin ; i + + ) <nl> { <nl> OMX_BUFFERHEADERTYPE * buffer = NULL ; <nl> OMX_ERRORTYPE CDVDVideoCodecOpenMax : : AllocOMXOutputBuffers ( void ) <nl> port_format . nPortIndex = m_omx_output_port ; <nl> omx_err = OMX_GetParameter ( m_omx_decoder , OMX_IndexParamPortDefinition , & port_format ) ; <nl> <nl> - # if defined ( OMX_DEBUG_VERBOSE ) <nl> + # if defined ( OMX_DEBUG_VERBOSE ) <nl> CLog : : Log ( LOGDEBUG , <nl> " % s ( 1 ) - oport ( % d ) , nFrameWidth ( % lu ) , nFrameHeight ( % lu ) , nStride ( % lx ) , nBufferCountMin ( % lu ) , nBufferSize ( % lu ) \ n " , <nl> __FUNCTION__ , m_omx_output_port , <nl> port_format . format . video . nFrameWidth , port_format . format . video . nFrameHeight , port_format . format . video . nStride , <nl> port_format . nBufferCountMin , port_format . nBufferSize ) ; <nl> - # endif <nl> + # endif <nl> <nl> buffer_size = m_decoded_width * m_decoded_width ; <nl> if ( port_format . format . video . eColorFormat = = OMX_COLOR_FormatCbYCrY ) <nl> | [ arm / omx ] cosmetics , don ' t bust visual flow with # ifdefs | xbmc/xbmc | 1da25e014e5e4c8f453aa2ff828b4942bcfddbab | 2010-05-22T15:48:35Z |
mmm a / libs / libloggers / loggers / Loggers . cpp <nl> ppp b / libs / libloggers / loggers / Loggers . cpp <nl> void Loggers : : buildLoggers ( Poco : : Util : : AbstractConfiguration & config , Poco : : Log <nl> <nl> void Loggers : : setLoggerSensitiveDataMasker ( Poco : : Logger & logger , DB : : SensitiveDataMasker * sensitive_data_masker ) <nl> { <nl> - if ( auto split = dynamic_cast < DB : : OwnSplitChannel * > ( logger . getChannel ( ) ) ) { <nl> + if ( auto split = dynamic_cast < DB : : OwnSplitChannel * > ( logger . getChannel ( ) ) ) <nl> + { <nl> split - > setMasker ( sensitive_data_masker ) ; <nl> } <nl> } <nl> | Update Loggers . cpp | ClickHouse/ClickHouse | 7a6a6e093b93a7f343a8f9b4c026b081a31bf444 | 2019-09-03T19:46:49Z |
mmm a / db / db_test . cc <nl> ppp b / db / db_test . cc <nl> class DBTest { <nl> return static_cast < int > ( files . size ( ) ) ; <nl> } <nl> <nl> + int CountLiveFiles ( ) { <nl> + std : : vector < std : : string > files ; <nl> + uint64_t manifest_file_size ; <nl> + db_ - > GetLiveFiles ( files , & manifest_file_size ) ; <nl> + return files . size ( ) ; <nl> + } <nl> + <nl> uint64_t Size ( const Slice & start , const Slice & limit ) { <nl> Range r ( start , limit ) ; <nl> uint64_t size ; <nl> TEST ( DBTest , NonWritableFileSystem ) <nl> TEST ( DBTest , FilesDeletedAfterCompaction ) { <nl> ASSERT_OK ( Put ( " foo " , " v2 " ) ) ; <nl> Compact ( " a " , " z " ) ; <nl> - const int num_files = CountFiles ( ) ; <nl> + const int num_files = CountLiveFiles ( ) ; <nl> for ( int i = 0 ; i < 10 ; i + + ) { <nl> ASSERT_OK ( Put ( " foo " , " v2 " ) ) ; <nl> Compact ( " a " , " z " ) ; <nl> } <nl> - ASSERT_EQ ( CountFiles ( ) , num_files ) ; <nl> + ASSERT_EQ ( CountLiveFiles ( ) , num_files ) ; <nl> } <nl> <nl> TEST ( DBTest , BloomFilter ) { <nl> | Fix unit test failure caused by delaying deleting obsolete files . | facebook/rocksdb | 8eedf13a82a5e209bd5860f654bf0132b49c0be1 | 2012-10-26T15:42:05Z |
mmm a / include / swift / Demangling / Demangler . h <nl> ppp b / include / swift / Demangling / Demangler . h <nl> class Demangler : public NodeFactory { <nl> <nl> NodePointer demangleObjCTypeName ( ) ; <nl> <nl> + void dump ( ) ; <nl> + <nl> public : <nl> Demangler ( ) { } <nl> <nl> mmm a / lib / Demangling / NodeDumper . cpp <nl> ppp b / lib / Demangling / NodeDumper . cpp <nl> <nl> - / / = = = mmm NodeDumper . cpp - Swift Demangling Node Dumper mmmmmmmmmmmmmmmmmm - - = = = / / <nl> + / / = = = mmm NodeDumper . cpp - Swift Demangling Debug Dump Functions mmmmmmmmm - - = = = / / <nl> / / <nl> / / This source file is part of the Swift . org open source project <nl> / / <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> # include " swift / Demangling / Demangle . h " <nl> + # include " swift / Demangling / Demangler . h " <nl> # include < cstdio > <nl> <nl> using namespace swift ; <nl> void swift : : Demangle : : Node : : dump ( ) { <nl> std : : string TreeStr = getNodeTreeAsString ( this ) ; <nl> fputs ( TreeStr . c_str ( ) , stderr ) ; <nl> } <nl> + <nl> + void Demangler : : dump ( ) { <nl> + for ( unsigned Idx = 0 ; Idx < NodeStack . size ( ) ; + + Idx ) { <nl> + fprintf ( stderr , " NodeStack [ % u ] at position % zd : \ n " , Idx , NodeStack [ Idx ] . Pos ) ; <nl> + NodeStack [ Idx ] . Node - > dump ( ) ; <nl> + fprintf ( stderr , " \ n " ) ; <nl> + } <nl> + fprintf ( stderr , " Position = % zd : \ n % . * s \ n % * s \ n " , Pos , <nl> + ( int ) Text . size ( ) , Text . data ( ) , ( int ) Pos + 1 , " ^ " ) ; <nl> + } <nl> + <nl> | Demangler : add a debug dump function to print the internal state of the demangler . | apple/swift | 7dd2828d275d91c48eda81c0fa7a803a211bea2f | 2017-04-06T23:07:13Z |
mmm a / test / Compatibility / protocol_composition . swift <nl> ppp b / test / Compatibility / protocol_composition . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - typecheck - primary - file % t / swift3 . swift % t / common . swift - verify - swift - version 3 <nl> / / RUN : % target - swift - frontend - typecheck - primary - file % t / swift4 . swift % t / common . swift - verify - swift - version 4 <nl> <nl> mmm a / test / Compatibility / throws_identifier . swift <nl> ppp b / test / Compatibility / throws_identifier . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - parse - primary - file % t / swift3 . swift - verify - swift - version 3 <nl> / / RUN : % target - swift - frontend - parse - primary - file % t / swift4 . swift - verify - swift - version 4 <nl> <nl> mmm a / test / IRGen / cf . sil <nl> ppp b / test / IRGen / cf . sil <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / chex . py < % s > % t / cf . sil <nl> + / / RUN : % { python } % utils / chex . py < % s > % t / cf . sil <nl> / / RUN : % target - swift - frontend - assume - parsing - unqualified - ownership - sil - sdk % S / Inputs % t / cf . sil - emit - ir - import - cf - types | % FileCheck - - check - prefix = CHECK - - check - prefix = CHECK - % target - ptrsize % t / cf . sil - DINT = i % target - ptrsize <nl> <nl> / / REQUIRES : CPU = i386 | | CPU = x86_64 <nl> mmm a / test / IRGen / class_resilience . swift <nl> ppp b / test / IRGen / class_resilience . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / chex . py < % s > % t / class_resilience . swift <nl> + / / RUN : % { python } % utils / chex . py < % s > % t / class_resilience . swift <nl> / / RUN : % target - swift - frontend - emit - module - enable - resilience - enable - class - resilience - emit - module - path = % t / resilient_struct . swiftmodule - module - name = resilient_struct % S / . . / Inputs / resilient_struct . swift <nl> / / RUN : % target - swift - frontend - emit - module - enable - resilience - enable - class - resilience - emit - module - path = % t / resilient_enum . swiftmodule - module - name = resilient_enum - I % t % S / . . / Inputs / resilient_enum . swift <nl> / / RUN : % target - swift - frontend - emit - module - enable - resilience - enable - class - resilience - emit - module - path = % t / resilient_class . swiftmodule - module - name = resilient_class - I % t % S / . . / Inputs / resilient_class . swift <nl> mmm a / test / IRGen / generic_classes . sil <nl> ppp b / test / IRGen / generic_classes . sil <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / chex . py < % s > % t / generic_classes . sil <nl> + / / RUN : % { python } % utils / chex . py < % s > % t / generic_classes . sil <nl> / / RUN : % target - swift - frontend % t / generic_classes . sil - emit - ir | % FileCheck % t / generic_classes . sil - - check - prefix = CHECK - - check - prefix = CHECK - % target - runtime <nl> / / RUN : % target - swift - frontend - Osize % t / generic_classes . sil - emit - ir | % FileCheck % t / generic_classes . sil - - check - prefix = OSIZE <nl> <nl> mmm a / test / IRGen / generic_structs . sil <nl> ppp b / test / IRGen / generic_structs . sil <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / chex . py < % s > % t / generic_structs . sil <nl> + / / RUN : % { python } % utils / chex . py < % s > % t / generic_structs . sil <nl> / / RUN : % target - swift - frontend - assume - parsing - unqualified - ownership - sil % t / generic_structs . sil - emit - ir | % FileCheck % t / generic_structs . sil <nl> <nl> / / REQUIRES : CPU = x86_64 <nl> mmm a / test / IRGen / generic_vtable . swift <nl> ppp b / test / IRGen / generic_vtable . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / chex . py < % s > % t / generic_vtable . swift <nl> + / / RUN : % { python } % utils / chex . py < % s > % t / generic_vtable . swift <nl> / / RUN : % target - swift - frontend % t / generic_vtable . swift - emit - ir | % FileCheck % t / generic_vtable . swift - - check - prefix = CHECK <nl> <nl> / / REQUIRES : CPU = x86_64 <nl> mmm a / test / IRGen / keypaths . sil <nl> ppp b / test / IRGen / keypaths . sil <nl> <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> / / - - Convert < i32 0x . . . > constants to decimal constants that LLVM will print <nl> - / / RUN : % utils / chex . py < % s > % t / keypaths . sil <nl> + / / RUN : % { python } % utils / chex . py < % s > % t / keypaths . sil <nl> / / RUN : % target - swift - frontend - module - name keypaths - emit - ir % s | % FileCheck % t / keypaths . sil - - check - prefix = CHECK - - check - prefix = CHECK - % target - ptrsize - - check - prefix = CHECK - % target - os <nl> <nl> sil_stage canonical <nl> mmm a / test / IRGen / keypaths_objc . sil <nl> ppp b / test / IRGen / keypaths_objc . sil <nl> <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / chex . py < % s > % t / keypaths_objc . sil <nl> + / / RUN : % { python } % utils / chex . py < % s > % t / keypaths_objc . sil <nl> / / RUN : % target - swift - frontend ( mock - sdk : % clang - importer - sdk ) - emit - ir % t / keypaths_objc . sil | % FileCheck % t / keypaths_objc . sil - - check - prefix = CHECK - - check - prefix = CHECK - % target - ptrsize <nl> / / REQUIRES : objc_interop <nl> <nl> mmm a / test / IRGen / property_descriptor . sil <nl> ppp b / test / IRGen / property_descriptor . sil <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / chex . py < % s > % t / property_descriptor . sil <nl> + / / RUN : % { python } % utils / chex . py < % s > % t / property_descriptor . sil <nl> / / RUN : % target - swift - frontend - emit - ir % t / property_descriptor . sil | % FileCheck - - check - prefix = CHECK - % target - ptrsize - - check - prefix = CHECK % t / property_descriptor . sil <nl> <nl> sil_stage canonical <nl> mmm a / test / InterfaceHash / added_function . swift <nl> ppp b / test / InterfaceHash / added_function . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / added_method . swift <nl> ppp b / test / InterfaceHash / added_method . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / added_private_class_private_property . swift <nl> ppp b / test / InterfaceHash / added_private_class_private_property . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / added_private_class_property . swift <nl> ppp b / test / InterfaceHash / added_private_class_property . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / added_private_enum_private_property . swift <nl> ppp b / test / InterfaceHash / added_private_enum_private_property . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / added_private_enum_property . swift <nl> ppp b / test / InterfaceHash / added_private_enum_property . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / added_private_method . swift <nl> ppp b / test / InterfaceHash / added_private_method . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / added_private_method_value_types . swift <nl> ppp b / test / InterfaceHash / added_private_method_value_types . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / added_private_protocol_method . swift <nl> ppp b / test / InterfaceHash / added_private_protocol_method . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / added_private_protocol_property . swift <nl> ppp b / test / InterfaceHash / added_private_protocol_property . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / added_private_struct_private_property . swift <nl> ppp b / test / InterfaceHash / added_private_struct_private_property . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / added_private_struct_property . swift <nl> ppp b / test / InterfaceHash / added_private_struct_property . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / changed_private_var_type . swift <nl> ppp b / test / InterfaceHash / changed_private_var_type . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / changed_var_name . swift <nl> ppp b / test / InterfaceHash / changed_var_name . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / changed_var_type . swift <nl> ppp b / test / InterfaceHash / changed_var_type . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : not cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / edited_function_body . swift <nl> ppp b / test / InterfaceHash / edited_function_body . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / edited_method_body . swift <nl> ppp b / test / InterfaceHash / edited_method_body . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : cmp % t / a . hash % t / b . hash <nl> mmm a / test / InterfaceHash / edited_property_getter . swift <nl> ppp b / test / InterfaceHash / edited_property_getter . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / a . swift 2 > % t / a . hash <nl> / / RUN : % target - swift - frontend - dump - interface - hash % t / b . swift 2 > % t / b . hash <nl> / / RUN : cmp % t / a . hash % t / b . hash <nl> mmm a / test / Sema / accessibility_shared_private . swift <nl> ppp b / test / Sema / accessibility_shared_private . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - swift - version 4 - typecheck % t / declarations . swift % t / other_file_extensions . swift - verify <nl> <nl> / / BEGIN declarations . swift <nl> mmm a / test / attr / accessibility_multifile . swift <nl> ppp b / test / attr / accessibility_multifile . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> - / / RUN : % utils / split_file . py - o % t % s <nl> + / / RUN : % { python } % utils / split_file . py - o % t % s <nl> / / RUN : % target - swift - frontend - typecheck % t / file1 . swift - primary - file % t / file2 . swift - verify <nl> <nl> / / BEGIN file1 . swift <nl> mmm a / test / sil - passpipeline - dump / basic . test - sh <nl> ppp b / test / sil - passpipeline - dump / basic . test - sh <nl> <nl> / / RUN : % sil - passpipeline - dumper - Onone | % FileCheck % s <nl> - / / RUN : % sil - passpipeline - dumper - Onone | python - c ' import json ; import sys ; json . load ( sys . stdin ) ' <nl> + / / RUN : % sil - passpipeline - dumper - Onone | % { python } - c ' import json ; import sys ; json . load ( sys . stdin ) ' <nl> <nl> / / CHECK : [ <nl> / / CHECK : [ <nl> | Merge pull request from compnerd / python | apple/swift | 743f4984cbfa779318911979dd35a7ba035459a0 | 2018-04-24T02:59:47Z |
mmm a / arangod / Cluster / v8 - cluster . cpp <nl> ppp b / arangod / Cluster / v8 - cluster . cpp <nl> static void JS_GetAgency ( v8 : : FunctionCallbackInfo < v8 : : Value > const & args ) { <nl> / / / @ brief read transaction to the agency <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - static void JS_APIAgency ( std : : string const & interface , <nl> - v8 : : FunctionCallbackInfo < v8 : : Value > const & args ) { <nl> + static void JS_APIAgency ( std : : string const & method , <nl> + v8 : : FunctionCallbackInfo < v8 : : Value > const & args ) { <nl> TRI_V8_TRY_CATCH_BEGIN ( isolate ) <nl> v8 : : HandleScope scope ( isolate ) ; <nl> <nl> static void JS_APIAgency ( std : : string const & interface , <nl> comm . sendWithFailover ( <nl> arangodb : : rest : : RequestType : : POST , <nl> AgencyCommManager : : CONNECTION_OPTIONS . _requestTimeout , <nl> - std : : string ( " / _api / agency / " ) + interface , builder . toJson ( ) ) ; <nl> + std : : string ( " / _api / agency / " ) + method , builder . toJson ( ) ) ; <nl> <nl> if ( ! result . successful ( ) ) { <nl> THROW_AGENCY_EXCEPTION ( result ) ; <nl> | attempt to fix Windows build | arangodb/arangodb | 0070b40fbf9daa1e33644990c7cbc34dcc6814ad | 2017-01-04T08:08:13Z |
mmm a / tensorflow / core / graph / mkl_layout_pass . cc <nl> ppp b / tensorflow / core / graph / mkl_layout_pass . cc <nl> MklLayoutRewritePass : : CheckForNodeFusion ( Node * a ) const { <nl> / / <nl> <nl> std : : stack < Node * , std : : vector < Node * > > work_stack ; <nl> - std : : set < Node * > visited_nodes ; <nl> + std : : unordered_set < Node * > visited_nodes ; <nl> auto node_checker = fi - > node_checkers . begin ( ) ; <nl> <nl> Node * current_node = nullptr ; <nl> | Use std : : unordered_set instead of std : : set , for better performance . | tensorflow/tensorflow | a554e9d7f8dfcc562b568c678f93a88185d7dd05 | 2018-10-31T05:12:04Z |
mmm a / xbmc / FileSystem / AddonsDirectory . cpp <nl> ppp b / xbmc / FileSystem / AddonsDirectory . cpp <nl> bool CAddonsDirectory : : GetDirectory ( const CStdString & strPath , CFileItemList & it <nl> } <nl> else if ( path . GetHostName ( ) . Equals ( " repos " ) ) <nl> { <nl> - CAddonMgr : : Get ( ) . GetAddons ( ADDON_REPOSITORY , addons , CONTENT_NONE , true ) ; <nl> + CAddonMgr : : Get ( ) . GetAddons ( ADDON_REPOSITORY , addons , true ) ; <nl> } <nl> else if ( path . GetHostName ( ) . Equals ( " all " ) ) <nl> { <nl> mmm a / xbmc / FileSystem / PluginDirectory . cpp <nl> ppp b / xbmc / FileSystem / PluginDirectory . cpp <nl> bool CPluginDirectory : : RunScriptWithParams ( const CStdString & strPath ) <nl> return false ; <nl> } <nl> <nl> - bool CPluginDirectory : : HasPlugins ( const CONTENT_TYPE & type ) <nl> - { <nl> - return CAddonMgr : : Get ( ) . HasAddons ( ADDON_PLUGIN , type ) ; <nl> - } <nl> - <nl> bool CPluginDirectory : : WaitOnScriptResult ( const CStdString & scriptPath , const CStdString & scriptName ) <nl> { <nl> const unsigned int timeBeforeProgressBar = 1500 ; <nl> mmm a / xbmc / FileSystem / PluginDirectory . h <nl> ppp b / xbmc / FileSystem / PluginDirectory . h <nl> class CPluginDirectory : public IDirectory <nl> virtual bool IsAllowed ( const CStdString & strFile ) const { return true ; } ; <nl> virtual bool Exists ( const char * strPath ) { return true ; } <nl> static bool RunScriptWithParams ( const CStdString & strPath ) ; <nl> - static bool HasPlugins ( const CONTENT_TYPE & type ) ; <nl> bool StartScript ( const CStdString & strPath ) ; <nl> static bool GetPluginResult ( const CStdString & strPath , CFileItem & resultItem ) ; <nl> <nl> mmm a / xbmc / GUIDialogMediaSource . cpp <nl> ppp b / xbmc / GUIDialogMediaSource . cpp <nl> void CGUIDialogMediaSource : : OnPathBrowse ( int item ) <nl> extraShares . push_back ( share1 ) ; <nl> } <nl> / / add the plugins dir as needed <nl> - / * if ( ADDON : : CAddonMgr : : Get ( ) . HasAddons ( ADDON : : ADDON_PLUGIN , CONTENT_AUDIO ) ) <nl> + / * if ( ADDON : : CAddonMgr : : Get ( ) . HasAddons ( ADDON : : ADDON_PLUGIN ) ) <nl> { <nl> share1 . strPath = " plugin : / / music / " ; <nl> share1 . strName = g_localizeStrings . Get ( 1038 ) ; / / Music Plugins <nl> void CGUIDialogMediaSource : : OnPathBrowse ( int item ) <nl> extraShares . push_back ( share1 ) ; <nl> <nl> / / add the plugins dir as needed <nl> - / * if ( ADDON : : CAddonMgr : : Get ( ) . HasAddons ( ADDON : : ADDON_PLUGIN , CONTENT_VIDEO ) ) <nl> + / * if ( ADDON : : CAddonMgr : : Get ( ) . HasAddons ( ADDON : : ADDON_PLUGIN ) ) <nl> { <nl> share1 . strPath = " plugin : / / video / " ; <nl> share1 . strName = g_localizeStrings . Get ( 1037 ) ; / / Video Plugins <nl> void CGUIDialogMediaSource : : OnPathBrowse ( int item ) <nl> extraShares . push_back ( share1 ) ; <nl> <nl> / / add the plugins dir as needed <nl> - / * if ( ADDON : : CAddonMgr : : Get ( ) . HasAddons ( ADDON : : ADDON_PLUGIN , CONTENT_IMAGE ) ) <nl> + / * if ( ADDON : : CAddonMgr : : Get ( ) . HasAddons ( ADDON : : ADDON_PLUGIN ) ) <nl> { <nl> share1 . strPath = " plugin : / / pictures / " ; <nl> share1 . strName = g_localizeStrings . Get ( 1039 ) ; / / Picture Plugins <nl> void CGUIDialogMediaSource : : OnPathBrowse ( int item ) <nl> } <nl> else if ( m_type = = " programs " ) <nl> { <nl> - / * if ( ADDON : : CAddonMgr : : Get ( ) . HasAddons ( ADDON : : ADDON_PLUGIN , CONTENT_PROGRAM ) ) <nl> + / * if ( ADDON : : CAddonMgr : : Get ( ) . HasAddons ( ADDON : : ADDON_PLUGIN ) ) <nl> { <nl> CMediaSource share2 ; <nl> share2 . strPath = " plugin : / / programs / " ; <nl> mmm a / xbmc / GUIViewStateAddonBrowser . cpp <nl> ppp b / xbmc / GUIViewStateAddonBrowser . cpp <nl> VECSOURCES & CGUIViewStateAddonBrowser : : GetSources ( ) <nl> share . m_strThumbnailImage = " DefaultHardDisk . png " ; <nl> m_sources . push_back ( share ) ; <nl> } <nl> - if ( CAddonMgr : : Get ( ) . HasAddons ( ADDON_REPOSITORY , CONTENT_NONE , true ) ) <nl> + if ( CAddonMgr : : Get ( ) . HasAddons ( ADDON_REPOSITORY , true ) ) <nl> { <nl> CMediaSource share ; <nl> share . strPath = " addons : / / repos / " ; <nl> mmm a / xbmc / GUIWindowAddonBrowser . cpp <nl> ppp b / xbmc / GUIWindowAddonBrowser . cpp <nl> bool CGUIWindowAddonBrowser : : Update ( const CStdString & strDirectory ) <nl> return true ; <nl> } <nl> <nl> - bool CGUIWindowAddonBrowser : : SelectAddonID ( TYPE type , CONTENT_TYPE content , CStdString & addonID ) <nl> + bool CGUIWindowAddonBrowser : : SelectAddonID ( TYPE type , CStdString & addonID ) <nl> { <nl> CGUIDialogSelect * dialog = ( CGUIDialogSelect * ) g_windowManager . GetWindow ( WINDOW_DIALOG_SELECT ) ; <nl> if ( type = = ADDON_UNKNOWN | | ! dialog ) <nl> return false ; <nl> <nl> ADDON : : VECADDONS addons ; <nl> - CAddonMgr : : Get ( ) . GetAddons ( type , addons , content ) ; <nl> + CAddonMgr : : Get ( ) . GetAddons ( type , addons ) ; <nl> dialog - > SetHeading ( TranslateType ( type , true ) ) ; <nl> dialog - > Reset ( ) ; <nl> CFileItemList items ; <nl> mmm a / xbmc / GUIWindowAddonBrowser . h <nl> ppp b / xbmc / GUIWindowAddonBrowser . h <nl> class CGUIWindowAddonBrowser : <nl> <nl> static std : : pair < CFileOperationJob * , unsigned int > AddJob ( const CStdString & path ) ; <nl> <nl> - / * ! \ brief Popup a selection dialog with a list of addons satisfying content and type <nl> + / * ! \ brief Popup a selection dialog with a list of addons of the given type <nl> \ param type the type of addon wanted <nl> - \ param content the content of the addon - if set to CONTENT_NONE all addons will be retrieved <nl> \ param addonID [ out ] the addon ID of the selected item <nl> \ return true if an addon was selected , false if an error occurred or if the selection process was cancelled <nl> * / <nl> - static bool SelectAddonID ( ADDON : : TYPE type , CONTENT_TYPE content , CStdString & addonID ) ; <nl> + static bool SelectAddonID ( ADDON : : TYPE type , CStdString & addonID ) ; <nl> protected : <nl> void UnRegisterJob ( CFileOperationJob * job ) ; <nl> virtual void GetContextButtons ( int itemNumber , CContextButtons & buttons ) ; <nl> mmm a / xbmc / GUIWindowSettingsCategory . cpp <nl> ppp b / xbmc / GUIWindowSettingsCategory . cpp <nl> void CGUIWindowSettingsCategory : : FillInAddons ( CSettingAddon * pSetting , int contr <nl> pSetting - > m_entries . insert ( std : : make_pair ( " _virtual . fan " , g_localizeStrings . Get ( 20425 ) ) ) ; / / Fanart Slideshow <nl> } <nl> <nl> - CAddonMgr : : Get ( ) . GetAddons ( pSetting - > m_type , addons , pSetting - > m_content ) ; <nl> + CAddonMgr : : Get ( ) . GetAddons ( pSetting - > m_type , addons ) ; <nl> for ( IVECADDONS it = addons . begin ( ) ; it ! = addons . end ( ) ; it + + ) <nl> { <nl> AddonPtr addon = * it ; <nl> mmm a / xbmc / addons / AddonManager . cpp <nl> ppp b / xbmc / addons / AddonManager . cpp <nl> void CAddonMgr : : DeInit ( ) <nl> m_cpluff = NULL ; <nl> } <nl> <nl> - bool CAddonMgr : : HasAddons ( const TYPE & type , const CONTENT_TYPE & content / * = CONTENT_NONE * / , bool enabledOnly / * = true * / ) <nl> + bool CAddonMgr : : HasAddons ( const TYPE & type , bool enabledOnly / * = true * / ) <nl> { <nl> / / TODO : This isn ' t particularly efficient as we create an addon type for each addon using the Factory , just so <nl> / / we can check addon dependencies in the addon constructor . <nl> VECADDONS addons ; <nl> - return GetAddons ( type , addons , content , enabledOnly ) ; <nl> + return GetAddons ( type , addons , enabledOnly ) ; <nl> } <nl> <nl> bool CAddonMgr : : GetAllAddons ( VECADDONS & addons , bool enabledOnly / * = true * / ) <nl> bool CAddonMgr : : GetAllAddons ( VECADDONS & addons , bool enabledOnly / * = true * / ) <nl> if ( ADDON_REPOSITORY = = ( TYPE ) i ) <nl> continue ; <nl> VECADDONS temp ; <nl> - if ( CAddonMgr : : Get ( ) . GetAddons ( ( TYPE ) i , temp , CONTENT_NONE , enabledOnly ) ) <nl> + if ( CAddonMgr : : Get ( ) . GetAddons ( ( TYPE ) i , temp , enabledOnly ) ) <nl> addons . insert ( addons . end ( ) , temp . begin ( ) , temp . end ( ) ) ; <nl> } <nl> return ! addons . empty ( ) ; <nl> } <nl> <nl> - bool CAddonMgr : : GetAddons ( const TYPE & type , VECADDONS & addons , const CONTENT_TYPE & content / * = CONTENT_NONE * / , bool enabledOnly / * = true * / ) <nl> + bool CAddonMgr : : GetAddons ( const TYPE & type , VECADDONS & addons , bool enabledOnly / * = true * / ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> addons . clear ( ) ; <nl> bool CAddonMgr : : GetAddons ( const TYPE & type , VECADDONS & addons , const CONTENT_TYP <nl> for ( int i = 0 ; i < num ; i + + ) <nl> { <nl> AddonPtr addon ( Factory ( exts [ i ] ) ) ; <nl> - if ( addon & & ( content = = CONTENT_NONE | | addon - > Supports ( content ) ) ) <nl> + if ( addon ) <nl> addons . push_back ( addon ) ; <nl> } <nl> m_cpluff - > release_info ( m_cp_context , exts ) ; <nl> mmm a / xbmc / addons / AddonManager . h <nl> ppp b / xbmc / addons / AddonManager . h <nl> namespace ADDON <nl> / * Addon access * / <nl> bool GetDefault ( const TYPE & type , AddonPtr & addon ) ; <nl> bool GetAddon ( const CStdString & str , AddonPtr & addon , const TYPE & type = ADDON_UNKNOWN , bool enabledOnly = true ) ; <nl> - bool HasAddons ( const TYPE & type , const CONTENT_TYPE & content = CONTENT_NONE , bool enabledOnly = true ) ; <nl> - bool GetAddons ( const TYPE & type , VECADDONS & addons , const CONTENT_TYPE & content = CONTENT_NONE , bool enabled = true ) ; <nl> + bool HasAddons ( const TYPE & type , bool enabledOnly = true ) ; <nl> + bool GetAddons ( const TYPE & type , VECADDONS & addons , bool enabled = true ) ; <nl> bool GetAllAddons ( VECADDONS & addons , bool enabledOnly = true ) ; <nl> CStdString GetString ( const CStdString & id , const int number ) ; <nl> <nl> mmm a / xbmc / utils / Builtins . cpp <nl> ppp b / xbmc / utils / Builtins . cpp <nl> int CBuiltins : : Execute ( const CStdString & execString ) <nl> { <nl> int string = g_settings . TranslateSkinString ( params [ 0 ] ) ; <nl> ADDON : : TYPE type = TranslateType ( params [ 1 ] ) ; <nl> - CONTENT_TYPE content = ( params . size ( ) > 2 ) ? TranslateContent ( params [ 2 ] ) : CONTENT_NONE ; <nl> CStdString result ; <nl> - if ( CGUIWindowAddonBrowser : : SelectAddonID ( type , content , result ) ) <nl> + if ( CGUIWindowAddonBrowser : : SelectAddonID ( type , result ) ) <nl> { <nl> g_settings . SetSkinString ( string , result ) ; <nl> g_settings . Save ( ) ; <nl> | cleanup : Get rid of CONTENT_TYPE in most addonmanager functions ( and a few other orphaned functions ) . | xbmc/xbmc | a8af180d6beaef72e146be5318189dac5fb2c121 | 2010-05-28T02:40:03Z |
mmm a / extensions / assets - manager / Downloader . cpp <nl> ppp b / extensions / assets - manager / Downloader . cpp <nl> void Downloader : : groupBatchDownload ( const DownloadUnits & units ) <nl> FD_ZERO ( & fdread ) ; <nl> FD_ZERO ( & fdwrite ) ; <nl> FD_ZERO ( & fdexcep ) ; <nl> + / / FIXME : when jenkins migrate to ubuntu , we should remove this hack code <nl> # if ( CC_TARGET_PLATFORM = = CC_PLATFORM_LINUX ) <nl> curl_multi_fdset ( multi_handle , & fdread , & fdwrite , & fdexcep , & maxfd ) ; <nl> rc = select ( maxfd + 1 , & fdread , & fdwrite , & fdexcep , & select_tv ) ; <nl> | add fixme | cocos2d/cocos2d-x | 412e76a6264c6243f48ebfab67fcc86a00975137 | 2015-01-04T07:16:22Z |
mmm a / scene / 2d / cpu_particles_2d . h <nl> ppp b / scene / 2d / cpu_particles_2d . h <nl> class CPUParticles2D : public Node2D { <nl> const Particle * particles ; <nl> <nl> bool operator ( ) ( int p_a , int p_b ) const { <nl> - return particles [ p_a ] . time < particles [ p_b ] . time ; <nl> + return particles [ p_a ] . time > particles [ p_b ] . time ; <nl> } <nl> } ; <nl> <nl> | Reversed operator in SortLifetime fixing | godotengine/godot | 6a23eff748b671a0a34962356d8ac36626b90f5b | 2019-06-06T19:49:48Z |
mmm a / Installation / build . sh <nl> ppp b / Installation / build . sh <nl> case $ TRI_OS_LONG in <nl> LDD_INFO = " yes " <nl> ; ; <nl> <nl> - Linux - LinuxMint - 13 * ) <nl> - echo " Using configuration for LinuxMint 13 " <nl> - OPTIONS = " $ OPTIONS - - disable - mruby " <nl> + Linux - CentOS - 6 * ) <nl> + echo " Using configuration for Centos " <nl> + OPTIONS = " $ OPTIONS - - enable - all - in - one - libev - - enable - all - in - one - v8 - - enable - all - in - one - icu - - disable - mruby " <nl> LDD_INFO = " yes " <nl> ; ; <nl> <nl> - Linux - openSUSE - 12 * ) <nl> - echo " Using configuration for openSuSE 12 . X " <nl> - OPTIONS = " $ OPTIONS - - disable - mruby " <nl> + Linux - CentOS - 5 * ) <nl> + echo " Using configuration for Centos " <nl> + OPTIONS = " $ OPTIONS - - enable - all - in - one - libev - - enable - all - in - one - v8 - - enable - all - in - one - icu - - disable - mruby " <nl> LDD_INFO = " yes " <nl> + # bugfix for readline on CentOS 5 : <nl> + export READLINE_LDFLAGS = " - lncurses " <nl> ; ; <nl> <nl> - Linux - openSUSE - 11 * ) <nl> - echo " Using configuration for openSuSE 11 . X " <nl> - OPTIONS = " $ OPTIONS - - disable - mruby " <nl> - LDD_INFO = " yes " <nl> + Darwin * ) <nl> + echo " Using configuration for DARWIN " <nl> + CPPFLAGS = ' - isystem / usr / include - isystem / opt / local / include - Wno - deprecated - declarations ' <nl> + LDFLAGS = ' - L / usr / lib ' <nl> + OPTIONS = " $ OPTIONS - - enable - all - in - one - libev - - enable - all - in - one - v8 - - enable - all - in - one - icu - - disable - mruby " <nl> + # we need 64 bits <nl> + TRI_MACH = " x86_64 " <nl> + X = $ ( uname - r ) <nl> + OPTIONS = " $ OPTIONS - - build x86_64 - apple - darwin $ { X } " <nl> ; ; <nl> <nl> Linux - Debian - 6 * ) <nl> case $ TRI_OS_LONG in <nl> LDD_INFO = " yes " <nl> ; ; <nl> <nl> - Linux - CentOS - 6 * ) <nl> - echo " Using configuration for Centos " <nl> - OPTIONS = " $ OPTIONS - - enable - all - in - one - libev - - enable - all - in - one - v8 - - enable - all - in - one - icu - - disable - mruby " <nl> + Linux - Fedora * ) <nl> + echo " Using configuration for Fedora " <nl> + OPTIONS = " $ OPTIONS - - enable - all - in - one - libev - - disable - all - in - one - v8 - - disable - all - in - one - icu - - disable - mruby " <nl> LDD_INFO = " yes " <nl> ; ; <nl> <nl> - Linux - CentOS - 5 * ) <nl> - echo " Using configuration for Centos " <nl> - OPTIONS = " $ OPTIONS - - enable - all - in - one - libev - - enable - all - in - one - v8 - - enable - all - in - one - icu - - disable - mruby " <nl> + Linux - LinuxMint - 13 * ) <nl> + echo " Using configuration for LinuxMint 13 " <nl> + OPTIONS = " $ OPTIONS - - disable - mruby " <nl> + LDD_INFO = " yes " <nl> + ; ; <nl> + <nl> + Linux - openSUSE - 12 * ) <nl> + echo " Using configuration for openSuSE 12 . X " <nl> + OPTIONS = " $ OPTIONS - - enable - all - in - one - libev - - disable - all - in - one - v8 - - disable - all - in - one - icu - - disable - mruby " <nl> + LDD_INFO = " yes " <nl> + ; ; <nl> + <nl> + Linux - openSUSE - 11 * ) <nl> + echo " Using configuration for openSuSE 11 . X " <nl> + OPTIONS = " $ OPTIONS - - disable - mruby " <nl> LDD_INFO = " yes " <nl> - # bugfix for readline on CentOS 5 : <nl> - export READLINE_LDFLAGS = " - lncurses " <nl> ; ; <nl> <nl> Linux - Ubuntu - * ) <nl> case $ TRI_OS_LONG in <nl> LDD_INFO = " yes " <nl> ; ; <nl> <nl> - Darwin * ) <nl> - echo " Using configuration for DARWIN " <nl> - CPPFLAGS = ' - isystem / usr / include - isystem / opt / local / include - Wno - deprecated - declarations ' <nl> - LDFLAGS = ' - L / usr / lib ' <nl> - OPTIONS = " $ OPTIONS - - enable - all - in - one - libev - - enable - all - in - one - v8 - - enable - all - in - one - icu - - disable - mruby " <nl> - # we need 64 bits <nl> - TRI_MACH = " x86_64 " <nl> - X = $ ( uname - r ) <nl> - OPTIONS = " $ OPTIONS - - build x86_64 - apple - darwin $ { X } " <nl> - ; ; <nl> - <nl> * ) <nl> echo " Using default configuration " <nl> OPTIONS = " $ OPTIONS - - enable - error - on - warning " <nl> mmm a / Installation / packetize . sh <nl> ppp b / Installation / packetize . sh <nl> case $ TRI_OS_LONG in <nl> exit 0 <nl> ; ; <nl> <nl> - Linux - openSUSE - 12 * ) <nl> - echo " Using configuration for openSuSE 12 " <nl> + Linux - CentOS - * ) <nl> + echo " Using configuration for Centos " <nl> package_type = " rpm " <nl> - START_SCRIPT = " rc . arangod . OpenSuSE " <nl> - runlevels = " 035 " <nl> - docdir = $ { prefix } / share / doc / packages / $ { vers_dir } <nl> + START_SCRIPT = " rc . arangod . Centos " <nl> + runlevels = " 0235 " <nl> <nl> # exports for the epm configuration file <nl> - export use_systemd = " true " <nl> - install_message = " $ { install_message } $ { start_systemd_message } " <nl> + export chkconf = " true " <nl> + install_message = " $ { install_message } $ { start_initd_message } " <nl> ; ; <nl> <nl> - Linux - openSUSE * ) <nl> - echo " Using configuration for openSuSE " <nl> - package_type = " rpm " <nl> - START_SCRIPT = " rc . arangod . OpenSuSE " <nl> - runlevels = " 035 " <nl> - docdir = $ { prefix } / share / doc / packages / $ { vers_dir } <nl> + Darwin * ) <nl> + echo " Using configuration for DARWIN " <nl> + ostype = " macosx " <nl> + osvers = ` echo $ { RELEASE } | awk - F " . " ' { print $ 1 " . " $ 2 } ' ` <nl> + TRI_RELEASE = $ osvers <nl> + rusr = root <nl> + rgrp = wheel <nl> + susr = root <nl> + sgrp = wheel <nl> + package_type = " osx " <nl> <nl> - # exports for the epm configuration file <nl> - export insserv = " true " <nl> - install_message = " $ { install_message } $ { start_initd_message } " <nl> + # export " macosx " for the epm configuration file <nl> + export macosx = " true " <nl> ; ; <nl> <nl> Linux - Debian * ) <nl> case $ TRI_OS_LONG in <nl> <nl> ; ; <nl> <nl> - Linux - CentOS - * ) <nl> - echo " Using configuration for Centos " <nl> + Linux - Fedora * ) <nl> + echo " Using configuration for Fedora " <nl> package_type = " rpm " <nl> START_SCRIPT = " rc . arangod . Centos " <nl> - runlevels = " 0235 " <nl> + runlevels = " 035 " <nl> + docdir = $ { prefix } / share / doc / packages / $ { vers_dir } <nl> <nl> # exports for the epm configuration file <nl> - export chkconf = " true " <nl> - install_message = " $ { install_message } $ { start_initd_message } " <nl> + export use_systemd = " true " <nl> + install_message = " $ { install_message } $ { start_systemd_message } " <nl> ; ; <nl> <nl> - Linux - Ubuntu - * ) <nl> - echo " Using configuration for Ubuntu " <nl> + Linux - LinuxMint - * ) <nl> + echo " Using configuration for LinuxMint " <nl> package_type = " deb " <nl> START_SCRIPT = " rc . arangod . Ubuntu " <nl> runlevels = " 02345 " <nl> case $ TRI_OS_LONG in <nl> <nl> ; ; <nl> <nl> - Linux - LinuxMint - * ) <nl> - echo " Using configuration for LinuxMint " <nl> + Linux - openSUSE - 12 * ) <nl> + echo " Using configuration for openSuSE 12 " <nl> + package_type = " rpm " <nl> + START_SCRIPT = " rc . arangod . OpenSuSE " <nl> + runlevels = " 035 " <nl> + docdir = $ { prefix } / share / doc / packages / $ { vers_dir } <nl> + <nl> + # exports for the epm configuration file <nl> + export use_systemd = " true " <nl> + install_message = " $ { install_message } $ { start_systemd_message } " <nl> + ; ; <nl> + <nl> + Linux - openSUSE * ) <nl> + echo " Using configuration for openSuSE " <nl> + package_type = " rpm " <nl> + START_SCRIPT = " rc . arangod . OpenSuSE " <nl> + runlevels = " 035 " <nl> + docdir = $ { prefix } / share / doc / packages / $ { vers_dir } <nl> + <nl> + # exports for the epm configuration file <nl> + export insserv = " true " <nl> + install_message = " $ { install_message } $ { start_initd_message } " <nl> + ; ; <nl> + <nl> + Linux - Ubuntu - * ) <nl> + echo " Using configuration for Ubuntu " <nl> package_type = " deb " <nl> START_SCRIPT = " rc . arangod . Ubuntu " <nl> runlevels = " 02345 " <nl> case $ TRI_OS_LONG in <nl> <nl> ; ; <nl> <nl> - Darwin * ) <nl> - echo " Using configuration for DARWIN " <nl> - ostype = " macosx " <nl> - osvers = ` echo $ { RELEASE } | awk - F " . " ' { print $ 1 " . " $ 2 } ' ` <nl> - TRI_RELEASE = $ osvers <nl> - rusr = root <nl> - rgrp = wheel <nl> - susr = root <nl> - sgrp = wheel <nl> - package_type = " osx " <nl> - <nl> - # export " macosx " for the epm configuration file <nl> - export macosx = " true " <nl> - ; ; <nl> - <nl> * ) <nl> echo " Using default configuration " <nl> ; ; <nl> export systemddir <nl> echo <nl> echo " # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # " <nl> echo " Call EPM to build the package . " <nl> - echo " sudo - E epm - a $ { EPM_MACH } - f $ { package_type } $ { product_name } $ { sfolder_name } / $ { LIST } " <nl> + echo " sudo - E epm - a $ { TRI_MACH } - f $ { package_type } $ { product_name } $ { sfolder_name } / $ { LIST } " <nl> sudo - E epm - a $ { TRI_MACH } - f $ { package_type } $ { product_name } $ { sfolder_name } / $ { LIST } | | exit 1 <nl> echo " # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # " <nl> echo <nl> | added fedora | arangodb/arangodb | 1d2757323bce83e50387054c5f3b25d9a99ced93 | 2013-02-20T15:06:23Z |
similarity index 77 % <nl> rename from trunk / CMakeLists . txt <nl> rename to trunk / ide / srs_cmake / CMakeLists . txt <nl> mmm a / trunk / CMakeLists . txt <nl> ppp b / trunk / ide / srs_cmake / CMakeLists . txt <nl> <nl> cmake_minimum_required ( VERSION 2 . 6 . 4 ) <nl> project ( srs CXX ) <nl> <nl> - INCLUDE_DIRECTORIES ( objs objs / st objs / hp objs / openssl / include src / core src / kernel src / rtmp src / app ) <nl> + INCLUDE_DIRECTORIES ( . . / . . / objs <nl> + . . / . . / objs / st . . / . . / objs / hp . . / . . / objs / openssl / include <nl> + . . / . . / src / core . . / . . / src / kernel . . / . . / src / rtmp . . / . . / src / app ) <nl> <nl> - set ( SOURCE_FILES src / main / srs_main_server . cpp ) <nl> - AUX_SOURCE_DIRECTORY ( src / core SOURCE_FILES ) <nl> - AUX_SOURCE_DIRECTORY ( src / kernel SOURCE_FILES ) <nl> - AUX_SOURCE_DIRECTORY ( src / rtmp SOURCE_FILES ) <nl> - AUX_SOURCE_DIRECTORY ( src / app SOURCE_FILES ) <nl> + set ( SOURCE_FILES . . / . . / src / main / srs_main_server . cpp ) <nl> + AUX_SOURCE_DIRECTORY ( . . / . . / src / core SOURCE_FILES ) <nl> + AUX_SOURCE_DIRECTORY ( . . / . . / src / kernel SOURCE_FILES ) <nl> + AUX_SOURCE_DIRECTORY ( . . / . . / src / rtmp SOURCE_FILES ) <nl> + AUX_SOURCE_DIRECTORY ( . . / . . / src / app SOURCE_FILES ) <nl> + <nl> + ADD_DEFINITIONS ( " - g - O0 " ) <nl> <nl> ADD_EXECUTABLE ( srs $ { SOURCE_FILES } ) <nl> TARGET_LINK_LIBRARIES ( srs dl ) <nl> - TARGET_LINK_LIBRARIES ( srs $ { PROJECT_SOURCE_DIR } / objs / st / libst . a ) <nl> - TARGET_LINK_LIBRARIES ( srs $ { PROJECT_SOURCE_DIR } / objs / openssl / lib / libssl . a ) <nl> - TARGET_LINK_LIBRARIES ( srs $ { PROJECT_SOURCE_DIR } / objs / openssl / lib / libcrypto . a ) <nl> - TARGET_LINK_LIBRARIES ( srs $ { PROJECT_SOURCE_DIR } / objs / hp / libhttp_parser . a ) <nl> + TARGET_LINK_LIBRARIES ( srs $ { PROJECT_SOURCE_DIR } / . . / . . / objs / st / libst . a ) <nl> + TARGET_LINK_LIBRARIES ( srs $ { PROJECT_SOURCE_DIR } / . . / . . / objs / openssl / lib / libssl . a ) <nl> + TARGET_LINK_LIBRARIES ( srs $ { PROJECT_SOURCE_DIR } / . . / . . / objs / openssl / lib / libcrypto . a ) <nl> + TARGET_LINK_LIBRARIES ( srs $ { PROJECT_SOURCE_DIR } / . . / . . / objs / hp / libhttp_parser . a ) <nl> TARGET_LINK_LIBRARIES ( srs - ldl ) <nl> <nl> - IF ( NOT EXISTS $ { PROJECT_SOURCE_DIR } / objs / st / libst . a ) <nl> + IF ( NOT EXISTS $ { PROJECT_SOURCE_DIR } / . . / . . / objs / st / libst . a ) <nl> MESSAGE ( " srs_libs not found " ) <nl> - EXEC_PROGRAM ( . / configure ) <nl> - ENDIF ( NOT EXISTS $ { PROJECT_SOURCE_DIR } / objs / st / libst . a ) <nl> + EXEC_PROGRAM ( " cd . . & & . / configure " ) <nl> + ELSE ( NOT EXISTS $ { PROJECT_SOURCE_DIR } / . . / . . / objs / st / libst . a ) <nl> + MESSAGE ( " srs_libs is ok " ) <nl> + ENDIF ( NOT EXISTS $ { PROJECT_SOURCE_DIR } / . . / . . / objs / st / libst . a ) <nl> <nl> MESSAGE ( STATUS " only for jetbrains IDE , @ see https : / / github . com / winlinvip / simple - rtmp - server / wiki / v1_CN_IDE # jetbrains " ) <nl> MESSAGE ( STATUS " only for jetbrains IDE , @ see https : / / github . com / winlinvip / simple - rtmp - server / wiki / v1_CN_IDE # jetbrains " ) <nl> new file mode 100755 <nl> index 000000000 . . 80240165e <nl> mmm / dev / null <nl> ppp b / trunk / ide / srs_qt / srs - qt . pro <nl> <nl> + TEMPLATE = app <nl> + CONFIG + = console <nl> + CONFIG - = app_bundle <nl> + CONFIG - = qt <nl> + <nl> + HEADERS + = \ <nl> + . . / . . / src / core / * . hpp \ <nl> + . . / . . / src / kernel / * . hpp \ <nl> + . . / . . / src / app / * . hpp \ <nl> + . . / . . / src / rtmp / * . hpp <nl> + <nl> + SOURCES + = \ <nl> + . . / . . / src / core / * . cpp \ <nl> + . . / . . / src / kernel / * . cpp \ <nl> + . . / . . / src / app / * . cpp \ <nl> + . . / . . / src / rtmp / * . cpp \ <nl> + . . / . . / src / main / * . cpp <nl> + <nl> + INCLUDEPATH + = \ <nl> + . . / . . / src / core \ <nl> + . . / . . / src / kernel \ <nl> + . . / . . / src / app \ <nl> + . . / . . / src / rtmp \ <nl> + . . / . . / objs \ <nl> + . . / . . / objs / st \ <nl> + . . / . . / objs / hp \ <nl> + . . / . . / objs / openssl / include <nl> + <nl> + LIBS + = \ <nl> + . . / . . / objs / st / libst . a \ <nl> + . . / . . / objs / hp / libhttp_parser . a \ <nl> + . . / . . / objs / openssl / lib / libssl . a \ <nl> + . . / . . / objs / openssl / lib / libcrypto . a \ <nl> + - ldl <nl> + <nl> similarity index 100 % <nl> rename from trunk / src / qt / srs / srs - qt . pro . user <nl> rename to trunk / ide / srs_qt / srs - qt . pro . user <nl> similarity index 100 % <nl> rename from trunk / src / srs / init <nl> rename to trunk / ide / srs_upp / init <nl> new file mode 100755 <nl> index 000000000 . . 14a1d6645 <nl> mmm / dev / null <nl> ppp b / trunk / ide / srs_upp / srs_upp . upp <nl> <nl> + file <nl> + main readonly separator , <nl> + . . / . . / src / main / srs_main_server . cpp , <nl> + auto readonly separator , <nl> + . . / . . / objs / srs_auto_headers . hpp , <nl> + libs readonly separator , <nl> + . . / . . / src / libs / srs_librtmp . hpp , <nl> + . . / . . / src / libs / srs_librtmp . cpp , <nl> + . . / . . / src / libs / srs_lib_bandwidth . hpp , <nl> + . . / . . / src / libs / srs_lib_bandwidth . cpp , <nl> + . . / . . / src / libs / srs_lib_simple_socket . hpp , <nl> + . . / . . / src / libs / srs_lib_simple_socket . cpp , <nl> + core readonly separator , <nl> + . . / . . / src / core / srs_core . hpp , <nl> + . . / . . / src / core / srs_core . cpp , <nl> + . . / . . / src / core / srs_core_autofree . hpp , <nl> + . . / . . / src / core / srs_core_autofree . cpp , <nl> + . . / . . / src / core / srs_core_performance . hpp , <nl> + . . / . . / src / core / srs_core_performance . cpp , <nl> + kernel readonly separator , <nl> + . . / . . / src / kernel / srs_kernel_aac . hpp , <nl> + . . / . . / src / kernel / srs_kernel_aac . cpp , <nl> + . . / . . / src / kernel / srs_kernel_codec . hpp , <nl> + . . / . . / src / kernel / srs_kernel_codec . cpp , <nl> + . . / . . / src / kernel / srs_kernel_consts . hpp , <nl> + . . / . . / src / kernel / srs_kernel_consts . cpp , <nl> + . . / . . / src / kernel / srs_kernel_error . hpp , <nl> + . . / . . / src / kernel / srs_kernel_error . cpp , <nl> + . . / . . / src / kernel / srs_kernel_file . hpp , <nl> + . . / . . / src / kernel / srs_kernel_file . cpp , <nl> + . . / . . / src / kernel / srs_kernel_flv . hpp , <nl> + . . / . . / src / kernel / srs_kernel_flv . cpp , <nl> + . . / . . / src / kernel / srs_kernel_log . hpp , <nl> + . . / . . / src / kernel / srs_kernel_log . cpp , <nl> + . . / . . / src / kernel / srs_kernel_mp3 . hpp , <nl> + . . / . . / src / kernel / srs_kernel_mp3 . cpp , <nl> + . . / . . / src / kernel / srs_kernel_stream . hpp , <nl> + . . / . . / src / kernel / srs_kernel_stream . cpp , <nl> + . . / . . / src / kernel / srs_kernel_utility . hpp , <nl> + . . / . . / src / kernel / srs_kernel_utility . cpp , <nl> + rtmp - protocol readonly separator , <nl> + . . / . . / src / rtmp / srs_protocol_amf0 . hpp , <nl> + . . / . . / src / rtmp / srs_protocol_amf0 . cpp , <nl> + . . / . . / src / rtmp / srs_protocol_buffer . hpp , <nl> + . . / . . / src / rtmp / srs_protocol_buffer . cpp , <nl> + . . / . . / src / rtmp / srs_protocol_handshake . hpp , <nl> + . . / . . / src / rtmp / srs_protocol_handshake . cpp , <nl> + . . / . . / src / rtmp / srs_protocol_io . hpp , <nl> + . . / . . / src / rtmp / srs_protocol_io . cpp , <nl> + . . / . . / src / rtmp / srs_protocol_msg_array . hpp , <nl> + . . / . . / src / rtmp / srs_protocol_msg_array . cpp , <nl> + . . / . . / src / rtmp / srs_protocol_rtmp . hpp , <nl> + . . / . . / src / rtmp / srs_protocol_rtmp . cpp , <nl> + . . / . . / src / rtmp / srs_protocol_stack . hpp , <nl> + . . / . . / src / rtmp / srs_protocol_stack . cpp , <nl> + . . / . . / src / rtmp / srs_protocol_utility . hpp , <nl> + . . / . . / src / rtmp / srs_protocol_utility . cpp , <nl> + app readonly separator , <nl> + . . / . . / src / app / srs_app_avc_aac . hpp , <nl> + . . / . . / src / app / srs_app_avc_aac . cpp , <nl> + . . / . . / src / app / srs_app_bandwidth . hpp , <nl> + . . / . . / src / app / srs_app_bandwidth . cpp , <nl> + . . / . . / src / app / srs_app_conn . hpp , <nl> + . . / . . / src / app / srs_app_conn . cpp , <nl> + . . / . . / src / app / srs_app_config . hpp , <nl> + . . / . . / src / app / srs_app_config . cpp , <nl> + . . / . . / src / app / srs_app_dvr . hpp , <nl> + . . / . . / src / app / srs_app_dvr . cpp , <nl> + . . / . . / src / app / srs_app_edge . hpp , <nl> + . . / . . / src / app / srs_app_edge . cpp , <nl> + . . / . . / src / app / srs_app_empty . hpp , <nl> + . . / . . / src / app / srs_app_empty . cpp , <nl> + . . / . . / src / app / srs_app_encoder . hpp , <nl> + . . / . . / src / app / srs_app_encoder . cpp , <nl> + . . / . . / src / app / srs_app_ffmpeg . hpp , <nl> + . . / . . / src / app / srs_app_ffmpeg . cpp , <nl> + . . / . . / src / app / srs_app_forward . hpp , <nl> + . . / . . / src / app / srs_app_forward . cpp , <nl> + . . / . . / src / app / srs_app_heartbeat . hpp , <nl> + . . / . . / src / app / srs_app_heartbeat . cpp , <nl> + . . / . . / src / app / srs_app_hls . hpp , <nl> + . . / . . / src / app / srs_app_hls . cpp , <nl> + . . / . . / src / app / srs_app_http . hpp , <nl> + . . / . . / src / app / srs_app_http . cpp , <nl> + . . / . . / src / app / srs_app_http_api . hpp , <nl> + . . / . . / src / app / srs_app_http_api . cpp , <nl> + . . / . . / src / app / srs_app_http_client . hpp , <nl> + . . / . . / src / app / srs_app_http_client . cpp , <nl> + . . / . . / src / app / srs_app_http_conn . hpp , <nl> + . . / . . / src / app / srs_app_http_conn . cpp , <nl> + . . / . . / src / app / srs_app_http_hooks . hpp , <nl> + . . / . . / src / app / srs_app_http_hooks . cpp , <nl> + . . / . . / src / app / srs_app_ingest . hpp , <nl> + . . / . . / src / app / srs_app_ingest . cpp , <nl> + . . / . . / src / app / srs_app_json . hpp , <nl> + . . / . . / src / app / srs_app_json . cpp , <nl> + . . / . . / src / app / srs_app_kbps . hpp , <nl> + . . / . . / src / app / srs_app_kbps . cpp , <nl> + . . / . . / src / app / srs_app_log . hpp , <nl> + . . / . . / src / app / srs_app_log . cpp , <nl> + . . / . . / src / app / srs_app_recv_thread . hpp , <nl> + . . / . . / src / app / srs_app_recv_thread . cpp , <nl> + . . / . . / src / app / srs_app_refer . hpp , <nl> + . . / . . / src / app / srs_app_refer . cpp , <nl> + . . / . . / src / app / srs_app_reload . hpp , <nl> + . . / . . / src / app / srs_app_reload . cpp , <nl> + . . / . . / src / app / srs_app_rtmp_conn . hpp , <nl> + . . / . . / src / app / srs_app_rtmp_conn . cpp , <nl> + . . / . . / src / app / srs_app_pithy_print . hpp , <nl> + . . / . . / src / app / srs_app_pithy_print . cpp , <nl> + . . / . . / src / app / srs_app_security . hpp , <nl> + . . / . . / src / app / srs_app_security . cpp , <nl> + . . / . . / src / app / srs_app_server . hpp , <nl> + . . / . . / src / app / srs_app_server . cpp , <nl> + . . / . . / src / app / srs_app_st . hpp , <nl> + . . / . . / src / app / srs_app_st . cpp , <nl> + . . / . . / src / app / srs_app_st_socket . hpp , <nl> + . . / . . / src / app / srs_app_st_socket . cpp , <nl> + . . / . . / src / app / srs_app_statistic . hpp , <nl> + . . / . . / src / app / srs_app_statistic . cpp , <nl> + . . / . . / src / app / srs_app_source . hpp , <nl> + . . / . . / src / app / srs_app_source . cpp , <nl> + . . / . . / src / app / srs_app_thread . hpp , <nl> + . . / . . / src / app / srs_app_thread . cpp , <nl> + . . / . . / src / app / srs_app_utility . hpp , <nl> + . . / . . / src / app / srs_app_utility . cpp , <nl> + utest readonly separator , <nl> + . . / . . / src / utest / srs_utest . hpp , <nl> + . . / . . / src / utest / srs_utest . cpp , <nl> + . . / . . / src / utest / srs_utest_amf0 . hpp , <nl> + . . / . . / src / utest / srs_utest_amf0 . cpp , <nl> + . . / . . / src / utest / srs_utest_config . hpp , <nl> + . . / . . / src / utest / srs_utest_config . cpp , <nl> + . . / . . / src / utest / srs_utest_core . hpp , <nl> + . . / . . / src / utest / srs_utest_core . cpp , <nl> + . . / . . / src / utest / srs_utest_kernel . hpp , <nl> + . . / . . / src / utest / srs_utest_kernel . cpp , <nl> + . . / . . / src / utest / srs_utest_protocol . hpp , <nl> + . . / . . / src / utest / srs_utest_protocol . cpp , <nl> + . . / . . / src / utest / srs_utest_reload . hpp , <nl> + . . / . . / src / utest / srs_utest_reload . cpp , <nl> + research readonly separator , <nl> + . . / . . / research / librtmp / srs_aac_raw_publish . c , <nl> + . . / . . / research / librtmp / srs_audio_raw_publish . c , <nl> + . . / . . / research / librtmp / srs_bandwidth_check . c , <nl> + . . / . . / research / librtmp / srs_detect_rtmp . c , <nl> + . . / . . / research / librtmp / srs_flv_injecter . c , <nl> + . . / . . / research / librtmp / srs_flv_parser . c , <nl> + . . / . . / research / librtmp / srs_h264_raw_publish . c , <nl> + . . / . . / research / librtmp / srs_ingest_flv . c , <nl> + . . / . . / research / librtmp / srs_ingest_rtmp . c , <nl> + . . / . . / research / librtmp / srs_play . c , <nl> + . . / . . / research / librtmp / srs_publish . c , <nl> + . . / . . / research / librtmp / srs_rtmp_dump . c , <nl> + . . / . . / research / hls / ts_info . cc ; <nl> + <nl> + mainconfig <nl> + " " = " MAIN " ; <nl> + <nl> new file mode 100644 <nl> index 000000000 . . 83887053b <nl> mmm / dev / null <nl> ppp b / trunk / ide / srs_vs2010 / srs . sln <nl> <nl> + <nl> + Microsoft Visual Studio Solution File , Format Version 11 . 00 <nl> + # Visual Studio 2010 <nl> + Project ( " { 8BC9CEB8 - 8B4A - 11D0 - 8D11 - 00A0C91BC942 } " ) = " srs " , " srs . vcxproj " , " { 74591348 - C63A - 4E00 - B85E - 62A9D8544F6F } " <nl> + EndProject <nl> + Global <nl> + GlobalSection ( SolutionConfigurationPlatforms ) = preSolution <nl> + Debug | Win32 = Debug | Win32 <nl> + Release | Win32 = Release | Win32 <nl> + EndGlobalSection <nl> + GlobalSection ( ProjectConfigurationPlatforms ) = postSolution <nl> + { 74591348 - C63A - 4E00 - B85E - 62A9D8544F6F } . Debug | Win32 . ActiveCfg = Debug | Win32 <nl> + { 74591348 - C63A - 4E00 - B85E - 62A9D8544F6F } . Debug | Win32 . Build . 0 = Debug | Win32 <nl> + { 74591348 - C63A - 4E00 - B85E - 62A9D8544F6F } . Release | Win32 . ActiveCfg = Release | Win32 <nl> + { 74591348 - C63A - 4E00 - B85E - 62A9D8544F6F } . Release | Win32 . Build . 0 = Release | Win32 <nl> + EndGlobalSection <nl> + GlobalSection ( SolutionProperties ) = preSolution <nl> + HideSolutionNode = FALSE <nl> + EndGlobalSection <nl> + EndGlobal <nl> new file mode 100755 <nl> index 000000000 . . da2e0f92c <nl> mmm / dev / null <nl> ppp b / trunk / ide / srs_vs2010 / srs . vcxproj <nl> <nl> + < ? xml version = " 1 . 0 " encoding = " utf - 8 " ? > <nl> + < Project DefaultTargets = " Build " ToolsVersion = " 4 . 0 " xmlns = " http : / / schemas . microsoft . com / developer / msbuild / 2003 " > <nl> + < ItemGroup Label = " ProjectConfigurations " > <nl> + < ProjectConfiguration Include = " Debug | Win32 " > <nl> + < Configuration > Debug < / Configuration > <nl> + < Platform > Win32 < / Platform > <nl> + < / ProjectConfiguration > <nl> + < ProjectConfiguration Include = " Release | Win32 " > <nl> + < Configuration > Release < / Configuration > <nl> + < Platform > Win32 < / Platform > <nl> + < / ProjectConfiguration > <nl> + < / ItemGroup > <nl> + < PropertyGroup Label = " Globals " > <nl> + < ProjectGuid > { 74591348 - C63A - 4E00 - B85E - 62A9D8544F6F } < / ProjectGuid > <nl> + < RootNamespace > srs < / RootNamespace > <nl> + < / PropertyGroup > <nl> + < Import Project = " $ ( VCTargetsPath ) \ Microsoft . Cpp . Default . props " / > <nl> + < PropertyGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Debug | Win32 ' " Label = " Configuration " > <nl> + < ConfigurationType > Application < / ConfigurationType > <nl> + < UseDebugLibraries > true < / UseDebugLibraries > <nl> + < CharacterSet > MultiByte < / CharacterSet > <nl> + < / PropertyGroup > <nl> + < PropertyGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Release | Win32 ' " Label = " Configuration " > <nl> + < ConfigurationType > Application < / ConfigurationType > <nl> + < UseDebugLibraries > false < / UseDebugLibraries > <nl> + < WholeProgramOptimization > true < / WholeProgramOptimization > <nl> + < CharacterSet > MultiByte < / CharacterSet > <nl> + < / PropertyGroup > <nl> + < Import Project = " $ ( VCTargetsPath ) \ Microsoft . Cpp . props " / > <nl> + < ImportGroup Label = " ExtensionSettings " > <nl> + < / ImportGroup > <nl> + < ImportGroup Label = " PropertySheets " Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Debug | Win32 ' " > <nl> + < Import Project = " $ ( UserRootDir ) \ Microsoft . Cpp . $ ( Platform ) . user . props " Condition = " exists ( ' $ ( UserRootDir ) \ Microsoft . Cpp . $ ( Platform ) . user . props ' ) " Label = " LocalAppDataPlatform " / > <nl> + < / ImportGroup > <nl> + < ImportGroup Label = " PropertySheets " Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Release | Win32 ' " > <nl> + < Import Project = " $ ( UserRootDir ) \ Microsoft . Cpp . $ ( Platform ) . user . props " Condition = " exists ( ' $ ( UserRootDir ) \ Microsoft . Cpp . $ ( Platform ) . user . props ' ) " Label = " LocalAppDataPlatform " / > <nl> + < / ImportGroup > <nl> + < PropertyGroup Label = " UserMacros " / > <nl> + < PropertyGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Release | Win32 ' " > <nl> + < IncludePath > $ ( ProjectDir ) / . . / . . / src / core ; $ ( ProjectDir ) / . . / . . / src / kernel ; $ ( ProjectDir ) / . . / . . / src / rtmp ; $ ( ProjectDir ) / . . / . . / src / app ; $ ( ProjectDir ) / . . / . . / src / libs ; $ ( ProjectDir ) / . . / . . / objs ; $ ( IncludePath ) < / IncludePath > <nl> + < / PropertyGroup > <nl> + < ItemDefinitionGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Debug | Win32 ' " > <nl> + < ClCompile > <nl> + < WarningLevel > Level3 < / WarningLevel > <nl> + < Optimization > Disabled < / Optimization > <nl> + < / ClCompile > <nl> + < Link > <nl> + < GenerateDebugInformation > true < / GenerateDebugInformation > <nl> + < / Link > <nl> + < / ItemDefinitionGroup > <nl> + < ItemDefinitionGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Release | Win32 ' " > <nl> + < ClCompile > <nl> + < WarningLevel > Level3 < / WarningLevel > <nl> + < Optimization > MaxSpeed < / Optimization > <nl> + < FunctionLevelLinking > true < / FunctionLevelLinking > <nl> + < IntrinsicFunctions > true < / IntrinsicFunctions > <nl> + < / ClCompile > <nl> + < Link > <nl> + < GenerateDebugInformation > true < / GenerateDebugInformation > <nl> + < EnableCOMDATFolding > true < / EnableCOMDATFolding > <nl> + < OptimizeReferences > true < / OptimizeReferences > <nl> + < / Link > <nl> + < / ItemDefinitionGroup > <nl> + < ItemGroup > <nl> + < ClInclude Include = " . . \ . . \ objs \ srs_auto_headers . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_avc_aac . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_bandwidth . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_config . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_conn . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_dvr . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_edge . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_empty . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_encoder . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_ffmpeg . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_forward . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_heartbeat . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_hls . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_http . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_http_api . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_http_client . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_http_conn . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_http_hooks . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_ingest . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_json . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_kbps . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_log . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_pithy_print . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_recv_thread . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_refer . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_reload . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_rtmp_conn . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_security . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_server . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_source . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_st . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_statistic . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_st_socket . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_thread . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ app \ srs_app_utility . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ core \ srs_core . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ core \ srs_core_autofree . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ core \ srs_core_performance . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ kernel \ srs_kernel_aac . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ kernel \ srs_kernel_codec . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ kernel \ srs_kernel_consts . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ kernel \ srs_kernel_error . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ kernel \ srs_kernel_file . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ kernel \ srs_kernel_flv . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ kernel \ srs_kernel_log . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ kernel \ srs_kernel_mp3 . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ kernel \ srs_kernel_stream . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ kernel \ srs_kernel_utility . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ libs \ srs_librtmp . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ libs \ srs_lib_bandwidth . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ libs \ srs_lib_simple_socket . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ rtmp \ srs_protocol_amf0 . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ rtmp \ srs_protocol_buffer . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ rtmp \ srs_protocol_handshake . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ rtmp \ srs_protocol_io . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ rtmp \ srs_protocol_msg_array . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ rtmp \ srs_protocol_rtmp . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ rtmp \ srs_protocol_stack . hpp " / > <nl> + < ClInclude Include = " . . \ . . \ src \ rtmp \ srs_protocol_utility . hpp " / > <nl> + < / ItemGroup > <nl> + < ItemGroup > <nl> + < ClCompile Include = " . . \ . . \ research \ hls \ ts_info . cc " / > <nl> + < ClCompile Include = " . . \ . . \ research \ librtmp \ srs_aac_raw_publish . c " / > <nl> + < ClCompile Include = " . . \ . . \ research \ librtmp \ srs_audio_raw_publish . c " / > <nl> + < ClCompile Include = " . . \ . . \ research \ librtmp \ srs_bandwidth_check . c " / > <nl> + < ClCompile Include = " . . \ . . \ research \ librtmp \ srs_detect_rtmp . c " / > <nl> + < ClCompile Include = " . . \ . . \ research \ librtmp \ srs_flv_injecter . c " / > <nl> + < ClCompile Include = " . . \ . . \ research \ librtmp \ srs_flv_parser . c " / > <nl> + < ClCompile Include = " . . \ . . \ research \ librtmp \ srs_h264_raw_publish . c " / > <nl> + < ClCompile Include = " . . \ . . \ research \ librtmp \ srs_ingest_flv . c " / > <nl> + < ClCompile Include = " . . \ . . \ research \ librtmp \ srs_ingest_rtmp . c " / > <nl> + < ClCompile Include = " . . \ . . \ research \ librtmp \ srs_play . c " / > <nl> + < ClCompile Include = " . . \ . . \ research \ librtmp \ srs_publish . c " / > <nl> + < ClCompile Include = " . . \ . . \ research \ librtmp \ srs_rtmp_dump . c " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_avc_aac . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_bandwidth . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_config . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_conn . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_dvr . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_edge . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_empty . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_encoder . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_ffmpeg . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_forward . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_heartbeat . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_hls . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_http . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_http_api . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_http_client . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_http_conn . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_http_hooks . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_ingest . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_json . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_kbps . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_log . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_pithy_print . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_recv_thread . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_refer . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_reload . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_rtmp_conn . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_security . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_server . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_source . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_st . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_statistic . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_st_socket . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_thread . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ app \ srs_app_utility . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ core \ srs_core . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ core \ srs_core_autofree . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ core \ srs_core_performance . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ kernel \ srs_kernel_aac . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ kernel \ srs_kernel_codec . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ kernel \ srs_kernel_consts . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ kernel \ srs_kernel_error . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ kernel \ srs_kernel_file . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ kernel \ srs_kernel_flv . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ kernel \ srs_kernel_log . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ kernel \ srs_kernel_mp3 . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ kernel \ srs_kernel_stream . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ kernel \ srs_kernel_utility . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ libs \ srs_librtmp . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ libs \ srs_lib_bandwidth . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ libs \ srs_lib_simple_socket . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ main \ srs_main_server . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ rtmp \ srs_protocol_amf0 . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ rtmp \ srs_protocol_buffer . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ rtmp \ srs_protocol_handshake . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ rtmp \ srs_protocol_io . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ rtmp \ srs_protocol_msg_array . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ rtmp \ srs_protocol_rtmp . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ rtmp \ srs_protocol_stack . cpp " / > <nl> + < ClCompile Include = " . . \ . . \ src \ rtmp \ srs_protocol_utility . cpp " / > <nl> + < / ItemGroup > <nl> + < Import Project = " $ ( VCTargetsPath ) \ Microsoft . Cpp . targets " / > <nl> + < ImportGroup Label = " ExtensionTargets " > <nl> + < / ImportGroup > <nl> + < / Project > <nl> \ No newline at end of file <nl> deleted file mode 100644 <nl> index ef19d2cd3 . . 000000000 <nl> mmm a / trunk / src / qt / srs / srs - qt . pro <nl> ppp / dev / null <nl> <nl> - TEMPLATE = app <nl> - CONFIG + = console <nl> - CONFIG - = app_bundle <nl> - CONFIG - = qt <nl> - <nl> - HEADERS + = \ <nl> - . . / . . / core / * . hpp \ <nl> - . . / . . / kernel / * . hpp \ <nl> - . . / . . / app / * . hpp \ <nl> - . . / . . / rtmp / * . hpp <nl> - <nl> - SOURCES + = \ <nl> - . . / . . / core / * . cpp \ <nl> - . . / . . / kernel / * . cpp \ <nl> - . . / . . / app / * . cpp \ <nl> - . . / . . / rtmp / * . cpp \ <nl> - . . / . . / main / * . cpp <nl> - <nl> - INCLUDEPATH + = \ <nl> - . . / . . / core \ <nl> - . . / . . / kernel \ <nl> - . . / . . / app \ <nl> - . . / . . / rtmp \ <nl> - . . / . . / . . / objs \ <nl> - . . / . . / . . / objs / st \ <nl> - . . / . . / . . / objs / hp \ <nl> - . . / . . / . . / objs / openssl / include <nl> - <nl> - LIBS + = \ <nl> - . . / . . / . . / objs / st / libst . a \ <nl> - . . / . . / . . / objs / hp / libhttp_parser . a \ <nl> - . . / . . / . . / objs / openssl / lib / libssl . a \ <nl> - . . / . . / . . / objs / openssl / lib / libcrypto . a \ <nl> - - ldl <nl> - <nl> deleted file mode 100755 <nl> index 4840424ea . . 000000000 <nl> mmm a / trunk / src / srs / srs . upp <nl> ppp / dev / null <nl> <nl> - file <nl> - main readonly separator , <nl> - . . \ main \ srs_main_server . cpp , <nl> - auto readonly separator , <nl> - . . \ . . \ objs \ srs_auto_headers . hpp , <nl> - libs readonly separator , <nl> - . . \ libs \ srs_librtmp . hpp , <nl> - . . \ libs \ srs_librtmp . cpp , <nl> - . . \ libs \ srs_lib_bandwidth . hpp , <nl> - . . \ libs \ srs_lib_bandwidth . cpp , <nl> - . . \ libs \ srs_lib_simple_socket . hpp , <nl> - . . \ libs \ srs_lib_simple_socket . cpp , <nl> - core readonly separator , <nl> - . . \ core \ srs_core . hpp , <nl> - . . \ core \ srs_core . cpp , <nl> - . . \ core \ srs_core_autofree . hpp , <nl> - . . \ core \ srs_core_autofree . cpp , <nl> - . . \ core \ srs_core_performance . hpp , <nl> - . . \ core \ srs_core_performance . cpp , <nl> - kernel readonly separator , <nl> - . . \ kernel \ srs_kernel_aac . hpp , <nl> - . . \ kernel \ srs_kernel_aac . cpp , <nl> - . . \ kernel \ srs_kernel_codec . hpp , <nl> - . . \ kernel \ srs_kernel_codec . cpp , <nl> - . . \ kernel \ srs_kernel_consts . hpp , <nl> - . . \ kernel \ srs_kernel_consts . cpp , <nl> - . . \ kernel \ srs_kernel_error . hpp , <nl> - . . \ kernel \ srs_kernel_error . cpp , <nl> - . . \ kernel \ srs_kernel_file . hpp , <nl> - . . \ kernel \ srs_kernel_file . cpp , <nl> - . . \ kernel \ srs_kernel_flv . hpp , <nl> - . . \ kernel \ srs_kernel_flv . cpp , <nl> - . . \ kernel \ srs_kernel_log . hpp , <nl> - . . \ kernel \ srs_kernel_log . cpp , <nl> - . . \ kernel \ srs_kernel_mp3 . hpp , <nl> - . . \ kernel \ srs_kernel_mp3 . cpp , <nl> - . . \ kernel \ srs_kernel_stream . hpp , <nl> - . . \ kernel \ srs_kernel_stream . cpp , <nl> - . . \ kernel \ srs_kernel_utility . hpp , <nl> - . . \ kernel \ srs_kernel_utility . cpp , <nl> - rtmp - protocol readonly separator , <nl> - . . \ rtmp \ srs_protocol_amf0 . hpp , <nl> - . . \ rtmp \ srs_protocol_amf0 . cpp , <nl> - . . \ rtmp \ srs_protocol_buffer . hpp , <nl> - . . \ rtmp \ srs_protocol_buffer . cpp , <nl> - . . \ rtmp \ srs_protocol_handshake . hpp , <nl> - . . \ rtmp \ srs_protocol_handshake . cpp , <nl> - . . \ rtmp \ srs_protocol_io . hpp , <nl> - . . \ rtmp \ srs_protocol_io . cpp , <nl> - . . \ rtmp \ srs_protocol_msg_array . hpp , <nl> - . . \ rtmp \ srs_protocol_msg_array . cpp , <nl> - . . \ rtmp \ srs_protocol_rtmp . hpp , <nl> - . . \ rtmp \ srs_protocol_rtmp . cpp , <nl> - . . \ rtmp \ srs_protocol_stack . hpp , <nl> - . . \ rtmp \ srs_protocol_stack . cpp , <nl> - . . \ rtmp \ srs_protocol_utility . hpp , <nl> - . . \ rtmp \ srs_protocol_utility . cpp , <nl> - app readonly separator , <nl> - . . \ app \ srs_app_avc_aac . hpp , <nl> - . . \ app \ srs_app_avc_aac . cpp , <nl> - . . \ app \ srs_app_bandwidth . hpp , <nl> - . . \ app \ srs_app_bandwidth . cpp , <nl> - . . \ app \ srs_app_conn . hpp , <nl> - . . \ app \ srs_app_conn . cpp , <nl> - . . \ app \ srs_app_config . hpp , <nl> - . . \ app \ srs_app_config . cpp , <nl> - . . \ app \ srs_app_dvr . hpp , <nl> - . . \ app \ srs_app_dvr . cpp , <nl> - . . \ app \ srs_app_edge . hpp , <nl> - . . \ app \ srs_app_edge . cpp , <nl> - . . \ app \ srs_app_empty . hpp , <nl> - . . \ app \ srs_app_empty . cpp , <nl> - . . \ app \ srs_app_encoder . hpp , <nl> - . . \ app \ srs_app_encoder . cpp , <nl> - . . \ app \ srs_app_ffmpeg . hpp , <nl> - . . \ app \ srs_app_ffmpeg . cpp , <nl> - . . \ app \ srs_app_forward . hpp , <nl> - . . \ app \ srs_app_forward . cpp , <nl> - . . \ app \ srs_app_heartbeat . hpp , <nl> - . . \ app \ srs_app_heartbeat . cpp , <nl> - . . \ app \ srs_app_hls . hpp , <nl> - . . \ app \ srs_app_hls . cpp , <nl> - . . \ app \ srs_app_http . hpp , <nl> - . . \ app \ srs_app_http . cpp , <nl> - . . \ app \ srs_app_http_api . hpp , <nl> - . . \ app \ srs_app_http_api . cpp , <nl> - . . \ app \ srs_app_http_client . hpp , <nl> - . . \ app \ srs_app_http_client . cpp , <nl> - . . \ app \ srs_app_http_conn . hpp , <nl> - . . \ app \ srs_app_http_conn . cpp , <nl> - . . \ app \ srs_app_http_hooks . hpp , <nl> - . . \ app \ srs_app_http_hooks . cpp , <nl> - . . \ app \ srs_app_ingest . hpp , <nl> - . . \ app \ srs_app_ingest . cpp , <nl> - . . \ app \ srs_app_json . hpp , <nl> - . . \ app \ srs_app_json . cpp , <nl> - . . \ app \ srs_app_kbps . hpp , <nl> - . . \ app \ srs_app_kbps . cpp , <nl> - . . \ app \ srs_app_log . hpp , <nl> - . . \ app \ srs_app_log . cpp , <nl> - . . \ app \ srs_app_recv_thread . hpp , <nl> - . . \ app \ srs_app_recv_thread . cpp , <nl> - . . \ app \ srs_app_refer . hpp , <nl> - . . \ app \ srs_app_refer . cpp , <nl> - . . \ app \ srs_app_reload . hpp , <nl> - . . \ app \ srs_app_reload . cpp , <nl> - . . \ app \ srs_app_rtmp_conn . hpp , <nl> - . . \ app \ srs_app_rtmp_conn . cpp , <nl> - . . \ app \ srs_app_pithy_print . hpp , <nl> - . . \ app \ srs_app_pithy_print . cpp , <nl> - . . \ app \ srs_app_security . hpp , <nl> - . . \ app \ srs_app_security . cpp , <nl> - . . \ app \ srs_app_server . hpp , <nl> - . . \ app \ srs_app_server . cpp , <nl> - . . \ app \ srs_app_st . hpp , <nl> - . . \ app \ srs_app_st . cpp , <nl> - . . \ app \ srs_app_st_socket . hpp , <nl> - . . \ app \ srs_app_st_socket . cpp , <nl> - . . \ app \ srs_app_statistic . hpp , <nl> - . . \ app \ srs_app_statistic . cpp , <nl> - . . \ app \ srs_app_source . hpp , <nl> - . . \ app \ srs_app_source . cpp , <nl> - . . \ app \ srs_app_thread . hpp , <nl> - . . \ app \ srs_app_thread . cpp , <nl> - . . \ app \ srs_app_utility . hpp , <nl> - . . \ app \ srs_app_utility . cpp , <nl> - utest readonly separator , <nl> - . . \ utest \ srs_utest . hpp , <nl> - . . \ utest \ srs_utest . cpp , <nl> - . . \ utest \ srs_utest_amf0 . hpp , <nl> - . . \ utest \ srs_utest_amf0 . cpp , <nl> - . . \ utest \ srs_utest_config . hpp , <nl> - . . \ utest \ srs_utest_config . cpp , <nl> - . . \ utest \ srs_utest_core . hpp , <nl> - . . \ utest \ srs_utest_core . cpp , <nl> - . . \ utest \ srs_utest_kernel . hpp , <nl> - . . \ utest \ srs_utest_kernel . cpp , <nl> - . . \ utest \ srs_utest_protocol . hpp , <nl> - . . \ utest \ srs_utest_protocol . cpp , <nl> - . . \ utest \ srs_utest_reload . hpp , <nl> - . . \ utest \ srs_utest_reload . cpp , <nl> - research readonly separator , <nl> - . . \ . . \ research \ librtmp \ srs_aac_raw_publish . c , <nl> - . . \ . . \ research \ librtmp \ srs_audio_raw_publish . c , <nl> - . . \ . . \ research \ librtmp \ srs_bandwidth_check . c , <nl> - . . \ . . \ research \ librtmp \ srs_detect_rtmp . c , <nl> - . . \ . . \ research \ librtmp \ srs_flv_injecter . c , <nl> - . . \ . . \ research \ librtmp \ srs_flv_parser . c , <nl> - . . \ . . \ research \ librtmp \ srs_h264_raw_publish . c , <nl> - . . \ . . \ research \ librtmp \ srs_ingest_flv . c , <nl> - . . \ . . \ research \ librtmp \ srs_ingest_rtmp . c , <nl> - . . \ . . \ research \ librtmp \ srs_play . c , <nl> - . . \ . . \ research \ librtmp \ srs_publish . c , <nl> - . . \ . . \ research \ librtmp \ srs_rtmp_dump . c , <nl> - . . \ . . \ research \ hls \ ts_info . cc ; <nl> - <nl> - mainconfig <nl> - " " = " MAIN " ; <nl> - <nl> | use ide dir for ides . | ossrs/srs | a3607c91931e10162d6f34bfac7b08eb1acf75f6 | 2015-01-20T10:33:04Z |
mmm a / dbms / src / Common / XDBCBridgeHelper . h <nl> ppp b / dbms / src / Common / XDBCBridgeHelper . h <nl> struct ODBCBridgeMixin <nl> <nl> static void startBridge ( const Poco : : Util : : AbstractConfiguration & config , Poco : : Logger * log , const Poco : : Timespan & http_timeout ) <nl> { <nl> - Poco : : Path path { config . getString ( " application . dir " , " " ) } ; <nl> + / / / Path to executable folder <nl> + Poco : : Path path { config . getString ( " application . dir " , " / usr / bin " ) } ; <nl> <nl> path . setFileName ( <nl> # if CLICKHOUSE_SPLIT_BINARY <nl> struct ODBCBridgeMixin <nl> # endif <nl> ) ; <nl> <nl> - if ( ! Poco : : File ( path ) . exists ( ) ) <nl> - throw Exception ( " clickhouse binary ( " + path . toString ( ) + " ) is not found " , ErrorCodes : : EXTERNAL_EXECUTABLE_NOT_FOUND ) ; <nl> - <nl> std : : stringstream command ; <nl> <nl> command < < path . toString ( ) < < <nl> mmm a / dbms / src / Dictionaries / DictionarySourceFactory . cpp <nl> ppp b / dbms / src / Dictionaries / DictionarySourceFactory . cpp <nl> DictionarySourcePtr DictionarySourceFactory : : create ( <nl> else if ( " odbc " = = source_type ) <nl> { <nl> # if USE_POCO_SQLODBC | | USE_POCO_DATAODBC <nl> - BridgeHelperPtr bridge = std : : make_shared < XDBCBridgeHelper < ODBCBridgeMixin > > ( config , context . getSettings ( ) . http_connection_timeout , config . getString ( config_prefix + " . odbc . connection_string " ) ) ; <nl> + const auto & global_config = context . getConfigRef ( ) ; <nl> + BridgeHelperPtr bridge = std : : make_shared < XDBCBridgeHelper < ODBCBridgeMixin > > ( global_config , context . getSettings ( ) . http_connection_timeout , config . getString ( config_prefix + " . odbc . connection_string " ) ) ; <nl> return std : : make_unique < XDBCDictionarySource > ( dict_struct , config , config_prefix + " . odbc " , sample_block , context , bridge ) ; <nl> # else <nl> throw Exception { " Dictionary source of type ` odbc ` is disabled because poco library was built without ODBC support . " , <nl> mmm a / dbms / src / Dictionaries / ExternalQueryBuilder . cpp <nl> ppp b / dbms / src / Dictionaries / ExternalQueryBuilder . cpp <nl> namespace DB <nl> namespace ErrorCodes <nl> { <nl> extern const int UNSUPPORTED_METHOD ; <nl> + extern const int LOGICAL_ERROR ; <nl> } <nl> <nl> <nl> ExternalQueryBuilder : : ExternalQueryBuilder ( <nl> - const DictionaryStructure & dict_struct , <nl> - const std : : string & db , <nl> - const std : : string & table , <nl> - const std : : string & where , <nl> - IdentifierQuotingStyle quoting_style ) <nl> - : dict_struct ( dict_struct ) , db ( db ) , table ( table ) , where ( where ) , quoting_style ( quoting_style ) <nl> + const DictionaryStructure & dict_struct_ , <nl> + const std : : string & db_ , <nl> + const std : : string & table_ , <nl> + const std : : string & where_ , <nl> + IdentifierQuotingStyle quoting_style_ ) <nl> + : dict_struct ( dict_struct_ ) , db ( db_ ) , where ( where_ ) , quoting_style ( quoting_style_ ) <nl> { <nl> + if ( auto pos = table_ . find ( ' . ' ) ; pos ! = std : : string : : npos ) <nl> + { <nl> + schema = table_ . substr ( 0 , pos ) ; <nl> + table = table_ . substr ( pos + 1 ) ; <nl> + } <nl> + else <nl> + { <nl> + schema = " " ; <nl> + table = table_ ; <nl> + } <nl> } <nl> <nl> <nl> std : : string ExternalQueryBuilder : : composeLoadAllQuery ( ) const <nl> writeQuoted ( db , out ) ; <nl> writeChar ( ' . ' , out ) ; <nl> } <nl> + if ( ! schema . empty ( ) ) <nl> + { <nl> + writeQuoted ( schema , out ) ; <nl> + writeChar ( ' . ' , out ) ; <nl> + } <nl> writeQuoted ( table , out ) ; <nl> <nl> if ( ! where . empty ( ) ) <nl> std : : string ExternalQueryBuilder : : composeLoadIdsQuery ( const std : : vector < UInt64 > <nl> writeQuoted ( db , out ) ; <nl> writeChar ( ' . ' , out ) ; <nl> } <nl> + if ( ! schema . empty ( ) ) <nl> + { <nl> + writeQuoted ( schema , out ) ; <nl> + writeChar ( ' . ' , out ) ; <nl> + } <nl> + <nl> writeQuoted ( table , out ) ; <nl> <nl> writeString ( " WHERE " , out ) ; <nl> std : : string ExternalQueryBuilder : : composeLoadKeysQuery ( <nl> writeQuoted ( db , out ) ; <nl> writeChar ( ' . ' , out ) ; <nl> } <nl> + if ( ! schema . empty ( ) ) <nl> + { <nl> + writeQuoted ( schema , out ) ; <nl> + writeChar ( ' . ' , out ) ; <nl> + } <nl> + <nl> writeQuoted ( table , out ) ; <nl> <nl> writeString ( " WHERE " , out ) ; <nl> mmm a / dbms / src / Dictionaries / ExternalQueryBuilder . h <nl> ppp b / dbms / src / Dictionaries / ExternalQueryBuilder . h <nl> class WriteBuffer ; <nl> struct ExternalQueryBuilder <nl> { <nl> const DictionaryStructure & dict_struct ; <nl> - const std : : string & db ; <nl> - const std : : string & table ; <nl> + std : : string db ; <nl> + std : : string table ; <nl> + std : : string schema ; <nl> const std : : string & where ; <nl> <nl> IdentifierQuotingStyle quoting_style ; <nl> <nl> <nl> ExternalQueryBuilder ( <nl> - const DictionaryStructure & dict_struct , <nl> - const std : : string & db , <nl> - const std : : string & table , <nl> - const std : : string & where , <nl> - IdentifierQuotingStyle quoting_style ) ; <nl> + const DictionaryStructure & dict_struct_ , <nl> + const std : : string & db_ , <nl> + const std : : string & table_ , <nl> + const std : : string & where_ , <nl> + IdentifierQuotingStyle quoting_style_ ) ; <nl> <nl> / * * Generate a query to load all data . * / <nl> std : : string composeLoadAllQuery ( ) const ; <nl> mmm a / dbms / tests / integration / README . md <nl> ppp b / dbms / tests / integration / README . md <nl> Don ' t use Docker from your system repository . <nl> <nl> * [ pip ] ( https : / / pypi . python . org / pypi / pip ) . To install : ` sudo apt - get install python - pip ` <nl> * [ py . test ] ( https : / / docs . pytest . org / ) testing framework . To install : ` sudo - H pip install pytest ` <nl> - * [ docker - compose ] ( https : / / docs . docker . com / compose / ) and additional python libraries . To install : ` sudo - H pip install docker - compose docker dicttoxml kazoo PyMySQL ` <nl> + * [ docker - compose ] ( https : / / docs . docker . com / compose / ) and additional python libraries . To install : ` sudo - H pip install docker - compose docker dicttoxml kazoo PyMySQL psycopg2 ` <nl> <nl> - ( highly not recommended ) If you really want to use OS packages on modern debian / ubuntu instead of " pip " : ` sudo apt install - y docker docker - compose python - pytest python - dicttoxml python - docker python - pymysql python - kazoo ` <nl> + ( highly not recommended ) If you really want to use OS packages on modern debian / ubuntu instead of " pip " : ` sudo apt install - y docker docker - compose python - pytest python - dicttoxml python - docker python - pymysql python - kazoo python - psycopg2 ` <nl> <nl> If you want to run the tests under a non - privileged user , you must add this user to ` docker ` group : ` sudo usermod - aG docker $ USER ` and re - login . <nl> ( You must close all your sessions ( for example , restart your computer ) ) <nl> mmm a / dbms / tests / integration / helpers / cluster . py <nl> ppp b / dbms / tests / integration / helpers / cluster . py <nl> <nl> import xml . dom . minidom <nl> from kazoo . client import KazooClient <nl> from kazoo . exceptions import KazooException <nl> + import psycopg2 <nl> <nl> import docker <nl> from docker . errors import ContainerError <nl> def __init__ ( self , base_path , name = None , base_configs_dir = None , server_bin_path = <nl> self . instances = { } <nl> self . with_zookeeper = False <nl> self . with_mysql = False <nl> + self . with_postgres = False <nl> self . with_kafka = False <nl> self . with_odbc_drivers = False <nl> <nl> def get_client_cmd ( self ) : <nl> cmd + = " client " <nl> return cmd <nl> <nl> - def add_instance ( self , name , config_dir = None , main_configs = [ ] , user_configs = [ ] , macros = { } , with_zookeeper = False , with_mysql = False , with_kafka = False , clickhouse_path_dir = None , with_odbc_drivers = False , hostname = None , env_variables = { } , image = " ubuntu : 14 . 04 " ) : <nl> + def add_instance ( self , name , config_dir = None , main_configs = [ ] , user_configs = [ ] , macros = { } , with_zookeeper = False , with_mysql = False , with_kafka = False , clickhouse_path_dir = None , with_odbc_drivers = False , with_postgres = False , hostname = None , env_variables = { } , image = " ubuntu : 14 . 04 " ) : <nl> " " " Add an instance to the cluster . <nl> <nl> name - the name of the instance directory and the value of the ' instance ' macro in ClickHouse . <nl> def add_instance ( self , name , config_dir = None , main_configs = [ ] , user_configs = [ ] , <nl> self . base_mysql_cmd = [ ' docker - compose ' , ' - - project - directory ' , self . base_dir , ' - - project - name ' , <nl> self . project_name , ' - - file ' , p . join ( HELPERS_DIR , ' docker_compose_mysql . yml ' ) ] <nl> <nl> + if with_postgres and not self . with_postgres : <nl> + self . with_postgres = True <nl> + self . base_cmd . extend ( [ ' - - file ' , p . join ( HELPERS_DIR , ' docker_compose_postgres . yml ' ) ] ) <nl> + self . base_postgres_cmd = [ ' docker - compose ' , ' - - project - directory ' , self . base_dir , ' - - project - name ' , <nl> + self . project_name , ' - - file ' , p . join ( HELPERS_DIR , ' docker_compose_postgres . yml ' ) ] <nl> + <nl> if with_odbc_drivers and not self . with_odbc_drivers : <nl> self . with_odbc_drivers = True <nl> if not self . with_mysql : <nl> def add_instance ( self , name , config_dir = None , main_configs = [ ] , user_configs = [ ] , <nl> self . base_cmd . extend ( [ ' - - file ' , p . join ( HELPERS_DIR , ' docker_compose_mysql . yml ' ) ] ) <nl> self . base_mysql_cmd = [ ' docker - compose ' , ' - - project - directory ' , self . base_dir , ' - - project - name ' , <nl> self . project_name , ' - - file ' , p . join ( HELPERS_DIR , ' docker_compose_mysql . yml ' ) ] <nl> + if not self . with_postgres : <nl> + self . with_postgres = True <nl> + self . base_cmd . extend ( [ ' - - file ' , p . join ( HELPERS_DIR , ' docker_compose_postgres . yml ' ) ] ) <nl> + self . base_postgres_cmd = [ ' docker - compose ' , ' - - project - directory ' , self . base_dir , ' - - project - name ' , <nl> + self . project_name , ' - - file ' , p . join ( HELPERS_DIR , ' docker_compose_postgres . yml ' ) ] <nl> + <nl> <nl> if with_kafka and not self . with_kafka : <nl> self . with_kafka = True <nl> def wait_mysql_to_start ( self , timeout = 60 ) : <nl> <nl> raise Exception ( " Cannot wait MySQL container " ) <nl> <nl> + def wait_postgres_to_start ( self , timeout = 60 ) : <nl> + start = time . time ( ) <nl> + while time . time ( ) - start < timeout : <nl> + try : <nl> + conn_string = " host = ' localhost ' user = ' postgres ' password = ' mysecretpassword ' " <nl> + conn = psycopg2 . connect ( conn_string ) <nl> + conn . close ( ) <nl> + print " Postgres Started " <nl> + return <nl> + except Exception as ex : <nl> + print " Can ' t connect to Postgres " + str ( ex ) <nl> + time . sleep ( 0 . 5 ) <nl> + <nl> + raise Exception ( " Cannot wait Postgres container " ) <nl> + <nl> def wait_zookeeper_to_start ( self , timeout = 60 ) : <nl> start = time . time ( ) <nl> while time . time ( ) - start < timeout : <nl> def start ( self , destroy_dirs = True ) : <nl> self . docker_client = docker . from_env ( version = self . docker_api_version ) <nl> <nl> if self . with_zookeeper and self . base_zookeeper_cmd : <nl> - subprocess_check_call ( self . base_zookeeper_cmd + [ ' up ' , ' - d ' , ' - - force - recreate ' , ' - - remove - orphans ' ] ) <nl> + subprocess_check_call ( self . base_zookeeper_cmd + [ ' up ' , ' - d ' , ' - - force - recreate ' ] ) <nl> for command in self . pre_zookeeper_commands : <nl> self . run_kazoo_commands_with_retries ( command , repeats = 5 ) <nl> self . wait_zookeeper_to_start ( 120 ) <nl> <nl> if self . with_mysql and self . base_mysql_cmd : <nl> - subprocess_check_call ( self . base_mysql_cmd + [ ' up ' , ' - d ' , ' - - force - recreate ' , ' - - remove - orphans ' ] ) <nl> + subprocess_check_call ( self . base_mysql_cmd + [ ' up ' , ' - d ' , ' - - force - recreate ' ] ) <nl> self . wait_mysql_to_start ( 120 ) <nl> <nl> + if self . with_postgres and self . base_postgres_cmd : <nl> + subprocess_check_call ( self . base_postgres_cmd + [ ' up ' , ' - d ' , ' - - force - recreate ' ] ) <nl> + self . wait_postgres_to_start ( 120 ) <nl> + <nl> if self . with_kafka and self . base_kafka_cmd : <nl> - subprocess_check_call ( self . base_kafka_cmd + [ ' up ' , ' - d ' , ' - - force - recreate ' , ' - - remove - orphans ' ] ) <nl> + subprocess_check_call ( self . base_kafka_cmd + [ ' up ' , ' - d ' , ' - - force - recreate ' ] ) <nl> self . kafka_docker_id = self . get_instance_docker_id ( ' kafka1 ' ) <nl> <nl> - subprocess_check_call ( self . base_cmd + [ ' up ' , ' - d ' , ' - - force - recreate ' , ' - - remove - orphans ' ] ) <nl> + subprocess_check_call ( self . base_cmd + [ ' up ' , ' - d ' , ' - - force - recreate ' ] ) <nl> <nl> start_deadline = time . time ( ) + 20 . 0 # seconds <nl> for instance in self . instances . itervalues ( ) : <nl> def odbc_drivers ( self ) : <nl> } , <nl> " PostgreSQL " : { <nl> " DSN " : " postgresql_odbc " , <nl> + " Database " : " postgres " , <nl> + " UserName " : " postgres " , <nl> + " Password " : " mysecretpassword " , <nl> + " Port " : " 5432 " , <nl> + " Servername " : " postgres1 " , <nl> + " Protocol " : " 9 . 3 " , <nl> + " ReadOnly " : " No " , <nl> + " RowVersioning " : " No " , <nl> + " ShowSystemTables " : " No " , <nl> " Driver " : " / usr / lib / x86_64 - linux - gnu / odbc / psqlodbca . so " , <nl> " Setup " : " / usr / lib / x86_64 - linux - gnu / odbc / libodbcpsqlS . so " , <nl> + " ConnSettings " : " " , <nl> } <nl> } <nl> else : <nl> new file mode 100644 <nl> index 00000000000 . . 74049d9f0b3 <nl> mmm / dev / null <nl> ppp b / dbms / tests / integration / helpers / docker_compose_postgres . yml <nl> <nl> + version : ' 2 ' <nl> + services : <nl> + postgres1 : <nl> + image : postgres <nl> + restart : always <nl> + environment : <nl> + POSTGRES_PASSWORD : mysecretpassword <nl> + ports : <nl> + - 5432 : 5432 <nl> mmm a / dbms / tests / integration / test_odbc_interaction / test . py <nl> ppp b / dbms / tests / integration / test_odbc_interaction / test . py <nl> <nl> <nl> import os <nl> import pymysql . cursors <nl> + import psycopg2 <nl> + from psycopg2 . extensions import ISOLATION_LEVEL_AUTOCOMMIT <nl> from helpers . cluster import ClickHouseCluster <nl> <nl> SCRIPT_DIR = os . path . dirname ( os . path . realpath ( __file__ ) ) <nl> <nl> cluster = ClickHouseCluster ( __file__ , base_configs_dir = os . path . join ( SCRIPT_DIR , ' configs ' ) ) <nl> - node1 = cluster . add_instance ( ' node1 ' , with_odbc_drivers = True , with_mysql = True , image = ' alesapin / ubuntu_with_odbc : 14 . 04 ' , main_configs = [ ' configs / dictionaries / sqlite3_odbc_hashed_dictionary . xml ' , ' configs / dictionaries / sqlite3_odbc_cached_dictionary . xml ' ] ) <nl> + node1 = cluster . add_instance ( ' node1 ' , with_odbc_drivers = True , with_mysql = True , image = ' alesapin / ubuntu_with_odbc : 14 . 04 ' , main_configs = [ ' configs / dictionaries / sqlite3_odbc_hashed_dictionary . xml ' , ' configs / dictionaries / sqlite3_odbc_cached_dictionary . xml ' , ' configs / dictionaries / postgres_odbc_hashed_dictionary . xml ' ] ) <nl> <nl> create_table_sql_template = " " " <nl> CREATE TABLE ` clickhouse ` . ` { } ` ( <nl> def create_mysql_table ( conn , table_name ) : <nl> with conn . cursor ( ) as cursor : <nl> cursor . execute ( create_table_sql_template . format ( table_name ) ) <nl> <nl> + def get_postgres_conn ( ) : <nl> + conn_string = " host = ' localhost ' user = ' postgres ' password = ' mysecretpassword ' " <nl> + conn = psycopg2 . connect ( conn_string ) <nl> + conn . set_isolation_level ( ISOLATION_LEVEL_AUTOCOMMIT ) <nl> + return conn <nl> + <nl> + def create_postgres_db ( conn , name ) : <nl> + with conn . cursor ( ) as cursor : <nl> + cursor . execute ( <nl> + " CREATE SCHEMA { } " . format ( name ) ) <nl> + <nl> @ pytest . fixture ( scope = " module " ) <nl> def started_cluster ( ) : <nl> try : <nl> def started_cluster ( ) : <nl> node1 . exec_in_container ( [ " bash " , " - c " , " echo ' CREATE TABLE t2 ( X INTEGER PRIMARY KEY ASC , Y , Z ) ; ' | sqlite3 { } " . format ( sqlite_db ) ] , privileged = True , user = ' root ' ) <nl> node1 . exec_in_container ( [ " bash " , " - c " , " echo ' CREATE TABLE t3 ( X INTEGER PRIMARY KEY ASC , Y , Z ) ; ' | sqlite3 { } " . format ( sqlite_db ) ] , privileged = True , user = ' root ' ) <nl> node1 . exec_in_container ( [ " bash " , " - c " , " echo ' CREATE TABLE t4 ( X INTEGER PRIMARY KEY ASC , Y , Z ) ; ' | sqlite3 { } " . format ( sqlite_db ) ] , privileged = True , user = ' root ' ) <nl> - conn = get_mysql_conn ( ) <nl> + mysql_conn = get_mysql_conn ( ) <nl> # # create mysql db and table <nl> - create_mysql_db ( conn , ' clickhouse ' ) <nl> + create_mysql_db ( mysql_conn , ' clickhouse ' ) <nl> + <nl> + postgres_conn = get_postgres_conn ( ) <nl> + <nl> + create_postgres_db ( postgres_conn , ' clickhouse ' ) <nl> <nl> yield cluster <nl> <nl> def test_sqlite_odbc_cached_dictionary ( started_cluster ) : <nl> time . sleep ( 5 ) <nl> <nl> assert node1 . query ( " select dictGetUInt8 ( ' sqlite3_odbc_cached ' , ' Z ' , toUInt64 ( 1 ) ) " ) = = " 12 \ n " <nl> + <nl> + def test_postgres_odbc_hached_dictionary_with_schema ( started_cluster ) : <nl> + conn = get_postgres_conn ( ) <nl> + cursor = conn . cursor ( ) <nl> + cursor . execute ( " drop table if exists clickhouse . test_table " ) <nl> + cursor . execute ( " create table if not exists clickhouse . test_table ( column1 int primary key , column2 varchar ( 40 ) not null ) " ) <nl> + cursor . execute ( " insert into clickhouse . test_table values ( 1 , ' hello ' ) , ( 2 , ' world ' ) " ) <nl> + time . sleep ( 5 ) <nl> + assert node1 . query ( " select dictGetString ( ' postgres_odbc_hashed ' , ' column2 ' , toUInt64 ( 1 ) ) " ) = = " hello \ n " <nl> + assert node1 . query ( " select dictGetString ( ' postgres_odbc_hashed ' , ' column2 ' , toUInt64 ( 2 ) ) " ) = = " world \ n " <nl> mmm a / docs / en / query_language / dicts / external_dicts_dict_sources . md <nl> ppp b / docs / en / query_language / dicts / external_dicts_dict_sources . md <nl> Example of settings : <nl> ` ` ` xml <nl> < odbc > <nl> < db > DatabaseName < / db > <nl> - < table > TableName < / table > <nl> + < table > ShemaName . TableName < / table > <nl> < connection_string > DSN = some_parameters < / connection_string > <nl> < invalidate_query > SQL_QUERY < / invalidate_query > <nl> < / odbc > <nl> Example of settings : <nl> Setting fields : <nl> <nl> - ` db ` – Name of the database . Omit it if the database name is set in the ` < connection_string > ` parameters . <nl> - - ` table ` – Name of the table . <nl> + - ` table ` – Name of the table and schema if exists . <nl> - ` connection_string ` – Connection string . <nl> - ` invalidate_query ` – Query for checking the dictionary status . Optional parameter . Read more in the section [ Updating dictionaries ] ( external_dicts_dict_lifetime . md # dicts - external_dicts_dict_lifetime ) . <nl> <nl> + ClickHouse receives quoting symbols from ODBC - driver and quote all settings in queries to driver , so it ' s necessary to set table name accordingly to table name case in database . <nl> <nl> # # # Known vulnerability of the ODBC dictionary functionality <nl> <nl> mmm a / docs / ru / query_language / dicts / external_dicts_dict_sources . md <nl> ppp b / docs / ru / query_language / dicts / external_dicts_dict_sources . md <nl> <nl> ` ` ` xml <nl> < odbc > <nl> < db > DatabaseName < / db > <nl> - < table > TableName < / table > <nl> + < table > ShemaName . TableName < / table > <nl> < connection_string > DSN = some_parameters < / connection_string > <nl> < invalidate_query > SQL_QUERY < / invalidate_query > <nl> < / odbc > <nl> <nl> <nl> Поля настройки : <nl> <nl> - - ` db ` - имя базы данных . Не указывать , если имя базы задано в параметрах ` < connection_string > ` . <nl> - - ` table ` - имя таблицы . <nl> + - ` db ` - имя базы данных . Не указывать , если имя базы задано в параметрах . ` < connection_string > ` . <nl> + - ` table ` - имя таблицы и схемы , если она есть . <nl> - ` connection_string ` - строка соединения . <nl> - ` invalidate_query ` - запрос для проверки статуса словаря . Необязательный параметр . Читайте подробнее в разделе [ Обновление словарей ] ( external_dicts_dict_lifetime . md # dicts - external_dicts_dict_lifetime ) . <nl> <nl> + ClickHouse получает от ODBC - драйвера информацию о квотировании и квотирует настройки в запросах к драйверу , поэтому имя таблицы нужно указывать в соответствии с регистром имени таблицы в базе данных . <nl> + <nl> # # # Выявленная уязвимость в функционировании ODBC словарей <nl> <nl> ! ! ! attention <nl> | CLICKHOUSE - 4067 : Fixes in odbc dictionaries . Now dictionaries receives bridge path from global config ( as it was before ) . Quotation performed on table and schema independently . Add tests with postgres interaction . Update documentation | ClickHouse/ClickHouse | c951ec7bada9acf502ec9b97d9f38c91dd24443f | 2018-10-15T14:49:23Z |
mmm a / protos / route_guide . proto <nl> ppp b / protos / route_guide . proto <nl> service RouteGuide { <nl> / / A simple RPC . <nl> / / <nl> / / Obtains the feature at a given position . <nl> + / / <nl> + / / A feature with an empty name is returned if there ' s no feature at the given <nl> + / / position . <nl> rpc GetFeature ( Point ) returns ( Feature ) { } <nl> <nl> / / A server - to - client streaming RPC . <nl> | Update the comment of GetFeature to clarify its unintuitive behavior | grpc/grpc | b224d6a50008f60ebe4983c87d5d386175d9d9c3 | 2015-02-26T00:03:09Z |
mmm a / src / mips / lithium - codegen - mips . cc <nl> ppp b / src / mips / lithium - codegen - mips . cc <nl> void LCodeGen : : DoTransitionElementsKind ( LTransitionElementsKind * instr ) { <nl> __ RecordWriteField ( object_reg , HeapObject : : kMapOffset , new_map_reg , <nl> scratch , GetRAState ( ) , kDontSaveFPRegs ) ; <nl> } else { <nl> - PushSafepointRegistersScope scope ( this , Safepoint : : kWithRegisters ) ; <nl> + PushSafepointRegistersScope scope ( <nl> + this , Safepoint : : kWithRegistersAndDoubles ) ; <nl> __ mov ( a0 , object_reg ) ; <nl> __ li ( a1 , Operand ( to_map ) ) ; <nl> TransitionElementsKindStub stub ( from_kind , to_kind ) ; <nl> __ CallStub ( & stub ) ; <nl> - RecordSafepointWithRegisters ( <nl> + RecordSafepointWithRegistersAndDoubles ( <nl> instr - > pointer_map ( ) , 0 , Safepoint : : kNoLazyDeopt ) ; <nl> } <nl> __ bind ( & not_applicable ) ; <nl> | MIPS : Store doubles before calling into the elements transition stub | v8/v8 | e12b6ff35d4d497f79648f64df57e399db3b1ef0 | 2013-08-13T23:34:34Z |
mmm a / xbmc / cores / dvdplayer / DVDPlayer . cpp <nl> ppp b / xbmc / cores / dvdplayer / DVDPlayer . cpp <nl> bool CDVDPlayer : : OpenDemuxStream ( ) <nl> return true ; <nl> } <nl> <nl> - void CDVDPlayer : : OpenDefaultStreams ( ) <nl> + void CDVDPlayer : : OpenDefaultStreams ( bool reset ) <nl> { <nl> / / bypass for DVDs . The DVD Navigator has already dictated which streams to open . <nl> if ( m_pInputStream - > IsStreamType ( DVDSTREAM_TYPE_DVD ) ) <nl> void CDVDPlayer : : OpenDefaultStreams ( ) <nl> valid = false ; <nl> for ( SelectionStreams : : iterator it = streams . begin ( ) ; it ! = streams . end ( ) & & ! valid ; + + it ) <nl> { <nl> - if ( OpenVideoStream ( it - > id , it - > source ) ) <nl> + if ( OpenVideoStream ( it - > id , it - > source , reset ) ) <nl> valid = true ; ; <nl> } <nl> if ( ! valid ) <nl> void CDVDPlayer : : OpenDefaultStreams ( ) <nl> <nl> for ( SelectionStreams : : iterator it = streams . begin ( ) ; it ! = streams . end ( ) & & ! valid ; + + it ) <nl> { <nl> - if ( OpenAudioStream ( it - > id , it - > source ) ) <nl> + if ( OpenAudioStream ( it - > id , it - > source , reset ) ) <nl> valid = true ; <nl> } <nl> if ( ! valid ) <nl> bool CDVDPlayer : : ReadPacket ( DemuxPacket * & packet , CDemuxStream * & stream ) <nl> { <nl> m_SelectionStreams . Clear ( STREAM_NONE , STREAM_SOURCE_DEMUX ) ; <nl> m_SelectionStreams . Update ( m_pInputStream , m_pDemuxer ) ; <nl> - OpenDefaultStreams ( ) ; <nl> + OpenDefaultStreams ( false ) ; <nl> return true ; <nl> } <nl> <nl> void CDVDPlayer : : ToFFRW ( int iSpeed ) <nl> SetPlaySpeed ( iSpeed * DVD_PLAYSPEED_NORMAL ) ; <nl> } <nl> <nl> - bool CDVDPlayer : : OpenAudioStream ( int iStream , int source ) <nl> + bool CDVDPlayer : : OpenAudioStream ( int iStream , int source , bool reset ) <nl> { <nl> CLog : : Log ( LOGNOTICE , " Opening audio stream : % i source : % i " , iStream , source ) ; <nl> <nl> bool CDVDPlayer : : OpenAudioStream ( int iStream , int source ) <nl> return false ; <nl> } <nl> } <nl> - else <nl> + else if ( reset ) <nl> m_dvdPlayerAudio . SendMessage ( new CDVDMsg ( CDVDMsg : : GENERAL_RESET ) ) ; <nl> <nl> / * store information about stream * / <nl> bool CDVDPlayer : : OpenAudioStream ( int iStream , int source ) <nl> return true ; <nl> } <nl> <nl> - bool CDVDPlayer : : OpenVideoStream ( int iStream , int source ) <nl> + bool CDVDPlayer : : OpenVideoStream ( int iStream , int source , bool reset ) <nl> { <nl> CLog : : Log ( LOGNOTICE , " Opening video stream : % i source : % i " , iStream , source ) ; <nl> <nl> bool CDVDPlayer : : OpenVideoStream ( int iStream , int source ) <nl> return false ; <nl> } <nl> } <nl> - else <nl> + else if ( reset ) <nl> m_dvdPlayerVideo . SendMessage ( new CDVDMsg ( CDVDMsg : : GENERAL_RESET ) ) ; <nl> <nl> / * store information about stream * / <nl> mmm a / xbmc / cores / dvdplayer / DVDPlayer . h <nl> ppp b / xbmc / cores / dvdplayer / DVDPlayer . h <nl> class CDVDPlayer : public IPlayer , public CThread , public IDVDPlayer <nl> virtual void OnExit ( ) ; <nl> virtual void Process ( ) ; <nl> <nl> - bool OpenAudioStream ( int iStream , int source ) ; <nl> - bool OpenVideoStream ( int iStream , int source ) ; <nl> + bool OpenAudioStream ( int iStream , int source , bool reset = true ) ; <nl> + bool OpenVideoStream ( int iStream , int source , bool reset = true ) ; <nl> bool OpenSubtitleStream ( int iStream , int source ) ; <nl> bool OpenTeletextStream ( int iStream , int source ) ; <nl> bool CloseAudioStream ( bool bWaitForBuffers ) ; <nl> class CDVDPlayer : public IPlayer , public CThread , public IDVDPlayer <nl> <nl> bool OpenInputStream ( ) ; <nl> bool OpenDemuxStream ( ) ; <nl> - void OpenDefaultStreams ( ) ; <nl> + void OpenDefaultStreams ( bool reset = true ) ; <nl> <nl> void UpdateApplication ( double timeout ) ; <nl> void UpdatePlayState ( double timeout ) ; <nl> | dvdplayer : avoid resetting players on stream change ( pvr ) | xbmc/xbmc | 56395a278d3f819d5aaaa0cff481bb3e80eb43d6 | 2012-11-07T17:37:01Z |
mmm a / lib / Frontend / CompilerInvocation . cpp <nl> ppp b / lib / Frontend / CompilerInvocation . cpp <nl> static bool ParseDiagnosticArgs ( DiagnosticOptions & Opts , ArgList & Args , <nl> } <nl> <nl> / / Lifted from the clang driver . <nl> - static void PrintArg ( raw_ostream & OS , const char * Arg , bool Quote ) { <nl> + static void PrintArg ( raw_ostream & OS , const char * Arg , StringRef TempDir ) { <nl> const bool Escape = std : : strpbrk ( Arg , " \ " \ \ $ " ) ; <nl> <nl> - if ( ! Quote & & ! Escape ) { <nl> + if ( StringRef ( Arg ) . startswith ( TempDir ) ) { <nl> + / / Don ' t write temporary file names in the debug info . This would prevent <nl> + / / incremental llvm compilation because we would generate different IR on <nl> + / / every compiler invocation . <nl> + Arg = " < temporary - file > " ; <nl> + } <nl> + <nl> + if ( ! Escape ) { <nl> OS < < Arg ; <nl> return ; <nl> } <nl> void CompilerInvocation : : buildDWARFDebugFlags ( std : : string & Output , <nl> const ArrayRef < const char * > & Args , <nl> StringRef SDKPath , <nl> StringRef ResourceDir ) { <nl> + / / This isn ' t guaranteed to be the same temp directory as what the driver <nl> + / / uses , but it ' s highly likely . <nl> + llvm : : SmallString < 128 > TDir ; <nl> + llvm : : sys : : path : : system_temp_directory ( true , TDir ) ; <nl> + <nl> llvm : : raw_string_ostream OS ( Output ) ; <nl> interleave ( Args , <nl> - [ & ] ( const char * Argument ) { PrintArg ( OS , Argument , false ) ; } , <nl> + [ & ] ( const char * Argument ) { PrintArg ( OS , Argument , TDir . str ( ) ) ; } , <nl> [ & ] { OS < < " " ; } ) ; <nl> <nl> / / Inject the SDK path and resource dir if they are nonempty and missing . <nl> void CompilerInvocation : : buildDWARFDebugFlags ( std : : string & Output , <nl> } <nl> if ( ! haveSDKPath ) { <nl> OS < < " - sdk " ; <nl> - PrintArg ( OS , SDKPath . data ( ) , false ) ; <nl> + PrintArg ( OS , SDKPath . data ( ) , TDir . str ( ) ) ; <nl> } <nl> if ( ! haveResourceDir ) { <nl> OS < < " - resource - dir " ; <nl> - PrintArg ( OS , ResourceDir . data ( ) , false ) ; <nl> + PrintArg ( OS , ResourceDir . data ( ) , TDir . str ( ) ) ; <nl> } <nl> } <nl> <nl> mmm a / lib / SILOptimizer / SILCombiner / SILCombinerMiscVisitors . cpp <nl> ppp b / lib / SILOptimizer / SILCombiner / SILCombinerMiscVisitors . cpp <nl> SILInstruction * SILCombiner : : visitLoadInst ( LoadInst * LI ) { <nl> / / Given a load with multiple struct_extracts / tuple_extracts and no other <nl> / / uses , canonicalize the load into several ( struct_element_addr ( load ) ) <nl> / / pairs . <nl> - using ProjInstPairTy = std : : pair < Projection , SingleValueInstruction * > ; <nl> + <nl> + struct ProjInstPair { <nl> + Projection P ; <nl> + SingleValueInstruction * I ; <nl> + <nl> + / / When sorting , just look at the projection and ignore the instruction . <nl> + bool operator < ( const ProjInstPair & RHS ) const { return P < RHS . P ; } <nl> + } ; <nl> <nl> / / Go through the loads uses and add any users that are projections to the <nl> / / projection list . <nl> - llvm : : SmallVector < ProjInstPairTy , 8 > Projections ; <nl> + llvm : : SmallVector < ProjInstPair , 8 > Projections ; <nl> for ( auto * UI : getNonDebugUses ( LI ) ) { <nl> auto * User = UI - > getUser ( ) ; <nl> <nl> SILInstruction * SILCombiner : : visitLoadInst ( LoadInst * LI ) { <nl> Projection * LastProj = nullptr ; <nl> LoadInst * LastNewLoad = nullptr ; <nl> for ( auto & Pair : Projections ) { <nl> - auto & Proj = Pair . first ; <nl> - auto * Inst = Pair . second ; <nl> + auto & Proj = Pair . P ; <nl> + auto * Inst = Pair . I ; <nl> <nl> / / If this projection is the same as the last projection we processed , just <nl> / / replace all uses of the projection with the load we created previously . <nl> mmm a / test / DebugInfo / compiler - flags . swift <nl> ppp b / test / DebugInfo / compiler - flags . swift <nl> <nl> / / CHECK - LLDB - NOT : debug_pubnames <nl> / / CHECK - LLDB : apple_names <nl> / / CHECK - LLDB - NOT : debug_pubnames <nl> + <nl> + / / Check that we don ' t write temporary file names in the debug info <nl> + / / RUN : TMPDIR = abc / def % target - swift - frontend % s - I abc / def / xyz - g - emit - ir - o - | % FileCheck - - check - prefix CHECK - TEMP % s <nl> + / / CHECK - TEMP : ! DICompileUnit ( { { . * } } flags : " { { . * } } - I < temporary - file > <nl> + <nl> mmm a / utils / check - incremental <nl> ppp b / utils / check - incremental <nl> from __future__ import print_function <nl> import os <nl> import subprocess <nl> import sys <nl> + import time <nl> <nl> <nl> VERBOSE = False <nl> def compile_and_stat ( compile_args , output_file ) : <nl> subprocess . check_call ( compile_args ) <nl> <nl> md5 = subprocess . check_output ( [ " md5 " , " - q " , output_file ] ) <nl> - mtime = os . path . getmtime ( output_file ) <nl> + mtime = time . ctime ( os . path . getmtime ( output_file ) ) <nl> <nl> if VERBOSE : <nl> - print ( " time = { } " . format ( md5 ) ) <nl> - print ( " md5 = " + mtime ) <nl> + print ( " time = " + str ( mtime ) ) <nl> + print ( " md5 = " + md5 ) <nl> <nl> return ( md5 , mtime ) <nl> <nl> | Merge remote - tracking branch ' origin / master ' into master - next | apple/swift | ff97d8b15000eae624551b9b11351c91a176f972 | 2018-02-02T03:29:10Z |
mmm a / modules / imgproc / include / opencv2 / imgproc . hpp <nl> ppp b / modules / imgproc / include / opencv2 / imgproc . hpp <nl> class CV_EXPORTS_W Subdiv2D <nl> Point2f bottomRight ; <nl> } ; <nl> <nl> - class LineSegmentDetector : public Algorithm <nl> + class CV_EXPORTS_W LineSegmentDetector : public Algorithm <nl> { <nl> public : <nl> / * * <nl> class LineSegmentDetector : public Algorithm <nl> * * 1 corresponds to 0 . 1 mean false alarms <nl> * This vector will be calculated _only_ when the objects type is REFINE_ADV <nl> * / <nl> - virtual void detect ( InputArray _image , OutputArray _lines , <nl> + CV_WRAP virtual void detect ( InputArray _image , OutputArray _lines , <nl> OutputArray width = noArray ( ) , OutputArray prec = noArray ( ) , <nl> OutputArray nfa = noArray ( ) ) = 0 ; <nl> <nl> class LineSegmentDetector : public Algorithm <nl> * Should have the size of the image , where the lines were found <nl> * @ param lines The lines that need to be drawn <nl> * / <nl> - virtual void drawSegments ( InputOutputArray _image , InputArray lines ) = 0 ; <nl> + CV_WRAP virtual void drawSegments ( InputOutputArray _image , InputArray lines ) = 0 ; <nl> <nl> / * * <nl> * Draw both vectors on the image canvas . Uses blue for lines 1 and red for lines 2 . <nl> class LineSegmentDetector : public Algorithm <nl> * Should have the size of the image , where the lines were found <nl> * @ return The number of mismatching pixels between lines1 and lines2 . <nl> * / <nl> - virtual int compareSegments ( const Size & size , InputArray lines1 , InputArray lines2 , InputOutputArray _image = noArray ( ) ) = 0 ; <nl> + CV_WRAP virtual int compareSegments ( const Size & size , InputArray lines1 , InputArray lines2 , InputOutputArray _image = noArray ( ) ) = 0 ; <nl> <nl> virtual ~ LineSegmentDetector ( ) { } ; <nl> } ; <nl> <nl> / / ! Returns a pointer to a LineSegmentDetector class . <nl> - CV_EXPORTS Ptr < LineSegmentDetector > createLineSegmentDetectorPtr ( <nl> + CV_EXPORTS_W Ptr < LineSegmentDetector > createLineSegmentDetectorPtr ( <nl> int _refine = LSD_REFINE_STD , double _scale = 0 . 8 , <nl> double _sigma_scale = 0 . 6 , double _quant = 2 . 0 , double _ang_th = 22 . 5 , <nl> double _log_eps = 0 , double _density_th = 0 . 7 , int _n_bins = 1024 ) ; <nl> mmm a / modules / python / src2 / cv2 . cpp <nl> ppp b / modules / python / src2 / cv2 . cpp <nl> typedef Ptr < StereoSGBM > Ptr_StereoSGBM ; <nl> <nl> typedef Ptr < cv : : softcascade : : ChannelFeatureBuilder > Ptr_ChannelFeatureBuilder ; <nl> typedef Ptr < CLAHE > Ptr_CLAHE ; <nl> - <nl> + typedef Ptr < LineSegmentDetector > Ptr_LineSegmentDetector ; <nl> + <nl> typedef SimpleBlobDetector : : Params SimpleBlobDetector_Params ; <nl> <nl> typedef cvflann : : flann_distance_t cvflann_flann_distance_t ; <nl> | exposed LineSegemntDetector to python | opencv/opencv | f0b050fa887762e333081b8741e633b4efad2cc0 | 2013-09-30T10:30:00Z |
new file mode 100644 <nl> index 00000000000 . . 448a5faaa5c <nl> mmm / dev / null <nl> ppp b / tests / performance / float_mod . xml <nl> <nl> + < test > <nl> + < query > SELECT count ( ) FROM numbers ( 100000000 ) WHERE NOT ignore ( number % 1 . 1 ) < / query > <nl> + < / test > <nl> | Add performance test | ClickHouse/ClickHouse | 16ba0f91d7a65bc018e1480749b380227da9126a | 2020-07-21T10:38:14Z |
mmm a / src / core / transport / chttp2_transport . c <nl> ppp b / src / core / transport / chttp2_transport . c <nl> static void recv_data ( void * tp , gpr_slice * slices , size_t nslices , <nl> <nl> static void reading_action ( void * pt , int iomgr_success_ignored ) { <nl> grpc_chttp2_transport * t = pt ; <nl> - gpr_log ( GPR_DEBUG , " reading_action " ) ; <nl> grpc_endpoint_notify_on_read ( t - > ep , recv_data , t ) ; <nl> } <nl> <nl> | Spam cleanup | grpc/grpc | 9ae6f23fb9cd5ec0bde83d06b7a9465dfa9b9e25 | 2015-06-30T23:33:45Z |
mmm a / tensorflow / contrib / lite / java / ovic / BUILD <nl> ppp b / tensorflow / contrib / lite / java / ovic / BUILD <nl> java_binary ( <nl> tags = [ " no_oss " ] , <nl> deps = [ <nl> " / / tensorflow / contrib / lite / java / ovic : ovicbenchmarkerlib_java " , <nl> + " / / tensorflow / contrib / lite / java / ovic : ovicdetectionbenchmarkerlib_java " , <nl> ] , <nl> ) <nl> <nl> java_test ( <nl> data = [ <nl> " / / tensorflow / contrib / lite / java / ovic / src / testdata : coco_labels . txt " , <nl> " / / tensorflow / contrib / lite / java / ovic / src / testdata : ovic_testdata " , <nl> - " @ tflite_mobilenet_ssd_quant / / : detect . tflite " , <nl> ] , <nl> javacopts = JAVACOPTS , <nl> tags = [ " no_oss " ] , <nl> mmm a / tensorflow / contrib / lite / java / ovic / README . md <nl> ppp b / tensorflow / contrib / lite / java / ovic / README . md <nl> <nl> - # Benchmarker for LPIRC Workshop at CVPR 2018 <nl> + # OVIC Benchmarker for NIPS 2018 <nl> <nl> - This folder contains building code for track one of the [ Low Power ImageNet Recognition Challenge workshop at CVPR 2018 . ] ( https : / / rebootingcomputing . ieee . org / home / sitemap / 14 - lpirc / 80 - low - power - image - recognition - challenge - lpirc - 2018 ) <nl> + This folder contains the SDK for track one of the [ Low Power ImageNet Recognition Challenge workshop at NIPS 2018 . ] ( https : / / lpirc . ecn . purdue . edu / ) <nl> <nl> # # Pre - requisite <nl> <nl> You can run test with Bazel as below . This helps to ensure that the installation <nl> <nl> ` ` ` sh <nl> bazel test - - cxxopt = - - std = c + + 11 / / tensorflow / contrib / lite / java / ovic : OvicClassifierTest - - cxxopt = - Wno - all - - test_output = all <nl> + <nl> + bazel test - - cxxopt = - - std = c + + 11 / / tensorflow / contrib / lite / java / ovic : OvicDetectorTest - - cxxopt = - Wno - all - - test_output = all <nl> ` ` ` <nl> <nl> # # # Test your submissions <nl> Once you have a submission that follows the instructions from the [ competition s <nl> <nl> # # # # Validate using randomly generated images <nl> <nl> - You can call the validator binary below to verify that your model fits the format requirements . This often helps you to catch size mismatches ( e . g . output should be [ 1 , 1001 ] instead of [ 1 , 1 , 1 , 1001 ] ) . Let say the submission file is located at ` / path / to / my_model . lite ` , then call : <nl> + You can call the validator binary below to verify that your model fits the format requirements . This often helps you to catch size mismatches ( e . g . output for classification should be [ 1 , 1001 ] instead of [ 1 , 1 , 1 , 1001 ] ) . Let say the submission file is located at ` / path / to / my_model . lite ` , then call : <nl> <nl> ` ` ` sh <nl> bazel build - - cxxopt = - - std = c + + 11 / / tensorflow / contrib / lite / java / ovic : ovic_validator - - cxxopt = - Wno - all <nl> - bazel - bin / tensorflow / contrib / lite / java / ovic / ovic_validator / path / to / my_model . lite <nl> + bazel - bin / tensorflow / contrib / lite / java / ovic / ovic_validator / path / to / my_model . lite classify <nl> ` ` ` <nl> <nl> Successful validation should print the following message to terminal : <nl> Successfully validated / path / to / my_model . lite . <nl> <nl> ` ` ` <nl> <nl> + To validate detection models , use the same command but provide " detect " as the second argument instead of " classify " . <nl> + <nl> + <nl> # # # # Test that the model produces sensible outcomes <nl> <nl> You can go a step further to verify that the model produces results as expected . This helps you catch bugs during TOCO conversion ( e . g . using the wrong mean and std values ) . <nl> The test images can be found at ` tensorflow / contrib / lite / java / ovic / src / testdata / <nl> filegroup ( <nl> name = " ovic_testdata " , <nl> srcs = [ <nl> + " @ tflite_ovic_testdata / / : detect . lite " , <nl> " @ tflite_ovic_testdata / / : float_model . lite " , <nl> " @ tflite_ovic_testdata / / : low_res_model . lite " , <nl> " @ tflite_ovic_testdata / / : quantized_model . lite " , <nl> filegroup ( <nl> . . . <nl> ` ` ` <nl> <nl> - * Modify ` OvicClassifierTest . java ` to test your model . <nl> + * Modify ` OvicClassifierTest . java ` and ` OvicDetectorTest . java ` to test your model . <nl> <nl> Change ` TEST_IMAGE_PATH ` to ` my_test_image . jpg ` . Change either ` FLOAT_MODEL_PATH ` or ` QUANTIZED_MODEL_PATH ` to ` my_model . lite ` depending on whether your model runs inference in float or [ 8 - bit ] ( https : / / www . tensorflow . org / performance / quantization ) . <nl> <nl> bazel build - c opt - - cxxopt = - - std = c + + 11 - - cxxopt = - Wno - all / / tensorflow / contrib / l <nl> adb install - r bazel - bin / tensorflow / contrib / lite / java / ovic / demo / app / ovic_benchmarker_binary . apk <nl> ` ` ` <nl> <nl> - Start the app and click the ` Start ` button in dark green . The button should turn bright green , signaling that the experiment is running . The benchmarking results will be displayed after about the ` WALL_TIME ` you specified above . For example : <nl> + Start the app and pick a task by clicking either the ` CLF ` button for classification or the ` DET ` button for detection . The button should turn bright green , signaling that the experiment is running . The benchmarking results will be displayed after about the ` WALL_TIME ` you specified above . For example : <nl> <nl> ` ` ` <nl> my_model . lite : Average latency = 158 . 6ms after 20 runs . <nl> Note : the benchmarking results can be quite different depending on the backgroun <nl> | quantized_model . lite | 85 | 74 | <nl> | low_res_model . lite | 4 . 2 | 4 . 0 | <nl> <nl> - Since Pixel 2 has excellent support for 8 - bit quantized models , we strongly recommend you to check out the [ quantization training tutorial ] ( https : / / www . tensorflow . org / performance / quantization ) . <nl> + Since Pixel 2 has excellent support for 8 - bit quantized models , we strongly recommend you to check out the [ quantization training tutorial ] ( https : / / github . com / tensorflow / tensorflow / tree / master / tensorflow / contrib / quantize ) . <nl> <nl> mmm a / tensorflow / contrib / lite / java / ovic / demo / app / BUILD <nl> ppp b / tensorflow / contrib / lite / java / ovic / demo / app / BUILD <nl> android_binary ( <nl> " / / tensorflow / contrib / lite / java / ovic / src / testdata : coco_labels . txt " , <nl> " / / tensorflow / contrib / lite / java / ovic / src / testdata : labels . txt " , <nl> " / / tensorflow / contrib / lite / java / ovic / src / testdata : ovic_testdata " , <nl> - " @ tflite_mobilenet_ssd_quant / / : detect . tflite " , <nl> ] , <nl> assets_dir = " " , <nl> custom_package = " ovic . demo . app " , <nl> mmm a / tensorflow / contrib / lite / java / ovic / demo / app / OvicBenchmarkerActivity . java <nl> ppp b / tensorflow / contrib / lite / java / ovic / demo / app / OvicBenchmarkerActivity . java <nl> public void initializeTest ( boolean benchmarkClassification ) throws IOException { <nl> benchmarker = new OvicDetectorBenchmarker ( WALL_TIME ) ; <nl> labelPath = " coco_labels . txt " ; <nl> testImagePath = " test_image_224 . jpg " ; <nl> - modelPath = " detect . tflite " ; <nl> + modelPath = " detect . lite " ; <nl> } <nl> AssetManager am = getAssets ( ) ; <nl> AssetFileDescriptor fileDescriptor = am . openFd ( modelPath ) ; <nl> mmm a / tensorflow / contrib / lite / java / ovic / src / main / java / org / tensorflow / ovic / OvicBenchmarker . java <nl> ppp b / tensorflow / contrib / lite / java / ovic / src / main / java / org / tensorflow / ovic / OvicBenchmarker . java <nl> <nl> protected int imgHeight = 224 ; <nl> protected int imgWidth = 224 ; <nl> <nl> - / * * Preprocess parameters ( only used when input is float ) . * / <nl> - protected static final float IMAGE_MEAN = 127 . 5f ; <nl> - protected static final float IMAGE_STD = 127 . 5f ; <nl> - <nl> - / * * Whether input is float or quantized . * / <nl> - protected Boolean quantizedInput = null ; <nl> - <nl> / * Preallocated buffers for storing image data in . * / <nl> protected int [ ] intValues = null ; <nl> <nl> public boolean processBitmap ( Bitmap bitmap ) throws IOException , InterruptedExcep <nl> * Input buffer must be loaded in intValues and output will be placed in imgData . <nl> * / <nl> protected void loadsInputToByteBuffer ( ) { <nl> - if ( imgData = = null | | intValues = = null | | quantizedInput = = null ) { <nl> + if ( imgData = = null | | intValues = = null ) { <nl> throw new RuntimeException ( " Benchmarker is not yet ready to test . " ) ; <nl> } <nl> / / Convert the image to ByteBuffer . <nl> protected void loadsInputToByteBuffer ( ) { <nl> for ( int i = 0 ; i < imgHeight ; + + i ) { <nl> for ( int j = 0 ; j < imgWidth ; + + j ) { <nl> final int pixelValue = intValues [ pixel + + ] ; <nl> - if ( quantizedInput ) { <nl> - / / Quantized model <nl> - imgData . put ( ( byte ) ( ( pixelValue > > 16 ) & 0xFF ) ) ; <nl> - imgData . put ( ( byte ) ( ( pixelValue > > 8 ) & 0xFF ) ) ; <nl> - imgData . put ( ( byte ) ( pixelValue & 0xFF ) ) ; <nl> - } else { <nl> - / / Float model <nl> - imgData . putFloat ( ( ( ( pixelValue > > 16 ) & 0xFF ) - IMAGE_MEAN ) / IMAGE_STD ) ; <nl> - imgData . putFloat ( ( ( ( pixelValue > > 8 ) & 0xFF ) - IMAGE_MEAN ) / IMAGE_STD ) ; <nl> - imgData . putFloat ( ( ( pixelValue & 0xFF ) - IMAGE_MEAN ) / IMAGE_STD ) ; <nl> - } <nl> + imgData . put ( ( byte ) ( ( pixelValue > > 16 ) & 0xFF ) ) ; <nl> + imgData . put ( ( byte ) ( ( pixelValue > > 8 ) & 0xFF ) ) ; <nl> + imgData . put ( ( byte ) ( pixelValue & 0xFF ) ) ; <nl> } <nl> } <nl> long endTime = SystemClock . uptimeMillis ( ) ; <nl> mmm a / tensorflow / contrib / lite / java / ovic / src / main / java / org / tensorflow / ovic / OvicClassifierBenchmarker . java <nl> ppp b / tensorflow / contrib / lite / java / ovic / src / main / java / org / tensorflow / ovic / OvicClassifierBenchmarker . java <nl> public void getReadyToTest ( InputStream labelInputStream , MappedByteBuffer model ) <nl> int [ ] inputDims = classifier . getInputDims ( ) ; <nl> imgHeight = inputDims [ 1 ] ; <nl> imgWidth = inputDims [ 2 ] ; <nl> - quantizedInput = true ; <nl> / / Only accept QUANTIZED_UINT8 input . <nl> imgData = ByteBuffer . allocateDirect ( DIM_BATCH_SIZE * imgHeight * imgWidth * DIM_PIXEL_SIZE ) ; <nl> imgData . order ( ByteOrder . nativeOrder ( ) ) ; <nl> mmm a / tensorflow / contrib / lite / java / ovic / src / main / java / org / tensorflow / ovic / OvicDetector . java <nl> ppp b / tensorflow / contrib / lite / java / ovic / src / main / java / org / tensorflow / ovic / OvicDetector . java <nl> <nl> / * * Labels corresponding to the output of the vision model . * / <nl> private final List < String > labelList ; <nl> <nl> - / * * Define the output format . * / <nl> - private final Boolean inputIsFloat ; <nl> - <nl> / * * Number of detections per image . 10 for demo , 100 for the actual competition . * / <nl> - private static final int NUM_RESULTS = 10 ; <nl> + private static final int NUM_RESULTS = 100 ; <nl> <nl> / * * The output arrays for the mobilenet SSD . * / <nl> private float [ ] [ ] [ ] outputLocations ; <nl> <nl> / / Create the TfLite interpreter . <nl> tflite = new Interpreter ( model , new Interpreter . Options ( ) . setNumThreads ( 1 ) ) ; <nl> inputDims = TestHelper . getInputDims ( tflite , 0 ) ; <nl> - inputIsFloat = TestHelper . getInputDataType ( tflite , 0 ) . equals ( " float " ) ; <nl> + if ( TestHelper . getInputDataType ( tflite , 0 ) . equals ( " float " ) ) { <nl> + throw new RuntimeException ( " The model ' s input must be QUANTIZED_UINT8 . " ) ; <nl> + } <nl> if ( inputDims . length ! = 4 ) { <nl> throw new RuntimeException ( " The model ' s input dimensions must be 4 ( BWHC ) . " ) ; <nl> } <nl> <nl> result = new OvicDetectionResult ( NUM_RESULTS ) ; <nl> } <nl> <nl> - public Boolean quantizedInput ( ) { <nl> - return ! inputIsFloat ; <nl> - } <nl> - <nl> / * * Reads label list from Assets . * / <nl> private static List < String > loadLabelList ( InputStream labelInputStream ) throws IOException { <nl> List < String > labelList = new ArrayList < > ( ) ; <nl> boolean detectByteBuffer ( ByteBuffer imgData , int imageId ) { <nl> if ( tflite = = null ) { <nl> throw new RuntimeException ( TAG + " : Detector has not been initialized ; Failed . " ) ; <nl> } <nl> - if ( inputIsFloat = = null ) { <nl> - throw new RuntimeException ( TAG + " : Detector input type has not been resolved . " ) ; <nl> - } <nl> <nl> Object [ ] inputArray = { imgData } ; <nl> tflite . runForMultipleInputsOutputs ( inputArray , outputMap ) ; <nl> boolean detectByteBuffer ( ByteBuffer imgData , int imageId ) { <nl> / / Update the results . <nl> result . resetTo ( latency , imageId ) ; <nl> for ( int i = 0 ; i < NUM_RESULTS ; i + + ) { <nl> - result . addBox ( outputLocations [ 0 ] [ i ] [ 1 ] * inputDims [ 1 ] , <nl> - outputLocations [ 0 ] [ i ] [ 0 ] * inputDims [ 1 ] , <nl> - outputLocations [ 0 ] [ i ] [ 3 ] * inputDims [ 2 ] , <nl> - outputLocations [ 0 ] [ i ] [ 2 ] * inputDims [ 2 ] , <nl> - Math . round ( outputClasses [ 0 ] [ i ] + 1 / * Label offset * / ) , <nl> - outputScores [ 0 ] [ i ] ) ; <nl> + / / The model returns normalized coordinates [ start_y , start_x , end_y , end_x ] . <nl> + / / The boxes expect pixel coordinates [ x1 , y1 , x2 , y2 ] . <nl> + / / The height and width of the input are in inputDims [ 1 ] and inputDims [ 2 ] . <nl> + / / The following command converts between model outputs to bounding boxes . <nl> + result . addBox ( <nl> + outputLocations [ 0 ] [ i ] [ 1 ] * inputDims [ 2 ] , <nl> + outputLocations [ 0 ] [ i ] [ 0 ] * inputDims [ 1 ] , <nl> + outputLocations [ 0 ] [ i ] [ 3 ] * inputDims [ 2 ] , <nl> + outputLocations [ 0 ] [ i ] [ 2 ] * inputDims [ 1 ] , <nl> + Math . round ( outputClasses [ 0 ] [ i ] + 1 / * Label offset * / ) , <nl> + outputScores [ 0 ] [ i ] ) ; <nl> } <nl> return true ; / / Marks that the result is available . <nl> } <nl> mmm a / tensorflow / contrib / lite / java / ovic / src / main / java / org / tensorflow / ovic / OvicDetectorBenchmarker . java <nl> ppp b / tensorflow / contrib / lite / java / ovic / src / main / java / org / tensorflow / ovic / OvicDetectorBenchmarker . java <nl> public void getReadyToTest ( InputStream labelInputStream , MappedByteBuffer model ) <nl> try { <nl> Log . i ( TAG , " Creating detector . " ) ; <nl> detector = new OvicDetector ( labelInputStream , model ) ; <nl> - quantizedInput = detector . quantizedInput ( ) ; <nl> int [ ] inputDims = detector . getInputDims ( ) ; <nl> imgHeight = inputDims [ 1 ] ; <nl> imgWidth = inputDims [ 2 ] ; <nl> - if ( quantizedInput ) { <nl> - imgData = ByteBuffer . allocateDirect ( DIM_BATCH_SIZE * imgHeight * imgWidth * DIM_PIXEL_SIZE ) ; <nl> - } else { <nl> - imgData = <nl> - ByteBuffer . allocateDirect ( DIM_BATCH_SIZE * imgHeight * imgWidth * DIM_PIXEL_SIZE * 4 ) ; <nl> - } <nl> + imgData = ByteBuffer . allocateDirect ( DIM_BATCH_SIZE * imgHeight * imgWidth * DIM_PIXEL_SIZE ) ; <nl> imgData . order ( ByteOrder . nativeOrder ( ) ) ; <nl> intValues = new int [ imgHeight * imgWidth ] ; <nl> benchmarkStarted = false ; <nl> mmm a / tensorflow / contrib / lite / java / ovic / src / main / java / org / tensorflow / ovic / OvicValidator . java <nl> ppp b / tensorflow / contrib / lite / java / ovic / src / main / java / org / tensorflow / ovic / OvicValidator . java <nl> <nl> private static void printUsage ( PrintStream s ) { <nl> s . println ( " Java program that validates a submission model . " ) ; <nl> s . println ( ) ; <nl> - s . println ( " Usage : ovic_validator < submission file > " ) ; <nl> + s . println ( " Usage : ovic_validator < submission file > [ < task > ] " ) ; <nl> s . println ( ) ; <nl> s . println ( " Where : " ) ; <nl> - s . println ( " < submission file > is the model in TfLite format ; " ) ; <nl> + s . println ( " < submission file > is the model in TfLite format , " ) ; <nl> + s . println ( " < task > is the type of the task : \ " classify \ " ( default ) or \ " detect \ " ; " ) ; <nl> } <nl> <nl> public static void main ( String [ ] args ) { <nl> - if ( args . length ! = 1 ) { <nl> + if ( args . length ! = 2 ) { <nl> printUsage ( System . err ) ; <nl> System . exit ( 1 ) ; <nl> } <nl> + final String modelFile = args [ 0 ] ; <nl> + final String taskString = args [ 1 ] ; <nl> + final boolean isDetection = taskString . equals ( " detect " ) ; <nl> + / / Label file for detection is never used , so the same label file is used for both tasks . <nl> final String labelPath = <nl> " tensorflow / contrib / lite / java / ovic / src / testdata / labels . txt " ; <nl> <nl> - final String modelFile = args [ 0 ] ; <nl> try { <nl> + MappedByteBuffer model = loadModelFile ( modelFile ) ; <nl> File labelsfile = new File ( labelPath ) ; <nl> InputStream labelsInputStream = new FileInputStream ( labelsfile ) ; <nl> - MappedByteBuffer model = loadModelFile ( modelFile ) ; <nl> - OvicClassifier classifier = new OvicClassifier ( labelsInputStream , model ) ; <nl> - ByteBuffer imgData = createByteBufferForClassifier ( classifier ) ; <nl> - OvicClassificationResult testResult = classifier . classifyByteBuffer ( imgData ) ; <nl> - if ( testResult . topKClasses . isEmpty ( ) ) { <nl> - throw new RuntimeException ( " Failed to return top K predictions . " ) ; <nl> + <nl> + if ( isDetection ) { <nl> + OvicDetector detector = new OvicDetector ( labelsInputStream , model ) ; <nl> + int [ ] inputDims = detector . getInputDims ( ) ; <nl> + ByteBuffer imgData = createByteBuffer ( inputDims [ 1 ] , inputDims [ 2 ] ) ; <nl> + if ( ! detector . detectByteBuffer ( imgData , / * imageId = * / 0 ) ) { <nl> + throw new RuntimeException ( " Failed to return detections . " ) ; <nl> + } <nl> + } else { <nl> + OvicClassifier classifier = new OvicClassifier ( labelsInputStream , model ) ; <nl> + int [ ] inputDims = classifier . getInputDims ( ) ; <nl> + ByteBuffer imgData = createByteBuffer ( inputDims [ 1 ] , inputDims [ 2 ] ) ; <nl> + OvicClassificationResult testResult = classifier . classifyByteBuffer ( imgData ) ; <nl> + if ( testResult . topKClasses . isEmpty ( ) ) { <nl> + throw new RuntimeException ( " Failed to return top K predictions . " ) ; <nl> + } <nl> } <nl> System . out . printf ( " Successfully validated % s . % n " , modelFile ) ; <nl> } catch ( Exception e ) { <nl> public static void main ( String [ ] args ) { <nl> } <nl> } <nl> <nl> - private static ByteBuffer createByteBufferForClassifier ( OvicClassifier classifier ) { <nl> - if ( classifier = = null ) { <nl> - throw new RuntimeException ( " Cannot create image buffer with the classifier . " ) ; <nl> - } <nl> - int [ ] inputDims = classifier . getInputDims ( ) ; <nl> - int imgHeight = inputDims [ 1 ] ; <nl> - int imgWidth = inputDims [ 2 ] ; <nl> + private static ByteBuffer createByteBuffer ( int imgWidth , int imgHeight ) { <nl> ByteBuffer imgData = ByteBuffer . allocateDirect ( imgHeight * imgWidth * 3 ) ; <nl> imgData . order ( ByteOrder . nativeOrder ( ) ) ; <nl> Random rand = new Random ( ) ; <nl> mmm a / tensorflow / contrib / lite / java / ovic / src / test / java / org / tensorflow / ovic / OvicDetectorTest . java <nl> ppp b / tensorflow / contrib / lite / java / ovic / src / test / java / org / tensorflow / ovic / OvicDetectorTest . java <nl> <nl> private MappedByteBuffer model = null ; <nl> private ByteBuffer testImage = null ; <nl> <nl> - private static final float IMAGE_MEAN = 128f ; <nl> - private static final float IMAGE_STD = 128f ; <nl> - <nl> - private Boolean quantizedInput = null ; <nl> private static final String LABELS_PATH = <nl> " tensorflow / contrib / lite / java / ovic / src / testdata / coco_labels . txt " ; <nl> private static final String MODEL_PATH = <nl> - " external / tflite_mobilenet_ssd_quant / detect . tflite " ; <nl> + " external / tflite_ovic_testdata / detect . lite " ; <nl> private static final String TEST_IMAGE_PATH = <nl> " external / tflite_ovic_testdata / test_image_224 . jpg " ; <nl> private static final int GROUNDTRUTH = 1 / * Person * / ; <nl> public void setUp ( ) { <nl> <nl> / / Create detector . <nl> detector = new OvicDetector ( labelsInputStream , model ) ; <nl> - quantizedInput = detector . quantizedInput ( ) ; <nl> <nl> / / Load test image and convert into byte buffer . <nl> File imageFile = new File ( TEST_IMAGE_PATH ) ; <nl> private static MappedByteBuffer loadModelFile ( String modelFilePath ) throws IOExc <nl> return fileChannel . map ( FileChannel . MapMode . READ_ONLY , startOffset , declaredLength ) ; <nl> } <nl> <nl> - private ByteBuffer toByteBuffer ( BufferedImage image ) { <nl> - ByteBuffer imgData ; <nl> - if ( quantizedInput ) { <nl> - imgData = ByteBuffer . allocateDirect ( image . getHeight ( ) * image . getWidth ( ) * 3 ) ; <nl> - } else { <nl> - imgData = ByteBuffer . allocateDirect ( image . getHeight ( ) * image . getWidth ( ) * 12 ) ; <nl> - } <nl> + private static ByteBuffer toByteBuffer ( BufferedImage image ) { <nl> + ByteBuffer imgData = ByteBuffer . allocateDirect ( image . getHeight ( ) * image . getWidth ( ) * 3 ) ; <nl> imgData . order ( ByteOrder . nativeOrder ( ) ) ; <nl> for ( int y = 0 ; y < image . getHeight ( ) ; y + + ) { <nl> for ( int x = 0 ; x < image . getWidth ( ) ; x + + ) { <nl> int pixelValue = image . getRGB ( x , y ) ; <nl> - if ( quantizedInput ) { <nl> - / / Quantized model <nl> - imgData . put ( ( byte ) ( ( pixelValue > > 16 ) & 0xFF ) ) ; <nl> - imgData . put ( ( byte ) ( ( pixelValue > > 8 ) & 0xFF ) ) ; <nl> - imgData . put ( ( byte ) ( pixelValue & 0xFF ) ) ; <nl> - } else { <nl> - / / Float model <nl> - imgData . putFloat ( ( ( ( pixelValue > > 16 ) & 0xFF ) - IMAGE_MEAN ) / IMAGE_STD ) ; <nl> - imgData . putFloat ( ( ( ( pixelValue > > 8 ) & 0xFF ) - IMAGE_MEAN ) / IMAGE_STD ) ; <nl> - imgData . putFloat ( ( ( pixelValue & 0xFF ) - IMAGE_MEAN ) / IMAGE_STD ) ; <nl> - } <nl> + imgData . put ( ( byte ) ( ( pixelValue > > 16 ) & 0xFF ) ) ; <nl> + imgData . put ( ( byte ) ( ( pixelValue > > 8 ) & 0xFF ) ) ; <nl> + imgData . put ( ( byte ) ( pixelValue & 0xFF ) ) ; <nl> } <nl> } <nl> return imgData ; <nl> mmm a / tensorflow / contrib / lite / java / ovic / src / testdata / BUILD <nl> ppp b / tensorflow / contrib / lite / java / ovic / src / testdata / BUILD <nl> licenses ( [ " notice " ] ) # Apache 2 . 0 <nl> filegroup ( <nl> name = " ovic_testdata " , <nl> srcs = [ <nl> + " @ tflite_ovic_testdata / / : detect . lite " , <nl> " @ tflite_ovic_testdata / / : float_model . lite " , <nl> " @ tflite_ovic_testdata / / : low_res_model . lite " , <nl> " @ tflite_ovic_testdata / / : quantized_model . lite " , <nl> | Check in sample detection model for OVIC . | tensorflow/tensorflow | d43d73b21697dafdb8dc0b7c8d64a3d98ac1b6b8 | 2018-10-19T19:41:41Z |
mmm a / src / execution . cc <nl> ppp b / src / execution . cc <nl> MaybeHandle < Object > Execution : : TryCall ( Handle < JSFunction > func , <nl> DCHECK ( catcher . HasCaught ( ) ) ; <nl> DCHECK ( isolate - > has_pending_exception ( ) ) ; <nl> DCHECK ( isolate - > external_caught_exception ( ) ) ; <nl> - if ( exception_out ! = NULL ) { <nl> - if ( isolate - > pending_exception ( ) = = <nl> - isolate - > heap ( ) - > termination_exception ( ) ) { <nl> - is_termination = true ; <nl> - } else { <nl> + if ( isolate - > pending_exception ( ) = = <nl> + isolate - > heap ( ) - > termination_exception ( ) ) { <nl> + is_termination = true ; <nl> + } else { <nl> + if ( exception_out ! = NULL ) { <nl> * exception_out = v8 : : Utils : : OpenHandle ( * catcher . Exception ( ) ) ; <nl> } <nl> } <nl> - isolate - > OptionalRescheduleException ( true ) ; <nl> + isolate - > OptionalRescheduleException ( false ) ; <nl> } <nl> <nl> DCHECK ( ! isolate - > has_pending_exception ( ) ) ; <nl> - DCHECK ( ! isolate - > external_caught_exception ( ) ) ; <nl> } <nl> if ( is_termination ) isolate - > TerminateExecution ( ) ; <nl> return maybe_result ; <nl> mmm a / test / cctest / test - thread - termination . cc <nl> ppp b / test / cctest / test - thread - termination . cc <nl> TEST ( ErrorObjectAfterTermination ) { <nl> / / TODO ( yangguo ) : crbug / 403509 . Check for empty handle instead . <nl> CHECK ( error - > IsUndefined ( ) ) ; <nl> } <nl> + <nl> + <nl> + void InnerTryCallTerminate ( const v8 : : FunctionCallbackInfo < v8 : : Value > & args ) { <nl> + CHECK ( ! v8 : : V8 : : IsExecutionTerminating ( args . GetIsolate ( ) ) ) ; <nl> + v8 : : Handle < v8 : : Object > global = CcTest : : global ( ) ; <nl> + v8 : : Handle < v8 : : Function > loop = <nl> + v8 : : Handle < v8 : : Function > : : Cast ( global - > Get ( v8_str ( " loop " ) ) ) ; <nl> + i : : MaybeHandle < i : : Object > result = <nl> + i : : Execution : : TryCall ( v8 : : Utils : : OpenHandle ( ( * loop ) ) , <nl> + v8 : : Utils : : OpenHandle ( ( * global ) ) , 0 , NULL , NULL ) ; <nl> + CHECK ( result . is_null ( ) ) ; <nl> + CHECK ( v8 : : V8 : : IsExecutionTerminating ( CcTest : : isolate ( ) ) ) ; <nl> + } <nl> + <nl> + <nl> + TEST ( TerminationInInnerTryCall ) { <nl> + v8 : : Isolate * isolate = CcTest : : isolate ( ) ; <nl> + v8 : : HandleScope scope ( isolate ) ; <nl> + v8 : : Handle < v8 : : ObjectTemplate > global_template = CreateGlobalTemplate ( <nl> + CcTest : : isolate ( ) , TerminateCurrentThread , DoLoopNoCall ) ; <nl> + global_template - > Set ( <nl> + v8_str ( " inner_try_call_terminate " ) , <nl> + v8 : : FunctionTemplate : : New ( isolate , InnerTryCallTerminate ) ) ; <nl> + v8 : : Handle < v8 : : Context > context = <nl> + v8 : : Context : : New ( CcTest : : isolate ( ) , NULL , global_template ) ; <nl> + v8 : : Context : : Scope context_scope ( context ) ; <nl> + v8 : : TryCatch try_catch ; <nl> + CompileRun ( " inner_try_call_terminate ( ) " ) ; <nl> + CHECK ( try_catch . HasTerminated ( ) ) ; <nl> + } <nl> | Correctly propagate terminate exception in TryCall . | v8/v8 | a49b55b78844557b65a98e7a77dd26078157ed7f | 2015-02-17T11:44:43Z |
mmm a / arangod / HashIndex / hash - array . cpp <nl> ppp b / arangod / HashIndex / hash - array . cpp <nl> <nl> / / - - SECTION - - COMPARISON <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief destroys an element , removing any allocated memory <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - static void DestroyElement ( TRI_hash_array_t * array , <nl> - TRI_index_element_t * element ) { <nl> - TRI_index_element_t : : free ( element ) ; <nl> - / * <nl> - TRI_ASSERT_EXPENSIVE ( element ! = nullptr ) ; <nl> - TRI_ASSERT_EXPENSIVE ( element - > _document ! = nullptr ) ; <nl> - TRI_ASSERT_EXPENSIVE ( element - > _subObjects ! = nullptr ) ; <nl> - TRI_Free ( TRI_UNKNOWN_MEM_ZONE , element - > _subObjects ) ; <nl> - <nl> - element - > _document = nullptr ; <nl> - element - > _subObjects = nullptr ; <nl> - * / <nl> - } <nl> - <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief determines if a key corresponds to an element <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> void TRI_DestroyHashArray ( TRI_hash_array_t * array ) { <nl> <nl> for ( ; p < e ; + + p ) { <nl> auto item = * p ; <nl> - if ( item ! = nullptr & & item - > document ( ) ! = nullptr ) { <nl> - DestroyElement ( array , item ) ; <nl> + if ( item ! = nullptr ) { <nl> + TRI_index_element_t : : free ( item ) ; <nl> } <nl> } <nl> <nl> TRI_index_element_t * TRI_LookupByKeyHashArray ( TRI_hash_array_t const * array , <nl> <nl> i = k = HashKey ( array , key ) % n ; <nl> <nl> - for ( ; i < n & & array - > _table [ i ] ! = nullptr & & array - > _table [ i ] - > document ( ) ! = nullptr & & ! IsEqualKeyElement ( array , key , array - > _table [ i ] ) ; + + i ) ; <nl> + for ( ; i < n & & array - > _table [ i ] ! = nullptr & & ! IsEqualKeyElement ( array , key , array - > _table [ i ] ) ; + + i ) ; <nl> if ( i = = n ) { <nl> - for ( i = 0 ; i < k & & array - > _table [ i ] ! = nullptr & & array - > _table [ i ] - > document ( ) ! = nullptr & & ! IsEqualKeyElement ( array , key , array - > _table [ i ] ) ; + + i ) ; <nl> + for ( i = 0 ; i < k & & array - > _table [ i ] ! = nullptr & & ! IsEqualKeyElement ( array , key , array - > _table [ i ] ) ; + + i ) ; <nl> } <nl> <nl> TRI_ASSERT_EXPENSIVE ( i < n ) ; <nl> int TRI_InsertKeyHashArray ( triagens : : arango : : HashIndex * hashIndex , <nl> <nl> i = k = HashKey ( array , key ) % n ; <nl> <nl> - for ( ; i < n & & array - > _table [ i ] ! = nullptr & & array - > _table [ i ] - > document ( ) ! = nullptr & & ! IsEqualKeyElement ( array , key , array - > _table [ i ] ) ; + + i ) ; <nl> + for ( ; i < n & & array - > _table [ i ] ! = nullptr & & ! IsEqualKeyElement ( array , key , array - > _table [ i ] ) ; + + i ) ; <nl> if ( i = = n ) { <nl> - for ( i = 0 ; i < k & & array - > _table [ i ] ! = nullptr & & array - > _table [ i ] - > document ( ) ! = nullptr & & ! IsEqualKeyElement ( array , key , array - > _table [ i ] ) ; + + i ) ; <nl> + for ( i = 0 ; i < k & & array - > _table [ i ] ! = nullptr & & ! IsEqualKeyElement ( array , key , array - > _table [ i ] ) ; + + i ) ; <nl> } <nl> <nl> TRI_ASSERT_EXPENSIVE ( i < n ) ; <nl> int TRI_InsertKeyHashArray ( triagens : : arango : : HashIndex * hashIndex , <nl> / / if we found an element , return <nl> / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> <nl> - bool found = ( arrayElement ! = nullptr & & arrayElement - > document ( ) ! = nullptr ) ; <nl> + bool found = ( arrayElement ! = nullptr ) ; <nl> <nl> if ( found ) { <nl> return TRI_ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED ; <nl> } <nl> <nl> array - > _table [ i ] = const_cast < TRI_index_element_t * > ( element ) ; <nl> + TRI_ASSERT ( array - > _table [ i ] ! = nullptr & & array - > _table [ i ] - > document ( ) ! = nullptr ) ; <nl> array - > _nrUsed + + ; <nl> <nl> return TRI_ERROR_NO_ERROR ; <nl> int TRI_RemoveElementHashArray ( triagens : : arango : : HashIndex * hashIndex , <nl> <nl> i = k = HashElement ( array , element ) % n ; <nl> <nl> - for ( ; i < n & & array - > _table [ i ] ! = nullptr & & array - > _table [ i ] - > document ( ) ! = nullptr & & element - > document ( ) ! = array - > _table [ i ] - > document ( ) ; + + i ) ; <nl> + for ( ; i < n & & array - > _table [ i ] ! = nullptr & & element - > document ( ) ! = array - > _table [ i ] - > document ( ) ; + + i ) ; <nl> if ( i = = n ) { <nl> - for ( i = 0 ; i < k & & array - > _table [ i ] ! = nullptr & & array - > _table [ i ] - > document ( ) ! = nullptr & & element - > document ( ) ! = array - > _table [ i ] - > document ( ) ; + + i ) ; <nl> + for ( i = 0 ; i < k & & array - > _table [ i ] ! = nullptr & & element - > document ( ) ! = array - > _table [ i ] - > document ( ) ; + + i ) ; <nl> } <nl> <nl> TRI_ASSERT_EXPENSIVE ( i < n ) ; <nl> int TRI_RemoveElementHashArray ( triagens : : arango : : HashIndex * hashIndex , <nl> / / if we did not find such an item return false <nl> / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> <nl> - bool found = ( arrayElement ! = nullptr & & arrayElement - > document ( ) ! = nullptr ) ; <nl> + bool found = ( arrayElement ! = nullptr ) ; <nl> <nl> if ( ! found ) { <nl> return TRI_RESULT_ELEMENT_NOT_FOUND ; <nl> int TRI_RemoveElementHashArray ( triagens : : arango : : HashIndex * hashIndex , <nl> / / remove item - destroy any internal memory associated with the element structure <nl> / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> <nl> - DestroyElement ( array , arrayElement ) ; <nl> + TRI_index_element_t : : free ( arrayElement ) ; <nl> + array - > _table [ i ] = nullptr ; <nl> array - > _nrUsed - - ; <nl> <nl> / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> int TRI_RemoveElementHashArray ( triagens : : arango : : HashIndex * hashIndex , <nl> <nl> k = TRI_IncModU64 ( i , n ) ; <nl> <nl> - while ( array - > _table [ k ] ! = nullptr & & array - > _table [ k ] - > document ( ) ! = nullptr ) { <nl> + while ( array - > _table [ k ] ! = nullptr ) { <nl> uint64_t j = HashElement ( array , array - > _table [ k ] ) % n ; <nl> <nl> if ( ( i < k & & ! ( i < j & & j < = k ) ) | | ( k < i & & ! ( i < j | | j < = k ) ) ) { <nl> | Fixed a bug in the usage of HashIndex tables , with the new index element . | arangodb/arangodb | b6d373f746c9879ab5e3eb0333d924489d95db3c | 2015-08-17T10:42:25Z |
mmm a / torch / nn / modules / container . py <nl> ppp b / torch / nn / modules / container . py <nl> def forward ( self , input ) : <nl> class ModuleList ( Module ) : <nl> r " " " Holds submodules in a list . <nl> <nl> - ModuleList can be indexed like a regular Python list , but modules it <nl> - contains are properly registered , and will be visible by all Module methods . <nl> + : class : ` ~ torch . nn . ModuleList ` can be indexed like a regular Python list , but <nl> + modules it contains are properly registered , and will be visible by all <nl> + : class : ` ~ torch . nn . Module ` methods . <nl> <nl> Arguments : <nl> modules ( iterable , optional ) : an iterable of modules to add <nl> class ModuleDict ( Module ) : <nl> or another : class : ` ~ torch . nn . ModuleDict ` ( the argument to : meth : ` ~ torch . nn . ModuleDict . update ` ) . <nl> <nl> Note that : meth : ` ~ torch . nn . ModuleDict . update ` with other unordered mapping <nl> - types ( e . g . , Python ' s plain ` ` dict ` ` ) doesn ' t not preserve order of the <nl> + types ( e . g . , Python ' s plain ` ` dict ` ` ) does not preserve the order of the <nl> merged mapping . <nl> <nl> - <nl> Arguments : <nl> modules ( iterable , optional ) : a mapping ( dictionary ) of ( string : module ) <nl> - or an iterable of key / value pairs of type ( string , module ) <nl> + or an iterable of key - value pairs of type ( string , module ) <nl> <nl> Example : : <nl> <nl> def values ( self ) : <nl> return self . _modules . values ( ) <nl> <nl> def update ( self , modules ) : <nl> - r " " " Update the ModuleDict with the key / value pairs from a mapping or <nl> - an iterable , overwriting existing keys . <nl> + r " " " Update the : class : ` ~ torch . nn . ModuleDict ` with the key - value pairs from a <nl> + mapping or an iterable , overwriting existing keys . <nl> + <nl> + . . note : : <nl> + If : attr : ` modules ` is an ` ` OrderedDict ` ` , a : class : ` ~ torch . nn . ModuleDict ` , or <nl> + an iterable of key - value pairs , the order of new elements in it is preserved . <nl> <nl> Arguments : <nl> - modules ( iterable ) : a mapping ( dictionary ) of ( string : : class : ` ~ torch . nn . Module ` ` ) or <nl> - an iterable of key / value pairs of type ( string , : class : ` ~ torch . nn . Module ` ` ) <nl> + modules ( iterable ) : a mapping ( dictionary ) from string to : class : ` ~ torch . nn . Module ` , <nl> + or an iterable of key - value pairs of type ( string , : class : ` ~ torch . nn . Module ` ) <nl> " " " <nl> if not isinstance ( modules , container_abcs . Iterable ) : <nl> raise TypeError ( " ModuleDict . update should be called with an " <nl> def update ( self , modules ) : <nl> class ParameterList ( Module ) : <nl> r " " " Holds parameters in a list . <nl> <nl> - ParameterList can be indexed like a regular Python list , but parameters it <nl> - contains are properly registered , and will be visible by all Module methods . <nl> + : class : ` ~ torch . nn . ParameterList ` can be indexed like a regular Python <nl> + list , but parameters it contains are properly registered , and will be <nl> + visible by all : class : ` ~ torch . nn . Module ` methods . <nl> <nl> Arguments : <nl> parameters ( iterable , optional ) : an iterable of : class : ` ~ torch . nn . Parameter ` to add <nl> class ParameterDict ( Module ) : <nl> ParameterDict can be indexed like a regular Python dictionary , but parameters it <nl> contains are properly registered , and will be visible by all Module methods . <nl> <nl> + : class : ` ~ torch . nn . ParameterDict ` is an * * ordered * * dictionary that respects <nl> + <nl> + * the order of insertion , and <nl> + <nl> + * in : meth : ` ~ torch . nn . ParameterDict . update ` , the order of the merged ` ` OrderedDict ` ` <nl> + or another : class : ` ~ torch . nn . ParameterDict ` ( the argument to <nl> + : meth : ` ~ torch . nn . ParameterDict . update ` ) . <nl> + <nl> + Note that : meth : ` ~ torch . nn . ParameterDict . update ` with other unordered mapping <nl> + types ( e . g . , Python ' s plain ` ` dict ` ` ) does not preserve the order of the <nl> + merged mapping . <nl> + <nl> Arguments : <nl> parameters ( iterable , optional ) : a mapping ( dictionary ) of <nl> - ( string : : class : ` ~ torch . nn . Parameter ` ) or an iterable of key , value pairs <nl> + ( string : : class : ` ~ torch . nn . Parameter ` ) or an iterable of key - value pairs <nl> of type ( string , : class : ` ~ torch . nn . Parameter ` ) <nl> <nl> Example : : <nl> def values ( self ) : <nl> return self . _parameters . values ( ) <nl> <nl> def update ( self , parameters ) : <nl> - r " " " Update the ParameterDict with the key / value pairs from a mapping or <nl> - an iterable , overwriting existing keys . <nl> + r " " " Update the : class : ` ~ torch . nn . ParameterDict ` with the key - value pairs from a <nl> + mapping or an iterable , overwriting existing keys . <nl> + <nl> + . . note : : <nl> + If : attr : ` parameters ` is an ` ` OrderedDict ` ` , a : class : ` ~ torch . nn . ParameterDict ` , or <nl> + an iterable of key - value pairs , the order of new elements in it is preserved . <nl> <nl> Arguments : <nl> - parameters ( iterable ) : a mapping ( dictionary ) of <nl> - ( string : : class : ` ~ torch . nn . Parameter ` ) or an iterable of <nl> - key / value pairs of type ( string , : class : ` ~ torch . nn . Parameter ` ) <nl> + parameters ( iterable ) : a mapping ( dictionary ) from string to <nl> + : class : ` ~ torch . nn . Parameter ` , or an iterable of <nl> + key - value pairs of type ( string , : class : ` ~ torch . nn . Parameter ` ) <nl> " " " <nl> if not isinstance ( parameters , container_abcs . Iterable ) : <nl> raise TypeError ( " ParametersDict . update should be called with an " <nl> def update ( self , parameters ) : <nl> type ( parameters ) . __name__ ) <nl> <nl> if isinstance ( parameters , container_abcs . Mapping ) : <nl> - if isinstance ( parameters , OrderedDict ) : <nl> + if isinstance ( parameters , ( OrderedDict , ParameterDict ) ) : <nl> for key , parameter in parameters . items ( ) : <nl> self [ key ] = parameter <nl> else : <nl> | Further improvements of nn . container docs | pytorch/pytorch | 1d827b727180baaecfe1a0c50d6e5c4847cdbdb0 | 2019-03-11T01:30:39Z |
mmm a / client / redef_macros . h <nl> ppp b / client / redef_macros . h <nl> <nl> # pragma pop_macro ( " ONCE " ) <nl> <nl> / / db / instance . h <nl> - # pragma pop_macro ( " OPREAD " ) <nl> # pragma pop_macro ( " OPWRITE " ) <nl> <nl> / / stdafx . h <nl> mmm a / db / db . sln <nl> ppp b / db / db . sln <nl> <nl> - <nl> - Microsoft Visual Studio Solution File , Format Version 10 . 00 <nl> - # Visual Studio 2008 <nl> - Project ( " { 8BC9CEB8 - 8B4A - 11D0 - 8D11 - 00A0C91BC942 } " ) = " mongod " , " db . vcproj " , " { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } " <nl> - EndProject <nl> - Project ( " { 2150E333 - 8FDC - 42A3 - 9474 - 1A3956D46DE8 } " ) = " examples " , " examples " , " { 4082881B - EB00 - 486F - 906C - 843B8EC06E18 } " <nl> - ProjectSection ( SolutionItems ) = preProject <nl> - driverHelpers . cpp = driverHelpers . cpp <nl> - EndProjectSection <nl> - EndProject <nl> - Project ( " { 2150E333 - 8FDC - 42A3 - 9474 - 1A3956D46DE8 } " ) = " dbtests " , " dbtests " , " { C72EBEDD - 342D - 4371 - 8B0D - D7505902FA69 } " <nl> - EndProject <nl> - Project ( " { 2150E333 - 8FDC - 42A3 - 9474 - 1A3956D46DE8 } " ) = " shell " , " shell " , " { 2CABB3B8 - C9A6 - 478D - 9463 - 0B37799ED708 } " <nl> - EndProject <nl> - Project ( " { 2150E333 - 8FDC - 42A3 - 9474 - 1A3956D46DE8 } " ) = " tools " , " tools " , " { 2B262D59 - 9DC7 - 4BF1 - A431 - 1BD4966899A5 } " <nl> - ProjectSection ( SolutionItems ) = preProject <nl> - . . \ tools \ bridge . cpp = . . \ tools \ bridge . cpp <nl> - . . \ tools \ sniffer . cpp = . . \ tools \ sniffer . cpp <nl> - EndProjectSection <nl> - EndProject <nl> - Project ( " { 8BC9CEB8 - 8B4A - 11D0 - 8D11 - 00A0C91BC942 } " ) = " mongos " , " . . \ s \ dbgrid . vcproj " , " { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } " <nl> - EndProject <nl> - Project ( " { 8BC9CEB8 - 8B4A - 11D0 - 8D11 - 00A0C91BC942 } " ) = " test " , " . . \ dbtests \ test . vcproj " , " { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } " <nl> - EndProject <nl> - Global <nl> - GlobalSection ( SolutionConfigurationPlatforms ) = preSolution <nl> - Debug Recstore | Win32 = Debug Recstore | Win32 <nl> - Debug | Win32 = Debug | Win32 <nl> - Release | Win32 = Release | Win32 <nl> - EndGlobalSection <nl> - GlobalSection ( ProjectConfigurationPlatforms ) = postSolution <nl> - { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } . Debug Recstore | Win32 . ActiveCfg = Debug | Win32 <nl> - { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } . Debug Recstore | Win32 . Build . 0 = Debug | Win32 <nl> - { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } . Debug | Win32 . ActiveCfg = Debug | Win32 <nl> - { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } . Debug | Win32 . Build . 0 = Debug | Win32 <nl> - { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } . Release | Win32 . ActiveCfg = Release | Win32 <nl> - { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } . Release | Win32 . Build . 0 = Release | Win32 <nl> - { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } . Debug Recstore | Win32 . ActiveCfg = Debug Recstore | Win32 <nl> - { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } . Debug Recstore | Win32 . Build . 0 = Debug Recstore | Win32 <nl> - { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } . Debug | Win32 . ActiveCfg = Debug | Win32 <nl> - { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } . Debug | Win32 . Build . 0 = Debug | Win32 <nl> - { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } . Release | Win32 . ActiveCfg = Release | Win32 <nl> - { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } . Release | Win32 . Build . 0 = Release | Win32 <nl> - { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } . Debug Recstore | Win32 . ActiveCfg = Debug Recstore | Win32 <nl> - { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } . Debug Recstore | Win32 . Build . 0 = Debug Recstore | Win32 <nl> - { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } . Debug | Win32 . ActiveCfg = Debug | Win32 <nl> - { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } . Debug | Win32 . Build . 0 = Debug | Win32 <nl> - { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } . Release | Win32 . ActiveCfg = Release | Win32 <nl> - { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } . Release | Win32 . Build . 0 = Release | Win32 <nl> - EndGlobalSection <nl> - GlobalSection ( SolutionProperties ) = preSolution <nl> - HideSolutionNode = FALSE <nl> - EndGlobalSection <nl> - EndGlobal <nl> + <nl> + Microsoft Visual Studio Solution File , Format Version 10 . 00 <nl> + # Visual Studio 2008 <nl> + Project ( " { 8BC9CEB8 - 8B4A - 11D0 - 8D11 - 00A0C91BC942 } " ) = " mongod " , " db . vcproj " , " { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } " <nl> + EndProject <nl> + Project ( " { 2150E333 - 8FDC - 42A3 - 9474 - 1A3956D46DE8 } " ) = " examples " , " examples " , " { 4082881B - EB00 - 486F - 906C - 843B8EC06E18 } " <nl> + ProjectSection ( SolutionItems ) = preProject <nl> + driverHelpers . cpp = driverHelpers . cpp <nl> + EndProjectSection <nl> + EndProject <nl> + Project ( " { 2150E333 - 8FDC - 42A3 - 9474 - 1A3956D46DE8 } " ) = " dbtests " , " dbtests " , " { C72EBEDD - 342D - 4371 - 8B0D - D7505902FA69 } " <nl> + EndProject <nl> + Project ( " { 2150E333 - 8FDC - 42A3 - 9474 - 1A3956D46DE8 } " ) = " shell " , " shell " , " { 2CABB3B8 - C9A6 - 478D - 9463 - 0B37799ED708 } " <nl> + EndProject <nl> + Project ( " { 2150E333 - 8FDC - 42A3 - 9474 - 1A3956D46DE8 } " ) = " tools " , " tools " , " { 2B262D59 - 9DC7 - 4BF1 - A431 - 1BD4966899A5 } " <nl> + ProjectSection ( SolutionItems ) = preProject <nl> + . . \ tools \ bridge . cpp = . . \ tools \ bridge . cpp <nl> + . . \ tools \ sniffer . cpp = . . \ tools \ sniffer . cpp <nl> + EndProjectSection <nl> + EndProject <nl> + Project ( " { 8BC9CEB8 - 8B4A - 11D0 - 8D11 - 00A0C91BC942 } " ) = " mongos " , " . . \ s \ dbgrid . vcproj " , " { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } " <nl> + EndProject <nl> + Project ( " { 8BC9CEB8 - 8B4A - 11D0 - 8D11 - 00A0C91BC942 } " ) = " test " , " . . \ dbtests \ test . vcproj " , " { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } " <nl> + EndProject <nl> + Global <nl> + GlobalSection ( SolutionConfigurationPlatforms ) = preSolution <nl> + Debug Recstore | Win32 = Debug Recstore | Win32 <nl> + Debug | Win32 = Debug | Win32 <nl> + Release | Win32 = Release | Win32 <nl> + EndGlobalSection <nl> + GlobalSection ( ProjectConfigurationPlatforms ) = postSolution <nl> + { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } . Debug Recstore | Win32 . ActiveCfg = Debug | Win32 <nl> + { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } . Debug Recstore | Win32 . Build . 0 = Debug | Win32 <nl> + { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } . Debug | Win32 . ActiveCfg = Debug | Win32 <nl> + { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } . Debug | Win32 . Build . 0 = Debug | Win32 <nl> + { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } . Release | Win32 . ActiveCfg = Release | Win32 <nl> + { 215B2D68 - 0A70 - 4D10 - 8E75 - B31010C62A91 } . Release | Win32 . Build . 0 = Release | Win32 <nl> + { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } . Debug Recstore | Win32 . ActiveCfg = Debug Recstore | Win32 <nl> + { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } . Debug Recstore | Win32 . Build . 0 = Debug Recstore | Win32 <nl> + { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } . Debug | Win32 . ActiveCfg = Debug | Win32 <nl> + { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } . Debug | Win32 . Build . 0 = Debug | Win32 <nl> + { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } . Release | Win32 . ActiveCfg = Release | Win32 <nl> + { E03717ED - 69B4 - 4D21 - BC55 - DF6690B585C6 } . Release | Win32 . Build . 0 = Release | Win32 <nl> + { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } . Debug Recstore | Win32 . ActiveCfg = Debug Recstore | Win32 <nl> + { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } . Debug Recstore | Win32 . Build . 0 = Debug Recstore | Win32 <nl> + { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } . Debug | Win32 . ActiveCfg = Debug | Win32 <nl> + { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } . Debug | Win32 . Build . 0 = Debug | Win32 <nl> + { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } . Release | Win32 . ActiveCfg = Release | Win32 <nl> + { 215B2D68 - 0A70 - 4D10 - 8E75 - B33010C62A91 } . Release | Win32 . Build . 0 = Release | Win32 <nl> + EndGlobalSection <nl> + GlobalSection ( SolutionProperties ) = preSolution <nl> + HideSolutionNode = FALSE <nl> + EndGlobalSection <nl> + EndGlobal <nl> mmm a / db / instance . cpp <nl> ppp b / db / instance . cpp <nl> <nl> <nl> namespace mongo { <nl> <nl> + inline void opread ( Message & m ) { if ( _diaglog . level & 2 ) _diaglog . readop ( ( char * ) m . data , m . data - > len ) ; } <nl> + inline void opwrite ( m ) ( Message & m ) { if ( _diaglog . level & 1 ) _diaglog . write ( ( char * ) m . data , m . data - > len ) ; } <nl> + <nl> void receivedKillCursors ( Message & m ) ; <nl> void receivedUpdate ( Message & m , CurOp & op ) ; <nl> void receivedDelete ( Message & m , CurOp & op ) ; <nl> namespace mongo { <nl> if ( op = = dbQuery ) { <nl> if ( strstr ( ns , " . $ cmd " ) ) { <nl> isCommand = true ; <nl> - OPWRITE ; <nl> + opwrite ( m ) ; <nl> if ( strstr ( ns , " . $ cmd . sys . " ) ) { <nl> if ( strstr ( ns , " $ cmd . sys . inprog " ) ) { <nl> inProgCmd ( m , dbresponse ) ; <nl> namespace mongo { <nl> <nl> } <nl> else { <nl> - OPREAD ; <nl> + opread ( m ) ; <nl> } <nl> } <nl> else if ( op = = dbGetMore ) { <nl> - OPREAD ; <nl> + opread ( m ) ; <nl> } <nl> else { <nl> - OPWRITE ; <nl> + opwrite ( m ) ; <nl> } <nl> <nl> globalOpCounters . gotOp ( op , isCommand ) ; <nl> mmm a / db / instance . h <nl> ppp b / db / instance . h <nl> namespace mongo { <nl> <nl> extern string dbExecCommand ; <nl> <nl> - # define OPWRITE if ( _diaglog . level & 1 ) _diaglog . write ( ( char * ) m . data , m . data - > len ) ; <nl> - # define OPREAD if ( _diaglog . level & 2 ) _diaglog . readop ( ( char * ) m . data , m . data - > len ) ; <nl> - <nl> struct DiagLog { <nl> ofstream * f ; <nl> / * 0 = off ; 1 = writes , 2 = reads , 3 = both <nl> | opread doesnt need to be a macro | mongodb/mongo | 1a277506821045e4edea4971cfb10931df046183 | 2010-04-23T23:32:21Z |
new file mode 100644 <nl> index 00000000000 . . 0d7a321de02 <nl> mmm / dev / null <nl> ppp b / test / mjsunit / regress / regress - 447561 . js <nl> <nl> + / / Copyright 2015 the V8 project authors . All rights reserved . <nl> + / / Use of this source code is governed by a BSD - style license that can be <nl> + / / found in the LICENSE file . <nl> + <nl> + __proto__ = / foo / gi ; <nl> + assertEquals ( " foo " , source ) ; <nl> + assertTrue ( global ) ; <nl> + assertTrue ( ignoreCase ) ; <nl> + assertFalse ( multiline ) ; <nl> + assertEquals ( 0 , lastIndex ) ; <nl> | Land test case for RegExp . source . | v8/v8 | 1e905469bea93363b3a6e1352dc3ff56e039c219 | 2015-01-27T15:17:37Z |
mmm a / config . h <nl> ppp b / config . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> <nl> # define PACKAGE " ASE " <nl> # define VERSION " 0 . 8 " <nl> # define WEBSITE " http : / / www . aseprite . org / " <nl> - # define COPYRIGHT " Copyright ( C ) 2001 - 2009 David Capello " <nl> + # define COPYRIGHT " Copyright ( C ) 2001 - 2010 David Capello " <nl> <nl> # define PRINTF verbose_printf <nl> <nl> mmm a / src / app . cpp <nl> ppp b / src / app . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / app . h <nl> ppp b / src / app . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / ase_exception . cpp <nl> ppp b / src / ase_exception . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / ase_exception . h <nl> ppp b / src / ase_exception . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_about . cpp <nl> ppp b / src / commands / cmd_about . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_advanced_mode . cpp <nl> ppp b / src / commands / cmd_advanced_mode . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_background_from_layer . cpp <nl> ppp b / src / commands / cmd_background_from_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_canvas_size . cpp <nl> ppp b / src / commands / cmd_canvas_size . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_cel_properties . cpp <nl> ppp b / src / commands / cmd_cel_properties . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_change_color . cpp <nl> ppp b / src / commands / cmd_change_color . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_change_image_type . cpp <nl> ppp b / src / commands / cmd_change_image_type . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_clear . cpp <nl> ppp b / src / commands / cmd_clear . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_close_file . cpp <nl> ppp b / src / commands / cmd_close_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_configure_screen . cpp <nl> ppp b / src / commands / cmd_configure_screen . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_configure_tools . cpp <nl> ppp b / src / commands / cmd_configure_tools . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_copy . cpp <nl> ppp b / src / commands / cmd_copy . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_copy_cel . cpp <nl> ppp b / src / commands / cmd_copy_cel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_crop . cpp <nl> ppp b / src / commands / cmd_crop . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_cut . cpp <nl> ppp b / src / commands / cmd_cut . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_deselect_mask . cpp <nl> ppp b / src / commands / cmd_deselect_mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_duplicate_layer . cpp <nl> ppp b / src / commands / cmd_duplicate_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_duplicate_sprite . cpp <nl> ppp b / src / commands / cmd_duplicate_sprite . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_exit . cpp <nl> ppp b / src / commands / cmd_exit . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_eyedropper . cpp <nl> ppp b / src / commands / cmd_eyedropper . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_film_editor . cpp <nl> ppp b / src / commands / cmd_film_editor . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_flatten_layers . cpp <nl> ppp b / src / commands / cmd_flatten_layers . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_flip . cpp <nl> ppp b / src / commands / cmd_flip . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_frame_properties . cpp <nl> ppp b / src / commands / cmd_frame_properties . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_grid . cpp <nl> ppp b / src / commands / cmd_grid . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_invert_mask . cpp <nl> ppp b / src / commands / cmd_invert_mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_layer_from_background . cpp <nl> ppp b / src / commands / cmd_layer_from_background . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_layer_properties . cpp <nl> ppp b / src / commands / cmd_layer_properties . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_load_mask . cpp <nl> ppp b / src / commands / cmd_load_mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_mask_all . cpp <nl> ppp b / src / commands / cmd_mask_all . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_mask_by_color . cpp <nl> ppp b / src / commands / cmd_mask_by_color . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_merge_down_layer . cpp <nl> ppp b / src / commands / cmd_merge_down_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_move_cel . cpp <nl> ppp b / src / commands / cmd_move_cel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_new_cel . cpp <nl> ppp b / src / commands / cmd_new_cel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_new_file . cpp <nl> ppp b / src / commands / cmd_new_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_new_frame . cpp <nl> ppp b / src / commands / cmd_new_frame . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_new_layer . cpp <nl> ppp b / src / commands / cmd_new_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_new_layer_set . cpp <nl> ppp b / src / commands / cmd_new_layer_set . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_open_file . cpp <nl> ppp b / src / commands / cmd_open_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_options . cpp <nl> ppp b / src / commands / cmd_options . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_palette_editor . cpp <nl> ppp b / src / commands / cmd_palette_editor . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_paste . cpp <nl> ppp b / src / commands / cmd_paste . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_preview . cpp <nl> ppp b / src / commands / cmd_preview . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_record_screen . cpp <nl> ppp b / src / commands / cmd_record_screen . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_redo . cpp <nl> ppp b / src / commands / cmd_redo . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_refresh . cpp <nl> ppp b / src / commands / cmd_refresh . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_remove_cel . cpp <nl> ppp b / src / commands / cmd_remove_cel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_remove_frame . cpp <nl> ppp b / src / commands / cmd_remove_frame . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_remove_layer . cpp <nl> ppp b / src / commands / cmd_remove_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_reselect_mask . cpp <nl> ppp b / src / commands / cmd_reselect_mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_rotate_canvas . cpp <nl> ppp b / src / commands / cmd_rotate_canvas . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_save_file . cpp <nl> ppp b / src / commands / cmd_save_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_save_mask . cpp <nl> ppp b / src / commands / cmd_save_mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_screen_shot . cpp <nl> ppp b / src / commands / cmd_screen_shot . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_select_file . cpp <nl> ppp b / src / commands / cmd_select_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_sprite_editor . cpp <nl> ppp b / src / commands / cmd_sprite_editor . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_sprite_properties . cpp <nl> ppp b / src / commands / cmd_sprite_properties . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_sprite_size . cpp <nl> ppp b / src / commands / cmd_sprite_size . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_switch_colors . cpp <nl> ppp b / src / commands / cmd_switch_colors . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_tips . cpp <nl> ppp b / src / commands / cmd_tips . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_undo . cpp <nl> ppp b / src / commands / cmd_undo . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / command . cpp <nl> ppp b / src / commands / command . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / command . h <nl> ppp b / src / commands / command . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / commands . cpp <nl> ppp b / src / commands / commands . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / commands . h <nl> ppp b / src / commands / commands . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / commands_list . h <nl> ppp b / src / commands / commands_list . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / fx / cmd_color_curve . cpp <nl> ppp b / src / commands / fx / cmd_color_curve . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / fx / cmd_convolution_matrix . cpp <nl> ppp b / src / commands / fx / cmd_convolution_matrix . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / fx / cmd_despeckle . cpp <nl> ppp b / src / commands / fx / cmd_despeckle . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / fx / cmd_invert_color . cpp <nl> ppp b / src / commands / fx / cmd_invert_color . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / fx / cmd_replace_color . cpp <nl> ppp b / src / commands / fx / cmd_replace_color . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / fx / effectbg . cpp <nl> ppp b / src / commands / fx / effectbg . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / fx / effectbg . h <nl> ppp b / src / commands / fx / effectbg . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / params . h <nl> ppp b / src / commands / params . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / console . cpp <nl> ppp b / src / console . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / console . h <nl> ppp b / src / console . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / context . cpp <nl> ppp b / src / context . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / context . h <nl> ppp b / src / context . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / cfg . cpp <nl> ppp b / src / core / cfg . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / cfg . h <nl> ppp b / src / core / cfg . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / check_args . cpp <nl> ppp b / src / core / check_args . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / check_args . h <nl> ppp b / src / core / check_args . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / color . cpp <nl> ppp b / src / core / color . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / color . h <nl> ppp b / src / core / color . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / core . cpp <nl> ppp b / src / core / core . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / core . h <nl> ppp b / src / core / core . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / dirs . cpp <nl> ppp b / src / core / dirs . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / dirs . h <nl> ppp b / src / core / dirs . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / drop_files . cpp <nl> ppp b / src / core / drop_files . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / drop_files . h <nl> ppp b / src / core / drop_files . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / file_system . cpp <nl> ppp b / src / core / file_system . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / file_system . h <nl> ppp b / src / core / file_system . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / job . cpp <nl> ppp b / src / core / job . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / job . h <nl> ppp b / src / core / job . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / modules . cpp <nl> ppp b / src / core / modules . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / core / modules . h <nl> ppp b / src / core / modules . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / aniedit . cpp <nl> ppp b / src / dialogs / aniedit . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / aniedit . h <nl> ppp b / src / dialogs / aniedit . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / drawtext . cpp <nl> ppp b / src / dialogs / drawtext . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / drawtext . h <nl> ppp b / src / dialogs / drawtext . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / filesel . cpp <nl> ppp b / src / dialogs / filesel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / filesel . h <nl> ppp b / src / dialogs / filesel . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / maskcol . cpp <nl> ppp b / src / dialogs / maskcol . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / maskcol . h <nl> ppp b / src / dialogs / maskcol . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / options . cpp <nl> ppp b / src / dialogs / options . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / options . h <nl> ppp b / src / dialogs / options . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / playfli . cpp <nl> ppp b / src / dialogs / playfli . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / playfli . h <nl> ppp b / src / dialogs / playfli . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / repo . cpp <nl> ppp b / src / dialogs / repo . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / repo . h <nl> ppp b / src / dialogs / repo . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / tips . cpp <nl> ppp b / src / dialogs / tips . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / tips . h <nl> ppp b / src / dialogs / tips . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / vectmap . cpp <nl> ppp b / src / dialogs / vectmap . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / vectmap . h <nl> ppp b / src / dialogs / vectmap . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / colcurve . cpp <nl> ppp b / src / effect / colcurve . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / colcurve . h <nl> ppp b / src / effect / colcurve . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / convmatr . cpp <nl> ppp b / src / effect / convmatr . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / convmatr . h <nl> ppp b / src / effect / convmatr . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / effect . cpp <nl> ppp b / src / effect / effect . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / effect . h <nl> ppp b / src / effect / effect . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / images_ref . cpp <nl> ppp b / src / effect / images_ref . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / images_ref . h <nl> ppp b / src / effect / images_ref . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / invrtcol . cpp <nl> ppp b / src / effect / invrtcol . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / invrtcol . h <nl> ppp b / src / effect / invrtcol . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / median . cpp <nl> ppp b / src / effect / median . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / median . h <nl> ppp b / src / effect / median . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / replcol . cpp <nl> ppp b / src / effect / replcol . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / effect / replcol . h <nl> ppp b / src / effect / replcol . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / ase_format . cpp <nl> ppp b / src / file / ase_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / bmp_format . cpp <nl> ppp b / src / file / bmp_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / file . cpp <nl> ppp b / src / file / file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / file . h <nl> ppp b / src / file / file . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / fli_format . cpp <nl> ppp b / src / file / fli_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / format_options . cpp <nl> ppp b / src / file / format_options . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / format_options . h <nl> ppp b / src / file / format_options . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / gif_format . cpp <nl> ppp b / src / file / gif_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / ico_format . cpp <nl> ppp b / src / file / ico_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / jpeg_format . cpp <nl> ppp b / src / file / jpeg_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / pcx_format . cpp <nl> ppp b / src / file / pcx_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / png_format . cpp <nl> ppp b / src / file / png_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / tga_format . cpp <nl> ppp b / src / file / tga_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / intl / intl . cpp <nl> ppp b / src / intl / intl . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / intl / intl . h <nl> ppp b / src / intl / intl . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / intl / msgids . cpp <nl> ppp b / src / intl / msgids . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / intl / msgids . h <nl> ppp b / src / intl / msgids . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / jinete / jaccel . cpp <nl> ppp b / src / jinete / jaccel . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jaccel . h <nl> ppp b / src / jinete / jaccel . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jalert . cpp <nl> ppp b / src / jinete / jalert . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jalert . h <nl> ppp b / src / jinete / jalert . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jbase . h <nl> ppp b / src / jinete / jbase . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jbox . cpp <nl> ppp b / src / jinete / jbox . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jbox . h <nl> ppp b / src / jinete / jbox . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jbutton . cpp <nl> ppp b / src / jinete / jbutton . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jbutton . h <nl> ppp b / src / jinete / jbutton . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jclipboard . cpp <nl> ppp b / src / jinete / jclipboard . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jclipboard . h <nl> ppp b / src / jinete / jclipboard . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jcombobox . cpp <nl> ppp b / src / jinete / jcombobox . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jcombobox . h <nl> ppp b / src / jinete / jcombobox . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jdraw . cpp <nl> ppp b / src / jinete / jdraw . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jdraw . h <nl> ppp b / src / jinete / jdraw . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jentry . cpp <nl> ppp b / src / jinete / jentry . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jentry . h <nl> ppp b / src / jinete / jentry . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jexception . cpp <nl> ppp b / src / jinete / jexception . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jexception . h <nl> ppp b / src / jinete / jexception . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jfile . cpp <nl> ppp b / src / jinete / jfile . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jfile . h <nl> ppp b / src / jinete / jfile . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jfilesel . cpp <nl> ppp b / src / jinete / jfilesel . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jfilesel . h <nl> ppp b / src / jinete / jfilesel . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jfont . cpp <nl> ppp b / src / jinete / jfont . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jfont . h <nl> ppp b / src / jinete / jfont . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jfontbmp . cpp <nl> ppp b / src / jinete / jfontbmp . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jgrid . cpp <nl> ppp b / src / jinete / jgrid . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jgrid . h <nl> ppp b / src / jinete / jgrid . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jhook . cpp <nl> ppp b / src / jinete / jhook . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jhook . h <nl> ppp b / src / jinete / jhook . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jimage . cpp <nl> ppp b / src / jinete / jimage . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jimage . h <nl> ppp b / src / jinete / jimage . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jinete . cpp <nl> ppp b / src / jinete / jinete . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jinete . h <nl> ppp b / src / jinete / jinete . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jintern . cpp <nl> ppp b / src / jinete / jintern . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jintern . h <nl> ppp b / src / jinete / jintern . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jlabel . cpp <nl> ppp b / src / jinete / jlabel . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jlabel . h <nl> ppp b / src / jinete / jlabel . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jlist . cpp <nl> ppp b / src / jinete / jlist . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jlist . h <nl> ppp b / src / jinete / jlist . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jlistbox . cpp <nl> ppp b / src / jinete / jlistbox . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jlistbox . h <nl> ppp b / src / jinete / jlistbox . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jmanager . cpp <nl> ppp b / src / jinete / jmanager . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jmanager . h <nl> ppp b / src / jinete / jmanager . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jmem . cpp <nl> ppp b / src / jinete / jmem . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jmenu . cpp <nl> ppp b / src / jinete / jmenu . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jmenu . h <nl> ppp b / src / jinete / jmenu . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jmessage . cpp <nl> ppp b / src / jinete / jmessage . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jmessage . h <nl> ppp b / src / jinete / jmessage . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jmutex . cpp <nl> ppp b / src / jinete / jmutex . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jmutex . h <nl> ppp b / src / jinete / jmutex . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jpanel . cpp <nl> ppp b / src / jinete / jpanel . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jpanel . h <nl> ppp b / src / jinete / jpanel . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jpoint . cpp <nl> ppp b / src / jinete / jpoint . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jpoint . h <nl> ppp b / src / jinete / jpoint . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jquickmenu . cpp <nl> ppp b / src / jinete / jquickmenu . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jquickmenu . h <nl> ppp b / src / jinete / jquickmenu . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jrect . cpp <nl> ppp b / src / jinete / jrect . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jrect . h <nl> ppp b / src / jinete / jrect . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jregion . cpp <nl> ppp b / src / jinete / jregion . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jregion . h <nl> ppp b / src / jinete / jregion . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jsep . cpp <nl> ppp b / src / jinete / jsep . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jsep . h <nl> ppp b / src / jinete / jsep . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jsize . cpp <nl> ppp b / src / jinete / jsize . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jsize . h <nl> ppp b / src / jinete / jsize . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jslider . cpp <nl> ppp b / src / jinete / jslider . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jslider . h <nl> ppp b / src / jinete / jslider . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jstream . cpp <nl> ppp b / src / jinete / jstream . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jstream . h <nl> ppp b / src / jinete / jstream . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jstring . cpp <nl> ppp b / src / jinete / jstring . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jstring . h <nl> ppp b / src / jinete / jstring . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jsystem . cpp <nl> ppp b / src / jinete / jsystem . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jsystem . h <nl> ppp b / src / jinete / jsystem . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jtextbox . cpp <nl> ppp b / src / jinete / jtextbox . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jtextbox . h <nl> ppp b / src / jinete / jtextbox . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jtheme . cpp <nl> ppp b / src / jinete / jtheme . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jtheme . h <nl> ppp b / src / jinete / jtheme . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jthread . cpp <nl> ppp b / src / jinete / jthread . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jthread . h <nl> ppp b / src / jinete / jthread . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jtooltips . h <nl> ppp b / src / jinete / jtooltips . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jview . cpp <nl> ppp b / src / jinete / jview . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jview . h <nl> ppp b / src / jinete / jview . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jwidget . cpp <nl> ppp b / src / jinete / jwidget . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jwidget . h <nl> ppp b / src / jinete / jwidget . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jwindow . cpp <nl> ppp b / src / jinete / jwindow . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / jwindow . h <nl> ppp b / src / jinete / jwindow . h <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / themes / jstandard_theme . cpp <nl> ppp b / src / jinete / themes / jstandard_theme . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / jinete / themes / pcx2data . cpp <nl> ppp b / src / jinete / themes / pcx2data . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Read " LICENSE . txt " for more information . <nl> mmm a / src / main . cpp <nl> ppp b / src / main . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / editors . cpp <nl> ppp b / src / modules / editors . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / editors . h <nl> ppp b / src / modules / editors . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / gfx . cpp <nl> ppp b / src / modules / gfx . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / gfx . h <nl> ppp b / src / modules / gfx . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / gfxdata . cpp <nl> ppp b / src / modules / gfxdata . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / gui . cpp <nl> ppp b / src / modules / gui . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / gui . h <nl> ppp b / src / modules / gui . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / palettes . cpp <nl> ppp b / src / modules / palettes . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / palettes . h <nl> ppp b / src / modules / palettes . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / recent . cpp <nl> ppp b / src / modules / recent . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / recent . h <nl> ppp b / src / modules / recent . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / rootmenu . cpp <nl> ppp b / src / modules / rootmenu . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / rootmenu . h <nl> ppp b / src / modules / rootmenu . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / skinneable_theme . cpp <nl> ppp b / src / modules / skinneable_theme . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / skinneable_theme . h <nl> ppp b / src / modules / skinneable_theme . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / tools . cpp <nl> ppp b / src / modules / tools . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / tools . h <nl> ppp b / src / modules / tools . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / algo . cpp <nl> ppp b / src / raster / algo . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / algo . h <nl> ppp b / src / raster / algo . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / blend . cpp <nl> ppp b / src / raster / blend . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / blend . h <nl> ppp b / src / raster / blend . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / brush . cpp <nl> ppp b / src / raster / brush . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / brush . h <nl> ppp b / src / raster / brush . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / cel . cpp <nl> ppp b / src / raster / cel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / cel . h <nl> ppp b / src / raster / cel . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / dirty . cpp <nl> ppp b / src / raster / dirty . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / dirty . h <nl> ppp b / src / raster / dirty . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / gfxobj . cpp <nl> ppp b / src / raster / gfxobj . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / gfxobj . h <nl> ppp b / src / raster / gfxobj . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / image . cpp <nl> ppp b / src / raster / image . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / image . h <nl> ppp b / src / raster / image . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / image_impl . h <nl> ppp b / src / raster / image_impl . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / image_traits . h <nl> ppp b / src / raster / image_traits . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / layer . cpp <nl> ppp b / src / raster / layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / layer . h <nl> ppp b / src / raster / layer . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / mask . cpp <nl> ppp b / src / raster / mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / mask . h <nl> ppp b / src / raster / mask . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / palette . cpp <nl> ppp b / src / raster / palette . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / palette . h <nl> ppp b / src / raster / palette . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / path . cpp <nl> ppp b / src / raster / path . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / path . h <nl> ppp b / src / raster / path . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / quant . cpp <nl> ppp b / src / raster / quant . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / quant . h <nl> ppp b / src / raster / quant . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / raster . h <nl> ppp b / src / raster / raster . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / rotate . cpp <nl> ppp b / src / raster / rotate . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / rotate . h <nl> ppp b / src / raster / rotate . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / sprite . cpp <nl> ppp b / src / raster / sprite . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / sprite . h <nl> ppp b / src / raster / sprite . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / stock . cpp <nl> ppp b / src / raster / stock . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / stock . h <nl> ppp b / src / raster / stock . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / undo . cpp <nl> ppp b / src / raster / undo . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / undo . h <nl> ppp b / src / raster / undo . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / x86 / blenders . s <nl> ppp b / src / raster / x86 / blenders . s <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / x86 / int_mult . s <nl> ppp b / src / raster / x86 / int_mult . s <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / sprite_wrappers . h <nl> ppp b / src / sprite_wrappers . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tests / jinete / 00hello . cpp <nl> ppp b / src / tests / jinete / 00hello . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 01simple . cpp <nl> ppp b / src / tests / jinete / 01simple . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 02label . cpp <nl> ppp b / src / tests / jinete / 02label . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 03slider . cpp <nl> ppp b / src / tests / jinete / 03slider . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 04alert . cpp <nl> ppp b / src / tests / jinete / 04alert . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 05fsel . cpp <nl> ppp b / src / tests / jinete / 05fsel . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 06entry . cpp <nl> ppp b / src / tests / jinete / 06entry . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 07panel . cpp <nl> ppp b / src / tests / jinete / 07panel . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 08txtbox . cpp <nl> ppp b / src / tests / jinete / 08txtbox . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 09lists . cpp <nl> ppp b / src / tests / jinete / 09lists . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 10chcks . cpp <nl> ppp b / src / tests / jinete / 10chcks . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 11file . cpp <nl> ppp b / src / tests / jinete / 11file . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 12qckmnu . cpp <nl> ppp b / src / tests / jinete / 12qckmnu . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 13menu . cpp <nl> ppp b / src / tests / jinete / 13menu . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 14win . cpp <nl> ppp b / src / tests / jinete / 14win . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 15colbut . cpp <nl> ppp b / src / tests / jinete / 15colbut . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 16theme . cpp <nl> ppp b / src / tests / jinete / 16theme . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 17theme . cpp <nl> ppp b / src / tests / jinete / 17theme . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 18tips . cpp <nl> ppp b / src / tests / jinete / 18tips . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 19game . cpp <nl> ppp b / src / tests / jinete / 19game . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 20combo . cpp <nl> ppp b / src / tests / jinete / 20combo . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 21manage . cpp <nl> ppp b / src / tests / jinete / 21manage . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 22xml . cpp <nl> ppp b / src / tests / jinete / 22xml . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / jinete / 23grid . cpp <nl> ppp b / src / tests / jinete / 23grid . cpp <nl> <nl> / * Jinete - a GUI library <nl> - * Copyright ( C ) 2003 - 2009 David Capello . <nl> + * Copyright ( C ) 2003 - 2010 David Capello . <nl> * All rights reserved . <nl> * <nl> * Redistribution and use in source and binary forms , with or without <nl> mmm a / src / tests / raster / 00dirty . cpp <nl> ppp b / src / tests / raster / 00dirty . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tests / raster / 01mask . cpp <nl> ppp b / src / tests / raster / 01mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tests / raster / 02path . cpp <nl> ppp b / src / tests / raster / 02path . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tests / raster / 03sprite . cpp <nl> ppp b / src / tests / raster / 03sprite . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tests / test . h <nl> ppp b / src / tests / test . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tests / test_errno . cpp <nl> ppp b / src / tests / test_errno . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tests / test_file_system . cpp <nl> ppp b / src / tests / test_file_system . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tests / test_intmult . cpp <nl> ppp b / src / tests / test_intmult . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tests / test_jgrid . cpp <nl> ppp b / src / tests / test_jgrid . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tests / test_jlist . cpp <nl> ppp b / src / tests / test_jlist . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / ui_context . cpp <nl> ppp b / src / ui_context . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / ui_context . h <nl> ppp b / src / ui_context . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoable . cpp <nl> ppp b / src / undoable . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoable . h <nl> ppp b / src / undoable . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / autocrop . cpp <nl> ppp b / src / util / autocrop . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / autocrop . h <nl> ppp b / src / util / autocrop . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / celmove . cpp <nl> ppp b / src / util / celmove . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / celmove . h <nl> ppp b / src / util / celmove . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / clipboard . cpp <nl> ppp b / src / util / clipboard . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / clipboard . h <nl> ppp b / src / util / clipboard . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / clipboard_win32 . h <nl> ppp b / src / util / clipboard_win32 . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / col_file . cpp <nl> ppp b / src / util / col_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / col_file . h <nl> ppp b / src / util / col_file . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / filetoks . cpp <nl> ppp b / src / util / filetoks . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / filetoks . h <nl> ppp b / src / util / filetoks . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / hash . cpp <nl> ppp b / src / util / hash . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / hash . h <nl> ppp b / src / util / hash . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / misc . cpp <nl> ppp b / src / util / misc . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / misc . h <nl> ppp b / src / util / misc . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / msk_file . cpp <nl> ppp b / src / util / msk_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / msk_file . h <nl> ppp b / src / util / msk_file . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / pic_file . cpp <nl> ppp b / src / util / pic_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / pic_file . h <nl> ppp b / src / util / pic_file . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / quantize . cpp <nl> ppp b / src / util / quantize . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / quantize . h <nl> ppp b / src / util / quantize . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / recscr . cpp <nl> ppp b / src / util / recscr . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / recscr . h <nl> ppp b / src / util / recscr . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / render . cpp <nl> ppp b / src / util / render . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / render . h <nl> ppp b / src / util / render . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / thmbnail . cpp <nl> ppp b / src / util / thmbnail . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / thmbnail . h <nl> ppp b / src / util / thmbnail . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / colbar . cpp <nl> ppp b / src / widgets / colbar . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / colbar . h <nl> ppp b / src / widgets / colbar . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / colbut . cpp <nl> ppp b / src / widgets / colbut . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / colbut . h <nl> ppp b / src / widgets / colbut . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / colsel . cpp <nl> ppp b / src / widgets / colsel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / colsel . h <nl> ppp b / src / widgets / colsel . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / colview . cpp <nl> ppp b / src / widgets / colview . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / colview . h <nl> ppp b / src / widgets / colview . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / curvedit . cpp <nl> ppp b / src / widgets / curvedit . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / curvedit . h <nl> ppp b / src / widgets / curvedit . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor . h <nl> ppp b / src / widgets / editor . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / click . cpp <nl> ppp b / src / widgets / editor / click . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / cursor . cpp <nl> ppp b / src / widgets / editor / cursor . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / editor . cpp <nl> ppp b / src / widgets / editor / editor . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / keys . cpp <nl> ppp b / src / widgets / editor / keys . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / fileview . cpp <nl> ppp b / src / widgets / fileview . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2008 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / fileview . h <nl> ppp b / src / widgets / fileview . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2008 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / groupbut . cpp <nl> ppp b / src / widgets / groupbut . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / groupbut . h <nl> ppp b / src / widgets / groupbut . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / menuitem . cpp <nl> ppp b / src / widgets / menuitem . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / menuitem . h <nl> ppp b / src / widgets / menuitem . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / paledit . cpp <nl> ppp b / src / widgets / paledit . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / paledit . h <nl> ppp b / src / widgets / paledit . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / preview . cpp <nl> ppp b / src / widgets / preview . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / preview . h <nl> ppp b / src / widgets / preview . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / statebar . cpp <nl> ppp b / src / widgets / statebar . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / statebar . h <nl> ppp b / src / widgets / statebar . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / tabs . cpp <nl> ppp b / src / widgets / tabs . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / tabs . h <nl> ppp b / src / widgets / tabs . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / target . cpp <nl> ppp b / src / widgets / target . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / target . h <nl> ppp b / src / widgets / target . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / toolbar . cpp <nl> ppp b / src / widgets / toolbar . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / toolbar . h <nl> ppp b / src / widgets / toolbar . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2009 David Capello <nl> + * Copyright ( C ) 2001 - 2010 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> | Updated copyright year to 2010 | aseprite/aseprite | b747ccdaa6ccec003bbf9563303e7cb3956757b7 | 2010-02-01T21:25:40Z |
mmm a / arangod / Ahuacatl / ahuacatl - conversions . c <nl> ppp b / arangod / Ahuacatl / ahuacatl - conversions . c <nl> TRI_aql_node_t * TRI_JsonNodeAql ( TRI_aql_context_t * const context , <nl> break ; <nl> <nl> case TRI_JSON_LIST : { <nl> - size_t i ; <nl> - size_t n ; <nl> - <nl> node = TRI_CreateNodeListAql ( context ) ; <nl> - n = json - > _value . _objects . _length ; <nl> <nl> - for ( i = 0 ; i < n ; + + i ) { <nl> - TRI_json_t * subJson ; <nl> - TRI_aql_node_t * member ; <nl> + if ( node ! = NULL ) { <nl> + size_t i , n ; <nl> <nl> - subJson = ( TRI_json_t * ) TRI_AtVector ( & json - > _value . _objects , i ) ; <nl> - member = TRI_JsonNodeAql ( context , subJson ) ; <nl> + n = json - > _value . _objects . _length ; <nl> <nl> - if ( member ) { <nl> - TRI_PushBackVectorPointer ( & node - > _members , ( void * ) member ) ; <nl> - } <nl> - else { <nl> - TRI_SetErrorContextAql ( context , TRI_ERROR_OUT_OF_MEMORY , NULL ) ; <nl> - return NULL ; <nl> + for ( i = 0 ; i < n ; + + i ) { <nl> + TRI_json_t * subJson ; <nl> + TRI_aql_node_t * member ; <nl> + <nl> + subJson = ( TRI_json_t * ) TRI_AtVector ( & json - > _value . _objects , i ) ; <nl> + member = TRI_JsonNodeAql ( context , subJson ) ; <nl> + <nl> + if ( member ) { <nl> + TRI_PushBackVectorPointer ( & node - > _members , ( void * ) member ) ; <nl> + } <nl> + else { <nl> + TRI_SetErrorContextAql ( context , TRI_ERROR_OUT_OF_MEMORY , NULL ) ; <nl> + return NULL ; <nl> + } <nl> } <nl> } <nl> break ; <nl> } <nl> case TRI_JSON_ARRAY : { <nl> - size_t i ; <nl> - size_t n ; <nl> - <nl> node = TRI_CreateNodeArrayAql ( context ) ; <nl> - n = json - > _value . _objects . _length ; <nl> - <nl> - for ( i = 0 ; i < n ; i + = 2 ) { <nl> - TRI_json_t * nameJson ; <nl> - TRI_json_t * valueJson ; <nl> - TRI_aql_node_t * member ; <nl> - TRI_aql_node_t * valueNode ; <nl> - char * name ; <nl> - <nl> - / / json_t containing the array element name <nl> - nameJson = ( TRI_json_t * ) TRI_AtVector ( & json - > _value . _objects , i ) ; <nl> - assert ( nameJson ) ; <nl> - assert ( nameJson - > _value . _string . data ) ; <nl> - name = TRI_RegisterStringAql ( context , nameJson - > _value . _string . data , strlen ( nameJson - > _value . _string . data ) , false ) ; <nl> - if ( ! name ) { <nl> - TRI_SetErrorContextAql ( context , TRI_ERROR_OUT_OF_MEMORY , NULL ) ; <nl> - return NULL ; <nl> - } <nl> <nl> - / / json_t containing the array element value <nl> - valueJson = ( TRI_json_t * ) TRI_AtVector ( & json - > _value . _objects , i + 1 ) ; <nl> - assert ( valueJson ) ; <nl> + if ( node ! = NULL ) { <nl> + size_t i , n ; <nl> + <nl> + n = json - > _value . _objects . _length ; <nl> + <nl> + for ( i = 0 ; i < n ; i + = 2 ) { <nl> + TRI_json_t * nameJson ; <nl> + TRI_json_t * valueJson ; <nl> + TRI_aql_node_t * member ; <nl> + TRI_aql_node_t * valueNode ; <nl> + char * name ; <nl> + <nl> + / / json_t containing the array element name <nl> + nameJson = ( TRI_json_t * ) TRI_AtVector ( & json - > _value . _objects , i ) ; <nl> + assert ( nameJson ) ; <nl> + assert ( nameJson - > _value . _string . data ) ; <nl> + name = TRI_RegisterStringAql ( context , nameJson - > _value . _string . data , strlen ( nameJson - > _value . _string . data ) , false ) ; <nl> + if ( ! name ) { <nl> + TRI_SetErrorContextAql ( context , TRI_ERROR_OUT_OF_MEMORY , NULL ) ; <nl> + return NULL ; <nl> + } <nl> <nl> - valueNode = TRI_JsonNodeAql ( context , valueJson ) ; <nl> - if ( ! valueNode ) { <nl> - TRI_SetErrorContextAql ( context , TRI_ERROR_OUT_OF_MEMORY , NULL ) ; <nl> - return NULL ; <nl> - } <nl> + / / json_t containing the array element value <nl> + valueJson = ( TRI_json_t * ) TRI_AtVector ( & json - > _value . _objects , i + 1 ) ; <nl> + assert ( valueJson ) ; <nl> <nl> - member = TRI_CreateNodeArrayElementAql ( context , name , valueNode ) ; <nl> - if ( member ) { <nl> - TRI_PushBackVectorPointer ( & node - > _members , ( void * ) member ) ; <nl> - } <nl> - else { <nl> - TRI_SetErrorContextAql ( context , TRI_ERROR_OUT_OF_MEMORY , NULL ) ; <nl> - return NULL ; <nl> + valueNode = TRI_JsonNodeAql ( context , valueJson ) ; <nl> + if ( ! valueNode ) { <nl> + TRI_SetErrorContextAql ( context , TRI_ERROR_OUT_OF_MEMORY , NULL ) ; <nl> + return NULL ; <nl> + } <nl> + <nl> + member = TRI_CreateNodeArrayElementAql ( context , name , valueNode ) ; <nl> + if ( member ) { <nl> + TRI_PushBackVectorPointer ( & node - > _members , ( void * ) member ) ; <nl> + } <nl> + else { <nl> + TRI_SetErrorContextAql ( context , TRI_ERROR_OUT_OF_MEMORY , NULL ) ; <nl> + return NULL ; <nl> + } <nl> } <nl> } <nl> break ; <nl> } <nl> } <nl> <nl> - if ( ! node ) { <nl> + if ( node = = NULL ) { <nl> TRI_SetErrorContextAql ( context , TRI_ERROR_OUT_OF_MEMORY , NULL ) ; <nl> } <nl> <nl> | handle OOM | arangodb/arangodb | 5b1f9f2a14b697f6acb1973b7293bd8dd4d2d521 | 2013-07-02T15:21:07Z |
mmm a / data / spring_small . txt <nl> ppp b / data / spring_small . txt <nl> <nl> 2 1 <nl> 0 0 0 0 <nl> - 1 1 1 1 <nl> + 1 1 2 1 <nl> 0 1 1 1 <nl> 1 <nl> 1 <nl> mmm a / lang / mass_spring . cpp <nl> ppp b / lang / mass_spring . cpp <nl> TLANG_NAMESPACE_BEGIN <nl> <nl> Expr length ( Vector vec ) { <nl> Expr t = vec ( 0 ) * vec ( 0 ) ; <nl> - for ( int i = 1 ; i < vec . entries . size ( ) ; i + + ) { <nl> + for ( int i = 1 ; i < ( int ) vec . entries . size ( ) ; i + + ) { <nl> t = t + vec . entries [ i ] * vec . entries [ i ] ; <nl> } <nl> return sqrt ( t ) ; <nl> Expr length ( Vector vec ) { <nl> <nl> TC_TEST ( " mass_spring " ) { <nl> Program prog ; <nl> + / / TC_WARN ( " optimization off " ) ; <nl> + / / prog . config . external_optimization_level = 1 ; <nl> <nl> const int dim = 3 ; <nl> auto i = ind ( ) , j = ind ( ) ; <nl> <nl> Matrix K ( dim , dim ) , K_self ( dim , dim ) ; <nl> <nl> - Vector x ( dim ) , v ( dim ) , fe ( dim ) , fmg ( dim ) , p ( dim ) , r ( dim ) , Ap ( dim ) ; <nl> + Vector x ( dim ) , v ( dim ) , fe ( dim ) , fmg ( dim ) , p ( dim ) , r ( dim ) , Ap ( dim ) , vec ( dim ) ; <nl> <nl> auto mass = var < float32 > ( ) , fixed = var < float32 > ( ) ; <nl> auto l0 = var < float32 > ( ) , stiffness = var < float32 > ( ) ; <nl> TC_TEST ( " mass_spring " ) { <nl> const auto grav = - 9 . 81_f ; <nl> <nl> int n , m ; <nl> + int max_n = 65536 ; <nl> std : : FILE * f = std : : fopen ( " data / spring_small . txt " , " r " ) ; <nl> TC_ASSERT ( f ) ; <nl> fscanf ( f , " % d % d " , & n , & m ) ; <nl> TC_P ( n ) ; <nl> + TC_ASSERT ( n < = max_n ) ; <nl> TC_P ( m ) ; <nl> <nl> layout ( [ & ] { <nl> - auto & fork = root . fixed ( i , 65536 ) . dynamic ( j , 64 ) ; <nl> + auto & fork = root . fixed ( i , max_n ) . dynamic ( j , 64 ) ; <nl> for ( int i = 0 ; i < dim ; i + + ) { <nl> for ( int j = 0 ; j < dim ; j + + ) { <nl> K ( i , j ) = var < float32 > ( ) ; <nl> TC_TEST ( " mass_spring " ) { <nl> } <nl> fork . place ( l0 , stiffness , neighbour ) ; <nl> <nl> - auto & particle = root . fixed ( i , 65536 ) ; <nl> + auto & particle = root . fixed ( i , max_n ) ; <nl> for ( int i = 0 ; i < dim ; i + + ) { <nl> x ( i ) = var < float32 > ( ) ; <nl> v ( i ) = var < float32 > ( ) ; <nl> TC_TEST ( " mass_spring " ) { <nl> p ( i ) = var < float32 > ( ) ; <nl> Ap ( i ) = var < float32 > ( ) ; <nl> fe ( i ) = var < float32 > ( ) ; <nl> + vec ( i ) = var < float32 > ( ) ; <nl> particle . place ( x ( i ) ) ; <nl> particle . place ( v ( i ) ) ; <nl> particle . place ( fmg ( i ) ) ; <nl> TC_TEST ( " mass_spring " ) { <nl> particle . place ( p ( i ) ) ; <nl> particle . place ( Ap ( i ) ) ; <nl> particle . place ( fe ( i ) ) ; <nl> + particle . place ( vec ( i ) ) ; <nl> } <nl> particle . place ( fixed ) ; <nl> for ( int i = 0 ; i < dim ; i + + ) { <nl> TC_TEST ( " mass_spring " ) { <nl> root . place ( normr2 ) ; <nl> } ) ; <nl> <nl> + auto clear_matrix = kernel ( neighbour , [ & ] { <nl> + for ( int t = 0 ; t < dim ; t + + ) { <nl> + for ( int d = 0 ; d < dim ; d + + ) { <nl> + K [ i , j ] ( t , d ) = 0 ; <nl> + } <nl> + } <nl> + } ) ; <nl> + <nl> auto build_matrix = kernel ( neighbour , [ & ] { <nl> auto k = neighbour [ i , j ] ; <nl> auto dx = x [ i ] - x [ k ] ; <nl> auto l = length ( dx ) ; <nl> auto U = dx * ( imm ( 1 . 0_f ) / l ) ; <nl> - auto s = stiffness [ i , j ] ; <nl> + auto s = load ( stiffness [ i , j ] ) . print ( ) ; <nl> auto f = s * ( l - l0 [ i , j ] ) ; <nl> auto fe0 = imm ( h ) * f * U ; <nl> <nl> TC_TEST ( " mass_spring " ) { <nl> K_self [ i ] = K_self [ i ] + k_e ; <nl> K [ i , j ] = K [ i , j ] - k_e ; <nl> <nl> - fe [ i ] = fe [ i ] + fe0 ; <nl> + for ( int d = 0 ; d < dim ; d + + ) { <nl> + reduce ( fe [ i ] ( d ) , fe0 ( d ) ) ; <nl> + } <nl> } ) ; <nl> <nl> auto preprocess_particles = kernel ( x ( 0 ) , [ & ] { <nl> TC_TEST ( " mass_spring " ) { <nl> fmg [ i ] ( 1 ) = fmg [ i ] ( 1 ) + imm ( h * grav ) * mass [ i ] ; / / gravity <nl> for ( int t = 0 ; t < dim ; t + + ) { <nl> K_self [ i ] ( t , t ) = <nl> - K_self [ i ] ( t , t ) + <nl> - select ( cast < int > ( load ( fixed [ i ] ) ) , imm ( 1 . 0_f ) , mass [ i ] + imm ( h * viscous ) ) ; <nl> + K_self [ i ] ( t , t ) + select ( cast < int > ( load ( fixed [ i ] ) ) , imm ( 1 . 0_f ) , <nl> + mass [ i ] + imm ( h * viscous ) ) ; <nl> } <nl> } ) ; <nl> <nl> TC_TEST ( " mass_spring " ) { <nl> <nl> auto copy_r_to_p = kernel ( mass , [ & ] { p [ i ] = r [ i ] ; } ) ; <nl> <nl> - TC_TAG ; <nl> - <nl> auto compute_Ap1 = kernel ( K ( 0 , 0 ) , [ & ] { <nl> auto tmp = K [ i , j ] * p [ neighbour [ i , j ] ] ; <nl> for ( int d = 0 ; d < dim ; d + + ) { <nl> reduce ( Ap [ i ] ( d ) , tmp ( d ) ) ; <nl> } <nl> } ) ; <nl> - TC_TAG ; <nl> <nl> auto compute_Ap2 = kernel ( mass , [ & ] { Ap [ i ] = Ap [ i ] + K_self [ i ] * p [ i ] ; } ) ; <nl> <nl> - TC_TAG ; <nl> auto compute_Ap = [ & ] { <nl> compute_Ap1 ( ) ; <nl> compute_Ap2 ( ) ; <nl> } ; <nl> <nl> - TC_TAG ; <nl> auto compute_denorm = kernel ( mass , [ & ] { <nl> reduce ( global ( denorm ) , p [ i ] . element_wise_prod ( Ap [ i ] ) . sum ( ) ) ; <nl> } ) ; <nl> <nl> - TC_TAG ; <nl> auto compute_r = kernel ( mass , [ & ] { r [ i ] = fe [ i ] - Ap [ i ] ; } ) ; <nl> <nl> - TC_TAG ; <nl> auto compute_v = kernel ( mass , [ & ] { v [ i ] = v [ i ] + global ( alpha ) * p [ i ] ; } ) ; <nl> <nl> - TC_TAG ; <nl> - auto compute_r2 = kernel ( mass , [ & ] { <nl> + auto compute_normr2 = kernel ( mass , [ & ] { <nl> reduce ( global ( normr2 ) , r [ i ] . element_wise_prod ( r [ i ] ) . sum ( ) ) ; <nl> } ) ; <nl> - TC_TAG ; <nl> <nl> - auto compute_normr2 = kernel ( mass , [ & ] { r [ i ] = r [ i ] - global ( alpha ) * Ap [ i ] ; } ) ; <nl> - TC_TAG ; <nl> + auto compute_r2 = <nl> + kernel ( mass , [ & ] { r [ i ] = r [ i ] - global ( alpha ) * Ap [ i ] ; } ) ; <nl> <nl> auto compute_p = kernel ( mass , [ & ] { p [ i ] = r [ i ] + global ( beta ) * p [ i ] ; } ) ; <nl> <nl> - TC_TAG ; <nl> + auto copy_v_to_vec = kernel ( mass , [ & ] { vec [ i ] = v [ i ] ; } ) ; <nl> + <nl> + auto copy_p_to_vec = kernel ( mass , [ & ] { vec [ i ] = p [ i ] ; } ) ; <nl> + <nl> auto time_step = [ & ] { <nl> - compute_normr2 ( ) ; <nl> - copy_r_to_p ( ) ; <nl> + preprocess_particles ( ) ; <nl> + clear_matrix ( ) ; <nl> + build_matrix ( ) ; <nl> + <nl> + copy_v_to_vec ( ) ; / / vec = v ; <nl> + compute_Ap ( ) ; / / Ap = K vec <nl> + compute_r ( ) ; / / r = fe - Ap <nl> + <nl> + copy_r_to_p ( ) ; / / p = r <nl> + compute_normr2 ( ) ; / / normr2 = r ' * r <nl> auto h_normr2 = normr2 . val < float32 > ( ) ; <nl> - for ( int i = 0 ; i < 50 ; i + + ) { <nl> - compute_Ap ( ) ; <nl> - compute_denorm ( ) ; <nl> + for ( int i = 0 ; i < 10 ; i + + ) { <nl> + copy_p_to_vec ( ) ; / / vec = p <nl> + compute_Ap ( ) ; / / Ap = K vec <nl> + compute_denorm ( ) ; / / denorm = p ' Ap <nl> alpha . val < float32 > ( ) = normr2 . val < float32 > ( ) / denorm . val < float32 > ( ) ; <nl> - compute_v ( ) ; <nl> - compute_r2 ( ) ; <nl> - compute_normr2 ( ) ; <nl> + compute_v ( ) ; / / v = v + alpha * p <nl> + compute_r2 ( ) ; / / r = r - alpha * Ap <nl> + compute_normr2 ( ) ; / / normr2 = r ' r <nl> auto normr2_old = normr2 . val < float32 > ( ) ; <nl> - TC_P ( normr2 . val < float32 > ( ) ) ; <nl> + TC_P ( normr2_old ) ; <nl> beta . val < float32 > ( ) = normr2 . val < float32 > ( ) / normr2_old ; <nl> - compute_p ( ) ; <nl> + compute_p ( ) ; / / p = r + beta * p <nl> } <nl> advect ( ) ; <nl> } ; <nl> TC_TEST ( " mass_spring " ) { <nl> } <nl> <nl> for ( int i = 0 ; i < m ; i + + ) { <nl> - int u , v , l0_ , stiffness_ ; <nl> + int u , v ; <nl> + float32 l0_ , stiffness_ ; <nl> fscanf ( f , " % d % d % f % f " , & u , & v , & l0_ , & stiffness_ ) ; <nl> <nl> l0 . val < float > ( u , degrees [ u ] ) = l0_ ; <nl> TC_TEST ( " mass_spring " ) { <nl> TC_P ( max_degrees ) ; <nl> TC_P ( 1 . 0_f * total_degrees / n ) ; <nl> <nl> - for ( int i = 0 ; i < 100 ; i + + ) { <nl> - / / time_step ( ) ; <nl> + for ( int i = 0 ; i < 1 ; i + + ) { <nl> + time_step ( ) ; <nl> } <nl> } <nl> <nl> | . | taichi-dev/taichi | 944859c159c3489f2888ff09b384ac4965ee0769 | 2019-01-12T18:46:32Z |
new file mode 100755 <nl> index 00000000000 . . 51f8130103f <nl> mmm / dev / null <nl> ppp b / example / image - classification / data / imagenet1k - val . sh <nl> <nl> + # ! / bin / bash <nl> + <nl> + # This file download the imagnet - 1k validation dataset and convert it into a rec <nl> + # file . One need to provide the URL for the ILSVRC2012_img_val . tar , which can be <nl> + # find at http : / / www . image - net . org / download - images <nl> + # <nl> + # Example usage ( replace the URL with the correct one ) : <nl> + # . / imagenet1k - val . sh http : / / xxxxxx / challenges / LSVRC / 2012 / nnoupb / ILSVRC2012_img_val . tar <nl> + <nl> + if [ ! - e ILSVRC2012_img_val . tar ] ; then <nl> + wget $ 1 <nl> + fi <nl> + mkdir - p val <nl> + tar - xf ILSVRC2012_img_val . tar - C val <nl> + wget http : / / data . mxnet . io / models / imagenet / resnet / val . lst - O imagenet1k - val . lst <nl> + <nl> + CUR_DIR = " $ ( cd " $ ( dirname " $ { BASH_SOURCE [ 0 ] } " ) " & & pwd ) " <nl> + MX_DIR = $ { CUR_DIR } / . . / . . / . . / <nl> + <nl> + python $ { CUR_DIR } / . . / . . / . . / tools / im2rec . py - - resize 256 - - quality 90 - - num - thread 16 imagenet1k - val val / <nl> + <nl> + rm - rf val <nl> mmm a / example / image - classification / train_imagenet . py <nl> ppp b / example / image - classification / train_imagenet . py <nl> <nl> num_classes = 1000 , <nl> num_examples = 1281167 , <nl> image_shape = ' 3 , 224 , 224 ' , <nl> - min_random_scale = 0 . 533 , # assume input image has min size 480 , 0 . 533 = 256 / 480 <nl> + min_random_scale = 1 , # if input image has min size k , suggest to use <nl> + # 256 . 0 / x , e . g . 0 . 533 for 480 <nl> # train <nl> num_epochs = 80 , <nl> lr_step_epochs = ' 30 , 60 ' , <nl> | [ image - classification ] default use min_random_scale = 1 , add data / imagenet1k - val . sh ( ) | apache/incubator-mxnet | 1446bfc2fbd6516cb9b079d41fc86e4ad6086ace | 2016-12-20T01:17:18Z |
mmm a / dbms / src / Common / FileChecker . cpp <nl> ppp b / dbms / src / Common / FileChecker . cpp <nl> namespace DB <nl> { <nl> <nl> <nl> - FileChecker : : FileChecker ( const std : : string & file_info_path_ ) <nl> + FileChecker : : FileChecker ( DiskPtr disk_ , const String & file_info_path_ ) : disk ( disk_ ) <nl> { <nl> setPath ( file_info_path_ ) ; <nl> } <nl> <nl> - void FileChecker : : setPath ( const std : : string & file_info_path_ ) <nl> + void FileChecker : : setPath ( const String & file_info_path_ ) <nl> { <nl> files_info_path = file_info_path_ ; <nl> <nl> void FileChecker : : setPath ( const std : : string & file_info_path_ ) <nl> tmp_files_info_path = path . parent ( ) . toString ( ) + " tmp_ " + path . getFileName ( ) ; <nl> } <nl> <nl> - void FileChecker : : update ( const Poco : : File & file ) <nl> + void FileChecker : : update ( const String & file_path ) <nl> { <nl> initialize ( ) ; <nl> - updateImpl ( file ) ; <nl> + updateImpl ( file_path ) ; <nl> save ( ) ; <nl> } <nl> <nl> - void FileChecker : : update ( const Files : : const_iterator & begin , const Files : : const_iterator & end ) <nl> + void FileChecker : : update ( const Strings : : const_iterator & begin , const Strings : : const_iterator & end ) <nl> { <nl> initialize ( ) ; <nl> for ( auto it = begin ; it ! = end ; + + it ) <nl> void FileChecker : : update ( const Files : : const_iterator & begin , const Files : : const <nl> <nl> CheckResults FileChecker : : check ( ) const <nl> { <nl> - / * * Read the files again every time you call ` check ` - so as not to violate the constancy . <nl> - * ` check ` method is rarely called . <nl> - * / <nl> + / / Read the files again every time you call ` check ` - so as not to violate the constancy . <nl> + / / ` check ` method is rarely called . <nl> <nl> CheckResults results ; <nl> Map local_map ; <nl> CheckResults FileChecker : : check ( ) const <nl> <nl> for ( const auto & name_size : local_map ) <nl> { <nl> - Poco : : Path path = Poco : : Path ( files_info_path ) . parent ( ) . toString ( ) + " / " + name_size . first ; <nl> - Poco : : File file ( path ) ; <nl> - if ( ! file . exists ( ) ) <nl> + const String & name = name_size . first ; <nl> + String path = Poco : : Path ( files_info_path ) . parent ( ) . toString ( ) + " / " + name ; <nl> + if ( ! disk - > exists ( path ) ) <nl> { <nl> - results . emplace_back ( path . getFileName ( ) , false , " File " + file . path ( ) + " doesn ' t exist " ) ; <nl> + results . emplace_back ( name , false , " File " + path + " doesn ' t exist " ) ; <nl> break ; <nl> } <nl> <nl> - <nl> - size_t real_size = file . getSize ( ) ; <nl> + auto real_size = disk - > getFileSize ( path ) ; <nl> if ( real_size ! = name_size . second ) <nl> { <nl> - results . emplace_back ( path . getFileName ( ) , false , " Size of " + file . path ( ) + " is wrong . Size is " + toString ( real_size ) + " but should be " + toString ( name_size . second ) ) ; <nl> + results . emplace_back ( name , false , " Size of " + path + " is wrong . Size is " + toString ( real_size ) + " but should be " + toString ( name_size . second ) ) ; <nl> break ; <nl> } <nl> - results . emplace_back ( path . getFileName ( ) , true , " " ) ; <nl> + results . emplace_back ( name , true , " " ) ; <nl> } <nl> <nl> return results ; <nl> void FileChecker : : initialize ( ) <nl> initialized = true ; <nl> } <nl> <nl> - void FileChecker : : updateImpl ( const Poco : : File & file ) <nl> + void FileChecker : : updateImpl ( const String & file_path ) <nl> { <nl> - map [ Poco : : Path ( file . path ( ) ) . getFileName ( ) ] = file . getSize ( ) ; <nl> + map [ Poco : : Path ( file_path ) . getFileName ( ) ] = disk - > getFileSize ( file_path ) ; <nl> } <nl> <nl> void FileChecker : : save ( ) const <nl> { <nl> { <nl> - WriteBufferFromFile out ( tmp_files_info_path ) ; <nl> + std : : unique_ptr < WriteBuffer > out = disk - > write ( tmp_files_info_path ) ; <nl> <nl> / / / So complex JSON structure - for compatibility with the old format . <nl> - writeCString ( " { \ " yandex \ " : { " , out ) ; <nl> + writeCString ( " { \ " yandex \ " : { " , * out ) ; <nl> <nl> auto settings = FormatSettings ( ) ; <nl> for ( auto it = map . begin ( ) ; it ! = map . end ( ) ; + + it ) <nl> { <nl> if ( it ! = map . begin ( ) ) <nl> - writeString ( " , " , out ) ; <nl> + writeString ( " , " , * out ) ; <nl> <nl> / / / ` escapeForFileName ` is not really needed . But it is left for compatibility with the old code . <nl> - writeJSONString ( escapeForFileName ( it - > first ) , out , settings ) ; <nl> - writeString ( " : { \ " size \ " : \ " " , out ) ; <nl> - writeIntText ( it - > second , out ) ; <nl> - writeString ( " \ " } " , out ) ; <nl> + writeJSONString ( escapeForFileName ( it - > first ) , * out , settings ) ; <nl> + writeString ( " : { \ " size \ " : \ " " , * out ) ; <nl> + writeIntText ( it - > second , * out ) ; <nl> + writeString ( " \ " } " , * out ) ; <nl> } <nl> <nl> - writeCString ( " } } " , out ) ; <nl> - out . next ( ) ; <nl> + writeCString ( " } } " , * out ) ; <nl> + out - > next ( ) ; <nl> } <nl> <nl> - Poco : : File current_file ( files_info_path ) ; <nl> - <nl> - if ( current_file . exists ( ) ) <nl> - { <nl> - std : : string old_file_name = files_info_path + " . old " ; <nl> - current_file . renameTo ( old_file_name ) ; <nl> - Poco : : File ( tmp_files_info_path ) . renameTo ( files_info_path ) ; <nl> - Poco : : File ( old_file_name ) . remove ( ) ; <nl> - } <nl> - else <nl> - Poco : : File ( tmp_files_info_path ) . renameTo ( files_info_path ) ; <nl> + disk - > moveFile ( tmp_files_info_path , files_info_path ) ; <nl> } <nl> <nl> - void FileChecker : : load ( Map & local_map , const std : : string & path ) <nl> + void FileChecker : : load ( Map & local_map , const String & path ) const <nl> { <nl> local_map . clear ( ) ; <nl> <nl> - if ( ! Poco : : File ( path ) . exists ( ) ) <nl> + if ( ! disk - > exists ( path ) ) <nl> return ; <nl> <nl> - ReadBufferFromFile in ( path ) ; <nl> + std : : unique_ptr < ReadBuffer > in = disk - > read ( path ) ; <nl> WriteBufferFromOwnString out ; <nl> <nl> / / / The JSON library does not support whitespace . We delete them . Inefficient . <nl> - while ( ! in . eof ( ) ) <nl> + while ( ! in - > eof ( ) ) <nl> { <nl> char c ; <nl> - readChar ( c , in ) ; <nl> + readChar ( c , * in ) ; <nl> if ( ! isspace ( c ) ) <nl> writeChar ( c , out ) ; <nl> } <nl> mmm a / dbms / src / Common / FileChecker . h <nl> ppp b / dbms / src / Common / FileChecker . h <nl> <nl> # pragma once <nl> <nl> - # include < string > <nl> # include < common / logger_useful . h > <nl> - # include < Poco / File . h > <nl> # include < Storages / CheckResults . h > <nl> + # include < Disks / IDisk . h > <nl> <nl> <nl> namespace DB <nl> namespace DB <nl> / / / stores the sizes of all columns , and can check whether the columns are corrupted <nl> class FileChecker <nl> { <nl> - private : <nl> - / / / File name - > size . <nl> - using Map = std : : map < std : : string , size_t > ; <nl> - <nl> public : <nl> - using Files = std : : vector < Poco : : File > ; <nl> - <nl> - FileChecker ( const std : : string & file_info_path_ ) ; <nl> - void setPath ( const std : : string & file_info_path_ ) ; <nl> - void update ( const Poco : : File & file ) ; <nl> - void update ( const Files : : const_iterator & begin , const Files : : const_iterator & end ) ; <nl> + FileChecker ( DiskPtr disk_ , const String & file_info_path_ ) ; <nl> + void setPath ( const String & file_info_path_ ) ; <nl> + void update ( const String & file_path ) ; <nl> + void update ( const Strings : : const_iterator & begin , const Strings : : const_iterator & end ) ; <nl> <nl> / / / Check the files whose parameters are specified in sizes . json <nl> CheckResults check ( ) const ; <nl> <nl> private : <nl> + / / / File name - > size . <nl> + using Map = std : : map < String , UInt64 > ; <nl> + <nl> void initialize ( ) ; <nl> - void updateImpl ( const Poco : : File & file ) ; <nl> + void updateImpl ( const String & file_path ) ; <nl> void save ( ) const ; <nl> - static void load ( Map & local_map , const std : : string & path ) ; <nl> + void load ( Map & local_map , const String & path ) const ; <nl> <nl> - std : : string files_info_path ; <nl> - std : : string tmp_files_info_path ; <nl> + DiskPtr disk ; <nl> + String files_info_path ; <nl> + String tmp_files_info_path ; <nl> <nl> / / / The data from the file is read lazily . <nl> Map map ; <nl> mmm a / dbms / src / Dictionaries / FileDictionarySource . cpp <nl> ppp b / dbms / src / Dictionaries / FileDictionarySource . cpp <nl> <nl> # include < IO / ReadBufferFromFile . h > <nl> # include < Interpreters / Context . h > <nl> # include < Poco / File . h > <nl> + # include < Common / StringUtils / StringUtils . h > <nl> # include " DictionarySourceFactory . h " <nl> # include " DictionaryStructure . h " <nl> # include " registerDictionaries . h " <nl> mmm a / dbms / src / Disks / DiskLocal . cpp <nl> ppp b / dbms / src / Disks / DiskLocal . cpp <nl> <nl> <nl> namespace DB <nl> { <nl> + namespace ErrorCodes <nl> + { <nl> + extern const int UNKNOWN_ELEMENT_IN_CONFIG ; <nl> + extern const int EXCESSIVE_ELEMENT_IN_CONFIG ; <nl> + } <nl> + <nl> std : : mutex DiskLocal : : mutex ; <nl> <nl> ReservationPtr DiskLocal : : reserve ( UInt64 bytes ) <nl> bool DiskLocal : : isDirectory ( const String & path ) const <nl> return Poco : : File ( disk_path + path ) . isDirectory ( ) ; <nl> } <nl> <nl> + size_t DiskLocal : : getFileSize ( const String & path ) const <nl> + { <nl> + return Poco : : File ( disk_path + path ) . getSize ( ) ; <nl> + } <nl> + <nl> void DiskLocal : : createDirectory ( const String & path ) <nl> { <nl> Poco : : File ( disk_path + path ) . createDirectory ( ) ; <nl> void DiskLocal : : createDirectories ( const String & path ) <nl> Poco : : File ( disk_path + path ) . createDirectories ( ) ; <nl> } <nl> <nl> + void DiskLocal : : clearDirectory ( const String & path ) <nl> + { <nl> + std : : vector < Poco : : File > files ; <nl> + Poco : : File ( disk_path + path ) . list ( files ) ; <nl> + for ( auto & file : files ) <nl> + file . remove ( true ) ; <nl> + } <nl> + <nl> + void DiskLocal : : moveDirectory ( const String & from_path , const String & to_path ) <nl> + { <nl> + Poco : : File ( disk_path + from_path ) . renameTo ( disk_path + to_path ) ; <nl> + } <nl> + <nl> DiskDirectoryIteratorPtr DiskLocal : : iterateDirectory ( const String & path ) <nl> { <nl> return std : : make_unique < DiskLocalDirectoryIterator > ( disk_path + path ) ; <nl> void DiskLocal : : copyFile ( const String & from_path , const String & to_path ) <nl> Poco : : File ( disk_path + from_path ) . copyTo ( disk_path + to_path ) ; <nl> } <nl> <nl> - std : : unique_ptr < ReadBuffer > DiskLocal : : readFile ( const String & path ) const <nl> + std : : unique_ptr < ReadBuffer > DiskLocal : : read ( const String & path , size_t buf_size ) const <nl> + { <nl> + return std : : make_unique < ReadBufferFromFile > ( disk_path + path , buf_size ) ; <nl> + } <nl> + <nl> + std : : unique_ptr < WriteBuffer > DiskLocal : : write ( const String & path , size_t buf_size ) <nl> { <nl> - return std : : make_unique < ReadBufferFromFile > ( disk_path + path ) ; <nl> + return std : : make_unique < WriteBufferFromFile > ( disk_path + path , buf_size ) ; <nl> } <nl> <nl> - std : : unique_ptr < WriteBuffer > DiskLocal : : writeFile ( const String & path ) <nl> + std : : unique_ptr < WriteBuffer > DiskLocal : : append ( const String & path , size_t buf_size ) <nl> { <nl> - return std : : make_unique < WriteBufferFromFile > ( disk_path + path ) ; <nl> + return std : : make_unique < WriteBufferFromFile > ( disk_path + path , buf_size , O_APPEND | O_CREAT | O_WRONLY ) ; <nl> } <nl> <nl> <nl> mmm a / dbms / src / Disks / DiskLocal . h <nl> ppp b / dbms / src / Disks / DiskLocal . h <nl> class DiskLocal : public IDisk <nl> <nl> bool isDirectory ( const String & path ) const override ; <nl> <nl> + size_t getFileSize ( const String & path ) const override ; <nl> + <nl> void createDirectory ( const String & path ) override ; <nl> <nl> void createDirectories ( const String & path ) override ; <nl> <nl> + void clearDirectory ( const String & path ) override ; <nl> + <nl> + void moveDirectory ( const String & from_path , const String & to_path ) override ; <nl> + <nl> DiskDirectoryIteratorPtr iterateDirectory ( const String & path ) override ; <nl> <nl> void moveFile ( const String & from_path , const String & to_path ) override ; <nl> <nl> void copyFile ( const String & from_path , const String & to_path ) override ; <nl> <nl> - std : : unique_ptr < ReadBuffer > readFile ( const String & path ) const override ; <nl> + std : : unique_ptr < ReadBuffer > read ( const String & path , size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE ) const override ; <nl> + <nl> + std : : unique_ptr < WriteBuffer > write ( const String & path , size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE ) override ; <nl> <nl> - std : : unique_ptr < WriteBuffer > writeFile ( const String & path ) override ; <nl> + std : : unique_ptr < WriteBuffer > append ( const String & path , size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE ) override ; <nl> <nl> private : <nl> bool tryReserve ( UInt64 bytes ) ; <nl> new file mode 100644 <nl> index 00000000000 . . 3270fe8483b <nl> mmm / dev / null <nl> ppp b / dbms / src / Disks / IDisk . cpp <nl> <nl> + # include " IDisk . h " <nl> + <nl> + namespace DB <nl> + { <nl> + bool IDisk : : isDirectoryEmpty ( const String & path ) <nl> + { <nl> + return ! iterateDirectory ( path ) - > isValid ( ) ; <nl> + } <nl> + } <nl> mmm a / dbms / src / Disks / IDisk . h <nl> ppp b / dbms / src / Disks / IDisk . h <nl> <nl> # pragma once <nl> <nl> + # include < Core / Defines . h > <nl> # include < Core / Types . h > <nl> # include < Common / CurrentMetrics . h > <nl> # include < Common / Exception . h > <nl> class IDisk : public Space <nl> / / / Return ` true ` if the specified file exists and it ' s a directory . <nl> virtual bool isDirectory ( const String & path ) const = 0 ; <nl> <nl> + / / / Return size of the specified file . <nl> + virtual size_t getFileSize ( const String & path ) const = 0 ; <nl> + <nl> / / / Create directory . <nl> virtual void createDirectory ( const String & path ) = 0 ; <nl> <nl> / / / Create directory and all parent directories if necessary . <nl> virtual void createDirectories ( const String & path ) = 0 ; <nl> <nl> + / / / Remove all files from the directory . <nl> + virtual void clearDirectory ( const String & path ) = 0 ; <nl> + <nl> + / / / Move directory from ` from_path ` to ` to_path ` . <nl> + virtual void moveDirectory ( const String & from_path , const String & to_path ) = 0 ; <nl> + <nl> / / / Return iterator to the contents of the specified directory . <nl> virtual DiskDirectoryIteratorPtr iterateDirectory ( const String & path ) = 0 ; <nl> <nl> + / / / Return ` true ` if the specified directory is empty . <nl> + bool isDirectoryEmpty ( const String & path ) ; <nl> + <nl> / / / Move the file from ` from_path ` to ` to_path ` . <nl> virtual void moveFile ( const String & from_path , const String & to_path ) = 0 ; <nl> <nl> class IDisk : public Space <nl> virtual void copyFile ( const String & from_path , const String & to_path ) = 0 ; <nl> <nl> / / / Open the file for read and return ReadBuffer object . <nl> - virtual std : : unique_ptr < ReadBuffer > readFile ( const String & path ) const = 0 ; <nl> + virtual std : : unique_ptr < ReadBuffer > read ( const String & path , size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE ) const = 0 ; <nl> <nl> / / / Open the file for write and return WriteBuffer object . <nl> - virtual std : : unique_ptr < WriteBuffer > writeFile ( const String & path ) = 0 ; <nl> + virtual std : : unique_ptr < WriteBuffer > write ( const String & path , size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE ) = 0 ; <nl> + <nl> + / / / Open the file for write in append mode and return WriteBuffer object . <nl> + virtual std : : unique_ptr < WriteBuffer > append ( const String & path , size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE ) = 0 ; <nl> } ; <nl> <nl> using DiskPtr = std : : shared_ptr < IDisk > ; <nl> inline String fullPath ( const DiskPtr & disk , const String & path ) <nl> { <nl> return disk - > getPath ( ) + path ; <nl> } <nl> - <nl> } <nl> mmm a / dbms / src / Interpreters / Context . h <nl> ppp b / dbms / src / Interpreters / Context . h <nl> <nl> # include < Common / ThreadPool . h > <nl> # include " config_core . h " <nl> # include < Storages / IStorage_fwd . h > <nl> - # include < Disks / DiskSpaceMonitor . h > <nl> # include < atomic > <nl> # include < chrono > <nl> # include < condition_variable > <nl> class ICompressionCodec ; <nl> class AccessControlManager ; <nl> class SettingsConstraints ; <nl> class RemoteHostFilter ; <nl> + class IDisk ; <nl> + using DiskPtr = std : : shared_ptr < IDisk > ; <nl> + class DiskSelector ; <nl> + class StoragePolicy ; <nl> + using StoragePolicyPtr = std : : shared_ptr < const StoragePolicy > ; <nl> + class StoragePolicySelector ; <nl> <nl> class IOutputFormat ; <nl> using OutputFormatPtr = std : : shared_ptr < IOutputFormat > ; <nl> mmm a / dbms / src / Interpreters / ExecuteScalarSubqueriesVisitor . cpp <nl> ppp b / dbms / src / Interpreters / ExecuteScalarSubqueriesVisitor . cpp <nl> <nl> <nl> # include < Columns / ColumnTuple . h > <nl> <nl> + # include < IO / WriteHelpers . h > <nl> + <nl> namespace DB <nl> { <nl> <nl> mmm a / dbms / src / Interpreters / ExpressionActions . h <nl> ppp b / dbms / src / Interpreters / ExpressionActions . h <nl> <nl> # include < Core / Settings . h > <nl> # include < Interpreters / Context . h > <nl> # include < Common / SipHash . h > <nl> + # include < Common / UInt128 . h > <nl> # include " config_core . h " <nl> # include < unordered_map > <nl> # include < unordered_set > <nl> mmm a / dbms / src / Interpreters / ExternalLoaderDatabaseConfigRepository . cpp <nl> ppp b / dbms / src / Interpreters / ExternalLoaderDatabaseConfigRepository . cpp <nl> <nl> # include < Interpreters / ExternalLoaderDatabaseConfigRepository . h > <nl> # include < Dictionaries / getDictionaryConfigurationFromAST . h > <nl> + # include < Common / StringUtils / StringUtils . h > <nl> <nl> namespace DB <nl> { <nl> mmm a / dbms / src / Interpreters / InterpreterShowCreateAccessEntityQuery . cpp <nl> ppp b / dbms / src / Interpreters / InterpreterShowCreateAccessEntityQuery . cpp <nl> <nl> # include < Columns / ColumnString . h > <nl> # include < DataStreams / OneBlockInputStream . h > <nl> # include < DataTypes / DataTypeString . h > <nl> + # include < Common / StringUtils / StringUtils . h > <nl> # include < ext / range . h > <nl> # include < sstream > <nl> <nl> mmm a / dbms / src / Interpreters / QueryNormalizer . cpp <nl> ppp b / dbms / src / Interpreters / QueryNormalizer . cpp <nl> <nl> # include < Parsers / ASTTablesInSelectQuery . h > <nl> # include < Common / StringUtils / StringUtils . h > <nl> # include < Common / quoteString . h > <nl> + # include < IO / WriteHelpers . h > <nl> <nl> namespace DB <nl> { <nl> mmm a / dbms / src / Storages / MergeTree / MergeTreeDataPart . h <nl> ppp b / dbms / src / Storages / MergeTree / MergeTreeDataPart . h <nl> namespace DB <nl> struct ColumnSize ; <nl> class MergeTreeData ; <nl> struct FutureMergedMutatedPart ; <nl> + class IReservation ; <nl> + using ReservationPtr = std : : unique_ptr < IReservation > ; <nl> <nl> <nl> / / / Description of the data part . <nl> mmm a / dbms / src / Storages / MergeTree / MergeTreeIndexAggregatorBloomFilter . cpp <nl> ppp b / dbms / src / Storages / MergeTree / MergeTreeIndexAggregatorBloomFilter . cpp <nl> <nl> # include < Common / HashTable / Hash . h > <nl> # include < DataTypes / DataTypesNumber . h > <nl> # include < Interpreters / BloomFilterHash . h > <nl> + # include < IO / WriteHelpers . h > <nl> <nl> <nl> namespace DB <nl> mmm a / dbms / src / Storages / MergeTree / MergeTreeIndexGranuleBloomFilter . cpp <nl> ppp b / dbms / src / Storages / MergeTree / MergeTreeIndexGranuleBloomFilter . cpp <nl> <nl> # include < Common / HashTable / Hash . h > <nl> # include < ext / bit_cast . h > <nl> # include < Interpreters / BloomFilterHash . h > <nl> + # include < IO / WriteHelpers . h > <nl> <nl> <nl> namespace DB <nl> mmm a / dbms / src / Storages / StorageLog . cpp <nl> ppp b / dbms / src / Storages / StorageLog . cpp <nl> class LogBlockInputStream final : public IBlockInputStream <nl> Block readImpl ( ) override ; <nl> <nl> private : <nl> - <nl> size_t block_size ; <nl> NamesAndTypesList columns ; <nl> StorageLog & storage ; <nl> class LogBlockInputStream final : public IBlockInputStream <nl> <nl> struct Stream <nl> { <nl> - Stream ( const std : : string & data_path , size_t offset , size_t max_read_buffer_size_ ) <nl> + Stream ( const String & data_path , size_t offset , size_t max_read_buffer_size_ ) <nl> : plain ( data_path , std : : min ( static_cast < Poco : : File : : FileSize > ( max_read_buffer_size_ ) , Poco : : File ( data_path ) . getSize ( ) ) ) , <nl> compressed ( plain ) <nl> { <nl> class LogBlockInputStream final : public IBlockInputStream <nl> CompressedReadBuffer compressed ; <nl> } ; <nl> <nl> - using FileStreams = std : : map < std : : string , Stream > ; <nl> + using FileStreams = std : : map < String , Stream > ; <nl> FileStreams streams ; <nl> <nl> using DeserializeState = IDataType : : DeserializeBinaryBulkStatePtr ; <nl> class LogBlockInputStream final : public IBlockInputStream <nl> DeserializeStates deserialize_states ; <nl> <nl> void readData ( const String & name , const IDataType & type , IColumn & column , size_t max_rows_to_read ) ; <nl> - <nl> } ; <nl> <nl> <nl> class LogBlockOutputStream final : public IBlockOutputStream <nl> explicit LogBlockOutputStream ( StorageLog & storage_ ) <nl> : storage ( storage_ ) , <nl> lock ( storage . rwlock ) , <nl> - marks_stream ( storage . marks_file . path ( ) , 4096 , O_APPEND | O_CREAT | O_WRONLY ) <nl> + marks_stream ( fullPath ( storage . disk , storage . marks_file ) , 4096 , O_APPEND | O_CREAT | O_WRONLY ) <nl> { <nl> } <nl> <nl> class LogBlockOutputStream final : public IBlockOutputStream <nl> <nl> struct Stream <nl> { <nl> - Stream ( const std : : string & data_path , CompressionCodecPtr codec , size_t max_compress_block_size ) : <nl> + Stream ( const String & data_path , CompressionCodecPtr codec , size_t max_compress_block_size ) : <nl> plain ( data_path , max_compress_block_size , O_APPEND | O_CREAT | O_WRONLY ) , <nl> compressed ( plain , std : : move ( codec ) , max_compress_block_size ) <nl> { <nl> class LogBlockOutputStream final : public IBlockOutputStream <nl> using Mark = StorageLog : : Mark ; <nl> using MarksForColumns = std : : vector < std : : pair < size_t , Mark > > ; <nl> <nl> - using FileStreams = std : : map < std : : string , Stream > ; <nl> + using FileStreams = std : : map < String , Stream > ; <nl> FileStreams streams ; <nl> <nl> - using WrittenStreams = std : : set < std : : string > ; <nl> + using WrittenStreams = std : : set < String > ; <nl> <nl> WriteBufferFromFile marks_stream ; / / / Declared below ` lock ` to make the file open when rwlock is captured . <nl> <nl> Block LogBlockInputStream : : readImpl ( ) <nl> if ( rows_read = = rows_limit ) <nl> return res ; <nl> <nl> - / / / If there are no files in the folder , the table is empty . <nl> - if ( Poco : : DirectoryIterator ( storage . getFullPath ( ) ) = = Poco : : DirectoryIterator ( ) ) <nl> + if ( storage . disk - > isDirectoryEmpty ( storage . table_path ) ) <nl> return res ; <nl> <nl> / / / How many rows to read for the next block . <nl> Block LogBlockInputStream : : readImpl ( ) <nl> } <nl> catch ( Exception & e ) <nl> { <nl> - e . addMessage ( " while reading column " + name_type . name + " at " + storage . path + escapeForFileName ( storage . table_name ) ) ; <nl> + e . addMessage ( " while reading column " + name_type . name + " at " + fullPath ( storage . disk , storage . table_path ) ) ; <nl> throw ; <nl> } <nl> <nl> void LogBlockInputStream : : readData ( const String & name , const IDataType & type , <nl> if ( ! stream_for_prefix & & mark_number ) <nl> offset = file_it - > second . marks [ mark_number ] . offset ; <nl> <nl> - auto & data_file_path = file_it - > second . data_file . path ( ) ; <nl> + auto & data_file_path = file_it - > second . data_file ; <nl> auto it = streams . try_emplace ( stream_name , data_file_path , offset , max_read_buffer_size ) . first ; <nl> return & it - > second . compressed ; <nl> } ; <nl> void LogBlockOutputStream : : writeSuffix ( ) <nl> for ( auto & name_stream : streams ) <nl> name_stream . second . finalize ( ) ; <nl> <nl> - std : : vector < Poco : : File > column_files ; <nl> + Strings column_files ; <nl> for ( const auto & name_stream : streams ) <nl> column_files . push_back ( storage . files [ name_stream . first ] . data_file ) ; <nl> column_files . push_back ( storage . marks_file ) ; <nl> void LogBlockOutputStream : : writeData ( const String & name , const IDataType & type <nl> const auto & columns = storage . getColumns ( ) ; <nl> streams . try_emplace ( <nl> stream_name , <nl> - storage . files [ stream_name ] . data_file . path ( ) , <nl> + storage . files [ stream_name ] . data_file , <nl> columns . getCodecOrDefault ( name ) , <nl> storage . max_compress_block_size ) ; <nl> } , settings . path ) ; <nl> void LogBlockOutputStream : : writeMarks ( MarksForColumns & & marks ) <nl> } <nl> <nl> StorageLog : : StorageLog ( <nl> - const std : : string & path_ , <nl> - const std : : string & database_name_ , <nl> - const std : : string & table_name_ , <nl> + DiskPtr disk_ , <nl> + const String & database_name_ , <nl> + const String & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> const ConstraintsDescription & constraints_ , <nl> size_t max_compress_block_size_ ) <nl> - : path ( path_ ) , table_name ( table_name_ ) , database_name ( database_name_ ) , <nl> + : disk ( std : : move ( disk_ ) ) , database_name ( database_name_ ) , table_name ( table_name_ ) , <nl> + table_path ( " data / " + escapeForFileName ( database_name_ ) + ' / ' + escapeForFileName ( table_name_ ) + ' / ' ) , <nl> max_compress_block_size ( max_compress_block_size_ ) , <nl> - file_checker ( path + escapeForFileName ( table_name ) + ' / ' + " sizes . json " ) <nl> + file_checker ( disk , table_path + " sizes . json " ) <nl> { <nl> setColumns ( columns_ ) ; <nl> setConstraints ( constraints_ ) ; <nl> <nl> - if ( path . empty ( ) ) <nl> - throw Exception ( " Storage " + getName ( ) + " requires data path " , ErrorCodes : : INCORRECT_FILE_NAME ) ; <nl> - <nl> - / / / create files if they do not exist <nl> - Poco : : File ( path + escapeForFileName ( table_name ) + ' / ' ) . createDirectories ( ) ; <nl> + / / / create directories if they do not exist <nl> + disk - > createDirectories ( table_path ) ; <nl> <nl> for ( const auto & column : getColumns ( ) . getAllPhysical ( ) ) <nl> addFiles ( column . name , * column . type ) ; <nl> <nl> - marks_file = Poco : : File ( path + escapeForFileName ( table_name ) + ' / ' + DBMS_STORAGE_LOG_MARKS_FILE_NAME ) ; <nl> + marks_file = table_path + DBMS_STORAGE_LOG_MARKS_FILE_NAME ; <nl> } <nl> <nl> <nl> void StorageLog : : addFiles ( const String & column_name , const IDataType & type ) <nl> { <nl> ColumnData & column_data = files [ stream_name ] ; <nl> column_data . column_index = file_count ; <nl> - column_data . data_file = Poco : : File { <nl> - path + escapeForFileName ( table_name ) + ' / ' + stream_name + DBMS_STORAGE_LOG_DATA_FILE_EXTENSION } ; <nl> + column_data . data_file = table_path + stream_name + DBMS_STORAGE_LOG_DATA_FILE_EXTENSION ; <nl> <nl> column_names_by_idx . push_back ( stream_name ) ; <nl> + + file_count ; <nl> void StorageLog : : loadMarks ( ) <nl> if ( loaded_marks ) <nl> return ; <nl> <nl> - using FilesByIndex = std : : vector < Files_t : : iterator > ; <nl> + using FilesByIndex = std : : vector < Files : : iterator > ; <nl> <nl> FilesByIndex files_by_index ( file_count ) ; <nl> - for ( Files_t : : iterator it = files . begin ( ) ; it ! = files . end ( ) ; + + it ) <nl> + for ( Files : : iterator it = files . begin ( ) ; it ! = files . end ( ) ; + + it ) <nl> files_by_index [ it - > second . column_index ] = it ; <nl> <nl> - if ( marks_file . exists ( ) ) <nl> + if ( disk - > exists ( marks_file ) ) <nl> { <nl> - size_t file_size = marks_file . getSize ( ) ; <nl> + size_t file_size = disk - > getFileSize ( marks_file ) ; <nl> if ( file_size % ( file_count * sizeof ( Mark ) ) ! = 0 ) <nl> throw Exception ( " Size of marks file is inconsistent " , ErrorCodes : : SIZES_OF_MARKS_FILES_ARE_INCONSISTENT ) ; <nl> <nl> void StorageLog : : loadMarks ( ) <nl> for ( auto & file : files_by_index ) <nl> file - > second . marks . reserve ( marks_count ) ; <nl> <nl> - ReadBufferFromFile marks_rb ( marks_file . path ( ) , 32768 ) ; <nl> - while ( ! marks_rb . eof ( ) ) <nl> + std : : unique_ptr < ReadBuffer > marks_rb = disk - > read ( marks_file , 32768 ) ; <nl> + while ( ! marks_rb - > eof ( ) ) <nl> { <nl> for ( size_t i = 0 ; i < files_by_index . size ( ) ; + + i ) <nl> { <nl> Mark mark ; <nl> - readIntBinary ( mark . rows , marks_rb ) ; <nl> - readIntBinary ( mark . offset , marks_rb ) ; <nl> + readIntBinary ( mark . rows , * marks_rb ) ; <nl> + readIntBinary ( mark . offset , * marks_rb ) ; <nl> files_by_index [ i ] - > second . marks . push_back ( mark ) ; <nl> } <nl> } <nl> void StorageLog : : loadMarks ( ) <nl> } <nl> <nl> <nl> - void StorageLog : : rename ( const String & new_path_to_db , const String & new_database_name , const String & new_table_name , TableStructureWriteLockHolder & ) <nl> + void StorageLog : : rename ( const String & / * new_path_to_db * / , const String & new_database_name , const String & new_table_name , TableStructureWriteLockHolder & ) <nl> { <nl> std : : unique_lock < std : : shared_mutex > lock ( rwlock ) ; <nl> <nl> - / / / Rename directory with data . <nl> - Poco : : File ( path + escapeForFileName ( table_name ) ) . renameTo ( new_path_to_db + escapeForFileName ( new_table_name ) ) ; <nl> + String new_table_path = " data / " + escapeForFileName ( new_database_name ) + ' / ' + escapeForFileName ( new_table_name ) + ' / ' ; <nl> + <nl> + disk - > moveDirectory ( table_path , new_table_path ) ; <nl> <nl> - path = new_path_to_db ; <nl> - table_name = new_table_name ; <nl> database_name = new_database_name ; <nl> - file_checker . setPath ( path + escapeForFileName ( table_name ) + ' / ' + " sizes . json " ) ; <nl> + table_name = new_table_name ; <nl> + table_path = new_table_path ; <nl> + file_checker . setPath ( table_path + " sizes . json " ) ; <nl> <nl> for ( auto & file : files ) <nl> - file . second . data_file = Poco : : File ( path + escapeForFileName ( table_name ) + ' / ' + Poco : : Path ( file . second . data_file . path ( ) ) . getFileName ( ) ) ; <nl> + file . second . data_file = table_path + Poco : : Path ( file . second . data_file ) . getFileName ( ) ; <nl> <nl> - marks_file = Poco : : File ( path + escapeForFileName ( table_name ) + ' / ' + DBMS_STORAGE_LOG_MARKS_FILE_NAME ) ; <nl> + marks_file = table_path + DBMS_STORAGE_LOG_MARKS_FILE_NAME ; <nl> } <nl> <nl> void StorageLog : : truncate ( const ASTPtr & , const Context & , TableStructureWriteLockHolder & ) <nl> { <nl> std : : shared_lock < std : : shared_mutex > lock ( rwlock ) ; <nl> <nl> - String table_dir = path + escapeForFileName ( table_name ) ; <nl> - <nl> files . clear ( ) ; <nl> file_count = 0 ; <nl> loaded_marks = false ; <nl> <nl> - std : : vector < Poco : : File > data_files ; <nl> - Poco : : File ( table_dir ) . list ( data_files ) ; <nl> - <nl> - for ( auto & file : data_files ) <nl> - file . remove ( false ) ; <nl> + disk - > clearDirectory ( table_path ) ; <nl> <nl> for ( const auto & column : getColumns ( ) . getAllPhysical ( ) ) <nl> addFiles ( column . name , * column . type ) ; <nl> <nl> - file_checker = FileChecker { table_dir + " / " + " sizes . json " } ; <nl> - marks_file = Poco : : File ( table_dir + " / " + DBMS_STORAGE_LOG_MARKS_FILE_NAME ) ; <nl> + file_checker = FileChecker { disk , table_path + " sizes . json " } ; <nl> + marks_file = table_path + DBMS_STORAGE_LOG_MARKS_FILE_NAME ; <nl> } <nl> <nl> <nl> const StorageLog : : Marks & StorageLog : : getMarksWithRealRowCount ( ) const <nl> filename = IDataType : : getFileNameForStream ( column_name , substream_path ) ; <nl> } , substream_root_path ) ; <nl> <nl> - Files_t : : const_iterator it = files . find ( filename ) ; <nl> + Files : : const_iterator it = files . find ( filename ) ; <nl> if ( files . end ( ) = = it ) <nl> throw Exception ( " Cannot find file " + filename , ErrorCodes : : LOGICAL_ERROR ) ; <nl> <nl> void registerStorageLog ( StorageFactory & factory ) <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> return StorageLog : : create ( <nl> - args . data_path , args . database_name , args . table_name , args . columns , args . constraints , <nl> + args . context . getDefaultDisk ( ) , args . database_name , args . table_name , args . columns , args . constraints , <nl> args . context . getSettings ( ) . max_compress_block_size ) ; <nl> } ) ; <nl> } <nl> mmm a / dbms / src / Storages / StorageLog . h <nl> ppp b / dbms / src / Storages / StorageLog . h <nl> <nl> # include < shared_mutex > <nl> # include < ext / shared_ptr_helper . h > <nl> <nl> - # include < Poco / File . h > <nl> - <nl> + # include < Disks / IDisk . h > <nl> # include < Storages / IStorage . h > <nl> # include < Common / FileChecker . h > <nl> # include < Common / escapeForFileName . h > <nl> <nl> <nl> namespace DB <nl> { <nl> - <nl> / * * Implements simple table engine without support of indices . <nl> * The data is stored in a compressed form . <nl> * / <nl> class StorageLog : public ext : : shared_ptr_helper < StorageLog > , public IStorage <nl> { <nl> - friend class LogBlockInputStream ; <nl> - friend class LogBlockOutputStream ; <nl> - friend struct ext : : shared_ptr_helper < StorageLog > ; <nl> + friend class LogBlockInputStream ; <nl> + friend class LogBlockOutputStream ; <nl> + friend struct ext : : shared_ptr_helper < StorageLog > ; <nl> <nl> public : <nl> - std : : string getName ( ) const override { return " Log " ; } <nl> - std : : string getTableName ( ) const override { return table_name ; } <nl> - std : : string getDatabaseName ( ) const override { return database_name ; } <nl> + String getName ( ) const override { return " Log " ; } <nl> + String getTableName ( ) const override { return table_name ; } <nl> + String getDatabaseName ( ) const override { return database_name ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> friend struct ext : : shared_ptr_helper < StorageLog > ; <nl> <nl> BlockOutputStreamPtr write ( const ASTPtr & query , const Context & context ) override ; <nl> <nl> - void rename ( const String & new_path_to_db , const String & new_database_name , const String & new_table_name , TableStructureWriteLockHolder & ) override ; <nl> + void rename ( <nl> + const String & new_path_to_db , <nl> + const String & new_database_name , <nl> + const String & new_table_name , <nl> + TableStructureWriteLockHolder & ) override ; <nl> <nl> CheckResults checkData ( const ASTPtr & / * query * / , const Context & / * context * / ) override ; <nl> <nl> void truncate ( const ASTPtr & , const Context & , TableStructureWriteLockHolder & ) override ; <nl> <nl> - std : : string fullPath ( ) const { return path + escapeForFileName ( table_name ) + ' / ' ; } <nl> - <nl> - Strings getDataPaths ( ) const override { return { fullPath ( ) } ; } <nl> + Strings getDataPaths ( ) const override { return { DB : : fullPath ( disk , table_path ) } ; } <nl> <nl> protected : <nl> / * * Attach the table with the appropriate name , along the appropriate path ( with / at the end ) , <nl> friend struct ext : : shared_ptr_helper < StorageLog > ; <nl> * consisting of the specified columns ; Create files if they do not exist . <nl> * / <nl> StorageLog ( <nl> - const std : : string & path_ , <nl> - const std : : string & database_name_ , <nl> - const std : : string & table_name_ , <nl> + DiskPtr disk_ , <nl> + const String & database_name_ , <nl> + const String & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> const ConstraintsDescription & constraints_ , <nl> size_t max_compress_block_size_ ) ; <nl> <nl> private : <nl> - String path ; <nl> - String table_name ; <nl> + DiskPtr disk ; <nl> String database_name ; <nl> + String table_name ; <nl> + String table_path ; <nl> <nl> mutable std : : shared_mutex rwlock ; <nl> <nl> friend struct ext : : shared_ptr_helper < StorageLog > ; <nl> * / <nl> struct Mark <nl> { <nl> - size_t rows ; / / / How many rows are before this offset including the block at this offset . <nl> - size_t offset ; / / / The offset in compressed file . <nl> + size_t rows ; / / / How many rows are before this offset including the block at this offset . <nl> + size_t offset ; / / / The offset in compressed file . <nl> } ; <nl> - <nl> using Marks = std : : vector < Mark > ; <nl> <nl> / / / Column data <nl> friend struct ext : : shared_ptr_helper < StorageLog > ; <nl> / / / Does not necessarily match the column number among the columns of the table : columns with lengths of arrays are also numbered here . <nl> size_t column_index ; <nl> <nl> - Poco : : File data_file ; <nl> + String data_file ; <nl> Marks marks ; <nl> } ; <nl> - using Files_t = std : : map < String , ColumnData > ; <nl> + using Files = std : : map < String , ColumnData > ; <nl> <nl> - Files_t files ; / / / name - > data <nl> + Files files ; / / / name - > data <nl> <nl> Names column_names_by_idx ; / / / column_index - > name <nl> <nl> - Poco : : File marks_file ; <nl> + String marks_file ; <nl> <nl> / / / The order of adding files should not change : it corresponds to the order of the columns in the marks file . <nl> void addFiles ( const String & column_name , const IDataType & type ) ; <nl> friend struct ext : : shared_ptr_helper < StorageLog > ; <nl> * Return the first group of marks that contain the number of rows , but not the internals of the arrays . <nl> * / <nl> const Marks & getMarksWithRealRowCount ( ) const ; <nl> - <nl> - std : : string getFullPath ( ) const { return path + escapeForFileName ( table_name ) + ' / ' ; } <nl> } ; <nl> <nl> } <nl> mmm a / dbms / src / Storages / StorageStripeLog . cpp <nl> ppp b / dbms / src / Storages / StorageStripeLog . cpp <nl> <nl> # include < Storages / StorageStripeLog . h > <nl> # include < Storages / StorageFactory . h > <nl> # include < Poco / DirectoryIterator . h > <nl> + # include < Compression / CompressedReadBuffer . h > <nl> <nl> <nl> namespace DB <nl> class StripeLogBlockInputStream final : public IBlockInputStream <nl> { <nl> block_in . reset ( ) ; <nl> data_in . reset ( ) ; <nl> + data_in_compressed . reset ( ) ; <nl> index . reset ( ) ; <nl> } <nl> } <nl> class StripeLogBlockInputStream final : public IBlockInputStream <nl> * - to save RAM when using a large number of sources . <nl> * / <nl> bool started = false ; <nl> - std : : optional < CompressedReadBufferFromFile > data_in ; <nl> + std : : unique_ptr < ReadBuffer > data_in_compressed ; <nl> + std : : optional < CompressedReadBuffer > data_in ; <nl> std : : optional < NativeBlockInputStream > block_in ; <nl> <nl> void start ( ) <nl> class StripeLogBlockInputStream final : public IBlockInputStream <nl> { <nl> started = true ; <nl> <nl> - data_in . emplace ( <nl> - storage . full_path ( ) + " data . bin " , 0 , 0 , <nl> - std : : min ( static_cast < Poco : : File : : FileSize > ( max_read_buffer_size ) , Poco : : File ( storage . full_path ( ) + " data . bin " ) . getSize ( ) ) ) ; <nl> + String data_file = storage . table_path + " data . bin " ; <nl> + size_t buffer_size = std : : min ( max_read_buffer_size , storage . disk - > getFileSize ( data_file ) ) ; <nl> <nl> + data_in_compressed = storage . disk - > read ( data_file , buffer_size ) ; <nl> + data_in . emplace ( * data_in_compressed ) ; <nl> block_in . emplace ( * data_in , 0 , index_begin , index_end ) ; <nl> } <nl> } <nl> class StripeLogBlockOutputStream final : public IBlockOutputStream <nl> public : <nl> explicit StripeLogBlockOutputStream ( StorageStripeLog & storage_ ) <nl> : storage ( storage_ ) , lock ( storage . rwlock ) , <nl> - data_out_compressed ( storage . full_path ( ) + " data . bin " , DBMS_DEFAULT_BUFFER_SIZE , O_WRONLY | O_APPEND | O_CREAT ) , <nl> - data_out ( data_out_compressed , CompressionCodecFactory : : instance ( ) . getDefaultCodec ( ) , storage . max_compress_block_size ) , <nl> - index_out_compressed ( storage . full_path ( ) + " index . mrk " , INDEX_BUFFER_SIZE , O_WRONLY | O_APPEND | O_CREAT ) , <nl> - index_out ( index_out_compressed ) , <nl> - block_out ( data_out , 0 , storage . getSampleBlock ( ) , false , & index_out , Poco : : File ( storage . full_path ( ) + " data . bin " ) . getSize ( ) ) <nl> + data_out_file ( storage . table_path + " data . bin " ) , <nl> + data_out_compressed ( storage . disk - > append ( data_out_file ) ) , <nl> + data_out ( * data_out_compressed , CompressionCodecFactory : : instance ( ) . getDefaultCodec ( ) , storage . max_compress_block_size ) , <nl> + index_out_file ( storage . table_path + " index . mrk " ) , <nl> + index_out_compressed ( storage . disk - > append ( index_out_file ) ) , <nl> + index_out ( * index_out_compressed ) , <nl> + block_out ( data_out , 0 , storage . getSampleBlock ( ) , false , & index_out , storage . disk - > getFileSize ( data_out_file ) ) <nl> { <nl> } <nl> <nl> class StripeLogBlockOutputStream final : public IBlockOutputStream <nl> <nl> block_out . writeSuffix ( ) ; <nl> data_out . next ( ) ; <nl> - data_out_compressed . next ( ) ; <nl> + data_out_compressed - > next ( ) ; <nl> index_out . next ( ) ; <nl> - index_out_compressed . next ( ) ; <nl> + index_out_compressed - > next ( ) ; <nl> <nl> - FileChecker : : Files files { data_out_compressed . getFileName ( ) , index_out_compressed . getFileName ( ) } ; <nl> - storage . file_checker . update ( files . begin ( ) , files . end ( ) ) ; <nl> + storage . file_checker . update ( data_out_file ) ; <nl> + storage . file_checker . update ( index_out_file ) ; <nl> <nl> done = true ; <nl> } <nl> class StripeLogBlockOutputStream final : public IBlockOutputStream <nl> StorageStripeLog & storage ; <nl> std : : unique_lock < std : : shared_mutex > lock ; <nl> <nl> - WriteBufferFromFile data_out_compressed ; <nl> + String data_out_file ; <nl> + std : : unique_ptr < WriteBuffer > data_out_compressed ; <nl> CompressedWriteBuffer data_out ; <nl> - WriteBufferFromFile index_out_compressed ; <nl> + String index_out_file ; <nl> + std : : unique_ptr < WriteBuffer > index_out_compressed ; <nl> CompressedWriteBuffer index_out ; <nl> NativeBlockOutputStream block_out ; <nl> <nl> class StripeLogBlockOutputStream final : public IBlockOutputStream <nl> <nl> <nl> StorageStripeLog : : StorageStripeLog ( <nl> - const std : : string & path_ , <nl> - const std : : string & database_name_ , <nl> - const std : : string & table_name_ , <nl> + DiskPtr disk_ , <nl> + const String & database_name_ , <nl> + const String & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> const ConstraintsDescription & constraints_ , <nl> bool attach , <nl> size_t max_compress_block_size_ ) <nl> - : path ( path_ ) , table_name ( table_name_ ) , database_name ( database_name_ ) , <nl> + : disk ( disk_ ) , database_name ( database_name_ ) , table_name ( table_name_ ) , <nl> + table_path ( " data / " + escapeForFileName ( database_name_ ) + ' / ' + escapeForFileName ( table_name_ ) + ' / ' ) , <nl> max_compress_block_size ( max_compress_block_size_ ) , <nl> - file_checker ( path + escapeForFileName ( table_name ) + ' / ' + " sizes . json " ) , <nl> + file_checker ( disk , table_path + " sizes . json " ) , <nl> log ( & Logger : : get ( " StorageStripeLog " ) ) <nl> { <nl> setColumns ( columns_ ) ; <nl> setConstraints ( constraints_ ) ; <nl> <nl> - if ( path . empty ( ) ) <nl> - throw Exception ( " Storage " + getName ( ) + " requires data path " , ErrorCodes : : INCORRECT_FILE_NAME ) ; <nl> - <nl> - String full_path = path + escapeForFileName ( table_name ) + ' / ' ; <nl> if ( ! attach ) <nl> { <nl> - / / / create files if they do not exist <nl> - if ( 0 ! = mkdir ( full_path . c_str ( ) , S_IRWXU | S_IRWXG | S_IRWXO ) & & errno ! = EEXIST ) <nl> - throwFromErrnoWithPath ( " Cannot create directory " + full_path , full_path , <nl> - ErrorCodes : : CANNOT_CREATE_DIRECTORY ) ; <nl> + / / / create directories if they do not exist <nl> + disk - > createDirectories ( table_path ) ; <nl> } <nl> } <nl> <nl> <nl> - void StorageStripeLog : : rename ( const String & new_path_to_db , const String & new_database_name , const String & new_table_name , TableStructureWriteLockHolder & ) <nl> + void StorageStripeLog : : rename ( const String & / * new_path_to_db * / , const String & new_database_name , const String & new_table_name , TableStructureWriteLockHolder & ) <nl> { <nl> std : : unique_lock < std : : shared_mutex > lock ( rwlock ) ; <nl> <nl> - / / / Rename directory with data . <nl> - Poco : : File ( path + escapeForFileName ( table_name ) ) . renameTo ( new_path_to_db + escapeForFileName ( new_table_name ) ) ; <nl> + String new_table_path = " data / " + escapeForFileName ( new_database_name ) + ' / ' + escapeForFileName ( new_table_name ) + ' / ' ; <nl> + <nl> + disk - > moveDirectory ( table_path , new_table_path ) ; <nl> <nl> - path = new_path_to_db ; <nl> - table_name = new_table_name ; <nl> database_name = new_database_name ; <nl> - file_checker . setPath ( path + escapeForFileName ( table_name ) + " / " + " sizes . json " ) ; <nl> + table_name = new_table_name ; <nl> + table_path = new_table_path ; <nl> + file_checker . setPath ( table_path + " sizes . json " ) ; <nl> } <nl> <nl> <nl> BlockInputStreams StorageStripeLog : : read ( <nl> <nl> NameSet column_names_set ( column_names . begin ( ) , column_names . end ( ) ) ; <nl> <nl> - if ( ! Poco : : File ( full_path ( ) + " index . mrk " ) . exists ( ) ) <nl> + String index_file = table_path + " index . mrk " ; <nl> + if ( ! disk - > exists ( index_file ) ) <nl> return { std : : make_shared < NullBlockInputStream > ( getSampleBlockForColumns ( column_names ) ) } ; <nl> <nl> - CompressedReadBufferFromFile index_in ( full_path ( ) + " index . mrk " , 0 , 0 , INDEX_BUFFER_SIZE ) ; <nl> + std : : unique_ptr < ReadBuffer > index_in_compressed = disk - > read ( index_file , INDEX_BUFFER_SIZE ) ; <nl> + CompressedReadBuffer index_in ( * index_in_compressed ) ; <nl> + <nl> std : : shared_ptr < const IndexForNativeFormat > index { std : : make_shared < IndexForNativeFormat > ( index_in , column_names_set ) } ; <nl> <nl> BlockInputStreams res ; <nl> void StorageStripeLog : : truncate ( const ASTPtr & , const Context & , TableStructureW <nl> <nl> std : : shared_lock < std : : shared_mutex > lock ( rwlock ) ; <nl> <nl> - auto file = Poco : : File ( path + escapeForFileName ( table_name ) ) ; <nl> - file . remove ( true ) ; <nl> - file . createDirectories ( ) ; <nl> + disk - > clearDirectory ( table_path ) ; <nl> <nl> - file_checker = FileChecker { path + escapeForFileName ( table_name ) + ' / ' + " sizes . json " } ; <nl> + file_checker = FileChecker { disk , table_path + " sizes . json " } ; <nl> } <nl> <nl> <nl> void registerStorageStripeLog ( StorageFactory & factory ) <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> return StorageStripeLog : : create ( <nl> - args . data_path , args . database_name , args . table_name , args . columns , args . constraints , <nl> + args . context . getDefaultDisk ( ) , args . database_name , args . table_name , args . columns , args . constraints , <nl> args . attach , args . context . getSettings ( ) . max_compress_block_size ) ; <nl> } ) ; <nl> } <nl> mmm a / dbms / src / Storages / StorageStripeLog . h <nl> ppp b / dbms / src / Storages / StorageStripeLog . h <nl> <nl> <nl> # include < ext / shared_ptr_helper . h > <nl> <nl> - # include < Poco / File . h > <nl> - <nl> + # include < Core / Defines . h > <nl> # include < Storages / IStorage . h > <nl> # include < Common / FileChecker . h > <nl> # include < Common / escapeForFileName . h > <nl> - # include < Core / Defines . h > <nl> <nl> <nl> namespace DB <nl> { <nl> - <nl> / * * Implements a table engine that is suitable for small chunks of the log . <nl> * In doing so , stores all the columns in a single Native file , with a nearby index . <nl> * / <nl> class StorageStripeLog : public ext : : shared_ptr_helper < StorageStripeLog > , public IStorage <nl> { <nl> - friend class StripeLogBlockInputStream ; <nl> - friend class StripeLogBlockOutputStream ; <nl> - friend struct ext : : shared_ptr_helper < StorageStripeLog > ; <nl> + friend class StripeLogBlockInputStream ; <nl> + friend class StripeLogBlockOutputStream ; <nl> + friend struct ext : : shared_ptr_helper < StorageStripeLog > ; <nl> <nl> public : <nl> - std : : string getName ( ) const override { return " StripeLog " ; } <nl> - std : : string getTableName ( ) const override { return table_name ; } <nl> - std : : string getDatabaseName ( ) const override { return database_name ; } <nl> + String getName ( ) const override { return " StripeLog " ; } <nl> + String getTableName ( ) const override { return table_name ; } <nl> + String getDatabaseName ( ) const override { return database_name ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> friend struct ext : : shared_ptr_helper < StorageStripeLog > ; <nl> <nl> BlockOutputStreamPtr write ( const ASTPtr & query , const Context & context ) override ; <nl> <nl> - void rename ( const String & new_path_to_db , const String & new_database_name , const String & new_table_name , TableStructureWriteLockHolder & ) override ; <nl> + void rename ( <nl> + const String & new_path_to_db , <nl> + const String & new_database_name , <nl> + const String & new_table_name , <nl> + TableStructureWriteLockHolder & ) override ; <nl> <nl> CheckResults checkData ( const ASTPtr & / * query * / , const Context & / * context * / ) override ; <nl> <nl> - / / / Data of the file . <nl> - struct ColumnData <nl> - { <nl> - Poco : : File data_file ; <nl> - } ; <nl> - using Files_t = std : : map < String , ColumnData > ; <nl> - <nl> - std : : string full_path ( ) const { return path + escapeForFileName ( table_name ) + ' / ' ; } <nl> - <nl> - Strings getDataPaths ( ) const override { return { full_path ( ) } ; } <nl> + Strings getDataPaths ( ) const override { return { DB : : fullPath ( disk , table_path ) } ; } <nl> <nl> void truncate ( const ASTPtr & , const Context & , TableStructureWriteLockHolder & ) override ; <nl> <nl> + protected : <nl> + StorageStripeLog ( <nl> + DiskPtr disk_ , <nl> + const String & database_name_ , <nl> + const String & table_name_ , <nl> + const ColumnsDescription & columns_ , <nl> + const ConstraintsDescription & constraints_ , <nl> + bool attach , <nl> + size_t max_compress_block_size_ ) ; <nl> + <nl> private : <nl> - String path ; <nl> - String table_name ; <nl> + struct ColumnData <nl> + { <nl> + String data_file ; <nl> + } ; <nl> + using Files = std : : map < String , ColumnData > ; <nl> + <nl> + DiskPtr disk ; <nl> String database_name ; <nl> + String table_name ; <nl> + String table_path ; <nl> <nl> size_t max_compress_block_size ; <nl> <nl> friend struct ext : : shared_ptr_helper < StorageStripeLog > ; <nl> mutable std : : shared_mutex rwlock ; <nl> <nl> Logger * log ; <nl> - <nl> - protected : <nl> - StorageStripeLog ( <nl> - const std : : string & path_ , <nl> - const std : : string & database_name_ , <nl> - const std : : string & table_name_ , <nl> - const ColumnsDescription & columns_ , <nl> - const ConstraintsDescription & constraints_ , <nl> - bool attach , <nl> - size_t max_compress_block_size_ ) ; <nl> } ; <nl> <nl> } <nl> mmm a / dbms / src / Storages / StorageTinyLog . cpp <nl> ppp b / dbms / src / Storages / StorageTinyLog . cpp <nl> <nl> # include < Storages / StorageFactory . h > <nl> # include < Storages / CheckResults . h > <nl> <nl> - # include < Poco / DirectoryIterator . h > <nl> - <nl> # define DBMS_STORAGE_LOG_DATA_FILE_EXTENSION " . bin " <nl> <nl> <nl> class TinyLogBlockInputStream final : public IBlockInputStream <nl> <nl> struct Stream <nl> { <nl> - Stream ( const std : : string & data_path , size_t max_read_buffer_size_ ) <nl> - : plain ( data_path , std : : min ( static_cast < Poco : : File : : FileSize > ( max_read_buffer_size_ ) , Poco : : File ( data_path ) . getSize ( ) ) ) , <nl> - compressed ( plain ) <nl> + Stream ( const DiskPtr & disk , const String & data_path , size_t max_read_buffer_size ) <nl> + : plain ( disk - > read ( data_path , std : : min ( max_read_buffer_size , disk - > getFileSize ( data_path ) ) ) ) , <nl> + compressed ( * plain ) <nl> { <nl> } <nl> <nl> - ReadBufferFromFile plain ; <nl> + std : : unique_ptr < ReadBuffer > plain ; <nl> CompressedReadBuffer compressed ; <nl> } ; <nl> <nl> - using FileStreams = std : : map < std : : string , std : : unique_ptr < Stream > > ; <nl> + using FileStreams = std : : map < String , std : : unique_ptr < Stream > > ; <nl> FileStreams streams ; <nl> <nl> using DeserializeState = IDataType : : DeserializeBinaryBulkStatePtr ; <nl> class TinyLogBlockOutputStream final : public IBlockOutputStream <nl> <nl> struct Stream <nl> { <nl> - Stream ( const std : : string & data_path , CompressionCodecPtr codec , size_t max_compress_block_size ) : <nl> - plain ( data_path , max_compress_block_size , O_APPEND | O_CREAT | O_WRONLY ) , <nl> - compressed ( plain , std : : move ( codec ) , max_compress_block_size ) <nl> + Stream ( const DiskPtr & disk , const String & data_path , CompressionCodecPtr codec , size_t max_compress_block_size ) : <nl> + plain ( disk - > append ( data_path , max_compress_block_size ) ) , <nl> + compressed ( * plain , std : : move ( codec ) , max_compress_block_size ) <nl> { <nl> } <nl> <nl> - WriteBufferFromFile plain ; <nl> + std : : unique_ptr < WriteBuffer > plain ; <nl> CompressedWriteBuffer compressed ; <nl> <nl> void finalize ( ) <nl> { <nl> compressed . next ( ) ; <nl> - plain . next ( ) ; <nl> + plain - > next ( ) ; <nl> } <nl> } ; <nl> <nl> - using FileStreams = std : : map < std : : string , std : : unique_ptr < Stream > > ; <nl> + using FileStreams = std : : map < String , std : : unique_ptr < Stream > > ; <nl> FileStreams streams ; <nl> <nl> using SerializeState = IDataType : : SerializeBinaryBulkStatePtr ; <nl> using SerializeStates = std : : map < String , SerializeState > ; <nl> SerializeStates serialize_states ; <nl> <nl> - using WrittenStreams = std : : set < std : : string > ; <nl> + using WrittenStreams = std : : set < String > ; <nl> <nl> IDataType : : OutputStreamGetter createStreamGetter ( const String & name , WrittenStreams & written_streams ) ; <nl> void writeData ( const String & name , const IDataType & type , const IColumn & column , WrittenStreams & written_streams ) ; <nl> Block TinyLogBlockInputStream : : readImpl ( ) <nl> return res ; <nl> } <nl> <nl> - { <nl> - / / / if there are no files in the folder , it means that the table is empty <nl> - if ( Poco : : DirectoryIterator ( storage . fullPath ( ) ) = = Poco : : DirectoryIterator ( ) ) <nl> - return res ; <nl> - } <nl> + if ( storage . disk - > isDirectoryEmpty ( storage . table_path ) ) <nl> + return res ; <nl> <nl> for ( const auto & name_type : columns ) <nl> { <nl> Block TinyLogBlockInputStream : : readImpl ( ) <nl> } <nl> catch ( Exception & e ) <nl> { <nl> - e . addMessage ( " while reading column " + name_type . name + " at " + storage . fullPath ( ) ) ; <nl> + e . addMessage ( " while reading column " + name_type . name + " at " + fullPath ( storage . disk , storage . table_path ) ) ; <nl> throw ; <nl> } <nl> <nl> void TinyLogBlockInputStream : : readData ( const String & name , const IDataType & ty <nl> String stream_name = IDataType : : getFileNameForStream ( name , path ) ; <nl> <nl> if ( ! streams . count ( stream_name ) ) <nl> - streams [ stream_name ] = std : : make_unique < Stream > ( storage . files [ stream_name ] . data_file . path ( ) , max_read_buffer_size ) ; <nl> + streams [ stream_name ] = std : : make_unique < Stream > ( storage . disk , storage . files [ stream_name ] . data_file , max_read_buffer_size ) ; <nl> <nl> return & streams [ stream_name ] - > compressed ; <nl> } ; <nl> IDataType : : OutputStreamGetter TinyLogBlockOutputStream : : createStreamGetter ( const <nl> <nl> const auto & columns = storage . getColumns ( ) ; <nl> if ( ! streams . count ( stream_name ) ) <nl> - streams [ stream_name ] = std : : make_unique < Stream > ( storage . files [ stream_name ] . data_file . path ( ) , <nl> + streams [ stream_name ] = std : : make_unique < Stream > ( storage . disk , <nl> + storage . files [ stream_name ] . data_file , <nl> columns . getCodecOrDefault ( name ) , <nl> storage . max_compress_block_size ) ; <nl> <nl> void TinyLogBlockOutputStream : : writeSuffix ( ) <nl> for ( auto & stream : streams ) <nl> stream . second - > finalize ( ) ; <nl> <nl> - std : : vector < Poco : : File > column_files ; <nl> + Strings column_files ; <nl> for ( auto & pair : streams ) <nl> column_files . push_back ( storage . files [ pair . first ] . data_file ) ; <nl> <nl> void TinyLogBlockOutputStream : : write ( const Block & block ) <nl> <nl> <nl> StorageTinyLog : : StorageTinyLog ( <nl> - const std : : string & path_ , <nl> - const std : : string & database_name_ , <nl> - const std : : string & table_name_ , <nl> + DiskPtr disk_ , <nl> + const String & database_name_ , <nl> + const String & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> const ConstraintsDescription & constraints_ , <nl> bool attach , <nl> size_t max_compress_block_size_ ) <nl> - : path ( path_ ) , table_name ( table_name_ ) , database_name ( database_name_ ) , <nl> + : disk ( disk_ ) , database_name ( database_name_ ) , table_name ( table_name_ ) , <nl> + table_path ( " data / " + escapeForFileName ( database_name_ ) + ' / ' + escapeForFileName ( table_name_ ) + ' / ' ) , <nl> max_compress_block_size ( max_compress_block_size_ ) , <nl> - file_checker ( path + escapeForFileName ( table_name ) + ' / ' + " sizes . json " ) , <nl> + file_checker ( disk , table_path + " sizes . json " ) , <nl> log ( & Logger : : get ( " StorageTinyLog " ) ) <nl> { <nl> setColumns ( columns_ ) ; <nl> setConstraints ( constraints_ ) ; <nl> <nl> - if ( path . empty ( ) ) <nl> - throw Exception ( " Storage " + getName ( ) + " requires data path " , ErrorCodes : : INCORRECT_FILE_NAME ) ; <nl> - <nl> - String full_path = path + escapeForFileName ( table_name ) + ' / ' ; <nl> if ( ! attach ) <nl> { <nl> - / / / create files if they do not exist <nl> - if ( 0 ! = mkdir ( full_path . c_str ( ) , S_IRWXU | S_IRWXG | S_IRWXO ) & & errno ! = EEXIST ) <nl> - throwFromErrnoWithPath ( " Cannot create directory " + full_path , full_path , <nl> - ErrorCodes : : CANNOT_CREATE_DIRECTORY ) ; <nl> + / / / create directories if they do not exist <nl> + disk - > createDirectories ( table_path ) ; <nl> } <nl> <nl> for ( const auto & col : getColumns ( ) . getAllPhysical ( ) ) <nl> void StorageTinyLog : : addFiles ( const String & column_name , const IDataType & type <nl> { <nl> ColumnData column_data ; <nl> files . insert ( std : : make_pair ( stream_name , column_data ) ) ; <nl> - files [ stream_name ] . data_file = Poco : : File ( <nl> - path + escapeForFileName ( table_name ) + ' / ' + stream_name + DBMS_STORAGE_LOG_DATA_FILE_EXTENSION ) ; <nl> + files [ stream_name ] . data_file = table_path + stream_name + DBMS_STORAGE_LOG_DATA_FILE_EXTENSION ; <nl> } <nl> } ; <nl> <nl> void StorageTinyLog : : addFiles ( const String & column_name , const IDataType & type <nl> } <nl> <nl> <nl> - void StorageTinyLog : : rename ( const String & new_path_to_db , const String & new_database_name , const String & new_table_name , TableStructureWriteLockHolder & ) <nl> + void StorageTinyLog : : rename ( const String & / * new_path_to_db * / , const String & new_database_name , const String & new_table_name , TableStructureWriteLockHolder & ) <nl> { <nl> std : : unique_lock < std : : shared_mutex > lock ( rwlock ) ; <nl> <nl> - / / / Rename directory with data . <nl> - Poco : : File ( path + escapeForFileName ( table_name ) ) . renameTo ( new_path_to_db + escapeForFileName ( new_table_name ) ) ; <nl> + String new_table_path = " data / " + escapeForFileName ( new_database_name ) + ' / ' + escapeForFileName ( new_table_name ) + ' / ' ; <nl> + <nl> + disk - > moveDirectory ( table_path , new_table_path ) ; <nl> <nl> - path = new_path_to_db ; <nl> - table_name = new_table_name ; <nl> database_name = new_database_name ; <nl> - file_checker . setPath ( path + escapeForFileName ( table_name ) + " / " + " sizes . json " ) ; <nl> + table_name = new_table_name ; <nl> + table_path = new_table_path ; <nl> + file_checker . setPath ( table_path + " sizes . json " ) ; <nl> <nl> - for ( Files_t : : iterator it = files . begin ( ) ; it ! = files . end ( ) ; + + it ) <nl> - it - > second . data_file = Poco : : File ( path + escapeForFileName ( table_name ) + ' / ' + Poco : : Path ( it - > second . data_file . path ( ) ) . getFileName ( ) ) ; <nl> + for ( auto & file : files ) <nl> + file . second . data_file = table_path + Poco : : Path ( file . second . data_file ) . getFileName ( ) ; <nl> } <nl> <nl> <nl> void StorageTinyLog : : truncate ( const ASTPtr & , const Context & , TableStructureWri <nl> <nl> std : : unique_lock < std : : shared_mutex > lock ( rwlock ) ; <nl> <nl> - auto file = Poco : : File ( path + escapeForFileName ( table_name ) ) ; <nl> - file . remove ( true ) ; <nl> - file . createDirectories ( ) ; <nl> + disk - > clearDirectory ( table_path ) ; <nl> <nl> files . clear ( ) ; <nl> - file_checker = FileChecker { path + escapeForFileName ( table_name ) + ' / ' + " sizes . json " } ; <nl> + file_checker = FileChecker { disk , table_path + " sizes . json " } ; <nl> <nl> for ( const auto & column : getColumns ( ) . getAllPhysical ( ) ) <nl> addFiles ( column . name , * column . type ) ; <nl> void registerStorageTinyLog ( StorageFactory & factory ) <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> return StorageTinyLog : : create ( <nl> - args . data_path , args . database_name , args . table_name , args . columns , args . constraints , <nl> + args . context . getDefaultDisk ( ) , args . database_name , args . table_name , args . columns , args . constraints , <nl> args . attach , args . context . getSettings ( ) . max_compress_block_size ) ; <nl> } ) ; <nl> } <nl> mmm a / dbms / src / Storages / StorageTinyLog . h <nl> ppp b / dbms / src / Storages / StorageTinyLog . h <nl> <nl> <nl> # include < ext / shared_ptr_helper . h > <nl> <nl> - # include < Poco / File . h > <nl> - <nl> + # include < Core / Defines . h > <nl> # include < Storages / IStorage . h > <nl> # include < Common / FileChecker . h > <nl> # include < Common / escapeForFileName . h > <nl> - # include < Core / Defines . h > <nl> <nl> <nl> namespace DB <nl> { <nl> - <nl> / * * Implements a table engine that is suitable for small chunks of the log . <nl> * It differs from StorageLog in the absence of mark files . <nl> * / <nl> class StorageTinyLog : public ext : : shared_ptr_helper < StorageTinyLog > , public IStorage <nl> { <nl> - friend class TinyLogBlockInputStream ; <nl> - friend class TinyLogBlockOutputStream ; <nl> - friend struct ext : : shared_ptr_helper < StorageTinyLog > ; <nl> + friend class TinyLogBlockInputStream ; <nl> + friend class TinyLogBlockOutputStream ; <nl> + friend struct ext : : shared_ptr_helper < StorageTinyLog > ; <nl> <nl> public : <nl> - std : : string getName ( ) const override { return " TinyLog " ; } <nl> - std : : string getTableName ( ) const override { return table_name ; } <nl> - std : : string getDatabaseName ( ) const override { return database_name ; } <nl> + String getName ( ) const override { return " TinyLog " ; } <nl> + String getTableName ( ) const override { return table_name ; } <nl> + String getDatabaseName ( ) const override { return database_name ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> friend struct ext : : shared_ptr_helper < StorageTinyLog > ; <nl> <nl> BlockOutputStreamPtr write ( const ASTPtr & query , const Context & context ) override ; <nl> <nl> - void rename ( const String & new_path_to_db , const String & new_database_name , const String & new_table_name , TableStructureWriteLockHolder & ) override ; <nl> + void rename ( <nl> + const String & new_path_to_db , <nl> + const String & new_database_name , <nl> + const String & new_table_name , <nl> + TableStructureWriteLockHolder & ) override ; <nl> <nl> CheckResults checkData ( const ASTPtr & / * query * / , const Context & / * context * / ) override ; <nl> <nl> - / / / Column data <nl> - struct ColumnData <nl> - { <nl> - Poco : : File data_file ; <nl> - } ; <nl> - using Files_t = std : : map < String , ColumnData > ; <nl> - <nl> - std : : string fullPath ( ) const { return path + escapeForFileName ( table_name ) + ' / ' ; } <nl> - <nl> - Strings getDataPaths ( ) const override { return { fullPath ( ) } ; } <nl> + Strings getDataPaths ( ) const override { return { DB : : fullPath ( disk , table_path ) } ; } <nl> <nl> void truncate ( const ASTPtr & , const Context & , TableStructureWriteLockHolder & ) override ; <nl> <nl> + protected : <nl> + StorageTinyLog ( <nl> + DiskPtr disk_ , <nl> + const String & database_name_ , <nl> + const String & table_name_ , <nl> + const ColumnsDescription & columns_ , <nl> + const ConstraintsDescription & constraints_ , <nl> + bool attach , <nl> + size_t max_compress_block_size_ ) ; <nl> + <nl> private : <nl> - String path ; <nl> - String table_name ; <nl> + struct ColumnData <nl> + { <nl> + String data_file ; <nl> + } ; <nl> + using Files = std : : map < String , ColumnData > ; <nl> + <nl> + DiskPtr disk ; <nl> String database_name ; <nl> + String table_name ; <nl> + String table_path ; <nl> <nl> size_t max_compress_block_size ; <nl> <nl> - Files_t files ; <nl> + Files files ; <nl> <nl> FileChecker file_checker ; <nl> mutable std : : shared_mutex rwlock ; <nl> friend struct ext : : shared_ptr_helper < StorageTinyLog > ; <nl> <nl> void addFile ( const String & column_name , const IDataType & type , size_t level = 0 ) ; <nl> void addFiles ( const String & column_name , const IDataType & type ) ; <nl> - <nl> - protected : <nl> - StorageTinyLog ( <nl> - const std : : string & path_ , <nl> - const std : : string & database_name_ , <nl> - const std : : string & table_name_ , <nl> - const ColumnsDescription & columns_ , <nl> - const ConstraintsDescription & constraints_ , <nl> - bool attach , <nl> - size_t max_compress_block_size_ ) ; <nl> } ; <nl> <nl> } <nl> mmm a / dbms / src / Storages / System / StorageSystemTables . cpp <nl> ppp b / dbms / src / Storages / System / StorageSystemTables . cpp <nl> <nl> # include < Common / StringUtils / StringUtils . h > <nl> # include < DataTypes / DataTypesNumber . h > <nl> # include < DataTypes / DataTypeArray . h > <nl> + # include < Disks / DiskSpaceMonitor . h > <nl> <nl> <nl> namespace DB <nl> mmm a / dbms / src / Storages / tests / storage_log . cpp <nl> ppp b / dbms / src / Storages / tests / storage_log . cpp <nl> <nl> # include < Columns / ColumnsNumber . h > <nl> # include < Interpreters / Context . h > <nl> # include < Common / typeid_cast . h > <nl> - <nl> + # include < Disks / DiskLocal . h > <nl> <nl> int main ( int , char * * ) <nl> try <nl> try <nl> names_and_types . emplace_back ( " a " , std : : make_shared < DataTypeUInt64 > ( ) ) ; <nl> names_and_types . emplace_back ( " b " , std : : make_shared < DataTypeUInt8 > ( ) ) ; <nl> <nl> - StoragePtr table = StorageLog : : create ( " . / " , " test " , " test " , ColumnsDescription { names_and_types } , ConstraintsDescription { } , 1048576 ) ; <nl> + DiskPtr disk = std : : make_unique < DiskLocal > ( " default " , " . / " , 0 ) ; <nl> + StoragePtr table = StorageLog : : create ( disk , " test " , " test " , ColumnsDescription { names_and_types } , ConstraintsDescription { } , 1048576 ) ; <nl> table - > startup ( ) ; <nl> <nl> auto context = Context : : createGlobal ( ) ; <nl> | Integration of log storages with IDisk interface | ClickHouse/ClickHouse | 0894ed9f33d32be3623f4448238fcdc9e2599d6c | 2019-12-23T13:11:56Z |
mmm a / spec / chromium - spec . coffee <nl> ppp b / spec / chromium - spec . coffee <nl> describe ' chromium feature ' , - > <nl> w . loadURL url <nl> <nl> describe ' window . open ' , - > <nl> - @ timeout 10000 <nl> + @ timeout 20000 <nl> <nl> it ' returns a BrowserWindowProxy object ' , - > <nl> b = window . open ' about : blank ' , ' ' , ' show = no ' <nl> | spec : Increase timeout for window . open | electron/electron | c36ae86fabae571dbd886b43d445a8736d99c711 | 2015-12-24T09:08:32Z |
mmm a / xbmc / cores / VideoPlayer / VideoRenderers / HwDecRender / VideoLayerBridgeDRMPRIME . cpp <nl> ppp b / xbmc / cores / VideoPlayer / VideoRenderers / HwDecRender / VideoLayerBridgeDRMPRIME . cpp <nl> void CVideoLayerBridgeDRMPRIME : : Configure ( CVideoBufferDRMPRIME * buffer ) <nl> const VideoPicture & picture = buffer - > GetPicture ( ) ; <nl> <nl> struct plane * plane = m_DRM - > GetVideoPlane ( ) ; <nl> - if ( m_DRM - > SupportsProperty ( plane , " COLOR_ENCODING " ) & & <nl> - m_DRM - > SupportsProperty ( plane , " COLOR_RANGE " ) ) <nl> - { <nl> + if ( m_DRM - > SupportsPropertyAndValue ( plane , " COLOR_ENCODING " , GetColorEncoding ( picture ) ) ) <nl> m_DRM - > AddProperty ( plane , " COLOR_ENCODING " , GetColorEncoding ( picture ) ) ; <nl> + <nl> + if ( m_DRM - > SupportsPropertyAndValue ( plane , " COLOR_RANGE " , GetColorRange ( picture ) ) ) <nl> m_DRM - > AddProperty ( plane , " COLOR_RANGE " , GetColorRange ( picture ) ) ; <nl> - } <nl> <nl> struct connector * connector = m_DRM - > GetConnector ( ) ; <nl> if ( m_DRM - > SupportsProperty ( connector , " HDR_OUTPUT_METADATA " ) ) <nl> mmm a / xbmc / windowing / gbm / DRMUtils . cpp <nl> ppp b / xbmc / windowing / gbm / DRMUtils . cpp <nl> bool CDRMUtils : : SupportsProperty ( struct drm_object * object , const char * name ) <nl> return false ; <nl> } <nl> <nl> + bool CDRMUtils : : SupportsPropertyAndValue ( struct drm_object * object , <nl> + const char * name , <nl> + uint64_t value ) <nl> + { <nl> + for ( uint32_t i = 0 ; i < object - > props - > count_props ; i + + ) <nl> + { <nl> + if ( ! StringUtils : : EqualsNoCase ( object - > props_info [ i ] - > name , name ) ) <nl> + continue ; <nl> + <nl> + if ( drm_property_type_is ( object - > props_info [ i ] , DRM_MODE_PROP_ENUM ) ! = 0 ) <nl> + { <nl> + for ( int j = 0 ; j < object - > props_info [ i ] - > count_enums ; j + + ) <nl> + { <nl> + if ( object - > props_info [ i ] - > enums [ j ] . value = = value ) <nl> + return true ; <nl> + } <nl> + } <nl> + <nl> + CLog : : Log ( LOGDEBUG , " CDRMUtils : : { } - property ' { } ' does not support value ' { } ' " , __FUNCTION__ , <nl> + name , value ) ; <nl> + break ; <nl> + } <nl> + <nl> + return false ; <nl> + } <nl> + <nl> uint32_t CDRMUtils : : GetPropertyId ( struct drm_object * object , const char * name ) <nl> { <nl> for ( uint32_t i = 0 ; i < object - > props - > count_props ; i + + ) <nl> mmm a / xbmc / windowing / gbm / DRMUtils . h <nl> ppp b / xbmc / windowing / gbm / DRMUtils . h <nl> class CDRMUtils <nl> virtual bool SetMode ( const RESOLUTION_INFO & res ) ; <nl> <nl> bool SupportsProperty ( struct drm_object * object , const char * name ) ; <nl> + bool SupportsPropertyAndValue ( struct drm_object * object , const char * name , uint64_t value ) ; <nl> virtual bool AddProperty ( struct drm_object * object , const char * name , uint64_t value ) { return false ; } <nl> virtual bool SetProperty ( struct drm_object * object , const char * name , uint64_t value ) { return false ; } <nl> <nl> | Merge pull request from lrusak / drm - properties | xbmc/xbmc | d6da11548992f78f6597a1a818058f22fd9fcedc | 2020-04-20T00:49:10Z |
mmm a / jstests / sharding / autosplit_with_balancer . js <nl> ppp b / jstests / sharding / autosplit_with_balancer . js <nl> <nl> <nl> s . startBalancer ( ) ; <nl> <nl> + let confirmBalancerSettings = function ( expectedBalancerOn , expectedAutoSplitOn ) { <nl> + let configSettings = s . s . getDB ( ' config ' ) . settings ; <nl> + <nl> + let balancerSettings = configSettings . findOne ( { _id : ' balancer ' } ) ; <nl> + assert . neq ( null , balancerSettings ) ; <nl> + assert . eq ( expectedBalancerOn , ! balancerSettings . stopped ) ; <nl> + assert . eq ( expectedBalancerOn , balancerSettings . mode = = ' full ' ) ; <nl> + <nl> + let autoSplitSettings = configSettings . findOne ( { _id : ' autosplit ' } ) ; <nl> + assert . neq ( null , autoSplitSettings ) ; <nl> + assert . eq ( expectedAutoSplitOn , autoSplitSettings . enabled ) ; <nl> + } ; <nl> + <nl> + confirmBalancerSettings ( true , true ) ; <nl> + <nl> assert . eq ( i , j * 100 , " setup " ) ; <nl> <nl> / / Until SERVER - 9715 is fixed , the sync command must be run on a diff connection <nl> <nl> / / Stop the balancer , otherwise it may grab some connections from the pool for itself <nl> s . stopBalancer ( ) ; <nl> <nl> + confirmBalancerSettings ( false , false ) ; <nl> + <nl> print ( " checkpoint E " ) ; <nl> <nl> assert ( t . findOne ( ) , " check close 0 " ) ; <nl> mmm a / src / mongo / db / s / config / configsvr_control_balancer_command . cpp <nl> ppp b / src / mongo / db / s / config / configsvr_control_balancer_command . cpp <nl> class ConfigSvrBalancerStartCommand : public ConfigSvrBalancerControlCommand { <nl> <nl> private : <nl> void _run ( OperationContext * opCtx , BSONObjBuilder * result ) override { <nl> - uassertStatusOK ( Grid : : get ( opCtx ) - > getBalancerConfiguration ( ) - > setBalancerMode ( <nl> - opCtx , BalancerSettingsType : : kFull ) ) ; <nl> + auto balancerConfig = Grid : : get ( opCtx ) - > getBalancerConfiguration ( ) ; <nl> + uassertStatusOK ( balancerConfig - > setBalancerMode ( opCtx , BalancerSettingsType : : kFull ) ) ; <nl> + uassertStatusOK ( balancerConfig - > enableAutoSplit ( opCtx , true ) ) ; <nl> Balancer : : get ( opCtx ) - > notifyPersistedBalancerSettingsChanged ( ) ; <nl> } <nl> } ; <nl> class ConfigSvrBalancerStopCommand : public ConfigSvrBalancerControlCommand { <nl> repl : : ReadConcernArgs : : get ( opCtx ) = <nl> repl : : ReadConcernArgs ( repl : : ReadConcernLevel : : kLocalReadConcern ) ; <nl> <nl> - uassertStatusOK ( Grid : : get ( opCtx ) - > getBalancerConfiguration ( ) - > setBalancerMode ( <nl> - opCtx , BalancerSettingsType : : kOff ) ) ; <nl> + auto balancerConfig = Grid : : get ( opCtx ) - > getBalancerConfiguration ( ) ; <nl> + uassertStatusOK ( balancerConfig - > setBalancerMode ( opCtx , BalancerSettingsType : : kOff ) ) ; <nl> + uassertStatusOK ( balancerConfig - > enableAutoSplit ( opCtx , false ) ) ; <nl> + <nl> Balancer : : get ( opCtx ) - > notifyPersistedBalancerSettingsChanged ( ) ; <nl> Balancer : : get ( opCtx ) - > joinCurrentRound ( opCtx ) ; <nl> } <nl> mmm a / src / mongo / s / balancer_configuration . cpp <nl> ppp b / src / mongo / s / balancer_configuration . cpp <nl> Status BalancerConfiguration : : setBalancerMode ( OperationContext * opCtx , <nl> } <nl> <nl> if ( ! updateStatus . isOK ( ) & & ( getBalancerMode ( ) ! = mode ) ) { <nl> - return updateStatus . getStatus ( ) . withContext ( " Failed to update balancer configuration " ) ; <nl> + return updateStatus . getStatus ( ) . withContext ( str : : stream ( ) <nl> + < < " Failed to set the balancer mode to " <nl> + < < BalancerSettingsType : : kBalancerModes [ mode ] ) ; <nl> + } <nl> + <nl> + return Status : : OK ( ) ; <nl> + } <nl> + <nl> + Status BalancerConfiguration : : enableAutoSplit ( OperationContext * opCtx , bool enable ) { <nl> + auto updateStatus = Grid : : get ( opCtx ) - > catalogClient ( ) - > updateConfigDocument ( <nl> + opCtx , <nl> + kSettingsNamespace , <nl> + BSON ( " _id " < < AutoSplitSettingsType : : kKey ) , <nl> + BSON ( " $ set " < < BSON ( kEnabled < < enable ) ) , <nl> + true , <nl> + ShardingCatalogClient : : kMajorityWriteConcern ) ; <nl> + <nl> + Status refreshStatus = refreshAndCheck ( opCtx ) ; <nl> + if ( ! refreshStatus . isOK ( ) ) { <nl> + return refreshStatus ; <nl> + } <nl> + <nl> + if ( ! updateStatus . isOK ( ) & & ( getShouldAutoSplit ( ) ! = enable ) ) { <nl> + return updateStatus . getStatus ( ) . withContext ( <nl> + str : : stream ( ) < < " Failed to " < < ( enable ? " enable " : " disable " ) < < " auto split " ) ; <nl> } <nl> <nl> return Status : : OK ( ) ; <nl> mmm a / src / mongo / s / balancer_configuration . h <nl> ppp b / src / mongo / s / balancer_configuration . h <nl> class BalancerConfiguration { <nl> return _maxChunkSizeBytes . loadRelaxed ( ) ; <nl> } <nl> <nl> + / * * <nl> + * Change the cluster wide auto split settings . <nl> + * / <nl> + Status enableAutoSplit ( OperationContext * opCtx , bool enable ) ; <nl> + <nl> bool getShouldAutoSplit ( ) const { <nl> return _shouldAutoSplit . loadRelaxed ( ) ; <nl> } <nl> mmm a / src / mongo / shell / shardingtest . js <nl> ppp b / src / mongo / shell / shardingtest . js <nl> var ShardingTest = function ( params ) { <nl> if ( ! otherParams . enableBalancer ) { <nl> self . stopBalancer ( ) ; <nl> } <nl> + <nl> if ( ! otherParams . enableAutoSplit ) { <nl> self . disableAutoSplit ( ) ; <nl> + } else if ( ! otherParams . enableBalancer ) { <nl> + / / Turn on autoSplit since disabling balancer also turns auto split off . <nl> + self . enableAutoSplit ( ) ; <nl> } <nl> } <nl> <nl> var ShardingTest = function ( params ) { <nl> / / the instances and then log them out again . <nl> if ( keyFile ) { <nl> authutil . asCluster ( this . _mongos , keyFile , _configureCluster ) ; <nl> + } else if ( mongosOptions [ 0 ] & & mongosOptions [ 0 ] . keyFile ) { <nl> + authutil . asCluster ( this . _mongos , mongosOptions [ 0 ] . keyFile , _configureCluster ) ; <nl> } else { <nl> _configureCluster ( ) ; <nl> } <nl> | SERVER - 41195 Turn off auto - splitting when the balancer is turned off | mongodb/mongo | 68fd498481f7427cc780d270b27636f69bb1add8 | 2019-06-24T14:52:34Z |
mmm a / scripts / apollo_lint . sh <nl> ppp b / scripts / apollo_lint . sh <nl> function run_cpp_lint ( ) { <nl> _cpp_lint_impl " $ { targets } " <nl> <nl> if [ [ " $ { STAGE } " = = " dev " ] ] ; then <nl> - _cpp_lint_impl " $ ( bazel query / / modules / . . . except / / modules / tools / visualizer / . . . ) " <nl> + _cpp_lint_impl " / / modules / . . . " <nl> fi <nl> <nl> } <nl> | Docker_dev : Enable all lint as visualizer was disabled in BUILD . | ApolloAuto/apollo | caf54d276278371a9adf6cc7054bf8bcbf5ecd8d | 2020-06-25T17:33:40Z |
mmm a / Telegram / Build . sh <nl> ppp b / Telegram / Build . sh <nl> elif [ " $ BuildTarget " = = " mac " ] ; then <nl> UpdateFile = " tmacupd $ AppVersion " <nl> SetupFile = " tsetup . $ AppVersionStrFull . dmg " <nl> ReleasePath = " . / . . / Mac / Release " <nl> + BinaryName = " Telegram " <nl> elif [ " $ BuildTarget " = = " mac32 " ] ; then <nl> echo " Building version $ AppVersionStrFull for OS X 10 . 6 and 10 . 7 . . " <nl> UpdateFile = " tmac32upd $ AppVersion " <nl> SetupFile = " tsetup32 . $ AppVersionStrFull . dmg " <nl> ReleasePath = " . / . . / Mac / Release " <nl> + BinaryName = " Telegram " <nl> elif [ " $ BuildTarget " = = " macstore " ] ; then <nl> echo " Building version $ AppVersionStrFull for Mac App Store . . " <nl> ReleasePath = " . / . . / Mac / Release " <nl> + BinaryName = " Telegram Desktop " <nl> + DropboxPath = " . / . . / . . / . . / Dropbox / Telegram / deploy / $ AppVersionStrMajor " <nl> + DropboxDeployPath = " $ DropboxPath / $ AppVersionStrFull " <nl> else <nl> echo " Invalid target ! " <nl> exit 1 <nl> if [ " $ BuildTarget " = = " linux " ] | | [ " $ BuildTarget " = = " linux32 " ] ; then <nl> cd $ DeployPath & & tar - cJvf $ SetupFile Telegram / & & cd . / . . / . . / . . / . . / . . / Telegram <nl> fi <nl> <nl> - if [ " $ BuildTarget " = = " mac " ] | | [ " $ BuildTarget " = = " mac32 " ] ; then <nl> - if [ ! - d " $ ReleasePath / Telegram . app " ] ; then <nl> - echo " Telegram . app not found ! " <nl> + if [ " $ BuildTarget " = = " mac " ] | | [ " $ BuildTarget " = = " mac32 " ] | | [ " $ BuildTarget " = = " macstore " ] ; then <nl> + if [ ! - d " $ ReleasePath / $ BinaryName . app " ] ; then <nl> + echo " $ BinaryName . app not found ! " <nl> exit 1 <nl> fi <nl> <nl> - if [ ! - d " $ ReleasePath / Telegram . app . dSYM " ] ; then <nl> - echo " Telegram . app . dSYM not found ! " <nl> + if [ ! - d " $ ReleasePath / $ BinaryName . app . dSYM " ] ; then <nl> + echo " $ BinaryName . app . dSYM not found ! " <nl> exit 1 <nl> fi <nl> <nl> - AppUUID = ` dwarfdump - u " $ ReleasePath / Telegram . app / Contents / MacOS / Telegram " | awk - F " " ' { print $ 2 } ' ` <nl> - DsymUUID = ` dwarfdump - u " $ ReleasePath / Telegram . app . dSYM " | awk - F " " ' { print $ 2 } ' ` <nl> + AppUUID = ` dwarfdump - u " $ ReleasePath / $ BinaryName . app / Contents / MacOS / $ BinaryName " | awk - F " " ' { print $ 2 } ' ` <nl> + DsymUUID = ` dwarfdump - u " $ ReleasePath / $ BinaryName . app . dSYM " | awk - F " " ' { print $ 2 } ' ` <nl> if [ " $ AppUUID " ! = " $ DsymUUID " ] ; then <nl> echo " UUID of binary ' $ AppUUID ' and dSYM ' $ DsymUUID ' differ ! " <nl> exit 1 <nl> fi <nl> <nl> - if [ ! - f " $ ReleasePath / Telegram . app / Contents / Resources / Icon . icns " ] ; then <nl> + if [ ! - f " $ ReleasePath / $ BinaryName . app / Contents / Resources / Icon . icns " ] ; then <nl> echo " Icon . icns not found in Resources ! " <nl> exit 1 <nl> fi <nl> <nl> - if [ ! - f " $ ReleasePath / Telegram . app / Contents / MacOS / Telegram " ] ; then <nl> - echo " Telegram not found in MacOS ! " <nl> + if [ ! - f " $ ReleasePath / $ BinaryName . app / Contents / MacOS / $ BinaryName " ] ; then <nl> + echo " $ BinaryName not found in MacOS ! " <nl> exit 1 <nl> fi <nl> <nl> - if [ ! - f " $ ReleasePath / Telegram . app / Contents / Frameworks / Updater " ] ; then <nl> - echo " Updater not found in Frameworks ! " <nl> + if [ ! - d " $ ReleasePath / $ BinaryName . app / Contents / _CodeSignature " ] ; then <nl> + echo " $ BinaryName signature not found ! " <nl> exit 1 <nl> fi <nl> <nl> - if [ ! - d " $ ReleasePath / Telegram . app / Contents / _CodeSignature " ] ; then <nl> - echo " Telegram signature not found ! " <nl> - exit 1 <nl> + if [ " $ BuildTarget " = = " mac " ] | | [ " $ BuildTarget " = = " mac32 " ] ; then <nl> + if [ ! - f " $ ReleasePath / $ BinaryName . app / Contents / Frameworks / Updater " ] ; then <nl> + echo " Updater not found in Frameworks ! " <nl> + exit 1 <nl> + fi <nl> + elif [ " $ BuildTarget " = = " macstore " ] ; then <nl> + if [ ! - f " $ ReleasePath / $ BinaryName . pkg " ] ; then <nl> + echo " $ BinaryName . pkg not found ! " <nl> + exit 1 <nl> + fi <nl> fi <nl> <nl> - cd $ ReleasePath <nl> - temppath = ` hdiutil attach - readwrite tsetup . dmg | awk - F " \ t " ' END { print $ 3 } ' ` <nl> - cp - R . / Telegram . app " $ temppath / " <nl> - bless - - folder " $ temppath / " - - openfolder " $ temppath / " <nl> - hdiutil detach " $ temppath " <nl> - hdiutil convert tsetup . dmg - format UDZO - imagekey zlib - level = 9 - ov - o $ SetupFile <nl> - cd . / . . / . . / Telegram <nl> - cd $ ReleasePath & & . / Packer . app / Contents / MacOS / Packer - path Telegram . app - version $ AppVersion $ DevParam & & cd . / . . / . . / Telegram <nl> + if [ " $ BuildTarget " = = " mac " ] | | [ " $ BuildTarget " = = " mac32 " ] ; then <nl> + cd $ ReleasePath <nl> + temppath = ` hdiutil attach - readwrite tsetup . dmg | awk - F " \ t " ' END { print $ 3 } ' ` <nl> + cp - R " . / $ BinaryName . app " " $ temppath / " <nl> + bless - - folder " $ temppath / " - - openfolder " $ temppath / " <nl> + hdiutil detach " $ temppath " <nl> + hdiutil convert tsetup . dmg - format UDZO - imagekey zlib - level = 9 - ov - o $ SetupFile <nl> + cd . / . . / . . / Telegram <nl> + cd $ ReleasePath & & . / Packer . app / Contents / MacOS / Packer - path " $ BinaryName . app " - version $ AppVersion $ DevParam & & cd . / . . / . . / Telegram <nl> + fi <nl> <nl> if [ ! - d " $ ReleasePath / deploy " ] ; then <nl> mkdir " $ ReleasePath / deploy " <nl> if [ " $ BuildTarget " = = " mac " ] | | [ " $ BuildTarget " = = " mac32 " ] ; then <nl> mkdir " $ ReleasePath / deploy / $ AppVersionStrMajor " <nl> fi <nl> <nl> - echo " Copying Telegram . app and $ UpdateFile to deploy / $ AppVersionStrMajor / $ AppVersionStr . . " ; <nl> - mkdir " $ DeployPath " <nl> - mkdir " $ DeployPath / Telegram " <nl> - cp - r $ ReleasePath / Telegram . app $ DeployPath / Telegram / <nl> - mv $ ReleasePath / Telegram . app . dSYM $ DeployPath / <nl> - rm $ ReleasePath / Telegram . app / Contents / MacOS / Telegram <nl> - rm $ ReleasePath / Telegram . app / Contents / Frameworks / Updater <nl> - rm - rf $ ReleasePath / Telegram . app / Contents / _CodeSignature <nl> - mv $ ReleasePath / $ UpdateFile $ DeployPath / <nl> - mv $ ReleasePath / $ SetupFile $ DeployPath / <nl> - <nl> - if [ " $ BuildTarget " = = " mac32 " ] ; then <nl> - ReleaseToPath = " . / . . / . . / . . / TBuild / tother / tmac32 " <nl> - DeployToPath = " $ ReleaseToPath / $ AppVersionStrMajor / $ AppVersionStrFull " <nl> - if [ ! - d " $ ReleaseToPath / $ AppVersionStrMajor " ] ; then <nl> - mkdir " $ ReleaseToPath / $ AppVersionStrMajor " <nl> + if [ " $ BuildTarget " = = " mac " ] | | [ " $ BuildTarget " = = " mac32 " ] ; then <nl> + echo " Copying $ BinaryName . app and $ UpdateFile to deploy / $ AppVersionStrMajor / $ AppVersionStr . . " ; <nl> + mkdir " $ DeployPath " <nl> + mkdir " $ DeployPath / Telegram " <nl> + cp - r " $ ReleasePath / $ BinaryName . app " $ DeployPath / Telegram / <nl> + mv " $ ReleasePath / $ BinaryName . app . dSYM " $ DeployPath / <nl> + rm " $ ReleasePath / $ BinaryName . app / Contents / MacOS / $ BinaryName " <nl> + rm " $ ReleasePath / $ BinaryName . app / Contents / Frameworks / Updater " <nl> + rm - rf " $ ReleasePath / $ BinaryName . app / Contents / _CodeSignature " <nl> + mv $ ReleasePath / $ UpdateFile $ DeployPath / <nl> + mv $ ReleasePath / $ SetupFile $ DeployPath / <nl> + <nl> + if [ " $ BuildTarget " = = " mac32 " ] ; then <nl> + ReleaseToPath = " . / . . / . . / . . / TBuild / tother / tmac32 " <nl> + DeployToPath = " $ ReleaseToPath / $ AppVersionStrMajor / $ AppVersionStrFull " <nl> + if [ ! - d " $ ReleaseToPath / $ AppVersionStrMajor " ] ; then <nl> + mkdir " $ ReleaseToPath / $ AppVersionStrMajor " <nl> + fi <nl> + <nl> + if [ ! - d " $ DeployToPath " ] ; then <nl> + mkdir " $ DeployToPath " <nl> + fi <nl> + <nl> + cp - v $ DeployPath / $ UpdateFile $ DeployToPath / <nl> + cp - v $ DeployPath / $ SetupFile $ DeployToPath / <nl> + cp - rv $ DeployPath / $ BinaryName . app . dSYM $ DeployToPath / <nl> fi <nl> - <nl> - if [ ! - d " $ DeployToPath " ] ; then <nl> - mkdir " $ DeployToPath " <nl> - fi <nl> - <nl> - cp - v $ DeployPath / $ UpdateFile $ DeployToPath / <nl> - cp - v $ DeployPath / $ SetupFile $ DeployToPath / <nl> - cp - rv $ DeployPath / Telegram . app . dSYM $ DeployToPath / <nl> + elif [ " $ BuildTarget " = = " macstore " ] ; then <nl> + echo " Copying $ BinaryName . app to deploy / $ AppVersionStrMajor / $ AppVersionStr . . " ; <nl> + mkdir " $ DeployPath " <nl> + cp - r " $ ReleasePath / $ BinaryName . app " $ DeployPath / <nl> + mv " $ ReleasePath / $ BinaryName . pkg " $ DeployPath / <nl> + mv " $ ReleasePath / $ BinaryName . app . dSYM " $ DeployPath / <nl> + rm " $ ReleasePath / $ BinaryName . app / Contents / MacOS / $ BinaryName " <nl> + rm - rf " $ ReleasePath / $ BinaryName . app / Contents / _CodeSignature " <nl> + <nl> + cp - v " $ DeployPath / $ BinaryName . app " " $ DropboxDeployPath / " <nl> + cp - rv " $ DeployPath / $ BinaryName . app . dSYM " " $ DropboxDeployPath / " <nl> fi <nl> fi <nl> <nl> old mode 100644 <nl> new mode 100755 <nl> index b53e7fd61c5 . . d01a68def7c <nl> mmm a / Telegram / Deploy . sh <nl> ppp b / Telegram / Deploy . sh <nl> if [ " $ BuildTarget " = = " linux " ] | | [ " $ BuildTarget " = = " linux32 " ] | | [ " $ Build <nl> <nl> mv - v " $ WinDeployPath " " $ DropboxPath / " <nl> <nl> - cp - v " $ DeployPath / $ UpdateFile " " $ DropboxDeployPath " <nl> - cp - v " $ DeployPath / $ SetupFile " " $ DropboxDeployPath " <nl> - cp - rv " $ DeployPath / Telegram . app . dSYM " " $ DropboxDeployPath " <nl> - cp - v " $ Mac32DeployPath / $ Mac32UpdateFile " " $ DropboxDeployPath " <nl> - cp - v " $ Mac32DeployPath / $ Mac32SetupFile " " $ DropboxDeployPath " <nl> + cp - v " $ DeployPath / $ UpdateFile " " $ DropboxDeployPath / " <nl> + cp - v " $ DeployPath / $ SetupFile " " $ DropboxDeployPath / " <nl> + cp - rv " $ DeployPath / Telegram . app . dSYM " " $ DropboxDeployPath / " <nl> + cp - v " $ Mac32DeployPath / $ Mac32UpdateFile " " $ DropboxDeployPath / " <nl> + cp - v " $ Mac32DeployPath / $ Mac32SetupFile " " $ DropboxDeployPath / " <nl> cp - rv " $ DeployPath / Telegram . app . dSYM " " $ DropboxDeployPath / Telegram32 . app . dSYM " <nl> fi <nl> fi <nl> | build scripts updated | telegramdesktop/tdesktop | a8e2dbee686b355058802d202ef249ccd844f921 | 2015-09-24T18:18:21Z |
mmm a / src / csharp / Grpc . Core / Internal / AuthContextSafeHandle . cs <nl> ppp b / src / csharp / Grpc . Core / Internal / AuthContextSafeHandle . cs <nl> protected override bool ReleaseHandle ( ) <nl> <nl> private AuthProperty PtrToAuthProperty ( IntPtr authPropertyPtr ) <nl> { <nl> - var nativeAuthProperty = Marshal . PtrToStructure < NativeAuthProperty > ( authPropertyPtr ) ; <nl> + # pragma warning disable 0618 <nl> + / / We need to use the obsolete non - generic version of Marshal . PtrToStructure , because the generic version is not available <nl> + / / in net45 on Windows . <nl> + var nativeAuthProperty = ( NativeAuthProperty ) Marshal . PtrToStructure ( authPropertyPtr , typeof ( NativeAuthProperty ) ) ; <nl> + # pragma warning restore 0618 <nl> var name = Marshal . PtrToStringAnsi ( nativeAuthProperty . Name ) ; <nl> var valueBytes = new byte [ ( int ) nativeAuthProperty . ValueLength ] ; <nl> Marshal . Copy ( nativeAuthProperty . Value , valueBytes , 0 , ( int ) nativeAuthProperty . ValueLength ) ; <nl> | dont use generic version of PtrToStructure | grpc/grpc | 271cb36f5639ed465f919c9736015bd98a7b7540 | 2017-08-11T16:17:19Z |
mmm a / cocos / scripting / js - bindings / manual / chipmunk / js_bindings_chipmunk_registration . cpp <nl> ppp b / cocos / scripting / js - bindings / manual / chipmunk / js_bindings_chipmunk_registration . cpp <nl> void jsb_register_chipmunk ( JSContext * cx , JS : : HandleObject object ) <nl> JS_DefineFunction ( cx , chipmunk , " momentForSegment " , JSB_cpMomentForSegment , 4 , JSPROP_PERMANENT | JSPROP_ENUMERATE ) ; <nl> <nl> JS : : RootedObject space ( cx , JSB_cpSpace_object ) ; <nl> + JS_DefineFunction ( cx , space , " segmentQuery " , JSB_cpSpace_segmentQuery , 5 , JSPROP_PERMANENT | JSPROP_ENUMERATE ) ; <nl> JS_DefineFunction ( cx , space , " segmentQueryFirst " , JSB_cpSpace_segmentQueryFirst , 4 , JSPROP_PERMANENT | JSPROP_ENUMERATE ) ; <nl> JS_DefineFunction ( cx , space , " pointQueryNearest " , JSB_cpSpace_pointQueryNearest , 3 , JSPROP_PERMANENT | JSPROP_ENUMERATE ) ; <nl> <nl> | [ ci skip ] Add Chipmunk JS binding for segmentQuery ( ) | cocos2d/cocos2d-x | efe95fd89971a8cad4820c5aa44a6dc5eebd4790 | 2017-08-07T03:57:45Z |
new file mode 100644 <nl> index 0000000000 . . f4f9a7b32d <nl> mmm / dev / null <nl> ppp b / change / react - native - windows - a206e50b - eb3d - 4f1e - bb61 - 35d4d333e417 . json <nl> <nl> + { <nl> + " type " : " prerelease " , <nl> + " comment " : " Fix destruction of UIManager in UI thread " , <nl> + " packageName " : " react - native - windows " , <nl> + " email " : " vmorozov @ microsoft . com " , <nl> + " dependentChangeType " : " patch " <nl> + } <nl> mmm a / vnext / Desktop / Modules / UIManagerModule . cpp <nl> ppp b / vnext / Desktop / Modules / UIManagerModule . cpp <nl> using namespace std ; <nl> # include < algorithm > <nl> # include < iostream > <nl> <nl> + # include < Threading / MessageDispatchQueue . h > <nl> # include < unicode . h > <nl> # include " ShadowNode . h " <nl> # include " ShadowNodeRegistry . h " <nl> UIManagerModule : : UIManagerModule ( <nl> UIManagerModule : : ~ UIManagerModule ( ) noexcept { <nl> if ( m_uiQueue ) { <nl> / / To make sure that we destroy UI components in UI thread . <nl> - m_uiQueue - > runOnQueue ( [ manager = std : : move ( m_manager ) ] ( ) { } ) ; <nl> + / / We cannot use the m_uiQueue - > runOnQueue directly because <nl> + / / the UI MessageQueueThread is already stopped . <nl> + std : : static_pointer_cast < Mso : : React : : MessageDispatchQueue > ( m_uiQueue ) <nl> + - > DispatchQueue ( ) <nl> + . Post ( [ manager = std : : move ( m_manager ) ] ( ) noexcept { } ) ; <nl> } <nl> } <nl> <nl> | Fix destruction of UIManager in UI thread ( ) | microsoft/react-native-windows | 932eb5f017589480d6848e58b689d43ee12bef87 | 2020-12-05T07:44:25Z |
mmm a / include / swift / AST / ASTContext . h <nl> ppp b / include / swift / AST / ASTContext . h <nl> class ASTContext final { <nl> / / / if applicable . <nl> const Decl * getSwiftDeclForExportedClangDecl ( const clang : : Decl * decl ) ; <nl> <nl> + / / / General conversion method from Swift types - > Clang types . <nl> + / / / <nl> + / / / HACK : This method is only intended to be called from a specific place in <nl> + / / / IRGen . For converting function types , strongly prefer using one of the <nl> + / / / other methods instead , instead of manually iterating over parameters <nl> + / / / and results . <nl> + const clang : : Type * getClangTypeForIRGen ( Type ty ) ; <nl> + <nl> / / / Determine whether the given Swift type is representable in a <nl> / / / given foreign language . <nl> ForeignRepresentationInfo <nl> mmm a / lib / AST / ASTContext . cpp <nl> ppp b / lib / AST / ASTContext . cpp <nl> <nl> # include " swift / Subsystems . h " <nl> # include " swift / Syntax / References . h " <nl> # include " swift / Syntax / SyntaxArena . h " <nl> + # include " clang / AST / Type . h " <nl> # include " llvm / ADT / DenseMap . h " <nl> # include " llvm / ADT / Statistic . h " <nl> # include " llvm / ADT / StringMap . h " <nl> ASTContext : : getSwiftDeclForExportedClangDecl ( const clang : : Decl * decl ) { <nl> return impl . Converter - > getSwiftDeclForExportedClangDecl ( decl ) ; <nl> } <nl> <nl> + const clang : : Type * <nl> + ASTContext : : getClangTypeForIRGen ( Type ty ) { <nl> + return getClangTypeConverter ( ) . convert ( ty ) . getTypePtrOrNull ( ) ; <nl> + } <nl> <nl> CanGenericSignature ASTContext : : getSingleGenericParameterSignature ( ) const { <nl> if ( auto theSig = getImpl ( ) . SingleGenericParameterSignature ) <nl> mmm a / lib / AST / ClangTypeConverter . cpp <nl> ppp b / lib / AST / ClangTypeConverter . cpp <nl> <nl> / / <nl> / / This file implements generation of Clang AST types from Swift AST types for <nl> / / types that are representable in Objective - C interfaces . <nl> - / / Large chunks of the code are lightly modified versions of the code in <nl> - / / IRGen / GenClangType . cpp ( which should eventually go away ) , so make sure <nl> - / / to keep the two in sync . <nl> - / / The three major differences are that , in this file : <nl> + / / <nl> + / / The usage of ClangTypeConverter at the AST level means that we may <nl> + / / encounter ill - formed types and / or sugared types . To avoid crashing and <nl> + / / keeping sugar as much as possible ( in case the generated Clang type needs <nl> + / / to be surfaced to the user ) : <nl> + / / <nl> / / 1 . We fail gracefully instead of asserting / UB . <nl> / / 2 . We try to keep clang sugar instead of discarding it . <nl> - / / 3 . We use getAs instead of cast as we handle Swift types with sugar . <nl> / / <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> mmm a / lib / AST / ClangTypeConverter . h <nl> ppp b / lib / AST / ClangTypeConverter . h <nl> class ClangTypeConverter : <nl> SmallVectorImpl < clang : : TemplateArgument > & templateArgs ) ; <nl> <nl> private : <nl> + friend ASTContext ; / / HACK : expose ` convert ` method to ASTContext <nl> + <nl> clang : : QualType convert ( Type type ) ; <nl> <nl> clang : : QualType convertMemberType ( NominalTypeDecl * DC , <nl> mmm a / lib / IRGen / GenClangType . cpp <nl> ppp b / lib / IRGen / GenClangType . cpp <nl> <nl> / / <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> / / <nl> - / / This file implements generation of Clang AST types from Swift AST types <nl> - / / for types that are representable in Objective - C interfaces . <nl> - / / AST / ClangTypeConverter . cpp duplicates a bunch of code from here , so make <nl> - / / sure to keep the two in sync . <nl> + / / Wrapper functions for creating Clang types from Swift types . <nl> / / <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> - # include " llvm / ADT / StringSwitch . h " <nl> + # include " IRGenModule . h " <nl> + <nl> # include " swift / AST / ASTContext . h " <nl> - # include " swift / AST / CanTypeVisitor . h " <nl> - # include " swift / AST / Decl . h " <nl> - # include " swift / AST / ExistentialLayout . h " <nl> - # include " swift / AST / NameLookup . h " <nl> - # include " swift / SIL / SILType . h " <nl> - # include " swift / ClangImporter / ClangImporter . h " <nl> + # include " swift / AST / Types . h " <nl> + <nl> # include " clang / AST / ASTContext . h " <nl> - # include " clang / AST / Attr . h " <nl> # include " clang / AST / CanonicalType . h " <nl> - # include " clang / AST / Decl . h " <nl> - # include " clang / AST / DeclObjC . h " <nl> # include " clang / AST / Type . h " <nl> - # include " clang / Sema / Sema . h " <nl> - # include " clang / Basic / TargetInfo . h " <nl> - # include " IRGenModule . h " <nl> <nl> using namespace swift ; <nl> using namespace irgen ; <nl> <nl> - / / / Global information about importing clang types . <nl> - class swift : : irgen : : ClangTypeConverter { <nl> - llvm : : DenseMap < CanType , clang : : CanQualType > Cache ; <nl> - <nl> - ClangTypeConverter ( const ClangTypeConverter & ) = delete ; <nl> - ClangTypeConverter & operator = ( const ClangTypeConverter & ) = delete ; <nl> - <nl> - public : <nl> - ClangTypeConverter ( ) = default ; <nl> - clang : : CanQualType convert ( IRGenModule & IGM , CanType type ) ; <nl> - clang : : CanQualType reverseBuiltinTypeMapping ( IRGenModule & IGM , <nl> - CanStructType type ) ; <nl> - } ; <nl> - <nl> - static CanType getNamedSwiftType ( ModuleDecl * stdlib , StringRef name ) { <nl> - auto & ctx = stdlib - > getASTContext ( ) ; <nl> - SmallVector < ValueDecl * , 1 > results ; <nl> - stdlib - > lookupValue ( ctx . getIdentifier ( name ) , NLKind : : QualifiedLookup , <nl> - results ) ; <nl> - <nl> - / / If we have one single type decl , and that decl has been <nl> - / / type - checked , return its declared type . <nl> - / / <nl> - / / . . . non - type - checked types should only ever show up here because <nl> - / / of test cases using - enable - source - import , but unfortunately <nl> - / / that ' s a real thing . <nl> - if ( results . size ( ) = = 1 ) { <nl> - if ( auto typeDecl = dyn_cast < TypeDecl > ( results [ 0 ] ) ) <nl> - return typeDecl - > getDeclaredInterfaceType ( ) - > getCanonicalType ( ) ; <nl> - } <nl> - return CanType ( ) ; <nl> - } <nl> - <nl> - static clang : : CanQualType <nl> - getClangBuiltinTypeFromKind ( const clang : : ASTContext & context , <nl> - clang : : BuiltinType : : Kind kind ) { <nl> - switch ( kind ) { <nl> - # define BUILTIN_TYPE ( Id , SingletonId ) \ <nl> - case clang : : BuiltinType : : Id : \ <nl> - return context . SingletonId ; <nl> - # include " clang / AST / BuiltinTypes . def " <nl> - # define IMAGE_TYPE ( ImgType , Id , SingletonId , Access , Suffix ) \ <nl> - case clang : : BuiltinType : : Id : \ <nl> - return context . SingletonId ; <nl> - # include " clang / Basic / OpenCLImageTypes . def " <nl> - # define EXT_OPAQUE_TYPE ( ExtType , Id , Ext ) \ <nl> - case clang : : BuiltinType : : Id : \ <nl> - return context . Id # # Ty ; <nl> - # include " clang / Basic / OpenCLExtensionTypes . def " <nl> - # define SVE_TYPE ( Name , Id , SingletonId ) \ <nl> - case clang : : BuiltinType : : Id : \ <nl> - return context . SingletonId ; <nl> - # include " clang / Basic / AArch64SVEACLETypes . def " <nl> - } <nl> - <nl> - llvm_unreachable ( " Not a valid BuiltinType . " ) ; <nl> - } <nl> - <nl> - static clang : : CanQualType getClangSelectorType ( <nl> - const clang : : ASTContext & clangCtx ) { <nl> - return clangCtx . getPointerType ( clangCtx . ObjCBuiltinSelTy ) ; <nl> - } <nl> - <nl> - static clang : : CanQualType getClangMetatypeType ( <nl> - const clang : : ASTContext & clangCtx ) { <nl> - clang : : QualType clangType = <nl> - clangCtx . getObjCObjectType ( clangCtx . ObjCBuiltinClassTy , nullptr , 0 ) ; <nl> - clangType = clangCtx . getObjCObjectPointerType ( clangType ) ; <nl> - return clangCtx . getCanonicalType ( clangType ) ; <nl> - } <nl> - <nl> - static clang : : CanQualType getClangIdType ( <nl> - const clang : : ASTContext & clangCtx ) { <nl> - clang : : QualType clangType = <nl> - clangCtx . getObjCObjectType ( clangCtx . ObjCBuiltinIdTy , nullptr , 0 ) ; <nl> - clangType = clangCtx . getObjCObjectPointerType ( clangType ) ; <nl> - return clangCtx . getCanonicalType ( clangType ) ; <nl> - } <nl> - <nl> - static clang : : CanQualType getClangDecayedVaListType ( <nl> - const clang : : ASTContext & clangCtx ) { <nl> - clang : : QualType clangType = <nl> - clangCtx . getCanonicalType ( clangCtx . getBuiltinVaListType ( ) ) ; <nl> - if ( clangType - > isConstantArrayType ( ) ) <nl> - clangType = clangCtx . getDecayedType ( clangType ) ; <nl> - return clangCtx . getCanonicalType ( clangType ) ; <nl> - } <nl> - <nl> - namespace { <nl> - / / / Given a Swift type , attempt to return an appropriate Clang <nl> - / / / CanQualType for the purpose of generating correct code for the <nl> - / / / ABI . <nl> - class GenClangType : public CanTypeVisitor < GenClangType , clang : : CanQualType > { <nl> - IRGenModule & IGM ; <nl> - irgen : : ClangTypeConverter & Converter ; <nl> - <nl> - public : <nl> - GenClangType ( IRGenModule & IGM , irgen : : ClangTypeConverter & converter ) <nl> - : IGM ( IGM ) , Converter ( converter ) { } <nl> - <nl> - const clang : : ASTContext & getClangASTContext ( ) const { <nl> - return IGM . getClangASTContext ( ) ; <nl> - } <nl> - <nl> - / / / Return the Clang struct type which was imported and resulted in <nl> - / / / this Swift struct type . We do not currently handle generating a <nl> - / / / new Clang struct type for Swift struct types that are created <nl> - / / / independently of importing a Clang module . <nl> - clang : : CanQualType visitStructType ( CanStructType type ) ; <nl> - clang : : CanQualType visitTupleType ( CanTupleType type ) ; <nl> - clang : : CanQualType visitMetatypeType ( CanMetatypeType type ) ; <nl> - clang : : CanQualType visitExistentialMetatypeType ( CanExistentialMetatypeType type ) ; <nl> - clang : : CanQualType visitProtocolType ( CanProtocolType type ) ; <nl> - clang : : CanQualType visitClassType ( CanClassType type ) ; <nl> - clang : : CanQualType visitBoundGenericClassType ( CanBoundGenericClassType type ) ; <nl> - clang : : CanQualType visitBoundGenericType ( CanBoundGenericType type ) ; <nl> - clang : : CanQualType visitEnumType ( CanEnumType type ) ; <nl> - clang : : CanQualType visitFunctionType ( CanFunctionType type ) ; <nl> - clang : : CanQualType visitProtocolCompositionType ( <nl> - CanProtocolCompositionType type ) ; <nl> - clang : : CanQualType visitBuiltinRawPointerType ( CanBuiltinRawPointerType type ) ; <nl> - clang : : CanQualType visitBuiltinIntegerType ( CanBuiltinIntegerType type ) ; <nl> - clang : : CanQualType visitBuiltinFloatType ( CanBuiltinFloatType type ) ; <nl> - clang : : CanQualType visitArchetypeType ( CanArchetypeType type ) ; <nl> - clang : : CanQualType visitSILFunctionType ( CanSILFunctionType type ) ; <nl> - clang : : CanQualType visitGenericTypeParamType ( CanGenericTypeParamType type ) ; <nl> - clang : : CanQualType visitDynamicSelfType ( CanDynamicSelfType type ) ; <nl> - <nl> - clang : : CanQualType visitSILBlockStorageType ( CanSILBlockStorageType type ) ; <nl> - <nl> - clang : : CanQualType visitType ( CanType type ) ; <nl> - <nl> - clang : : CanQualType getCanonicalType ( clang : : QualType type ) { <nl> - return getClangASTContext ( ) . getCanonicalType ( type ) ; <nl> - } <nl> - <nl> - clang : : CanQualType convertMemberType ( NominalTypeDecl * DC , <nl> - StringRef memberName ) ; <nl> - } ; <nl> - } / / end anonymous namespace <nl> - <nl> - clang : : CanQualType <nl> - GenClangType : : convertMemberType ( NominalTypeDecl * DC , StringRef memberName ) { <nl> - auto memberTypeDecl = cast < TypeDecl > ( <nl> - DC - > lookupDirect ( IGM . Context . getIdentifier ( memberName ) ) [ 0 ] ) ; <nl> - auto memberType = memberTypeDecl - > getDeclaredInterfaceType ( ) <nl> - - > getCanonicalType ( ) ; <nl> - return Converter . convert ( IGM , memberType ) ; <nl> - } <nl> - <nl> - static clang : : CanQualType getClangVectorType ( const clang : : ASTContext & ctx , <nl> - clang : : BuiltinType : : Kind eltKind , <nl> - clang : : VectorType : : VectorKind vecKind , <nl> - StringRef numEltsString ) { <nl> - unsigned numElts ; <nl> - bool failedParse = numEltsString . getAsInteger ( 10 , numElts ) ; <nl> - assert ( ! failedParse & & " vector type name didn ' t end in count ? " ) ; <nl> - ( void ) failedParse ; <nl> - <nl> - auto eltTy = getClangBuiltinTypeFromKind ( ctx , eltKind ) ; <nl> - auto vecTy = ctx . getVectorType ( eltTy , numElts , vecKind ) ; <nl> - return ctx . getCanonicalType ( vecTy ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitStructType ( CanStructType type ) { <nl> - auto & ctx = IGM . getClangASTContext ( ) ; <nl> - <nl> - auto swiftDecl = type - > getDecl ( ) ; <nl> - StringRef name = swiftDecl - > getName ( ) . str ( ) ; <nl> - <nl> - / / We assume that the importer translates all of the following types <nl> - / / directly to structs in the standard library . <nl> - <nl> - / / We want to recognize most of these types by name . <nl> - # define CHECK_NAMED_TYPE ( NAME , CLANG_TYPE ) do { \ <nl> - if ( name = = ( NAME ) ) return CLANG_TYPE ; \ <nl> - } while ( false ) <nl> - <nl> - CHECK_NAMED_TYPE ( " CGFloat " , convertMemberType ( swiftDecl , " NativeType " ) ) ; <nl> - CHECK_NAMED_TYPE ( " OpaquePointer " , ctx . VoidPtrTy ) ; <nl> - CHECK_NAMED_TYPE ( " CVaListPointer " , getClangDecayedVaListType ( ctx ) ) ; <nl> - CHECK_NAMED_TYPE ( " DarwinBoolean " , ctx . UnsignedCharTy ) ; <nl> - CHECK_NAMED_TYPE ( swiftDecl - > getASTContext ( ) . getSwiftName ( <nl> - KnownFoundationEntity : : NSZone ) , <nl> - ctx . VoidPtrTy ) ; <nl> - CHECK_NAMED_TYPE ( " WindowsBool " , ctx . IntTy ) ; <nl> - CHECK_NAMED_TYPE ( " ObjCBool " , ctx . ObjCBuiltinBoolTy ) ; <nl> - CHECK_NAMED_TYPE ( " Selector " , getClangSelectorType ( ctx ) ) ; <nl> - CHECK_NAMED_TYPE ( " UnsafeRawPointer " , ctx . VoidPtrTy ) ; <nl> - CHECK_NAMED_TYPE ( " UnsafeMutableRawPointer " , ctx . VoidPtrTy ) ; <nl> - # undef CHECK_NAMED_TYPE <nl> - <nl> - / / Map vector types to the corresponding C vectors . <nl> - # define MAP_SIMD_TYPE ( TYPE_NAME , _ , BUILTIN_KIND ) \ <nl> - if ( name . startswith ( # TYPE_NAME ) ) { \ <nl> - return getClangVectorType ( ctx , clang : : BuiltinType : : BUILTIN_KIND , \ <nl> - clang : : VectorType : : GenericVector , \ <nl> - name . drop_front ( sizeof ( # TYPE_NAME ) - 1 ) ) ; \ <nl> - } <nl> - # include " swift / ClangImporter / SIMDMappedTypes . def " <nl> - <nl> - / / Everything else we see here ought to be a translation of a builtin . <nl> - return Converter . reverseBuiltinTypeMapping ( IGM , type ) ; <nl> - } <nl> - <nl> - static clang : : CanQualType getClangBuiltinTypeFromTypedef ( <nl> - clang : : Sema & sema , StringRef typedefName ) { <nl> - auto & context = sema . getASTContext ( ) ; <nl> - <nl> - auto identifier = & context . Idents . get ( typedefName ) ; <nl> - auto found = sema . LookupSingleName ( sema . TUScope , identifier , <nl> - clang : : SourceLocation ( ) , <nl> - clang : : Sema : : LookupOrdinaryName ) ; <nl> - auto typedefDecl = dyn_cast_or_null < clang : : TypedefDecl > ( found ) ; <nl> - if ( ! typedefDecl ) <nl> - return { } ; <nl> - <nl> - auto underlyingTy = <nl> - context . getCanonicalType ( typedefDecl - > getUnderlyingType ( ) ) ; <nl> - <nl> - if ( underlyingTy - > getAs < clang : : BuiltinType > ( ) ) <nl> - return underlyingTy ; <nl> - return { } ; <nl> - } <nl> - <nl> - clang : : CanQualType <nl> - irgen : : ClangTypeConverter : : reverseBuiltinTypeMapping ( IRGenModule & IGM , <nl> - CanStructType type ) { <nl> - / / Handle builtin types by adding entries to the cache that reverse <nl> - / / the mapping done by the importer . We could try to look at the <nl> - / / members of the struct instead , but even if that ' s ABI - equivalent <nl> - / / ( which it had better be ! ) , it might erase interesting semantic <nl> - / / differences like integers vs . characters . This is important <nl> - / / because CC lowering isn ' t the only purpose of this conversion . <nl> - / / <nl> - / / The importer maps builtin types like ' int ' to named types like <nl> - / / ' CInt ' , which are generally typealiases . So what we do here is <nl> - / / map the underlying types of those typealiases back to the builtin <nl> - / / type . These typealiases frequently create a many - to - one mapping , <nl> - / / so just use the first type that mapped to a particular underlying <nl> - / / type . <nl> - / / <nl> - / / This is the last thing that happens before asserting that the <nl> - / / struct type doesn ' t have a mapping . Furthermore , all of the <nl> - / / builtin types are pre - built in the clang ASTContext . So it ' s not <nl> - / / really a significant performance problem to just cache all them <nl> - / / right here ; it makes making a few more entries in the cache than <nl> - / / we really need , but it also means we won ' t end up repeating these <nl> - / / stdlib lookups multiple times , and we have to perform multiple <nl> - / / lookups anyway because the MAP_BUILTIN_TYPE database uses <nl> - / / typealias names ( like ' CInt ' ) that aren ' t obviously associated <nl> - / / with the underlying C library type . <nl> - <nl> - auto stdlib = IGM . Context . getStdlibModule ( ) ; <nl> - assert ( stdlib & & " translating stdlib type to C without stdlib module ? " ) ; <nl> - auto & ctx = IGM . getClangASTContext ( ) ; <nl> - auto cacheStdlibType = [ & ] ( StringRef swiftName , <nl> - clang : : BuiltinType : : Kind builtinKind ) { <nl> - CanType swiftType = getNamedSwiftType ( stdlib , swiftName ) ; <nl> - if ( ! swiftType ) return ; <nl> - <nl> - auto & sema = IGM . Context . getClangModuleLoader ( ) - > getClangSema ( ) ; <nl> - / / Handle Int and UInt specially . On Apple platforms , these correspond to <nl> - / / the NSInteger and NSUInteger typedefs , so map them back to those typedefs <nl> - / / if they ' re available , to ensure we get consistent ObjC @ encode strings . <nl> - if ( swiftType - > getAnyNominal ( ) = = IGM . Context . getIntDecl ( ) ) { <nl> - if ( auto NSIntegerTy = getClangBuiltinTypeFromTypedef ( sema , " NSInteger " ) ) { <nl> - Cache . insert ( { swiftType , NSIntegerTy } ) ; <nl> - return ; <nl> - } <nl> - } else if ( swiftType - > getAnyNominal ( ) = = IGM . Context . getUIntDecl ( ) ) { <nl> - if ( auto NSUIntegerTy = <nl> - getClangBuiltinTypeFromTypedef ( sema , " NSUInteger " ) ) { <nl> - Cache . insert ( { swiftType , NSUIntegerTy } ) ; <nl> - return ; <nl> - } <nl> - } <nl> - <nl> - Cache . insert ( { swiftType , getClangBuiltinTypeFromKind ( ctx , builtinKind ) } ) ; <nl> - } ; <nl> - <nl> - # define MAP_BUILTIN_TYPE ( CLANG_BUILTIN_KIND , SWIFT_TYPE_NAME ) \ <nl> - cacheStdlibType ( # SWIFT_TYPE_NAME , clang : : BuiltinType : : CLANG_BUILTIN_KIND ) ; <nl> - # include " swift / ClangImporter / BuiltinMappedTypes . def " <nl> - <nl> - / / On 64 - bit Windows , no C type is imported as an Int or UInt ; CLong is <nl> - / / imported as an Int32 and CLongLong as an Int64 . Therefore , manually <nl> - / / add mappings to C for Int and UInt . <nl> - / / On 64 - bit Cygwin , no manual mapping is required . <nl> - if ( IGM . Triple . isOSWindows ( ) & & ! IGM . Triple . isWindowsCygwinEnvironment ( ) & & <nl> - IGM . Triple . isArch64Bit ( ) ) { <nl> - / / Map UInt to uintptr_t <nl> - auto swiftUIntType = getNamedSwiftType ( stdlib , " UInt " ) ; <nl> - auto clangUIntPtrType = ctx . getCanonicalType ( ctx . getUIntPtrType ( ) ) ; <nl> - Cache . insert ( { swiftUIntType , clangUIntPtrType } ) ; <nl> - <nl> - / / Map Int to intptr_t <nl> - auto swiftIntType = getNamedSwiftType ( stdlib , " Int " ) ; <nl> - auto clangIntPtrType = ctx . getCanonicalType ( ctx . getIntPtrType ( ) ) ; <nl> - Cache . insert ( { swiftIntType , clangIntPtrType } ) ; <nl> - } <nl> - <nl> - / / The above code sets up a bunch of mappings in the cache ; just <nl> - / / assume that we hit one of them . <nl> - auto it = Cache . find ( type ) ; <nl> - assert ( it ! = Cache . end ( ) & & <nl> - " cannot translate Swift type to C ! type is not specially known " ) ; <nl> - return it - > second ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitTupleType ( CanTupleType type ) { <nl> - unsigned e = type - > getNumElements ( ) ; <nl> - if ( e = = 0 ) <nl> - return getClangASTContext ( ) . VoidTy ; <nl> - <nl> - CanType eltTy = type . getElementType ( 0 ) ; <nl> - for ( unsigned i = 1 ; i < e ; + + i ) { <nl> - assert ( eltTy = = type . getElementType ( i ) & & <nl> - " Only tuples where all element types are equal " <nl> - " map to fixed - size arrays " ) ; <nl> - } <nl> - <nl> - auto clangEltTy = Converter . convert ( IGM , eltTy ) ; <nl> - if ( ! clangEltTy ) return clang : : CanQualType ( ) ; <nl> - <nl> - APInt size ( 32 , e ) ; <nl> - auto & ctx = getClangASTContext ( ) ; <nl> - return ctx . getCanonicalType ( <nl> - ctx . getConstantArrayType ( clangEltTy , size , nullptr , <nl> - clang : : ArrayType : : Normal , 0 ) ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitProtocolType ( CanProtocolType type ) { <nl> - auto proto = type - > getDecl ( ) ; <nl> - auto & clangCtx = getClangASTContext ( ) ; <nl> - <nl> - if ( ! proto - > isObjC ( ) ) { <nl> - std : : string s ; <nl> - llvm : : raw_string_ostream err ( s ) ; <nl> - err < < " Trying to compute the clang type for a non - ObjC protocol type \ n " ; <nl> - proto - > dump ( err ) ; <nl> - llvm : : report_fatal_error ( err . str ( ) ) ; <nl> - } <nl> - <nl> - / / Single protocol - > id < Proto > <nl> - clang : : IdentifierInfo * name = & clangCtx . Idents . get ( proto - > getName ( ) . get ( ) ) ; <nl> - auto * PDecl = clang : : ObjCProtocolDecl : : Create ( <nl> - const_cast < clang : : ASTContext & > ( clangCtx ) , <nl> - clangCtx . getTranslationUnitDecl ( ) , name , <nl> - clang : : SourceLocation ( ) , clang : : SourceLocation ( ) , nullptr ) ; <nl> - <nl> - / / Attach an objc_runtime_name attribute with the Objective - C name to use <nl> - / / for this protocol . <nl> - SmallString < 64 > runtimeNameBuffer ; <nl> - PDecl - > addAttr ( clang : : ObjCRuntimeNameAttr : : CreateImplicit ( <nl> - PDecl - > getASTContext ( ) , <nl> - proto - > getObjCRuntimeName ( runtimeNameBuffer ) ) ) ; <nl> - <nl> - auto clangType = clangCtx . getObjCObjectType ( clangCtx . ObjCBuiltinIdTy , <nl> - & PDecl , 1 ) ; <nl> - auto ptrTy = clangCtx . getObjCObjectPointerType ( clangType ) ; <nl> - return clangCtx . getCanonicalType ( ptrTy ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitMetatypeType ( CanMetatypeType type ) { <nl> - return getClangMetatypeType ( getClangASTContext ( ) ) ; <nl> - } <nl> - <nl> - clang : : CanQualType <nl> - GenClangType : : visitExistentialMetatypeType ( CanExistentialMetatypeType type ) { <nl> - return getClangMetatypeType ( getClangASTContext ( ) ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitClassType ( CanClassType type ) { <nl> - auto & clangCtx = getClangASTContext ( ) ; <nl> - auto swiftDecl = type - > getDecl ( ) ; <nl> - <nl> - / / TODO : [ non - objc - class - clang - type - conversion ] <nl> - / / Crashing here instead of returning a bogus ' id ' leads to test failures , <nl> - / / which is surprising . <nl> - if ( ! swiftDecl - > isObjC ( ) ) <nl> - return getClangIdType ( clangCtx ) ; <nl> - <nl> - / / produce the clang type INTF * if it is imported ObjC object . <nl> - clang : : IdentifierInfo * ForwardClassId = <nl> - & clangCtx . Idents . get ( swiftDecl - > getName ( ) . get ( ) ) ; <nl> - auto * CDecl = clang : : ObjCInterfaceDecl : : Create ( <nl> - clangCtx , clangCtx . getTranslationUnitDecl ( ) , <nl> - clang : : SourceLocation ( ) , ForwardClassId , <nl> - / * typeParamList * / nullptr , / * PrevDecl = * / nullptr , <nl> - clang : : SourceLocation ( ) ) ; <nl> - <nl> - / / Attach an objc_runtime_name attribute with the Objective - C name to use <nl> - / / for this class . <nl> - SmallString < 64 > runtimeNameBuffer ; <nl> - CDecl - > addAttr ( clang : : ObjCRuntimeNameAttr : : CreateImplicit ( <nl> - CDecl - > getASTContext ( ) , <nl> - swiftDecl - > getObjCRuntimeName ( runtimeNameBuffer ) ) ) ; <nl> - <nl> - auto clangType = clangCtx . getObjCInterfaceType ( CDecl ) ; <nl> - auto ptrTy = clangCtx . getObjCObjectPointerType ( clangType ) ; <nl> - return clangCtx . getCanonicalType ( ptrTy ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitBoundGenericClassType ( <nl> - CanBoundGenericClassType type ) { <nl> - / / Any @ objc class type in Swift that shows up in an @ objc method maps 1 - 1 to <nl> - / / " id < SomeProto > " ; with clang ' s encoding ignoring the protocol list . <nl> - return getClangIdType ( getClangASTContext ( ) ) ; <nl> - } <nl> - <nl> - clang : : CanQualType <nl> - GenClangType : : visitBoundGenericType ( CanBoundGenericType type ) { <nl> - / / We only expect * Pointer < T > , SIMD * < T > and Optional < T > . <nl> - if ( auto underlyingTy = <nl> - SILType : : getPrimitiveObjectType ( type ) . getOptionalObjectType ( ) ) { <nl> - / / The underlying type could be a bridged type , which makes any <nl> - / / sort of casual assertion here difficult . <nl> - return Converter . convert ( IGM , underlyingTy . getASTType ( ) ) ; <nl> - } <nl> - <nl> - auto swiftStructDecl = type - > getDecl ( ) ; <nl> - <nl> - enum class StructKind { <nl> - Invalid , <nl> - UnsafeMutablePointer , <nl> - UnsafePointer , <nl> - AutoreleasingUnsafeMutablePointer , <nl> - Unmanaged , <nl> - CFunctionPointer , <nl> - SIMD , <nl> - } kind = llvm : : StringSwitch < StructKind > ( swiftStructDecl - > getName ( ) . str ( ) ) <nl> - . Case ( " UnsafeMutablePointer " , StructKind : : UnsafeMutablePointer ) <nl> - . Case ( " UnsafePointer " , StructKind : : UnsafePointer ) <nl> - . Case ( <nl> - " AutoreleasingUnsafeMutablePointer " , <nl> - StructKind : : AutoreleasingUnsafeMutablePointer ) <nl> - . Case ( " Unmanaged " , StructKind : : Unmanaged ) <nl> - . Case ( " CFunctionPointer " , StructKind : : CFunctionPointer ) <nl> - . StartsWith ( " SIMD " , StructKind : : SIMD ) <nl> - . Default ( StructKind : : Invalid ) ; <nl> - <nl> - auto args = type . getGenericArgs ( ) ; <nl> - assert ( args . size ( ) = = 1 & & <nl> - " should have a single generic argument ! " ) ; <nl> - auto loweredArgTy = IGM . getLoweredType ( args [ 0 ] ) . getASTType ( ) ; <nl> - <nl> - switch ( kind ) { <nl> - case StructKind : : Invalid : <nl> - llvm_unreachable ( " Unexpected non - pointer generic struct type in imported " <nl> - " Clang module ! " ) ; <nl> - <nl> - case StructKind : : UnsafeMutablePointer : <nl> - case StructKind : : Unmanaged : <nl> - case StructKind : : AutoreleasingUnsafeMutablePointer : { <nl> - auto clangCanTy = Converter . convert ( IGM , loweredArgTy ) ; <nl> - if ( ! clangCanTy ) return clang : : CanQualType ( ) ; <nl> - return getClangASTContext ( ) . getPointerType ( clangCanTy ) ; <nl> - } <nl> - case StructKind : : UnsafePointer : { <nl> - clang : : QualType clangTy <nl> - = Converter . convert ( IGM , loweredArgTy ) . withConst ( ) ; <nl> - return getCanonicalType ( getClangASTContext ( ) . getPointerType ( clangTy ) ) ; <nl> - } <nl> - <nl> - case StructKind : : CFunctionPointer : { <nl> - auto & clangCtx = getClangASTContext ( ) ; <nl> - <nl> - clang : : QualType functionTy ; <nl> - if ( isa < SILFunctionType > ( loweredArgTy ) ) { <nl> - functionTy = Converter . convert ( IGM , loweredArgTy ) ; <nl> - } else { <nl> - / / Fall back to void ( ) . <nl> - functionTy = clangCtx . getFunctionNoProtoType ( clangCtx . VoidTy ) ; <nl> - } <nl> - auto fnPtrTy = clangCtx . getPointerType ( functionTy ) ; <nl> - return getCanonicalType ( fnPtrTy ) ; <nl> - } <nl> - <nl> - case StructKind : : SIMD : { <nl> - clang : : QualType scalarTy = Converter . convert ( IGM , loweredArgTy ) ; <nl> - auto numEltsString = swiftStructDecl - > getName ( ) . str ( ) ; <nl> - numEltsString . consume_front ( " SIMD " ) ; <nl> - unsigned numElts ; <nl> - bool failedParse = numEltsString . getAsInteger < unsigned > ( 10 , numElts ) ; <nl> - assert ( ! failedParse & & " SIMD type name didn ' t end in count ? " ) ; <nl> - ( void ) failedParse ; <nl> - auto vectorTy = getClangASTContext ( ) . getVectorType ( scalarTy , numElts , <nl> - clang : : VectorType : : VectorKind : : GenericVector ) ; <nl> - return getCanonicalType ( vectorTy ) ; <nl> - } <nl> - } <nl> - <nl> - llvm_unreachable ( " Not a valid StructKind . " ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitEnumType ( CanEnumType type ) { <nl> - / / Special case : Uninhabited enums are not @ objc , so we don ' t <nl> - / / know what to do below , but we can just convert to ' void ' . <nl> - if ( type - > isUninhabited ( ) ) <nl> - return Converter . convert ( IGM , IGM . Context . TheEmptyTupleType ) ; <nl> - <nl> - assert ( type - > getDecl ( ) - > isObjC ( ) & & " not an @ objc enum ? ! " ) ; <nl> - <nl> - / / @ objc enums lower to their raw types . <nl> - return Converter . convert ( IGM , <nl> - type - > getDecl ( ) - > getRawType ( ) - > getCanonicalType ( ) ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitFunctionType ( CanFunctionType type ) { <nl> - llvm_unreachable ( " FunctionType should have been lowered away " ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitSILFunctionType ( CanSILFunctionType type ) { <nl> - auto & clangCtx = getClangASTContext ( ) ; <nl> - <nl> - enum FunctionPointerKind { <nl> - Block , CFunctionPointer , <nl> - } ; <nl> - <nl> - FunctionPointerKind kind ; <nl> - <nl> - switch ( type - > getRepresentation ( ) ) { <nl> - case SILFunctionType : : Representation : : Block : <nl> - kind = Block ; <nl> - break ; <nl> - <nl> - case SILFunctionType : : Representation : : CFunctionPointer : <nl> - kind = CFunctionPointer ; <nl> - break ; <nl> - <nl> - case SILFunctionType : : Representation : : Thick : <nl> - case SILFunctionType : : Representation : : Thin : <nl> - case SILFunctionType : : Representation : : Method : <nl> - case SILFunctionType : : Representation : : ObjCMethod : <nl> - case SILFunctionType : : Representation : : WitnessMethod : <nl> - case SILFunctionType : : Representation : : Closure : <nl> - llvm_unreachable ( " not an ObjC - compatible function " ) ; <nl> - } <nl> - <nl> - / / Convert the return and parameter types . <nl> - auto allResults = type - > getResults ( ) ; <nl> - assert ( allResults . size ( ) < = 1 & & " multiple results with C convention " ) ; <nl> - clang : : QualType resultType ; <nl> - if ( allResults . empty ( ) ) { <nl> - resultType = clangCtx . VoidTy ; <nl> - } else { <nl> - resultType = Converter . convert ( <nl> - IGM , <nl> - allResults [ 0 ] . getReturnValueType ( IGM . getSILModule ( ) , type , <nl> - IGM . getMaximalTypeExpansionContext ( ) ) ) ; <nl> - if ( resultType . isNull ( ) ) <nl> - return clang : : CanQualType ( ) ; <nl> - } <nl> - <nl> - SmallVector < clang : : QualType , 4 > paramTypes ; <nl> - SmallVector < clang : : FunctionProtoType : : ExtParameterInfo , 4 > extParamInfos ; <nl> - for ( auto paramTy : type - > getParameters ( ) ) { <nl> - clang : : FunctionProtoType : : ExtParameterInfo extParamInfo ; <nl> - <nl> - / / Blocks should only take direct + 0 parameters . <nl> - switch ( paramTy . getConvention ( ) ) { <nl> - case ParameterConvention : : Direct_Guaranteed : <nl> - case ParameterConvention : : Direct_Unowned : <nl> - / / OK . <nl> - break ; <nl> - <nl> - case ParameterConvention : : Direct_Owned : <nl> - extParamInfo = extParamInfo . withIsConsumed ( true ) ; <nl> - break ; <nl> - <nl> - case ParameterConvention : : Indirect_In : <nl> - case ParameterConvention : : Indirect_In_Constant : <nl> - case ParameterConvention : : Indirect_Inout : <nl> - case ParameterConvention : : Indirect_InoutAliasable : <nl> - case ParameterConvention : : Indirect_In_Guaranteed : <nl> - llvm_unreachable ( " block takes indirect parameter " ) ; <nl> - } <nl> - auto param = Converter . convert ( <nl> - IGM , paramTy . getArgumentType ( IGM . getSILModule ( ) , type , <nl> - IGM . getMaximalTypeExpansionContext ( ) ) ) ; <nl> - if ( param . isNull ( ) ) <nl> - return clang : : CanQualType ( ) ; <nl> - <nl> - paramTypes . push_back ( param ) ; <nl> - extParamInfos . push_back ( extParamInfo ) ; <nl> - } <nl> - <nl> - / / Build the Clang function type . <nl> - clang : : FunctionProtoType : : ExtProtoInfo extProtoInfo ; <nl> - extProtoInfo . ExtParameterInfos = extParamInfos . begin ( ) ; <nl> - <nl> - auto fnTy = clangCtx . getFunctionType ( resultType , paramTypes , extProtoInfo ) ; <nl> - clang : : QualType ptrTy ; <nl> - <nl> - switch ( kind ) { <nl> - case Block : <nl> - ptrTy = clangCtx . getBlockPointerType ( fnTy ) ; <nl> - break ; <nl> - case CFunctionPointer : <nl> - ptrTy = clangCtx . getPointerType ( fnTy ) ; <nl> - } <nl> - return clangCtx . getCanonicalType ( ptrTy ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitSILBlockStorageType ( CanSILBlockStorageType type ) { <nl> - / / We ' ll select ( void ) ( ^ ) ( ) . This isn ' t correct for all blocks , but block <nl> - / / storage type should only be converted for function signature lowering , <nl> - / / where the parameter types do not matter . <nl> - auto & clangCtx = getClangASTContext ( ) ; <nl> - auto fnTy = clangCtx . getFunctionNoProtoType ( clangCtx . VoidTy ) ; <nl> - auto blockTy = clangCtx . getBlockPointerType ( fnTy ) ; <nl> - return clangCtx . getCanonicalType ( blockTy ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitProtocolCompositionType ( <nl> - CanProtocolCompositionType type ) { <nl> - auto & clangCtx = getClangASTContext ( ) ; <nl> - <nl> - / / FIXME . Eventually , this will have its own helper routine . <nl> - SmallVector < const clang : : ObjCProtocolDecl * , 4 > Protocols ; <nl> - auto layout = type . getExistentialLayout ( ) ; <nl> - assert ( layout . isObjC ( ) & & " Cannot represent opaque existential in Clang " ) ; <nl> - <nl> - / / AnyObject - > id . <nl> - if ( layout . isAnyObject ( ) ) <nl> - return getClangIdType ( getClangASTContext ( ) ) ; <nl> - <nl> - auto superclassTy = clangCtx . ObjCBuiltinIdTy ; <nl> - if ( auto layoutSuperclassTy = layout . getSuperclass ( ) ) { <nl> - superclassTy = clangCtx . getCanonicalType ( <nl> - cast < clang : : ObjCObjectPointerType > ( <nl> - Converter . convert ( IGM , CanType ( layoutSuperclassTy ) ) ) <nl> - - > getPointeeType ( ) ) ; <nl> - } <nl> - <nl> - for ( Type t : layout . getProtocols ( ) ) { <nl> - auto opt = cast < clang : : ObjCObjectPointerType > ( <nl> - Converter . convert ( IGM , CanType ( t ) ) ) ; <nl> - for ( auto p : opt - > quals ( ) ) <nl> - Protocols . push_back ( p ) ; <nl> - } <nl> - <nl> - if ( Protocols . empty ( ) ) <nl> - return superclassTy ; <nl> - <nl> - / / id < protocol - list > <nl> - clang : : ObjCProtocolDecl * * ProtoQuals = <nl> - new ( clangCtx ) clang : : ObjCProtocolDecl * [ Protocols . size ( ) ] ; <nl> - memcpy ( ProtoQuals , Protocols . data ( ) , <nl> - sizeof ( clang : : ObjCProtocolDecl * ) * Protocols . size ( ) ) ; <nl> - auto clangType = clangCtx . getObjCObjectType ( superclassTy , <nl> - ProtoQuals , <nl> - Protocols . size ( ) ) ; <nl> - auto ptrTy = clangCtx . getObjCObjectPointerType ( clangType ) ; <nl> - return clangCtx . getCanonicalType ( ptrTy ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitBuiltinRawPointerType ( <nl> - CanBuiltinRawPointerType type ) { <nl> - return getClangASTContext ( ) . VoidPtrTy ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitBuiltinIntegerType ( <nl> - CanBuiltinIntegerType type ) { <nl> - auto & ctx = getClangASTContext ( ) ; <nl> - if ( type - > getWidth ( ) . isPointerWidth ( ) ) <nl> - return ctx . getCanonicalType ( ctx . getUIntPtrType ( ) ) ; <nl> - assert ( type - > getWidth ( ) . isFixedWidth ( ) ) ; <nl> - auto width = type - > getWidth ( ) . getFixedWidth ( ) ; <nl> - if ( width = = 1 ) <nl> - return ctx . BoolTy ; <nl> - return ctx . getCanonicalType ( ctx . getIntTypeForBitwidth ( width , / * signed * / 0 ) ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitBuiltinFloatType ( <nl> - CanBuiltinFloatType type ) { <nl> - auto & ctx = getClangASTContext ( ) ; <nl> - auto & clangTargetInfo = ctx . getTargetInfo ( ) ; <nl> - const llvm : : fltSemantics * format = & type - > getAPFloatSemantics ( ) ; <nl> - if ( format = = & clangTargetInfo . getHalfFormat ( ) ) return ctx . HalfTy ; <nl> - if ( format = = & clangTargetInfo . getFloatFormat ( ) ) return ctx . FloatTy ; <nl> - if ( format = = & clangTargetInfo . getDoubleFormat ( ) ) return ctx . DoubleTy ; <nl> - if ( format = = & clangTargetInfo . getLongDoubleFormat ( ) ) return ctx . LongDoubleTy ; <nl> - llvm_unreachable ( " cannot translate floating - point format to C " ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitArchetypeType ( CanArchetypeType type ) { <nl> - / / We see these in the case where we invoke an @ objc function <nl> - / / through a protocol . <nl> - return getClangIdType ( getClangASTContext ( ) ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitDynamicSelfType ( CanDynamicSelfType type ) { <nl> - / / Dynamic Self is equivalent to ' instancetype ' , which is treated as <nl> - / / ' id ' within the Objective - C type system . <nl> - return getClangIdType ( getClangASTContext ( ) ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitGenericTypeParamType ( <nl> - CanGenericTypeParamType type ) { <nl> - / / We see these in the case where we invoke an @ objc function <nl> - / / through a protocol argument that is a generic type . <nl> - return getClangIdType ( getClangASTContext ( ) ) ; <nl> - } <nl> - <nl> - clang : : CanQualType GenClangType : : visitType ( CanType type ) { <nl> - llvm_unreachable ( " Unexpected type in Clang type generation . " ) ; <nl> - } <nl> - <nl> - clang : : CanQualType irgen : : ClangTypeConverter : : convert ( IRGenModule & IGM , CanType type ) { <nl> - / / Look in the cache . <nl> - auto it = Cache . find ( type ) ; <nl> - if ( it ! = Cache . end ( ) ) { <nl> - return it - > second ; <nl> - } <nl> - <nl> - / / Try to do this without making cache entries for obvious cases . <nl> - if ( auto nominal = dyn_cast < NominalType > ( type ) ) { <nl> - auto decl = nominal - > getDecl ( ) ; <nl> - if ( auto clangDecl = decl - > getClangDecl ( ) ) { <nl> - auto & ctx = IGM . getClangASTContext ( ) ; <nl> - if ( auto clangTypeDecl = dyn_cast < clang : : TypeDecl > ( clangDecl ) ) { <nl> - return ctx . getCanonicalType ( ctx . getTypeDeclType ( clangTypeDecl ) ) <nl> - . getUnqualifiedType ( ) ; <nl> - } else if ( auto ifaceDecl = dyn_cast < clang : : ObjCInterfaceDecl > ( clangDecl ) ) { <nl> - auto clangType = ctx . getObjCInterfaceType ( ifaceDecl ) ; <nl> - auto ptrTy = ctx . getObjCObjectPointerType ( clangType ) ; <nl> - return ctx . getCanonicalType ( ptrTy ) ; <nl> - } else if ( auto protoDecl = dyn_cast < clang : : ObjCProtocolDecl > ( clangDecl ) ) { <nl> - auto clangType = ctx . getObjCObjectType ( <nl> - ctx . ObjCBuiltinIdTy , <nl> - const_cast < clang : : ObjCProtocolDecl * * > ( & protoDecl ) , <nl> - 1 ) ; <nl> - auto ptrTy = ctx . getObjCObjectPointerType ( clangType ) ; <nl> - return ctx . getCanonicalType ( ptrTy ) ; <nl> - } <nl> - } <nl> - } <nl> - <nl> - / / If that failed , convert the type , cache , and return . <nl> - clang : : CanQualType result = GenClangType ( IGM , * this ) . visit ( type ) ; <nl> - Cache . insert ( { type , result } ) ; <nl> - return result ; <nl> - } <nl> - <nl> clang : : CanQualType IRGenModule : : getClangType ( CanType type ) { <nl> - return ClangTypes - > convert ( * this , type ) ; <nl> + auto * ty = type - > getASTContext ( ) . getClangTypeForIRGen ( type ) ; <nl> + return ty ? ty - > getCanonicalTypeUnqualified ( ) : clang : : CanQualType ( ) ; <nl> } <nl> <nl> clang : : CanQualType IRGenModule : : getClangType ( SILType type ) { <nl> clang : : CanQualType IRGenModule : : getClangType ( SILParameterInfo params , <nl> } <nl> return clangType ; <nl> } <nl> - <nl> - void IRGenModule : : initClangTypeConverter ( ) { <nl> - if ( auto loader = Context . getClangModuleLoader ( ) ) { <nl> - auto importer = static_cast < ClangImporter * > ( loader ) ; <nl> - ClangASTContext = & importer - > getClangASTContext ( ) ; <nl> - ClangTypes = new ClangTypeConverter ( ) ; <nl> - } else { <nl> - ClangASTContext = nullptr ; <nl> - ClangTypes = nullptr ; <nl> - } <nl> - } <nl> - <nl> - void IRGenModule : : destroyClangTypeConverter ( ) { <nl> - delete ClangTypes ; <nl> - } <nl> mmm a / lib / IRGen / GenObjC . cpp <nl> ppp b / lib / IRGen / GenObjC . cpp <nl> static llvm : : Constant * getObjCEncodingForTypes ( IRGenModule & IGM , <nl> <nl> std : : string encodingString ; <nl> <nl> + auto fnClangTy = fnType - > getClangTypeInfo ( ) . getType ( ) ; <nl> + <nl> / / Return type . <nl> { <nl> auto clangType = IGM . getClangType ( resultType . getASTType ( ) ) ; <nl> mmm a / lib / IRGen / IRGenModule . cpp <nl> ppp b / lib / IRGen / IRGenModule . cpp <nl> IRGenModule : : IRGenModule ( IRGenerator & irgen , <nl> MainInputFilenameForDebugInfo , <nl> PrivateDiscriminator ) ; <nl> <nl> - initClangTypeConverter ( ) ; <nl> + if ( auto loader = Context . getClangModuleLoader ( ) ) { <nl> + ClangASTContext = <nl> + & static_cast < ClangImporter * > ( loader ) - > getClangASTContext ( ) ; <nl> + } <nl> <nl> if ( ClangASTContext ) { <nl> auto atomicBoolTy = ClangASTContext - > getAtomicType ( ClangASTContext - > BoolTy ) ; <nl> IRGenModule : : IRGenModule ( IRGenerator & irgen , <nl> } <nl> <nl> IRGenModule : : ~ IRGenModule ( ) { <nl> - destroyClangTypeConverter ( ) ; <nl> destroyMetadataLayoutMap ( ) ; <nl> destroyPointerAuthCaches ( ) ; <nl> delete & Types ; <nl> mmm a / lib / IRGen / IRGenModule . h <nl> ppp b / lib / IRGen / IRGenModule . h <nl> class IRGenModule { <nl> friend TypeConverter ; <nl> <nl> const clang : : ASTContext * ClangASTContext ; <nl> - ClangTypeConverter * ClangTypes ; <nl> - void initClangTypeConverter ( ) ; <nl> - void destroyClangTypeConverter ( ) ; <nl> <nl> llvm : : DenseMap < Decl * , MetadataLayout * > MetadataLayouts ; <nl> void destroyMetadataLayoutMap ( ) ; <nl> | Merge pull request from varungandhi - apple / vg - irgen - remove - old - clangtypeconverter | apple/swift | e89b53409f44e7c156748665ecaa382ecf8efdd9 | 2020-11-12T21:52:38Z |
mmm a / src / core / console_user_server / include / components_manager . hpp <nl> ppp b / src / core / console_user_server / include / components_manager . hpp <nl> class components_manager final { <nl> public : <nl> components_manager ( const components_manager & ) = delete ; <nl> <nl> - components_manager ( void ) { <nl> - dispatcher_ = std : : make_unique < thread_utility : : dispatcher > ( ) ; <nl> + components_manager ( void ) : object_id_ ( dispatcher : : make_new_object_id ( ) ) { <nl> + dispatcher_ = std : : make_shared < dispatcher : : dispatcher > ( ) ; <nl> + dispatcher_ - > attach ( object_id_ ) ; <nl> <nl> version_monitor_ = version_monitor_utility : : make_version_monitor_stops_main_run_loop_when_version_changed ( ) ; <nl> start_grabber_alerts_monitor ( ) ; <nl> class components_manager final { <nl> console_user_id_monitor_ = std : : make_unique < console_user_id_monitor > ( ) ; <nl> <nl> console_user_id_monitor_ - > console_user_id_changed . connect ( [ this ] ( auto & & uid ) { <nl> - dispatcher_ - > enqueue ( [ this , uid ] { <nl> - if ( version_monitor_ ) { <nl> - version_monitor_ - > async_manual_check ( ) ; <nl> - } <nl> - <nl> - filesystem : : create_directory_with_intermediate_directories ( <nl> - constants : : get_user_configuration_directory ( ) , <nl> - 0700 ) ; <nl> - <nl> - receiver_ = nullptr ; <nl> - stop_grabber_client ( ) ; <nl> - <nl> - if ( uid ! = getuid ( ) ) { <nl> - return ; <nl> - } <nl> - <nl> - receiver_ = std : : make_unique < receiver > ( ) ; <nl> - <nl> - receiver_ - > bound . connect ( [ this ] { <nl> - dispatcher_ - > enqueue ( [ this ] { <nl> + dispatcher_ - > enqueue ( <nl> + object_id_ , <nl> + [ this , uid ] { <nl> + if ( version_monitor_ ) { <nl> + version_monitor_ - > async_manual_check ( ) ; <nl> + } <nl> + <nl> + filesystem : : create_directory_with_intermediate_directories ( <nl> + constants : : get_user_configuration_directory ( ) , <nl> + 0700 ) ; <nl> + <nl> + receiver_ = nullptr ; <nl> stop_grabber_client ( ) ; <nl> - start_grabber_client ( ) ; <nl> - } ) ; <nl> - } ) ; <nl> <nl> - receiver_ - > bind_failed . connect ( [ this ] ( auto & & error_code ) { <nl> - dispatcher_ - > enqueue ( [ this ] { <nl> - stop_grabber_client ( ) ; <nl> - } ) ; <nl> - } ) ; <nl> - <nl> - receiver_ - > closed . connect ( [ this ] { <nl> - dispatcher_ - > enqueue ( [ this ] { <nl> - stop_grabber_client ( ) ; <nl> + if ( uid ! = getuid ( ) ) { <nl> + return ; <nl> + } <nl> + <nl> + receiver_ = std : : make_unique < receiver > ( dispatcher_ ) ; <nl> + <nl> + receiver_ - > bound . connect ( [ this ] { <nl> + dispatcher_ - > enqueue ( <nl> + object_id_ , <nl> + [ this ] { <nl> + stop_grabber_client ( ) ; <nl> + start_grabber_client ( ) ; <nl> + } ) ; <nl> + } ) ; <nl> + <nl> + receiver_ - > bind_failed . connect ( [ this ] ( auto & & error_code ) { <nl> + dispatcher_ - > enqueue ( <nl> + object_id_ , <nl> + [ this ] { <nl> + stop_grabber_client ( ) ; <nl> + } ) ; <nl> + } ) ; <nl> + <nl> + receiver_ - > closed . connect ( [ this ] { <nl> + dispatcher_ - > enqueue ( <nl> + object_id_ , <nl> + [ this ] { <nl> + stop_grabber_client ( ) ; <nl> + } ) ; <nl> + } ) ; <nl> + <nl> + receiver_ - > async_start ( ) ; <nl> } ) ; <nl> - } ) ; <nl> - <nl> - receiver_ - > async_start ( ) ; <nl> - } ) ; <nl> } ) ; <nl> <nl> console_user_id_monitor_ - > async_start ( ) ; <nl> } <nl> <nl> ~ components_manager ( void ) { <nl> - dispatcher_ - > enqueue ( [ this ] { <nl> - stop_grabber_client ( ) ; <nl> - <nl> - console_user_id_monitor_ = nullptr ; <nl> - receiver_ = nullptr ; <nl> - grabber_alerts_monitor_ = nullptr ; <nl> - version_monitor_ = nullptr ; <nl> - } ) ; <nl> + dispatcher_ - > detach ( <nl> + object_id_ , <nl> + [ this ] { <nl> + stop_grabber_client ( ) ; <nl> + <nl> + console_user_id_monitor_ = nullptr ; <nl> + receiver_ = nullptr ; <nl> + grabber_alerts_monitor_ = nullptr ; <nl> + version_monitor_ = nullptr ; <nl> + } ) ; <nl> <nl> dispatcher_ - > terminate ( ) ; <nl> dispatcher_ = nullptr ; <nl> class components_manager final { <nl> grabber_alerts_monitor_ = std : : make_unique < grabber_alerts_monitor > ( constants : : get_grabber_alerts_json_file_path ( ) ) ; <nl> <nl> grabber_alerts_monitor_ - > alerts_changed . connect ( [ this ] ( auto & & alerts ) { <nl> - dispatcher_ - > enqueue ( [ alerts ] { <nl> - logger : : get_logger ( ) . info ( " karabiner_grabber_alerts . json is updated . " ) ; <nl> - if ( ! alerts . empty ( ) ) { <nl> - application_launcher : : launch_preferences ( ) ; <nl> - } <nl> - } ) ; <nl> + dispatcher_ - > enqueue ( <nl> + object_id_ , <nl> + [ alerts ] { <nl> + logger : : get_logger ( ) . info ( " karabiner_grabber_alerts . json is updated . " ) ; <nl> + if ( ! alerts . empty ( ) ) { <nl> + application_launcher : : launch_preferences ( ) ; <nl> + } <nl> + } ) ; <nl> } ) ; <nl> <nl> grabber_alerts_monitor_ - > async_start ( ) ; <nl> class components_manager final { <nl> grabber_client_ = std : : make_shared < grabber_client > ( ) ; <nl> <nl> grabber_client_ - > connected . connect ( [ this ] { <nl> - dispatcher_ - > enqueue ( [ this ] { <nl> - if ( version_monitor_ ) { <nl> - version_monitor_ - > async_manual_check ( ) ; <nl> - } <nl> - <nl> - if ( grabber_client_ ) { <nl> - grabber_client_ - > async_connect_console_user_server ( ) ; <nl> - } <nl> - <nl> - stop_child_components ( ) ; <nl> - start_child_components ( ) ; <nl> - } ) ; <nl> + dispatcher_ - > enqueue ( <nl> + object_id_ , <nl> + [ this ] { <nl> + if ( version_monitor_ ) { <nl> + version_monitor_ - > async_manual_check ( ) ; <nl> + } <nl> + <nl> + if ( grabber_client_ ) { <nl> + grabber_client_ - > async_connect_console_user_server ( ) ; <nl> + } <nl> + <nl> + stop_child_components ( ) ; <nl> + start_child_components ( ) ; <nl> + } ) ; <nl> } ) ; <nl> <nl> grabber_client_ - > connect_failed . connect ( [ this ] ( auto & & error_code ) { <nl> - dispatcher_ - > enqueue ( [ this ] { <nl> - if ( version_monitor_ ) { <nl> - version_monitor_ - > async_manual_check ( ) ; <nl> - } <nl> - <nl> - stop_child_components ( ) ; <nl> - } ) ; <nl> + dispatcher_ - > enqueue ( <nl> + object_id_ , <nl> + [ this ] { <nl> + if ( version_monitor_ ) { <nl> + version_monitor_ - > async_manual_check ( ) ; <nl> + } <nl> + <nl> + stop_child_components ( ) ; <nl> + } ) ; <nl> } ) ; <nl> <nl> grabber_client_ - > closed . connect ( [ this ] { <nl> - dispatcher_ - > enqueue ( [ this ] { <nl> - if ( version_monitor_ ) { <nl> - version_monitor_ - > async_manual_check ( ) ; <nl> - } <nl> - <nl> - stop_child_components ( ) ; <nl> - } ) ; <nl> + dispatcher_ - > enqueue ( <nl> + object_id_ , <nl> + [ this ] { <nl> + if ( version_monitor_ ) { <nl> + version_monitor_ - > async_manual_check ( ) ; <nl> + } <nl> + <nl> + stop_child_components ( ) ; <nl> + } ) ; <nl> } ) ; <nl> <nl> grabber_client_ - > async_start ( ) ; <nl> class components_manager final { <nl> system_preferences_monitor_ = std : : make_unique < system_preferences_monitor > ( configuration_monitor_ ) ; <nl> <nl> system_preferences_monitor_ - > system_preferences_changed . connect ( [ this ] ( auto & & system_preferences ) { <nl> - dispatcher_ - > enqueue ( [ this , system_preferences ] { <nl> - if ( grabber_client_ ) { <nl> - grabber_client_ - > async_system_preferences_updated ( system_preferences ) ; <nl> - } <nl> - } ) ; <nl> + dispatcher_ - > enqueue ( <nl> + object_id_ , <nl> + [ this , system_preferences ] { <nl> + if ( grabber_client_ ) { <nl> + grabber_client_ - > async_system_preferences_updated ( system_preferences ) ; <nl> + } <nl> + } ) ; <nl> } ) ; <nl> <nl> system_preferences_monitor_ - > async_start ( ) ; <nl> class components_manager final { <nl> frontmost_application_observer_ = std : : make_unique < frontmost_application_observer > ( ) ; <nl> <nl> frontmost_application_observer_ - > frontmost_application_changed . connect ( [ this ] ( auto & & bundle_identifier , auto & & file_path ) { <nl> - dispatcher_ - > enqueue ( [ this , bundle_identifier , file_path ] { <nl> - if ( bundle_identifier = = " org . pqrs . Karabiner . EventViewer " | | <nl> - bundle_identifier = = " org . pqrs . Karabiner - EventViewer " ) { <nl> - return ; <nl> - } <nl> - <nl> - if ( grabber_client_ ) { <nl> - grabber_client_ - > async_frontmost_application_changed ( bundle_identifier , file_path ) ; <nl> - } <nl> - } ) ; <nl> + dispatcher_ - > enqueue ( <nl> + object_id_ , <nl> + [ this , bundle_identifier , file_path ] { <nl> + if ( bundle_identifier = = " org . pqrs . Karabiner . EventViewer " | | <nl> + bundle_identifier = = " org . pqrs . Karabiner - EventViewer " ) { <nl> + return ; <nl> + } <nl> + <nl> + if ( grabber_client_ ) { <nl> + grabber_client_ - > async_frontmost_application_changed ( bundle_identifier , file_path ) ; <nl> + } <nl> + } ) ; <nl> } ) ; <nl> <nl> frontmost_application_observer_ - > async_start ( ) ; <nl> class components_manager final { <nl> input_source_observer_ = std : : make_unique < input_source_observer > ( ) ; <nl> <nl> input_source_observer_ - > input_source_changed . connect ( [ this ] ( auto & & input_source_identifiers ) { <nl> - dispatcher_ - > enqueue ( [ this , input_source_identifiers ] { <nl> - if ( grabber_client_ ) { <nl> - grabber_client_ - > async_input_source_changed ( input_source_identifiers ) ; <nl> - } <nl> - } ) ; <nl> + dispatcher_ - > enqueue ( <nl> + object_id_ , <nl> + [ this , input_source_identifiers ] { <nl> + if ( grabber_client_ ) { <nl> + grabber_client_ - > async_input_source_changed ( input_source_identifiers ) ; <nl> + } <nl> + } ) ; <nl> } ) ; <nl> <nl> input_source_observer_ - > async_start ( ) ; <nl> class components_manager final { <nl> configuration_monitor_ = nullptr ; <nl> } <nl> <nl> - std : : unique_ptr < thread_utility : : dispatcher > dispatcher_ ; <nl> + std : : shared_ptr < dispatcher : : dispatcher > dispatcher_ ; <nl> + dispatcher : : object_id object_id_ ; <nl> <nl> / / Core components <nl> <nl> mmm a / src / core / console_user_server / include / receiver . hpp <nl> ppp b / src / core / console_user_server / include / receiver . hpp <nl> <nl> <nl> # include " console_user_server_client . hpp " <nl> # include " constants . hpp " <nl> + # include " dispatcher . hpp " <nl> # include " input_source_manager . hpp " <nl> # include " local_datagram / server_manager . hpp " <nl> # include " shell_utility . hpp " <nl> class receiver final { <nl> <nl> receiver ( const receiver & ) = delete ; <nl> <nl> - receiver ( void ) : last_select_input_source_time_stamp_ ( 0 ) { <nl> + receiver ( std : : weak_ptr < dispatcher : : dispatcher > weak_dispatcher ) : weak_dispatcher_ ( weak_dispatcher ) , <nl> + last_select_input_source_time_stamp_ ( 0 ) { <nl> dispatcher_ = std : : make_unique < thread_utility : : dispatcher > ( ) ; <nl> } <nl> <nl> class receiver final { <nl> std : : chrono : : milliseconds server_check_interval ( 3000 ) ; <nl> std : : chrono : : milliseconds reconnect_interval ( 1000 ) ; <nl> <nl> - server_manager_ = std : : make_unique < local_datagram : : server_manager > ( socket_file_path , <nl> + server_manager_ = std : : make_unique < local_datagram : : server_manager > ( weak_dispatcher_ , <nl> + socket_file_path , <nl> buffer_size , <nl> server_check_interval , <nl> reconnect_interval ) ; <nl> class receiver final { <nl> } <nl> <nl> private : <nl> + std : : weak_ptr < dispatcher : : dispatcher > weak_dispatcher_ ; <nl> std : : unique_ptr < thread_utility : : dispatcher > dispatcher_ ; <nl> <nl> std : : unique_ptr < local_datagram : : server_manager > server_manager_ ; <nl> mmm a / src / core / grabber / include / components_manager . hpp <nl> ppp b / src / core / grabber / include / components_manager . hpp <nl> <nl> <nl> # include " console_user_server_client . hpp " <nl> # include " constants . hpp " <nl> + # include " dispatcher . hpp " <nl> # include " logger . hpp " <nl> # include " monitor / console_user_id_monitor . hpp " <nl> # include " monitor / version_monitor . hpp " <nl> class components_manager final { <nl> public : <nl> components_manager ( const components_manager & ) = delete ; <nl> <nl> - components_manager ( void ) { <nl> - dispatcher_ = std : : make_unique < thread_utility : : dispatcher > ( ) ; <nl> + components_manager ( void ) : object_id_ ( dispatcher : : make_new_object_id ( ) ) { <nl> + dispatcher_ = std : : make_shared < dispatcher : : dispatcher > ( ) ; <nl> + dispatcher_ - > attach ( object_id_ ) ; <nl> <nl> version_monitor_ = version_monitor_utility : : make_version_monitor_stops_main_run_loop_when_version_changed ( ) ; <nl> <nl> console_user_id_monitor_ = std : : make_unique < console_user_id_monitor > ( ) ; <nl> <nl> console_user_id_monitor_ - > console_user_id_changed . connect ( [ this ] ( auto & & uid ) { <nl> - dispatcher_ - > enqueue ( [ this , uid ] { <nl> - uid_t console_user_server_socket_uid = 0 ; <nl> - <nl> - if ( uid ) { <nl> - logger : : get_logger ( ) . info ( " current_console_user_id : { 0 } " , * uid ) ; <nl> - console_user_server_socket_uid = * uid ; <nl> - } else { <nl> - logger : : get_logger ( ) . info ( " current_console_user_id : none " ) ; <nl> - } <nl> - <nl> - if ( version_monitor_ ) { <nl> - version_monitor_ - > async_manual_check ( ) ; <nl> - } <nl> - <nl> - / / Prepare console_user_server_socket_directory <nl> - { <nl> - auto socket_file_path = console_user_server_client : : make_console_user_server_socket_directory ( console_user_server_socket_uid ) ; <nl> - mkdir ( socket_file_path . c_str ( ) , 0700 ) ; <nl> - chown ( socket_file_path . c_str ( ) , console_user_server_socket_uid , 0 ) ; <nl> - chmod ( socket_file_path . c_str ( ) , 0700 ) ; <nl> - } <nl> - <nl> - receiver_ = nullptr ; <nl> - receiver_ = std : : make_unique < receiver > ( ) ; <nl> - } ) ; <nl> + dispatcher_ - > enqueue ( <nl> + object_id_ , <nl> + [ this , uid ] { <nl> + uid_t console_user_server_socket_uid = 0 ; <nl> + <nl> + if ( uid ) { <nl> + logger : : get_logger ( ) . info ( " current_console_user_id : { 0 } " , * uid ) ; <nl> + console_user_server_socket_uid = * uid ; <nl> + } else { <nl> + logger : : get_logger ( ) . info ( " current_console_user_id : none " ) ; <nl> + } <nl> + <nl> + if ( version_monitor_ ) { <nl> + version_monitor_ - > async_manual_check ( ) ; <nl> + } <nl> + <nl> + / / Prepare console_user_server_socket_directory <nl> + { <nl> + auto socket_file_path = console_user_server_client : : make_console_user_server_socket_directory ( console_user_server_socket_uid ) ; <nl> + mkdir ( socket_file_path . c_str ( ) , 0700 ) ; <nl> + chown ( socket_file_path . c_str ( ) , console_user_server_socket_uid , 0 ) ; <nl> + chmod ( socket_file_path . c_str ( ) , 0700 ) ; <nl> + } <nl> + <nl> + receiver_ = nullptr ; <nl> + receiver_ = std : : make_unique < receiver > ( dispatcher_ ) ; <nl> + } ) ; <nl> } ) ; <nl> <nl> console_user_id_monitor_ - > async_start ( ) ; <nl> } <nl> <nl> ~ components_manager ( void ) { <nl> - dispatcher_ - > enqueue ( [ this ] { <nl> + dispatcher_ - > detach ( object_id_ , [ this ] { <nl> console_user_id_monitor_ = nullptr ; <nl> receiver_ = nullptr ; <nl> version_monitor_ = nullptr ; <nl> class components_manager final { <nl> } <nl> <nl> private : <nl> - std : : unique_ptr < thread_utility : : dispatcher > dispatcher_ ; <nl> - <nl> + std : : shared_ptr < dispatcher : : dispatcher > dispatcher_ ; <nl> + dispatcher : : object_id object_id_ ; <nl> std : : shared_ptr < version_monitor > version_monitor_ ; <nl> std : : unique_ptr < console_user_id_monitor > console_user_id_monitor_ ; <nl> std : : unique_ptr < receiver > receiver_ ; <nl> mmm a / src / core / grabber / include / receiver . hpp <nl> ppp b / src / core / grabber / include / receiver . hpp <nl> <nl> # include " console_user_server_client . hpp " <nl> # include " constants . hpp " <nl> # include " device_grabber . hpp " <nl> + # include " dispatcher . hpp " <nl> # include " grabbable_state_queues_manager . hpp " <nl> # include " local_datagram / server_manager . hpp " <nl> # include " session . hpp " <nl> class receiver final { <nl> public : <nl> receiver ( const receiver & ) = delete ; <nl> <nl> - receiver ( void ) { <nl> + receiver ( std : : weak_ptr < dispatcher : : dispatcher > weak_dispatcher ) { <nl> dispatcher_ = std : : make_unique < thread_utility : : dispatcher > ( ) ; <nl> <nl> std : : string socket_file_path ( constants : : get_grabber_socket_file_path ( ) ) ; <nl> class receiver final { <nl> std : : chrono : : milliseconds server_check_interval ( 3000 ) ; <nl> std : : chrono : : milliseconds reconnect_interval ( 1000 ) ; <nl> <nl> - server_manager_ = std : : make_unique < local_datagram : : server_manager > ( socket_file_path , <nl> + server_manager_ = std : : make_unique < local_datagram : : server_manager > ( weak_dispatcher , <nl> + socket_file_path , <nl> buffer_size , <nl> server_check_interval , <nl> reconnect_interval ) ; <nl> mmm a / src / share / local_datagram / server_manager . hpp <nl> ppp b / src / share / local_datagram / server_manager . hpp <nl> <nl> <nl> / / ` krbn : : local_datagram : : server_manager ` can be used safely in a multi - threaded environment . <nl> <nl> + # include " dispatcher . hpp " <nl> # include " local_datagram / server . hpp " <nl> # include " thread_utility . hpp " <nl> <nl> class server_manager final { <nl> <nl> / / Methods <nl> <nl> - server_manager ( const std : : string & path , <nl> + server_manager ( std : : weak_ptr < dispatcher : : dispatcher > weak_dispatcher , <nl> + const std : : string & path , <nl> size_t buffer_size , <nl> boost : : optional < std : : chrono : : milliseconds > server_check_interval , <nl> - std : : chrono : : milliseconds reconnect_interval ) : path_ ( path ) , <nl> + std : : chrono : : milliseconds reconnect_interval ) : weak_dispatcher_ ( weak_dispatcher ) , <nl> + path_ ( path ) , <nl> buffer_size_ ( buffer_size ) , <nl> server_check_interval_ ( server_check_interval ) , <nl> reconnect_interval_ ( reconnect_interval ) , <nl> + object_id_ ( dispatcher : : make_new_object_id ( ) ) , <nl> reconnect_timer_enabled_ ( false ) { <nl> - dispatcher_ = std : : make_unique < thread_utility : : dispatcher > ( ) ; <nl> + if ( auto d = weak_dispatcher_ . lock ( ) ) { <nl> + d - > attach ( object_id_ ) ; <nl> + } <nl> } <nl> <nl> ~ server_manager ( void ) { <nl> - async_stop ( ) ; <nl> - <nl> - dispatcher_ - > terminate ( ) ; <nl> - dispatcher_ = nullptr ; <nl> + if ( auto d = weak_dispatcher_ . lock ( ) ) { <nl> + d - > detach ( object_id_ , [ this ] { <nl> + stop ( ) ; <nl> + } ) ; <nl> + } <nl> } <nl> <nl> void async_start ( void ) { <nl> - dispatcher_ - > enqueue ( [ this ] { <nl> + enqueue_to_dispatcher ( [ this ] { <nl> reconnect_timer_enabled_ = true ; <nl> <nl> bind ( ) ; <nl> class server_manager final { <nl> } <nl> <nl> void async_stop ( void ) { <nl> - dispatcher_ - > enqueue ( [ this ] { <nl> - / / We have to unset reconnect_timer_enabled_ before ` close ` to prevent ` start_reconnect_timer ` by ` closed ` signal . <nl> - reconnect_timer_enabled_ = false ; <nl> - <nl> - stop_reconnect_timer ( ) ; <nl> - close ( ) ; <nl> + enqueue_to_dispatcher ( [ this ] { <nl> + stop ( ) ; <nl> } ) ; <nl> } <nl> <nl> private : <nl> + void stop ( void ) { <nl> + / / We have to unset reconnect_timer_enabled_ before ` close ` to prevent ` start_reconnect_timer ` by ` closed ` signal . <nl> + reconnect_timer_enabled_ = false ; <nl> + <nl> + stop_reconnect_timer ( ) ; <nl> + close ( ) ; <nl> + } <nl> + <nl> void bind ( void ) { <nl> if ( server_ ) { <nl> return ; <nl> class server_manager final { <nl> server_ = std : : make_unique < server > ( ) ; <nl> <nl> server_ - > bound . connect ( [ this ] { <nl> - dispatcher_ - > enqueue ( [ this ] { <nl> + enqueue_to_dispatcher ( [ this ] { <nl> bound ( ) ; <nl> } ) ; <nl> } ) ; <nl> <nl> server_ - > bind_failed . connect ( [ this ] ( auto & & error_code ) { <nl> - dispatcher_ - > enqueue ( [ this , error_code ] { <nl> + enqueue_to_dispatcher ( [ this , error_code ] { <nl> bind_failed ( error_code ) ; <nl> <nl> close ( ) ; <nl> class server_manager final { <nl> } ) ; <nl> <nl> server_ - > closed . connect ( [ this ] { <nl> - dispatcher_ - > enqueue ( [ this ] { <nl> + enqueue_to_dispatcher ( [ this ] { <nl> closed ( ) ; <nl> <nl> close ( ) ; <nl> class server_manager final { <nl> } ) ; <nl> <nl> server_ - > received . connect ( [ this ] ( auto & & buffer ) { <nl> - dispatcher_ - > enqueue ( [ this , buffer ] { <nl> + enqueue_to_dispatcher ( [ this , buffer ] { <nl> received ( buffer ) ; <nl> } ) ; <nl> } ) ; <nl> class server_manager final { <nl> reconnect_interval_ , <nl> thread_utility : : timer : : mode : : once , <nl> [ this ] { <nl> - dispatcher_ - > enqueue ( [ this ] { <nl> + enqueue_to_dispatcher ( [ this ] { <nl> bind ( ) ; <nl> } ) ; <nl> } ) ; <nl> class server_manager final { <nl> reconnect_timer_ = nullptr ; <nl> } <nl> <nl> + void enqueue_to_dispatcher ( const std : : function < void ( void ) > & function ) { <nl> + if ( auto d = weak_dispatcher_ . lock ( ) ) { <nl> + d - > enqueue ( object_id_ , function ) ; <nl> + } <nl> + } <nl> + <nl> + std : : weak_ptr < dispatcher : : dispatcher > weak_dispatcher_ ; <nl> std : : string path_ ; <nl> size_t buffer_size_ ; <nl> boost : : optional < std : : chrono : : milliseconds > server_check_interval_ ; <nl> std : : chrono : : milliseconds reconnect_interval_ ; <nl> <nl> - std : : unique_ptr < thread_utility : : dispatcher > dispatcher_ ; <nl> + dispatcher : : object_id object_id_ ; <nl> std : : unique_ptr < server > server_ ; <nl> std : : unique_ptr < thread_utility : : timer > reconnect_timer_ ; <nl> bool reconnect_timer_enabled_ ; <nl> mmm a / tests / src / local_datagram_server / test . cpp <nl> ppp b / tests / src / local_datagram_server / test . cpp <nl> TEST_CASE ( " local_datagram : : server_manager " ) { <nl> <nl> std : : chrono : : milliseconds reconnect_interval ( 100 ) ; <nl> <nl> - auto server_manager = std : : make_unique < krbn : : local_datagram : : server_manager > ( socket_path , <nl> + auto dispatcher = std : : make_shared < krbn : : dispatcher : : dispatcher > ( ) ; <nl> + auto server_manager = std : : make_unique < krbn : : local_datagram : : server_manager > ( dispatcher , <nl> + socket_path , <nl> server_buffer_size , <nl> server_check_interval , <nl> reconnect_interval ) ; <nl> | use dispatcher : : dispatcher @ server_manager | pqrs-org/Karabiner-Elements | 8c5609b67a159895a770d0eb63ea16bcb429b588 | 2018-09-23T05:33:18Z |
mmm a / src / AbstractSingleDiskAdaptor . cc <nl> ppp b / src / AbstractSingleDiskAdaptor . cc <nl> void AbstractSingleDiskAdaptor : : truncate ( int64_t length ) <nl> diskWriter_ - > truncate ( length ) ; <nl> } <nl> <nl> - std : : shared_ptr < FileAllocationIterator > <nl> + std : : unique_ptr < FileAllocationIterator > <nl> AbstractSingleDiskAdaptor : : fileAllocationIterator ( ) <nl> { <nl> switch ( getFileAllocationMethod ( ) ) { <nl> # ifdef HAVE_SOME_FALLOCATE <nl> - case ( DiskAdaptor : : FILE_ALLOC_FALLOC ) : { <nl> - std : : shared_ptr < FallocFileAllocationIterator > h <nl> - ( new FallocFileAllocationIterator <nl> - ( diskWriter_ . get ( ) , size ( ) , totalLength_ ) ) ; <nl> - return h ; <nl> - } <nl> + case ( DiskAdaptor : : FILE_ALLOC_FALLOC ) : <nl> + return make_unique < FallocFileAllocationIterator > <nl> + ( diskWriter_ . get ( ) , size ( ) , totalLength_ ) ; <nl> # endif / / HAVE_SOME_FALLOCATE <nl> - case ( DiskAdaptor : : FILE_ALLOC_TRUNC ) : { <nl> - std : : shared_ptr < TruncFileAllocationIterator > h <nl> - ( new TruncFileAllocationIterator <nl> - ( diskWriter_ . get ( ) , size ( ) , totalLength_ ) ) ; <nl> - return h ; <nl> - } <nl> - default : { <nl> - std : : shared_ptr < AdaptiveFileAllocationIterator > h <nl> - ( new AdaptiveFileAllocationIterator <nl> - ( diskWriter_ . get ( ) , size ( ) , totalLength_ ) ) ; <nl> - return h ; <nl> - } <nl> + case ( DiskAdaptor : : FILE_ALLOC_TRUNC ) : <nl> + return make_unique < TruncFileAllocationIterator > <nl> + ( diskWriter_ . get ( ) , size ( ) , totalLength_ ) ; <nl> + default : <nl> + return make_unique < AdaptiveFileAllocationIterator > <nl> + ( diskWriter_ . get ( ) , size ( ) , totalLength_ ) ; <nl> } <nl> } <nl> <nl> mmm a / src / AbstractSingleDiskAdaptor . h <nl> ppp b / src / AbstractSingleDiskAdaptor . h <nl> class AbstractSingleDiskAdaptor : public DiskAdaptor { <nl> <nl> virtual void truncate ( int64_t length ) ; <nl> <nl> - virtual std : : shared_ptr < FileAllocationIterator > fileAllocationIterator ( ) ; <nl> + virtual std : : unique_ptr < FileAllocationIterator > fileAllocationIterator ( ) ; <nl> <nl> / / Make sure that DiskWriter is set before calling this function . <nl> virtual void enableReadOnly ( ) ; <nl> mmm a / src / AdaptiveFileAllocationIterator . cc <nl> ppp b / src / AdaptiveFileAllocationIterator . cc <nl> <nl> # include " RecoverableException . h " <nl> # include " LogFactory . h " <nl> # include " Logger . h " <nl> + # include " a2functional . h " <nl> # ifdef HAVE_FALLOCATE <nl> # include " FallocFileAllocationIterator . h " <nl> # endif / / HAVE_FALLOCATE <nl> void AdaptiveFileAllocationIterator : : allocateChunk ( ) <nl> offset_ + = len ; <nl> } <nl> A2_LOG_DEBUG ( " File system supports fallocate . " ) ; <nl> - allocator_ . reset <nl> - ( new FallocFileAllocationIterator ( stream_ , offset_ , totalLength_ ) ) ; <nl> + allocator_ = make_unique < FallocFileAllocationIterator > <nl> + ( stream_ , offset_ , totalLength_ ) ; <nl> } catch ( RecoverableException & e ) { <nl> A2_LOG_DEBUG ( " File system does not support fallocate . " ) ; <nl> - std : : shared_ptr < SingleFileAllocationIterator > salloc <nl> - ( new SingleFileAllocationIterator ( stream_ , offset_ , totalLength_ ) ) ; <nl> + auto salloc = make_unique < SingleFileAllocationIterator > <nl> + ( stream_ , offset_ , totalLength_ ) ; <nl> salloc - > init ( ) ; <nl> - allocator_ = salloc ; <nl> + allocator_ = std : : move ( salloc ) ; <nl> } <nl> # else / / ! HAVE_FALLOCATE <nl> - std : : shared_ptr < SingleFileAllocationIterator > salloc <nl> - ( new SingleFileAllocationIterator ( stream_ , offset_ , totalLength_ ) ) ; <nl> + auto salloc = make_unique < SingleFileAllocationIterator > <nl> + ( stream_ , offset_ , totalLength_ ) ; <nl> salloc - > init ( ) ; <nl> - allocator_ = salloc ; <nl> + allocator_ = std : : move ( salloc ) ; <nl> # endif / / ! HAVE_FALLOCATE <nl> allocator_ - > allocateChunk ( ) ; <nl> } else { <nl> mmm a / src / AdaptiveFileAllocationIterator . h <nl> ppp b / src / AdaptiveFileAllocationIterator . h <nl> class BinaryStream ; <nl> class AdaptiveFileAllocationIterator : public FileAllocationIterator <nl> { <nl> private : <nl> - std : : shared_ptr < FileAllocationIterator > allocator_ ; <nl> + std : : unique_ptr < FileAllocationIterator > allocator_ ; <nl> <nl> BinaryStream * stream_ ; <nl> <nl> mmm a / src / DiskAdaptor . h <nl> ppp b / src / DiskAdaptor . h <nl> class DiskAdaptor : public BinaryStream { <nl> fileEntries_ . assign ( first , last ) ; <nl> } <nl> <nl> - const std : : vector < std : : shared_ptr < FileEntry > > & getFileEntries ( ) const <nl> + const std : : vector < std : : shared_ptr < FileEntry > > & getFileEntries ( ) const <nl> { <nl> return fileEntries_ ; <nl> } <nl> <nl> - virtual std : : shared_ptr < FileAllocationIterator > fileAllocationIterator ( ) = 0 ; <nl> + virtual std : : unique_ptr < FileAllocationIterator > fileAllocationIterator ( ) = 0 ; <nl> <nl> virtual void enableReadOnly ( ) { } <nl> <nl> mmm a / src / FileAllocationEntry . cc <nl> ppp b / src / FileAllocationEntry . cc <nl> <nl> namespace aria2 { <nl> <nl> FileAllocationEntry : : FileAllocationEntry ( RequestGroup * requestGroup , <nl> - std : : unique_ptr < Command > nextCommand ) : <nl> - RequestGroupEntry ( requestGroup , std : : move ( nextCommand ) ) , <nl> - fileAllocationIterator_ ( requestGroup - > getPieceStorage ( ) - > getDiskAdaptor ( ) - > fileAllocationIterator ( ) ) <nl> + std : : unique_ptr < Command > nextCommand ) <nl> + : RequestGroupEntry { requestGroup , std : : move ( nextCommand ) } , <nl> + fileAllocationIterator_ { requestGroup - > getPieceStorage ( ) - > getDiskAdaptor ( ) <nl> + - > fileAllocationIterator ( ) } <nl> { } <nl> <nl> FileAllocationEntry : : ~ FileAllocationEntry ( ) <nl> mmm a / src / FileAllocationEntry . h <nl> ppp b / src / FileAllocationEntry . h <nl> class DownloadEngine ; <nl> <nl> class FileAllocationEntry : public RequestGroupEntry , public ProgressAwareEntry { <nl> private : <nl> - std : : shared_ptr < FileAllocationIterator > fileAllocationIterator_ ; <nl> + std : : unique_ptr < FileAllocationIterator > fileAllocationIterator_ ; <nl> public : <nl> FileAllocationEntry ( RequestGroup * requestGroup , <nl> std : : unique_ptr < Command > nextCommand = <nl> mmm a / src / MultiDiskAdaptor . cc <nl> ppp b / src / MultiDiskAdaptor . cc <nl> int64_t MultiDiskAdaptor : : size ( ) <nl> return size ; <nl> } <nl> <nl> - std : : shared_ptr < FileAllocationIterator > <nl> + std : : unique_ptr < FileAllocationIterator > <nl> MultiDiskAdaptor : : fileAllocationIterator ( ) <nl> { <nl> - return std : : make_shared < MultiFileAllocationIterator > ( this ) ; <nl> + return make_unique < MultiFileAllocationIterator > ( this ) ; <nl> } <nl> <nl> void MultiDiskAdaptor : : enableReadOnly ( ) <nl> mmm a / src / MultiDiskAdaptor . h <nl> ppp b / src / MultiDiskAdaptor . h <nl> class MultiDiskAdaptor : public DiskAdaptor { <nl> <nl> virtual int64_t size ( ) ; <nl> <nl> - virtual std : : shared_ptr < FileAllocationIterator > fileAllocationIterator ( ) ; <nl> + virtual std : : unique_ptr < FileAllocationIterator > fileAllocationIterator ( ) ; <nl> <nl> virtual void enableReadOnly ( ) ; <nl> <nl> | Use std : : unique_ptr for FileAllocationIterator | aria2/aria2 | f8d305fe639a2a458106f3f233f696157c6ab06d | 2013-07-06T06:56:08Z |
mmm a / ios / sdk / WeexSDK / Sources / Module / WXStreamModule . m <nl> ppp b / ios / sdk / WeexSDK / Sources / Module / WXStreamModule . m <nl> + ( NSString * ) getStatusText : ( NSInteger ) code { <nl> default : <nl> break ; <nl> } <nl> + <nl> + return @ " Unknown " ; <nl> } <nl> <nl> @ end <nl> | * [ ios ] fix WXStreamModule comile error | apache/incubator-weex | 4dfb9a78fa98c46ba9867837762ab0acf6c421f4 | 2016-07-21T07:31:49Z |
mmm a / test / SourceKit / NameTranslation / basic . swift <nl> ppp b / test / SourceKit / NameTranslation / basic . swift <nl> func foo2 ( _ a : FooClassDerived ) { <nl> / / RUN : % sourcekitd - test - req = translate - objc - selector fooInstanceFunc21 : withBB : - pos = 15 : 13 % s - - - F % S / . . / Inputs / libIDE - mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECK8 % s <nl> / / RUN : % sourcekitd - test - req = translate - objc - name fooProperty11 - pos = 16 : 13 % s - - - F % S / . . / Inputs / libIDE - mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECK9 % s <nl> / / RUN : % sourcekitd - test - req = translate - objc - selector fooInstanceFunc21 : withBB : withC : - pos = 15 : 13 % s - - - F % S / . . / Inputs / libIDE - mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECK - NONE % s <nl> - / / RUN : % sourcekitd - test - req = translate - objc - selector fooInstanceFunc21 : - pos = 15 : 13 % s - - - F % S / . . / Inputs / libIDE - mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECK - NONE % s <nl> + / / RUN : % sourcekitd - test - req = translate - objc - selector fooInstanceFunc21 : - pos = 15 : 13 % s - - - F % S / . . / Inputs / libIDE - mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECKFEWER1 % s <nl> + / / RUN : % sourcekitd - test - req = translate - objc - selector fooInstanceFunc21 : : - pos = 15 : 13 % s - - - F % S / . . / Inputs / libIDE - mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECKMISSING1 % s <nl> + / / RUN : % sourcekitd - test - req = translate - objc - selector : withBB : - pos = 15 : 13 % s - - - F % S / . . / Inputs / libIDE - mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECKMISSING2 % s <nl> + / / RUN : % sourcekitd - test - req = translate - objc - selector : : - pos = 15 : 13 % s - - - F % S / . . / Inputs / libIDE - mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECKMISSING3 % s <nl> <nl> / / RUN : % sourcekitd - test - req = translate - objc - selector fooInstanceFunc21 : - pos = 17 : 13 % s - - - F % S / . . / Inputs / libIDE - mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECK10 % s <nl> / / RUN : % sourcekitd - test - req = translate - objc - selector initWithfloat2 : - pos = 17 : 13 % s - - - F % S / . . / Inputs / libIDE - mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECK12 % s <nl> func foo2 ( _ a : FooClassDerived ) { <nl> / / CHECK12 : init ( float2 : ) <nl> / / CHECK13 : init ( _ : ) <nl> / / CHECK14 : init <nl> + <nl> + / / CHECKFEWER1 : fooInstanceFunc21 ( _ : withB : ) <nl> + / / CHECKMISSING1 : fooInstanceFunc21 ( _ : withB : ) <nl> + / / CHECKMISSING2 : fooInstanceFunc2 ( _ : withBB : ) <nl> + / / CHECKMISSING3 : fooInstanceFunc2 ( _ : withB : ) <nl> mmm a / test / SourceKit / NameTranslation / swiftnames . swift <nl> ppp b / test / SourceKit / NameTranslation / swiftnames . swift <nl> class C2 { } <nl> <nl> / / REQUIRES : objc_interop <nl> / / RUN : % sourcekitd - test - req = translate - swift - name " foo ( a : b : c : ) " - pos = 11 : 11 % s - - - F % S / Inputs / mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECK1 % s <nl> + / / RUN : % sourcekitd - test - req = translate - swift - name " bar ( x : y : ) " - pos = 11 : 11 % s - - - F % S / Inputs / mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECKFEWER1 % s <nl> + / / RUN : % sourcekitd - test - req = translate - swift - name " bar ( : : ) " - pos = 11 : 11 % s - - - F % S / Inputs / mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECKMISSING1 % s <nl> + / / RUN : % sourcekitd - test - req = translate - swift - name " ( x : y : z : ) " - pos = 11 : 11 % s - - - F % S / Inputs / mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECKMISSING2 % s <nl> / / RUN : % sourcekitd - test - req = translate - swift - name " foo ( a1 : b1 : c1 : ) " - pos = 11 : 11 % s - - - F % S / Inputs / mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECK2 % s <nl> / / RUN : % sourcekitd - test - req = translate - swift - name " foo ( _ : b1 : c1 : ) " - pos = 11 : 11 % s - - - F % S / Inputs / mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECK3 % s <nl> / / RUN : % sourcekitd - test - req = translate - swift - name " foo1 ( _ : _ : c2 : ) " - pos = 11 : 11 % s - - - F % S / Inputs / mock - sdk - I % t . tmp % mcp_opt % s | % FileCheck - check - prefix = CHECK4 % s <nl> class C2 { } <nl> / / CHECK14 : CustomErrorA2 <nl> / / CHECK15 : C2ObjC <nl> / / CHECK16 : bar : other : <nl> + <nl> + / / CHECKFEWER1 : barWithX : y : c : <nl> + / / CHECKMISSING1 : barWithA : b : c : <nl> + / / CHECKMISSING2 : fooWithX : y : z : <nl> mmm a / tools / SourceKit / lib / SwiftLang / SwiftSourceDocInfo . cpp <nl> ppp b / tools / SourceKit / lib / SwiftLang / SwiftSourceDocInfo . cpp <nl> static bool passCursorInfoForDecl ( const ValueDecl * VD , <nl> } <nl> <nl> static clang : : DeclarationName <nl> - getClangDeclarationName ( clang : : ASTContext & Ctx , NameTranslatingInfo & Info ) { <nl> + getClangDeclarationName ( const clang : : NamedDecl * ND , NameTranslatingInfo & Info ) { <nl> + auto & Ctx = ND - > getASTContext ( ) ; <nl> + auto OrigName = ND - > getDeclName ( ) ; <nl> assert ( SwiftLangSupport : : getNameKindForUID ( Info . NameKind ) = = NameKind : : ObjC ) ; <nl> if ( Info . BaseName . empty ( ) = = Info . ArgNames . empty ( ) ) { <nl> / / cannot have both . <nl> getClangDeclarationName ( clang : : ASTContext & Ctx , NameTranslatingInfo & Info ) { <nl> if ( ! Info . BaseName . empty ( ) ) { <nl> return clang : : DeclarationName ( & Ctx . Idents . get ( Info . BaseName ) ) ; <nl> } else { <nl> + StringRef last = Info . ArgNames . back ( ) ; <nl> + <nl> + switch ( OrigName . getNameKind ( ) ) { <nl> + case clang : : DeclarationName : : ObjCZeroArgSelector : <nl> + if ( last . endswith ( " : " ) ) <nl> + return clang : : DeclarationName ( ) ; <nl> + break ; <nl> + case clang : : DeclarationName : : ObjCOneArgSelector : <nl> + case clang : : DeclarationName : : ObjCMultiArgSelector : <nl> + if ( ! last . empty ( ) & & ! last . endswith ( " : " ) ) <nl> + return clang : : DeclarationName ( ) ; <nl> + break ; <nl> + default : <nl> + return clang : : DeclarationName ( ) ; <nl> + } <nl> + <nl> + auto OrigSel = OrigName . getObjCSelector ( ) ; <nl> + unsigned NumPieces = OrigSel . isUnarySelector ( ) ? 1 : OrigSel . getNumArgs ( ) ; <nl> + if ( Info . ArgNames . size ( ) > NumPieces ) <nl> + return clang : : DeclarationName ( ) ; <nl> + <nl> ArrayRef < StringRef > Args = llvm : : makeArrayRef ( Info . ArgNames ) ; <nl> std : : vector < clang : : IdentifierInfo * > Pieces ; <nl> - std : : transform ( Args . begin ( ) , Args . end ( ) , std : : back_inserter ( Pieces ) , <nl> - [ & ] ( StringRef T ) { return & Ctx . Idents . get ( T . endswith ( " : " ) ? <nl> - T . drop_back ( ) : T ) ; } ) ; <nl> - return clang : : DeclarationName ( Ctx . Selectors . getSelector ( <nl> - / * Calculate Args * / std : : accumulate ( Args . begin ( ) , Args . end ( ) , ( unsigned ) 0 , <nl> - [ ] ( unsigned I , StringRef T ) { return I + ( T . endswith ( " : " ) ? 1 : 0 ) ; } ) , <nl> - Pieces . data ( ) ) ) ; <nl> + for ( unsigned i = 0 ; i < NumPieces ; + + i ) { <nl> + if ( i > = Info . ArgNames . size ( ) | | Info . ArgNames [ i ] . empty ( ) ) { <nl> + Pieces . push_back ( OrigSel . getIdentifierInfoForSlot ( i ) ) ; <nl> + } else { <nl> + StringRef T = Args [ i ] ; <nl> + Pieces . push_back ( & Ctx . Idents . get ( T . endswith ( " : " ) ? T . drop_back ( ) : T ) ) ; <nl> + } <nl> + } <nl> + return clang : : DeclarationName ( <nl> + Ctx . Selectors . getSelector ( OrigSel . getNumArgs ( ) , Pieces . data ( ) ) ) ; <nl> } <nl> } <nl> <nl> - static DeclName <nl> - getSwiftDeclName ( ASTContext & Ctx , NameTranslatingInfo & Info ) { <nl> + static DeclName getSwiftDeclName ( const ValueDecl * VD , <nl> + NameTranslatingInfo & Info ) { <nl> + auto & Ctx = VD - > getDeclContext ( ) - > getASTContext ( ) ; <nl> assert ( SwiftLangSupport : : getNameKindForUID ( Info . NameKind ) = = NameKind : : Swift ) ; <nl> - std : : vector < Identifier > Args ; <nl> - std : : transform ( Info . ArgNames . begin ( ) , Info . ArgNames . end ( ) , <nl> - std : : back_inserter ( Args ) , <nl> - [ & ] ( StringRef T ) { return Ctx . getIdentifier ( T ) ; } ) ; <nl> - return DeclName ( Ctx , Ctx . getIdentifier ( Info . BaseName ) , <nl> - llvm : : makeArrayRef ( Args ) ) ; <nl> + DeclName OrigName = VD - > getFullName ( ) ; <nl> + Identifier BaseName = Info . BaseName . empty ( ) <nl> + ? OrigName . getBaseName ( ) <nl> + : Ctx . getIdentifier ( Info . BaseName ) ; <nl> + auto OrigArgs = OrigName . getArgumentNames ( ) ; <nl> + SmallVector < Identifier , 8 > Args ( OrigArgs . begin ( ) , OrigArgs . end ( ) ) ; <nl> + if ( Info . ArgNames . size ( ) > OrigArgs . size ( ) ) <nl> + return DeclName ( ) ; <nl> + for ( unsigned i = 0 ; i < OrigArgs . size ( ) ; + + i ) { <nl> + if ( i < Info . ArgNames . size ( ) & & ! Info . ArgNames [ i ] . empty ( ) ) { <nl> + StringRef Arg = Info . ArgNames [ i ] ; <nl> + Args [ i ] = Ctx . getIdentifier ( Arg = = " _ " ? StringRef ( ) : Arg ) ; <nl> + } <nl> + } <nl> + return DeclName ( Ctx , BaseName , llvm : : makeArrayRef ( Args ) ) ; <nl> } <nl> <nl> / / / Returns true for failure to resolve . <nl> static bool passNameInfoForDecl ( const ValueDecl * VD , NameTranslatingInfo & Info , <nl> switch ( SwiftLangSupport : : getNameKindForUID ( Info . NameKind ) ) { <nl> case NameKind : : Swift : { <nl> NameTranslatingInfo Result ; <nl> - auto & Ctx = VD - > getDeclContext ( ) - > getASTContext ( ) ; <nl> - auto ResultPair = swift : : objc_translation : : getObjCNameForSwiftDecl ( VD , <nl> - getSwiftDeclName ( Ctx , Info ) ) ; <nl> + auto DeclName = getSwiftDeclName ( VD , Info ) ; <nl> + if ( ! DeclName ) <nl> + return true ; <nl> + auto ResultPair = <nl> + swift : : objc_translation : : getObjCNameForSwiftDecl ( VD , DeclName ) ; <nl> Identifier Name = ResultPair . first ; <nl> if ( ! Name . empty ( ) ) { <nl> Result . NameKind = SwiftLangSupport : : getUIDForNameKind ( NameKind : : ObjC ) ; <nl> static bool passNameInfoForDecl ( const ValueDecl * VD , NameTranslatingInfo & Info , <nl> getASTContext ( ) . getClangModuleLoader ( ) ) ; <nl> <nl> if ( auto * Named = dyn_cast_or_null < clang : : NamedDecl > ( VD - > getClangDecl ( ) ) ) { <nl> - DeclName Name = Importer - > importName ( Named , <nl> - getClangDeclarationName ( Named - > getASTContext ( ) , Info ) ) ; <nl> + auto ObjCName = getClangDeclarationName ( Named , Info ) ; <nl> + if ( ! ObjCName ) <nl> + return true ; <nl> + <nl> + DeclName Name = Importer - > importName ( Named , ObjCName ) ; <nl> NameTranslatingInfo Result ; <nl> Result . NameKind = SwiftLangSupport : : getUIDForNameKind ( NameKind : : Swift ) ; <nl> Result . BaseName = Name . getBaseName ( ) . str ( ) ; <nl> mmm a / tools / SourceKit / tools / sourcekitd - test / sourcekitd - test . cpp <nl> ppp b / tools / SourceKit / tools / sourcekitd - test / sourcekitd - test . cpp <nl> static int handleTestInvocation ( ArrayRef < const char * > Args , <nl> sourcekitd_request_dictionary_set_uid ( Req , KeyRequest , RequestNameTranslation ) ; <nl> sourcekitd_request_dictionary_set_int64 ( Req , KeyOffset , ByteOffset ) ; <nl> StringRef BaseName ; <nl> - llvm : : SmallVector < StringRef , 4 > ArgPices ; <nl> + llvm : : SmallVector < StringRef , 4 > ArgPieces ; <nl> sourcekitd_uid_t ArgName ; <nl> if ( ! Opts . SwiftName . empty ( ) ) { <nl> sourcekitd_request_dictionary_set_uid ( Req , KeyNameKind , KindNameSwift ) ; <nl> static int handleTestInvocation ( ArrayRef < const char * > Args , <nl> return 1 ; <nl> } <nl> StringRef AllArgs = Text . substr ( ArgStart + 1 , ArgEnd - ArgStart - 1 ) ; <nl> - AllArgs . split ( ArgPices , ' : ' ) ; <nl> + AllArgs . split ( ArgPieces , ' : ' ) ; <nl> if ( ! Args . empty ( ) ) { <nl> - if ( ! ArgPices . back ( ) . empty ( ) ) { <nl> + if ( ! ArgPieces . back ( ) . empty ( ) ) { <nl> llvm : : errs ( ) < < " Swift name is malformed . \ n " ; <nl> return 1 ; <nl> } <nl> - ArgPices . pop_back ( ) ; <nl> + ArgPieces . pop_back ( ) ; <nl> } <nl> } <nl> } else if ( ! Opts . ObjCName . empty ( ) ) { <nl> static int handleTestInvocation ( ArrayRef < const char * > Args , <nl> } else if ( ! Opts . ObjCSelector . empty ( ) ) { <nl> sourcekitd_request_dictionary_set_uid ( Req , KeyNameKind , KindNameObjc ) ; <nl> StringRef Name ( Opts . ObjCSelector ) ; <nl> - Name . split ( ArgPices , ' : ' , - 1 , / * keep empty * / false ) ; <nl> + Name . split ( ArgPieces , ' : ' ) ; <nl> + if ( ArgPieces . back ( ) . empty ( ) ) <nl> + ArgPieces . pop_back ( ) ; <nl> ArgName = KeySelectorPieces ; <nl> - std : : transform ( ArgPices . begin ( ) , ArgPices . end ( ) , ArgPices . begin ( ) , <nl> + std : : transform ( ArgPieces . begin ( ) , ArgPieces . end ( ) , ArgPieces . begin ( ) , <nl> [ Name ] ( StringRef T ) { <nl> - if ( T . data ( ) + T . size ( ) < Name . data ( ) + Name . size ( ) & & <nl> + if ( ! T . empty ( ) & & T . data ( ) + T . size ( ) < Name . data ( ) + Name . size ( ) & & <nl> * ( T . data ( ) + T . size ( ) ) = = ' : ' ) { <nl> / / Include the colon belonging to the piece . <nl> return StringRef ( T . data ( ) , T . size ( ) + 1 ) ; <nl> static int handleTestInvocation ( ArrayRef < const char * > Args , <nl> std : : string S = BaseName ; <nl> sourcekitd_request_dictionary_set_string ( Req , KeyBaseName , S . c_str ( ) ) ; <nl> } <nl> - if ( ! ArgPices . empty ( ) ) { <nl> + if ( ! ArgPieces . empty ( ) ) { <nl> sourcekitd_object_t Arr = sourcekitd_request_array_create ( nullptr , 0 ) ; <nl> - for ( StringRef A : ArgPices ) { <nl> + for ( StringRef A : ArgPieces ) { <nl> std : : string S = A ; <nl> sourcekitd_request_array_set_string ( Arr , SOURCEKITD_ARRAY_APPEND , <nl> S . c_str ( ) ) ; <nl> mmm a / tools / SourceKit / tools / sourcekitd / lib / API / Requests . cpp <nl> ppp b / tools / SourceKit / tools / sourcekitd / lib / API / Requests . cpp <nl> handleSemanticRequest ( RequestDict Req , <nl> } <nl> std : : transform ( ArgParts . begin ( ) , ArgParts . end ( ) , <nl> std : : back_inserter ( Input . ArgNames ) , <nl> - [ ] ( const char * C ) { <nl> - StringRef Original ( C ) ; <nl> - return Original = = " _ " ? StringRef ( ) : Original ; <nl> - } ) ; <nl> + [ ] ( const char * C ) { return StringRef ( C ) ; } ) ; <nl> std : : transform ( Selectors . begin ( ) , Selectors . end ( ) , <nl> std : : back_inserter ( Input . ArgNames ) , <nl> [ ] ( const char * C ) { return StringRef ( C ) ; } ) ; <nl> | [ sourcekitd ] Allow mising name pieces preferred names | apple/swift | 7e5dd1fa01d24490a3490d4f909c2517f59ce9bb | 2017-04-25T22:25:53Z |
mmm a / tensorflow / lite / experimental / ruy / BUILD <nl> ppp b / tensorflow / lite / experimental / ruy / BUILD <nl> cc_library ( <nl> cc_library ( <nl> name = " kernel " , <nl> srcs = [ <nl> - " kernel . cc " , <nl> + " kernel_arm32 . cc " , <nl> + " kernel_arm64 . cc " , <nl> ] , <nl> hdrs = [ <nl> " kernel . h " , <nl> mmm a / tensorflow / lite / experimental / ruy / common . h <nl> ppp b / tensorflow / lite / experimental / ruy / common . h <nl> limitations under the License . <nl> # include " tensorflow / lite / experimental / ruy / opt_set . h " <nl> # include " tensorflow / lite / experimental / ruy / path . h " <nl> <nl> - # ifdef __aarch64__ <nl> + # if ( ( defined RUY_NEON_64 ) | | ( defined RUY_NEON_32 ) ) <nl> # include < arm_neon . h > <nl> # endif <nl> <nl> mmm a / tensorflow / lite / experimental / ruy / kernel . h <nl> ppp b / tensorflow / lite / experimental / ruy / kernel . h <nl> struct Kernel < Path : : kStandardCpp , LhsScalar , RhsScalar , DstScalar , Spec > { <nl> RUY_INHERIT_KERNEL ( Path : : kStandardCpp , Path : : kNeon ) <nl> RUY_INHERIT_KERNEL ( Path : : kNeon , Path : : kNeonDotprod ) <nl> <nl> - # if ( defined __aarch64__ ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> + / / KernelParams are shared across 32 - bit and 64 - bit NEON code . <nl> + # if ( ( defined RUY_NEON_64 ) | | ( defined RUY_NEON_32 ) ) & & \ <nl> + ( RUY_OPT_ENABLED ( RUY_OPT_ASM ) ) <nl> <nl> # define RUY_ASM_FLAG_HAS_BIAS 0x1 <nl> # define RUY_ASM_FLAG_HAS_LHS_SUMS 0x2 <nl> void Kernel8bitNeonInOrder ( const KernelParams8bit < 4 , 4 > & params ) ; <nl> void Kernel8bitNeonDotprodOutOfOrder ( const KernelParams8bit < 8 , 8 > & params ) ; <nl> void Kernel8bitNeonDotprodInOrder ( const KernelParams8bit < 8 , 8 > & params ) ; <nl> <nl> + # ifdef RUY_NEON_64 <nl> template < typename DstScalar > <nl> struct Kernel < Path : : kNeon , std : : int8_t , std : : int8_t , DstScalar , <nl> BasicSpec < std : : int32_t , DstScalar > > { <nl> struct Kernel < Path : : kNeonDotprod , std : : int8_t , std : : int8_t , DstScalar , <nl> } <nl> } <nl> } ; <nl> + # endif <nl> <nl> template < int LhsCols , int RhsCols > <nl> struct KernelParamsFloat { <nl> inline void MakeKernelParamsFloat ( const PackedMatrix < float > & lhs , <nl> <nl> void KernelFloatNeonOutOfOrder ( const KernelParamsFloat < 8 , 8 > & params ) ; <nl> void KernelFloatNeonInOrder ( const KernelParamsFloat < 8 , 8 > & params ) ; <nl> + void KernelFloat32NeonOutOfOrder ( const KernelParamsFloat < 8 , 4 > & params ) ; <nl> void KernelFloatNeonDotprodInOrder ( const KernelParamsFloat < 8 , 8 > & params ) ; <nl> <nl> + # ifdef RUY_NEON_64 <nl> + / / A Float kernel for ARM64 Neon . <nl> template < > <nl> struct Kernel < Path : : kNeon , float , float , float , BasicSpec < float , float > > { <nl> Tuning tuning = Tuning : : kAuto ; <nl> struct Kernel < Path : : kNeon , float , float , float , BasicSpec < float , float > > { <nl> } <nl> } <nl> } ; <nl> + # endif <nl> + <nl> + # ifdef RUY_NEON_32 <nl> + / / A Float kernel for ARM32 Neon . <nl> + template < > <nl> + struct Kernel < Path : : kNeon , float , float , float , BasicSpec < float , float > > { <nl> + Tuning tuning = Tuning : : kAuto ; <nl> + using LhsLayout = FixedKernelLayout < Order : : kRowMajor , 1 , 8 > ; <nl> + using RhsLayout = FixedKernelLayout < Order : : kRowMajor , 1 , 4 > ; <nl> + explicit Kernel ( Tuning tuning_ ) : tuning ( tuning_ ) { } <nl> + void Run ( const PackedMatrix < float > & lhs , const PackedMatrix < float > & rhs , <nl> + const BasicSpec < float , float > & spec , int start_row , int start_col , <nl> + int end_row , int end_col , Matrix < float > * dst ) const { <nl> + KernelParamsFloat < 8 , 4 > params ; <nl> + <nl> + MakeKernelParamsFloat ( lhs , rhs , spec , start_row , start_col , end_row , <nl> + end_col , dst , & params ) ; <nl> + <nl> + KernelFloat32NeonOutOfOrder ( params ) ; <nl> + } <nl> + } ; <nl> + # endif <nl> <nl> / / While the dotprod NEON extension does not concern floating - point arithmetic , <nl> / / its presence allows us to distinguish , in the in - order tuning case , between <nl> / / A53 and A55r1 . TODO : should this be folded into tuning ? <nl> template < > <nl> - struct Kernel < Path : : kNeonDotprod , float , float , float , BasicSpec < float , float > > <nl> - : Kernel < Path : : kNeon , float , float , float , BasicSpec < float , float > > { <nl> + struct Kernel < Path : : kNeonDotprod , float , float , float , <nl> + BasicSpec < float , float > > { <nl> + Tuning tuning = Tuning : : kAuto ; <nl> + using LhsLayout = FixedKernelLayout < Order : : kRowMajor , 1 , 8 > ; <nl> + using RhsLayout = FixedKernelLayout < Order : : kRowMajor , 1 , 8 > ; <nl> using Base = <nl> Kernel < Path : : kNeon , float , float , float , BasicSpec < float , float > > ; <nl> - explicit Kernel ( Tuning tuning_ ) : Base ( tuning_ ) { } <nl> + explicit Kernel ( Tuning tuning_ ) : tuning ( tuning_ ) { } <nl> void Run ( const PackedMatrix < float > & lhs , const PackedMatrix < float > & rhs , <nl> const BasicSpec < float , float > & spec , int start_row , int start_col , <nl> int end_row , int end_col , Matrix < float > * dst ) const { <nl> struct Kernel < Path : : kNeonDotprod , float , float , float , BasicSpec < float , float > > <nl> } <nl> } ; <nl> <nl> - # endif / / ( defined __aarch64__ ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> - <nl> + # endif / / ( ( defined RUY_NEON_64 ) | | ( defined RUY_NEON_32 ) ) & & <nl> + / / ( RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> } / / namespace ruy <nl> <nl> # endif / / TENSORFLOW_LITE_EXPERIMENTAL_RUY_KERNEL_H_ <nl> new file mode 100644 <nl> index 0000000000000 . . 8959beda0dc72 <nl> mmm / dev / null <nl> ppp b / tensorflow / lite / experimental / ruy / kernel_arm32 . cc <nl> <nl> + / * Copyright 2019 Google LLC . All Rights Reserved . <nl> + <nl> + Licensed under the Apache License , Version 2 . 0 ( the " License " ) ; <nl> + you may not use this file except in compliance with the License . <nl> + You may obtain a copy of the License at <nl> + <nl> + http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> + <nl> + Unless required by applicable law or agreed to in writing , software <nl> + distributed under the License is distributed on an " AS IS " BASIS , <nl> + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> + See the License for the specific language governing permissions and <nl> + limitations under the License . <nl> + = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * / <nl> + <nl> + # include " profiling / instrumentation . h " <nl> + # include " tensorflow / lite / experimental / ruy / kernel . h " <nl> + <nl> + namespace ruy { <nl> + <nl> + # if ( defined RUY_NEON_32 ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> + <nl> + # define RUY_ASM_LABEL_STORE_UINT8 91 <nl> + # define RUY_ASM_LABEL_STORE_INT8 92 <nl> + # define RUY_ASM_LABEL_STORE_INT16 93 <nl> + # define RUY_ASM_LABEL_STORE_INT32 94 <nl> + # define RUY_ASM_LABEL_AFTER_STORE 99 <nl> + <nl> + # define RUY_OFFSET_LHS_BASE_PTR 0 <nl> + # define RUY_OFFSET_RHS_BASE_PTR 4 <nl> + # define RUY_OFFSET_DST_BASE_PTR 8 <nl> + # define RUY_OFFSET_BIAS 12 <nl> + # define RUY_OFFSET_START_ROW 16 <nl> + # define RUY_OFFSET_START_COL 20 <nl> + # define RUY_OFFSET_LAST_ROW 24 <nl> + # define RUY_OFFSET_LAST_COL 28 <nl> + # define RUY_OFFSET_DST_ROWS 32 <nl> + # define RUY_OFFSET_DST_COLS 36 <nl> + # define RUY_OFFSET_LHS_STRIDE 40 <nl> + # define RUY_OFFSET_RHS_STRIDE 44 <nl> + # define RUY_OFFSET_DST_STRIDE 48 <nl> + # define RUY_OFFSET_DEPTH 52 <nl> + # define RUY_OFFSET_CLAMP_MIN 56 <nl> + # define RUY_OFFSET_CLAMP_MAX 60 <nl> + # define RUY_OFFSET_FLAGS 64 <nl> + <nl> + # define RUY_STACK_OFFSET_SIZE 96 <nl> + # define RUY_STACK_OFFSET_DST_COL_PTR 0 <nl> + # define RUY_STACK_OFFSET_DST_PTR 16 <nl> + # define RUY_STACK_OFFSET_ROW 32 <nl> + # define RUY_STACK_OFFSET_COL 48 <nl> + # define RUY_STACK_OFFSET_LHS_COL_PTR 64 <nl> + # define RUY_STACK_OFFSET_RHS_COL_PTR 80 <nl> + <nl> + template < typename Params > <nl> + void CheckOffsetsInKernelParamsFloat32 ( const Params & ) { <nl> + static_assert ( offsetof ( Params , lhs_base_ptr ) = = RUY_OFFSET_LHS_BASE_PTR , " " ) ; <nl> + static_assert ( offsetof ( Params , rhs_base_ptr ) = = RUY_OFFSET_RHS_BASE_PTR , " " ) ; <nl> + static_assert ( offsetof ( Params , dst_base_ptr ) = = RUY_OFFSET_DST_BASE_PTR , " " ) ; <nl> + static_assert ( offsetof ( Params , bias ) = = RUY_OFFSET_BIAS , " " ) ; <nl> + static_assert ( offsetof ( Params , start_row ) = = RUY_OFFSET_START_ROW , " " ) ; <nl> + static_assert ( offsetof ( Params , start_col ) = = RUY_OFFSET_START_COL , " " ) ; <nl> + static_assert ( offsetof ( Params , last_row ) = = RUY_OFFSET_LAST_ROW , " " ) ; <nl> + static_assert ( offsetof ( Params , last_col ) = = RUY_OFFSET_LAST_COL , " " ) ; <nl> + static_assert ( offsetof ( Params , dst_rows ) = = RUY_OFFSET_DST_ROWS , " " ) ; <nl> + static_assert ( offsetof ( Params , lhs_stride ) = = RUY_OFFSET_LHS_STRIDE , " " ) ; <nl> + static_assert ( offsetof ( Params , rhs_stride ) = = RUY_OFFSET_RHS_STRIDE , " " ) ; <nl> + static_assert ( offsetof ( Params , dst_stride ) = = RUY_OFFSET_DST_STRIDE , " " ) ; <nl> + static_assert ( offsetof ( Params , depth ) = = RUY_OFFSET_DEPTH , " " ) ; <nl> + static_assert ( offsetof ( Params , clamp_min ) = = RUY_OFFSET_CLAMP_MIN , " " ) ; <nl> + static_assert ( offsetof ( Params , clamp_max ) = = RUY_OFFSET_CLAMP_MAX , " " ) ; <nl> + static_assert ( offsetof ( Params , flags ) = = RUY_OFFSET_FLAGS , " " ) ; <nl> + } <nl> + <nl> + / / Float kernel for ARM32 out - of - order cores . <nl> + / / Just like Float 64 version , except accumulate in to 8x4 block to only <nl> + / / use 16 128 - bit NEON registers . This is a " first pass " kernel and not <nl> + / / tuned . It is meant to run on out - of - order CPUs like the Krait 400 or A9 . <nl> + void KernelFloat32NeonOutOfOrder ( const KernelParamsFloat < 8 , 4 > & params ) { <nl> + CheckOffsetsInKernelParamsFloat32 ( params ) ; <nl> + gemmlowp : : ScopedProfilingLabel label ( <nl> + " Kernel ( kNeon , optimized for out - of - order cores ) " ) ; <nl> + <nl> + const float * lhs_ptr = params . lhs_base_ptr ; <nl> + const float * rhs_ptr = params . rhs_base_ptr ; <nl> + / / In ARM32 NEON , there are 16 128 - bit " q " registers . These registers are <nl> + / / each composed of two 64 - bit " d " registers . The asm kernel below has the <nl> + / / following NEON register allocation : <nl> + / / Registers q3 - - q10 are accumulators . During accumulation , <nl> + / / q0 - - q2 ( d0 - - d5 ) are used to load data from LHS and RHS . q0 and q1 <nl> + / / are used to load a 8x1 block of LHS , and q2 is used to load a 1x4 block <nl> + / / of RHS , like this : <nl> + <nl> + / / Register layout in " q " registers : <nl> + / / RHS 1x4 block <nl> + / / / mmmmmmmmmmmmmmmmmmmmmmmm - - \ <nl> + / / | q2 . s [ 0 ] . . . q2 . s [ 3 ] | <nl> + / / \ mmmmmmmmmmmmmmmmmmmmmmmm - - / <nl> + / / LHS 8x1 block <nl> + / / / mmmmmmmmmmmmmmmmmmmmm \ / mmmmmmmmmmmmmmmmmmmmm \ <nl> + / / | q0 . s [ 0 ] | | q3 . s [ 0 ] . . . q9 . s [ 0 ] | <nl> + / / | . . . | | . . . . . . | <nl> + / / | q0 . s [ 3 ] | | q3 . s [ 3 ] q9 . s [ 3 ] | <nl> + / / | q1 . s [ 0 ] | | q4 . s [ 0 ] q10 . s [ 0 ] | <nl> + / / | . . . | | . . . . . . . . . | <nl> + / / | q1 . s [ 3 ] | | q4 . s [ 3 ] . . q10 . s [ 3 ] | <nl> + / / \ mmmmmmmmmmmmmmmmmmmmm / \ mmmmmmmmmmmmmmmmmmmmmmmm - - / <nl> + / / accumulators 8x4 block <nl> + / / q11 , q14 , q15 currently unused . q12 and q13 are used to load <nl> + / / parameters used for the post - accumulation part of the kernel . <nl> + / / For completeness , here is the register layout in " d " registers : <nl> + / / RHS 1x4 block <nl> + / / / mmmmmmmmmmmmmmmmmmmmmmmm - - \ <nl> + / / | d4 [ 0 ] . . . d5 [ 1 ] | <nl> + / / \ mmmmmmmmmmmmmmmmmmmmmmmm - - / <nl> + / / LHS 8x1 block <nl> + / / / mmmmmmmmmmmmmmmmmmmmm \ / mmmmmmmmmmmmmmmmmmmmmmmm - - \ <nl> + / / | d0 [ 0 ] | | d6 [ 0 ] . . . d18 [ 0 ] | <nl> + / / | . . . | | . . . . . . | <nl> + / / | d1 [ 1 ] | | d7 [ 1 ] d19 [ 1 ] | <nl> + / / | d2 [ 0 ] | | d8 [ 0 ] d20 [ 0 ] | <nl> + / / | . . . | | . . . . . . . . . | <nl> + / / | d3 [ 1 ] | | d9 [ 1 ] . . . d21 [ 1 ] | <nl> + / / \ mmmmmmmmmmmmmmmmmmmmm / \ mmmmmmmmmmmmmmmmmmmmmmmm - - / <nl> + / / accumulators 8x4 block <nl> + asm volatile ( <nl> + # define RUY_MAKE_ZERO ( reg ) " mov r0 , 0 \ n vdup . 32 " # reg " , r0 \ n " <nl> + <nl> + / / clang - format off <nl> + <nl> + / / Load the first 32 bytes of LHS and RHS data . <nl> + / / Load q0 <nl> + " vld1 . 32 { d0 } , [ % [ lhs_ptr ] ] ! \ n " <nl> + " vld1 . 32 { d1 } , [ % [ lhs_ptr ] ] ! \ n " <nl> + / / Load q1 <nl> + " vld1 . 32 { d2 } , [ % [ lhs_ptr ] ] ! \ n " <nl> + " vld1 . 32 { d3 } , [ % [ lhs_ptr ] ] ! \ n " <nl> + / / Load q2 <nl> + " vld1 . 32 { d4 } , [ % [ rhs_ptr ] ] ! \ n " <nl> + " vld1 . 32 { d5 } , [ % [ rhs_ptr ] ] ! \ n " <nl> + <nl> + " sub sp , sp , # " RUY_STR ( RUY_STACK_OFFSET_SIZE ) " \ n " <nl> + <nl> + " ldr r1 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_DST_BASE_PTR ) " ] \ n " <nl> + " str r1 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_DST_COL_PTR ) " ] \ n " <nl> + <nl> + " ldr r2 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_DST_BASE_PTR ) " ] \ n " <nl> + " str r2 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_DST_PTR ) " ] \ n " <nl> + <nl> + " ldr r1 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_START_ROW ) " ] \ n " <nl> + " str r1 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_ROW ) " ] \ n " <nl> + <nl> + " ldr r3 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_START_COL ) " ] \ n " <nl> + " str r3 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_COL ) " ] \ n " <nl> + <nl> + " ldr r1 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_LHS_BASE_PTR ) " ] \ n " <nl> + " str r1 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_LHS_COL_PTR ) " ] \ n " <nl> + <nl> + " ldr r2 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_RHS_BASE_PTR ) " ] \ n " <nl> + " str r2 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_RHS_COL_PTR ) " ] \ n " <nl> + / / Clear accumulators . <nl> + RUY_MAKE_ZERO ( q3 ) <nl> + RUY_MAKE_ZERO ( q4 ) <nl> + RUY_MAKE_ZERO ( q5 ) <nl> + RUY_MAKE_ZERO ( q6 ) <nl> + RUY_MAKE_ZERO ( q7 ) <nl> + RUY_MAKE_ZERO ( q8 ) <nl> + RUY_MAKE_ZERO ( q9 ) <nl> + RUY_MAKE_ZERO ( q10 ) <nl> + <nl> + / / r1 is the number of levels of depth that we have already loaded <nl> + / / LHS and RHS data for . Corresponding to the initial ld1 instructions <nl> + / / above , this is currently 1 . <nl> + " mov r1 , # 1 \ n " <nl> + <nl> + / / Main loop of the whole GEMM , over rows and columns of the <nl> + / / destination matrix . <nl> + " 1 : \ n " <nl> + <nl> + / / Accumulation loop <nl> + " ldr r2 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_DEPTH ) " ] \ n " <nl> + " cmp r1 , r2 \ n " <nl> + " beq 79f \ n " <nl> + <nl> + " 2 : \ n " <nl> + <nl> + " vmla . f32 q3 , q0 , d4 [ 0 ] \ n " <nl> + " vmla . f32 q5 , q0 , d4 [ 1 ] \ n " <nl> + " vmla . f32 q7 , q0 , d5 [ 0 ] \ n " <nl> + " vmla . f32 q9 , q0 , d5 [ 1 ] \ n " <nl> + " vld1 . 32 { d0 } , [ % [ lhs_ptr ] ] ! \ n " / / Reload LHS 1 into r0 <nl> + " vld1 . 32 { d1 } , [ % [ lhs_ptr ] ] ! \ n " / / Reload LHS 1 into r0 <nl> + <nl> + " vmla . f32 q4 , q1 , d4 [ 0 ] \ n " <nl> + " vmla . f32 q6 , q1 , d4 [ 1 ] \ n " <nl> + " vmla . f32 q8 , q1 , d5 [ 0 ] \ n " <nl> + " vmla . f32 q10 , q1 , d5 [ 1 ] \ n " <nl> + " vld1 . 32 { d2 } , [ % [ lhs_ptr ] ] ! \ n " / / Reload LHS 2 into r1 <nl> + " vld1 . 32 { d3 } , [ % [ lhs_ptr ] ] ! \ n " / / Reload LHS 2 into r1 <nl> + " vld1 . 32 { d4 } , [ % [ rhs_ptr ] ] ! \ n " / / Reload RHS into r2 <nl> + " vld1 . 32 { d5 } , [ % [ rhs_ptr ] ] ! \ n " / / Reload RHS into r2 <nl> + <nl> + " add r1 , r1 , # 1 \ n " <nl> + " cmp r1 , r2 \ n " <nl> + <nl> + " blt 2b \ n " <nl> + <nl> + " 79 : \ n " <nl> + <nl> + / / End of the inner loop on depth . Now perform the remaining <nl> + / / multiply - adds of the last level of depth , for which the LHS <nl> + / / and RHS data is already loaded . <nl> + <nl> + " vmla . f32 q3 , q0 , d4 [ 0 ] \ n " <nl> + " vmla . f32 q5 , q0 , d4 [ 1 ] \ n " <nl> + " vmla . f32 q7 , q0 , d5 [ 0 ] \ n " <nl> + " vmla . f32 q9 , q0 , d5 [ 1 ] \ n " <nl> + <nl> + " vmla . f32 q4 , q1 , d4 [ 0 ] \ n " <nl> + " vmla . f32 q6 , q1 , d4 [ 1 ] \ n " <nl> + " vmla . f32 q8 , q1 , d5 [ 0 ] \ n " <nl> + " vmla . f32 q10 , q1 , d5 [ 1 ] \ n " <nl> + <nl> + / / End of accumulation . The registers q3 - - q10 contain the final <nl> + / / float32 accumulator values of the current 8x8 destination block . <nl> + / / We now have to compute the final values from these accumulators <nl> + / / and advance to the next 8x8 block . We intertwine <nl> + / / these two aspects whenever possible for optimal pipelining , both <nl> + / / at the data flow level ( prefetch data for next block as early as <nl> + / / possible ) and instruction pipelining level ( some of the next - block <nl> + / / work can dual - issue with some of the final work on the current <nl> + / / block ) . <nl> + <nl> + / / Logic to advance to the next block in preparation for the next <nl> + / / iteration of the main loop . For now , we only want to compute <nl> + / / the LHS and RHS data pointers , lhs_col_ptr and rhs_col_ptr . We are <nl> + / / not yet ready to update the values of row and col , as we still need <nl> + / / the current values for the rest of the work on the current block . <nl> + <nl> + " ldr r3 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_LAST_ROW ) " ] \ n " <nl> + " ldr r1 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_ROW ) " ] \ n " <nl> + " cmp r1 , r3 \ n " / / Have we finished the last row ? <nl> + <nl> + " bge 4f \ n " / / If finished last row , go to 4 <nl> + / / Not finished last row : then advance to next row . <nl> + " ldr r1 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_LHS_STRIDE ) " ] \ n " <nl> + " ldr r4 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_LHS_COL_PTR ) " ] \ n " <nl> + " add r4 , r4 , r1 , lsl # 3 \ n " <nl> + " str r4 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_LHS_COL_PTR ) " ] \ n " <nl> + " b 5f \ n " <nl> + " 4 : \ n " / / Finished last row . . . <nl> + " ldr r5 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_LHS_BASE_PTR ) " ] \ n " <nl> + / / Go back to first row <nl> + " str r5 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_LHS_COL_PTR ) " ] \ n " <nl> + / / Now we need to advance to the next column . If we already <nl> + / / finished the last column , then in principle we are done , however <nl> + / / we can ' t just return here , as we need to allow the end work of the <nl> + / / current block to complete . The good news is that at this point it <nl> + / / doesn ' t matter what data we load for the next column , since <nl> + / / we will exit from the main loop below before actually storing <nl> + / / anything computed from that data . <nl> + " ldr r4 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_LAST_COL ) " ] \ n " <nl> + " ldr r8 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_COL ) " ] \ n " <nl> + " cmp r8 , r4 \ n " / / Have we finished the last column ? <nl> + " bge 5f \ n " / / If yes , just carry on without updating the column pointer . <nl> + / / Not finished last column : then advance to next column . <nl> + " ldr r1 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_RHS_STRIDE ) " ] \ n " <nl> + " ldr r7 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_RHS_COL_PTR ) " ] \ n " <nl> + " add r7 , r7 , r1 , lsl # 2 \ n " <nl> + " str r7 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_RHS_COL_PTR ) " ] \ n " <nl> + " 5 : \ n " <nl> + <nl> + / / Set the LHS and RHS data pointers to the start of the columns just <nl> + / / computed . <nl> + " ldr r4 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_LHS_COL_PTR ) " ] \ n " <nl> + " mov % [ lhs_ptr ] , r4 \ n " <nl> + " ldr r5 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_RHS_COL_PTR ) " ] \ n " <nl> + " mov % [ rhs_ptr ] , r5 \ n " <nl> + <nl> + / / Load some parameters needed for the end work on current block . <nl> + " ldrb r4 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_FLAGS ) " ] \ n " <nl> + " ldr r1 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_BIAS ) " ] \ n " <nl> + <nl> + / / Offset these base pointers as needed given the current row , col . <nl> + " ldr r8 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_ROW ) " ] \ n " <nl> + " add r5 , r1 , r8 , lsl # 2 \ n " <nl> + <nl> + " tst r4 , # " RUY_STR ( RUY_ASM_FLAG_HAS_BIAS ) " \ n " <nl> + " it ne \ n " <nl> + " movne r1 , r5 \ n " <nl> + <nl> + / / Load 8 bias values . <nl> + " vld1 . 32 { d24 } , [ r1 ] ! \ n " <nl> + " vld1 . 32 { d25 } , [ r1 ] ! \ n " <nl> + " vld1 . 32 { d26 } , [ r1 ] ! \ n " <nl> + " vld1 . 32 { d27 } , [ r1 ] \ n " <nl> + <nl> + / / Now that we know what LHS and RHS data the next iteration of the <nl> + / / main loop will need to load , we start loading the first 32 bytes of <nl> + / / each of LHS and RHS , into q0 - - q2 , as we don ' t need q0 - - q2 anymore <nl> + / / in the rest of the work on the current block . <nl> + / / Load q0 <nl> + " vld1 . 32 { d0 } , [ % [ lhs_ptr ] ] ! \ n " <nl> + " vld1 . 32 { d1 } , [ % [ lhs_ptr ] ] ! \ n " <nl> + / / Load q1 <nl> + " vld1 . 32 { d2 } , [ % [ lhs_ptr ] ] ! \ n " <nl> + " vld1 . 32 { d3 } , [ % [ lhs_ptr ] ] ! \ n " <nl> + / / Load q2 <nl> + " vld1 . 32 { d4 } , [ % [ rhs_ptr ] ] ! \ n " <nl> + " vld1 . 32 { d5 } , [ % [ rhs_ptr ] ] ! \ n " <nl> + <nl> + <nl> + / / Perform the bias - addition ( per the above , we have just folded into <nl> + / / the bias the ( depth * lhs_zero_point * rhs_zero_point ) term . ) <nl> + " vadd . f32 q3 , q3 , q12 \ n " <nl> + " vadd . f32 q4 , q4 , q13 \ n " <nl> + " vadd . f32 q5 , q5 , q12 \ n " <nl> + " vadd . f32 q6 , q6 , q13 \ n " <nl> + " vadd . f32 q7 , q7 , q12 \ n " <nl> + " vadd . f32 q8 , q8 , q13 \ n " <nl> + " vadd . f32 q9 , q9 , q12 \ n " <nl> + " vadd . f32 q10 , q10 , q13 \ n " <nl> + <nl> + / / Load the clamp_min , clamp_max bounds <nl> + " ldr r2 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_CLAMP_MIN ) " ] \ n " <nl> + " ldr r3 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_CLAMP_MAX ) " ] \ n " <nl> + " vdup . 32 q12 , r2 \ n " / / clamp_min <nl> + " vdup . 32 q13 , r3 \ n " / / clamp_max <nl> + <nl> + / / Apply the clamp_min bound <nl> + " vmax . f32 q3 , q3 , q12 \ n " <nl> + " vmax . f32 q4 , q4 , q12 \ n " <nl> + " vmax . f32 q5 , q5 , q12 \ n " <nl> + " vmax . f32 q6 , q6 , q12 \ n " <nl> + " vmax . f32 q7 , q7 , q12 \ n " <nl> + " vmax . f32 q8 , q8 , q12 \ n " <nl> + " vmax . f32 q9 , q9 , q12 \ n " <nl> + " vmax . f32 q10 , q10 , q12 \ n " <nl> + <nl> + / / Apply the clamp_max bound <nl> + " vmin . f32 q3 , q3 , q13 \ n " <nl> + " vmin . f32 q4 , q4 , q13 \ n " <nl> + " vmin . f32 q5 , q5 , q13 \ n " <nl> + " vmin . f32 q6 , q6 , q13 \ n " <nl> + " vmin . f32 q7 , q7 , q13 \ n " <nl> + " vmin . f32 q8 , q8 , q13 \ n " <nl> + " vmin . f32 q9 , q9 , q13 \ n " <nl> + " vmin . f32 q10 , q10 , q13 \ n " <nl> + <nl> + / / Compute how much of the 8x4 block of destination values that <nl> + / / we have computed , fit in the destination matrix . Typically , all of <nl> + / / it fits , but when the destination matrix shape is not a multiple <nl> + / / of 8x4 , there are some 8x8 blocks along the boundaries that do <nl> + / / not fit entirely . <nl> + " ldr r1 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_DST_ROWS ) " ] \ n " <nl> + " ldr r8 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_ROW ) " ] \ n " <nl> + " sub r1 , r1 , r8 \ n " <nl> + <nl> + " ldr r2 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_DST_COLS ) " ] \ n " <nl> + " ldr r4 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_COL ) " ] \ n " <nl> + " sub r2 , r2 , r4 \ n " <nl> + " mov r3 , # 8 \ n " <nl> + " mov r5 , # 4 \ n " <nl> + " cmp r1 , # 8 \ n " <nl> + / / Compute r1 = how many rows of the 8x4 block fit <nl> + " it gt \ n " <nl> + " movgt r1 , r3 \ n " <nl> + " cmp r2 , # 4 \ n " <nl> + / / Compute r2 = how many cols of the 8x4 block fit <nl> + " it gt \ n " <nl> + " movgt r2 , r5 \ n " <nl> + <nl> + / / Test if r1 = = 8 & & r2 = = 4 , i . e . if all of the 8x4 block fits . <nl> + " cmp r1 , r3 \ n " <nl> + " it eq \ n " <nl> + " cmpeq r2 , r5 \ n " <nl> + / / Yes , all of the 8x4 block fits , go to fast path . <nl> + " beq 30f \ n " <nl> + / / Not all of the 8x4 block fits . <nl> + / / Set ( r3 address , r4 stride ) to write to dst_tmp_buf <nl> + " mov r3 , % [ dst_tmp_buf ] \ n " <nl> + " mov r4 , # 32 \ n " <nl> + " b 31f \ n " <nl> + " 30 : \ n " <nl> + / / Yes , all of the 8x4 block fits . <nl> + / / Set ( r3 address , r4 stride ) to write directly to destination matrix . <nl> + " ldr r5 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_DST_STRIDE ) " ] \ n " <nl> + " ldr r3 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_DST_PTR ) " ] \ n " <nl> + " mov r4 , r5 \ n " <nl> + " 31 : \ n " <nl> + <nl> + / / Write our float values to the destination described by <nl> + / / ( r3 address , r4 stride ) . <nl> + / / q3 = d6 , d7 <nl> + " vstr d6 , [ r3 , # 0 ] \ n " <nl> + " vstr d7 , [ r3 , # 8 ] \ n " <nl> + / / q4 = d8 , d9 <nl> + " vstr d8 , [ r3 , # 16 ] \ n " <nl> + " vstr d9 , [ r3 , # 24 ] \ n " <nl> + " add r3 , r3 , r4 \ n " <nl> + RUY_MAKE_ZERO ( q3 ) <nl> + RUY_MAKE_ZERO ( q4 ) <nl> + / / q5 = d10 , d11 <nl> + " vstr d10 , [ r3 , # 0 ] \ n " <nl> + " vstr d11 , [ r3 , # 8 ] \ n " <nl> + / / q6 = d12 , d13 <nl> + " vstr d12 , [ r3 , # 16 ] \ n " <nl> + " vstr d13 , [ r3 , # 24 ] \ n " <nl> + " add r3 , r3 , r4 \ n " <nl> + RUY_MAKE_ZERO ( q5 ) <nl> + RUY_MAKE_ZERO ( q6 ) <nl> + / / q7 = d14 , d15 <nl> + " vstr d14 , [ r3 , # 0 ] \ n " <nl> + " vstr d15 , [ r3 , # 8 ] \ n " <nl> + / / q8 = d16 , d17 <nl> + " vstr d16 , [ r3 , # 16 ] \ n " <nl> + " vstr d17 , [ r3 , # 24 ] \ n " <nl> + " add r3 , r3 , r4 \ n " <nl> + RUY_MAKE_ZERO ( q7 ) <nl> + RUY_MAKE_ZERO ( q8 ) <nl> + / / q9 = d18 , d19 <nl> + " vstr d18 , [ r3 , # 0 ] \ n " <nl> + " vstr d19 , [ r3 , # 8 ] \ n " <nl> + / / q10 = d20 , d21 <nl> + " vstr d20 , [ r3 , # 16 ] \ n " <nl> + " vstr d21 , [ r3 , # 24 ] \ n " <nl> + " add r3 , r3 , r4 \ n " <nl> + RUY_MAKE_ZERO ( q9 ) <nl> + RUY_MAKE_ZERO ( q10 ) <nl> + <nl> + / / If all of the 8x4 block fits , we just finished writing it to the <nl> + / / destination , so we skip the next part . <nl> + " beq 41f \ n " <nl> + / / Not all of the 8x8 block fits in the destination matrix . We just <nl> + / / wrote it to dst_tmp_buf . Now we perform the slow scalar loop over <nl> + / / it to copy into the destination matrix the part that fits . <nl> + " ldr r8 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_DST_STRIDE ) " ] \ n " <nl> + " mov r3 , % [ dst_tmp_buf ] \ n " <nl> + " ldr r4 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_DST_PTR ) " ] \ n " <nl> + " mov r6 , # 0 \ n " <nl> + " 50 : \ n " <nl> + " mov r5 , # 0 \ n " <nl> + " 51 : \ n " <nl> + " ldr r7 , [ r3 , r5 , lsl # 2 ] \ n " <nl> + " str r7 , [ r4 , r5 , lsl # 2 ] \ n " <nl> + " add r5 , r5 , # 1 \ n " <nl> + " cmp r5 , r1 \ n " <nl> + " blt 51b \ n " <nl> + " add r6 , r6 , # 1 \ n " <nl> + " add r3 , r3 , # 32 \ n " <nl> + " add r4 , r4 , r8 \ n " <nl> + / / r2 = how many cols of the 8x4 block fit <nl> + " cmp r6 , r2 \ n " <nl> + " blt 50b \ n " <nl> + " 41 : \ n " <nl> + / / Load dst_ptr , increment , and write back . <nl> + " ldr r4 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_DST_PTR ) " ] \ n " <nl> + " add r4 , r4 , # 32 \ n " <nl> + " str r4 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_DST_PTR ) " ] \ n " <nl> + / / At this point we have completely finished writing values to the <nl> + / / destination matrix for the current block . <nl> + <nl> + / / Reload some params mmm we had used r3 , r5 , r7 for a few other things <nl> + / / since the last time we had loaded them . <nl> + " ldr r5 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_LHS_BASE_PTR ) " ] \ n " <nl> + " ldr r6 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_START_ROW ) " ] \ n " <nl> + " ldr r3 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_LAST_ROW ) " ] \ n " <nl> + <nl> + / / Move to the next block of the destination matrix , for the next iter <nl> + / / of the main loop . Notice that lhs_col_ptr , rhs_col_ptr have already <nl> + / / been updated earlier . <nl> + / / Have we reached the end row ? <nl> + " ldr r8 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_ROW ) " ] \ n " <nl> + " cmp r8 , r3 \ n " <nl> + <nl> + " beq 20f \ n " / / yes , end row . <nl> + / / Not end row . Move to the next row . <nl> + " add r8 , r8 , # 8 \ n " <nl> + / / Store new value of row <nl> + " str r8 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_ROW ) " ] \ n " <nl> + <nl> + " b 21f \ n " <nl> + " 20 : \ n " <nl> + / / Was already at end row . <nl> + / / Move back to first row . <nl> + " str r6 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_ROW ) " ] \ n " <nl> + / / Move to the next column . <nl> + " ldr r4 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_COL ) " ] \ n " <nl> + " add r4 , r4 , # 4 \ n " <nl> + " str r4 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_COL ) " ] \ n " <nl> + <nl> + " ldr r8 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_DST_STRIDE ) " ] \ n " <nl> + " ldr r1 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_DST_COL_PTR ) " ] \ n " <nl> + / / Increment dst_col_ptr by 4 * dst_stride ( i . e . 4 columns ) <nl> + " add r1 , r1 , r8 , lsl # 2 \ n " <nl> + / / Store dst_col_ptr <nl> + " str r1 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_DST_COL_PTR ) " ] \ n " <nl> + / / Store dst_ptr <nl> + " str r1 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_DST_PTR ) " ] \ n " <nl> + " 21 : \ n " <nl> + <nl> + / / Main loop exit condition : have we hit the end column ? <nl> + " ldr r4 , [ % [ params ] , # " RUY_STR ( RUY_OFFSET_LAST_COL ) " ] \ n " <nl> + " ldr r8 , [ sp , # " RUY_STR ( RUY_STACK_OFFSET_COL ) " ] \ n " <nl> + " cmp r8 , r4 \ n " <nl> + <nl> + / / w1 is the number of levels of depth that we have already loaded <nl> + / / LHS and RHS data for . Corresponding to the initial ld1 instructions <nl> + / / above , this is currently 1 . <nl> + " mov r1 , # 1 \ n " <nl> + <nl> + " ble 1b \ n " <nl> + <nl> + / / Restore stack pointer . <nl> + " add sp , sp , # " RUY_STR ( RUY_STACK_OFFSET_SIZE ) " \ n " <nl> + <nl> + / / clang - format on <nl> + : [ lhs_ptr ] " + r " ( lhs_ptr ) , [ rhs_ptr ] " + r " ( rhs_ptr ) <nl> + : [ params ] " r " ( & params ) , [ dst_tmp_buf ] " r " ( params . dst_tmp_buf ) <nl> + : " r0 " , " r1 " , " r2 " , " r3 " , " r4 " , " r5 " , " r6 " , " r7 " , " r8 " , " cc " , <nl> + " memory " , " q0 " , " q1 " , " q2 " , " q3 " , " q4 " , " q5 " , " q6 " , " q7 " , " q8 " , " q9 " , " q10 " , " q12 " , " q13 " ) ; <nl> + } <nl> + <nl> + # undef RUY_OFFSET_BIAS <nl> + # undef RUY_OFFSET_FLAGS <nl> + # undef RUY_OFFSET_LHS_BASE_PTR <nl> + # undef RUY_OFFSET_CLAMP_MIN <nl> + # undef RUY_OFFSET_CLAMP_MAX <nl> + # undef RUY_OFFSET_START_ROW <nl> + # undef RUY_OFFSET_LAST_ROW <nl> + # undef RUY_OFFSET_LAST_COL <nl> + # undef RUY_OFFSET_LHS_STRIDE <nl> + # undef RUY_OFFSET_RHS_STRIDE <nl> + # undef RUY_OFFSET_DST_STRIDE <nl> + # undef RUY_OFFSET_DEPTH <nl> + # undef RUY_OFFSET_START_COL <nl> + # undef RUY_OFFSET_RHS_BASE_PTR <nl> + # undef RUY_OFFSET_DST_BASE_PTR <nl> + <nl> + # endif / / ( defined RUY_NEON_32 ) & & ( RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> + } / / namespace ruy <nl> similarity index 99 % <nl> rename from tensorflow / lite / experimental / ruy / kernel . cc <nl> rename to tensorflow / lite / experimental / ruy / kernel_arm64 . cc <nl> mmm a / tensorflow / lite / experimental / ruy / kernel . cc <nl> ppp b / tensorflow / lite / experimental / ruy / kernel_arm64 . cc <nl> limitations under the License . <nl> <nl> namespace ruy { <nl> <nl> - # if ( defined __aarch64__ ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> + # if ( defined RUY_NEON_64 ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> <nl> # define RUY_ASM_LABEL_STORE_UINT8 91 <nl> # define RUY_ASM_LABEL_STORE_INT8 92 <nl> void KernelFloatNeonDotprodInOrder ( const KernelParamsFloat < 8 , 8 > & params ) { <nl> # undef RUY_OFFSET_RHS_BASE_PTR <nl> # undef RUY_OFFSET_DST_BASE_PTR <nl> <nl> - # endif / / ( defined __aarch64__ ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> + # endif / / ( defined RUY_NEON_64 ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> <nl> } / / namespace ruy <nl> mmm a / tensorflow / lite / experimental / ruy / pack . cc <nl> ppp b / tensorflow / lite / experimental / ruy / pack . cc <nl> limitations under the License . <nl> <nl> namespace ruy { <nl> <nl> - # if ( defined __aarch64__ ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> + # if ( defined RUY_NEON_64 ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> <nl> void Pack8bitNeonOutOfOrder ( const void * src_ptr0 , const void * src_ptr1 , <nl> const void * src_ptr2 , const void * src_ptr3 , <nl> void PackFloatNeonInOrder ( const float * src_ptr0 , const float * src_ptr1 , <nl> " v10 " , " v11 " , " v12 " , " v13 " , " v14 " , " v15 " , " v16 " , " v17 " , " v18 " , " v19 " , " v20 " , " v21 " , <nl> " v22 " , " v23 " , " v24 " , " v25 " , " v26 " , " v27 " , " v28 " , " v29 " , " v30 " , " v31 " ) ; <nl> } <nl> - # endif / / ( defined __aarch64__ ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> + # endif / / ( defined RUY_NEON64 ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> <nl> } / / namespace ruy <nl> mmm a / tensorflow / lite / experimental / ruy / pack . h <nl> ppp b / tensorflow / lite / experimental / ruy / pack . h <nl> struct PackImpl < Path : : kStandardCpp , FixedKernelLayout , Scalar , PackedScalar , <nl> RUY_INHERIT_PACK ( Path : : kStandardCpp , Path : : kNeon ) <nl> RUY_INHERIT_PACK ( Path : : kNeon , Path : : kNeonDotprod ) <nl> <nl> - # if ( defined __aarch64__ ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> + # if ( defined RUY_NEON_64 ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> <nl> void Pack8bitNeonOutOfOrder ( const void * src_ptr0 , const void * src_ptr1 , <nl> const void * src_ptr2 , const void * src_ptr3 , <nl> struct PackImpl < Path : : kNeon , FixedKernelLayout < Order : : kRowMajor , 1 , 8 > , float , <nl> } <nl> } ; <nl> <nl> - # endif / / ( defined __aarch64__ ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> + # endif / / ( defined RUY_NEON_64 ) & & RUY_OPT_ENABLED ( RUY_OPT_ASM ) <nl> <nl> / / Main entry point for packing . <nl> template < Path ThePath , typename FixedKernelLayout , typename Scalar , <nl> mmm a / tensorflow / lite / experimental / ruy / path . h <nl> ppp b / tensorflow / lite / experimental / ruy / path . h <nl> limitations under the License . <nl> <nl> # include " tensorflow / lite / experimental / ruy / size_util . h " <nl> <nl> + / / Detect ARM , 32 - bit or 64 - bit <nl> + # ifdef __aarch64__ <nl> + # define RUY_ARM_64 <nl> + # elif defined ( __arm__ ) <nl> + # define RUY_ARM_32 <nl> + # endif <nl> + <nl> + / / Detect NEON . <nl> + # if ( defined __ARM_NEON ) | | ( defined __ARM_NEON__ ) <nl> + # define RUY_NEON <nl> + # endif <nl> + <nl> + / / Define 32bit ARM NEON and 64 bit ARM NEON <nl> + # if defined ( RUY_NEON ) & & defined ( RUY_ARM_32 ) <nl> + # define RUY_NEON_32 <nl> + # endif <nl> + <nl> + # if defined ( RUY_NEON ) & & defined ( RUY_ARM_64 ) <nl> + # define RUY_NEON_64 <nl> + # endif <nl> + <nl> namespace ruy { <nl> <nl> / / A Path is a choice of implementation path , e . g . between reference code <nl> inline Path GetMostSignificantPath ( Path path_mask ) { <nl> <nl> / / ruy : : kAllPaths represents all Path ' s that make sense to on a given <nl> / / base architecture . <nl> - # ifdef __aarch64__ <nl> # ifdef __linux__ <nl> + # ifdef RUY_NEON_64 <nl> constexpr Path kAllPaths = <nl> Path : : kReference | Path : : kStandardCpp | Path : : kNeon | Path : : kNeonDotprod ; <nl> + # elif defined RUY_NEON_32 <nl> + constexpr Path kAllPaths = Path : : kReference | Path : : kStandardCpp | Path : : kNeon ; <nl> # else <nl> + constexpr Path kAllPaths = Path : : kReference | Path : : kStandardCpp ; <nl> + # endif / / RUY_NEON_64 <nl> + # else / / __linux__ <nl> / / We don ' t know how to do runtime dotprod detection outside of linux for now . <nl> + # if defined ( RUY_NEON_64 ) | | defined ( RUY_NEON_32 ) <nl> constexpr Path kAllPaths = Path : : kReference | Path : : kStandardCpp | Path : : kNeon ; <nl> - # endif <nl> # else <nl> constexpr Path kAllPaths = Path : : kReference | Path : : kStandardCpp ; <nl> - # endif <nl> + # endif / / defined ( RUY_NEON_64 ) | | defined ( RUY_NEON_32 ) <nl> + # endif / / __linux__ <nl> <nl> } / / namespace ruy <nl> <nl> mmm a / tensorflow / lite / experimental / ruy / test . h <nl> ppp b / tensorflow / lite / experimental / ruy / test . h <nl> void TestSet < LhsScalar , RhsScalar , SpecType > : : MakeResultPaths ( ) { <nl> } <nl> / / We link against a generic BLAS target that only maps to OpenBLAS on specific <nl> / / architectures . <nl> - # if defined __aarch64__ | | defined __arm__ <nl> + # if defined RUY_ARM_64 | | defined RUY_ARM_32 <nl> / / OpenBLAS multi - threading is disabled , so avoid mixing single - threaded <nl> / / and multi - threaded benchmark results . <nl> if ( max_num_threads = = 1 ) { <nl> mmm a / tensorflow / lite / experimental / ruy / tune . cc <nl> ppp b / tensorflow / lite / experimental / ruy / tune . cc <nl> limitations under the License . <nl> <nl> namespace ruy { <nl> <nl> - # ifdef __aarch64__ <nl> + # ifdef RUY_NEON_64 <nl> <nl> namespace { <nl> <nl> Tuning TuningResolver : : ResolveNow ( ) { <nl> return is_probably_inorder ? Tuning : : kInOrder : Tuning : : kOutOfOrder ; <nl> } <nl> <nl> - # else / / not defined __aarch64__ <nl> + # else / / not defined RUY_NEON_64 <nl> <nl> float TuningResolver : : EvalRatio ( ) { return 0 ; } <nl> float TuningResolver : : ThresholdRatio ( ) { return 0 ; } <nl> | Ruy - Float Kernel in ARM32 asm . | tensorflow/tensorflow | 32499e2a2b5e2fb025e03dfc4e49d78a75ea65ed | 2019-07-02T19:17:22Z |
mmm a / cmake / OpenCVFindLibsGrfmt . cmake <nl> ppp b / cmake / OpenCVFindLibsGrfmt . cmake <nl> if ( WITH_JASPER ) <nl> endif ( ) <nl> <nl> # mmm libpng ( optional , should be searched after zlib ) mmm <nl> - if ( WITH_PNG AND NOT IOS ) <nl> + if ( WITH_PNG ) <nl> if ( BUILD_PNG ) <nl> ocv_clear_vars ( PNG_FOUND ) <nl> else ( ) <nl> mmm a / cmake / OpenCVFindLibsVideo . cmake <nl> ppp b / cmake / OpenCVFindLibsVideo . cmake <nl> if ( WITH_AVFOUNDATION ) <nl> endif ( ) <nl> <nl> # mmm QuickTime mmm <nl> - if ( WITH_QUICKTIME ) <nl> - set ( HAVE_QUICKTIME YES ) <nl> - elseif ( APPLE ) <nl> - set ( HAVE_QTKIT YES ) <nl> + if ( NOT IOS ) <nl> + if ( WITH_QUICKTIME ) <nl> + set ( HAVE_QUICKTIME YES ) <nl> + elseif ( APPLE ) <nl> + set ( HAVE_QTKIT YES ) <nl> + endif ( ) <nl> endif ( ) <nl> | Merge pull request from alekcac : ios - build - fix | opencv/opencv | 7cefb6f50bedcc8030dddbc21722ff7de13ccc1e | 2013-08-23T12:54:48Z |
mmm a / src / isolate . cc <nl> ppp b / src / isolate . cc <nl> Handle < Object > Isolate : : CaptureSimpleStackTrace ( Handle < JSReceiver > error_object , <nl> this ) ; <nl> Handle < JSGeneratorObject > generator_object ( <nl> JSGeneratorObject : : cast ( context - > extension ( ) ) , this ) ; <nl> - CHECK ( generator_object - > is_executing ( ) ) ; <nl> - <nl> - if ( generator_object - > IsJSAsyncFunctionObject ( ) ) { <nl> - Handle < JSAsyncFunctionObject > async_function_object = <nl> - Handle < JSAsyncFunctionObject > : : cast ( generator_object ) ; <nl> - Handle < JSPromise > promise ( async_function_object - > promise ( ) , this ) ; <nl> - CaptureAsyncStackTrace ( this , promise , & builder ) ; <nl> - } else { <nl> - Handle < JSAsyncGeneratorObject > async_generator_object = <nl> - Handle < JSAsyncGeneratorObject > : : cast ( generator_object ) ; <nl> - Handle < AsyncGeneratorRequest > async_generator_request ( <nl> - AsyncGeneratorRequest : : cast ( async_generator_object - > queue ( ) ) , <nl> - this ) ; <nl> - Handle < JSPromise > promise ( <nl> - JSPromise : : cast ( async_generator_request - > promise ( ) ) , this ) ; <nl> - CaptureAsyncStackTrace ( this , promise , & builder ) ; <nl> + if ( generator_object - > is_executing ( ) ) { <nl> + if ( generator_object - > IsJSAsyncFunctionObject ( ) ) { <nl> + Handle < JSAsyncFunctionObject > async_function_object = <nl> + Handle < JSAsyncFunctionObject > : : cast ( generator_object ) ; <nl> + Handle < JSPromise > promise ( async_function_object - > promise ( ) , this ) ; <nl> + CaptureAsyncStackTrace ( this , promise , & builder ) ; <nl> + } else { <nl> + Handle < JSAsyncGeneratorObject > async_generator_object = <nl> + Handle < JSAsyncGeneratorObject > : : cast ( generator_object ) ; <nl> + Handle < AsyncGeneratorRequest > async_generator_request ( <nl> + AsyncGeneratorRequest : : cast ( async_generator_object - > queue ( ) ) , <nl> + this ) ; <nl> + Handle < JSPromise > promise ( <nl> + JSPromise : : cast ( async_generator_request - > promise ( ) ) , this ) ; <nl> + CaptureAsyncStackTrace ( this , promise , & builder ) ; <nl> + } <nl> } <nl> } else { <nl> / / The { promise_reaction_job_task } doesn ' t belong to an await ( or <nl> new file mode 100644 <nl> index 00000000000 . . 62eeeebbef5 <nl> mmm / dev / null <nl> ppp b / test / mjsunit / regress / regress - crbug - 897406 . js <nl> <nl> + / / Copyright 2018 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 : - - async - stack - traces - - expose - async - hooks <nl> + <nl> + async_hooks . createHook ( { <nl> + after ( ) { throw new Error ( ) ; } <nl> + } ) . enable ( ) ; <nl> + <nl> + ( async function ( ) { <nl> + await 1 ; <nl> + await 1 ; <nl> + } ) ( ) ; <nl> | [ async ] Gracefully handle suspended generators . | v8/v8 | 2a08adbb6b6a542047628b1258dff63a7f0e99ef | 2018-10-22T07:06:22Z |
mmm a / cocos / scripting / js - bindings / manual / ScriptingCore . cpp <nl> ppp b / cocos / scripting / js - bindings / manual / ScriptingCore . cpp <nl> JSObject * jsb_ref_create_jsobject ( JSContext * cx , cocos2d : : Ref * ref , js_type_clas <nl> return js_obj ; <nl> } <nl> <nl> + JSObject * jsb_ref_get_or_create_jsobject ( JSContext * cx , cocos2d : : Ref * ref , js_type_class_t * typeClass , const char * debug ) <nl> + { <nl> + auto proxy = jsb_get_native_proxy ( ref ) ; <nl> + if ( proxy ) <nl> + return proxy - > obj ; <nl> + / / else <nl> + return jsb_ref_create_jsobject ( cx , ref , typeClass , debug ) ; <nl> + } <nl> + <nl> void jsb_ref_init ( JSContext * cx , JS : : Heap < JSObject * > * obj , Ref * ref , const char * debug ) <nl> { <nl> / / CCLOG ( " jsb_ref_init : JSObject address = % p . % s " , obj - > get ( ) , debug ) ; <nl> mmm a / cocos / scripting / js - bindings / manual / ScriptingCore . h <nl> ppp b / cocos / scripting / js - bindings / manual / ScriptingCore . h <nl> void jsb_ref_rebind ( JSContext * cx , JS : : HandleObject jsobj , js_proxy_t * js2native <nl> * / <nl> JSObject * jsb_ref_create_jsobject ( JSContext * cx , cocos2d : : Ref * ref , js_type_class_t * typeClass , const char * debug ) ; <nl> <nl> + / * * <nl> + It will try to get the associated JSObjct for ref . <nl> + If it can ' t find it , it will create a new one associating it to Ref <nl> + * / <nl> + JSObject * jsb_ref_get_or_create_jsobject ( JSContext * cx , cocos2d : : Ref * ref , js_type_class_t * typeClass , const char * debug ) ; <nl> + <nl> + <nl> template < class T > <nl> jsval getJSObject ( JSContext * cx , T * nativeObj ) <nl> { <nl> mmm a / cocos / scripting / js - bindings / manual / cocos2d_specifics . cpp <nl> ppp b / cocos / scripting / js - bindings / manual / cocos2d_specifics . cpp <nl> static bool js_callFunc ( JSContext * cx , uint32_t argc , jsval * vp ) <nl> JS : : RootedValue senderVal ( cx ) ; <nl> if ( sender ) <nl> { <nl> - js_proxy_t * proxy = js_get_or_create_proxy < cocos2d : : Node > ( cx , sender ) ; <nl> - senderVal . set ( OBJECT_TO_JSVAL ( proxy - > obj ) ) ; <nl> + js_type_class_t * typeClass = js_get_type_from_native < cocos2d : : Node > ( sender ) ; <nl> + auto jsobj = jsb_ref_get_or_create_jsobject ( cx , sender , typeClass , " cocos2d : : Node " ) ; <nl> + senderVal . set ( OBJECT_TO_JSVAL ( jsobj ) ) ; <nl> } <nl> else <nl> { <nl> | adds jsb_ref_get_or_create_jsobject ( ) | cocos2d/cocos2d-x | 67948ff8c877d003df4ef7414c2d05534601475f | 2015-12-03T23:40:52Z |
mmm a / tensorflow / go / op / wrappers . go <nl> ppp b / tensorflow / go / op / wrappers . go <nl> func DepthwiseConv2dNativeBackpropFilterDataFormat ( value string ) DepthwiseConv2d <nl> / / element on that dimension . The dimension order is determined by the value of <nl> / / ` data_format ` , see above for details . Dilations in the batch and depth <nl> / / dimensions must be 1 . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> func DepthwiseConv2dNativeBackpropFilterDilations ( value [ ] int64 ) DepthwiseConv2dNativeBackpropFilterAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func SampleDistortedBoundingBoxV2Seed2 ( value int64 ) SampleDistortedBoundingBoxV2 <nl> / / <nl> / / value : The cropped area of the image must have an aspect ratio = <nl> / / width / height within this range . <nl> - / / If not specified , defaults to { f : 0 . 75 f : 1 . 33 } <nl> + / / If not specified , defaults to { f : 0 . 75 f : 1 . 33 } <nl> func SampleDistortedBoundingBoxV2AspectRatioRange ( value [ ] float32 ) SampleDistortedBoundingBoxV2Attr { <nl> return func ( m optionalAttr ) { <nl> m [ " aspect_ratio_range " ] = value <nl> func SampleDistortedBoundingBoxV2AspectRatioRange ( value [ ] float32 ) SampleDistort <nl> / / <nl> / / value : The cropped area of the image must contain a fraction of the <nl> / / supplied image within this range . <nl> - / / If not specified , defaults to { f : 0 . 05 f : 1 } <nl> + / / If not specified , defaults to { f : 0 . 05 f : 1 } <nl> func SampleDistortedBoundingBoxV2AreaRange ( value [ ] float32 ) SampleDistortedBoundingBoxV2Attr { <nl> return func ( m optionalAttr ) { <nl> m [ " area_range " ] = value <nl> func SampleDistortedBoundingBoxMinObjectCovered ( value float32 ) SampleDistortedBo <nl> / / <nl> / / value : The cropped area of the image must have an aspect ratio = <nl> / / width / height within this range . <nl> - / / If not specified , defaults to { f : 0 . 75 f : 1 . 33 } <nl> + / / If not specified , defaults to { f : 0 . 75 f : 1 . 33 } <nl> func SampleDistortedBoundingBoxAspectRatioRange ( value [ ] float32 ) SampleDistortedBoundingBoxAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " aspect_ratio_range " ] = value <nl> func SampleDistortedBoundingBoxAspectRatioRange ( value [ ] float32 ) SampleDistorted <nl> / / <nl> / / value : The cropped area of the image must contain a fraction of the <nl> / / supplied image within this range . <nl> - / / If not specified , defaults to { f : 0 . 05 f : 1 } <nl> + / / If not specified , defaults to { f : 0 . 05 f : 1 } <nl> func SampleDistortedBoundingBoxAreaRange ( value [ ] float32 ) SampleDistortedBoundingBoxAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " area_range " ] = value <nl> func ImageSummaryMaxImages ( value int64 ) ImageSummaryAttr { <nl> / / ImageSummaryBadColor sets the optional bad_color attribute to value . <nl> / / <nl> / / value : Color to use for pixels with non - finite values . <nl> - / / If not specified , defaults to { dtype : DT_UINT8 tensor_shape : { dim : { size : 4 } } int_val : 255 int_val : 0 int_val : 0 int_val : 255 } <nl> + / / If not specified , defaults to { dtype : DT_UINT8 tensor_shape : { dim : { size : 4 } } int_val : 255 int_val : 0 int_val : 0 int_val : 255 } <nl> func ImageSummaryBadColor ( value tf . Tensor ) ImageSummaryAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " bad_color " ] = value <nl> func Conv3DBackpropFilterV2DataFormat ( value string ) Conv3DBackpropFilterV2Attr { <nl> / / filter element on that dimension . The dimension order is determined by the <nl> / / value of ` data_format ` , see above for details . Dilations in the batch and <nl> / / depth dimensions must be 1 . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 i : 1 } <nl> func Conv3DBackpropFilterV2Dilations ( value [ ] int64 ) Conv3DBackpropFilterV2Attr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func Conv2DBackpropInputDataFormat ( value string ) Conv2DBackpropInputAttr { <nl> / / element on that dimension . The dimension order is determined by the value of <nl> / / ` data_format ` , see above for details . Dilations in the batch and depth <nl> / / dimensions must be 1 . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> func Conv2DBackpropInputDilations ( value [ ] int64 ) Conv2DBackpropInputAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func Conv2DDataFormat ( value string ) Conv2DAttr { <nl> / / filter element on that dimension . The dimension order is determined by the <nl> / / value of ` data_format ` , see above for details . Dilations in the batch and <nl> / / depth dimensions must be 1 . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> func Conv2DDilations ( value [ ] int64 ) Conv2DAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func QuantizedDepthwiseConv2DWithBiasAndReluAndRequantizeOutType ( value tf . DataTy <nl> / / QuantizedDepthwiseConv2DWithBiasAndReluAndRequantizeDilations sets the optional dilations attribute to value . <nl> / / <nl> / / value : List of dilation values . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> func QuantizedDepthwiseConv2DWithBiasAndReluAndRequantizeDilations ( value [ ] int64 ) QuantizedDepthwiseConv2DWithBiasAndReluAndRequantizeAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func QuantizedDepthwiseConv2DWithBiasAndReluOutType ( value tf . DataType ) Quantized <nl> / / QuantizedDepthwiseConv2DWithBiasAndReluDilations sets the optional dilations attribute to value . <nl> / / <nl> / / value : List of dilation values . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> func QuantizedDepthwiseConv2DWithBiasAndReluDilations ( value [ ] int64 ) QuantizedDepthwiseConv2DWithBiasAndReluAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func QuantizedDepthwiseConv2DWithBiasOutType ( value tf . DataType ) QuantizedDepthwi <nl> / / QuantizedDepthwiseConv2DWithBiasDilations sets the optional dilations attribute to value . <nl> / / <nl> / / value : List of dilation values . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> func QuantizedDepthwiseConv2DWithBiasDilations ( value [ ] int64 ) QuantizedDepthwiseConv2DWithBiasAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func QuantizedDepthwiseConv2DOutType ( value tf . DataType ) QuantizedDepthwiseConv2D <nl> / / QuantizedDepthwiseConv2DDilations sets the optional dilations attribute to value . <nl> / / <nl> / / value : List of dilation values . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> func QuantizedDepthwiseConv2DDilations ( value [ ] int64 ) QuantizedDepthwiseConv2DAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func QuantizedConv2DPerChannelOutType ( value tf . DataType ) QuantizedConv2DPerChann <nl> / / QuantizedConv2DPerChannelDilations sets the optional dilations attribute to value . <nl> / / <nl> / / value : list of dilation values . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> func QuantizedConv2DPerChannelDilations ( value [ ] int64 ) QuantizedConv2DPerChannelAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func Conv3DBackpropInputV2DataFormat ( value string ) Conv3DBackpropInputV2Attr { <nl> / / filter element on that dimension . The dimension order is determined by the <nl> / / value of ` data_format ` , see above for details . Dilations in the batch and <nl> / / depth dimensions must be 1 . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 i : 1 } <nl> func Conv3DBackpropInputV2Dilations ( value [ ] int64 ) Conv3DBackpropInputV2Attr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func DepthwiseConv2dNativeDataFormat ( value string ) DepthwiseConv2dNativeAttr { <nl> / / element on that dimension . The dimension order is determined by the value of <nl> / / ` data_format ` , see above for details . Dilations in the batch and depth <nl> / / dimensions must be 1 . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> func DepthwiseConv2dNativeDilations ( value [ ] int64 ) DepthwiseConv2dNativeAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func DepthwiseConv2dNative ( scope * Scope , input tf . Output , filter tf . Output , stri <nl> type Conv3DBackpropInputAttr func ( optionalAttr ) <nl> <nl> / / Conv3DBackpropInputDilations sets the optional dilations attribute to value . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 i : 1 } <nl> func Conv3DBackpropInputDilations ( value [ ] int64 ) Conv3DBackpropInputAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func DepthwiseConv2dNativeBackpropInputDataFormat ( value string ) DepthwiseConv2dN <nl> / / element on that dimension . The dimension order is determined by the value of <nl> / / ` data_format ` , see above for details . Dilations in the batch and depth <nl> / / dimensions must be 1 . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> func DepthwiseConv2dNativeBackpropInputDilations ( value [ ] int64 ) DepthwiseConv2dNativeBackpropInputAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func QuantizedConv2DOutType ( value tf . DataType ) QuantizedConv2DAttr { <nl> / / filter element on that dimension . The dimension order is determined by the <nl> / / value of ` data_format ` , see above for details . Dilations in the batch and <nl> / / depth dimensions must be 1 . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> func QuantizedConv2DDilations ( value [ ] int64 ) QuantizedConv2DAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func Conv3DDataFormat ( value string ) Conv3DAttr { <nl> / / filter element on that dimension . The dimension order is determined by the <nl> / / value of ` data_format ` , see above for details . Dilations in the batch and <nl> / / depth dimensions must be 1 . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 i : 1 } <nl> func Conv3DDilations ( value [ ] int64 ) Conv3DAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func SparseReduceMax ( scope * Scope , input_indices tf . Output , input_values tf . Outp <nl> type Conv3DBackpropFilterAttr func ( optionalAttr ) <nl> <nl> / / Conv3DBackpropFilterDilations sets the optional dilations attribute to value . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 i : 1 } <nl> func Conv3DBackpropFilterDilations ( value [ ] int64 ) Conv3DBackpropFilterAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> func Conv2DBackpropFilterDataFormat ( value string ) Conv2DBackpropFilterAttr { <nl> / / element on that dimension . The dimension order is determined by the value of <nl> / / ` data_format ` , see above for details . Dilations in the batch and depth <nl> / / dimensions must be 1 . <nl> - / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> + / / If not specified , defaults to { i : 1 i : 1 i : 1 i : 1 } <nl> func Conv2DBackpropFilterDilations ( value [ ] int64 ) Conv2DBackpropFilterAttr { <nl> return func ( m optionalAttr ) { <nl> m [ " dilations " ] = value <nl> | Go : Update generated wrapper functions for TensorFlow ops . | tensorflow/tensorflow | 31f4a57d484ac794671aecc60b19ef8b78a628a2 | 2019-12-27T10:50:32Z |
deleted file mode 100644 <nl> index fad0043f8b8a . . 000000000000 <nl> mmm a / utils / error_enum_to_cases . pl <nl> ppp / dev / null <nl> <nl> - # ! / usr / bin / perl - w <nl> - <nl> - use strict ; <nl> - use English ; <nl> - <nl> - sub translateAvailability { <nl> - my $ version = shift ; <nl> - $ version = ~ s / ^ \ s + | \ s + $ / / g ; <nl> - if ( $ version eq " NA " ) { return " unavailable " ; } <nl> - $ version = ~ / ( [ 0 - 9 ] + ) _ ( [ 0 - 9 ] + ) / ; <nl> - return " introduced = $ 1 . $ 2 " ; <nl> - } <nl> - <nl> - my $ prefixLength = 2 ; <nl> - my % minimumValues = ( ) ; <nl> - my % maximumValues = ( ) ; <nl> - my % rangeAvailability = ( ) ; <nl> - my $ prev_had_availability = 0 ; <nl> - foreach my $ line ( < STDIN > ) { <nl> - chomp $ line ; <nl> - if ( $ line = ~ / ( [ A - Za - z_ ] [ A - Za - z_0 - 9 ] + ) . * = [ ^ 0 - 9A - Za - z_ - ] * ( [ A - Za - z0 - 9_ - ] + ) / ) { <nl> - my $ fullname = $ 1 ; <nl> - my $ value = $ 2 ; <nl> - my $ has_availability = 0 ; <nl> - <nl> - my $ availability = " " ; <nl> - # if ( $ line = ~ / AVAILABLE \ s * [ ( ] ( ( [ 0 - 9 ] + _ [ 0 - 9 ] + ) | ( NA ) ) [ ] * , [ ] * ( ( [ 0 - 9 ] + _ [ 0 - 9 ] + ) | ( NA ) ) [ ) ] / ) { <nl> - if ( $ line = ~ / AVAILABLE [ ] * [ ( ] ( [ ^ ) , ] * ) , ( [ ^ ) ] * ) [ ) ] / ) { <nl> - $ has_availability = 1 ; <nl> - my $ osx = $ 1 ; <nl> - my $ ios = $ 2 ; <nl> - $ osx = translateAvailability ( $ osx ) ; <nl> - $ ios = translateAvailability ( $ ios ) ; <nl> - $ availability = " \ @ available ( OSX , $ osx ) \ @ available ( iOS , $ ios ) \ n " ; <nl> - } <nl> - <nl> - # If the full name ends in " Minimum " or " Maximum " , it ' s for a range . <nl> - my $ rangeName = " " ; <nl> - if ( $ fullname = ~ / ( Minimum | Maximum ) $ / ) { <nl> - $ rangeName = substr $ PREMATCH , $ prefixLength ; <nl> - if ( $ MATCH eq " Minimum " ) { <nl> - $ minimumValues { $ rangeName } = $ value ; <nl> - } else { <nl> - $ maximumValues { $ rangeName } = $ value ; <nl> - } <nl> - $ rangeAvailability { $ rangeName } = $ availability ; <nl> - } else { <nl> - if ( $ availability ne " " ) { <nl> - if ( $ prev_had_availability = = 0 ) { <nl> - print ( " \ n " ) ; <nl> - } <nl> - print ( " $ availability " ) ; <nl> - } <nl> - my $ casename = substr $ fullname , $ prefixLength ; <nl> - print ( " case $ casename = $ value \ n " ) ; <nl> - <nl> - if ( $ availability ne " " ) { <nl> - print ( " \ n " ) ; <nl> - $ prev_had_availability = 1 ; <nl> - } else { <nl> - $ prev_had_availability = 0 ; <nl> - } <nl> - } <nl> - } <nl> - } <nl> - <nl> - # Print properties for the ranges . <nl> - foreach my $ key ( sort keys ( % minimumValues ) ) { <nl> - my $ minimum = $ minimumValues { $ key } ; <nl> - my $ maximum = $ maximumValues { $ key } ; <nl> - my $ availability = $ rangeAvailability { $ key } ; <nl> - print " \ n " ; <nl> - if ( $ availability ne " " ) { <nl> - print $ availability ; <nl> - } <nl> - print ( " public var is $ key : Bool { \ n " ) ; <nl> - print ( " return rawValue > = $ minimum & & rawValue < = $ maximum ; \ n " ) ; <nl> - print ( " } \ n " ) ; <nl> - } <nl> | Remove the unused utils / error_enum_to_cases . pl script . | apple/swift | eac71b43211c6779c55cc17bb08207a69c3f6079 | 2020-01-24T08:57:13Z |
mmm a / xbmc / linux / XTimeUtils . cpp <nl> ppp b / xbmc / linux / XTimeUtils . cpp <nl> BOOL SystemTimeToFileTime ( const SYSTEMTIME * lpSystemTime , LPFILETIME lpFileTi <nl> if ( IsLeapYear ( lpSystemTime - > wYear ) & & ( sysTime . tm_yday > 58 ) ) <nl> sysTime . tm_yday + + ; <nl> <nl> + # ifdef __APPLE__ <nl> + / / this solves a crash on startup ; timegm seems not threadsafe <nl> + / / http : / / www . opensubscriber . com / message / aolserver - sf @ listserv . aol . com / 4287726 . html <nl> + / / example is from man timegm <nl> + time_t t ; <nl> + { <nl> + char * tz ; <nl> + <nl> + tz = getenv ( " TZ " ) ; <nl> + setenv ( " TZ " , " " , 1 ) ; <nl> + tzset ( ) ; <nl> + t = mktime ( & sysTime ) ; <nl> + if ( tz ) <nl> + setenv ( " TZ " , ( const char * ) & sysTime , 1 ) ; <nl> + else <nl> + unsetenv ( " TZ " ) ; <nl> + tzset ( ) ; <nl> + } <nl> + # else <nl> time_t t = timegm ( & sysTime ) ; <nl> + # endif <nl> <nl> LARGE_INTEGER result ; <nl> result . QuadPart = ( long long ) t * 10000000 + ( long long ) lpSystemTime - > wMilliseconds * 10000 ; <nl> | [ osx ] work around crash on startup with thread unsafe timegm | xbmc/xbmc | 032ce0eab468d70e56170702046fc18e306ed7cd | 2009-12-11T17:11:39Z |
mmm a / Marlin / src / Marlin . cpp <nl> ppp b / Marlin / src / Marlin . cpp <nl> void disable_all_steppers ( ) { <nl> void manage_inactivity ( bool ignore_stepper_queue / * = false * / ) { <nl> <nl> # if ENABLED ( FILAMENT_RUNOUT_SENSOR ) <nl> - if ( ( IS_SD_PRINTING | | print_job_timer . isRunning ( ) ) & & ( READ ( FIL_RUNOUT_PIN ) = = FIL_RUNOUT_INVERTING ) ) <nl> + if ( ( IS_SD_PRINTING | | print_job_timer . isRunning ( ) ) <nl> + & & READ ( FIL_RUNOUT_PIN ) = = FIL_RUNOUT_INVERTING <nl> + & & thermalManager . targetHotEnoughToExtrude ( active_extruder ) <nl> + ) <nl> handle_filament_runout ( ) ; <nl> # endif <nl> <nl> mmm a / Marlin / src / feature / pause . cpp <nl> ppp b / Marlin / src / feature / pause . cpp <nl> float filament_change_unload_length [ EXTRUDERS ] , <nl> } <nl> # endif <nl> <nl> + / * * <nl> + * Ensure a safe temperature for extrusion <nl> + * <nl> + * - Fail if the TARGET temperature is too low <nl> + * - Display LCD placard with temperature status <nl> + * - Return when heating is done or aborted <nl> + * <nl> + * Returns ' true ' if heating was completed , ' false ' for abort <nl> + * / <nl> static bool ensure_safe_temperature ( const AdvancedPauseMode mode = ADVANCED_PAUSE_MODE_PAUSE_PRINT ) { <nl> <nl> # if ENABLED ( PREVENT_COLD_EXTRUSION ) <nl> static void do_pause_e_move ( const float & length , const float & fr ) { <nl> set_current_from_destination ( ) ; <nl> } <nl> <nl> - bool load_filament ( const float & load_length / * = 0 * / , const float & extrude_length / * = 0 * / , const int8_t max_beep_count / * = 0 * / , <nl> + / * * <nl> + * Load filament into the hotend <nl> + * <nl> + * - Fail if the a safe temperature was not reached <nl> + * - If pausing for confirmation , wait for a click or M108 <nl> + * - Show " wait for load " placard <nl> + * - Load and purge filament <nl> + * - Show " Purge more " / " Continue " menu <nl> + * - Return when " Continue " is selected <nl> + * <nl> + * Returns ' true ' if load was completed , ' false ' for abort <nl> + * / <nl> + bool load_filament ( const float & load_length / * = 0 * / , const float & purge_length / * = 0 * / , const int8_t max_beep_count / * = 0 * / , <nl> const bool show_lcd / * = false * / , const bool pause_for_user / * = false * / , <nl> const AdvancedPauseMode mode / * = ADVANCED_PAUSE_MODE_PAUSE_PRINT * / <nl> ) { <nl> bool load_filament ( const float & load_length / * = 0 * / , const float & extrude_length / * <nl> } <nl> <nl> # if ENABLED ( ULTIPANEL ) <nl> - if ( show_lcd ) / / Show " load " message <nl> + if ( show_lcd ) / / Show " wait for load " message <nl> lcd_advanced_pause_show_message ( ADVANCED_PAUSE_MESSAGE_LOAD , mode ) ; <nl> # endif <nl> <nl> / / Load filament <nl> - do_pause_e_move ( load_length , FILAMENT_CHANGE_LOAD_FEEDRATE ) ; <nl> + if ( load_length ) do_pause_e_move ( load_length , FILAMENT_CHANGE_LOAD_FEEDRATE ) ; <nl> <nl> do { <nl> - if ( extrude_length > 0 ) { <nl> + if ( purge_length > 0 ) { <nl> / / " Wait for filament purge " <nl> # if ENABLED ( ULTIPANEL ) <nl> if ( show_lcd ) <nl> bool load_filament ( const float & load_length / * = 0 * / , const float & extrude_length / * <nl> # endif <nl> <nl> / / Extrude filament to get into hotend <nl> - do_pause_e_move ( extrude_length , ADVANCED_PAUSE_EXTRUDE_FEEDRATE ) ; <nl> + do_pause_e_move ( purge_length , ADVANCED_PAUSE_EXTRUDE_FEEDRATE ) ; <nl> } <nl> <nl> - / / Show " Extrude More " / " Resume " menu and wait for reply <nl> + / / Show " Purge More " / " Resume " menu and wait for reply <nl> # if ENABLED ( ULTIPANEL ) <nl> if ( show_lcd ) { <nl> KEEPALIVE_STATE ( PAUSED_FOR_USER ) ; <nl> bool load_filament ( const float & load_length / * = 0 * / , const float & extrude_length / * <nl> } <nl> # endif <nl> <nl> - / / Keep looping if " Extrude More " was selected <nl> + / / Keep looping if " Purge More " was selected <nl> } while ( <nl> # if ENABLED ( ULTIPANEL ) <nl> show_lcd & & advanced_pause_menu_response = = ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE <nl> bool load_filament ( const float & load_length / * = 0 * / , const float & extrude_length / * <nl> return true ; <nl> } <nl> <nl> + / * * <nl> + * Unload filament from the hotend <nl> + * <nl> + * - Fail if the a safe temperature was not reached <nl> + * - Show " wait for unload " placard <nl> + * - Retract , pause , then unload filament <nl> + * - Disable E stepper ( on most machines ) <nl> + * <nl> + * Returns ' true ' if unload was completed , ' false ' for abort <nl> + * / <nl> bool unload_filament ( const float & unload_length , const bool show_lcd / * = false * / , <nl> const AdvancedPauseMode mode / * = ADVANCED_PAUSE_MODE_PAUSE_PRINT * / <nl> ) { <nl> bool unload_filament ( const float & unload_length , const bool show_lcd / * = false * / , <nl> <nl> / / public : <nl> <nl> + / * * <nl> + * Pause procedure <nl> + * <nl> + * - Abort if already paused <nl> + * - Send host action for pause , if configured <nl> + * - Abort if TARGET temperature is too low <nl> + * - Display " wait for start of filament change " ( if a length was specified ) <nl> + * - Initial retract , if current temperature is hot enough <nl> + * - Park the nozzle at the given position <nl> + * - Call unload_filament ( if a length was specified ) <nl> + * <nl> + * Returns ' true ' if pause was completed , ' false ' for abort <nl> + * / <nl> uint8_t did_pause_print = 0 ; <nl> <nl> bool pause_print ( const float & retract , const point_t & park_point , const float & unload_length / * = 0 * / , const bool show_lcd / * = false * / ) { <nl> bool pause_print ( const float & retract , const point_t & park_point , const float & u <nl> SERIAL_ERRORLNPGM ( MSG_HOTEND_TOO_COLD ) ; <nl> <nl> # if ENABLED ( ULTIPANEL ) <nl> - if ( show_lcd ) / / Show status screen <nl> + if ( show_lcd ) { / / Show status screen <nl> lcd_advanced_pause_show_message ( ADVANCED_PAUSE_MESSAGE_STATUS ) ; <nl> + LCD_MESSAGEPGM ( MSG_M600_TOO_COLD ) ; <nl> + } <nl> # endif <nl> <nl> return false ; / / unable to reach safe temperature <nl> bool pause_print ( const float & retract , const point_t & park_point , const float & u <nl> # if ENABLED ( SDSUPPORT ) <nl> if ( card . sdprinting ) { <nl> card . pauseSDPrint ( ) ; <nl> - + + did_pause_print ; <nl> + + + did_pause_print ; / / Indicate SD pause also <nl> } <nl> # endif <nl> print_job_timer . pause ( ) ; <nl> bool pause_print ( const float & retract , const point_t & park_point , const float & u <nl> COPY ( resume_position , current_position ) ; <nl> <nl> / / Initial retract before move to filament change position <nl> - if ( retract & & ! thermalManager . tooColdToExtrude ( active_extruder ) ) <nl> + if ( retract & & thermalManager . hotEnoughToExtrude ( active_extruder ) ) <nl> do_pause_e_move ( retract , PAUSE_PARK_RETRACT_FEEDRATE ) ; <nl> <nl> / / Park the nozzle by moving up by z_lift and then moving to ( x_pos , y_pos ) <nl> bool pause_print ( const float & retract , const point_t & park_point , const float & u <nl> return true ; <nl> } <nl> <nl> + / * * <nl> + * - Show " Insert filament and press button to continue " <nl> + * - Wait for a click before returning <nl> + * - Heaters can time out , reheated before accepting a click <nl> + * <nl> + * Used by M125 and M600 <nl> + * / <nl> void wait_for_filament_reload ( const int8_t max_beep_count / * = 0 * / ) { <nl> bool nozzle_timed_out = false ; <nl> <nl> void wait_for_filament_reload ( const int8_t max_beep_count / * = 0 * / ) { <nl> KEEPALIVE_STATE ( IN_HANDLER ) ; <nl> } <nl> <nl> - void resume_print ( const float & load_length / * = 0 * / , const float & extrude_length / * = ADVANCED_PAUSE_EXTRUDE_LENGTH * / , const int8_t max_beep_count / * = 0 * / ) { <nl> - bool nozzle_timed_out = false ; <nl> - <nl> + / * * <nl> + * Resume or Start print procedure <nl> + * <nl> + * - Abort if not paused <nl> + * - Reset heater idle timers <nl> + * - Load filament if specified , but only if : <nl> + * - a nozzle timed out , or <nl> + * - the nozzle is already heated . <nl> + * - Display " wait for print to resume " <nl> + * - Re - prime the nozzle . . . <nl> + * - FWRETRACT : Recover / prime from the prior G10 . <nl> + * - ! FWRETRACT : Retract by resume_position [ E ] , if negative . <nl> + * Not sure how this logic comes into use . <nl> + * - Move the nozzle back to resume_position <nl> + * - Sync the planner E to resume_position [ E ] <nl> + * - Send host action for resume , if configured <nl> + * - Resume the current SD print job , if any <nl> + * / <nl> + void resume_print ( const float & load_length / * = 0 * / , const float & purge_length / * = ADVANCED_PAUSE_EXTRUDE_LENGTH * / , const int8_t max_beep_count / * = 0 * / ) { <nl> if ( ! did_pause_print ) return ; <nl> <nl> / / Re - enable the heaters if they timed out <nl> + bool nozzle_timed_out = false ; <nl> HOTEND_LOOP ( ) { <nl> nozzle_timed_out | = thermalManager . is_heater_idle ( e ) ; <nl> thermalManager . reset_heater_idle_timer ( e ) ; <nl> } <nl> <nl> - if ( nozzle_timed_out | | ! thermalManager . tooColdToExtrude ( active_extruder ) ) { <nl> + if ( nozzle_timed_out | | thermalManager . hotEnoughToExtrude ( active_extruder ) ) { <nl> / / Load the new filament <nl> - load_filament ( load_length , extrude_length , max_beep_count , true , nozzle_timed_out ) ; <nl> + load_filament ( load_length , purge_length , max_beep_count , true , nozzle_timed_out ) ; <nl> } <nl> <nl> # if ENABLED ( ULTIPANEL ) <nl> void resume_print ( const float & load_length / * = 0 * / , const float & extrude_length / * = <nl> if ( fwretract . retracted [ active_extruder ] ) <nl> do_pause_e_move ( - fwretract . retract_length , fwretract . retract_feedrate_mm_s ) ; <nl> # else <nl> - / / If resume_position negative <nl> + / / If resume_position is negative <nl> if ( resume_position [ E_AXIS ] < 0 ) do_pause_e_move ( resume_position [ E_AXIS ] , PAUSE_PARK_RETRACT_FEEDRATE ) ; <nl> # endif <nl> <nl> mmm a / Marlin / src / gcode / feature / pause / M125 . cpp <nl> ppp b / Marlin / src / gcode / feature / pause / M125 . cpp <nl> <nl> * / <nl> void GcodeSuite : : M125 ( ) { <nl> / / Initial retract before move to filament change position <nl> - const float retract = parser . seen ( ' L ' ) ? parser . value_axis_units ( E_AXIS ) : 0 <nl> + const float retract = - FABS ( parser . seen ( ' L ' ) ? parser . value_axis_units ( E_AXIS ) : 0 <nl> # ifdef PAUSE_PARK_RETRACT_LENGTH <nl> - - ( PAUSE_PARK_RETRACT_LENGTH ) <nl> + + ( PAUSE_PARK_RETRACT_LENGTH ) <nl> # endif <nl> - ; <nl> + ) ; <nl> <nl> point_t park_point = NOZZLE_PARK_POINT ; <nl> <nl> mmm a / Marlin / src / gcode / feature / pause / M600 . cpp <nl> ppp b / Marlin / src / gcode / feature / pause / M600 . cpp <nl> void GcodeSuite : : M600 ( ) { <nl> <nl> if ( get_target_extruder_from_command ( ) ) return ; <nl> <nl> - / / Show initial message <nl> + / / Show initial " wait for start " message <nl> # if ENABLED ( ULTIPANEL ) <nl> lcd_advanced_pause_show_message ( ADVANCED_PAUSE_MESSAGE_INIT , ADVANCED_PAUSE_MODE_PAUSE_PRINT , target_extruder ) ; <nl> # endif <nl> mmm a / Marlin / src / gcode / feature / pause / M701_M702 . cpp <nl> ppp b / Marlin / src / gcode / feature / pause / M701_M702 . cpp <nl> void GcodeSuite : : M701 ( ) { <nl> const float load_length = FABS ( parser . seen ( ' L ' ) ? parser . value_axis_units ( E_AXIS ) : <nl> filament_change_load_length [ target_extruder ] ) ; <nl> <nl> - / / Show initial message <nl> + / / Show initial " wait for load " message <nl> # if ENABLED ( ULTIPANEL ) <nl> lcd_advanced_pause_show_message ( ADVANCED_PAUSE_MESSAGE_LOAD , ADVANCED_PAUSE_MODE_LOAD_FILAMENT , target_extruder ) ; <nl> # endif <nl> void GcodeSuite : : M702 ( ) { <nl> / / Z axis lift <nl> if ( parser . seenval ( ' Z ' ) ) park_point . z = parser . linearval ( ' Z ' ) ; <nl> <nl> - / / Show initial message <nl> + / / Show initial " wait for unload " message <nl> # if ENABLED ( ULTIPANEL ) <nl> lcd_advanced_pause_show_message ( ADVANCED_PAUSE_MESSAGE_UNLOAD , ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT , target_extruder ) ; <nl> # endif <nl> mmm a / Marlin / src / lcd / language / language_en . h <nl> ppp b / Marlin / src / lcd / language / language_en . h <nl> <nl> # ifndef MSG_ERR_PROBING_FAILED <nl> # define MSG_ERR_PROBING_FAILED _UxGT ( " Probing failed " ) <nl> # endif <nl> + # ifndef MSG_M600_TOO_COLD <nl> + # define MSG_M600_TOO_COLD _UxGT ( " M600 : Too cold " ) <nl> + # endif <nl> <nl> / / <nl> / / Filament Change screens show up to 3 lines on a 4 - line display <nl> mmm a / Marlin / src / lcd / ultralcd . cpp <nl> ppp b / Marlin / src / lcd / ultralcd . cpp <nl> void kill_screen ( const char * lcd_msg ) { <nl> / / <nl> # if ENABLED ( ADVANCED_PAUSE_FEATURE ) <nl> # if E_STEPPERS = = 1 & & ! ENABLED ( FILAMENT_LOAD_UNLOAD_GCODES ) <nl> - if ( ! thermalManager . targetTooColdToExtrude ( active_extruder ) ) <nl> + if ( thermalManager . targetHotEnoughToExtrude ( active_extruder ) ) <nl> MENU_ITEM ( gcode , MSG_FILAMENTCHANGE , PSTR ( " M600 B0 " ) ) ; <nl> else <nl> MENU_ITEM ( submenu , MSG_FILAMENTCHANGE , lcd_temp_menu_e0_filament_change ) ; <nl> void kill_screen ( const char * lcd_msg ) { <nl> # if ENABLED ( ADVANCED_PAUSE_FEATURE ) <nl> if ( ! IS_SD_FILE_OPEN ) { <nl> # if E_STEPPERS = = 1 & & ! ENABLED ( FILAMENT_LOAD_UNLOAD_GCODES ) <nl> - if ( ! thermalManager . targetTooColdToExtrude ( active_extruder ) ) <nl> + if ( thermalManager . targetHotEnoughToExtrude ( active_extruder ) ) <nl> MENU_ITEM ( gcode , MSG_FILAMENTCHANGE , PSTR ( " M600 B0 " ) ) ; <nl> else <nl> MENU_ITEM ( submenu , MSG_FILAMENTCHANGE , lcd_temp_menu_e0_filament_change ) ; <nl> void kill_screen ( const char * lcd_msg ) { <nl> <nl> / / Unload filament <nl> # if E_STEPPERS = = 1 <nl> - if ( ! thermalManager . targetTooColdToExtrude ( active_extruder ) ) <nl> + if ( thermalManager . targetHotEnoughToExtrude ( active_extruder ) ) <nl> MENU_ITEM ( gcode , MSG_FILAMENTUNLOAD , PSTR ( " M702 " ) ) ; <nl> else <nl> MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD , lcd_temp_menu_e0_filament_unload ) ; <nl> # else <nl> # if ENABLED ( FILAMENT_UNLOAD_ALL_EXTRUDERS ) <nl> - if ( ! thermalManager . targetTooColdToExtrude ( 0 ) <nl> + if ( thermalManager . targetHotEnoughToExtrude ( 0 ) <nl> # if E_STEPPERS > 1 <nl> - & & ! thermalManager . targetTooColdToExtrude ( 1 ) <nl> + & & thermalManager . targetHotEnoughToExtrude ( 1 ) <nl> # if E_STEPPERS > 2 <nl> - & & ! thermalManager . targetTooColdToExtrude ( 2 ) <nl> + & & thermalManager . targetHotEnoughToExtrude ( 2 ) <nl> # if E_STEPPERS > 3 <nl> - & & ! thermalManager . targetTooColdToExtrude ( 3 ) <nl> + & & thermalManager . targetHotEnoughToExtrude ( 3 ) <nl> # if E_STEPPERS > 4 <nl> - & & ! thermalManager . targetTooColdToExtrude ( 4 ) <nl> + & & thermalManager . targetHotEnoughToExtrude ( 4 ) <nl> # endif / / E_STEPPERS > 4 <nl> # endif / / E_STEPPERS > 3 <nl> # endif / / E_STEPPERS > 2 <nl> void kill_screen ( const char * lcd_msg ) { <nl> else <nl> MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD_ALL , lcd_unload_filament_all_temp_menu ) ; <nl> # endif <nl> - if ( ! thermalManager . targetTooColdToExtrude ( 0 ) ) <nl> + if ( thermalManager . targetHotEnoughToExtrude ( 0 ) ) <nl> MENU_ITEM ( gcode , MSG_FILAMENTUNLOAD " " MSG_E1 , PSTR ( " M702 T0 " ) ) ; <nl> else <nl> MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD " " MSG_E1 , lcd_temp_menu_e0_filament_unload ) ; <nl> - if ( ! thermalManager . targetTooColdToExtrude ( 1 ) ) <nl> + if ( thermalManager . targetHotEnoughToExtrude ( 1 ) ) <nl> MENU_ITEM ( gcode , MSG_FILAMENTUNLOAD " " MSG_E2 , PSTR ( " M702 T1 " ) ) ; <nl> else <nl> MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD " " MSG_E2 , lcd_temp_menu_e1_filament_unload ) ; <nl> # if E_STEPPERS > 2 <nl> - if ( ! thermalManager . targetTooColdToExtrude ( 2 ) ) <nl> + if ( thermalManager . targetHotEnoughToExtrude ( 2 ) ) <nl> MENU_ITEM ( gcode , MSG_FILAMENTUNLOAD " " MSG_E3 , PSTR ( " M702 T2 " ) ) ; <nl> else <nl> MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD " " MSG_E3 , lcd_temp_menu_e2_filament_unload ) ; <nl> # if E_STEPPERS > 3 <nl> - if ( ! thermalManager . targetTooColdToExtrude ( 3 ) ) <nl> + if ( thermalManager . targetHotEnoughToExtrude ( 3 ) ) <nl> MENU_ITEM ( gcode , MSG_FILAMENTUNLOAD " " MSG_E4 , PSTR ( " M702 T3 " ) ) ; <nl> else <nl> MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD " " MSG_E4 , lcd_temp_menu_e3_filament_unload ) ; <nl> # if E_STEPPERS > 4 <nl> - if ( ! thermalManager . targetTooColdToExtrude ( 4 ) ) <nl> + if ( thermalManager . targetHotEnoughToExtrude ( 4 ) ) <nl> MENU_ITEM ( gcode , MSG_FILAMENTUNLOAD " " MSG_E5 , PSTR ( " M702 T4 " ) ) ; <nl> else <nl> MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD " " MSG_E5 , lcd_temp_menu_e4_filament_unload ) ; <nl> mmm a / Marlin / src / module / temperature . h <nl> ppp b / Marlin / src / module / temperature . h <nl> class Temperature { <nl> FORCE_INLINE static bool targetTooColdToExtrude ( const uint8_t e ) { UNUSED ( e ) ; return false ; } <nl> # endif <nl> <nl> + FORCE_INLINE static bool hotEnoughToExtrude ( const uint8_t e ) { return ! tooColdToExtrude ( e ) ; } <nl> + FORCE_INLINE static bool targetHotEnoughToExtrude ( const uint8_t e ) { return ! targetTooColdToExtrude ( e ) ; } <nl> + <nl> private : <nl> <nl> # if ENABLED ( TEMP_SENSOR_1_AS_REDUNDANT ) <nl> | Merge pull request from thinkyhead / bf2_print_start_fix | MarlinFirmware/Marlin | a19656e7cbe6dac33c5a1d7e76ebc7141743054a | 2018-01-22T12:10:58Z |
mmm a / PowerEditor / src / WinControls / TabBar / TabBar . cpp <nl> ppp b / PowerEditor / src / WinControls / TabBar / TabBar . cpp <nl> LRESULT TabBarPlus : : runProc ( HWND hwnd , UINT Message , WPARAM wParam , LPARAM lPara <nl> return TRUE ; <nl> <nl> const bool isForward = ( ( short ) HIWORD ( wParam ) ) < 0 ; / / wheel rotation towards the user will be considered as forward direction <nl> - const LRESULT lastTabIndex = : : SendMessage ( _hSelf , TCM_GETITEMCOUNT , 0 , 0 ) - 1 ; <nl> + const int lastTabIndex = static_cast < int32_t > ( : : SendMessage ( _hSelf , TCM_GETITEMCOUNT , 0 , 0 ) - 1 ) ; <nl> <nl> if ( ( wParam & MK_CONTROL ) & & ( wParam & MK_SHIFT ) ) <nl> { <nl> - : : SendMessage ( _hSelf , TCM_SETCURFOCUS , ( isForward ? lastTabIndex : 0 ) , 0 ) ; <nl> + setActiveTab ( ( isForward ? lastTabIndex : 0 ) ) ; <nl> } <nl> else if ( wParam & ( MK_CONTROL | MK_SHIFT ) ) <nl> { <nl> - LRESULT tabIndex = : : SendMessage ( _hSelf , TCM_GETCURSEL , 0 , 0 ) + ( isForward ? 1 : - 1 ) ; <nl> + int tabIndex = static_cast < int32_t > ( : : SendMessage ( _hSelf , TCM_GETCURSEL , 0 , 0 ) + ( isForward ? 1 : - 1 ) ) ; <nl> if ( tabIndex < 0 ) <nl> { <nl> if ( wParam & MK_CONTROL ) <nl> LRESULT TabBarPlus : : runProc ( HWND hwnd , UINT Message , WPARAM wParam , LPARAM lPara <nl> else <nl> return TRUE ; <nl> } <nl> - : : SendMessage ( _hSelf , TCM_SETCURFOCUS , tabIndex , 0 ) ; <nl> + setActiveTab ( tabIndex ) ; <nl> } <nl> else if ( not _isMultiLine ) / / don ' t scroll if in multi - line mode <nl> { <nl> LRESULT TabBarPlus : : runProc ( HWND hwnd , UINT Message , WPARAM wParam , LPARAM lPara <nl> TC_HITTESTINFO hti ; <nl> LONG xy = NppParameters : : getInstance ( ) - > _dpiManager . scaleX ( 12 ) ; / / an arbitrary coordinate inside the first visible tab <nl> hti . pt = { xy , xy } ; <nl> - LRESULT scrollTabIndex = : : SendMessage ( _hSelf , TCM_HITTEST , 0 , reinterpret_cast < LPARAM > ( & hti ) ) ; <nl> + int scrollTabIndex = static_cast < int32_t > ( : : SendMessage ( _hSelf , TCM_HITTEST , 0 , reinterpret_cast < LPARAM > ( & hti ) ) ) ; <nl> <nl> if ( scrollTabIndex < 1 & & ( _isVertical ? rcLastTab . bottom < rcTabCtrl . bottom : rcLastTab . right < rcTabCtrl . right ) ) / / nothing to scroll <nl> return TRUE ; <nl> | Fix tab switching hotkeys in multi - line ( shift + MW , ctrl + MW , shift + ctrl + MW ) | notepad-plus-plus/notepad-plus-plus | 96c0943ad698733128a46200ddb017bc24310abc | 2017-03-19T23:19:48Z |
mmm a / tensorflow / python / debug / BUILD <nl> ppp b / tensorflow / python / debug / BUILD <nl> py_library ( <nl> " : debug_utils " , <nl> " : dumping_wrapper " , <nl> " : framework " , <nl> + " : grpc_wrapper " , <nl> " : local_cli_wrapper " , <nl> " : stepper " , <nl> " / / tensorflow / python : training " , <nl> mmm a / tensorflow / python / debug / wrappers / dumping_wrapper . py <nl> ppp b / tensorflow / python / debug / wrappers / dumping_wrapper . py <nl> def __init__ ( self , sess , session_root , watch_fn = None , log_usage = True ) : <nl> session_root ) <nl> self . _session_root = session_root <nl> <nl> - def _prepare_run_debug_urls ( self , fetches , feed_dict ) : <nl> + def prepare_run_debug_urls ( self , fetches , feed_dict ) : <nl> " " " Implementation of abstrat method in superclass . <nl> <nl> - See doc of ` NonInteractiveDebugWrapperSession . __prepare_run_debug_urls ( ) ` <nl> + See doc of ` NonInteractiveDebugWrapperSession . prepare_run_debug_urls ( ) ` <nl> for details . This implentation creates a run - specific subdirectory under <nl> self . _session_root and stores information regarding run ` fetches ` and <nl> ` feed_dict . keys ( ) ` in the subdirectory . <nl> mmm a / tensorflow / python / debug / wrappers / framework . py <nl> ppp b / tensorflow / python / debug / wrappers / framework . py <nl> def on_session_init ( self , request ) : <nl> return OnSessionInitResponse ( OnSessionInitAction . PROCEED ) <nl> <nl> @ abc . abstractmethod <nl> - def _prepare_run_debug_urls ( self , fetches , feed_dict ) : <nl> + def prepare_run_debug_urls ( self , fetches , feed_dict ) : <nl> " " " Abstract method to be implemented by concrete subclasses . <nl> <nl> This method prepares the run - specific debug URL ( s ) . <nl> def _prepare_run_watch_config ( self , fetches , feed_dict ) : <nl> options including debug_ops , and whitelists . <nl> " " " <nl> <nl> - debug_urls = self . _prepare_run_debug_urls ( fetches , feed_dict ) <nl> + debug_urls = self . prepare_run_debug_urls ( fetches , feed_dict ) <nl> if self . _watch_fn is None : <nl> watch_options = WatchOptions ( ) <nl> else : <nl> mmm a / tensorflow / python / debug / wrappers / grpc_wrapper . py <nl> ppp b / tensorflow / python / debug / wrappers / grpc_wrapper . py <nl> def __init__ ( self , <nl> " Expected type str or list in grpc_debug_server_addresses , " <nl> " received type % s " % type ( grpc_debug_server_addresses ) ) <nl> <nl> - def _prepare_run_debug_urls ( self , fetches , feed_dict ) : <nl> + def prepare_run_debug_urls ( self , fetches , feed_dict ) : <nl> " " " Implementation of abstract method in superclass . <nl> <nl> - See doc of ` NonInteractiveDebugWrapperSession . __prepare_run_debug_urls ( ) ` <nl> + See doc of ` NonInteractiveDebugWrapperSession . prepare_run_debug_urls ( ) ` <nl> for details . <nl> <nl> Args : <nl> mmm a / tensorflow / python / debug / wrappers / hooks . py <nl> ppp b / tensorflow / python / debug / wrappers / hooks . py <nl> <nl> from tensorflow . python . debug . lib import stepper <nl> from tensorflow . python . debug . wrappers import dumping_wrapper <nl> from tensorflow . python . debug . wrappers import framework <nl> + from tensorflow . python . debug . wrappers import grpc_wrapper <nl> from tensorflow . python . debug . wrappers import local_cli_wrapper <nl> from tensorflow . python . training import session_run_hook <nl> <nl> + # The prefix for GRPC endpoint URLs . <nl> + _GRPC_ENDPOINT_PREFIX = " grpc : / / " <nl> + <nl> <nl> class LocalCLIDebugHook ( session_run_hook . SessionRunHook , <nl> local_cli_wrapper . LocalCLIDebugWrapperSession ) : <nl> def begin ( self ) : <nl> <nl> def before_run ( self , run_context ) : <nl> if not self . _wrapper_initialized : <nl> + # TODO ( cais ) : Make this hook have a DumpingDebugWrapperSession property <nl> + # instead of subclassing DumpingDebugWrapperSession . <nl> dumping_wrapper . DumpingDebugWrapperSession . __init__ ( <nl> self , <nl> run_context . session , <nl> def before_run ( self , run_context ) : <nl> <nl> def after_run ( self , run_context , run_values ) : <nl> pass <nl> + <nl> + <nl> + class GrpcDebugHook ( session_run_hook . SessionRunHook ) : <nl> + " " " A hook that streams debugger - related events to any grpc_debug_server . <nl> + <nl> + For example , the debugger data server is a grpc_debug_server . The debugger <nl> + data server writes debugger - related events it receives via GRPC to logdir . <nl> + This enables debugging features in Tensorboard such as health pills . <nl> + <nl> + When the arguments of debug_utils . watch_graph changes , strongly consider <nl> + changing arguments here too so that features are available to tflearn users . <nl> + <nl> + Can be used as a monitor / hook for ` tf . train . MonitoredSession ` s and <nl> + ` tf . contrib . learn ` ' s ` Estimator ` s and ` Experiment ` s . <nl> + " " " <nl> + <nl> + def __init__ ( self , <nl> + grpc_debug_server_addresses , <nl> + watch_fn = None , <nl> + log_usage = True ) : <nl> + " " " Constructs a GrpcDebugHook . <nl> + <nl> + Args : <nl> + grpc_debug_server_addresses : ( ` list ` of ` str ` ) A list of the gRPC debug <nl> + server addresses , in the format of < host : port > , without the " grpc : / / " <nl> + prefix . For example : [ " localhost : 7000 " , " 192 . 168 . 0 . 2 : 8000 " ] <nl> + watch_fn : A function that allows for customizing which ops to watch at <nl> + which specific steps . See doc of <nl> + ` dumping_wrapper . DumpingDebugWrapperSession . __init__ ` for details . <nl> + log_usage : ( bool ) Whether usage is to be logged . <nl> + <nl> + Raises : <nl> + ValueError : if any debugger server addresses start with grpc : / / . <nl> + " " " <nl> + <nl> + for address in grpc_debug_server_addresses : <nl> + if address . startswith ( _GRPC_ENDPOINT_PREFIX ) : <nl> + raise ValueError ( <nl> + ( " Debug server address % r starts with % r . It should not because " <nl> + " the hook already automatically adds the prefix . " ) % ( <nl> + address , _GRPC_ENDPOINT_PREFIX ) ) <nl> + <nl> + # A wrapper session responsible for GRPC communication . <nl> + self . _grpc_debug_wrapper_session = None <nl> + <nl> + self . _grpc_debug_server_addresses = grpc_debug_server_addresses <nl> + self . _watch_fn = watch_fn <nl> + self . _log_usage = log_usage <nl> + <nl> + def before_run ( self , run_context ) : <nl> + " " " Called right before a session is run . <nl> + <nl> + Args : <nl> + run_context : A session_run_hook . SessionRunContext . Encapsulates <nl> + information on the run . <nl> + <nl> + Returns : <nl> + A session_run_hook . SessionRunArgs object . <nl> + " " " <nl> + <nl> + if not self . _grpc_debug_wrapper_session : <nl> + self . _grpc_debug_wrapper_session = grpc_wrapper . GrpcDebugWrapperSession ( <nl> + run_context . session , <nl> + self . _grpc_debug_server_addresses , <nl> + watch_fn = self . _watch_fn , <nl> + log_usage = self . _log_usage ) <nl> + <nl> + fetches = run_context . original_args . fetches <nl> + feed_dict = run_context . original_args . feed_dict <nl> + watch_options = self . _watch_fn ( fetches , feed_dict ) <nl> + run_options = config_pb2 . RunOptions ( ) <nl> + debug_utils . watch_graph ( <nl> + run_options , <nl> + run_context . session . graph , <nl> + debug_urls = self . _grpc_debug_wrapper_session . prepare_run_debug_urls ( <nl> + fetches , feed_dict ) , <nl> + debug_ops = watch_options . debug_ops , <nl> + node_name_regex_whitelist = watch_options . node_name_regex_whitelist , <nl> + op_type_regex_whitelist = watch_options . op_type_regex_whitelist , <nl> + tensor_dtype_regex_whitelist = watch_options . tensor_dtype_regex_whitelist , <nl> + tolerate_debug_op_creation_failures = ( <nl> + watch_options . tolerate_debug_op_creation_failures ) ) <nl> + <nl> + return session_run_hook . SessionRunArgs ( <nl> + None , feed_dict = None , options = run_options ) <nl> | tfdbg : Created a GRPC - based hook that streams debugger - related events . | tensorflow/tensorflow | 9c7e4964eb816b3701434594f5bf6d1c97694d60 | 2017-03-17T01:28:29Z |
mmm a / tensorflow / core / common_runtime / parallel_concat_optimizer . cc <nl> ppp b / tensorflow / core / common_runtime / parallel_concat_optimizer . cc <nl> class ParallelConcatRemovePass : public GraphOptimizationPass { <nl> for ( Node * n : matches ) { <nl> AttrSlice n_attrs = n - > attrs ( ) ; <nl> auto base_make_node = [ n , & n_attrs ] ( const string & op , <nl> - const string & name ) { <nl> + const string & name ) { <nl> NodeBuilder node_builder ( name , op ) ; <nl> node_builder . Device ( n - > requested_device ( ) ) ; <nl> string colo ; <nl> | Code formatted | tensorflow/tensorflow | bb45e28b207f9a0d56f1b4a0d372b267e216ad04 | 2018-08-29T14:45:38Z |
mmm a / ports / ecsutil / CONTROL <nl> ppp b / ports / ecsutil / CONTROL <nl> <nl> Source : ecsutil <nl> - Version : 1 . 0 . 7 . 9 <nl> + Version : 1 . 0 . 7 . 10 <nl> Homepage : https : / / github . com / EMCECS / ecs - object - client - windows - cpp <nl> Description : Native Windows SDK for accessing ECS via the S3 HTTP protocol . <nl> Build - Depends : atlmfc ( windows ) <nl> mmm a / ports / ecsutil / portfile . cmake <nl> ppp b / ports / ecsutil / portfile . cmake <nl> endif ( ) <nl> vcpkg_from_github ( <nl> OUT_SOURCE_PATH SOURCE_PATH <nl> REPO EMCECS / ecs - object - client - windows - cpp <nl> - REF v1 . 0 . 7 . 9 <nl> - SHA512 4e5b52911b5a4193afd74c2503980c44679fb7b77bb783f15f87551afc521b342fa6a9bd0ad8293bc1c99baf8cb68c884926fb7fe3c7a15c7aa7e9ad1139d16c <nl> + REF v1 . 0 . 7 . 10 <nl> + SHA512 a13f39342c2468f18262968c531fa11932f0e7b1a75a11866efe9e4eabdc7ba45d638b0104da24dfab3efb61758ca50f7ecf01b2ea15c2cf39fba5c913b7784b <nl> HEAD_REF master <nl> ) <nl> <nl> | [ ecsutil ] Update ECSUtil v1 . 0 . 7 . 10 ( ) | microsoft/vcpkg | 45fa57c276f894a0563abb854e319a88ddb7105c | 2020-10-12T19:03:26Z |
mmm a / swoole_process_pool . c <nl> ppp b / swoole_process_pool . c <nl> static PHP_METHOD ( swoole_process_pool , start ) <nl> <nl> if ( pool - > ipc_mode > SW_IPC_NONE ) <nl> { <nl> + if ( pp - > onMessage = = NULL ) <nl> + { <nl> + swoole_php_fatal_error ( E_ERROR , " require onMessage callback " ) ; <nl> + RETURN_FALSE ; <nl> + } <nl> pool - > onMessage = php_swoole_process_pool_onMessage ; <nl> } <nl> else <nl> static PHP_METHOD ( swoole_process_pool , getProcess ) <nl> object_init_ex ( & object , swoole_process_class_entry_ptr ) ; <nl> zend_update_property_long ( swoole_process_class_entry_ptr , & object , ZEND_STRL ( " id " ) , SwooleWG . id ) ; <nl> zend_update_property_long ( swoole_process_class_entry_ptr , & object , ZEND_STRL ( " pid " ) , getpid ( ) ) ; <nl> - swoole_set_object ( getThis ( ) , worker ) ; <nl> + swoole_set_object ( & object , worker ) ; <nl> current_process = & object ; <nl> } <nl> + else <nl> + { <nl> + Z_TRY_ADDREF_P ( & object ) ; <nl> + } <nl> <nl> RETURN_ZVAL ( current_process , 1 , 0 ) ; <nl> } <nl> | warning free . | swoole/swoole-src | b1713910535a83c86159725df6001f6568ef373b | 2018-11-10T07:40:49Z |
mmm a / lib / AST / GenericSignatureBuilder . cpp <nl> ppp b / lib / AST / GenericSignatureBuilder . cpp <nl> void GenericSignatureBuilder : : enumerateRequirements ( llvm : : function_ref < <nl> / / If this equivalence class is bound to a concrete type , equate the <nl> / / anchor with a concrete type . <nl> if ( Type concreteType = rep - > getConcreteType ( ) ) { <nl> - / / If the parent of this anchor is also in the equivalence class , <nl> - / / don ' t create a requirement . . . it ' s covered by the " parent " <nl> - / / relationship . <nl> + / / If the parent of this anchor is also a concrete type , don ' t <nl> + / / create a requirement . <nl> if ( ! archetype - > isGenericParam ( ) & & <nl> - archetype - > getParent ( ) - > getRepresentative ( ) = = rep ) <nl> + archetype - > getParent ( ) - > isConcreteType ( ) ) <nl> continue ; <nl> <nl> auto source = <nl> mmm a / test / Prototypes / CollectionTransformers . swift <nl> ppp b / test / Prototypes / CollectionTransformers . swift <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> / / RUN : % target - run - stdlib - swift <nl> / / REQUIRES : executable_test <nl> - / / Remove XFAIL once rdar : / / 31286125 is resolved . <nl> - / / REQUIRES : rdar31286125 <nl> <nl> / / FIXME : This test runs very slowly on watchOS . <nl> / / UNSUPPORTED : OS = watchos <nl> | Merge pull request from DougGregor / sr - 4456 | apple/swift | f6c2dc76fac1c8d1ac29065969232d056545359a | 2017-04-03T21:14:35Z |
mmm a / editor / plugins / script_editor_plugin . cpp <nl> ppp b / editor / plugins / script_editor_plugin . cpp <nl> void ScriptEditor : : _open_recent_script ( int p_idx ) { <nl> / / if it ' s a path then it ' s most likely a deleted file not help <nl> } else if ( path . find ( " : : " ) ! = - 1 ) { <nl> / / built - in script <nl> - String scene_path = path . get_slice ( " : : " , 0 ) ; <nl> - if ( ! EditorNode : : get_singleton ( ) - > is_scene_open ( scene_path ) ) { <nl> - EditorNode : : get_singleton ( ) - > load_scene ( scene_path ) ; <nl> + String res_path = path . get_slice ( " : : " , 0 ) ; <nl> + if ( ResourceLoader : : get_resource_type ( res_path ) = = " PackedScene " ) { <nl> + if ( ! EditorNode : : get_singleton ( ) - > is_scene_open ( res_path ) ) { <nl> + EditorNode : : get_singleton ( ) - > load_scene ( res_path ) ; <nl> + } <nl> + } else { <nl> + EditorNode : : get_singleton ( ) - > load_resource ( res_path ) ; <nl> } <nl> Ref < Script > script = ResourceLoader : : load ( path ) ; <nl> if ( script . is_valid ( ) ) { <nl> void ScriptEditor : : _menu_option ( int p_option ) { <nl> <nl> if ( extensions . find ( path . get_extension ( ) ) | | built_in ) { <nl> if ( built_in ) { <nl> - String scene_path = path . get_slice ( " : : " , 0 ) ; <nl> - if ( ! EditorNode : : get_singleton ( ) - > is_scene_open ( scene_path ) ) { <nl> - EditorNode : : get_singleton ( ) - > load_scene ( scene_path ) ; <nl> - script_editor - > call_deferred ( " _menu_option " , p_option ) ; <nl> - previous_scripts . push_back ( path ) ; / / repeat the operation <nl> - return ; <nl> + String res_path = path . get_slice ( " : : " , 0 ) ; <nl> + if ( ResourceLoader : : get_resource_type ( res_path ) = = " PackedScene " ) { <nl> + if ( ! EditorNode : : get_singleton ( ) - > is_scene_open ( res_path ) ) { <nl> + EditorNode : : get_singleton ( ) - > load_scene ( res_path ) ; <nl> + script_editor - > call_deferred ( " _menu_option " , p_option ) ; <nl> + previous_scripts . push_back ( path ) ; / / repeat the operation <nl> + return ; <nl> + } <nl> + } else { <nl> + EditorNode : : get_singleton ( ) - > load_resource ( res_path ) ; <nl> } <nl> } <nl> <nl> void ScriptEditorPlugin : : edit ( Object * p_object ) { <nl> if ( Object : : cast_to < Script > ( p_object ) ) { <nl> <nl> Script * p_script = Object : : cast_to < Script > ( p_object ) ; <nl> - String scene_path = p_script - > get_path ( ) . get_slice ( " : : " , 0 ) ; <nl> - <nl> - if ( _is_built_in_script ( p_script ) & & ! EditorNode : : get_singleton ( ) - > is_scene_open ( scene_path ) ) { <nl> - EditorNode : : get_singleton ( ) - > load_scene ( scene_path ) ; <nl> + String res_path = p_script - > get_path ( ) . get_slice ( " : : " , 0 ) ; <nl> <nl> - script_editor - > call_deferred ( " edit " , p_script ) ; <nl> - } else { <nl> - script_editor - > edit ( p_script ) ; <nl> + if ( _is_built_in_script ( p_script ) ) { <nl> + if ( ResourceLoader : : get_resource_type ( res_path ) = = " PackedScene " ) { <nl> + if ( ! EditorNode : : get_singleton ( ) - > is_scene_open ( res_path ) ) { <nl> + EditorNode : : get_singleton ( ) - > load_scene ( res_path ) ; <nl> + } <nl> + } else { <nl> + EditorNode : : get_singleton ( ) - > load_resource ( res_path ) ; <nl> + } <nl> } <nl> + script_editor - > edit ( p_script ) ; <nl> } else if ( Object : : cast_to < TextFile > ( p_object ) ) { <nl> script_editor - > edit ( Object : : cast_to < TextFile > ( p_object ) ) ; <nl> } <nl> | Merge pull request from nekomatata / fix - builtin - script - resource | godotengine/godot | 093c1c1a6944715ffa3dafd55f6cff21b925de24 | 2019-09-19T18:07:41Z |
mmm a / Examples / ReinforcementLearning / DeepQNeuralNetwork . py <nl> ppp b / Examples / ReinforcementLearning / DeepQNeuralNetwork . py <nl> class ReplayMemory ( object ) : <nl> " " " <nl> Replay Memory keeps track of the environment dynamic . <nl> We store all the transition ( s ( t ) , action , s ( t + 1 ) , reward , done ) . <nl> - The replay memory allows us to effectively sample minibatch from it , and generate the correct state representation <nl> + The replay memory allows us to efficiently sample minibatch from it , and generate the correct state representation <nl> ( w . r . t the number of previous frames needed ) <nl> " " " <nl> def __init__ ( self , size , sample_shape , history_length = 4 ) : <nl> def __init__ ( self , size , sample_shape , history_length = 4 ) : <nl> self . _history_length = max ( 1 , history_length ) <nl> self . _state_shape = sample_shape <nl> self . _states = np . zeros ( ( size , ) + sample_shape , dtype = np . float32 ) <nl> - self . _actions = np . zeros ( size , dtype = np . uint8 ) <nl> + self . _actions = np . zeros ( size , dtype = np . uint16 ) <nl> self . _rewards = np . zeros ( size , dtype = np . float32 ) <nl> self . _terminals = np . zeros ( size , dtype = np . uint8 ) <nl> <nl> | Wrong work in doc | microsoft/CNTK | ebf3fb65c59fd227f62e4afa501a38798c460132 | 2017-03-29T19:11:56Z |
mmm a / src / search_engine / nova . py <nl> ppp b / src / search_engine / nova . py <nl> <nl> # ! / usr / bin / env python <nl> # - * - coding : utf - 8 - * - <nl> + # Version : 2 . 03 <nl> + # Changelog : <nl> + # - Little fix for mininova search engine when file name contain ' < = ' <nl> + <nl> # Version : 2 . 02 <nl> # Changelog : <nl> # - Fixed mininova search engine <nl> def get_text ( txt ) : <nl> return ' ' . join ( [ get_text ( n ) for n in txt . childNodes ] ) <nl> dat = urllib . urlopen ( self . url + ' / search / % s / seeds ' % ( what , ) ) . read ( ) . decode ( ' utf - 8 ' , ' replace ' ) <nl> dat = re . sub ( " < a href = \ " http : / / www . boardreader . com / index . php . * \ " " , " < a href = \ " plop \ " " , dat ) <nl> + dat = re . sub ( " < = " , " & lt ; = " , dat ) <nl> x = minidom . parseString ( dat . encode ( ' utf - 8 ' , ' replace ' ) ) <nl> table = x . getElementsByTagName ( ' table ' ) . item ( 0 ) <nl> if not table : return <nl> | - Improved mininova search engine support | qbittorrent/qBittorrent | e9126aedc302bef09482d348c942f8655271e51b | 2007-07-24T07:58:31Z |
mmm a / src / common / utils . h <nl> ppp b / src / common / utils . h <nl> namespace common { <nl> <nl> / / heuristic to dermine number of threads per GPU <nl> inline int GetNumThreadPerGPU ( ) { <nl> - int nthread = std : : thread : : hardware_concurrency ( ) ; <nl> - if ( nthread < 8 ) { <nl> - return dmlc : : GetEnv ( " MXNET_GPU_WORKER_NTHREADS " , 1 ) ; <nl> - } else { <nl> - return dmlc : : GetEnv ( " MXNET_GPU_WORKER_NTHREADS " , 2 ) ; <nl> - } <nl> + / / This is resource efficient option . <nl> + return dmlc : : GetEnv ( " MXNET_GPU_WORKER_NTHREADS " , 1 ) ; <nl> } <nl> <nl> / * ! <nl> mmm a / src / io / image_augmenter . h <nl> ppp b / src / io / image_augmenter . h <nl> struct ImageAugmentParam : public dmlc : : Parameter < ImageAugmentParam > { <nl> int rotate ; <nl> / * ! \ brief filled color while padding * / <nl> int fill_value ; <nl> - / * ! \ brief whether to print augment info * / <nl> - bool silent ; <nl> / * ! \ brief shape of the image data * / <nl> TShape data_shape ; <nl> / / declare parameters <nl> DMLC_DECLARE_PARAMETER ( ImageAugmentParam ) { <nl> - DMLC_DECLARE_FIELD ( rand_crop ) . set_default ( true ) <nl> + DMLC_DECLARE_FIELD ( rand_crop ) . set_default ( false ) <nl> . describe ( " Augmentation Param : Whether to random crop on the image " ) ; <nl> DMLC_DECLARE_FIELD ( crop_y_start ) . set_default ( - 1 ) <nl> . describe ( " Augmentation Param : Where to nonrandom crop on y . " ) ; <nl> struct ImageAugmentParam : public dmlc : : Parameter < ImageAugmentParam > { <nl> . describe ( " Augmentation Param : Rotate angle . " ) ; <nl> DMLC_DECLARE_FIELD ( fill_value ) . set_default ( 255 ) <nl> . describe ( " Augmentation Param : Maximum value of illumination variation . " ) ; <nl> - DMLC_DECLARE_FIELD ( silent ) . set_default ( true ) <nl> - . describe ( " Augmentation Param : Whether to print augmentor info . " ) ; <nl> DMLC_DECLARE_FIELD ( data_shape ) <nl> . set_expect_ndim ( 3 ) . enforce_nonzero ( ) <nl> . describe ( " Dataset Param : Shape of each instance generated by the DataIter . " ) ; <nl> mmm a / src / operator / activation - inl . h <nl> ppp b / src / operator / activation - inl . h <nl> struct ActivationParam : public dmlc : : Parameter < ActivationParam > { <nl> / / use int for enumeration <nl> int act_type ; <nl> DMLC_DECLARE_PARAMETER ( ActivationParam ) { <nl> - DMLC_DECLARE_FIELD ( act_type ) . set_default ( kReLU ) <nl> + DMLC_DECLARE_FIELD ( act_type ) <nl> . add_enum ( " relu " , kReLU ) <nl> . add_enum ( " sigmoid " , kSigmoid ) <nl> . add_enum ( " tanh " , kTanh ) <nl> mmm a / src / operator / pooling - inl . h <nl> ppp b / src / operator / pooling - inl . h <nl> struct PoolingParam : public dmlc : : Parameter < PoolingParam > { <nl> . set_expect_ndim ( 2 ) . enforce_nonzero ( ) <nl> . describe ( " pooling kernel size : ( y , x ) " ) ; <nl> <nl> - DMLC_DECLARE_FIELD ( pool_type ) . set_default ( kMaxPooling ) <nl> + DMLC_DECLARE_FIELD ( pool_type ) <nl> . add_enum ( " max " , kMaxPooling ) <nl> . add_enum ( " avg " , kAvgPooling ) <nl> . add_enum ( " sum " , kSumPooling ) <nl> mmm a / src / symbol / graph_executor . cc <nl> ppp b / src / symbol / graph_executor . cc <nl> void GraphExecutor : : InitResources ( ) { <nl> CHECK_LE ( cnt , 1 ) < < " Node can only have one temp space request " ; <nl> req_temp_cnt [ nid ] = cnt ; <nl> } <nl> - uint32_t num_color = kMaxNumColor ; <nl> + / / restrict allocation to maximum number of parallelism per device <nl> + uint32_t num_color = std : : min ( static_cast < uint32_t > ( common : : GetNumThreadPerGPU ( ) ) , <nl> + kMaxNumColor ) ; <nl> std : : vector < uint32_t > req_temp_color ; <nl> / / use graph coloring to find node that won ' t run in parallel <nl> num_color = graph : : ColorNodeGroup ( graph_ , topo_order_ , req_temp_cnt , <nl> mmm a / tests / python / unittest / test_symbol . py <nl> ppp b / tests / python / unittest / test_symbol . py <nl> def test_symbol_compose ( ) : <nl> ' fc2_weight ' , ' fc2_bias ' ] <nl> <nl> net2 = mx . symbol . FullyConnected ( name = ' fc3 ' , num_hidden = 10 ) <nl> - net2 = mx . symbol . Activation ( data = net2 ) <nl> + net2 = mx . symbol . Activation ( data = net2 , act_type = ' relu ' ) <nl> net2 = mx . symbol . FullyConnected ( data = net2 , name = ' fc4 ' , num_hidden = 20 ) <nl> print ( net2 . debug_str ( ) ) <nl> <nl> | [ PARAMETER ] Remove default setting of op , make resource allocation conservative | apache/incubator-mxnet | 6f7873acd1a1c93d6291165b56e7c239c1d37036 | 2015-09-26T03:58:19Z |
mmm a / hphp / hack / src / errors / errors . ml <nl> ppp b / hphp / hack / src / errors / errors . ml <nl> let extend_sealed child_pos parent_pos parent_name parent_kind verb = <nl> parent_pos , " Declaration is here " <nl> ] <nl> <nl> - let trait_implement_sealed child_pos parent_pos parent_name = <nl> - let name = ( strip_ns parent_name ) in <nl> - add_list ( Typing . err_code Typing . ExtendSealed ) [ <nl> - child_pos , ( <nl> - " A trait cannot implement sealed interface " ^ name ^ <nl> - " . Use ` require implements ` instead " ) ; <nl> - parent_pos , " Declaration is here " <nl> - ] <nl> - <nl> let extend_ppl <nl> child_pos child_class_type child_is_ppl parent_pos parent_class_type parent_name verb = <nl> let name = ( strip_ns parent_name ) in <nl> mmm a / hphp / hack / src / errors / errors_sig . ml <nl> ppp b / hphp / hack / src / errors / errors_sig . ml <nl> module type S = sig <nl> val sketchy_null_check_primitive : Pos . t - > string option - > [ < ` Coalesce | ` Eq | ` Neq ] - > unit <nl> val extend_final : Pos . t - > Pos . t - > string - > unit <nl> val extend_sealed : Pos . t - > Pos . t - > string - > string - > string - > unit <nl> - val trait_implement_sealed : Pos . t - > Pos . t - > string - > unit <nl> val extend_ppl : Pos . t - > string - > bool - > Pos . t - > string - > string - > string - > unit <nl> val sealed_final : Pos . t - > string - > unit <nl> val unsealable : Pos . t - > string - > unit <nl> mmm a / hphp / hack / src / typing / typing . ml <nl> ppp b / hphp / hack / src / typing / typing . ml <nl> and check_parent_sealed child_type parent_type = <nl> if not ( SSet . mem child_name whitelist ) <nl> then Errors . extend_sealed child_pos parent_pos parent_name kind action in <nl> begin match parent_type . dc_kind , child_type . tc_kind with <nl> - | Ast . Cinterface , Ast . Ctrait - > <nl> - Errors . trait_implement_sealed child_pos parent_pos parent_name <nl> | Ast . Cinterface , Ast . Cinterface - > check " interface " " extend " <nl> | Ast . Cinterface , _ - > check " interface " " implement " <nl> | Ast . Ctrait , _ - > check " trait " " use " <nl> mmm a / hphp / hack / test / typecheck / sealed / trait . php . exp <nl> ppp b / hphp / hack / test / typecheck / sealed / trait . php . exp <nl> <nl> File " trait . php " , line 7 , characters 7 - 7 : <nl> - A trait cannot implement sealed interface A . Use ` require implements ` instead ( Typing [ 4238 ] ) <nl> + You cannot implement sealed interface A ( Typing [ 4238 ] ) <nl> File " trait . php " , line 5 , characters 11 - 11 : <nl> Declaration is here <nl> new file mode 100644 <nl> index 00000000000 . . 761f7570692 <nl> mmm / dev / null <nl> ppp b / hphp / hack / test / typecheck / sealed / trait5 . php <nl> <nl> + < ? hh / / strict <nl> + <nl> + < < __Sealed ( SomeTrait : : class ) > > <nl> + interface SomeInterface { } <nl> + <nl> + trait SomeTrait implements SomeInterface { } <nl> + <nl> + trait SomeTrait2 { <nl> + use SomeTrait ; <nl> + } <nl> new file mode 100644 <nl> index 00000000000 . . 4269126fceb <nl> mmm / dev / null <nl> ppp b / hphp / hack / test / typecheck / sealed / trait5 . php . exp <nl> @ @ - 0 , 0 + 1 @ @ <nl> + No errors <nl> | Allow traits to implement sealed interfaces | facebook/hhvm | 0f94b01fb132b0b325638751baeb9e25b833bf0b | 2018-10-26T12:18:24Z |
mmm a / src / runtime / runtime - wasm . cc <nl> ppp b / src / runtime / runtime - wasm . cc <nl> RUNTIME_FUNCTION ( Runtime_WasmGrowMemory ) { <nl> instance = handle ( owning_instance , isolate ) ; <nl> } <nl> return * isolate - > factory ( ) - > NewNumberFromInt ( <nl> - wasm : : GrowInstanceMemory ( isolate , instance , delta_pages ) ) ; <nl> + wasm : : GrowMemory ( isolate , instance , delta_pages ) ) ; <nl> } <nl> <nl> RUNTIME_FUNCTION ( Runtime_WasmThrowTypeError ) { <nl> mmm a / src / wasm / wasm - js . cc <nl> ppp b / src / wasm / wasm - js . cc <nl> using v8 : : internal : : wasm : : ErrorThrower ; <nl> <nl> namespace v8 { <nl> <nl> - enum WasmMemoryObjectData { <nl> - kWasmMemoryBuffer , <nl> - kWasmMemoryMaximum , <nl> - kWasmMemoryInstanceObject <nl> - } ; <nl> - <nl> namespace { <nl> i : : Handle < i : : String > v8_str ( i : : Isolate * isolate , const char * str ) { <nl> return isolate - > factory ( ) - > NewStringFromAsciiChecked ( str ) ; <nl> void WebAssemblyInstance ( const v8 : : FunctionCallbackInfo < v8 : : Value > & args ) { <nl> i_isolate ) ; <nl> } else { <nl> thrower . TypeError ( " Argument 2 must be a WebAssembly . Memory " ) ; <nl> + return ; <nl> } <nl> } <nl> i : : MaybeHandle < i : : JSObject > instance = <nl> void WebAssemblyMemoryGrow ( const v8 : : FunctionCallbackInfo < v8 : : Value > & args ) { <nl> <nl> uint32_t delta = args [ 0 ] - > Uint32Value ( context ) . FromJust ( ) ; <nl> i : : Isolate * i_isolate = reinterpret_cast < i : : Isolate * > ( isolate ) ; <nl> - i : : Handle < i : : JSObject > receiver = <nl> - i : : Handle < i : : JSObject > : : cast ( Utils : : OpenHandle ( * args . This ( ) ) ) ; <nl> - i : : Handle < i : : Object > instance_object ( <nl> - receiver - > GetInternalField ( kWasmMemoryInstanceObject ) , i_isolate ) ; <nl> - i : : Handle < i : : WasmInstanceObject > instance ( <nl> - i : : Handle < i : : WasmInstanceObject > : : cast ( instance_object ) ) ; <nl> - <nl> - / / TODO ( gdeepti ) Implement growing memory when shared by different <nl> - / / instances . <nl> - int32_t ret = internal : : wasm : : GrowInstanceMemory ( i_isolate , instance , delta ) ; <nl> + i : : Handle < i : : Object > receiver = <nl> + i : : Handle < i : : Object > : : cast ( Utils : : OpenHandle ( * args . This ( ) ) ) ; <nl> + int32_t ret = i : : wasm : : GrowWebAssemblyMemory ( i_isolate , receiver , delta ) ; <nl> if ( ret = = - 1 ) { <nl> v8 : : Local < v8 : : Value > e = v8 : : Exception : : Error ( <nl> v8_str ( isolate , " Unable to grow instance memory . " ) ) ; <nl> isolate - > ThrowException ( e ) ; <nl> return ; <nl> } <nl> - i : : MaybeHandle < i : : JSArrayBuffer > buffer = <nl> - internal : : wasm : : GetInstanceMemory ( i_isolate , instance ) ; <nl> - if ( buffer . is_null ( ) ) { <nl> - v8 : : Local < v8 : : Value > e = v8 : : Exception : : Error ( <nl> - v8_str ( isolate , " WebAssembly . Memory buffer object not set . " ) ) ; <nl> - isolate - > ThrowException ( e ) ; <nl> - return ; <nl> - } <nl> - receiver - > SetInternalField ( kWasmMemoryBuffer , * buffer . ToHandleChecked ( ) ) ; <nl> v8 : : ReturnValue < v8 : : Value > return_value = args . GetReturnValue ( ) ; <nl> return_value . Set ( ret ) ; <nl> } <nl> void WebAssemblyMemoryGetBuffer ( <nl> return ; <nl> } <nl> i : : Isolate * i_isolate = reinterpret_cast < i : : Isolate * > ( isolate ) ; <nl> - i : : Handle < i : : JSObject > receiver = <nl> - i : : Handle < i : : JSObject > : : cast ( Utils : : OpenHandle ( * args . This ( ) ) ) ; <nl> - i : : Handle < i : : Object > buffer ( receiver - > GetInternalField ( kWasmMemoryBuffer ) , <nl> - i_isolate ) ; <nl> + i : : Handle < i : : WasmMemoryObject > receiver = <nl> + i : : Handle < i : : WasmMemoryObject > : : cast ( Utils : : OpenHandle ( * args . This ( ) ) ) ; <nl> + i : : Handle < i : : Object > buffer ( receiver - > get_buffer ( ) , i_isolate ) ; <nl> DCHECK ( buffer - > IsJSArrayBuffer ( ) ) ; <nl> v8 : : ReturnValue < v8 : : Value > return_value = args . GetReturnValue ( ) ; <nl> return_value . Set ( Utils : : ToLocal ( buffer ) ) ; <nl> mmm a / src / wasm / wasm - module . cc <nl> ppp b / src / wasm / wasm - module . cc <nl> static void ResetCompiledModule ( Isolate * isolate , WasmInstanceObject * owner , <nl> compiled_module - > reset_memory ( ) ; <nl> } <nl> <nl> + static void MemoryInstanceFinalizer ( Isolate * isolate , <nl> + WasmInstanceObject * instance ) { <nl> + / / If the memory object is destroyed , nothing needs to be done here . <nl> + if ( ! instance - > has_memory_object ( ) ) return ; <nl> + Handle < WasmInstanceWrapper > instance_wrapper = <nl> + handle ( instance - > get_instance_wrapper ( ) ) ; <nl> + DCHECK ( WasmInstanceWrapper : : IsWasmInstanceWrapper ( * instance_wrapper ) ) ; <nl> + DCHECK ( instance_wrapper - > has_instance ( ) ) ; <nl> + bool has_prev = instance_wrapper - > has_previous ( ) ; <nl> + bool has_next = instance_wrapper - > has_next ( ) ; <nl> + Handle < WasmMemoryObject > memory_object ( instance - > get_memory_object ( ) ) ; <nl> + <nl> + if ( ! has_prev & & ! has_next ) { <nl> + memory_object - > ResetInstancesLink ( isolate ) ; <nl> + return ; <nl> + } else { <nl> + Handle < WasmInstanceWrapper > next_wrapper , prev_wrapper ; <nl> + if ( ! has_prev ) { <nl> + Handle < WasmInstanceWrapper > next_wrapper = <nl> + instance_wrapper - > next_wrapper ( ) ; <nl> + next_wrapper - > reset_previous_wrapper ( ) ; <nl> + / / As this is the first link in the memory object , destroying <nl> + / / without updating memory object would corrupt the instance chain in <nl> + / / the memory object . <nl> + memory_object - > set_instances_link ( * next_wrapper ) ; <nl> + } else if ( ! has_next ) { <nl> + instance_wrapper - > previous_wrapper ( ) - > reset_next_wrapper ( ) ; <nl> + } else { <nl> + DCHECK ( has_next & & has_prev ) ; <nl> + Handle < WasmInstanceWrapper > prev_wrapper = <nl> + instance_wrapper - > previous_wrapper ( ) ; <nl> + Handle < WasmInstanceWrapper > next_wrapper = <nl> + instance_wrapper - > next_wrapper ( ) ; <nl> + prev_wrapper - > set_next_wrapper ( * next_wrapper ) ; <nl> + next_wrapper - > set_previous_wrapper ( * prev_wrapper ) ; <nl> + } <nl> + / / Reset to avoid dangling pointers <nl> + instance_wrapper - > reset ( ) ; <nl> + } <nl> + } <nl> + <nl> static void InstanceFinalizer ( const v8 : : WeakCallbackInfo < void > & data ) { <nl> JSObject * * p = reinterpret_cast < JSObject * * > ( data . GetParameter ( ) ) ; <nl> WasmInstanceObject * owner = reinterpret_cast < WasmInstanceObject * > ( * p ) ; <nl> + Isolate * isolate = reinterpret_cast < Isolate * > ( data . GetIsolate ( ) ) ; <nl> + / / Is a link to shared memory instances exists , update the list of memory <nl> + / / instances before the instance is destroyed . <nl> + if ( owner - > has_instance_wrapper ( ) ) MemoryInstanceFinalizer ( isolate , owner ) ; <nl> WasmCompiledModule * compiled_module = owner - > get_compiled_module ( ) ; <nl> TRACE ( " Finalizing % d { \ n " , compiled_module - > instance_id ( ) ) ; <nl> - Isolate * isolate = reinterpret_cast < Isolate * > ( data . GetIsolate ( ) ) ; <nl> DCHECK ( compiled_module - > has_weak_wasm_module ( ) ) ; <nl> WeakCell * weak_wasm_module = compiled_module - > ptr_to_weak_wasm_module ( ) ; <nl> <nl> class WasmInstanceBuilder { <nl> LoadDataSegments ( nullptr , 0 ) ; <nl> } <nl> <nl> + DCHECK ( wasm : : IsWasmInstance ( * instance ) ) ; <nl> + if ( instance - > has_memory_object ( ) ) { <nl> + instance - > get_memory_object ( ) - > AddInstance ( isolate_ , instance ) ; <nl> + } <nl> + <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> / / Set up the runtime support for the new instance . <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> class WasmInstanceBuilder { <nl> v8 : : WeakCallbackType : : kFinalizer ) ; <nl> } <nl> } <nl> - <nl> - DCHECK ( wasm : : IsWasmInstance ( * instance ) ) ; <nl> - if ( instance - > has_memory_object ( ) ) { <nl> - instance - > get_memory_object ( ) - > AddInstance ( * instance ) ; <nl> - } <nl> - <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> / / Run the start function if one was specified . <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> class WasmInstanceBuilder { <nl> return - 1 ; <nl> } <nl> auto memory = Handle < WasmMemoryObject > : : cast ( object ) ; <nl> + DCHECK ( WasmJs : : IsWasmMemoryObject ( isolate_ , memory ) ) ; <nl> instance - > set_memory_object ( * memory ) ; <nl> memory_ = Handle < JSArrayBuffer > ( memory - > get_buffer ( ) , isolate_ ) ; <nl> break ; <nl> class WasmInstanceBuilder { <nl> } else { <nl> memory_object = Handle < WasmMemoryObject > ( <nl> instance - > get_memory_object ( ) , isolate_ ) ; <nl> + DCHECK ( WasmJs : : IsWasmMemoryObject ( isolate_ , memory_object ) ) ; <nl> + memory_object - > ResetInstancesLink ( isolate_ ) ; <nl> } <nl> <nl> desc . set_value ( memory_object ) ; <nl> bool wasm : : ValidateModuleBytes ( Isolate * isolate , const byte * start , <nl> } <nl> <nl> MaybeHandle < JSArrayBuffer > wasm : : GetInstanceMemory ( <nl> - Isolate * isolate , Handle < WasmInstanceObject > instance ) { <nl> + Isolate * isolate , Handle < WasmInstanceObject > object ) { <nl> + auto instance = Handle < WasmInstanceObject > : : cast ( object ) ; <nl> if ( instance - > has_memory_buffer ( ) ) { <nl> return Handle < JSArrayBuffer > ( instance - > get_memory_buffer ( ) , isolate ) ; <nl> } <nl> void SetInstanceMemory ( Handle < WasmInstanceObject > instance , <nl> <nl> int32_t wasm : : GetInstanceMemorySize ( Isolate * isolate , <nl> Handle < WasmInstanceObject > instance ) { <nl> + DCHECK ( IsWasmInstance ( * instance ) ) ; <nl> MaybeHandle < JSArrayBuffer > maybe_mem_buffer = <nl> GetInstanceMemory ( isolate , instance ) ; <nl> Handle < JSArrayBuffer > buffer ; <nl> uint32_t GetMaxInstanceMemorySize ( Isolate * isolate , <nl> return WasmModule : : kV8MaxPages ; <nl> } <nl> <nl> - int32_t wasm : : GrowInstanceMemory ( Isolate * isolate , <nl> - Handle < WasmInstanceObject > instance , <nl> - uint32_t pages ) { <nl> - if ( pages = = 0 ) return GetInstanceMemorySize ( isolate , instance ) ; <nl> - uint32_t max_pages = GetMaxInstanceMemorySize ( isolate , instance ) ; <nl> - <nl> - Address old_mem_start = nullptr ; <nl> - uint32_t old_size = 0 , new_size = 0 ; <nl> - <nl> - MaybeHandle < JSArrayBuffer > maybe_mem_buffer = <nl> - GetInstanceMemory ( isolate , instance ) ; <nl> + Handle < JSArrayBuffer > GrowMemoryBuffer ( Isolate * isolate , <nl> + MaybeHandle < JSArrayBuffer > buffer , <nl> + uint32_t pages , uint32_t max_pages ) { <nl> Handle < JSArrayBuffer > old_buffer ; <nl> - if ( ! maybe_mem_buffer . ToHandle ( & old_buffer ) | | <nl> - old_buffer - > backing_store ( ) = = nullptr ) { <nl> - / / If module object does not have linear memory associated with it , <nl> - / / Allocate new array buffer of given size . <nl> - new_size = pages * WasmModule : : kPageSize ; <nl> - if ( max_pages < pages ) return - 1 ; <nl> - } else { <nl> + Address old_mem_start = nullptr ; <nl> + uint32_t old_size = 0 ; <nl> + if ( buffer . ToHandle ( & old_buffer ) & & old_buffer - > backing_store ( ) ! = nullptr ) { <nl> old_mem_start = static_cast < Address > ( old_buffer - > backing_store ( ) ) ; <nl> - old_size = old_buffer - > byte_length ( ) - > Number ( ) ; <nl> - / / If the old memory was zero - sized , we should have been in the <nl> - / / " undefined " case above . <nl> DCHECK_NOT_NULL ( old_mem_start ) ; <nl> - DCHECK ( old_size + pages * WasmModule : : kPageSize < = <nl> - std : : numeric_limits < uint32_t > : : max ( ) ) ; <nl> - new_size = old_size + pages * WasmModule : : kPageSize ; <nl> + old_size = old_buffer - > byte_length ( ) - > Number ( ) ; <nl> } <nl> - <nl> + DCHECK ( old_size + pages * WasmModule : : kPageSize < = <nl> + std : : numeric_limits < uint32_t > : : max ( ) ) ; <nl> + uint32_t new_size = old_size + pages * WasmModule : : kPageSize ; <nl> if ( new_size < = old_size | | max_pages * WasmModule : : kPageSize < new_size | | <nl> WasmModule : : kV8MaxPages * WasmModule : : kPageSize < new_size ) { <nl> - return - 1 ; <nl> + return Handle < JSArrayBuffer > : : null ( ) ; <nl> } <nl> <nl> - Handle < JSArrayBuffer > buffer ; <nl> - <nl> + Handle < JSArrayBuffer > new_buffer ; <nl> if ( ! old_buffer . is_null ( ) & & old_buffer - > has_guard_region ( ) ) { <nl> / / We don ' t move the backing store , we simply change the protection to make <nl> / / more of it accessible . <nl> int32_t wasm : : GrowInstanceMemory ( Isolate * isolate , <nl> Handle < Object > new_size_object = <nl> isolate - > factory ( ) - > NewNumberFromSize ( new_size ) ; <nl> old_buffer - > set_byte_length ( * new_size_object ) ; <nl> - <nl> - SetInstanceMemory ( instance , * old_buffer ) ; <nl> - Handle < FixedArray > code_table = <nl> - instance - > get_compiled_module ( ) - > code_table ( ) ; <nl> - RelocateMemoryReferencesInCode ( code_table , old_mem_start , old_mem_start , <nl> - old_size , new_size ) ; <nl> - buffer = old_buffer ; <nl> + new_buffer = old_buffer ; <nl> } else { <nl> const bool enable_guard_regions = false ; <nl> - buffer = NewArrayBuffer ( isolate , new_size , enable_guard_regions ) ; <nl> - if ( buffer . is_null ( ) ) return - 1 ; <nl> - Address new_mem_start = static_cast < Address > ( buffer - > backing_store ( ) ) ; <nl> + new_buffer = NewArrayBuffer ( isolate , new_size , enable_guard_regions ) ; <nl> + if ( new_buffer . is_null ( ) ) return new_buffer ; <nl> + Address new_mem_start = static_cast < Address > ( new_buffer - > backing_store ( ) ) ; <nl> if ( old_size ! = 0 ) { <nl> memcpy ( new_mem_start , old_mem_start , old_size ) ; <nl> } <nl> - SetInstanceMemory ( instance , * buffer ) ; <nl> - Handle < FixedArray > code_table = <nl> - instance - > get_compiled_module ( ) - > code_table ( ) ; <nl> - RelocateMemoryReferencesInCode ( code_table , old_mem_start , new_mem_start , <nl> - old_size , new_size ) ; <nl> } <nl> + return new_buffer ; <nl> + } <nl> <nl> - SetInstanceMemory ( instance , * buffer ) ; <nl> - if ( instance - > has_memory_object ( ) ) { <nl> - instance - > get_memory_object ( ) - > set_buffer ( * buffer ) ; <nl> - } <nl> + void UncheckedUpdateInstanceMemory ( Isolate * isolate , <nl> + Handle < WasmInstanceObject > instance , <nl> + Address old_mem_start , uint32_t old_size ) { <nl> + DCHECK ( instance - > has_memory_buffer ( ) ) ; <nl> + Handle < JSArrayBuffer > new_buffer ( instance - > get_memory_buffer ( ) ) ; <nl> + uint32_t new_size = new_buffer - > byte_length ( ) - > Number ( ) ; <nl> + DCHECK ( new_size < = std : : numeric_limits < uint32_t > : : max ( ) ) ; <nl> + Address new_mem_start = static_cast < Address > ( new_buffer - > backing_store ( ) ) ; <nl> + DCHECK_NOT_NULL ( new_mem_start ) ; <nl> + Handle < FixedArray > code_table = instance - > get_compiled_module ( ) - > code_table ( ) ; <nl> + RelocateMemoryReferencesInCode ( code_table , old_mem_start , new_mem_start , <nl> + old_size , new_size ) ; <nl> + } <nl> + <nl> + int32_t wasm : : GrowWebAssemblyMemory ( Isolate * isolate , Handle < Object > receiver , <nl> + uint32_t pages ) { <nl> + DCHECK ( WasmJs : : IsWasmMemoryObject ( isolate , receiver ) ) ; <nl> + Handle < WasmMemoryObject > memory_object ( WasmMemoryObject : : cast ( * receiver ) ) ; <nl> + Handle < WasmInstanceWrapper > instance_wrapper ( <nl> + memory_object - > get_instances_link ( ) ) ; <nl> + DCHECK ( WasmInstanceWrapper : : IsWasmInstanceWrapper ( * instance_wrapper ) ) ; <nl> + DCHECK ( instance_wrapper - > has_instance ( ) ) ; <nl> + Handle < WasmInstanceObject > instance = instance_wrapper - > instance_object ( ) ; <nl> + DCHECK ( IsWasmInstance ( * instance ) ) ; <nl> + if ( pages = = 0 ) return GetInstanceMemorySize ( isolate , instance ) ; <nl> + uint32_t max_pages = GetMaxInstanceMemorySize ( isolate , instance ) ; <nl> <nl> + / / Grow memory object buffer and update instances associated with it . <nl> + MaybeHandle < JSArrayBuffer > memory_buffer = <nl> + handle ( memory_object - > get_buffer ( ) ) ; <nl> + Handle < JSArrayBuffer > old_buffer ; <nl> + uint32_t old_size = 0 ; <nl> + Address old_mem_start = nullptr ; <nl> + if ( memory_buffer . ToHandle ( & old_buffer ) & & <nl> + old_buffer - > backing_store ( ) ! = nullptr ) { <nl> + old_size = old_buffer - > byte_length ( ) - > Number ( ) ; <nl> + old_mem_start = static_cast < Address > ( old_buffer - > backing_store ( ) ) ; <nl> + } <nl> + Handle < JSArrayBuffer > new_buffer = <nl> + GrowMemoryBuffer ( isolate , memory_buffer , pages , max_pages ) ; <nl> + if ( new_buffer . is_null ( ) ) return - 1 ; <nl> + DCHECK ( ! instance_wrapper - > has_previous ( ) ) ; <nl> + SetInstanceMemory ( instance , * new_buffer ) ; <nl> + UncheckedUpdateInstanceMemory ( isolate , instance , old_mem_start , old_size ) ; <nl> + while ( instance_wrapper - > has_next ( ) ) { <nl> + instance_wrapper = instance_wrapper - > next_wrapper ( ) ; <nl> + DCHECK ( WasmInstanceWrapper : : IsWasmInstanceWrapper ( * instance_wrapper ) ) ; <nl> + Handle < WasmInstanceObject > instance = instance_wrapper - > instance_object ( ) ; <nl> + DCHECK ( IsWasmInstance ( * instance ) ) ; <nl> + SetInstanceMemory ( instance , * new_buffer ) ; <nl> + UncheckedUpdateInstanceMemory ( isolate , instance , old_mem_start , old_size ) ; <nl> + } <nl> + memory_object - > set_buffer ( * new_buffer ) ; <nl> DCHECK ( old_size % WasmModule : : kPageSize = = 0 ) ; <nl> return ( old_size / WasmModule : : kPageSize ) ; <nl> } <nl> <nl> + int32_t wasm : : GrowMemory ( Isolate * isolate , Handle < WasmInstanceObject > instance , <nl> + uint32_t pages ) { <nl> + if ( ! IsWasmInstance ( * instance ) ) return - 1 ; <nl> + if ( pages = = 0 ) return GetInstanceMemorySize ( isolate , instance ) ; <nl> + Handle < WasmInstanceObject > instance_obj ( WasmInstanceObject : : cast ( * instance ) ) ; <nl> + if ( ! instance_obj - > has_memory_object ( ) ) { <nl> + / / No other instances to grow , grow just the one . <nl> + MaybeHandle < JSArrayBuffer > instance_buffer = <nl> + GetInstanceMemory ( isolate , instance ) ; <nl> + Handle < JSArrayBuffer > old_buffer ; <nl> + uint32_t old_size = 0 ; <nl> + Address old_mem_start = nullptr ; <nl> + if ( instance_buffer . ToHandle ( & old_buffer ) & & <nl> + old_buffer - > backing_store ( ) ! = nullptr ) { <nl> + old_size = old_buffer - > byte_length ( ) - > Number ( ) ; <nl> + old_mem_start = static_cast < Address > ( old_buffer - > backing_store ( ) ) ; <nl> + } <nl> + uint32_t max_pages = GetMaxInstanceMemorySize ( isolate , instance_obj ) ; <nl> + Handle < JSArrayBuffer > buffer = <nl> + GrowMemoryBuffer ( isolate , instance_buffer , pages , max_pages ) ; <nl> + if ( buffer . is_null ( ) ) return - 1 ; <nl> + SetInstanceMemory ( instance , * buffer ) ; <nl> + UncheckedUpdateInstanceMemory ( isolate , instance , old_mem_start , old_size ) ; <nl> + DCHECK ( old_size % WasmModule : : kPageSize = = 0 ) ; <nl> + return ( old_size / WasmModule : : kPageSize ) ; <nl> + } else { <nl> + return GrowWebAssemblyMemory ( <nl> + isolate , handle ( instance_obj - > get_memory_object ( ) ) , pages ) ; <nl> + } <nl> + } <nl> + <nl> void testing : : ValidateInstancesChain ( Isolate * isolate , <nl> Handle < WasmModuleObject > module_obj , <nl> int instance_count ) { <nl> mmm a / src / wasm / wasm - module . h <nl> ppp b / src / wasm / wasm - module . h <nl> int32_t GrowInstanceMemory ( Isolate * isolate , <nl> Handle < JSArrayBuffer > NewArrayBuffer ( Isolate * isolate , size_t size , <nl> bool enable_guard_regions ) ; <nl> <nl> + int32_t GrowWebAssemblyMemory ( Isolate * isolate , Handle < Object > receiver , <nl> + uint32_t pages ) ; <nl> + <nl> + int32_t GrowMemory ( Isolate * isolate , Handle < WasmInstanceObject > instance , <nl> + uint32_t pages ) ; <nl> + <nl> void UpdateDispatchTables ( Isolate * isolate , Handle < FixedArray > dispatch_tables , <nl> int index , Handle < JSFunction > js_function ) ; <nl> <nl> mmm a / src / wasm / wasm - objects . cc <nl> ppp b / src / wasm / wasm - objects . cc <nl> Handle < WasmMemoryObject > WasmMemoryObject : : New ( Isolate * isolate , <nl> int maximum ) { <nl> Handle < JSFunction > memory_ctor ( <nl> isolate - > native_context ( ) - > wasm_memory_constructor ( ) ) ; <nl> - Handle < JSObject > memory_obj = isolate - > factory ( ) - > NewJSObject ( memory_ctor ) ; <nl> + Handle < JSObject > memory_obj = <nl> + isolate - > factory ( ) - > NewJSObject ( memory_ctor , TENURED ) ; <nl> memory_obj - > SetInternalField ( kArrayBuffer , * buffer ) ; <nl> memory_obj - > SetInternalField ( kMaximum , <nl> static_cast < Object * > ( Smi : : FromInt ( maximum ) ) ) ; <nl> Handle < WasmMemoryObject > WasmMemoryObject : : New ( Isolate * isolate , <nl> } <nl> <nl> DEFINE_ACCESSORS ( WasmMemoryObject , buffer , kArrayBuffer , JSArrayBuffer ) <nl> + DEFINE_OPTIONAL_ACCESSORS ( WasmMemoryObject , instances_link , kInstancesLink , <nl> + WasmInstanceWrapper ) <nl> <nl> uint32_t WasmMemoryObject : : current_pages ( ) { <nl> return SafeUint32 ( get_buffer ( ) - > byte_length ( ) ) / wasm : : WasmModule : : kPageSize ; <nl> WasmMemoryObject * WasmMemoryObject : : cast ( Object * object ) { <nl> return reinterpret_cast < WasmMemoryObject * > ( object ) ; <nl> } <nl> <nl> - void WasmMemoryObject : : AddInstance ( WasmInstanceObject * instance ) { <nl> - / / TODO ( gdeepti ) : This should be a weak list of instance objects <nl> - / / for instances that share memory . <nl> - SetInternalField ( kInstance , instance ) ; <nl> + void WasmMemoryObject : : AddInstance ( Isolate * isolate , <nl> + Handle < WasmInstanceObject > instance ) { <nl> + Handle < WasmInstanceWrapper > instance_wrapper ; <nl> + if ( has_instances_link ( ) ) { <nl> + Handle < WasmInstanceWrapper > current_wrapper ( get_instances_link ( ) ) ; <nl> + DCHECK ( WasmInstanceWrapper : : IsWasmInstanceWrapper ( * current_wrapper ) ) ; <nl> + DCHECK ( ! current_wrapper - > has_previous ( ) ) ; <nl> + instance_wrapper = WasmInstanceWrapper : : New ( isolate , instance ) ; <nl> + instance_wrapper - > set_next_wrapper ( * current_wrapper ) ; <nl> + current_wrapper - > set_previous_wrapper ( * instance_wrapper ) ; <nl> + } else { <nl> + instance_wrapper = WasmInstanceWrapper : : New ( isolate , instance ) ; <nl> + } <nl> + set_instances_link ( * instance_wrapper ) ; <nl> + instance - > set_instance_wrapper ( * instance_wrapper ) ; <nl> + } <nl> + <nl> + void WasmMemoryObject : : ResetInstancesLink ( Isolate * isolate ) { <nl> + Handle < Object > undefined = isolate - > factory ( ) - > undefined_value ( ) ; <nl> + SetInternalField ( kInstancesLink , * undefined ) ; <nl> } <nl> <nl> DEFINE_ACCESSORS ( WasmInstanceObject , compiled_module , kCompiledModule , <nl> DEFINE_OPTIONAL_ACCESSORS ( WasmInstanceObject , memory_object , kMemoryObject , <nl> WasmMemoryObject ) <nl> DEFINE_OPTIONAL_ACCESSORS ( WasmInstanceObject , debug_info , kDebugInfo , <nl> WasmDebugInfo ) <nl> + DEFINE_OPTIONAL_ACCESSORS ( WasmInstanceObject , instance_wrapper , <nl> + kWasmMemInstanceWrapper , WasmInstanceWrapper ) <nl> <nl> WasmModuleObject * WasmInstanceObject : : module_object ( ) { <nl> return WasmModuleObject : : cast ( * get_compiled_module ( ) - > wasm_module ( ) ) ; <nl> bool WasmCompiledModule : : GetPositionInfo ( uint32_t position , <nl> info - > line_end = function . code_end_offset ; <nl> return true ; <nl> } <nl> + <nl> + Handle < WasmInstanceWrapper > WasmInstanceWrapper : : New ( <nl> + Isolate * isolate , Handle < WasmInstanceObject > instance ) { <nl> + Handle < FixedArray > array = <nl> + isolate - > factory ( ) - > NewFixedArray ( kWrapperPropertyCount , TENURED ) ; <nl> + Handle < WasmInstanceWrapper > instance_wrapper ( <nl> + reinterpret_cast < WasmInstanceWrapper * > ( * array ) , isolate ) ; <nl> + instance_wrapper - > set_instance_object ( instance , isolate ) ; <nl> + return instance_wrapper ; <nl> + } <nl> + <nl> + bool WasmInstanceWrapper : : IsWasmInstanceWrapper ( Object * obj ) { <nl> + if ( ! obj - > IsFixedArray ( ) ) return false ; <nl> + FixedArray * array = FixedArray : : cast ( obj ) ; <nl> + if ( array - > length ( ) ! = kWrapperPropertyCount ) return false ; <nl> + if ( ! array - > get ( kWrapperInstanceObject ) - > IsWeakCell ( ) ) return false ; <nl> + Isolate * isolate = array - > GetIsolate ( ) ; <nl> + if ( ! array - > get ( kNextInstanceWrapper ) - > IsUndefined ( isolate ) & & <nl> + ! array - > get ( kNextInstanceWrapper ) - > IsFixedArray ( ) ) <nl> + return false ; <nl> + if ( ! array - > get ( kPreviousInstanceWrapper ) - > IsUndefined ( isolate ) & & <nl> + ! array - > get ( kPreviousInstanceWrapper ) - > IsFixedArray ( ) ) <nl> + return false ; <nl> + return true ; <nl> + } <nl> + <nl> + void WasmInstanceWrapper : : set_instance_object ( Handle < JSObject > instance , <nl> + Isolate * isolate ) { <nl> + Handle < WeakCell > cell = isolate - > factory ( ) - > NewWeakCell ( instance ) ; <nl> + set ( kWrapperInstanceObject , * cell ) ; <nl> + } <nl> mmm a / src / wasm / wasm - objects . h <nl> ppp b / src / wasm / wasm - objects . h <nl> struct WasmModule ; <nl> class WasmCompiledModule ; <nl> class WasmDebugInfo ; <nl> class WasmInstanceObject ; <nl> + class WasmInstanceWrapper ; <nl> <nl> # define DECLARE_CASTS ( name ) \ <nl> static bool Is # # name ( Object * object ) ; \ <nl> class WasmTableObject : public JSObject { <nl> class WasmMemoryObject : public JSObject { <nl> public : <nl> / / TODO ( titzer ) : add the brand as an internal field instead of a property . <nl> - enum Fields : uint8_t { kArrayBuffer , kMaximum , kInstance , kFieldCount } ; <nl> + enum Fields : uint8_t { kArrayBuffer , kMaximum , kInstancesLink , kFieldCount } ; <nl> <nl> DECLARE_CASTS ( WasmMemoryObject ) ; <nl> DECLARE_ACCESSORS ( buffer , JSArrayBuffer ) ; <nl> + DECLARE_OPTIONAL_ACCESSORS ( instances_link , WasmInstanceWrapper ) ; <nl> <nl> - void AddInstance ( WasmInstanceObject * object ) ; <nl> + void AddInstance ( Isolate * isolate , Handle < WasmInstanceObject > object ) ; <nl> + void ResetInstancesLink ( Isolate * isolate ) ; <nl> uint32_t current_pages ( ) ; <nl> int32_t maximum_pages ( ) ; / / returns < 0 if there is no maximum <nl> <nl> class WasmInstanceObject : public JSObject { <nl> kMemoryArrayBuffer , <nl> kGlobalsArrayBuffer , <nl> kDebugInfo , <nl> + kWasmMemInstanceWrapper , <nl> kFieldCount <nl> } ; <nl> <nl> class WasmInstanceObject : public JSObject { <nl> DECLARE_OPTIONAL_ACCESSORS ( memory_buffer , JSArrayBuffer ) ; <nl> DECLARE_OPTIONAL_ACCESSORS ( memory_object , WasmMemoryObject ) ; <nl> DECLARE_OPTIONAL_ACCESSORS ( debug_info , WasmDebugInfo ) ; <nl> + DECLARE_OPTIONAL_ACCESSORS ( instance_wrapper , WasmInstanceWrapper ) ; <nl> <nl> WasmModuleObject * module_object ( ) ; <nl> wasm : : WasmModule * module ( ) ; <nl> class WasmDebugInfo : public FixedArray { <nl> int func_index , int byte_offset ) ; <nl> } ; <nl> <nl> + class WasmInstanceWrapper : public FixedArray { <nl> + public : <nl> + static Handle < WasmInstanceWrapper > New ( Isolate * isolate , <nl> + Handle < WasmInstanceObject > instance ) ; <nl> + static WasmInstanceWrapper * cast ( Object * fixed_array ) { <nl> + SLOW_DCHECK ( IsWasmInstanceWrapper ( fixed_array ) ) ; <nl> + return reinterpret_cast < WasmInstanceWrapper * > ( fixed_array ) ; <nl> + } <nl> + static bool IsWasmInstanceWrapper ( Object * obj ) ; <nl> + bool has_instance ( ) { return get ( kWrapperInstanceObject ) - > IsWeakCell ( ) ; } <nl> + Handle < WasmInstanceObject > instance_object ( ) { <nl> + Object * obj = get ( kWrapperInstanceObject ) ; <nl> + DCHECK ( obj - > IsWeakCell ( ) ) ; <nl> + WeakCell * cell = WeakCell : : cast ( obj ) ; <nl> + DCHECK ( cell - > value ( ) - > IsJSObject ( ) ) ; <nl> + return handle ( WasmInstanceObject : : cast ( cell - > value ( ) ) ) ; <nl> + } <nl> + bool has_next ( ) { return IsWasmInstanceWrapper ( get ( kNextInstanceWrapper ) ) ; } <nl> + bool has_previous ( ) { <nl> + return IsWasmInstanceWrapper ( get ( kPreviousInstanceWrapper ) ) ; <nl> + } <nl> + void set_instance_object ( Handle < JSObject > instance , Isolate * isolate ) ; <nl> + void set_next_wrapper ( Object * obj ) { <nl> + DCHECK ( IsWasmInstanceWrapper ( obj ) ) ; <nl> + set ( kNextInstanceWrapper , obj ) ; <nl> + } <nl> + void set_previous_wrapper ( Object * obj ) { <nl> + DCHECK ( IsWasmInstanceWrapper ( obj ) ) ; <nl> + set ( kPreviousInstanceWrapper , obj ) ; <nl> + } <nl> + Handle < WasmInstanceWrapper > next_wrapper ( ) { <nl> + Object * obj = get ( kNextInstanceWrapper ) ; <nl> + DCHECK ( IsWasmInstanceWrapper ( obj ) ) ; <nl> + return handle ( WasmInstanceWrapper : : cast ( obj ) ) ; <nl> + } <nl> + Handle < WasmInstanceWrapper > previous_wrapper ( ) { <nl> + Object * obj = get ( kPreviousInstanceWrapper ) ; <nl> + DCHECK ( IsWasmInstanceWrapper ( obj ) ) ; <nl> + return handle ( WasmInstanceWrapper : : cast ( obj ) ) ; <nl> + } <nl> + void reset_next_wrapper ( ) { set_undefined ( kNextInstanceWrapper ) ; } <nl> + void reset_previous_wrapper ( ) { set_undefined ( kPreviousInstanceWrapper ) ; } <nl> + void reset ( ) { <nl> + for ( int kID = 0 ; kID < kWrapperPropertyCount ; kID + + ) set_undefined ( kID ) ; <nl> + } <nl> + <nl> + private : <nl> + enum { <nl> + kWrapperInstanceObject , <nl> + kNextInstanceWrapper , <nl> + kPreviousInstanceWrapper , <nl> + kWrapperPropertyCount <nl> + } ; <nl> + } ; <nl> + <nl> # undef DECLARE_ACCESSORS <nl> # undef DECLARE_OPTIONAL_ACCESSORS <nl> <nl> mmm a / test / mjsunit / wasm / import - memory . js <nl> ppp b / test / mjsunit / wasm / import - memory . js <nl> load ( " test / mjsunit / wasm / wasm - module - builder . js " ) ; <nl> assertSame ( memory , instance . exports . daggle ) ; <nl> } ) ( ) ; <nl> <nl> - <nl> ( function TestImportExport ( ) { <nl> print ( " TestImportExport " ) ; <nl> var i1 ; <nl> load ( " test / mjsunit / wasm / wasm - module - builder . js " ) ; <nl> } <nl> assertEquals ( - 1 , instance . exports . grow ( 1 ) ) ; <nl> } ) ( ) ; <nl> + <nl> + ( function TestMemoryGrowWebAssemblyInstances ( ) { <nl> + print ( " TestMemoryGrowWebAssemblyInstances " ) ; <nl> + let memory = new WebAssembly . Memory ( { initial : 1 , maximum : 15 } ) ; <nl> + var builder = new WasmModuleBuilder ( ) ; <nl> + builder . addImportedMemory ( " imported_mem " ) ; <nl> + builder . addFunction ( " mem_size " , kSig_i_v ) <nl> + . addBody ( [ kExprMemorySize , kMemoryZero ] ) <nl> + . exportAs ( " mem_size " ) ; <nl> + builder . addFunction ( " grow " , kSig_i_i ) <nl> + . addBody ( [ kExprGetLocal , 0 , kExprGrowMemory , kMemoryZero ] ) <nl> + . exportFunc ( ) ; <nl> + var module = new WebAssembly . Module ( builder . toBuffer ( ) ) ; <nl> + var instances = [ ] ; <nl> + for ( var i = 0 ; i < 6 ; i + + ) { <nl> + instances . push ( new WebAssembly . Instance ( module , { imported_mem : memory } ) ) ; <nl> + } <nl> + function verify_mem_size ( expected_pages ) { <nl> + assertEquals ( expected_pages * kPageSize , <nl> + memory . buffer . byteLength ) ; <nl> + for ( var i = 0 ; i < 6 ; i + + ) { <nl> + assertEquals ( expected_pages , instances [ i ] . exports . mem_size ( ) ) ; <nl> + } <nl> + } <nl> + <nl> + / / Verify initial memory size <nl> + verify_mem_size ( 1 ) ; <nl> + <nl> + / / Verify memory size with interleaving calls to Memory . grow , <nl> + / / GrowMemory opcode . <nl> + var current_mem_size = 1 ; <nl> + for ( var i = 0 ; i < 5 ; i + + ) { <nl> + function grow ( pages ) { return instances [ i ] . exports . grow ( pages ) ; } <nl> + assertEquals ( current_mem_size , memory . grow ( 1 ) ) ; <nl> + verify_mem_size ( + + current_mem_size ) ; <nl> + assertEquals ( current_mem_size , instances [ i ] . exports . grow ( 1 ) ) ; <nl> + verify_mem_size ( + + current_mem_size ) ; <nl> + } <nl> + <nl> + assertThrows ( ( ) = > memory . grow ( 5 ) ) ; <nl> + } ) ( ) ; <nl> + <nl> + ( function TestImportedMemoryGrowMultipleInstances ( ) { <nl> + print ( " TestImportMemoryMultipleInstances " ) ; <nl> + let memory = new WebAssembly . Memory ( { initial : 5 , maximum : 100 } ) ; <nl> + var builder = new WasmModuleBuilder ( ) ; <nl> + builder . addImportedMemory ( " imported_mem " ) ; <nl> + builder . addFunction ( " mem_size " , kSig_i_v ) <nl> + . addBody ( [ kExprMemorySize , kMemoryZero ] ) <nl> + . exportFunc ( ) ; <nl> + builder . addFunction ( " grow " , kSig_i_i ) <nl> + . addBody ( [ kExprGetLocal , 0 , kExprGrowMemory , kMemoryZero ] ) <nl> + . exportFunc ( ) ; <nl> + var instances = [ ] ; <nl> + for ( var i = 0 ; i < 5 ; i + + ) { <nl> + instances . push ( builder . instantiate ( { imported_mem : memory } ) ) ; <nl> + } <nl> + function grow_instance_0 ( pages ) { return instances [ 0 ] . exports . grow ( pages ) ; } <nl> + function grow_instance_1 ( pages ) { return instances [ 1 ] . exports . grow ( pages ) ; } <nl> + function grow_instance_2 ( pages ) { return instances [ 2 ] . exports . grow ( pages ) ; } <nl> + function grow_instance_3 ( pages ) { return instances [ 3 ] . exports . grow ( pages ) ; } <nl> + function grow_instance_4 ( pages ) { return instances [ 4 ] . exports . grow ( pages ) ; } <nl> + <nl> + function verify_mem_size ( expected_pages ) { <nl> + assertEquals ( expected_pages * kPageSize , memory . buffer . byteLength ) ; <nl> + for ( var i = 0 ; i < 5 ; i + + ) { <nl> + assertEquals ( expected_pages , instances [ i ] . exports . mem_size ( ) ) ; <nl> + } <nl> + } <nl> + <nl> + / / Verify initial memory size <nl> + verify_mem_size ( 5 ) ; <nl> + <nl> + / / Grow instance memory and buffer memory out of order and verify memory is <nl> + / / updated correctly . <nl> + assertEquals ( 5 , grow_instance_0 ( 7 ) ) ; <nl> + verify_mem_size ( 12 ) ; <nl> + <nl> + assertEquals ( 12 , memory . grow ( 4 ) ) ; <nl> + verify_mem_size ( 16 ) ; <nl> + <nl> + assertEquals ( 16 , grow_instance_4 ( 1 ) ) ; <nl> + verify_mem_size ( 17 ) ; <nl> + <nl> + assertEquals ( 17 , grow_instance_1 ( 6 ) ) ; <nl> + verify_mem_size ( 23 ) ; <nl> + <nl> + assertEquals ( 23 , grow_instance_3 ( 2 ) ) ; <nl> + verify_mem_size ( 25 ) ; <nl> + <nl> + assertEquals ( 25 , memory . grow ( 10 ) ) ; <nl> + verify_mem_size ( 35 ) ; <nl> + <nl> + assertEquals ( 35 , grow_instance_2 ( 15 ) ) ; <nl> + verify_mem_size ( 50 ) ; <nl> + assertThrows ( ( ) = > memory . grow ( 51 ) ) ; <nl> + } ) ( ) ; <nl> + <nl> + ( function TestExportImportedMemoryGrowMultipleInstances ( ) { <nl> + / / TODO ( gdeepti ) : Exported memory objects currently do not take max_size <nl> + / / into account so this can grow past the maximum specified in the exported <nl> + / / memory object . Assert that growing past maximum for exported objects fails . <nl> + print ( " TestExportImportedMemoryGrowMultipleInstances " ) ; <nl> + var instance ; <nl> + { <nl> + let builder = new WasmModuleBuilder ( ) ; <nl> + builder . addMemory ( 1 , 11 , true ) ; <nl> + builder . exportMemoryAs ( " exported_mem " ) ; <nl> + builder . addFunction ( " mem_size " , kSig_i_v ) <nl> + . addBody ( [ kExprMemorySize , kMemoryZero ] ) <nl> + . exportFunc ( ) ; <nl> + instance = builder . instantiate ( ) ; <nl> + } <nl> + var builder = new WasmModuleBuilder ( ) ; <nl> + builder . addImportedMemory ( " imported_mem " ) ; <nl> + builder . addFunction ( " mem_size " , kSig_i_v ) <nl> + . addBody ( [ kExprMemorySize , kMemoryZero ] ) <nl> + . exportFunc ( ) ; <nl> + builder . addFunction ( " grow " , kSig_i_i ) <nl> + . addBody ( [ kExprGetLocal , 0 , kExprGrowMemory , kMemoryZero ] ) <nl> + . exportFunc ( ) ; <nl> + var instances = [ ] ; <nl> + for ( var i = 0 ; i < 10 ; i + + ) { <nl> + instances . push ( builder . instantiate ( { <nl> + imported_mem : instance . exports . exported_mem } ) ) ; <nl> + } <nl> + function verify_mem_size ( expected_pages ) { <nl> + for ( var i = 0 ; i < 10 ; i + + ) { <nl> + assertEquals ( expected_pages , instances [ i ] . exports . mem_size ( ) ) ; <nl> + } <nl> + } <nl> + var current_mem_size = 1 ; <nl> + for ( var i = 0 ; i < 10 ; i + + ) { <nl> + function grow ( pages ) { return instances [ i ] . exports . grow ( pages ) ; } <nl> + assertEquals ( current_mem_size , instances [ i ] . exports . grow ( 1 ) ) ; <nl> + verify_mem_size ( + + current_mem_size ) ; <nl> + } <nl> + } ) ( ) ; <nl> mmm a / test / mjsunit / wasm / instantiate - module - basic . js <nl> ppp b / test / mjsunit / wasm / instantiate - module - basic . js <nl> assertFalse ( WebAssembly . validate ( bytes ( 88 , 88 , 88 , 88 , 88 , 88 , 88 , 88 ) ) ) ; <nl> } ) ( ) ; <nl> <nl> ( function MustBeMemory ( ) { <nl> + print ( " MustBeMemory . . . " ) ; <nl> var memory = new ArrayBuffer ( 65536 ) ; <nl> var module = new WebAssembly . Module ( buffer ) ; <nl> assertThrows ( ( ) = > new WebAssembly . Instance ( module , null , memory ) , TypeError ) ; <nl> new file mode 100644 <nl> index 00000000000 . . 3457ff7c899 <nl> mmm / dev / null <nl> ppp b / test / mjsunit / wasm / memory - instance - validation . js <nl> <nl> + / / Copyright 2016 the V8 project authors . All rights reserved . <nl> + / / Use of this source code is governed by a BSD - style license that can be <nl> + / / found in the LICENSE file . <nl> + <nl> + / / Flags : - - expose - wasm - - expose - gc <nl> + <nl> + load ( " test / mjsunit / wasm / wasm - constants . js " ) ; <nl> + load ( " test / mjsunit / wasm / wasm - module - builder . js " ) ; <nl> + <nl> + / / This test verifies that when instances are exported , Gc ' ed , the other <nl> + / / instances in the chain still maintain a consistent view of the memory . <nl> + ( function ValidateSharedInstanceMemory ( ) { <nl> + print ( " ValidateSharedInstanceMemory " ) ; <nl> + let memory = new WebAssembly . Memory ( { initial : 5 , maximum : 100 } ) ; <nl> + var builder = new WasmModuleBuilder ( ) ; <nl> + builder . addImportedMemory ( " imported_mem " ) ; <nl> + builder . addFunction ( " mem_size " , kSig_i_v ) <nl> + . addBody ( [ kExprMemorySize , kMemoryZero ] ) <nl> + . exportFunc ( ) ; <nl> + builder . addFunction ( " grow " , kSig_i_i ) <nl> + . addBody ( [ kExprGetLocal , 0 , kExprGrowMemory , kMemoryZero ] ) <nl> + . exportFunc ( ) ; <nl> + var instances = [ ] ; <nl> + for ( var i = 0 ; i < 5 ; i + + ) { <nl> + instances . push ( builder . instantiate ( { imported_mem : memory } ) ) ; <nl> + } <nl> + function grow_instance_0 ( pages ) { return instances [ 0 ] . exports . grow ( pages ) ; } <nl> + function grow_instance_1 ( pages ) { return instances [ 1 ] . exports . grow ( pages ) ; } <nl> + function grow_instance_2 ( pages ) { return instances [ 2 ] . exports . grow ( pages ) ; } <nl> + function grow_instance_3 ( pages ) { return instances [ 3 ] . exports . grow ( pages ) ; } <nl> + function grow_instance_4 ( pages ) { return instances [ 4 ] . exports . grow ( pages ) ; } <nl> + <nl> + var start_index = 0 ; <nl> + var end_index = 5 ; <nl> + function verify_mem_size ( expected_pages ) { <nl> + assertEquals ( expected_pages * kPageSize , memory . buffer . byteLength ) ; <nl> + for ( var i = start_index ; i < end_index ; i + + ) { <nl> + assertEquals ( expected_pages , instances [ i ] . exports . mem_size ( ) ) ; <nl> + } <nl> + } <nl> + <nl> + / / Verify initial memory size of all instances , grow and verify that all <nl> + / / instances are updated correctly . <nl> + verify_mem_size ( 5 ) ; <nl> + assertEquals ( 5 , memory . grow ( 6 ) ) ; <nl> + verify_mem_size ( 11 ) ; <nl> + <nl> + instances [ 1 ] = null ; <nl> + gc ( ) ; <nl> + <nl> + / / i [ 0 ] - i [ 2 ] - i [ 3 ] - i [ 4 ] <nl> + start_index = 2 ; <nl> + verify_mem_size ( 11 ) ; <nl> + assertEquals ( 11 , instances [ 0 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 11 , grow_instance_2 ( 10 ) ) ; <nl> + assertEquals ( 21 * kPageSize , memory . buffer . byteLength ) ; <nl> + verify_mem_size ( 21 ) ; <nl> + assertEquals ( 21 , instances [ 0 ] . exports . mem_size ( ) ) ; <nl> + <nl> + instances [ 4 ] = null ; <nl> + gc ( ) ; <nl> + <nl> + / / i [ 0 ] - i [ 2 ] - i [ 3 ] <nl> + assertEquals ( 21 , instances [ 0 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 21 , instances [ 2 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 21 , instances [ 3 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 21 , memory . grow ( 2 ) ) ; <nl> + assertEquals ( 23 * kPageSize , memory . buffer . byteLength ) ; <nl> + assertEquals ( 23 , instances [ 0 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 23 , instances [ 2 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 23 , instances [ 3 ] . exports . mem_size ( ) ) ; <nl> + <nl> + instances [ 0 ] = null ; <nl> + gc ( ) ; <nl> + <nl> + / / i [ 2 ] - i [ 3 ] <nl> + assertEquals ( 23 , instances [ 2 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 23 , instances [ 3 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 23 , grow_instance_3 ( 5 ) ) ; <nl> + assertEquals ( 28 * kPageSize , memory . buffer . byteLength ) ; <nl> + assertEquals ( 28 , instances [ 2 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 28 , instances [ 3 ] . exports . mem_size ( ) ) ; <nl> + <nl> + / / Instantiate a new instance and verify that it can be grown correctly . <nl> + instances . push ( builder . instantiate ( { imported_mem : memory } ) ) ; <nl> + function grow_instance_5 ( pages ) { return instances [ 5 ] . exports . grow ( pages ) ; } <nl> + <nl> + / / i [ 2 ] - i [ 3 ] - i [ 5 ] <nl> + assertEquals ( 28 , instances [ 2 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 28 , instances [ 3 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 28 , instances [ 5 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 28 , grow_instance_5 ( 2 ) ) ; <nl> + assertEquals ( 30 * kPageSize , memory . buffer . byteLength ) ; <nl> + assertEquals ( 30 , instances [ 2 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 30 , instances [ 3 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 30 , instances [ 5 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 30 , memory . grow ( 5 ) ) ; <nl> + assertEquals ( 35 * kPageSize , memory . buffer . byteLength ) ; <nl> + assertEquals ( 35 , instances [ 2 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 35 , instances [ 3 ] . exports . mem_size ( ) ) ; <nl> + assertEquals ( 35 , instances [ 5 ] . exports . mem_size ( ) ) ; <nl> + <nl> + } ) ( ) ; <nl> | [ wasm ] WebAssembly . Memory object can be referenced by multiple Instance objects . | v8/v8 | 3c98e339599b068f1ed630afb7601ff942424d31 | 2016-11-23T03:09:35Z |
mmm a / src / video_core / renderer_vulkan / vk_command_pool . h <nl> ppp b / src / video_core / renderer_vulkan / vk_command_pool . h <nl> <nl> / / Licensed under GPLv2 or any later version <nl> / / Refer to the license . txt file included . <nl> <nl> + # pragma once <nl> + <nl> # include < cstddef > <nl> # include < vector > <nl> <nl> | vk_command_pool : Add missing header guard | yuzu-emu/yuzu | e0f2db437650c33e797bb33ee51c753a3c14fe86 | 2020-09-25T04:12:45Z |
mmm a / atom / browser / mac / atom_application . h <nl> ppp b / atom / browser / mac / atom_application . h <nl> <nl> / / CrAppControlProtocol : <nl> - ( void ) setHandlingSendEvent : ( BOOL ) handlingSendEvent ; <nl> <nl> - - ( IBAction ) closeAllWindows : ( id ) sender ; <nl> - <nl> @ end <nl> mmm a / atom / browser / mac / atom_application . mm <nl> ppp b / atom / browser / mac / atom_application . mm <nl> - ( void ) awakeFromNib { <nl> andEventID : kAEGetURL ] ; <nl> } <nl> <nl> - - ( IBAction ) closeAllWindows : ( id ) sender { <nl> - atom : : Browser : : Get ( ) - > Quit ( ) ; <nl> - } <nl> - <nl> - ( void ) handleURLEvent : ( NSAppleEventDescriptor * ) event <nl> withReplyEvent : ( NSAppleEventDescriptor * ) replyEvent { <nl> NSString * url = [ <nl> mmm a / atom / browser / native_window_mac . mm <nl> ppp b / atom / browser / native_window_mac . mm <nl> - ( NSRect ) constrainFrameRect : ( NSRect ) frameRect toScreen : ( NSScreen * ) screen { <nl> return [ super constrainFrameRect : frameRect toScreen : screen ] ; <nl> } <nl> <nl> - - ( IBAction ) reload : ( id ) sender { <nl> - content : : WebContents * web_contents = shell_ - > GetWebContents ( ) ; <nl> - content : : NavigationController : : LoadURLParams params ( web_contents - > GetURL ( ) ) ; <nl> - web_contents - > GetController ( ) . LoadURLWithParams ( params ) ; <nl> - } <nl> - <nl> - - ( IBAction ) showDevTools : ( id ) sender { <nl> - shell_ - > OpenDevTools ( true ) ; <nl> - } <nl> - <nl> - ( id ) accessibilityAttributeValue : ( NSString * ) attribute { <nl> if ( ! [ attribute isEqualToString : @ " AXChildren " ] ) <nl> return [ super accessibilityAttributeValue : attribute ] ; <nl> mmm a / atom / common / resources / mac / MainMenu . xib <nl> ppp b / atom / common / resources / mac / MainMenu . xib <nl> <nl> < ? xml version = " 1 . 0 " encoding = " UTF - 8 " ? > <nl> < archive type = " com . apple . InterfaceBuilder3 . Cocoa . XIB " version = " 8 . 00 " > <nl> < data > <nl> - < int key = " IBDocument . SystemTarget " > 1080 < / int > <nl> - < string key = " IBDocument . SystemVersion " > 12D78 < / string > <nl> - < string key = " IBDocument . InterfaceBuilderVersion " > 3084 < / string > <nl> - < string key = " IBDocument . AppKitVersion " > 1187 . 37 < / string > <nl> - < string key = " IBDocument . HIToolboxVersion " > 626 . 00 < / string > <nl> + < int key = " IBDocument . SystemTarget " > 101000 < / int > <nl> + < string key = " IBDocument . SystemVersion " > 14D136 < / string > <nl> + < string key = " IBDocument . InterfaceBuilderVersion " > 7531 < / string > <nl> + < string key = " IBDocument . AppKitVersion " > 1347 . 57 < / string > <nl> + < string key = " IBDocument . HIToolboxVersion " > 758 . 70 < / string > <nl> < object class = " NSMutableDictionary " key = " IBDocument . PluginVersions " > <nl> < string key = " NS . key . 0 " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " NS . object . 0 " > 3084 < / string > <nl> + < string key = " NS . object . 0 " > 7531 < / string > <nl> < / object > <nl> < array key = " IBDocument . IntegratedClassDependencies " > <nl> < string > NSCustomObject < / string > <nl> <nl> < array class = " NSMutableArray " key = " NSMenuItems " > <nl> < object class = " NSMenuItem " id = " 694149608 " > <nl> < reference key = " NSMenu " ref = " 649796088 " / > <nl> - < string key = " NSTitle " > Atom < / string > <nl> + < string key = " NSTitle " > Electron < / string > <nl> < string key = " NSKeyEquiv " / > <nl> < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> < object class = " NSCustomResource " key = " NSOnImage " id = " 229763992 " > <nl> <nl> < string key = " NSResourceName " > NSMenuMixedState < / string > <nl> < / object > <nl> < string key = " NSAction " > submenuAction : < / string > <nl> + < reference key = " NSTarget " ref = " 110575045 " / > <nl> < object class = " NSMenu " key = " NSSubmenu " id = " 110575045 " > <nl> - < string key = " NSTitle " > Atom < / string > <nl> + < string key = " NSTitle " > Electron < / string > <nl> < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 238522557 " > <nl> - < reference key = " NSMenu " ref = " 110575045 " / > <nl> - < string key = " NSTitle " > About < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 304266470 " > <nl> - < reference key = " NSMenu " ref = " 110575045 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 609285721 " > <nl> - < reference key = " NSMenu " ref = " 110575045 " / > <nl> - < string key = " NSTitle " > Preferences … < / string > <nl> - < string key = " NSKeyEquiv " > , < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 481834944 " > <nl> - < reference key = " NSMenu " ref = " 110575045 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 1046388886 " > <nl> - < reference key = " NSMenu " ref = " 110575045 " / > <nl> - < string key = " NSTitle " > Services < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 752062318 " > <nl> - < string key = " NSTitle " > Services < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " / > <nl> - < string key = " NSName " > _NSServicesMenu < / string > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 646227648 " > <nl> - < reference key = " NSMenu " ref = " 110575045 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 755159360 " > <nl> - < reference key = " NSMenu " ref = " 110575045 " / > <nl> - < string key = " NSTitle " > Hide < / string > <nl> - < string key = " NSKeyEquiv " > h < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 342932134 " > <nl> - < reference key = " NSMenu " ref = " 110575045 " / > <nl> - < string key = " NSTitle " > Hide Others < / string > <nl> - < string key = " NSKeyEquiv " > h < / string > <nl> - < int key = " NSKeyEquivModMask " > 1572864 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 908899353 " > <nl> - < reference key = " NSMenu " ref = " 110575045 " / > <nl> - < string key = " NSTitle " > Show All < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 1056857174 " > <nl> - < reference key = " NSMenu " ref = " 110575045 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 632727374 " > <nl> - < reference key = " NSMenu " ref = " 110575045 " / > <nl> - < string key = " NSTitle " > Quit < / string > <nl> - < string key = " NSKeyEquiv " > q < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < string key = " NSName " > _NSAppleMenu < / string > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 379814623 " > <nl> - < reference key = " NSMenu " ref = " 649796088 " / > <nl> - < string key = " NSTitle " > File < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 720053764 " > <nl> - < string key = " NSTitle " > File < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 705341025 " > <nl> - < reference key = " NSMenu " ref = " 720053764 " / > <nl> - < string key = " NSTitle " > New < / string > <nl> - < string key = " NSKeyEquiv " > n < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 722745758 " > <nl> - < reference key = " NSMenu " ref = " 720053764 " / > <nl> - < string key = " NSTitle " > Open … < / string > <nl> - < string key = " NSKeyEquiv " > o < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 1025936716 " > <nl> - < reference key = " NSMenu " ref = " 720053764 " / > <nl> - < string key = " NSTitle " > Open Recent < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 1065607017 " > <nl> - < string key = " NSTitle " > Open Recent < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 759406840 " > <nl> - < reference key = " NSMenu " ref = " 1065607017 " / > <nl> - < string key = " NSTitle " > Clear Menu < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < string key = " NSName " > _NSRecentDocumentsMenu < / string > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 425164168 " > <nl> - < reference key = " NSMenu " ref = " 720053764 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 776162233 " > <nl> - < reference key = " NSMenu " ref = " 720053764 " / > <nl> - < string key = " NSTitle " > Close < / string > <nl> - < string key = " NSKeyEquiv " > w < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 1023925487 " > <nl> - < reference key = " NSMenu " ref = " 720053764 " / > <nl> - < string key = " NSTitle " > Save … < / string > <nl> - < string key = " NSKeyEquiv " > s < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 579971712 " > <nl> - < reference key = " NSMenu " ref = " 720053764 " / > <nl> - < string key = " NSTitle " > Revert to Saved < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 1010469920 " > <nl> - < reference key = " NSMenu " ref = " 720053764 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 294629803 " > <nl> - < reference key = " NSMenu " ref = " 720053764 " / > <nl> - < string key = " NSTitle " > Page Setup . . . < / string > <nl> - < string key = " NSKeyEquiv " > P < / string > <nl> - < int key = " NSKeyEquivModMask " > 1179648 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSToolTip " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 49223823 " > <nl> - < reference key = " NSMenu " ref = " 720053764 " / > <nl> - < string key = " NSTitle " > Print … < / string > <nl> - < string key = " NSKeyEquiv " > p < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 343661369 " > <nl> - < reference key = " NSMenu " ref = " 649796088 " / > <nl> - < string key = " NSTitle " > Edit < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 18182216 " > <nl> - < string key = " NSTitle " > Edit < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 155194070 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < string key = " NSTitle " > Undo < / string > <nl> - < string key = " NSKeyEquiv " > z < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 45032972 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < string key = " NSTitle " > Redo < / string > <nl> - < string key = " NSKeyEquiv " > Z < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 24941790 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 1002243476 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < string key = " NSTitle " > Cut < / string > <nl> - < string key = " NSKeyEquiv " > x < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 619324772 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < string key = " NSTitle " > Copy < / string > <nl> - < string key = " NSKeyEquiv " > c < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 582640805 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < string key = " NSTitle " > Paste < / string > <nl> - < string key = " NSKeyEquiv " > v < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 347036721 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < string key = " NSTitle " > Paste and Match Style < / string > <nl> - < string key = " NSKeyEquiv " > V < / string > <nl> - < int key = " NSKeyEquivModMask " > 1572864 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 483607956 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < string key = " NSTitle " > Delete < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 280953604 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < string key = " NSTitle " > Select All < / string > <nl> - < string key = " NSKeyEquiv " > a < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 850985553 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 1064937406 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < string key = " NSTitle " > Find < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 1070663324 " > <nl> - < string key = " NSTitle " > Find < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 12932659 " > <nl> - < reference key = " NSMenu " ref = " 1070663324 " / > <nl> - < string key = " NSTitle " > Find … < / string > <nl> - < string key = " NSKeyEquiv " > f < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < int key = " NSTag " > 1 < / int > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 522935145 " > <nl> - < reference key = " NSMenu " ref = " 1070663324 " / > <nl> - < string key = " NSTitle " > Find and Replace … < / string > <nl> - < string key = " NSKeyEquiv " > f < / string > <nl> - < int key = " NSKeyEquivModMask " > 1572864 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < int key = " NSTag " > 12 < / int > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 257946265 " > <nl> - < reference key = " NSMenu " ref = " 1070663324 " / > <nl> - < string key = " NSTitle " > Find Next < / string > <nl> - < string key = " NSKeyEquiv " > g < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < int key = " NSTag " > 2 < / int > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 942109647 " > <nl> - < reference key = " NSMenu " ref = " 1070663324 " / > <nl> - < string key = " NSTitle " > Find Previous < / string > <nl> - < string key = " NSKeyEquiv " > G < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < int key = " NSTag " > 3 < / int > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 298629397 " > <nl> - < reference key = " NSMenu " ref = " 1070663324 " / > <nl> - < string key = " NSTitle " > Use Selection for Find < / string > <nl> - < string key = " NSKeyEquiv " > e < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < int key = " NSTag " > 7 < / int > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 710003151 " > <nl> - < reference key = " NSMenu " ref = " 1070663324 " / > <nl> - < string key = " NSTitle " > Jump to Selection < / string > <nl> - < string key = " NSKeyEquiv " > j < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 180132862 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < string key = " NSTitle " > Spelling and Grammar < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 892840736 " > <nl> - < string key = " NSTitle " > Spelling < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 827774981 " > <nl> - < reference key = " NSMenu " ref = " 892840736 " / > <nl> - < string key = " NSTitle " > Show Spelling and Grammar < / string > <nl> - < string key = " NSKeyEquiv " > : < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 809982298 " > <nl> - < reference key = " NSMenu " ref = " 892840736 " / > <nl> - < string key = " NSTitle " > Check Document Now < / string > <nl> - < string key = " NSKeyEquiv " > ; < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 956119826 " > <nl> - < reference key = " NSMenu " ref = " 892840736 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 593040288 " > <nl> - < reference key = " NSMenu " ref = " 892840736 " / > <nl> - < string key = " NSTitle " > Check Spelling While Typing < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 959032664 " > <nl> - < reference key = " NSMenu " ref = " 892840736 " / > <nl> - < string key = " NSTitle " > Check Grammar With Spelling < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 306647906 " > <nl> - < reference key = " NSMenu " ref = " 892840736 " / > <nl> - < string key = " NSTitle " > Correct Spelling Automatically < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 736274394 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < string key = " NSTitle " > Substitutions < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 1016096989 " > <nl> - < string key = " NSTitle " > Substitutions < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 288466690 " > <nl> - < reference key = " NSMenu " ref = " 1016096989 " / > <nl> - < string key = " NSTitle " > Show Substitutions < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 553487793 " > <nl> - < reference key = " NSMenu " ref = " 1016096989 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 841637327 " > <nl> - < reference key = " NSMenu " ref = " 1016096989 " / > <nl> - < string key = " NSTitle " > Smart Copy / Paste < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 245014605 " > <nl> - < reference key = " NSMenu " ref = " 1016096989 " / > <nl> - < string key = " NSTitle " > Smart Quotes < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 388680464 " > <nl> - < reference key = " NSMenu " ref = " 1016096989 " / > <nl> - < string key = " NSTitle " > Smart Dashes < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 970896634 " > <nl> - < reference key = " NSMenu " ref = " 1016096989 " / > <nl> - < string key = " NSTitle " > Smart Links < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 721277036 " > <nl> - < reference key = " NSMenu " ref = " 1016096989 " / > <nl> - < string key = " NSTitle " > Data Detectors < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 991809654 " > <nl> - < reference key = " NSMenu " ref = " 1016096989 " / > <nl> - < string key = " NSTitle " > Text Replacement < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 550979386 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < string key = " NSTitle " > Transformations < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 686158910 " > <nl> - < string key = " NSTitle " > Transformations < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 988729155 " > <nl> - < reference key = " NSMenu " ref = " 686158910 " / > <nl> - < string key = " NSTitle " > Make Upper Case < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 794293351 " > <nl> - < reference key = " NSMenu " ref = " 686158910 " / > <nl> - < string key = " NSTitle " > Make Lower Case < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 92962570 " > <nl> - < reference key = " NSMenu " ref = " 686158910 " / > <nl> - < string key = " NSTitle " > Capitalize < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 1007906844 " > <nl> - < reference key = " NSMenu " ref = " 18182216 " / > <nl> - < string key = " NSTitle " > Speech < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 59153531 " > <nl> - < string key = " NSTitle " > Speech < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 559785803 " > <nl> - < reference key = " NSMenu " ref = " 59153531 " / > <nl> - < string key = " NSTitle " > Start Speaking < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 819381255 " > <nl> - < reference key = " NSMenu " ref = " 59153531 " / > <nl> - < string key = " NSTitle " > Stop Speaking < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 295482118 " > <nl> - < reference key = " NSMenu " ref = " 649796088 " / > <nl> - < string key = " NSTitle " > Format < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 350942565 " > <nl> - < string key = " NSTitle " > Format < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 736895423 " > <nl> - < reference key = " NSMenu " ref = " 350942565 " / > <nl> - < string key = " NSTitle " > Font < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 463947016 " > <nl> - < string key = " NSTitle " > Font < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 1071143217 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < string key = " NSTitle " > Show Fonts < / string > <nl> - < string key = " NSKeyEquiv " > t < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 13488196 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < string key = " NSTitle " > Bold < / string > <nl> - < string key = " NSKeyEquiv " > b < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < int key = " NSTag " > 2 < / int > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 1021634044 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < string key = " NSTitle " > Italic < / string > <nl> - < string key = " NSKeyEquiv " > i < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < int key = " NSTag " > 1 < / int > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 1046580307 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < string key = " NSTitle " > Underline < / string > <nl> - < string key = " NSKeyEquiv " > u < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 684785644 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 46923921 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < string key = " NSTitle " > Bigger < / string > <nl> - < string key = " NSKeyEquiv " > + < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < int key = " NSTag " > 3 < / int > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 127150726 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < string key = " NSTitle " > Smaller < / string > <nl> - < string key = " NSKeyEquiv " > - < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < int key = " NSTag " > 4 < / int > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 530335486 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 306368709 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < string key = " NSTitle " > Kern < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 94651047 " > <nl> - < string key = " NSTitle " > Kern < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 989465581 " > <nl> - < reference key = " NSMenu " ref = " 94651047 " / > <nl> - < string key = " NSTitle " > Use Default < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 434589796 " > <nl> - < reference key = " NSMenu " ref = " 94651047 " / > <nl> - < string key = " NSTitle " > Use None < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 227761425 " > <nl> - < reference key = " NSMenu " ref = " 94651047 " / > <nl> - < string key = " NSTitle " > Tighten < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 982598509 " > <nl> - < reference key = " NSMenu " ref = " 94651047 " / > <nl> - < string key = " NSTitle " > Loosen < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 731708565 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < string key = " NSTitle " > Ligatures < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 174263746 " > <nl> - < string key = " NSTitle " > Ligatures < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 113011974 " > <nl> - < reference key = " NSMenu " ref = " 174263746 " / > <nl> - < string key = " NSTitle " > Use Default < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 745465304 " > <nl> - < reference key = " NSMenu " ref = " 174263746 " / > <nl> - < string key = " NSTitle " > Use None < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 475130916 " > <nl> - < reference key = " NSMenu " ref = " 174263746 " / > <nl> - < string key = " NSTitle " > Use All < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 1016217175 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < string key = " NSTitle " > Baseline < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 858349666 " > <nl> - < string key = " NSTitle " > Baseline < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 683739349 " > <nl> - < reference key = " NSMenu " ref = " 858349666 " / > <nl> - < string key = " NSTitle " > Use Default < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 825437539 " > <nl> - < reference key = " NSMenu " ref = " 858349666 " / > <nl> - < string key = " NSTitle " > Superscript < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 88654863 " > <nl> - < reference key = " NSMenu " ref = " 858349666 " / > <nl> - < string key = " NSTitle " > Subscript < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 485882688 " > <nl> - < reference key = " NSMenu " ref = " 858349666 " / > <nl> - < string key = " NSTitle " > Raise < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 440390194 " > <nl> - < reference key = " NSMenu " ref = " 858349666 " / > <nl> - < string key = " NSTitle " > Lower < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 746757903 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 533585702 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < string key = " NSTitle " > Show Colors < / string > <nl> - < string key = " NSKeyEquiv " > C < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 786455754 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 54748189 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < string key = " NSTitle " > Copy Style < / string > <nl> - < string key = " NSKeyEquiv " > c < / string > <nl> - < int key = " NSKeyEquivModMask " > 1572864 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 372154324 " > <nl> - < reference key = " NSMenu " ref = " 463947016 " / > <nl> - < string key = " NSTitle " > Paste Style < / string > <nl> - < string key = " NSKeyEquiv " > v < / string > <nl> - < int key = " NSKeyEquivModMask " > 1572864 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < string key = " NSName " > _NSFontMenu < / string > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 403185760 " > <nl> - < reference key = " NSMenu " ref = " 350942565 " / > <nl> - < string key = " NSTitle " > Text < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 124673789 " > <nl> - < string key = " NSTitle " > Text < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 623281189 " > <nl> - < reference key = " NSMenu " ref = " 124673789 " / > <nl> - < string key = " NSTitle " > Align Left < / string > <nl> - < string key = " NSKeyEquiv " > { < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 183864921 " > <nl> - < reference key = " NSMenu " ref = " 124673789 " / > <nl> - < string key = " NSTitle " > Center < / string > <nl> - < string key = " NSKeyEquiv " > | < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 844020630 " > <nl> - < reference key = " NSMenu " ref = " 124673789 " / > <nl> - < string key = " NSTitle " > Justify < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 952289580 " > <nl> - < reference key = " NSMenu " ref = " 124673789 " / > <nl> - < string key = " NSTitle " > Align Right < / string > <nl> - < string key = " NSKeyEquiv " > } < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 308969315 " > <nl> - < reference key = " NSMenu " ref = " 124673789 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 721835921 " > <nl> - < reference key = " NSMenu " ref = " 124673789 " / > <nl> - < string key = " NSTitle " > Writing Direction < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 786497885 " > <nl> - < string key = " NSTitle " > Writing Direction < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 1028922290 " > <nl> - < reference key = " NSMenu " ref = " 786497885 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < string key = " NSTitle " > Paragraph < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 379441909 " > <nl> - < reference key = " NSMenu " ref = " 786497885 " / > <nl> - < string type = " base64 - UTF8 " key = " NSTitle " > CURlZmF1bHQ < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 596185362 " > <nl> - < reference key = " NSMenu " ref = " 786497885 " / > <nl> - < string type = " base64 - UTF8 " key = " NSTitle " > CUxlZnQgdG8gUmlnaHQ < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 717645487 " > <nl> - < reference key = " NSMenu " ref = " 786497885 " / > <nl> - < string type = " base64 - UTF8 " key = " NSTitle " > CVJpZ2h0IHRvIExlZnQ < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 239058964 " > <nl> - < reference key = " NSMenu " ref = " 786497885 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 247207103 " > <nl> - < reference key = " NSMenu " ref = " 786497885 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < string key = " NSTitle " > Selection < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 208677587 " > <nl> - < reference key = " NSMenu " ref = " 786497885 " / > <nl> - < string type = " base64 - UTF8 " key = " NSTitle " > CURlZmF1bHQ < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 678842847 " > <nl> - < reference key = " NSMenu " ref = " 786497885 " / > <nl> - < string type = " base64 - UTF8 " key = " NSTitle " > CUxlZnQgdG8gUmlnaHQ < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 3860629 " > <nl> - < reference key = " NSMenu " ref = " 786497885 " / > <nl> - < string type = " base64 - UTF8 " key = " NSTitle " > CVJpZ2h0IHRvIExlZnQ < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 1045813233 " > <nl> - < reference key = " NSMenu " ref = " 124673789 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 121219372 " > <nl> - < reference key = " NSMenu " ref = " 124673789 " / > <nl> - < string key = " NSTitle " > Show Ruler < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 488345562 " > <nl> - < reference key = " NSMenu " ref = " 124673789 " / > <nl> - < string key = " NSTitle " > Copy Ruler < / string > <nl> - < string key = " NSKeyEquiv " > c < / string > <nl> - < int key = " NSKeyEquivModMask " > 1310720 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 278512971 " > <nl> - < reference key = " NSMenu " ref = " 124673789 " / > <nl> - < string key = " NSTitle " > Paste Ruler < / string > <nl> - < string key = " NSKeyEquiv " > v < / string > <nl> - < int key = " NSKeyEquivModMask " > 1310720 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 586577488 " > <nl> - < reference key = " NSMenu " ref = " 649796088 " / > <nl> - < string key = " NSTitle " > View < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 466310130 " > <nl> - < string key = " NSTitle " > View < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 102151532 " > <nl> - < reference key = " NSMenu " ref = " 466310130 " / > <nl> - < string key = " NSTitle " > Show Toolbar < / string > <nl> - < string key = " NSKeyEquiv " > t < / string > <nl> - < int key = " NSKeyEquivModMask " > 1572864 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 237841660 " > <nl> - < reference key = " NSMenu " ref = " 466310130 " / > <nl> - < string key = " NSTitle " > Customize Toolbar … < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 1058117013 " > <nl> - < reference key = " NSMenu " ref = " 466310130 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 885614672 " > <nl> - < reference key = " NSMenu " ref = " 466310130 " / > <nl> - < string key = " NSTitle " > Reload < / string > <nl> - < string key = " NSKeyEquiv " > r < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 502782526 " > <nl> - < reference key = " NSMenu " ref = " 466310130 " / > <nl> - < string key = " NSTitle " > Show Developer Tools < / string > <nl> - < string key = " NSKeyEquiv " > i < / string > <nl> - < int key = " NSKeyEquivModMask " > 1572864 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 713487014 " > <nl> - < reference key = " NSMenu " ref = " 649796088 " / > <nl> - < string key = " NSTitle " > Window < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 835318025 " > <nl> - < string key = " NSTitle " > Window < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 1011231497 " > <nl> - < reference key = " NSMenu " ref = " 835318025 " / > <nl> - < string key = " NSTitle " > Minimize < / string > <nl> - < string key = " NSKeyEquiv " > m < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 575023229 " > <nl> - < reference key = " NSMenu " ref = " 835318025 " / > <nl> - < string key = " NSTitle " > Zoom < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 299356726 " > <nl> - < reference key = " NSMenu " ref = " 835318025 " / > <nl> - < bool key = " NSIsDisabled " > YES < / bool > <nl> - < bool key = " NSIsSeparator " > YES < / bool > <nl> - < string key = " NSTitle " / > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 625202149 " > <nl> - < reference key = " NSMenu " ref = " 835318025 " / > <nl> - < string key = " NSTitle " > Bring All to Front < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < string key = " NSName " > _NSWindowsMenu < / string > <nl> - < / object > <nl> - < / object > <nl> - < object class = " NSMenuItem " id = " 391199113 " > <nl> - < reference key = " NSMenu " ref = " 649796088 " / > <nl> - < string key = " NSTitle " > Help < / string > <nl> - < string key = " NSKeyEquiv " / > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < string key = " NSAction " > submenuAction : < / string > <nl> - < object class = " NSMenu " key = " NSSubmenu " id = " 374024848 " > <nl> - < string key = " NSTitle " > Help < / string > <nl> - < array class = " NSMutableArray " key = " NSMenuItems " > <nl> - < object class = " NSMenuItem " id = " 238773614 " > <nl> - < reference key = " NSMenu " ref = " 374024848 " / > <nl> - < string key = " NSTitle " > Brightray Example Help < / string > <nl> - < string key = " NSKeyEquiv " > ? < / string > <nl> - < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> - < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> - < reference key = " NSOnImage " ref = " 229763992 " / > <nl> - < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> - < / object > <nl> - < / array > <nl> - < string key = " NSName " > _NSHelpMenu < / string > <nl> - < / object > <nl> - < / object > <nl> - < / array > <nl> - < string key = " NSName " > _NSMainMenu < / string > <nl> - < / object > <nl> - < / array > <nl> - < object class = " IBObjectContainer " key = " IBDocument . Objects " > <nl> - < array class = " NSMutableArray " key = " connectionRecords " > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > orderFrontStandardAboutPanel : < / string > <nl> - < reference key = " source " ref = " 1021 " / > <nl> - < reference key = " destination " ref = " 238522557 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 142 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > closeAllWindows : < / string > <nl> - < reference key = " source " ref = " 1021 " / > <nl> - < reference key = " destination " ref = " 632727374 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 803 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > performMiniaturize : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 1011231497 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 37 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > arrangeInFront : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 625202149 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 39 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > print : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 49223823 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 86 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > runPageLayout : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 294629803 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 87 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > clearRecentDocuments : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 759406840 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 127 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > performClose : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 776162233 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 193 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > performZoom : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 575023229 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 240 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > showHelp : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 238773614 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 360 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > saveDocument : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 1023925487 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 362 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > revertDocumentToSaved : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 579971712 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 364 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > runToolbarCustomizationPalette : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 237841660 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 365 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > toggleToolbarShown : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 102151532 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 366 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > hide : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 755159360 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 367 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > hideOtherApplications : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 342932134 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 368 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > unhideAllApplications : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 908899353 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 370 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > raiseBaseline : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 485882688 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 423 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > lowerBaseline : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 440390194 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 424 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > copyFont : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 54748189 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 425 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > subscript : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 88654863 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 426 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > superscript : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 825437539 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 427 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > tightenKerning : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 227761425 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 428 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > underline : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 1046580307 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 429 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > orderFrontColorPanel : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 533585702 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 430 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > useAllLigatures : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 475130916 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 431 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > loosenKerning : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 982598509 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 432 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > pasteFont : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 372154324 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 433 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > unscript : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 683739349 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 434 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > useStandardKerning : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 989465581 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 435 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > useStandardLigatures : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 113011974 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 436 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > turnOffLigatures : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 745465304 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 437 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > turnOffKerning : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 434589796 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 438 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > alignLeft : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 623281189 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 439 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > alignJustified : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 844020630 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 440 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > copyRuler : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 488345562 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 441 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > alignCenter : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 183864921 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 442 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > toggleRuler : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 121219372 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 443 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > alignRight : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 952289580 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 444 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > pasteRuler : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 278512971 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 445 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > capitalizeWord : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 92962570 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 737 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > cut : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 1002243476 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 738 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > paste : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 582640805 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 739 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > toggleSmartInsertDelete : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 841637327 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 740 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > toggleAutomaticQuoteSubstitution : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 245014605 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 741 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > redo : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 45032972 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 742 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > toggleAutomaticDashSubstitution : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 388680464 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 743 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > toggleContinuousSpellChecking : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 593040288 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 744 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > toggleAutomaticDataDetection : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 721277036 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 745 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > undo : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 155194070 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 746 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > toggleGrammarChecking : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 959032664 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 747 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > startSpeaking : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 559785803 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 748 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > showGuessPanel : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 827774981 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 749 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > checkSpelling : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 809982298 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 750 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > pasteAsPlainText : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 347036721 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 751 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > copy : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 619324772 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 752 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > delete : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 483607956 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 753 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > lowercaseWord : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 794293351 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 754 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > selectAll : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 280953604 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 755 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > stopSpeaking : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 819381255 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 756 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > orderFrontSubstitutionsPanel : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 288466690 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 757 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > toggleAutomaticTextReplacement : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 991809654 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 758 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > toggleAutomaticLinkDetection : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 970896634 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 759 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > toggleAutomaticSpellingCorrection : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 306647906 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 760 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > uppercaseWord : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 988729155 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 761 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > performFindPanelAction : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 942109647 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 768 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > performFindPanelAction : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 12932659 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 769 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > performFindPanelAction : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 298629397 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 770 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > centerSelectionInVisibleArea : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 710003151 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 771 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > performFindPanelAction : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 257946265 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 772 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > makeBaseWritingDirectionNatural : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 379441909 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 785 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > makeBaseWritingDirectionLeftToRight : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 596185362 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 786 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > makeBaseWritingDirectionRightToLeft : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 717645487 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 787 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > makeTextWritingDirectionNatural : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 208677587 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 788 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > makeTextWritingDirectionLeftToRight : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 678842847 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 789 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > makeTextWritingDirectionRightToLeft : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 3860629 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 790 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > performFindPanelAction : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 522935145 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 792 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > showDevTools : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 502782526 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 805 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > reload : < / string > <nl> - < reference key = " source " ref = " 1014 " / > <nl> - < reference key = " destination " ref = " 885614672 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 806 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > addFontTrait : < / string > <nl> - < reference key = " source " ref = " 903638069 " / > <nl> - < reference key = " destination " ref = " 13488196 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 418 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > addFontTrait : < / string > <nl> - < reference key = " source " ref = " 903638069 " / > <nl> - < reference key = " destination " ref = " 1021634044 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 419 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > modifyFont : < / string > <nl> - < reference key = " source " ref = " 903638069 " / > <nl> - < reference key = " destination " ref = " 127150726 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 420 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > orderFrontFontPanel : < / string > <nl> - < reference key = " source " ref = " 903638069 " / > <nl> - < reference key = " destination " ref = " 1071143217 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 421 < / int > <nl> - < / object > <nl> - < object class = " IBConnectionRecord " > <nl> - < object class = " IBActionConnection " key = " connection " > <nl> - < string key = " label " > modifyFont : < / string > <nl> - < reference key = " source " ref = " 903638069 " / > <nl> - < reference key = " destination " ref = " 46923921 " / > <nl> - < / object > <nl> - < int key = " connectionID " > 422 < / int > <nl> - < / object > <nl> - < / array > <nl> - < object class = " IBMutableOrderedSet " key = " objectRecords " > <nl> - < array key = " orderedObjects " > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 0 < / int > <nl> - < array key = " object " id = " 0 " / > <nl> - < reference key = " children " ref = " 1048 " / > <nl> - < nil key = " parent " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > - 2 < / int > <nl> - < reference key = " object " ref = " 1021 " / > <nl> - < reference key = " parent " ref = " 0 " / > <nl> - < string key = " objectName " > File ' s Owner < / string > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > - 1 < / int > <nl> - < reference key = " object " ref = " 1014 " / > <nl> - < reference key = " parent " ref = " 0 " / > <nl> - < string key = " objectName " > First Responder < / string > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > - 3 < / int > <nl> - < reference key = " object " ref = " 1050 " / > <nl> - < reference key = " parent " ref = " 0 " / > <nl> - < string key = " objectName " > Application < / string > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 29 < / int > <nl> - < reference key = " object " ref = " 649796088 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 713487014 " / > <nl> - < reference ref = " 694149608 " / > <nl> - < reference ref = " 391199113 " / > <nl> - < reference ref = " 379814623 " / > <nl> - < reference ref = " 586577488 " / > <nl> - < reference ref = " 295482118 " / > <nl> - < reference ref = " 343661369 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 0 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 19 < / int > <nl> - < reference key = " object " ref = " 713487014 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 835318025 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 649796088 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 56 < / int > <nl> - < reference key = " object " ref = " 694149608 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 110575045 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 649796088 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 103 < / int > <nl> - < reference key = " object " ref = " 391199113 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 374024848 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 649796088 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 83 < / int > <nl> - < reference key = " object " ref = " 379814623 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 720053764 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 649796088 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 81 < / int > <nl> - < reference key = " object " ref = " 720053764 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 1023925487 " / > <nl> - < reference ref = " 49223823 " / > <nl> - < reference ref = " 722745758 " / > <nl> - < reference ref = " 705341025 " / > <nl> - < reference ref = " 1025936716 " / > <nl> - < reference ref = " 294629803 " / > <nl> - < reference ref = " 776162233 " / > <nl> - < reference ref = " 425164168 " / > <nl> - < reference ref = " 579971712 " / > <nl> - < reference ref = " 1010469920 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 379814623 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 75 < / int > <nl> - < reference key = " object " ref = " 1023925487 " / > <nl> - < reference key = " parent " ref = " 720053764 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 78 < / int > <nl> - < reference key = " object " ref = " 49223823 " / > <nl> - < reference key = " parent " ref = " 720053764 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 72 < / int > <nl> - < reference key = " object " ref = " 722745758 " / > <nl> - < reference key = " parent " ref = " 720053764 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 82 < / int > <nl> - < reference key = " object " ref = " 705341025 " / > <nl> - < reference key = " parent " ref = " 720053764 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 124 < / int > <nl> - < reference key = " object " ref = " 1025936716 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 1065607017 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 720053764 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 77 < / int > <nl> - < reference key = " object " ref = " 294629803 " / > <nl> - < reference key = " parent " ref = " 720053764 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 73 < / int > <nl> - < reference key = " object " ref = " 776162233 " / > <nl> - < reference key = " parent " ref = " 720053764 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 79 < / int > <nl> - < reference key = " object " ref = " 425164168 " / > <nl> - < reference key = " parent " ref = " 720053764 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 112 < / int > <nl> - < reference key = " object " ref = " 579971712 " / > <nl> - < reference key = " parent " ref = " 720053764 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 74 < / int > <nl> - < reference key = " object " ref = " 1010469920 " / > <nl> - < reference key = " parent " ref = " 720053764 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 125 < / int > <nl> - < reference key = " object " ref = " 1065607017 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 759406840 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 1025936716 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 126 < / int > <nl> - < reference key = " object " ref = " 759406840 " / > <nl> - < reference key = " parent " ref = " 1065607017 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 106 < / int > <nl> - < reference key = " object " ref = " 374024848 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 238773614 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 391199113 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 111 < / int > <nl> - < reference key = " object " ref = " 238773614 " / > <nl> - < reference key = " parent " ref = " 374024848 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 57 < / int > <nl> - < reference key = " object " ref = " 110575045 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 238522557 " / > <nl> - < reference ref = " 755159360 " / > <nl> - < reference ref = " 908899353 " / > <nl> - < reference ref = " 646227648 " / > <nl> - < reference ref = " 609285721 " / > <nl> - < reference ref = " 481834944 " / > <nl> - < reference ref = " 304266470 " / > <nl> - < reference ref = " 1046388886 " / > <nl> - < reference ref = " 1056857174 " / > <nl> - < reference ref = " 632727374 " / > <nl> - < reference ref = " 342932134 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 694149608 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 58 < / int > <nl> - < reference key = " object " ref = " 238522557 " / > <nl> - < reference key = " parent " ref = " 110575045 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 134 < / int > <nl> - < reference key = " object " ref = " 755159360 " / > <nl> - < reference key = " parent " ref = " 110575045 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 150 < / int > <nl> - < reference key = " object " ref = " 908899353 " / > <nl> - < reference key = " parent " ref = " 110575045 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 136 < / int > <nl> - < reference key = " object " ref = " 632727374 " / > <nl> - < reference key = " parent " ref = " 110575045 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 144 < / int > <nl> - < reference key = " object " ref = " 646227648 " / > <nl> - < reference key = " parent " ref = " 110575045 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 129 < / int > <nl> - < reference key = " object " ref = " 609285721 " / > <nl> - < reference key = " parent " ref = " 110575045 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 143 < / int > <nl> - < reference key = " object " ref = " 481834944 " / > <nl> - < reference key = " parent " ref = " 110575045 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 236 < / int > <nl> - < reference key = " object " ref = " 304266470 " / > <nl> - < reference key = " parent " ref = " 110575045 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 131 < / int > <nl> - < reference key = " object " ref = " 1046388886 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 752062318 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 110575045 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 149 < / int > <nl> - < reference key = " object " ref = " 1056857174 " / > <nl> - < reference key = " parent " ref = " 110575045 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 145 < / int > <nl> - < reference key = " object " ref = " 342932134 " / > <nl> - < reference key = " parent " ref = " 110575045 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 130 < / int > <nl> - < reference key = " object " ref = " 752062318 " / > <nl> - < reference key = " parent " ref = " 1046388886 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 24 < / int > <nl> - < reference key = " object " ref = " 835318025 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 299356726 " / > <nl> - < reference ref = " 625202149 " / > <nl> - < reference ref = " 575023229 " / > <nl> - < reference ref = " 1011231497 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 713487014 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 92 < / int > <nl> - < reference key = " object " ref = " 299356726 " / > <nl> - < reference key = " parent " ref = " 835318025 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 5 < / int > <nl> - < reference key = " object " ref = " 625202149 " / > <nl> - < reference key = " parent " ref = " 835318025 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 239 < / int > <nl> - < reference key = " object " ref = " 575023229 " / > <nl> - < reference key = " parent " ref = " 835318025 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 23 < / int > <nl> - < reference key = " object " ref = " 1011231497 " / > <nl> - < reference key = " parent " ref = " 835318025 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 295 < / int > <nl> - < reference key = " object " ref = " 586577488 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 466310130 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 649796088 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 296 < / int > <nl> - < reference key = " object " ref = " 466310130 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 102151532 " / > <nl> - < reference ref = " 237841660 " / > <nl> - < reference ref = " 1058117013 " / > <nl> - < reference ref = " 885614672 " / > <nl> - < reference ref = " 502782526 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 586577488 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 297 < / int > <nl> - < reference key = " object " ref = " 102151532 " / > <nl> - < reference key = " parent " ref = " 466310130 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 298 < / int > <nl> - < reference key = " object " ref = " 237841660 " / > <nl> - < reference key = " parent " ref = " 466310130 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 371 < / int > <nl> - < reference key = " object " ref = " 903638069 " / > <nl> - < reference key = " parent " ref = " 0 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 373 < / int > <nl> - < reference key = " object " ref = " 295482118 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 350942565 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 649796088 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 374 < / int > <nl> - < reference key = " object " ref = " 350942565 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 736895423 " / > <nl> - < reference ref = " 403185760 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 295482118 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 375 < / int > <nl> - < reference key = " object " ref = " 736895423 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 463947016 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 350942565 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 376 < / int > <nl> - < reference key = " object " ref = " 403185760 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 124673789 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 350942565 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 377 < / int > <nl> - < reference key = " object " ref = " 124673789 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 623281189 " / > <nl> - < reference ref = " 183864921 " / > <nl> - < reference ref = " 844020630 " / > <nl> - < reference ref = " 952289580 " / > <nl> - < reference ref = " 308969315 " / > <nl> - < reference ref = " 121219372 " / > <nl> - < reference ref = " 488345562 " / > <nl> - < reference ref = " 278512971 " / > <nl> - < reference ref = " 1045813233 " / > <nl> - < reference ref = " 721835921 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 403185760 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 378 < / int > <nl> - < reference key = " object " ref = " 623281189 " / > <nl> - < reference key = " parent " ref = " 124673789 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 379 < / int > <nl> - < reference key = " object " ref = " 183864921 " / > <nl> - < reference key = " parent " ref = " 124673789 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 380 < / int > <nl> - < reference key = " object " ref = " 844020630 " / > <nl> - < reference key = " parent " ref = " 124673789 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 381 < / int > <nl> - < reference key = " object " ref = " 952289580 " / > <nl> - < reference key = " parent " ref = " 124673789 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 382 < / int > <nl> - < reference key = " object " ref = " 308969315 " / > <nl> - < reference key = " parent " ref = " 124673789 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 383 < / int > <nl> - < reference key = " object " ref = " 121219372 " / > <nl> - < reference key = " parent " ref = " 124673789 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 384 < / int > <nl> - < reference key = " object " ref = " 488345562 " / > <nl> - < reference key = " parent " ref = " 124673789 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 385 < / int > <nl> - < reference key = " object " ref = " 278512971 " / > <nl> - < reference key = " parent " ref = " 124673789 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 386 < / int > <nl> - < reference key = " object " ref = " 463947016 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 1071143217 " / > <nl> - < reference ref = " 13488196 " / > <nl> - < reference ref = " 1021634044 " / > <nl> - < reference ref = " 1046580307 " / > <nl> - < reference ref = " 684785644 " / > <nl> - < reference ref = " 46923921 " / > <nl> - < reference ref = " 127150726 " / > <nl> - < reference ref = " 530335486 " / > <nl> - < reference ref = " 306368709 " / > <nl> - < reference ref = " 731708565 " / > <nl> - < reference ref = " 1016217175 " / > <nl> - < reference ref = " 746757903 " / > <nl> - < reference ref = " 533585702 " / > <nl> - < reference ref = " 786455754 " / > <nl> - < reference ref = " 54748189 " / > <nl> - < reference ref = " 372154324 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 736895423 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 387 < / int > <nl> - < reference key = " object " ref = " 1071143217 " / > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 388 < / int > <nl> - < reference key = " object " ref = " 13488196 " / > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 389 < / int > <nl> - < reference key = " object " ref = " 1021634044 " / > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 390 < / int > <nl> - < reference key = " object " ref = " 1046580307 " / > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 391 < / int > <nl> - < reference key = " object " ref = " 684785644 " / > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 392 < / int > <nl> - < reference key = " object " ref = " 46923921 " / > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 393 < / int > <nl> - < reference key = " object " ref = " 127150726 " / > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 394 < / int > <nl> - < reference key = " object " ref = " 530335486 " / > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 395 < / int > <nl> - < reference key = " object " ref = " 306368709 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 94651047 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 396 < / int > <nl> - < reference key = " object " ref = " 731708565 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 174263746 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 397 < / int > <nl> - < reference key = " object " ref = " 1016217175 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 858349666 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 398 < / int > <nl> - < reference key = " object " ref = " 746757903 " / > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 399 < / int > <nl> - < reference key = " object " ref = " 533585702 " / > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 400 < / int > <nl> - < reference key = " object " ref = " 786455754 " / > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 401 < / int > <nl> - < reference key = " object " ref = " 54748189 " / > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 402 < / int > <nl> - < reference key = " object " ref = " 372154324 " / > <nl> - < reference key = " parent " ref = " 463947016 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 403 < / int > <nl> - < reference key = " object " ref = " 858349666 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 683739349 " / > <nl> - < reference ref = " 825437539 " / > <nl> - < reference ref = " 88654863 " / > <nl> - < reference ref = " 485882688 " / > <nl> - < reference ref = " 440390194 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 1016217175 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 404 < / int > <nl> - < reference key = " object " ref = " 683739349 " / > <nl> - < reference key = " parent " ref = " 858349666 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 405 < / int > <nl> - < reference key = " object " ref = " 825437539 " / > <nl> - < reference key = " parent " ref = " 858349666 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 406 < / int > <nl> - < reference key = " object " ref = " 88654863 " / > <nl> - < reference key = " parent " ref = " 858349666 " / > <nl> + < object class = " NSMenuItem " id = " 632727374 " > <nl> + < reference key = " NSMenu " ref = " 110575045 " / > <nl> + < string key = " NSTitle " > Quit < / string > <nl> + < string key = " NSKeyEquiv " > q < / string > <nl> + < int key = " NSKeyEquivModMask " > 1048576 < / int > <nl> + < int key = " NSMnemonicLoc " > 2147483647 < / int > <nl> + < reference key = " NSOnImage " ref = " 229763992 " / > <nl> + < reference key = " NSMixedImage " ref = " 909111550 " / > <nl> + < / object > <nl> + < / array > <nl> + < string key = " NSName " > _NSAppleMenu < / string > <nl> + < / object > <nl> < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 407 < / int > <nl> - < reference key = " object " ref = " 485882688 " / > <nl> - < reference key = " parent " ref = " 858349666 " / > <nl> + < / array > <nl> + < string key = " NSName " > _NSMainMenu < / string > <nl> + < / object > <nl> + < / array > <nl> + < object class = " IBObjectContainer " key = " IBDocument . Objects " > <nl> + < array key = " connectionRecords " > <nl> + < object class = " IBConnectionRecord " > <nl> + < object class = " IBActionConnection " key = " connection " > <nl> + < string key = " label " > terminate : < / string > <nl> + < reference key = " source " ref = " 1014 " / > <nl> + < reference key = " destination " ref = " 632727374 " / > <nl> < / object > <nl> + < int key = " connectionID " > 807 < / int > <nl> + < / object > <nl> + < / array > <nl> + < object class = " IBMutableOrderedSet " key = " objectRecords " > <nl> + < array key = " orderedObjects " > <nl> < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 408 < / int > <nl> - < reference key = " object " ref = " 440390194 " / > <nl> - < reference key = " parent " ref = " 858349666 " / > <nl> + < int key = " objectID " > 0 < / int > <nl> + < array key = " object " id = " 0 " / > <nl> + < reference key = " children " ref = " 1048 " / > <nl> + < nil key = " parent " / > <nl> < / object > <nl> < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 409 < / int > <nl> - < reference key = " object " ref = " 174263746 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 113011974 " / > <nl> - < reference ref = " 745465304 " / > <nl> - < reference ref = " 475130916 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 731708565 " / > <nl> + < int key = " objectID " > - 2 < / int > <nl> + < reference key = " object " ref = " 1021 " / > <nl> + < reference key = " parent " ref = " 0 " / > <nl> + < string key = " objectName " > File ' s Owner < / string > <nl> < / object > <nl> < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 410 < / int > <nl> - < reference key = " object " ref = " 113011974 " / > <nl> - < reference key = " parent " ref = " 174263746 " / > <nl> + < int key = " objectID " > - 1 < / int > <nl> + < reference key = " object " ref = " 1014 " / > <nl> + < reference key = " parent " ref = " 0 " / > <nl> + < string key = " objectName " > First Responder < / string > <nl> < / object > <nl> < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 411 < / int > <nl> - < reference key = " object " ref = " 745465304 " / > <nl> - < reference key = " parent " ref = " 174263746 " / > <nl> + < int key = " objectID " > - 3 < / int > <nl> + < reference key = " object " ref = " 1050 " / > <nl> + < reference key = " parent " ref = " 0 " / > <nl> + < string key = " objectName " > Application < / string > <nl> < / object > <nl> < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 412 < / int > <nl> - < reference key = " object " ref = " 475130916 " / > <nl> - < reference key = " parent " ref = " 174263746 " / > <nl> + < int key = " objectID " > 371 < / int > <nl> + < reference key = " object " ref = " 903638069 " / > <nl> + < reference key = " parent " ref = " 0 " / > <nl> < / object > <nl> < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 413 < / int > <nl> - < reference key = " object " ref = " 94651047 " / > <nl> + < int key = " objectID " > 29 < / int > <nl> + < reference key = " object " ref = " 649796088 " / > <nl> < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 989465581 " / > <nl> - < reference ref = " 434589796 " / > <nl> - < reference ref = " 227761425 " / > <nl> - < reference ref = " 982598509 " / > <nl> + < reference ref = " 694149608 " / > <nl> < / array > <nl> - < reference key = " parent " ref = " 306368709 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 414 < / int > <nl> - < reference key = " object " ref = " 989465581 " / > <nl> - < reference key = " parent " ref = " 94651047 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 415 < / int > <nl> - < reference key = " object " ref = " 434589796 " / > <nl> - < reference key = " parent " ref = " 94651047 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 416 < / int > <nl> - < reference key = " object " ref = " 227761425 " / > <nl> - < reference key = " parent " ref = " 94651047 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 417 < / int > <nl> - < reference key = " object " ref = " 982598509 " / > <nl> - < reference key = " parent " ref = " 94651047 " / > <nl> + < reference key = " parent " ref = " 0 " / > <nl> < / object > <nl> < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 681 < / int > <nl> - < reference key = " object " ref = " 343661369 " / > <nl> + < int key = " objectID " > 56 < / int > <nl> + < reference key = " object " ref = " 694149608 " / > <nl> < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 18182216 " / > <nl> + < reference ref = " 110575045 " / > <nl> < / array > <nl> < reference key = " parent " ref = " 649796088 " / > <nl> < / object > <nl> < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 682 < / int > <nl> - < reference key = " object " ref = " 18182216 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 155194070 " / > <nl> - < reference ref = " 45032972 " / > <nl> - < reference ref = " 24941790 " / > <nl> - < reference ref = " 1002243476 " / > <nl> - < reference ref = " 619324772 " / > <nl> - < reference ref = " 582640805 " / > <nl> - < reference ref = " 347036721 " / > <nl> - < reference ref = " 483607956 " / > <nl> - < reference ref = " 280953604 " / > <nl> - < reference ref = " 850985553 " / > <nl> - < reference ref = " 1064937406 " / > <nl> - < reference ref = " 180132862 " / > <nl> - < reference ref = " 736274394 " / > <nl> - < reference ref = " 550979386 " / > <nl> - < reference ref = " 1007906844 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 343661369 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 683 < / int > <nl> - < reference key = " object " ref = " 155194070 " / > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 684 < / int > <nl> - < reference key = " object " ref = " 45032972 " / > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 685 < / int > <nl> - < reference key = " object " ref = " 24941790 " / > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 686 < / int > <nl> - < reference key = " object " ref = " 1002243476 " / > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 687 < / int > <nl> - < reference key = " object " ref = " 619324772 " / > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 688 < / int > <nl> - < reference key = " object " ref = " 582640805 " / > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 689 < / int > <nl> - < reference key = " object " ref = " 347036721 " / > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 690 < / int > <nl> - < reference key = " object " ref = " 483607956 " / > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 691 < / int > <nl> - < reference key = " object " ref = " 280953604 " / > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 692 < / int > <nl> - < reference key = " object " ref = " 850985553 " / > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 693 < / int > <nl> - < reference key = " object " ref = " 1064937406 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 1070663324 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 694 < / int > <nl> - < reference key = " object " ref = " 180132862 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 892840736 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 695 < / int > <nl> - < reference key = " object " ref = " 736274394 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 1016096989 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 696 < / int > <nl> - < reference key = " object " ref = " 550979386 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 686158910 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 697 < / int > <nl> - < reference key = " object " ref = " 1007906844 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 59153531 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 18182216 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 708 < / int > <nl> - < reference key = " object " ref = " 59153531 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 559785803 " / > <nl> - < reference ref = " 819381255 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 1007906844 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 709 < / int > <nl> - < reference key = " object " ref = " 559785803 " / > <nl> - < reference key = " parent " ref = " 59153531 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 710 < / int > <nl> - < reference key = " object " ref = " 819381255 " / > <nl> - < reference key = " parent " ref = " 59153531 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 711 < / int > <nl> - < reference key = " object " ref = " 686158910 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 988729155 " / > <nl> - < reference ref = " 794293351 " / > <nl> - < reference ref = " 92962570 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 550979386 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 712 < / int > <nl> - < reference key = " object " ref = " 988729155 " / > <nl> - < reference key = " parent " ref = " 686158910 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 713 < / int > <nl> - < reference key = " object " ref = " 794293351 " / > <nl> - < reference key = " parent " ref = " 686158910 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 714 < / int > <nl> - < reference key = " object " ref = " 92962570 " / > <nl> - < reference key = " parent " ref = " 686158910 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 715 < / int > <nl> - < reference key = " object " ref = " 1016096989 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 288466690 " / > <nl> - < reference ref = " 553487793 " / > <nl> - < reference ref = " 841637327 " / > <nl> - < reference ref = " 245014605 " / > <nl> - < reference ref = " 388680464 " / > <nl> - < reference ref = " 970896634 " / > <nl> - < reference ref = " 721277036 " / > <nl> - < reference ref = " 991809654 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 736274394 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 716 < / int > <nl> - < reference key = " object " ref = " 288466690 " / > <nl> - < reference key = " parent " ref = " 1016096989 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 717 < / int > <nl> - < reference key = " object " ref = " 553487793 " / > <nl> - < reference key = " parent " ref = " 1016096989 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 718 < / int > <nl> - < reference key = " object " ref = " 841637327 " / > <nl> - < reference key = " parent " ref = " 1016096989 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 719 < / int > <nl> - < reference key = " object " ref = " 245014605 " / > <nl> - < reference key = " parent " ref = " 1016096989 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 720 < / int > <nl> - < reference key = " object " ref = " 388680464 " / > <nl> - < reference key = " parent " ref = " 1016096989 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 721 < / int > <nl> - < reference key = " object " ref = " 970896634 " / > <nl> - < reference key = " parent " ref = " 1016096989 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 722 < / int > <nl> - < reference key = " object " ref = " 721277036 " / > <nl> - < reference key = " parent " ref = " 1016096989 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 723 < / int > <nl> - < reference key = " object " ref = " 991809654 " / > <nl> - < reference key = " parent " ref = " 1016096989 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 724 < / int > <nl> - < reference key = " object " ref = " 892840736 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 827774981 " / > <nl> - < reference ref = " 809982298 " / > <nl> - < reference ref = " 956119826 " / > <nl> - < reference ref = " 593040288 " / > <nl> - < reference ref = " 959032664 " / > <nl> - < reference ref = " 306647906 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 180132862 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 725 < / int > <nl> - < reference key = " object " ref = " 827774981 " / > <nl> - < reference key = " parent " ref = " 892840736 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 726 < / int > <nl> - < reference key = " object " ref = " 809982298 " / > <nl> - < reference key = " parent " ref = " 892840736 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 727 < / int > <nl> - < reference key = " object " ref = " 956119826 " / > <nl> - < reference key = " parent " ref = " 892840736 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 728 < / int > <nl> - < reference key = " object " ref = " 593040288 " / > <nl> - < reference key = " parent " ref = " 892840736 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 729 < / int > <nl> - < reference key = " object " ref = " 959032664 " / > <nl> - < reference key = " parent " ref = " 892840736 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 730 < / int > <nl> - < reference key = " object " ref = " 306647906 " / > <nl> - < reference key = " parent " ref = " 892840736 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 731 < / int > <nl> - < reference key = " object " ref = " 1070663324 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 12932659 " / > <nl> - < reference ref = " 257946265 " / > <nl> - < reference ref = " 942109647 " / > <nl> - < reference ref = " 298629397 " / > <nl> - < reference ref = " 710003151 " / > <nl> - < reference ref = " 522935145 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 1064937406 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 732 < / int > <nl> - < reference key = " object " ref = " 12932659 " / > <nl> - < reference key = " parent " ref = " 1070663324 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 733 < / int > <nl> - < reference key = " object " ref = " 257946265 " / > <nl> - < reference key = " parent " ref = " 1070663324 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 734 < / int > <nl> - < reference key = " object " ref = " 942109647 " / > <nl> - < reference key = " parent " ref = " 1070663324 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 735 < / int > <nl> - < reference key = " object " ref = " 298629397 " / > <nl> - < reference key = " parent " ref = " 1070663324 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 736 < / int > <nl> - < reference key = " object " ref = " 710003151 " / > <nl> - < reference key = " parent " ref = " 1070663324 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 773 < / int > <nl> - < reference key = " object " ref = " 1045813233 " / > <nl> - < reference key = " parent " ref = " 124673789 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 774 < / int > <nl> - < reference key = " object " ref = " 721835921 " / > <nl> - < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 786497885 " / > <nl> - < / array > <nl> - < reference key = " parent " ref = " 124673789 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 775 < / int > <nl> - < reference key = " object " ref = " 786497885 " / > <nl> + < int key = " objectID " > 57 < / int > <nl> + < reference key = " object " ref = " 110575045 " / > <nl> < array class = " NSMutableArray " key = " children " > <nl> - < reference ref = " 3860629 " / > <nl> - < reference ref = " 678842847 " / > <nl> - < reference ref = " 208677587 " / > <nl> - < reference ref = " 239058964 " / > <nl> - < reference ref = " 247207103 " / > <nl> - < reference ref = " 717645487 " / > <nl> - < reference ref = " 596185362 " / > <nl> - < reference ref = " 379441909 " / > <nl> - < reference ref = " 1028922290 " / > <nl> + < reference ref = " 632727374 " / > <nl> < / array > <nl> - < reference key = " parent " ref = " 721835921 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 776 < / int > <nl> - < reference key = " object " ref = " 3860629 " / > <nl> - < reference key = " parent " ref = " 786497885 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 777 < / int > <nl> - < reference key = " object " ref = " 678842847 " / > <nl> - < reference key = " parent " ref = " 786497885 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 778 < / int > <nl> - < reference key = " object " ref = " 208677587 " / > <nl> - < reference key = " parent " ref = " 786497885 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 779 < / int > <nl> - < reference key = " object " ref = " 239058964 " / > <nl> - < reference key = " parent " ref = " 786497885 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 780 < / int > <nl> - < reference key = " object " ref = " 247207103 " / > <nl> - < reference key = " parent " ref = " 786497885 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 781 < / int > <nl> - < reference key = " object " ref = " 717645487 " / > <nl> - < reference key = " parent " ref = " 786497885 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 782 < / int > <nl> - < reference key = " object " ref = " 596185362 " / > <nl> - < reference key = " parent " ref = " 786497885 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 783 < / int > <nl> - < reference key = " object " ref = " 379441909 " / > <nl> - < reference key = " parent " ref = " 786497885 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 784 < / int > <nl> - < reference key = " object " ref = " 1028922290 " / > <nl> - < reference key = " parent " ref = " 786497885 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 791 < / int > <nl> - < reference key = " object " ref = " 522935145 " / > <nl> - < reference key = " parent " ref = " 1070663324 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 798 < / int > <nl> - < reference key = " object " ref = " 1058117013 " / > <nl> - < reference key = " parent " ref = " 466310130 " / > <nl> - < / object > <nl> - < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 799 < / int > <nl> - < reference key = " object " ref = " 885614672 " / > <nl> - < reference key = " parent " ref = " 466310130 " / > <nl> + < reference key = " parent " ref = " 694149608 " / > <nl> < / object > <nl> < object class = " IBObjectRecord " > <nl> - < int key = " objectID " > 804 < / int > <nl> - < reference key = " object " ref = " 502782526 " / > <nl> - < reference key = " parent " ref = " 466310130 " / > <nl> + < int key = " objectID " > 136 < / int > <nl> + < reference key = " object " ref = " 632727374 " / > <nl> + < reference key = " parent " ref = " 110575045 " / > <nl> < / object > <nl> < / array > <nl> < / object > <nl> <nl> < string key = " - 1 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> < string key = " - 2 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> < string key = " - 3 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 103 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 106 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 111 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 112 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 124 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 125 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 126 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 129 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 130 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 131 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 134 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> < string key = " 136 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 143 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 144 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 145 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 149 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 150 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 19 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 23 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 236 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 239 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 24 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> < string key = " 29 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 295 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 296 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 297 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 298 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> < string key = " 371 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 373 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 374 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 375 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 376 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 377 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 378 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 379 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 380 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 381 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 382 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 383 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 384 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 385 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 386 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 387 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 388 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 389 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 390 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 391 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 392 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 393 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 394 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 395 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 396 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 397 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 398 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 399 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 400 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 401 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 402 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 403 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 404 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 405 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 406 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 407 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 408 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 409 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 410 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 411 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 412 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 413 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 414 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 415 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 416 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 417 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 5 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> < string key = " 56 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> < string key = " 57 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 58 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 681 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 682 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 683 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 684 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 685 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 686 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 687 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 688 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 689 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 690 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 691 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 692 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 693 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 694 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 695 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 696 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 697 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 708 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 709 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 710 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 711 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 712 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 713 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 714 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 715 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 716 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 717 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 718 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 719 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 72 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 720 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 721 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 722 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 723 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 724 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 725 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 726 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 727 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 728 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 729 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 73 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 730 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 731 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 732 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 733 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 734 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 735 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 736 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 74 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 75 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 77 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 773 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 774 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 775 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 776 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 777 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 778 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 779 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 78 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 780 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 781 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 782 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 783 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 784 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 79 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 791 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 798 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 799 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 804 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 81 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 82 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 83 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> - < string key = " 92 . IBPluginDependency " > com . apple . InterfaceBuilder . CocoaPlugin < / string > <nl> < / dictionary > <nl> < dictionary class = " NSMutableDictionary " key = " unlocalizedProperties " / > <nl> < nil key = " activeLocalization " / > <nl> < dictionary class = " NSMutableDictionary " key = " localizations " / > <nl> < nil key = " sourceID " / > <nl> - < int key = " maxID " > 806 < / int > <nl> - < / object > <nl> - < object class = " IBClassDescriber " key = " IBDocument . Classes " > <nl> - < array class = " NSMutableArray " key = " referencedPartialClassDescriptions " > <nl> - < object class = " IBPartialClassDescription " > <nl> - < string key = " className " > AtomApplication < / string > <nl> - < string key = " superclassName " > NSApplication < / string > <nl> - < object class = " NSMutableDictionary " key = " actions " > <nl> - < string key = " NS . key . 0 " > closeAllWindows : < / string > <nl> - < string key = " NS . object . 0 " > id < / string > <nl> - < / object > <nl> - < object class = " NSMutableDictionary " key = " actionInfosByName " > <nl> - < string key = " NS . key . 0 " > closeAllWindows : < / string > <nl> - < object class = " IBActionInfo " key = " NS . object . 0 " > <nl> - < string key = " name " > closeAllWindows : < / string > <nl> - < string key = " candidateClassName " > id < / string > <nl> - < / object > <nl> - < / object > <nl> - < object class = " IBClassDescriptionSource " key = " sourceIdentifier " > <nl> - < string key = " majorKey " > IBProjectSource < / string > <nl> - < string key = " minorKey " > . / Classes / AtomApplication . h < / string > <nl> - < / object > <nl> - < / object > <nl> - < object class = " IBPartialClassDescription " > <nl> - < string key = " className " > BRYInspectableWebContentsView < / string > <nl> - < string key = " superclassName " > NSView < / string > <nl> - < object class = " NSMutableDictionary " key = " actions " > <nl> - < string key = " NS . key . 0 " > showDevTools : < / string > <nl> - < string key = " NS . object . 0 " > id < / string > <nl> - < / object > <nl> - < object class = " NSMutableDictionary " key = " actionInfosByName " > <nl> - < string key = " NS . key . 0 " > showDevTools : < / string > <nl> - < object class = " IBActionInfo " key = " NS . object . 0 " > <nl> - < string key = " name " > showDevTools : < / string > <nl> - < string key = " candidateClassName " > id < / string > <nl> - < / object > <nl> - < / object > <nl> - < object class = " IBClassDescriptionSource " key = " sourceIdentifier " > <nl> - < string key = " majorKey " > IBProjectSource < / string > <nl> - < string key = " minorKey " > . / Classes / BRYInspectableWebContentsView . h < / string > <nl> - < / object > <nl> - < / object > <nl> - < object class = " IBPartialClassDescription " > <nl> - < string key = " className " > FirstResponder < / string > <nl> - < object class = " NSMutableDictionary " key = " actions " > <nl> - < string key = " NS . key . 0 " > showDevTools : < / string > <nl> - < string key = " NS . object . 0 " > id < / string > <nl> - < / object > <nl> - < object class = " NSMutableDictionary " key = " actionInfosByName " > <nl> - < string key = " NS . key . 0 " > showDevTools : < / string > <nl> - < object class = " IBActionInfo " key = " NS . object . 0 " > <nl> - < string key = " name " > showDevTools : < / string > <nl> - < string key = " candidateClassName " > id < / string > <nl> - < / object > <nl> - < / object > <nl> - < object class = " IBClassDescriptionSource " key = " sourceIdentifier " > <nl> - < string key = " majorKey " > IBUserSource < / string > <nl> - < string key = " minorKey " / > <nl> - < / object > <nl> - < / object > <nl> - < / array > <nl> + < int key = " maxID " > 807 < / int > <nl> < / object > <nl> < int key = " IBDocument . localizationMode " > 0 < / int > <nl> < string key = " IBDocument . TargetRuntimeIdentifier " > IBCocoaFramework < / string > <nl> + < bool key = " IBDocument . previouslyAttemptedUpgradeToXcode5 " > NO < / bool > <nl> + < object class = " NSMutableDictionary " key = " IBDocument . PluginDeclaredDevelopmentDependencies " > <nl> + < string key = " NS . key . 0 " > com . apple . InterfaceBuilder . CocoaPlugin . InterfaceBuilder3 < / string > <nl> + < integer value = " 4600 " key = " NS . object . 0 " / > <nl> + < / object > <nl> < bool key = " IBDocument . PluginDeclaredDependenciesTrackSystemTargetVersion " > YES < / bool > <nl> < int key = " IBDocument . defaultPropertyAccessControl " > 3 < / int > <nl> < dictionary class = " NSMutableDictionary " key = " IBDocument . LastKnownImageSizes " > <nl> - < string key = " NSMenuCheckmark " > { 11 , 11 } < / string > <nl> - < string key = " NSMenuMixedState " > { 10 , 3 } < / string > <nl> + < string key = " NSMenuCheckmark " > { 12 , 12 } < / string > <nl> + < string key = " NSMenuMixedState " > { 10 , 2 } < / string > <nl> < / dictionary > <nl> < bool key = " IBDocument . UseAutolayout " > YES < / bool > <nl> < / data > <nl> | Merge pull request from atom / minimal - mac - menu | electron/electron | ca5ee0fc818ba0b9c423961738f8f6b70a0535b1 | 2015-04-25T13:00:26Z |
mmm a / caffe2 / python / layers / batch_distill_lr_loss . py <nl> ppp b / caffe2 / python / layers / batch_distill_lr_loss . py <nl> def __init__ ( <nl> np . float32 , <nl> model . net . NextScopedBlob ( name + ' _output ' ) ) <nl> <nl> - def add_ops ( self , net ) : <nl> + def add_train_ops ( self , net ) : <nl> label = self . input_record . label ( ) <nl> if self . input_record . label . field_type ( ) ! = np . int32 : <nl> label = net . Cast ( label , net . NextScopedBlob ( ' int32_label ' ) , to = ' int32 ' ) <nl> def add_ops ( self , net ) : <nl> [ true_loss , teacher_loss ] , <nl> self . output_schema . field_blobs ( ) <nl> ) <nl> + <nl> + def add_ops ( self , net ) : <nl> + pass <nl> mmm a / caffe2 / python / layers / batch_lr_loss . py <nl> ppp b / caffe2 / python / layers / batch_lr_loss . py <nl> def __init__ ( self , model , input_record , name = ' batch_lr_loss ' , <nl> model . net . NextScopedBlob ( name + ' _output ' ) ) <nl> <nl> # This should be a bit more complicated than it is right now <nl> - def add_ops ( self , net ) : <nl> + def add_train_ops ( self , net ) : <nl> class_probabilities = net . MakeTwoClass ( <nl> self . input_record . prediction . field_blobs ( ) , <nl> net . NextScopedBlob ( ' two_class_predictions ' ) <nl> def add_ops ( self , net ) : <nl> net . AveragedLoss ( xent , self . output_schema . field_blobs ( ) ) <nl> else : <nl> net . ReduceFrontSum ( xent , self . output_schema . field_blobs ( ) ) <nl> + <nl> + def add_ops ( self , net ) : <nl> + pass <nl> mmm a / caffe2 / python / layers / batch_mse_loss . py <nl> ppp b / caffe2 / python / layers / batch_mse_loss . py <nl> def __init__ ( self , model , input_record , name = ' batch_mse_loss ' , * * kwargs ) : <nl> np . float32 , <nl> model . net . NextScopedBlob ( name + ' _output ' ) ) <nl> <nl> - def add_ops ( self , net ) : <nl> + def add_train_ops ( self , net ) : <nl> prediction = net . Squeeze ( <nl> self . input_record . prediction ( ) , <nl> net . NextScopedBlob ( ' squeezed_prediction ' ) , <nl> dims = [ 1 ] <nl> ) <nl> <nl> + label = self . input_record . label . field_blobs ( ) <nl> + if self . input_record . label . field_type ( ) . base ! = ( <nl> + self . input_record . prediction . field_type ( ) . base ) : <nl> + <nl> + label = net . Cast ( <nl> + label , <nl> + net . NextScopedBlob ( ' cast_label ' ) , <nl> + to = schema . data_type_for_dtype ( <nl> + self . input_record . prediction . field_type ( ) <nl> + ) <nl> + ) <nl> + <nl> label = net . StopGradient ( <nl> - self . input_record . label ( ) , <nl> + label , <nl> net . NextScopedBlob ( ' stopped_label ' ) <nl> ) <nl> <nl> def add_ops ( self , net ) : <nl> ) <nl> <nl> net . AveragedLoss ( l2dist , self . output_schema . field_blobs ( ) ) <nl> + <nl> + def add_ops ( self , net ) : <nl> + pass <nl> mmm a / caffe2 / python / layers_test . py <nl> ppp b / caffe2 / python / layers_test . py <nl> def testBatchLRLoss ( self ) : <nl> loss = self . model . BatchLRLoss ( input_record ) <nl> self . assertEqual ( schema . Scalar ( ( np . float32 , tuple ( ) ) ) , loss ) <nl> <nl> + def testBatchMSELoss ( self ) : <nl> + input_record = self . new_record ( schema . Struct ( <nl> + ( ' label ' , schema . Scalar ( ( np . float64 , ( 1 , ) ) ) ) , <nl> + ( ' prediction ' , schema . Scalar ( ( np . float32 , ( 2 , ) ) ) ) , <nl> + ) ) <nl> + loss = self . model . BatchMSELoss ( input_record ) <nl> + self . assertEqual ( schema . Scalar ( ( np . float32 , tuple ( ) ) ) , loss ) <nl> + <nl> def testBatchSigmoidCrossEntropyLoss ( self ) : <nl> input_record = self . new_record ( schema . Struct ( <nl> ( ' label ' , schema . Scalar ( ( np . float32 , ( 32 , ) ) ) ) , <nl> | Remove loss ops from eval net | pytorch/pytorch | 795dc1c326928f6919e53c43feb3bd692d250640 | 2017-04-26T19:46:25Z |
mmm a / scene / gui / split_container . cpp <nl> ppp b / scene / gui / split_container . cpp <nl> void SplitContainer : : _notification ( int p_what ) { <nl> case NOTIFICATION_MOUSE_EXIT : { <nl> <nl> mouse_inside = false ; <nl> - update ( ) ; <nl> + if ( get_constant ( " autohide " ) ) <nl> + update ( ) ; <nl> } break ; <nl> case NOTIFICATION_DRAW : { <nl> <nl> if ( ! _getch ( 0 ) | | ! _getch ( 1 ) ) <nl> return ; <nl> <nl> - if ( collapsed | | ( ! mouse_inside & & get_constant ( " autohide " ) ) ) <nl> + if ( collapsed | | ( ! dragging & & ! mouse_inside & & get_constant ( " autohide " ) ) ) <nl> return ; <nl> <nl> if ( dragger_visibility ! = DRAGGER_VISIBLE ) <nl> void SplitContainer : : _gui_input ( const Ref < InputEvent > & p_event ) { <nl> if ( mouse_inside ! = mouse_inside_state ) { <nl> <nl> mouse_inside = mouse_inside_state ; <nl> - update ( ) ; <nl> + if ( get_constant ( " autohide " ) ) <nl> + update ( ) ; <nl> } <nl> <nl> if ( ! dragging ) <nl> | Merge pull request from YeldhamDev / splitcont_update_check | godotengine/godot | a291c837f000bd8936bc9b67efe60734f255266d | 2019-02-23T09:36:09Z |
mmm a / tensorflow / python / util / compat . py <nl> ppp b / tensorflow / python / util / compat . py <nl> def as_str_any ( value ) : <nl> @ tf_export ( ' compat . path_to_str ' ) <nl> def path_to_str ( path ) : <nl> " " " Returns the file system path representation of a ` PathLike ` object , else as it is . <nl> - <nl> + <nl> Args : <nl> path : An object that can be converted to path representation . <nl> <nl> | Final changes 3 | tensorflow/tensorflow | 06d153a5051eee8d6a620316e575c43dea32a955 | 2019-04-05T18:18:41Z |
mmm a / grpc / src / compiler / java_generator . h <nl> ppp b / grpc / src / compiler / java_generator . h <nl> class LogHelper { <nl> / / Abort the program after logging the mesage . <nl> # define GRPC_CODEGEN_FAIL GRPC_CODEGEN_CHECK ( false ) <nl> <nl> - using namespace std ; <nl> - <nl> namespace grpc_java_generator { <nl> struct Parameters { <nl> / / / / Defines the custom parameter types for methods <nl> | Remove using namespace std ; ( ) | google/flatbuffers | 5d3648b88a91e8a5d67db83df2d08bb9e8702ae8 | 2018-08-06T19:08:49Z |
mmm a / tools / SourceKit / tools / sourcekitd / bin / XPC / Client / sourcekitd . cpp <nl> ppp b / tools / SourceKit / tools / sourcekitd / bin / XPC / Client / sourcekitd . cpp <nl> sourcekitd_uid_t sourcekitd : : SKDUIDFromUIdent ( UIdent UID ) { <nl> } <nl> <nl> UIdent sourcekitd : : UIdentFromSKDUID ( sourcekitd_uid_t uid ) { <nl> - if ( StrFromUidMappingHandler ) <nl> - return UIdent ( StrFromUidMappingHandler ( uid ) ) ; <nl> + if ( StrFromUidMappingHandler ) { <nl> + if ( const char * str = StrFromUidMappingHandler ( uid ) ) <nl> + return UIdent ( str ) ; <nl> + } <nl> <nl> return UIdent : : getFromOpaqueValue ( uid ) ; <nl> } <nl> mmm a / tools / SourceKit / tools / sourcekitd / lib / API / sourcekitdAPI - Common . cpp <nl> ppp b / tools / SourceKit / tools / sourcekitd / lib / API / sourcekitdAPI - Common . cpp <nl> <nl> # include " llvm / ADT / ArrayRef . h " <nl> # include " llvm / ADT / SmallString . h " <nl> # include " llvm / Support / ErrorHandling . h " <nl> + # include " llvm / Support / Mutex . h " <nl> # include " llvm / Support / SourceMgr . h " <nl> # include " llvm / Support / Threading . h " <nl> # include " llvm / Support / raw_ostream . h " <nl> # include " llvm / Support / YAMLParser . h " <nl> + # include < mutex > <nl> <nl> using namespace SourceKit ; <nl> using namespace sourcekitd ; <nl> void sourcekitd : : enableLogging ( StringRef LoggerName ) { <nl> / / Public API <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = / / <nl> <nl> + static llvm : : sys : : Mutex GlobalInitMtx ; <nl> + static unsigned gInitRefCount = 0 ; <nl> + <nl> void sourcekitd_initialize ( void ) { <nl> - llvm : : install_fatal_error_handler ( fatal_error_handler , 0 ) ; <nl> + llvm : : sys : : ScopedLock L ( GlobalInitMtx ) ; <nl> + + + gInitRefCount ; <nl> + if ( gInitRefCount > 1 ) <nl> + return ; <nl> + <nl> + static std : : once_flag flag ; <nl> + std : : call_once ( flag , [ ] ( ) { <nl> + llvm : : install_fatal_error_handler ( fatal_error_handler , 0 ) ; <nl> + sourcekitd : : enableLogging ( " sourcekit " ) ; <nl> + } ) ; <nl> <nl> - sourcekitd : : enableLogging ( " sourcekit " ) ; <nl> LOG_INFO_FUNC ( High , " initializing " ) ; <nl> sourcekitd : : initialize ( ) ; <nl> } <nl> <nl> void sourcekitd_shutdown ( void ) { <nl> + llvm : : sys : : ScopedLock L ( GlobalInitMtx ) ; <nl> + - - gInitRefCount ; <nl> + if ( gInitRefCount > 0 ) <nl> + return ; <nl> + <nl> LOG_INFO_FUNC ( High , " shutting down " ) ; <nl> sourcekitd : : shutdown ( ) ; <nl> } <nl> | [ sourcekitd ] Be tolerant of multiple calls to sourcekitd_initialize . | apple/swift | 8c6c9a27c1a76cb29874215ed610d1668195de55 | 2015-11-30T18:46:52Z |
mmm a / project / VS2010Express / XBMC . vcxproj . filters <nl> ppp b / project / VS2010Express / XBMC . vcxproj . filters <nl> <nl> < Filter > filesystem < / Filter > <nl> < / ClInclude > <nl> < ClInclude Include = " . . \ . . \ xbmc \ cores \ paplayer \ PCMCodec . h " > <nl> - < Filter > cores \ paplayer < / Filter > = <nl> + < Filter > cores \ paplayer < / Filter > <nl> < / ClInclude > <nl> < ClInclude Include = " . . \ . . \ xbmc \ XbmcContext . h " / > <nl> < ClInclude Include = " . . \ . . \ xbmc \ commons \ ilog . h " > <nl> | equals doesn ' t always imply no difference . . . | xbmc/xbmc | 071beb3f2131116b4b585b5988285ee1c6a61a5f | 2012-05-01T00:46:20Z |
mmm a / src / qt / bitcoinamountfield . cpp <nl> ppp b / src / qt / bitcoinamountfield . cpp <nl> void BitcoinAmountField : : unitChanged ( int idx ) <nl> amount - > setDecimals ( BitcoinUnits : : decimals ( currentUnit ) ) ; <nl> amount - > setMaximum ( qPow ( 10 , BitcoinUnits : : amountDigits ( currentUnit ) ) - qPow ( 10 , - amount - > decimals ( ) ) ) ; <nl> <nl> + if ( currentUnit = = BitcoinUnits : : uBTC ) <nl> + amount - > setSingleStep ( 0 . 01 ) ; <nl> + else <nl> + amount - > setSingleStep ( 0 . 001 ) ; <nl> + <nl> if ( valid ) <nl> { <nl> / / If value was valid , re - place it in the widget with the new unit <nl> mmm a / src / qt / bitcoingui . cpp <nl> ppp b / src / qt / bitcoingui . cpp <nl> <nl> # include < QUrl > <nl> # include < QMimeData > <nl> # include < QStyle > <nl> + # include < QSettings > <nl> + # include < QDesktopWidget > <nl> <nl> # include < iostream > <nl> <nl> BitcoinGUI : : BitcoinGUI ( QWidget * parent ) : <nl> rpcConsole ( 0 ) , <nl> prevBlocks ( 0 ) <nl> { <nl> - resize ( 850 , 550 ) ; <nl> + restoreWindowGeometry ( ) ; <nl> setWindowTitle ( tr ( " Bitcoin " ) + " - " + tr ( " Wallet " ) ) ; <nl> # ifndef Q_OS_MAC <nl> qApp - > setWindowIcon ( QIcon ( " : icons / bitcoin " ) ) ; <nl> BitcoinGUI : : BitcoinGUI ( QWidget * parent ) : <nl> <nl> BitcoinGUI : : ~ BitcoinGUI ( ) <nl> { <nl> + saveWindowGeometry ( ) ; <nl> if ( trayIcon ) / / Hide tray icon , as deleting will let it linger until quit ( on Ubuntu ) <nl> trayIcon - > hide ( ) ; <nl> # ifdef Q_OS_MAC <nl> void BitcoinGUI : : trayIconActivated ( QSystemTrayIcon : : ActivationReason reason ) <nl> } <nl> # endif <nl> <nl> + void BitcoinGUI : : saveWindowGeometry ( ) <nl> + { <nl> + QSettings settings ; <nl> + settings . setValue ( " nWindowPos " , pos ( ) ) ; <nl> + settings . setValue ( " nWindowSize " , size ( ) ) ; <nl> + } <nl> + <nl> + void BitcoinGUI : : restoreWindowGeometry ( ) <nl> + { <nl> + QSettings settings ; <nl> + QPoint pos = settings . value ( " nWindowPos " ) . toPoint ( ) ; <nl> + QSize size = settings . value ( " nWindowSize " , QSize ( 850 , 550 ) ) . toSize ( ) ; <nl> + if ( ! pos . x ( ) & & ! pos . y ( ) ) <nl> + { <nl> + QRect screen = qApp - > desktop ( ) - > screenGeometry ( ) ; <nl> + pos . setX ( ( screen . width ( ) - size . width ( ) ) / 2 ) ; <nl> + pos . setY ( ( screen . height ( ) - size . height ( ) ) / 2 ) ; <nl> + } <nl> + resize ( size ) ; <nl> + move ( pos ) ; <nl> + } <nl> + <nl> void BitcoinGUI : : optionsClicked ( ) <nl> { <nl> if ( ! clientModel | | ! clientModel - > getOptionsModel ( ) ) <nl> mmm a / src / qt / bitcoingui . h <nl> ppp b / src / qt / bitcoingui . h <nl> class BitcoinGUI : public QMainWindow <nl> void createTrayIcon ( ) ; <nl> / * * Create system tray menu ( or setup the dock menu ) * / <nl> void createTrayIconMenu ( ) ; <nl> + / * * Save window size and position * / <nl> + void saveWindowGeometry ( ) ; <nl> + / * * Restore window size and position * / <nl> + void restoreWindowGeometry ( ) ; <nl> <nl> public slots : <nl> / * * Set number of connections shown in the UI * / <nl> | Merge pull request from r000n / staging | bitcoin/bitcoin | 8142ac2c18eda6550058c930151908682ebec350 | 2013-03-29T08:40:32Z |
mmm a / README . md <nl> ppp b / README . md <nl> deep learning programs together to maximize the efficiency and your productivity <nl> <nl> What ' s New <nl> mmmmmmmmm - <nl> + * [ Guide to Creating New Operators ( Layers ) ] ( https : / / mxnet - bing . readthedocs . org / en / latest / tutorial / new_op_howto . html ) <nl> * [ Minimum MXNet Library in One File ] ( amalgamation ) <nl> * [ Training Deep Net on 14 Million Images on A Single Machine ] ( https : / / mxnet - bing . readthedocs . org / en / latest / tutorial / imagenet_full . html ) <nl> * [ MXNet . jl Julia binding initial release ] ( https : / / github . com / dmlc / MXNet . jl ) <nl> mmm a / doc / index . md <nl> ppp b / doc / index . md <nl> in terms of abstraction , optimization and trade - offs . <nl> Tutorial <nl> mmmmmm - - <nl> * [ Training Deep Net on 14 Million Images on A Single Machine ] ( tutorial / imagenet_full . md ) <nl> - <nl> + * [ How to Create New Operations ( Layers ) ] ( tutorial / new_op_howto . md ) <nl> <nl> Indices and tables <nl> mmmmmmmmmmmmmmmmmm <nl> mmm a / doc / python / index . md <nl> ppp b / doc / python / index . md <nl> Tutorials <nl> mmmmmmmmm <nl> * [ Python Overview Tutorial ] ( tutorial . md ) <nl> * [ Symbolic Configuration and Execution in Pictures ] ( symbol_in_pictures . md ) <nl> + * [ How to Create New Operations ( Layers ) ] ( tutorial / new_op_howto . md ) <nl> <nl> <nl> Python API Documents <nl> new file mode 100644 <nl> index 00000000000 . . f6af29f7ff4 <nl> mmm / dev / null <nl> ppp b / doc / tutorial / new_op_howto . md <nl> <nl> + # How to Create New Operations ( Layers ) <nl> + <nl> + This note will walk you through the process of creating new MXNet operations ( or layers ) . <nl> + <nl> + We try to do our best to provide high speed operators for most common use cases . However , if you do find yourself in need of custom layers , like a novel loss for your research , you have two options : <nl> + <nl> + * Implement an operator in native language ( NumpyOp in Python ) . This is quick to develop but may cause performance issues as it involves copying data and moving it to front - end . We recommend taking this approach first and moving to C + + / Cuda if it becomes a bottleneck . <nl> + <nl> + * Implement an operator in C + + and mshadow ( and Cuda if necessary ) . This can be difficult if you are not familiar with MXNet , mashadow or Cuda , but it will give you the best performance . We recommend this approach for performance critical operators . <nl> + <nl> + # # Implement Operators in Python <nl> + Implementing an operator in Python is similar to creating one in C + + but simpler . Let ' s create a softmax operator for example . We start by subclassing ` mxnet . operator . NumpyOp ` and then override a few methods . <nl> + <nl> + First we call our base constructor with ` need_top_grad = False ` : <nl> + ` ` ` python <nl> + class NumpySoftmax ( mx . operator . NumpyOp ) : <nl> + def __init__ ( self ) : <nl> + super ( NumpySoftmax , self ) . __init__ ( False ) <nl> + ` ` ` <nl> + This tells the engine that we don ' t need gradient from layers above for backprop because we are loss layer . <nl> + <nl> + Then we declare our input and output <nl> + ` ` ` python <nl> + def list_arguments ( self ) : <nl> + return [ ' data ' , ' label ' ] <nl> + <nl> + def list_outputs ( self ) : <nl> + return [ ' output ' ] <nl> + ` ` ` <nl> + Note that list arguments declares both input and parameter and we recommend ordering them as ` [ ' input1 ' , ' input2 ' , . . . , ' weight1 ' , ' weight2 ' , . . . ] ` <nl> + <nl> + Next we need to provide ` infer_shape ` to declare the shape of our output / weight and check the consistency of our input shapes : <nl> + ` ` ` python <nl> + def infer_shape ( self , in_shape ) : <nl> + data_shape = in_shape [ 0 ] <nl> + label_shape = ( in_shape [ 0 ] [ 0 ] , ) <nl> + output_shape = in_shape [ 0 ] <nl> + return [ data_shape , label_shape ] , [ output_shape ] <nl> + ` ` ` <nl> + The first dim of an input / output tensor is always batch size . Our label is a set of integers , one for each data entry , and our output has the same shape as input . Infer_shape should always return two lists , even if one of them is empty . <nl> + <nl> + Finally we have finished the preparation and ready to do the real thing : <nl> + ` ` ` python <nl> + def forward ( self , in_data , out_data ) : <nl> + x = in_data [ 0 ] <nl> + y = out_data [ 0 ] <nl> + y [ : ] = np . exp ( x - x . max ( axis = 1 ) . reshape ( ( x . shape [ 0 ] , 1 ) ) ) <nl> + y / = y . sum ( axis = 1 ) . reshape ( ( x . shape [ 0 ] , 1 ) ) <nl> + <nl> + def backward ( self , out_grad , in_data , out_data , in_grad ) : <nl> + l = in_data [ 1 ] <nl> + l = l . reshape ( ( l . size , ) ) . astype ( np . int ) <nl> + y = out_data [ 0 ] <nl> + dx = in_grad [ 0 ] <nl> + dx [ : ] = y <nl> + dx [ np . arange ( l . shape [ 0 ] ) , l ] - = 1 . 0 <nl> + ` ` ` <nl> + Remember when you assigning to a tensor , use ` x [ : ] = . . . ` so that you write to the original array instead of creating a new one . <nl> + <nl> + To use your custom operator , simply create a instance and call it : <nl> + ` ` ` python <nl> + mysoftmax = NumpySoftmax ( ) <nl> + mlp = mysoftmax ( data = fc3 , name = ' softmax ' ) <nl> + ` ` ` <nl> + Note that you should create a new instance for each symbol . <nl> + <nl> + The complete code for this example can be found at ` examples / numpy - ops / numpy_softmax . py ` <nl> + <nl> + # # Implement Operators in C + + <nl> + Please refer to [ Developer Guide - Operators ] ( https : / / mxnet . readthedocs . org / en / latest / developer - guide / operator . html ) for detail . <nl> mmm a / example / numpy - ops / numpy_softmax . py <nl> ppp b / example / numpy - ops / numpy_softmax . py <nl> <nl> <nl> <nl> class NumpySoftmax ( mx . operator . NumpyOp ) : <nl> - def need_top_grad ( self ) : <nl> - return False <nl> + def __init__ ( self ) : <nl> + super ( NumpySoftmax , self ) . __init__ ( False ) <nl> <nl> def list_arguments ( self ) : <nl> return [ ' data ' , ' label ' ] <nl> <nl> def list_outputs ( self ) : <nl> - return [ ' prob ' ] <nl> + return [ ' output ' ] <nl> <nl> def infer_shape ( self , in_shape ) : <nl> - return [ in_shape [ 0 ] , ( in_shape [ 0 ] [ 0 ] , ) ] , [ in_shape [ 0 ] ] <nl> + data_shape = in_shape [ 0 ] <nl> + label_shape = ( in_shape [ 0 ] [ 0 ] , ) <nl> + output_shape = in_shape [ 0 ] <nl> + return [ data_shape , label_shape ] , [ output_shape ] <nl> <nl> def forward ( self , in_data , out_data ) : <nl> - x = in_data [ 0 ] <nl> - y = out_data [ 0 ] <nl> - y [ : ] = np . exp ( x - x . max ( axis = 1 ) . reshape ( ( x . shape [ 0 ] , 1 ) ) ) <nl> - y / = y . sum ( axis = 1 ) . reshape ( ( x . shape [ 0 ] , 1 ) ) <nl> + x = in_data [ 0 ] <nl> + y = out_data [ 0 ] <nl> + y [ : ] = np . exp ( x - x . max ( axis = 1 ) . reshape ( ( x . shape [ 0 ] , 1 ) ) ) <nl> + y / = y . sum ( axis = 1 ) . reshape ( ( x . shape [ 0 ] , 1 ) ) <nl> <nl> def backward ( self , out_grad , in_data , out_data , in_grad ) : <nl> - l = in_data [ 1 ] <nl> - l = l . reshape ( ( l . size , ) ) . astype ( np . int ) <nl> - y = out_data [ 0 ] <nl> - dx = in_grad [ 0 ] <nl> - dx [ : ] = y <nl> - dx [ np . arange ( l . shape [ 0 ] ) , l ] - = 1 . 0 <nl> + l = in_data [ 1 ] <nl> + l = l . reshape ( ( l . size , ) ) . astype ( np . int ) <nl> + y = out_data [ 0 ] <nl> + dx = in_grad [ 0 ] <nl> + dx [ : ] = y <nl> + dx [ np . arange ( l . shape [ 0 ] ) , l ] - = 1 . 0 <nl> <nl> # define mlp <nl> <nl> | Merge pull request from piiswrong / master | apache/incubator-mxnet | fc54d6e593aa7530c4ecbca8769ec286d63bfb16 | 2015-11-08T21:50:57Z |
mmm a / atom / common / api / atom_api_native_image . cc <nl> ppp b / atom / common / api / atom_api_native_image . cc <nl> mate : : Handle < NativeImage > NativeImage : : CreateFromPath ( <nl> gfx : : ImageSkia image_skia ; <nl> <nl> base : : FilePath absolute_path = MakeAbsoluteFilePath ( path ) ; <nl> - / / MakeAbsoluteFilePath returns an empty path on failures <nl> + / / MakeAbsoluteFilePath returns an empty path on failures so use original path <nl> if ( absolute_path . empty ( ) ) { <nl> absolute_path = path ; <nl> } <nl> | Mention explicit using original path on failures | electron/electron | 145d5abe8007b55fe75403ebec4021199053f4f9 | 2016-03-08T00:45:14Z |
mmm a / tensorflow / python / ops / structured / structured_tensor . py <nl> ppp b / tensorflow / python / ops / structured / structured_tensor . py <nl> <nl> <nl> import re <nl> <nl> + from tensorflow . python . framework import dtypes <nl> from tensorflow . python . framework import ops <nl> from tensorflow . python . framework import tensor_shape <nl> + from tensorflow . python . framework import tensor_util <nl> + from tensorflow . python . ops import array_ops <nl> + from tensorflow . python . ops import check_ops <nl> from tensorflow . python . ops . ragged import ragged_tensor <nl> <nl> <nl> class StructuredTensor ( object ) : <nl> <nl> def __init__ ( self , implementation ) : <nl> " " " Private constructor - - use factory methods instead . " " " <nl> - if not isinstance ( implementation , _DenseStructuredTensor ) : <nl> + if not isinstance ( implementation , <nl> + ( _DenseStructuredTensor , _RaggedStructuredTensor ) ) : <nl> raise TypeError ( ' Invalid implementation class . ' ) <nl> self . _impl = implementation <nl> <nl> def from_fields ( cls , shape , fields ) : <nl> Returns : <nl> A ` StructuredTensor ` . <nl> " " " <nl> - return cls ( _DenseStructuredTensor ( shape , fields ) ) <nl> + shape = tensor_shape . as_shape ( shape ) <nl> + if shape . rank is None : <nl> + raise ValueError ( " StructuredTensor ' s shape must have known rank . " ) <nl> + <nl> + if shape . rank > 1 and any ( ragged_tensor . is_ragged ( v ) <nl> + for v in fields . values ( ) ) : <nl> + return cls . _from_ragged_fields ( shape , fields ) <nl> + else : <nl> + return cls ( _DenseStructuredTensor ( shape , fields ) ) <nl> + <nl> + @ classmethod <nl> + def from_row_splits ( cls , values , row_splits ) : <nl> + " " " Creates a ragged StructuredTensor with rows partitioned by ` row_splits ` . <nl> + <nl> + The returned ` StructuredTensor ` corresponds with the python list defined by : <nl> + <nl> + ` ` ` python <nl> + result = [ values [ row_splits [ i ] : row_splits [ i + 1 ] ] <nl> + for i in range ( len ( row_splits ) - 1 ) ] <nl> + ` ` ` <nl> + <nl> + Args : <nl> + values : A ` StructuredTensor ` with shape ` [ nvals , . . . ] ` . <nl> + row_splits : A 1 - D integer tensor with shape ` [ nrows + 1 ] ` . Must not be <nl> + empty , and must be sorted in ascending order . ` row_splits [ 0 ] ` must be <nl> + zero and ` row_splits [ - 1 ] ` must be ` nvals ` . <nl> + <nl> + Returns : <nl> + A ragged ` StructuredTensor ` . ` result . rank = values . rank + 1 ` . <nl> + " " " <nl> + return cls ( _RaggedStructuredTensor ( values , row_splits ) ) <nl> + <nl> + # @ TODO ( edloper ) : Add from_row_lengths , etc . <nl> + <nl> + @ classmethod <nl> + def _from_ragged_fields ( cls , shape , fields ) : <nl> + " " " Creates a ` StructuredTensor ` from a dictionary of ragged fields . " " " <nl> + bad_splits = ( ' ` fields ` are not consistent in the outer % d dimensions ' % <nl> + shape . rank ) <nl> + # All of the fields must have matching row_splits . Check that they <nl> + # actually match , and pick one to use as the row_splits for the result . <nl> + # TODO ( edloper ) : If the ragged tensors have uniform_row_length , then <nl> + # check that use that instead . <nl> + if any ( not ragged_tensor . is_ragged ( v ) for v in fields . values ( ) ) : <nl> + raise ValueError ( bad_splits ) <nl> + shared_row_splits = [ v . row_splits for v in fields . values ( ) ] <nl> + row_splits = shared_row_splits [ 0 ] <nl> + checks = [ check_ops . assert_equal ( row_splits , s , message = bad_splits ) <nl> + for s in shared_row_splits [ 1 : ] ] <nl> + with ops . control_dependencies ( checks ) : <nl> + row_splits = array_ops . identity ( row_splits ) <nl> + <nl> + # Build a values for the RaggedStructuredTensor by stripping the outer <nl> + # row_splits off of each field . <nl> + values_shape = tensor_shape . TensorShape ( [ None ] ) . concatenate ( shape [ 2 : ] ) <nl> + values = cls . from_fields ( values_shape , <nl> + dict ( ( k , v . values ) for ( k , v ) in fields . items ( ) ) ) <nl> + <nl> + return cls . from_row_splits ( values , row_splits ) <nl> <nl> # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> # Properties <nl> def field_value ( self , field_name ) : <nl> # Regular expression used to determine whether a string is a valid field name . <nl> # Note : we plan to relax ( or possibly eliminate ) this in the future ; you <nl> # should not rely on the fact that some field names are currently disallowed . <nl> - _FIELD_NAME_RE = re . compile ( ' ^ [ a - zA - Z ] + $ ' ) <nl> + _FIELD_NAME_RE = re . compile ( ' ^ [ a - zA - Z ] [ a - zA - Z0 - 9_ ] * $ ' ) <nl> <nl> <nl> class _DenseStructuredTensor ( object ) : <nl> def __repr__ ( self ) : <nl> return ' StructuredTensor ( % s , % r ) ' % ( self . _static_shape , self . _fields ) <nl> <nl> def field_names ( self ) : <nl> + " " " See StructuredTensor . field_names for documentation . " " " <nl> return tuple ( self . _fields . keys ( ) ) <nl> <nl> def field_value ( self , field_name ) : <nl> + " " " See StructuredTensor . field_value for documentation . " " " <nl> if isinstance ( field_name , ( list , tuple ) ) : <nl> value = self <nl> for f in field_name : <nl> def field_value ( self , field_name ) : <nl> return self . _fields [ field_name ] <nl> <nl> <nl> - # TODO ( edloper ) : Add _RaggedStructuredTensor subclass . <nl> + class _RaggedStructuredTensor ( object ) : <nl> + " " " A StructuredTensor with ragged dimensions . <nl> + <nl> + # # # Encoding <nl> + <nl> + Internally , each ` _RaggedStructuredTensor ` is encoded using : <nl> + <nl> + * ` values ` : A ` StructuredTensor ` with ` rank > = 1 ` , containing a <nl> + concatenation of all the rows in this ` RaggedStructuredTensor ` . <nl> + <nl> + * One or more " row - partitioning tensors " that indicate how the concatenated <nl> + ` values ` tensor is divided into rows . <nl> + <nl> + For more information on this encoding , see the ` RaggedTensor ` documentation . <nl> + " " " <nl> + <nl> + def __init__ ( self , <nl> + values , <nl> + row_splits , <nl> + row_lengths = None , <nl> + value_rowids = None , <nl> + nrows = None , <nl> + uniform_row_length = None ) : <nl> + " " " Creates a ` _RaggedStructuredTensor ` . " " " <nl> + # Validate values . <nl> + if not isinstance ( values , StructuredTensor ) : <nl> + raise TypeError ( ' values must be a StructuredTensor ' ) <nl> + values . shape . with_rank_at_least ( 1 ) <nl> + <nl> + # Convert row - partitioning tensors . <nl> + with ops . name_scope ( None , ' RaggedStructuredTensor ' , [ <nl> + values , row_splits , row_lengths , value_rowids , nrows , uniform_row_length <nl> + ] ) : <nl> + if row_splits is not None : <nl> + row_splits = ops . convert_to_tensor ( <nl> + row_splits , name = ' row_splits ' , preferred_dtype = dtypes . int64 ) <nl> + if row_lengths is not None : <nl> + row_lengths = ops . convert_to_tensor ( <nl> + row_lengths , name = ' row_lengths ' , preferred_dtype = dtypes . int64 ) <nl> + if value_rowids is not None : <nl> + value_rowids = ops . convert_to_tensor ( <nl> + value_rowids , name = ' value_rowids ' , preferred_dtype = dtypes . int64 ) <nl> + if nrows is not None : <nl> + nrows = ops . convert_to_tensor ( <nl> + nrows , name = ' nrows ' , preferred_dtype = dtypes . int64 ) <nl> + if uniform_row_length is not None : <nl> + uniform_row_length = ops . convert_to_tensor ( <nl> + uniform_row_length , <nl> + name = ' uniform_row_length ' , <nl> + preferred_dtype = dtypes . int64 ) <nl> + <nl> + # Validate row - partitioning tensors . <nl> + partitions = [ <nl> + row_splits , row_lengths , value_rowids , nrows , uniform_row_length <nl> + ] <nl> + partition_dtypes = set ( [ p . dtype for p in partitions if p is not None ] ) <nl> + if len ( partition_dtypes ) ! = 1 : <nl> + raise ValueError ( ' Inconsistent dtypes for row - partitioning tensors ' ) <nl> + if list ( partition_dtypes ) [ 0 ] not in ( dtypes . int32 , dtypes . int64 ) : <nl> + raise ValueError ( ' Row - partitioning tensors must have dtype ' <nl> + ' int32 or int64 , got % s ' % list ( partition_dtypes ) [ 0 ] ) <nl> + if row_splits is not None : <nl> + row_splits . shape . assert_has_rank ( 1 ) <nl> + if tensor_shape . dimension_value ( row_splits . shape [ 0 ] ) = = 0 : <nl> + raise ValueError ( ' row_splits may not be empty ' ) <nl> + if row_lengths is not None : <nl> + row_lengths . shape . assert_has_rank ( 1 ) <nl> + if value_rowids is not None : <nl> + value_rowids . shape . assert_has_rank ( 1 ) <nl> + if nrows is not None : <nl> + nrows . shape . assert_has_rank ( 0 ) <nl> + if uniform_row_length is not None : <nl> + uniform_row_length . shape . assert_has_rank ( 0 ) <nl> + <nl> + self . _values = values <nl> + self . _row_splits = row_splits <nl> + self . _row_lengths = row_lengths <nl> + self . _value_rowids = value_rowids <nl> + self . _nrows = nrows <nl> + self . _uniform_row_length = uniform_row_length <nl> + <nl> + @ property <nl> + def rank ( self ) : <nl> + return self . _values . shape . rank + 1 <nl> + <nl> + @ property <nl> + def shape ( self ) : <nl> + " " " The statically known shape of this RaggedStructuredTensor . " " " <nl> + nrows = tensor_shape . dimension_at_index ( self . _row_splits . shape , 0 ) - 1 <nl> + <nl> + if self . _uniform_row_length is not None : <nl> + row_length = tensor_util . constant_value ( self . _uniform_row_length ) <nl> + else : <nl> + row_length = None <nl> + <nl> + values_shape = self . _values . shape <nl> + value_shape = values_shape [ 1 : ] <nl> + return tensor_shape . TensorShape ( [ nrows , <nl> + row_length ] ) . concatenate ( value_shape ) <nl> + <nl> + @ property <nl> + def ragged_rank ( self ) : <nl> + " " " The number of ragged dimensions in this RaggedStructuredTensor . " " " <nl> + values_is_ragged = isinstance ( self . _values , _RaggedStructuredTensor ) <nl> + return self . _values . ragged_rank + 1 if values_is_ragged else 1 <nl> + <nl> + def __repr__ ( self ) : <nl> + return ' StructuredTensor ( % s , % r ) ' % ( self . _static_shape , self . _fields ) <nl> + <nl> + def field_names ( self ) : <nl> + " " " See StructuredTensor . field_names for documentation . " " " <nl> + return tuple ( self . _values . field_names ( ) ) <nl> + <nl> + def field_value ( self , field_name ) : <nl> + " " " See StructuredTensor . field_value for documentation . " " " <nl> + if isinstance ( field_name , ( list , tuple ) ) : <nl> + value = self <nl> + for f in field_name : <nl> + value = value . field_value ( f ) <nl> + return value <nl> + return ragged_tensor . RaggedTensor ( <nl> + values = self . _values . field_value ( field_name ) , <nl> + row_splits = self . _row_splits , <nl> + cached_row_lengths = self . _row_lengths , <nl> + cached_value_rowids = self . _value_rowids , <nl> + cached_nrows = self . _nrows , <nl> + uniform_row_length = self . _uniform_row_length , <nl> + internal = True ) <nl> mmm a / tensorflow / python / ops / structured / structured_tensor_test . py <nl> ppp b / tensorflow / python / ops / structured / structured_tensor_test . py <nl> <nl> from __future__ import division <nl> from __future__ import print_function <nl> <nl> + import numpy as np <nl> from absl . testing import parameterized <nl> <nl> + from tensorflow . python . framework import errors <nl> from tensorflow . python . framework import ops <nl> + from tensorflow . python . framework import tensor_shape <nl> from tensorflow . python . framework import test_util <nl> from tensorflow . python . ops . ragged import ragged_factory_ops <nl> from tensorflow . python . ops . ragged import ragged_tensor <nl> def assertAllEqual ( self , a , b , msg = None ) : <nl> " r " : ragged_factory_ops . constant_value ( [ [ 1 , 2 ] , [ 3 ] ] ) , <nl> } , <nl> } , <nl> + { <nl> + " shape " : [ 2 , None ] , <nl> + " fields " : { <nl> + " r " : ragged_factory_ops . constant_value ( <nl> + [ [ [ 1 , 2 ] , [ 3 ] ] , [ [ 4 , 5 , 6 ] , [ 7 ] , [ 8 , 9 ] ] ] ) , <nl> + } , <nl> + } , <nl> + { <nl> + # Note : fields must have identical row_splits . <nl> + " shape " : [ 2 , None ] , <nl> + " fields " : { <nl> + " a " : ragged_factory_ops . constant_value ( [ [ 1 , 2 ] , [ 3 ] ] ) , <nl> + " b " : ragged_factory_ops . constant_value ( [ [ 4 , 5 ] , [ 6 ] ] ) , <nl> + } , <nl> + } , <nl> + { <nl> + # Note : fields must have identical outer row_splits . <nl> + " shape " : [ 2 , None ] , <nl> + " fields " : { <nl> + " a " : ragged_factory_ops . constant_value ( <nl> + [ [ [ 1 , 2 ] , [ 3 ] ] , [ [ 4 , 5 , 6 ] , [ 7 ] , [ 8 , 9 ] ] ] ) , <nl> + " b " : ragged_factory_ops . constant_value ( <nl> + [ [ [ 1 ] , [ ] ] , [ [ 2 , 3 ] , [ 4 , 5 , 6 ] , [ 7 , 8 ] ] ] ) , <nl> + } , <nl> + } , <nl> ] ) # pyformat : disable <nl> - def testConstruction ( self , shape , fields , expected_shape = None ) : <nl> + def testFromFields ( self , shape , fields , expected_shape = None ) : <nl> struct = structured_tensor . StructuredTensor . from_fields ( shape , fields ) <nl> if expected_shape is None : <nl> expected_shape = shape <nl> def testNestedStructConstruction ( self ) : <nl> r " Shapes \ ( [ 01 ] , \ ) and \ ( [ 01 ] , \ ) are not compatible " ) , <nl> ( [ ] , { " " : 5 } , ValueError , " Field name ' ' is not currently allowed . " ) , <nl> ( [ ] , { " _ " : 5 } , ValueError , " Field name ' _ ' is not currently allowed . " ) , <nl> + { <nl> + # Note : fields must have identical outer row_splits . <nl> + " shape " : [ 2 , None ] , <nl> + " fields " : { <nl> + " r1 " : ragged_factory_ops . constant_value ( <nl> + [ [ 1 , 2 ] , [ 3 ] ] ) , <nl> + " r2 " : ragged_factory_ops . constant_value ( <nl> + [ [ 1 , 2 , 3 ] , [ 4 ] ] ) , <nl> + } , <nl> + " err " : errors . InvalidArgumentError , <nl> + " msg " : r " ` fields ` are not consistent in the outer 2 dimension " <nl> + } , <nl> + ] ) # pyformat : disable <nl> + def testFromFieldsErrors ( self , shape , fields , err , msg = None ) : <nl> + with self . assertRaisesRegexp ( err , msg ) : <nl> + struct = structured_tensor . StructuredTensor . from_fields ( shape , fields ) <nl> + self . evaluate ( struct . field_value ( struct . field_names ( ) [ 0 ] ) ) <nl> + <nl> + @ parameterized . parameters ( [ <nl> + { <nl> + " shape " : [ 3 ] , <nl> + " fields " : { " x " : [ 1 , 2 , 3 ] , " y " : [ [ 1 , 2 ] , [ 3 , 4 ] , [ 5 , 6 ] ] } , <nl> + " row_splits " : [ 0 , 2 , 3 ] , <nl> + } , <nl> ] ) # pyformat : disable <nl> - def testConstructionErrors ( self , shape , fields , err , msg = None ) : <nl> + def testFromRowSplits ( self , shape , fields , row_splits , expected_shape = None ) : <nl> + values = structured_tensor . StructuredTensor . from_fields ( shape , fields ) <nl> + struct = structured_tensor . StructuredTensor . from_row_splits ( <nl> + values , row_splits ) <nl> + if expected_shape is None : <nl> + expected_shape = tensor_shape . TensorShape ( [ None , <nl> + None ] ) . concatenate ( shape [ 1 : ] ) <nl> + struct . shape . assert_is_compatible_with ( expected_shape ) <nl> + else : <nl> + self . assertEqual ( struct . shape . as_list ( ) , expected_shape ) <nl> + self . assertEqual ( struct . shape . rank , struct . rank ) <nl> + self . assertEqual ( struct . field_names ( ) , tuple ( fields . keys ( ) ) ) <nl> + for field , value in fields . items ( ) : <nl> + self . assertIsInstance ( <nl> + struct . field_value ( field ) , <nl> + ( ops . Tensor , structured_tensor . StructuredTensor , <nl> + ragged_tensor . RaggedTensor ) ) <nl> + self . assertAllEqual ( <nl> + struct . field_value ( field ) , <nl> + ragged_tensor . RaggedTensor . from_row_splits ( value , row_splits ) ) <nl> + <nl> + @ parameterized . parameters ( [ <nl> + ( [ ] , { } , [ " x " ] , ValueError , <nl> + r " Shape \ ( \ ) must have rank at least 1 " ) , <nl> + ( [ 0 ] , { } , [ " x " ] , ValueError , <nl> + r " Row - partitioning tensors must have dtype int32 or int64 " ) , <nl> + ( [ 0 ] , { } , [ [ 0 ] ] , ValueError , <nl> + r " Shape \ ( 1 , 1 \ ) must have rank 1 " ) , <nl> + ( [ 0 ] , { } , np . array ( [ ] , np . int32 ) , ValueError , <nl> + r " row_splits may not be empty " ) , <nl> + ] ) # pyformat : disable <nl> + def testFromRowSplitsErrors ( self , shape , fields , row_splits , err , msg = None ) : <nl> with self . assertRaisesRegexp ( err , msg ) : <nl> - structured_tensor . StructuredTensor . from_fields ( shape , fields ) <nl> + values = structured_tensor . StructuredTensor . from_fields ( shape , fields ) <nl> + structured_tensor . StructuredTensor . from_row_splits ( values , row_splits ) <nl> + <nl> + def testFromRowSplitsBadValueType ( self ) : <nl> + with self . assertRaisesRegexp ( TypeError , <nl> + " values must be a StructuredTensor " ) : <nl> + structured_tensor . StructuredTensor . from_row_splits ( [ 1 , 2 ] , [ 0 , 2 ] ) <nl> <nl> <nl> if __name__ = = " __main__ " : <nl> | Extend StructuredTensor to support ragged collections of structures . | tensorflow/tensorflow | f0d66b2674fecc0f2be1423cf696a7e6e7c7a39d | 2019-10-10T02:58:35Z |
mmm a / src / Storages / MergeTree / ReplicatedMergeTreeBlockOutputStream . cpp <nl> ppp b / src / Storages / MergeTree / ReplicatedMergeTreeBlockOutputStream . cpp <nl> void ReplicatedMergeTreeBlockOutputStream : : checkQuorumPrecondition ( zkutil : : ZooKe <nl> { <nl> quorum_info . status_path = storage . zookeeper_path + " / quorum / status " ; <nl> <nl> - std : : future < Coordination : : GetResponse > quorum_status_future = zookeeper - > asyncTryGet ( quorum_info . status_path ) ; <nl> std : : future < Coordination : : GetResponse > is_active_future = zookeeper - > asyncTryGet ( storage . replica_path + " / is_active " ) ; <nl> std : : future < Coordination : : GetResponse > host_future = zookeeper - > asyncTryGet ( storage . replica_path + " / host " ) ; <nl> <nl> void ReplicatedMergeTreeBlockOutputStream : : checkQuorumPrecondition ( zkutil : : ZooKe <nl> * If the quorum is reached , then the node is deleted . <nl> * / <nl> <nl> - auto quorum_status = quorum_status_future . get ( ) ; <nl> - if ( quorum_status . error ! = Coordination : : Error : : ZNONODE & & ! quorum_parallel ) <nl> - throw Exception ( " Quorum for previous write has not been satisfied yet . Status : " + quorum_status . data , <nl> + String quorum_status ; <nl> + if ( ! quorum_parallel & & zookeeper - > tryGet ( quorum_info . status_path , quorum_status ) ) <nl> + throw Exception ( " Quorum for previous write has not been satisfied yet . Status : " + quorum_status , <nl> ErrorCodes : : UNSATISFIED_QUORUM_FOR_PREVIOUS_WRITE ) ; <nl> <nl> / / / Both checks are implicitly made also later ( otherwise there would be a race condition ) . <nl> void ReplicatedMergeTreeBlockOutputStream : : commitPart ( <nl> if ( is_already_existing_part ) <nl> { <nl> / / / We get duplicate part without fetch <nl> - storage . updateQuorum ( part - > name ) ; <nl> + / / / Check if this quorum insert is parallel or not <nl> + if ( zookeeper - > exists ( storage . zookeeper_path + " / quorum / status " ) ) <nl> + storage . updateQuorum ( part - > name , false ) ; <nl> + else if ( zookeeper - > exists ( storage . zookeeper_path + " / quorum / parallel / " + part - > name ) ) <nl> + storage . updateQuorum ( part - > name , true ) ; <nl> } <nl> <nl> / / / We are waiting for quorum to be satisfied . <nl> mmm a / src / Storages / MergeTree / ReplicatedMergeTreeRestartingThread . cpp <nl> ppp b / src / Storages / MergeTree / ReplicatedMergeTreeRestartingThread . cpp <nl> void ReplicatedMergeTreeRestartingThread : : updateQuorumIfWeHavePart ( ) <nl> & & zookeeper - > exists ( storage . replica_path + " / parts / " + quorum_entry . part_name ) ) <nl> { <nl> LOG_WARNING ( log , " We have part { } but we is not in quorum . Updating quorum . This shouldn ' t happen often . " , quorum_entry . part_name ) ; <nl> - storage . updateQuorum ( quorum_entry . part_name ) ; <nl> + storage . updateQuorum ( quorum_entry . part_name , false ) ; <nl> } <nl> } <nl> <nl> void ReplicatedMergeTreeRestartingThread : : updateQuorumIfWeHavePart ( ) <nl> & & zookeeper - > exists ( storage . replica_path + " / parts / " + partition ) ) <nl> { <nl> LOG_WARNING ( log , " We have part { } but we is not in quorum . Updating quorum . This shouldn ' t happen often . " , partition ) ; <nl> - storage . updateQuorum ( partition ) ; <nl> + storage . updateQuorum ( partition , true ) ; <nl> } <nl> } <nl> } <nl> mmm a / src / Storages / StorageReplicatedMergeTree . cpp <nl> ppp b / src / Storages / StorageReplicatedMergeTree . cpp <nl> String StorageReplicatedMergeTree : : findReplicaHavingCoveringPart ( <nl> <nl> / * * If a quorum is tracked for a part , update information about it in ZK . <nl> * / <nl> - void StorageReplicatedMergeTree : : updateQuorum ( const String & part_name ) <nl> + void StorageReplicatedMergeTree : : updateQuorum ( const String & part_name , bool is_parallel ) <nl> { <nl> auto zookeeper = getZooKeeper ( ) ; <nl> <nl> / / / Information on which replicas a part has been added , if the quorum has not yet been reached . <nl> - const String quorum_unparallel_status_path = zookeeper_path + " / quorum / status " ; <nl> + const String quorum_status_path = is_parallel ? zookeeper_path + " / quorum / parallel / " + part_name : zookeeper_path + " / quorum / status " ; <nl> / / / The name of the previous part for which the quorum was reached . <nl> const String quorum_last_part_path = zookeeper_path + " / quorum / last_part " ; <nl> - const String quorum_parallel_status_path = zookeeper_path + " / quorum / parallel / " + part_name ; <nl> <nl> String value ; <nl> Coordination : : Stat stat ; <nl> <nl> / / / If there is no node , then all quorum INSERTs have already reached the quorum , and nothing is needed . <nl> - while ( true ) <nl> + while ( zookeeper - > tryGet ( quorum_status_path , value , & stat ) ) <nl> { <nl> - bool quorum_parallel ( false ) ; <nl> - ReplicatedMergeTreeQuorumEntry quorum_entry ; <nl> - <nl> - if ( zookeeper - > tryGet ( quorum_unparallel_status_path , value , & stat ) ) <nl> - { } <nl> - else if ( zookeeper - > tryGet ( quorum_parallel_status_path , value , & stat ) ) <nl> - quorum_parallel = true ; <nl> - else <nl> - break ; <nl> - <nl> - const String quorum_status_path = quorum_parallel ? quorum_parallel_status_path : quorum_unparallel_status_path ; <nl> - quorum_entry . fromString ( value ) ; <nl> - <nl> + ReplicatedMergeTreeQuorumEntry quorum_entry ( value ) ; <nl> if ( quorum_entry . part_name ! = part_name ) <nl> { <nl> / / / The quorum has already been achieved . Moreover , another INSERT with a quorum has already started . <nl> void StorageReplicatedMergeTree : : updateQuorum ( const String & part_name ) <nl> Coordination : : Requests ops ; <nl> Coordination : : Responses responses ; <nl> <nl> - if ( ! quorum_parallel ) <nl> + if ( ! is_parallel ) <nl> { <nl> Coordination : : Stat added_parts_stat ; <nl> String old_added_parts = zookeeper - > get ( quorum_last_part_path , & added_parts_stat ) ; <nl> bool StorageReplicatedMergeTree : : fetchPart ( const String & part_name , const Stora <nl> * If you do not have time , in case of losing the session , when you restart the server - see the ` ReplicatedMergeTreeRestartingThread : : updateQuorumIfWeHavePart ` method . <nl> * / <nl> if ( quorum ) <nl> - updateQuorum ( part_name ) ; <nl> + { <nl> + / / / Check if this quorum insert is parallel or not <nl> + if ( zookeeper - > exists ( zookeeper_path + " / quorum / status " ) ) <nl> + updateQuorum ( part_name , false ) ; <nl> + else if ( zookeeper - > exists ( zookeeper_path + " / quorum / parallel / " + part_name ) ) <nl> + updateQuorum ( part_name , true ) ; <nl> + } <nl> <nl> - / / / alexelex : i ' m not sure in witch order should that and merge_selecting_task - > schedule ( ) be <nl> / / / merged parts that are still inserted with quorum . if it only contains one block , it hasn ' t been merged before <nl> - if ( part_info . max_block ! = part_info . min_block ) <nl> + if ( part_info . level ! = 0 | | part_info . mutation ! = 0 ) <nl> { <nl> Strings quorum_parts = zookeeper - > getChildren ( zookeeper_path + " / quorum / parallel " ) ; <nl> for ( const String & quorum_part : quorum_parts ) <nl> { <nl> auto quorum_part_info = MergeTreePartInfo : : fromPartName ( quorum_part , format_version ) ; <nl> if ( part_info . contains ( quorum_part_info ) ) <nl> - updateQuorum ( quorum_part ) ; <nl> + updateQuorum ( quorum_part , true ) ; <nl> } <nl> } <nl> <nl> mmm a / src / Storages / StorageReplicatedMergeTree . h <nl> ppp b / src / Storages / StorageReplicatedMergeTree . h <nl> class StorageReplicatedMergeTree final : public ext : : shared_ptr_helper < StorageRe <nl> <nl> <nl> / / / With the quorum being tracked , add a replica to the quorum for the part . <nl> - void updateQuorum ( const String & part_name ) ; <nl> + void updateQuorum ( const String & part_name , bool is_parallel ) ; <nl> <nl> / / / Deletes info from quorum / last_part node for particular partition_id . <nl> void cleanLastPartNode ( const String & partition_id ) ; <nl> | changing the condition for updateQuorum , specialized it and reduced the number of calls to the zk | ClickHouse/ClickHouse | a43cac2c1add7d750aa8827c44d03fab62b59533 | 2020-10-07T11:28:48Z |
mmm a / . gitmodules <nl> ppp b / . gitmodules <nl> <nl> [ submodule " 3rdparty / asyncfuture " ] <nl> path = 3rdparty / asyncfuture <nl> url = https : / / github . com / benlau / asyncfuture . git <nl> + [ submodule " 3rdparty / qt - unix - signals " ] <nl> + path = 3rdparty / qt - unix - signals <nl> + url = https : / / github . com / sijk / qt - unix - signals . git <nl> mmm a / 3rdparty / 3rdparty . pri <nl> ppp b / 3rdparty / 3rdparty . pri <nl> unix : ! macx { # ubuntu & debian <nl> } <nl> <nl> LIBS + = $ $ BREAKPADDIR / client / linux / libbreakpad_client . a <nl> + <nl> + # Unix signal watcher <nl> + HEADERS + = $ $ PWD / qt - unix - signals / sigwatch . h <nl> + SOURCES + = $ $ PWD / qt - unix - signals / sigwatch . cpp <nl> + INCLUDEPATH + = $ $ PWD / qt - unix - signals / <nl> } <nl> new file mode 160000 <nl> index 00000000 . . d6a1d120 <nl> mmm / dev / null <nl> ppp b / 3rdparty / qt - unix - signals <nl> @ @ - 0 , 0 + 1 @ @ <nl> + Subproject commit d6a1d12053c4176d1f693fa083752004c3023bce <nl> mmm a / src / main . cpp <nl> ppp b / src / main . cpp <nl> <nl> # include " app / app . h " <nl> # include " modules / crashhandler / crashhandler . h " <nl> <nl> + # ifdef Q_OS_LINUX <nl> + # include < sigwatch . h > <nl> + # endif <nl> + <nl> int main ( int argc , char * argv [ ] ) <nl> { <nl> # ifdef Q_OS_WIN <nl> int main ( int argc , char * argv [ ] ) <nl> Application a ( argc , argv ) ; <nl> a . initModels ( ) ; <nl> a . initQml ( ) ; <nl> + <nl> + # ifdef Q_OS_LINUX <nl> + UnixSignalWatcher sigwatch ; <nl> + sigwatch . watchForSignal ( SIGINT ) ; <nl> + sigwatch . watchForSignal ( SIGTERM ) ; <nl> + QObject : : connect ( & sigwatch , SIGNAL ( unixSignal ( int ) ) , & a , SLOT ( quit ( ) ) ) ; <nl> + # endif <nl> + <nl> return a . exec ( ) ; <nl> } <nl> <nl> | Merge pull request from uglide / catch_unix_signals | uglide/RedisDesktopManager | a1dd6c125adc1e83aef0f2ce75b1021f64edf973 | 2018-04-05T10:56:09Z |
mmm a / googlemock / docs / cheat_sheet . md <nl> ppp b / googlemock / docs / cheat_sheet . md <nl> and the default action will be taken each time . <nl> A * * matcher * * matches a * single * argument . You can use it inside ` ON_CALL ( ) ` or <nl> ` EXPECT_CALL ( ) ` , or use it to validate a value directly : <nl> <nl> + < ! - - mdformat off ( github rendering does not support multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm | <nl> - | ` EXPECT_THAT ( actual_value , matcher ) ` | Asserts that ` actual_value ` matches | <nl> - : : ` matcher ` . : <nl> - | ` ASSERT_THAT ( actual_value , matcher ) ` | The same as | <nl> - : : ` EXPECT_THAT ( actual_value , matcher ) ` , : <nl> - : : except that it generates a * * fatal * * : <nl> - : : failure . : <nl> + | ` EXPECT_THAT ( actual_value , matcher ) ` | Asserts that ` actual_value ` matches ` matcher ` . | <nl> + | ` ASSERT_THAT ( actual_value , matcher ) ` | The same as ` EXPECT_THAT ( actual_value , matcher ) ` , except that it generates a * * fatal * * failure . | <nl> + < ! - - mdformat on - - > <nl> <nl> Built - in matchers ( where ` argument ` is the function argument ) are divided into <nl> several categories : <nl> Matcher | Description <nl> <nl> # # # # Generic Comparison <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmm | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - | <nl> | ` Eq ( value ) ` or ` value ` | ` argument = = value ` | <nl> Matcher | Description <nl> | ` Ne ( value ) ` | ` argument ! = value ` | <nl> | ` IsNull ( ) ` | ` argument ` is a ` NULL ` pointer ( raw or smart ) . | <nl> | ` NotNull ( ) ` | ` argument ` is a non - null pointer ( raw or smart ) . | <nl> - | ` Optional ( m ) ` | ` argument ` is ` optional < > ` that contains a value | <nl> - : : matching ` m ` . : <nl> - | ` VariantWith < T > ( m ) ` | ` argument ` is ` variant < > ` that holds the | <nl> - : : alternative of type T with a value matching ` m ` . : <nl> + | ` Optional ( m ) ` | ` argument ` is ` optional < > ` that contains a value matching ` m ` . | <nl> + | ` VariantWith < T > ( m ) ` | ` argument ` is ` variant < > ` that holds the alternative of type T with a value matching ` m ` . | <nl> | ` Ref ( variable ) ` | ` argument ` is a reference to ` variable ` . | <nl> - | ` TypedEq < type > ( value ) ` | ` argument ` has type ` type ` and is equal to ` value ` . | <nl> - : : You may need to use this instead of ` Eq ( value ) ` : <nl> - : : when the mock function is overloaded . : <nl> + | ` TypedEq < type > ( value ) ` | ` argument ` has type ` type ` and is equal to ` value ` . You may need to use this instead of ` Eq ( value ) ` when the mock function is overloaded . | <nl> + < ! - - mdformat on - - > <nl> <nl> Except ` Ref ( ) ` , these matchers make a * copy * of ` value ` in case it ' s modified or <nl> destructed later . If the compiler complains that ` value ` doesn ' t have a public <nl> is not changed afterwards , or the meaning of your matcher will be changed . <nl> <nl> # # # # Floating - Point Matchers { # FpMatchers } <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm | <nl> - | ` DoubleEq ( a_double ) ` | ` argument ` is a ` double ` value | <nl> - : : approximately equal to ` a_double ` , : <nl> - : : treating two NaNs as unequal . : <nl> - | ` FloatEq ( a_float ) ` | ` argument ` is a ` float ` value | <nl> - : : approximately equal to ` a_float ` , : <nl> - : : treating two NaNs as unequal . : <nl> - | ` NanSensitiveDoubleEq ( a_double ) ` | ` argument ` is a ` double ` value | <nl> - : : approximately equal to ` a_double ` , : <nl> - : : treating two NaNs as equal . : <nl> - | ` NanSensitiveFloatEq ( a_float ) ` | ` argument ` is a ` float ` value | <nl> - : : approximately equal to ` a_float ` , : <nl> - : : treating two NaNs as equal . : <nl> + | ` DoubleEq ( a_double ) ` | ` argument ` is a ` double ` value approximately equal to ` a_double ` , treating two NaNs as unequal . | <nl> + | ` FloatEq ( a_float ) ` | ` argument ` is a ` float ` value approximately equal to ` a_float ` , treating two NaNs as unequal . | <nl> + | ` NanSensitiveDoubleEq ( a_double ) ` | ` argument ` is a ` double ` value approximately equal to ` a_double ` , treating two NaNs as equal . | <nl> + | ` NanSensitiveFloatEq ( a_float ) ` | ` argument ` is a ` float ` value approximately equal to ` a_float ` , treating two NaNs as equal . | <nl> + < ! - - mdformat on - - > <nl> <nl> The above matchers use ULP - based comparison ( the same as used in googletest ) . <nl> They automatically pick a reasonable error bound based on the absolute value of <nl> which requires comparing two NaNs for equality to return false . The <nl> ` NanSensitive * ` version instead treats two NaNs as equal , which is often what a <nl> user wants . <nl> <nl> - | Matcher | Description | <nl> - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - | <nl> - | ` DoubleNear ( a_double , | ` argument ` is a ` double ` value close | <nl> - : max_abs_error ) ` : to ` a_double ` ( absolute error < = : <nl> - : : ` max_abs_error ` ) , treating two NaNs as : <nl> - : : unequal . : <nl> - | ` FloatNear ( a_float , max_abs_error ) ` | ` argument ` is a ` float ` value close to | <nl> - : : ` a_float ` ( absolute error < = : <nl> - : : ` max_abs_error ` ) , treating two NaNs as : <nl> - : : unequal . : <nl> - | ` NanSensitiveDoubleNear ( a_double , | ` argument ` is a ` double ` value close | <nl> - : max_abs_error ) ` : to ` a_double ` ( absolute error < = : <nl> - : : ` max_abs_error ` ) , treating two NaNs as : <nl> - : : equal . : <nl> - | ` NanSensitiveFloatNear ( a_float , | ` argument ` is a ` float ` value close to | <nl> - : max_abs_error ) ` : ` a_float ` ( absolute error < = : <nl> - : : ` max_abs_error ` ) , treating two NaNs as : <nl> - : : equal . : <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> + | Matcher | Description | <nl> + | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm | : mmmmmmmmmmmmmmmmmmmmm - - | <nl> + | ` DoubleNear ( a_double , max_abs_error ) ` | ` argument ` is a ` double ` value close to ` a_double ` ( absolute error < = ` max_abs_error ` ) , treating two NaNs as unequal . | <nl> + | ` FloatNear ( a_float , max_abs_error ) ` | ` argument ` is a ` float ` value close to ` a_float ` ( absolute error < = ` max_abs_error ` ) , treating two NaNs as unequal . | <nl> + | ` NanSensitiveDoubleNear ( a_double , max_abs_error ) ` | ` argument ` is a ` double ` value close to ` a_double ` ( absolute error < = ` max_abs_error ` ) , treating two NaNs as equal . | <nl> + | ` NanSensitiveFloatNear ( a_float , max_abs_error ) ` | ` argument ` is a ` float ` value close to ` a_float ` ( absolute error < = ` max_abs_error ` ) , treating two NaNs as equal . | <nl> + < ! - - mdformat on - - > <nl> <nl> # # # # String Matchers <nl> <nl> The ` argument ` can be either a C string or a C + + string object : <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmm - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - | <nl> | ` ContainsRegex ( string ) ` | ` argument ` matches the given regular expression . | <nl> | ` EndsWith ( suffix ) ` | ` argument ` ends with string ` suffix ` . | <nl> | ` HasSubstr ( string ) ` | ` argument ` contains ` string ` as a sub - string . | <nl> - | ` MatchesRegex ( string ) ` | ` argument ` matches the given regular expression | <nl> - : : with the match starting at the first character and : <nl> - : : ending at the last character . : <nl> + | ` MatchesRegex ( string ) ` | ` argument ` matches the given regular expression with the match starting at the first character and ending at the last character . | <nl> | ` StartsWith ( prefix ) ` | ` argument ` starts with string ` prefix ` . | <nl> | ` StrCaseEq ( string ) ` | ` argument ` is equal to ` string ` , ignoring case . | <nl> - | ` StrCaseNe ( string ) ` | ` argument ` is not equal to ` string ` , ignoring | <nl> - : : case . : <nl> + | ` StrCaseNe ( string ) ` | ` argument ` is not equal to ` string ` , ignoring case . | <nl> | ` StrEq ( string ) ` | ` argument ` is equal to ` string ` . | <nl> | ` StrNe ( string ) ` | ` argument ` is not equal to ` string ` . | <nl> + < ! - - mdformat on - - > <nl> <nl> ` ContainsRegex ( ) ` and ` MatchesRegex ( ) ` take ownership of the ` RE ` object . They <nl> use the regular expression syntax defined <nl> or simply ` expected_container ` to match a container exactly . If you want to <nl> write the elements in - line , match them more flexibly , or get more informative <nl> messages , you can use : <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - | <nl> - | ` BeginEndDistanceIs ( m ) ` | ` argument ` is a container whose | <nl> - : : ` begin ( ) ` and ` end ( ) ` iterators : <nl> - : : are separated by a number of : <nl> - : : increments matching ` m ` . E . g . : <nl> - : : ` BeginEndDistanceIs ( 2 ) ` or : <nl> - : : ` BeginEndDistanceIs ( Lt ( 2 ) ) ` . For : <nl> - : : containers that define a : <nl> - : : ` size ( ) ` method , ` SizeIs ( m ) ` may : <nl> - : : be more efficient . : <nl> - | ` ContainerEq ( container ) ` | The same as ` Eq ( container ) ` | <nl> - : : except that the failure message : <nl> - : : also includes which elements are : <nl> - : : in one container but not the : <nl> - : : other . : <nl> - | ` Contains ( e ) ` | ` argument ` contains an element | <nl> - : : that matches ` e ` , which can be : <nl> - : : either a value or a matcher . : <nl> - | ` Each ( e ) ` | ` argument ` is a container where | <nl> - : : * every * element matches ` e ` , : <nl> - : : which can be either a value or a : <nl> - : : matcher . : <nl> - | ` ElementsAre ( e0 , e1 , . . . , en ) ` | ` argument ` has ` n + 1 ` elements , | <nl> - : : where the * i * - th element matches : <nl> - : : ` ei ` , which can be a value or a : <nl> - : : matcher . : <nl> - | ` ElementsAreArray ( { e0 , e1 , . . . , en } ) ` , | The same as ` ElementsAre ( ) ` | <nl> - : ` ElementsAreArray ( a_container ) ` , : except that the expected element : <nl> - : ` ElementsAreArray ( begin , end ) ` , : values / matchers come from an : <nl> - : ` ElementsAreArray ( array ) ` , or : initializer list , STL - style : <nl> - : ` ElementsAreArray ( array , count ) ` : container , iterator range , or : <nl> - : : C - style array . : <nl> - | ` IsEmpty ( ) ` | ` argument ` is an empty container | <nl> - : : ( ` container . empty ( ) ` ) . : <nl> - | ` IsFalse ( ) ` | ` argument ` evaluates to ` false ` | <nl> - : : in a Boolean context . : <nl> - | ` IsSubsetOf ( { e0 , e1 , . . . , en } ) ` , | ` argument ` matches | <nl> - : ` IsSubsetOf ( a_container ) ` , : ` UnorderedElementsAre ( x0 , x1 , : <nl> - : ` IsSubsetOf ( begin , end ) ` , : . . . , xk ) ` for some subset ` { x0 , : <nl> - : ` IsSubsetOf ( array ) ` , or : x1 , . . . , xk } ` of the expected : <nl> - : ` IsSubsetOf ( array , count ) ` : matchers . : <nl> - | ` IsSupersetOf ( { e0 , e1 , . . . , en } ) ` , | Some subset of ` argument ` | <nl> - : ` IsSupersetOf ( a_container ) ` , : matches : <nl> - : ` IsSupersetOf ( begin , end ) ` , : ` UnorderedElementsAre ( ` expected : <nl> - : ` IsSupersetOf ( array ) ` , or : matchers ` ) ` . : <nl> - : ` IsSupersetOf ( array , count ) ` : : <nl> - | ` IsTrue ( ) ` | ` argument ` evaluates to ` true ` | <nl> - : : in a Boolean context . : <nl> - | ` Pointwise ( m , container ) ` , ` Pointwise ( m , | ` argument ` contains the same | <nl> - : { e0 , e1 , . . . , en } ) ` : number of elements as in : <nl> - : : ` container ` , and for all i , ( the : <nl> - : : i - th element in ` argument ` , the : <nl> - : : i - th element in ` container ` ) : <nl> - : : match ` m ` , which is a matcher on : <nl> - : : 2 - tuples . E . g . ` Pointwise ( Le ( ) , : <nl> - : : upper_bounds ) ` verifies that : <nl> - : : each element in ` argument ` : <nl> - : : doesn ' t exceed the corresponding : <nl> - : : element in ` upper_bounds ` . See : <nl> - : : more detail below . : <nl> - | ` SizeIs ( m ) ` | ` argument ` is a container whose | <nl> - : : size matches ` m ` . E . g . : <nl> - : : ` SizeIs ( 2 ) ` or ` SizeIs ( Lt ( 2 ) ) ` . : <nl> - | ` UnorderedElementsAre ( e0 , e1 , . . . , en ) ` | ` argument ` has ` n + 1 ` elements , | <nl> - : : and under * some * permutation of : <nl> - : : the elements , each element : <nl> - : : matches an ` ei ` ( for a different : <nl> - : : ` i ` ) , which can be a value or a : <nl> - : : matcher . : <nl> - | ` UnorderedElementsAreArray ( { e0 , e1 , . . . , | The same as | <nl> - : en } ) ` , : ` UnorderedElementsAre ( ) ` except : <nl> - : ` UnorderedElementsAreArray ( a_container ) ` , : that the expected element : <nl> - : ` UnorderedElementsAreArray ( begin , end ) ` , : values / matchers come from an : <nl> - : ` UnorderedElementsAreArray ( array ) ` , or : initializer list , STL - style : <nl> - : ` UnorderedElementsAreArray ( array , count ) ` : container , iterator range , or : <nl> - : : C - style array . : <nl> - | ` UnorderedPointwise ( m , container ) ` , | Like ` Pointwise ( m , container ) ` , | <nl> - : ` UnorderedPointwise ( m , { e0 , e1 , . . . , : but ignores the order of : <nl> - : en } ) ` : elements . : <nl> - | ` WhenSorted ( m ) ` | When ` argument ` is sorted using | <nl> - : : the ` < ` operator , it matches : <nl> - : : container matcher ` m ` . E . g . : <nl> - : : ` WhenSorted ( ElementsAre ( 1 , 2 , : <nl> - : : 3 ) ) ` verifies that ` argument ` : <nl> - : : contains elements 1 , 2 , and 3 , : <nl> - : : ignoring order . : <nl> - | ` WhenSortedBy ( comparator , m ) ` | The same as ` WhenSorted ( m ) ` , | <nl> - : : except that the given comparator : <nl> - : : instead of ` < ` is used to sort : <nl> - : : ` argument ` . E . g . : <nl> - : : ` WhenSortedBy ( std \ : \ : greater ( ) , : <nl> - : : ElementsAre ( 3 , 2 , 1 ) ) ` . : <nl> + | ` BeginEndDistanceIs ( m ) ` | ` argument ` is a container whose ` begin ( ) ` and ` end ( ) ` iterators are separated by a number of increments matching ` m ` . E . g . ` BeginEndDistanceIs ( 2 ) ` or ` BeginEndDistanceIs ( Lt ( 2 ) ) ` . For containers that define a ` size ( ) ` method , ` SizeIs ( m ) ` may be more efficient . | <nl> + | ` ContainerEq ( container ) ` | The same as ` Eq ( container ) ` except that the failure message also includes which elements are in one container but not the other . | <nl> + | ` Contains ( e ) ` | ` argument ` contains an element that matches ` e ` , which can be either a value or a matcher . | <nl> + | ` Each ( e ) ` | ` argument ` is a container where * every * element matches ` e ` , which can be either a value or a matcher . | <nl> + | ` ElementsAre ( e0 , e1 , . . . , en ) ` | ` argument ` has ` n + 1 ` elements , where the * i * - th element matches ` ei ` , which can be a value or a matcher . | <nl> + | ` ElementsAreArray ( { e0 , e1 , . . . , en } ) ` , ` ElementsAreArray ( a_container ) ` , ` ElementsAreArray ( begin , end ) ` , ` ElementsAreArray ( array ) ` , or ` ElementsAreArray ( array , count ) ` | The same as ` ElementsAre ( ) ` except that the expected element values / matchers come from an initializer list , STL - style container , iterator range , or C - style array . | <nl> + | ` IsEmpty ( ) ` | ` argument ` is an empty container ( ` container . empty ( ) ` ) . | <nl> + | ` IsFalse ( ) ` | ` argument ` evaluates to ` false ` in a Boolean context . | <nl> + | ` IsSubsetOf ( { e0 , e1 , . . . , en } ) ` , ` IsSubsetOf ( a_container ) ` , ` IsSubsetOf ( begin , end ) ` , ` IsSubsetOf ( array ) ` , or ` IsSubsetOf ( array , count ) ` | ` argument ` matches ` UnorderedElementsAre ( x0 , x1 , . . . , xk ) ` for some subset ` { x0 , x1 , . . . , xk } ` of the expected matchers . | <nl> + | ` IsSupersetOf ( { e0 , e1 , . . . , en } ) ` , ` IsSupersetOf ( a_container ) ` , ` IsSupersetOf ( begin , end ) ` , ` IsSupersetOf ( array ) ` , or ` IsSupersetOf ( array , count ) ` | Some subset of ` argument ` matches ` UnorderedElementsAre ( ` expected matchers ` ) ` . | <nl> + | ` IsTrue ( ) ` | ` argument ` evaluates to ` true ` in a Boolean context . | <nl> + | ` Pointwise ( m , container ) ` , ` Pointwise ( m , { e0 , e1 , . . . , en } ) ` | ` argument ` contains the same number of elements as in ` container ` , and for all i , ( the i - th element in ` argument ` , the i - th element in ` container ` ) match ` m ` , which is a matcher on 2 - tuples . E . g . ` Pointwise ( Le ( ) , upper_bounds ) ` verifies that each element in ` argument ` doesn ' t exceed the corresponding element in ` upper_bounds ` . See more detail below . | <nl> + | ` SizeIs ( m ) ` | ` argument ` is a container whose size matches ` m ` . E . g . ` SizeIs ( 2 ) ` or ` SizeIs ( Lt ( 2 ) ) ` . | <nl> + | ` UnorderedElementsAre ( e0 , e1 , . . . , en ) ` | ` argument ` has ` n + 1 ` elements , and under * some * permutation of the elements , each element matches an ` ei ` ( for a different ` i ` ) , which can be a value or a matcher . | <nl> + | ` UnorderedElementsAreArray ( { e0 , e1 , . . . , en } ) ` , ` UnorderedElementsAreArray ( a_container ) ` , ` UnorderedElementsAreArray ( begin , end ) ` , ` UnorderedElementsAreArray ( array ) ` , or ` UnorderedElementsAreArray ( array , count ) ` | The same as ` UnorderedElementsAre ( ) ` except that the expected element values / matchers come from an initializer list , STL - style container , iterator range , or C - style array . | <nl> + | ` UnorderedPointwise ( m , container ) ` , ` UnorderedPointwise ( m , { e0 , e1 , . . . , en } ) ` | Like ` Pointwise ( m , container ) ` , but ignores the order of elements . | <nl> + | ` WhenSorted ( m ) ` | When ` argument ` is sorted using the ` < ` operator , it matches container matcher ` m ` . E . g . ` WhenSorted ( ElementsAre ( 1 , 2 , 3 ) ) ` verifies that ` argument ` contains elements 1 , 2 , and 3 , ignoring order . | <nl> + | ` WhenSortedBy ( comparator , m ) ` | The same as ` WhenSorted ( m ) ` , except that the given comparator instead of ` < ` is used to sort ` argument ` . E . g . ` WhenSortedBy ( std : : greater ( ) , ElementsAre ( 3 , 2 , 1 ) ) ` . | <nl> + < ! - - mdformat on - - > <nl> <nl> * * Notes : * * <nl> <nl> messages , you can use : <nl> <nl> # # # # Member Matchers <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - | <nl> - | ` Field ( & class : : field , m ) ` | ` argument . field ` ( or ` argument - > field ` | <nl> - : : when ` argument ` is a plain pointer ) : <nl> - : : matches matcher ` m ` , where ` argument ` is : <nl> - : : an object of type _class_ . : <nl> - | ` Key ( e ) ` | ` argument . first ` matches ` e ` , which can be | <nl> - : : either a value or a matcher . E . g . : <nl> - : : ` Contains ( Key ( Le ( 5 ) ) ) ` can verify that a : <nl> - : : ` map ` contains a key ` < = 5 ` . : <nl> - | ` Pair ( m1 , m2 ) ` | ` argument ` is an ` std : : pair ` whose ` first ` | <nl> - : : field matches ` m1 ` and ` second ` field : <nl> - : : matches ` m2 ` . : <nl> - | ` Property ( & class : : property , m ) ` | ` argument . property ( ) ` ( or | <nl> - : : ` argument - > property ( ) ` when ` argument ` is : <nl> - : : a plain pointer ) matches matcher ` m ` , : <nl> - : : where ` argument ` is an object of type : <nl> - : : _class_ . : <nl> + | ` Field ( & class : : field , m ) ` | ` argument . field ` ( or ` argument - > field ` when ` argument ` is a plain pointer ) matches matcher ` m ` , where ` argument ` is an object of type _class_ . | <nl> + | ` Key ( e ) ` | ` argument . first ` matches ` e ` , which can be either a value or a matcher . E . g . ` Contains ( Key ( Le ( 5 ) ) ) ` can verify that a ` map ` contains a key ` < = 5 ` . | <nl> + | ` Pair ( m1 , m2 ) ` | ` argument ` is an ` std : : pair ` whose ` first ` field matches ` m1 ` and ` second ` field matches ` m2 ` . | <nl> + | ` Property ( & class : : property , m ) ` | ` argument . property ( ) ` ( or ` argument - > property ( ) ` when ` argument ` is a plain pointer ) matches matcher ` m ` , where ` argument ` is an object of type _class_ . | <nl> + < ! - - mdformat on - - > <nl> <nl> # # # # Matching the Result of a Function , Functor , or Callback <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmmmmm | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm | <nl> - | ` ResultOf ( f , m ) ` | ` f ( argument ) ` matches matcher ` m ` , where ` f ` is a | <nl> - : : function or functor . : <nl> + | ` ResultOf ( f , m ) ` | ` f ( argument ) ` matches matcher ` m ` , where ` f ` is a function or functor . | <nl> + < ! - - mdformat on - - > <nl> <nl> # # # # Pointer Matchers <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmm | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - | <nl> - | ` Pointee ( m ) ` | ` argument ` ( either a smart pointer or a raw | <nl> - : : pointer ) points to a value that matches matcher : <nl> - : : ` m ` . : <nl> - | ` WhenDynamicCastTo < T > ( m ) ` | when ` argument ` is passed through | <nl> - : : ` dynamic_cast < T > ( ) ` , it matches matcher ` m ` . : <nl> + | ` Pointee ( m ) ` | ` argument ` ( either a smart pointer or a raw pointer ) points to a value that matches matcher ` m ` . | <nl> + | ` WhenDynamicCastTo < T > ( m ) ` | when ` argument ` is passed through ` dynamic_cast < T > ( ) ` , it matches matcher ` m ` . | <nl> + < ! - - mdformat on - - > <nl> <nl> < ! - - GOOGLETEST_CM0026 DO NOT DELETE - - > <nl> <nl> Matcher | Description <nl> You can use the following selectors to pick a subset of the arguments ( or <nl> reorder them ) to participate in the matching : <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmm - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - | <nl> - | ` AllArgs ( m ) ` | Equivalent to ` m ` . Useful as syntactic sugar in | <nl> - : : ` . With ( AllArgs ( m ) ) ` . : <nl> - | ` Args < N1 , N2 , . . . , Nk > ( m ) ` | The tuple of the ` k ` selected ( using 0 - based | <nl> - : : indices ) arguments matches ` m ` , e . g . ` Args < 1 , : <nl> - : : 2 > ( Eq ( ) ) ` . : <nl> + | ` AllArgs ( m ) ` | Equivalent to ` m ` . Useful as syntactic sugar in ` . With ( AllArgs ( m ) ) ` . | <nl> + | ` Args < N1 , N2 , . . . , Nk > ( m ) ` | The tuple of the ` k ` selected ( using 0 - based indices ) arguments matches ` m ` , e . g . ` Args < 1 , 2 > ( Eq ( ) ) ` . | <nl> + < ! - - mdformat on - - > <nl> <nl> # # # # Composite Matchers <nl> <nl> You can make a matcher from one or more other matchers : <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - | <nl> - | ` AllOf ( m1 , m2 , . . . , mn ) ` | ` argument ` matches all of the matchers | <nl> - : : ` m1 ` to ` mn ` . : <nl> - | ` AllOfArray ( { m0 , m1 , . . . , mn } ) ` , | The same as ` AllOf ( ) ` except that the | <nl> - : ` AllOfArray ( a_container ) ` , : matchers come from an initializer list , : <nl> - : ` AllOfArray ( begin , end ) ` , : STL - style container , iterator range , or : <nl> - : ` AllOfArray ( array ) ` , or : C - style array . : <nl> - : ` AllOfArray ( array , count ) ` : : <nl> - | ` AnyOf ( m1 , m2 , . . . , mn ) ` | ` argument ` matches at least one of the | <nl> - : : matchers ` m1 ` to ` mn ` . : <nl> - | ` AnyOfArray ( { m0 , m1 , . . . , mn } ) ` , | The same as ` AnyOf ( ) ` except that the | <nl> - : ` AnyOfArray ( a_container ) ` , : matchers come from an initializer list , : <nl> - : ` AnyOfArray ( begin , end ) ` , : STL - style container , iterator range , or : <nl> - : ` AnyOfArray ( array ) ` , or : C - style array . : <nl> - : ` AnyOfArray ( array , count ) ` : : <nl> - | ` Not ( m ) ` | ` argument ` doesn ' t match matcher ` m ` . | <nl> + | ` AllOf ( m1 , m2 , . . . , mn ) ` | ` argument ` matches all of the matchers ` m1 ` to ` mn ` . | <nl> + | ` AllOfArray ( { m0 , m1 , . . . , mn } ) ` , ` AllOfArray ( a_container ) ` , ` AllOfArray ( begin , end ) ` , ` AllOfArray ( array ) ` , or ` AllOfArray ( array , count ) ` | The same as ` AllOf ( ) ` except that the matchers come from an initializer list , STL - style container , iterator range , or C - style array . | <nl> + | ` AnyOf ( m1 , m2 , . . . , mn ) ` | ` argument ` matches at least one of the matchers ` m1 ` to ` mn ` . | <nl> + | ` AnyOfArray ( { m0 , m1 , . . . , mn } ) ` , ` AnyOfArray ( a_container ) ` , ` AnyOfArray ( begin , end ) ` , ` AnyOfArray ( array ) ` , or ` AnyOfArray ( array , count ) ` | The same as ` AnyOf ( ) ` except that the matchers come from an initializer list , STL - style container , iterator range , or C - style array . | <nl> + | ` Not ( m ) ` | ` argument ` doesn ' t match matcher ` m ` . | <nl> + < ! - - mdformat on - - > <nl> <nl> < ! - - GOOGLETEST_CM0028 DO NOT DELETE - - > <nl> <nl> # # # # Adapters for Matchers <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmm - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm | <nl> - | ` MatcherCast < T > ( m ) ` | casts matcher ` m ` to type | <nl> - : : ` Matcher < T > ` . : <nl> - | ` SafeMatcherCast < T > ( m ) ` | [ safely | <nl> - : : casts ] ( cook_book . md # casting - matchers ) : <nl> - : : matcher ` m ` to type ` Matcher < T > ` . : <nl> - | ` Truly ( predicate ) ` | ` predicate ( argument ) ` returns | <nl> - : : something considered by C + + to be : <nl> - : : true , where ` predicate ` is a function : <nl> - : : or functor . : <nl> + | ` MatcherCast < T > ( m ) ` | casts matcher ` m ` to type ` Matcher < T > ` . | <nl> + | ` SafeMatcherCast < T > ( m ) ` | [ safely casts ] ( cook_book . md # casting - matchers ) matcher ` m ` to type ` Matcher < T > ` . | <nl> + | ` Truly ( predicate ) ` | ` predicate ( argument ) ` returns something considered by C + + to be true , where ` predicate ` is a function or functor . | <nl> + < ! - - mdformat on - - > <nl> <nl> ` AddressSatisfies ( callback ) ` and ` Truly ( callback ) ` take ownership of ` callback ` , <nl> which must be a permanent callback . <nl> <nl> # # # # Using Matchers as Predicates { # MatchersAsPredicatesCheat } <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmmmmm - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm | <nl> - | ` Matches ( m ) ( value ) ` | evaluates to ` true ` if ` value ` matches ` m ` . | <nl> - : : You can use ` Matches ( m ) ` alone as a unary : <nl> - : : functor . : <nl> - | ` ExplainMatchResult ( m , value , | evaluates to ` true ` if ` value ` matches ` m ` , | <nl> - : result_listener ) ` : explaining the result to ` result_listener ` . : <nl> - | ` Value ( value , m ) ` | evaluates to ` true ` if ` value ` matches ` m ` . | <nl> + | ` Matches ( m ) ( value ) ` | evaluates to ` true ` if ` value ` matches ` m ` . You can use ` Matches ( m ) ` alone as a unary functor . | <nl> + | ` ExplainMatchResult ( m , value , result_listener ) ` | evaluates to ` true ` if ` value ` matches ` m ` , explaining the result to ` result_listener ` . | <nl> + | ` Value ( value , m ) ` | evaluates to ` true ` if ` value ` matches ` m ` . | <nl> + < ! - - mdformat on - - > <nl> <nl> # # # # Defining Matchers <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm | <nl> - | ` MATCHER ( IsEven , " " ) { return ( arg % | Defines a matcher ` IsEven ( ) ` to match | <nl> - : 2 ) = = 0 ; } ` : an even number . : <nl> - | ` MATCHER_P ( IsDivisibleBy , n , " " ) { | Defines a macher ` IsDivisibleBy ( n ) ` | <nl> - : * result_listener < < " where the : to match a number divisible by ` n ` . : <nl> - : remainder is " < < ( arg % n ) ; return : : <nl> - : ( arg % n ) = = 0 ; } ` : : <nl> - | ` MATCHER_P2 ( IsBetween , a , b , | Defines a matcher ` IsBetween ( a , b ) ` | <nl> - : std \ : \ : string ( negation ? " isn ' t " \ : : to match a value in the range [ ` a ` , : <nl> - : " is " ) + " between " + : ` b ` ] . : <nl> - : PrintToString ( a ) + " and " + : : <nl> - : PrintToString ( b ) ) { return a < = arg : : <nl> - : & & arg < = b ; } ` : : <nl> + | ` MATCHER ( IsEven , " " ) { return ( arg % 2 ) = = 0 ; } ` | Defines a matcher ` IsEven ( ) ` to match an even number . | <nl> + | ` MATCHER_P ( IsDivisibleBy , n , " " ) { * result_listener < < " where the remainder is " < < ( arg % n ) ; return ( arg % n ) = = 0 ; } ` | Defines a macher ` IsDivisibleBy ( n ) ` to match a number divisible by ` n ` . | <nl> + | ` MATCHER_P2 ( IsBetween , a , b , std : : string ( negation ? " isn ' t " : " is " ) + " between " + PrintToString ( a ) + " and " + PrintToString ( b ) ) { return a < = arg & & arg < = b ; } ` | Defines a matcher ` IsBetween ( a , b ) ` to match a value in the range [ ` a ` , ` b ` ] . | <nl> + < ! - - mdformat on - - > <nl> <nl> * * Notes : * * <nl> <nl> which must be a permanent callback . <nl> <nl> # # # # Returning a Value <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | | | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmm - - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - | <nl> | ` Return ( ) ` | Return from a ` void ` mock function . | <nl> - | ` Return ( value ) ` | Return ` value ` . If the type of ` value ` is | <nl> - : : different to the mock function ' s return type , : <nl> - : : ` value ` is converted to the latter type < i > at : <nl> - : : the time the expectation is set < / i > , not when : <nl> - : : the action is executed . : <nl> + | ` Return ( value ) ` | Return ` value ` . If the type of ` value ` is different to the mock function ' s return type , ` value ` is converted to the latter type < i > at the time the expectation is set < / i > , not when the action is executed . | <nl> | ` ReturnArg < N > ( ) ` | Return the ` N ` - th ( 0 - based ) argument . | <nl> - | ` ReturnNew < T > ( a1 , . . . , ak ) ` | Return ` new T ( a1 , . . . , ak ) ` ; a different | <nl> - : : object is created each time . : <nl> + | ` ReturnNew < T > ( a1 , . . . , ak ) ` | Return ` new T ( a1 , . . . , ak ) ` ; a different object is created each time . | <nl> | ` ReturnNull ( ) ` | Return a null pointer . | <nl> | ` ReturnPointee ( ptr ) ` | Return the value pointed to by ` ptr ` . | <nl> | ` ReturnRef ( variable ) ` | Return a reference to ` variable ` . | <nl> - | ` ReturnRefOfCopy ( value ) ` | Return a reference to a copy of ` value ` ; the | <nl> - : : copy lives as long as the action . : <nl> + | ` ReturnRefOfCopy ( value ) ` | Return a reference to a copy of ` value ` ; the copy lives as long as the action . | <nl> + < ! - - mdformat on - - > <nl> <nl> # # # # Side Effects <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | | | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - | <nl> - | ` Assign ( & variable , value ) ` | Assign ` value ` to variable . | <nl> - | ` DeleteArg < N > ( ) ` | Delete the ` N ` - th ( 0 - based ) argument , | <nl> - : : which must be a pointer . : <nl> - | ` SaveArg < N > ( pointer ) ` | Save the ` N ` - th ( 0 - based ) argument to | <nl> - : : ` * pointer ` . : <nl> - | ` SaveArgPointee < N > ( pointer ) ` | Save the value pointed to by the ` N ` - th | <nl> - : : ( 0 - based ) argument to ` * pointer ` . : <nl> - | ` SetArgReferee < N > ( value ) ` | Assign value to the variable referenced | <nl> - : : by the ` N ` - th ( 0 - based ) argument . : <nl> - | ` SetArgPointee < N > ( value ) ` | Assign ` value ` to the variable pointed | <nl> - : : by the ` N ` - th ( 0 - based ) argument . : <nl> - | ` SetArgumentPointee < N > ( value ) ` | Same as ` SetArgPointee < N > ( value ) ` . | <nl> - : : Deprecated . Will be removed in v1 . 7 . 0 . : <nl> - | ` SetArrayArgument < N > ( first , last ) ` | Copies the elements in source range | <nl> - : : [ ` first ` , ` last ` ) to the array pointed : <nl> - : : to by the ` N ` - th ( 0 - based ) argument , : <nl> - : : which can be either a pointer or an : <nl> - : : iterator . The action does not take : <nl> - : : ownership of the elements in the source : <nl> - : : range . : <nl> - | ` SetErrnoAndReturn ( error , value ) ` | Set ` errno ` to ` error ` and return | <nl> - : : ` value ` . : <nl> - | ` Throw ( exception ) ` | Throws the given exception , which can | <nl> - : : be any copyable value . Available since : <nl> - : : v1 . 1 . 0 . : <nl> + | ` Assign ( & variable , value ) ` | Assign ` value ` to variable . | <nl> + | ` DeleteArg < N > ( ) ` | Delete the ` N ` - th ( 0 - based ) argument , which must be a pointer . | <nl> + | ` SaveArg < N > ( pointer ) ` | Save the ` N ` - th ( 0 - based ) argument to ` * pointer ` . | <nl> + | ` SaveArgPointee < N > ( pointer ) ` | Save the value pointed to by the ` N ` - th ( 0 - based ) argument to ` * pointer ` . | <nl> + | ` SetArgReferee < N > ( value ) ` | Assign value to the variable referenced by the ` N ` - th ( 0 - based ) argument . | <nl> + | ` SetArgPointee < N > ( value ) ` | Assign ` value ` to the variable pointed by the ` N ` - th ( 0 - based ) argument . | <nl> + | ` SetArgumentPointee < N > ( value ) ` | Same as ` SetArgPointee < N > ( value ) ` . Deprecated . Will be removed in v1 . 7 . 0 . | <nl> + | ` SetArrayArgument < N > ( first , last ) ` | Copies the elements in source range [ ` first ` , ` last ` ) to the array pointed to by the ` N ` - th ( 0 - based ) argument , which can be either a pointer or an iterator . The action does not take ownership of the elements in the source range . | <nl> + | ` SetErrnoAndReturn ( error , value ) ` | Set ` errno ` to ` error ` and return ` value ` . | <nl> + | ` Throw ( exception ) ` | Throws the given exception , which can be any copyable value . Available since v1 . 1 . 0 . | <nl> + < ! - - mdformat on - - > <nl> <nl> # # # # Using a Function , Functor , or Lambda as an Action <nl> <nl> In the following , by " callable " we mean a free function , ` std : : function ` , <nl> functor , or lambda . <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | | | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - | <nl> - | ` f ` | Invoke f with the arguments passed to | <nl> - : : the mock function , where f is a : <nl> - : : callable . : <nl> - | ` Invoke ( f ) ` | Invoke ` f ` with the arguments passed | <nl> - : : to the mock function , where ` f ` can be : <nl> - : : a global / static function or a functor . : <nl> - | ` Invoke ( object_pointer , | Invoke the method on the object with | <nl> - : & class \ : \ : method ) ` : the arguments passed to the mock : <nl> - : : function . : <nl> - | ` InvokeWithoutArgs ( f ) ` | Invoke ` f ` , which can be a | <nl> - : : global / static function or a functor . : <nl> - : : ` f ` must take no arguments . : <nl> - | ` InvokeWithoutArgs ( object_pointer , | Invoke the method on the object , which | <nl> - : & class \ : \ : method ) ` : takes no arguments . : <nl> - | ` InvokeArgument < N > ( arg1 , arg2 , . . . , | Invoke the mock function ' s ` N ` - th | <nl> - : argk ) ` : ( 0 - based ) argument , which must be a : <nl> - : : function or a functor , with the ` k ` : <nl> - : : arguments . : <nl> + | ` f ` | Invoke f with the arguments passed to the mock function , where f is a callable . | <nl> + | ` Invoke ( f ) ` | Invoke ` f ` with the arguments passed to the mock function , where ` f ` can be a global / static function or a functor . | <nl> + | ` Invoke ( object_pointer , & class : : method ) ` | Invoke the method on the object with the arguments passed to the mock function . | <nl> + | ` InvokeWithoutArgs ( f ) ` | Invoke ` f ` , which can be a global / static function or a functor . ` f ` must take no arguments . | <nl> + | ` InvokeWithoutArgs ( object_pointer , & class : : method ) ` | Invoke the method on the object , which takes no arguments . | <nl> + | ` InvokeArgument < N > ( arg1 , arg2 , . . . , argk ) ` | Invoke the mock function ' s ` N ` - th ( 0 - based ) argument , which must be a function or a functor , with the ` k ` arguments . | <nl> + < ! - - mdformat on - - > <nl> <nl> The return value of the invoked function is used as the return value of the <nl> action . <nl> value , and ` foo ` by reference . <nl> <nl> # # # # Default Action <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Matcher | Description | <nl> | : mmmmmmmmmmmm | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - | <nl> - | ` DoDefault ( ) ` | Do the default action ( specified by ` ON_CALL ( ) ` or the | <nl> - : : built - in one ) . : <nl> + | ` DoDefault ( ) ` | Do the default action ( specified by ` ON_CALL ( ) ` or the built - in one ) . | <nl> + < ! - - mdformat on - - > <nl> <nl> * * Note : * * due to technical reasons , ` DoDefault ( ) ` cannot be used inside a <nl> composite action - trying to do so will result in a run - time error . <nl> composite action - trying to do so will result in a run - time error . <nl> <nl> # # # # Composite Actions <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | | | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmmmmm - - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm | <nl> - | ` DoAll ( a1 , a2 , . . . , an ) ` | Do all actions ` a1 ` to ` an ` and return the | <nl> - : : result of ` an ` in each invocation . The : <nl> - : : first ` n - 1 ` sub - actions must return void . : <nl> - | ` IgnoreResult ( a ) ` | Perform action ` a ` and ignore its result . | <nl> - : : ` a ` must not return void . : <nl> - | ` WithArg < N > ( a ) ` | Pass the ` N ` - th ( 0 - based ) argument of the | <nl> - : : mock function to action ` a ` and perform it . : <nl> - | ` WithArgs < N1 , N2 , . . . , Nk > ( a ) ` | Pass the selected ( 0 - based ) arguments of | <nl> - : : the mock function to action ` a ` and perform : <nl> - : : it . : <nl> - | ` WithoutArgs ( a ) ` | Perform action ` a ` without any arguments . | <nl> + | ` DoAll ( a1 , a2 , . . . , an ) ` | Do all actions ` a1 ` to ` an ` and return the result of ` an ` in each invocation . The first ` n - 1 ` sub - actions must return void . | <nl> + | ` IgnoreResult ( a ) ` | Perform action ` a ` and ignore its result . ` a ` must not return void . | <nl> + | ` WithArg < N > ( a ) ` | Pass the ` N ` - th ( 0 - based ) argument of the mock function to action ` a ` and perform it . | <nl> + | ` WithArgs < N1 , N2 , . . . , Nk > ( a ) ` | Pass the selected ( 0 - based ) arguments of the mock function to action ` a ` and perform it . | <nl> + | ` WithoutArgs ( a ) ` | Perform action ` a ` without any arguments . | <nl> + < ! - - mdformat on - - > <nl> <nl> # # # # Defining Actions <nl> <nl> composite action - trying to do so will result in a run - time error . <nl> < / tr > <nl> < / table > <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | | | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - | <nl> - | ` ACTION ( Sum ) { return arg0 + arg1 ; | Defines an action ` Sum ( ) ` to return the | <nl> - : } ` : sum of the mock function ' s argument # 0 : <nl> - : : and # 1 . : <nl> - | ` ACTION_P ( Plus , n ) { return arg0 + | Defines an action ` Plus ( n ) ` to return | <nl> - : n ; } ` : the sum of the mock function ' s : <nl> - : : argument # 0 and ` n ` . : <nl> - | ` ACTION_Pk ( Foo , p1 , . . . , pk ) { | Defines a parameterized action ` Foo ( p1 , | <nl> - : statements ; } ` : . . . , pk ) ` to execute the given : <nl> - : : ` statements ` . : <nl> + | ` ACTION ( Sum ) { return arg0 + arg1 ; } ` | Defines an action ` Sum ( ) ` to return the sum of the mock function ' s argument # 0 and # 1 . | <nl> + | ` ACTION_P ( Plus , n ) { return arg0 + n ; } ` | Defines an action ` Plus ( n ) ` to return the sum of the mock function ' s argument # 0 and ` n ` . | <nl> + | ` ACTION_Pk ( Foo , p1 , . . . , pk ) { statements ; } ` | Defines a parameterized action ` Foo ( p1 , . . . , pk ) ` to execute the given ` statements ` . | <nl> + < ! - - mdformat on - - > <nl> <nl> The ` ACTION * ` macros cannot be used inside a function or class . <nl> <nl> The ` ACTION * ` macros cannot be used inside a function or class . <nl> These are used in ` Times ( ) ` to specify how many times a mock function will be <nl> called : <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | | | <nl> | : mmmmmmmmmmmmmmm - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - | <nl> | ` AnyNumber ( ) ` | The function can be called any number of times . | <nl> | ` AtLeast ( n ) ` | The call is expected at least ` n ` times . | <nl> | ` AtMost ( n ) ` | The call is expected at most ` n ` times . | <nl> - | ` Between ( m , n ) ` | The call is expected between ` m ` and ` n ` ( inclusive ) | <nl> - : : times . : <nl> - | ` Exactly ( n ) or n ` | The call is expected exactly ` n ` times . In particular , | <nl> - : : the call should never happen when ` n ` is 0 . : <nl> + | ` Between ( m , n ) ` | The call is expected between ` m ` and ` n ` ( inclusive ) times . | <nl> + | ` Exactly ( n ) or n ` | The call is expected exactly ` n ` times . In particular , the call should never happen when ` n ` is 0 . | <nl> + < ! - - mdformat on - - > <nl> <nl> # # # Expectation Order <nl> <nl> See this [ recipe ] ( cook_book . md # using - check - points ) for one application of it . <nl> <nl> # # # Flags <nl> <nl> + < ! - - mdformat off ( no multiline tables ) - - > <nl> | Flag | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmmmmm - - | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - | <nl> - | ` - - gmock_catch_leaked_mocks = 0 ` | Don ' t report leaked mock objects as | <nl> - : : failures . : <nl> - | ` - - gmock_verbose = LEVEL ` | Sets the default verbosity level ( ` info ` , | <nl> - : : ` warning ` , or ` error ` ) of Google Mock : <nl> - : : messages . : <nl> + | ` - - gmock_catch_leaked_mocks = 0 ` | Don ' t report leaked mock objects as failures . | <nl> + | ` - - gmock_verbose = LEVEL ` | Sets the default verbosity level ( ` info ` , ` warning ` , or ` error ` ) of Google Mock messages . | <nl> + < ! - - mdformat on - - > <nl> mmm a / googlemock / docs / cook_book . md <nl> ppp b / googlemock / docs / cook_book . md <nl> that satisfies matcher ` m ` . <nl> <nl> For example : <nl> <nl> + < ! - - mdformat off ( github rendering does not support multiline tables ) - - > <nl> | Expression | Description | <nl> | : mmmmmmmmmmmmmmmmmmmmmmmmmmm | : mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm | <nl> | ` Field ( & Foo : : number , Ge ( 3 ) ) ` | Matches ` x ` where ` x . number > = 3 ` . | <nl> - | ` Property ( & Foo : : name , | Matches ` x ` where ` x . name ( ) ` starts with | <nl> - : StartsWith ( " John " ) ) ` : ` " John " ` . : <nl> + | ` Property ( & Foo : : name , StartsWith ( " John " ) ) ` | Matches ` x ` where ` x . name ( ) ` starts with ` " John " ` . | <nl> + < ! - - mdformat on - - > <nl> <nl> Note that in ` Property ( & Foo : : baz , . . . ) ` , method ` baz ( ) ` must take no argument <nl> and be declared as ` const ` . <nl> | Googletest export | google/googletest | 6a2adc0eedd8ca47f1808dcd315b17666fb2fbe4 | 2019-08-02T15:32:23Z |
mmm a / src / objective - c / tests / GRPCClientTests . m <nl> ppp b / src / objective - c / tests / GRPCClientTests . m <nl> - ( void ) testMetadata { <nl> <nl> [ call startWithWriteable : responsesWriteable ] ; <nl> <nl> - [ self waitForExpectationsWithTimeout : 4 handler : nil ] ; <nl> + [ self waitForExpectationsWithTimeout : 8 handler : nil ] ; <nl> } <nl> <nl> - ( void ) testResponseMetadataKVO { <nl> | Increase test timeout of testMetadata to 8s to alleviate flakiness under overloaded Jenkins mac machine | grpc/grpc | 949309104ac01353700e2b0954a8b7727f894372 | 2016-12-05T22:46:55Z |
mmm a / lib / ClangImporter / ImportDecl . cpp <nl> ppp b / lib / ClangImporter / ImportDecl . cpp <nl> getSwiftStdlibType ( const clang : : TypedefNameDecl * D , <nl> if ( Bitwidth ! = 0 & & Bitwidth ! = ClangTypeSize ) <nl> return std : : make_pair ( Type ( ) , " " ) ; <nl> <nl> - / / Chceck other expected properties of the C type . <nl> + / / Check other expected properties of the C type . <nl> switch ( CTypeKind ) { <nl> case MappedCTypeKind : : UnsignedInt : <nl> if ( ! ClangType - > isUnsignedIntegerType ( ) ) <nl> getSwiftStdlibType ( const clang : : TypedefNameDecl * D , <nl> } <nl> break ; <nl> <nl> + case MappedCTypeKind : : VaList : <nl> + / / FIXME : why is va_list not a pointer type on 32 - bit arm <nl> + if ( ClangTypeSize ! = 64 & & ClangTypeSize ! = 32 ) <nl> + return std : : make_pair ( Type ( ) , " " ) ; <nl> + break ; <nl> + <nl> case MappedCTypeKind : : ObjCBool : <nl> if ( ! ClangCtx . hasSameType ( ClangType , ClangCtx . ObjCBuiltinBoolTy ) & & <nl> ! ( ClangCtx . getBOOLDecl ( ) & & <nl> mmm a / lib / ClangImporter / ImporterImpl . h <nl> ppp b / lib / ClangImporter / ImporterImpl . h <nl> enum class MappedCTypeKind { <nl> FloatIEEEsingle , <nl> FloatIEEEdouble , <nl> FloatX87DoubleExtended , <nl> + VaList , <nl> ObjCBool , <nl> ObjCSel , <nl> ObjCId , <nl> mmm a / lib / ClangImporter / MappedTypes . def <nl> ppp b / lib / ClangImporter / MappedTypes . def <nl> MAP_STDLIB_TYPE ( " ssize_t " , SignedWord , 0 , " Int " , All , false ) <nl> MAP_STDLIB_TYPE ( " size_t " , UnsignedWord , 0 , " UInt " , All , false ) <nl> MAP_STDLIB_TYPE ( " intptr_t " , SignedWord , 0 , " Int " , All , false ) <nl> MAP_STDLIB_TYPE ( " uintptr_t " , UnsignedWord , 0 , " UInt " , All , false ) <nl> + / / FIXME : why does this not catch va_list on x86_64 ? <nl> + MAP_STDLIB_TYPE ( " va_list " , VaList , 0 , " CVaListPointer " , All , false ) <nl> <nl> / / Objective - C types . <nl> MAP_TYPE ( " BOOL " , ObjCBool , 8 , " ObjectiveC " , " ObjCBool " , ObjC1 , false , false ) <nl> | Add an importer mapping for C va_list . | apple/swift | 2b6bee7fb8063161ecb3365abf31eb2d2d93a18b | 2014-01-23T06:17:15Z |
mmm a / setup . py <nl> ppp b / setup . py <nl> <nl> from distutils . command . build import build as _build <nl> from distutils . errors import DistutilsSetupError <nl> from distutils . spawn import find_executable <nl> - from distutils . sysconfig import get_python_inc , get_python_version <nl> + from distutils . sysconfig import get_python_inc , get_python_version , get_config_var <nl> from distutils import log <nl> import os <nl> import sys <nl> def build_dlib ( ) : <nl> if sys . version_info > = ( 3 , 0 ) : <nl> cmake_extra_arch + = [ ' - DPYTHON3 = yes ' ] <nl> <nl> + log . info ( " Detected platform : % s " % sys . platform ) <nl> + if sys . platform = = " darwin " : <nl> + # build on OS X <nl> + inc_dir = get_python_inc ( ) <nl> + cmake_extra_arch + = [ ' - DPYTHON_INCLUDE_DIR = { inc } ' . format ( inc = inc_dir ) ] <nl> + <nl> + # by default , cmake will choose the system python lib in / usr / lib <nl> + # this checks the sysconfig and will correctly pick up a brewed python lib <nl> + # e . g . in / usr / local / Cellar <nl> + py_ver = get_python_version ( ) <nl> + py_lib = os . path . join ( get_config_var ( ' LIBDIR ' ) , ' libpython ' + py_ver + ' . dylib ' ) <nl> + cmake_extra_arch + = [ ' - DPYTHON_LIBRARY = { lib } ' . format ( lib = py_lib ) ] <nl> + <nl> if platform_arch = = ' 64bit ' and sys . platform = = " win32 " : <nl> # 64bit build on Windows <nl> <nl> | Merge pull request from jimreesman / master | davisking/dlib | 4bcecf25404bd074059658e419c2061f1572f585 | 2016-02-11T20:50:42Z |
mmm a / atom / browser / native_window_mac . mm <nl> ppp b / atom / browser / native_window_mac . mm <nl> static bool FromV8 ( v8 : : Isolate * isolate , v8 : : Handle < v8 : : Value > val , <nl> options . Get ( options : : kWidth , & width ) ; <nl> options . Get ( options : : kHeight , & height ) ; <nl> <nl> - NSRect main_screen_rect = [ [ [ NSScreen screens ] objectAtIndex : 0 ] frame ] ; <nl> + NSRect main_screen_rect = [ [ [ NSScreen screens ] firstObject ] frame ] ; <nl> NSRect cocoa_bounds = NSMakeRect ( <nl> round ( ( NSWidth ( main_screen_rect ) - width ) / 2 ) , <nl> round ( ( NSHeight ( main_screen_rect ) - height ) / 2 ) , <nl> static bool FromV8 ( v8 : : Isolate * isolate , v8 : : Handle < v8 : : Value > val , <nl> <nl> NSRect cocoa_bounds = NSMakeRect ( bounds . x ( ) , 0 , size . width ( ) , size . height ( ) ) ; <nl> / / Flip coordinates based on the primary screen . <nl> - NSScreen * screen = [ [ NSScreen screens ] objectAtIndex : 0 ] ; <nl> + NSScreen * screen = [ [ NSScreen screens ] firstObject ] ; <nl> cocoa_bounds . origin . y = <nl> NSHeight ( [ screen frame ] ) - size . height ( ) - bounds . y ( ) ; <nl> <nl> static bool FromV8 ( v8 : : Isolate * isolate , v8 : : Handle < v8 : : Value > val , <nl> gfx : : Rect NativeWindowMac : : GetBounds ( ) { <nl> NSRect frame = [ window_ frame ] ; <nl> gfx : : Rect bounds ( frame . origin . x , 0 , NSWidth ( frame ) , NSHeight ( frame ) ) ; <nl> - NSScreen * screen = [ [ NSScreen screens ] objectAtIndex : 0 ] ; <nl> + NSScreen * screen = [ [ NSScreen screens ] firstObject ] ; <nl> bounds . set_y ( NSHeight ( [ screen frame ] ) - NSMaxY ( frame ) ) ; <nl> return bounds ; <nl> } <nl> | Use firstObject instead of objectAtIndex : 0 | electron/electron | c70eb81e32e626d5154c3b717558fc76cde97c66 | 2016-12-20T21:49:35Z |
mmm a / Marlin / src / HAL / HAL_STM32 / fastio . h <nl> ppp b / Marlin / src / HAL / HAL_STM32 / fastio . h <nl> void FastIO_init ( ) ; / / Must be called before using fast io macros <nl> else FastIOPortMap [ STM_PORT ( digitalPin [ IO ] ) ] - > BRR = _BV32 ( STM_PIN ( digitalPin [ IO ] ) ) ; \ <nl> } while ( 0 ) <nl> # else <nl> - # define _WRITE ( IO , V ) ( FastIOPortMap [ STM_PORT ( digitalPin [ IO ] ) ] - > BSRR = _BV32 ( STM_PIN ( digitalPin [ IO ] ) + ( V ? 0 : 16 ) ) ) <nl> + # define _WRITE ( IO , V ) ( FastIOPortMap [ STM_PORT ( digitalPin [ IO ] ) ] - > BSRR = _BV32 ( STM_PIN ( digitalPin [ IO ] ) + ( ( V ) ? 0 : 16 ) ) ) <nl> # endif <nl> <nl> # define _READ ( IO ) bool ( READ_BIT ( FastIOPortMap [ STM_PORT ( digitalPin [ IO ] ) ] - > IDR , _BV32 ( STM_PIN ( digitalPin [ IO ] ) ) ) ) <nl> | Fix STM32 _WRITE macro parameter ( ) | MarlinFirmware/Marlin | 8bad6e11e2efadc5ef0c1b846fcad92cb056b160 | 2020-03-11T21:42:28Z |
mmm a / xbmc / cores / VideoPlayer / VideoRenderers / HwDecRender / DRMPRIMEEGL . cpp <nl> ppp b / xbmc / cores / VideoPlayer / VideoRenderers / HwDecRender / DRMPRIMEEGL . cpp <nl> <nl> <nl> # include " DRMPRIMEEGL . h " <nl> <nl> + # include " utils / log . h " <nl> + <nl> void CDRMPRIMETexture : : Init ( EGLDisplay eglDisplay ) <nl> { <nl> m_eglImage . reset ( new CEGLImage ( eglDisplay ) ) ; <nl> bool CDRMPRIMETexture : : Map ( CVideoBufferDRMPRIME * buffer ) <nl> attribs . width = m_texWidth ; <nl> attribs . height = m_texHeight ; <nl> attribs . format = layer - > format ; <nl> + attribs . colorSpace = GetColorSpace ( buffer - > GetColorEncoding ( ) ) ; <nl> + attribs . colorRange = GetColorRange ( buffer - > GetColorRange ( ) ) ; <nl> attribs . planes = planes ; <nl> <nl> if ( ! m_eglImage - > CreateImage ( attribs ) ) <nl> void CDRMPRIMETexture : : Unmap ( ) <nl> m_primebuffer - > Release ( ) ; <nl> m_primebuffer = nullptr ; <nl> } <nl> + <nl> + int CDRMPRIMETexture : : GetColorSpace ( int colorSpace ) <nl> + { <nl> + switch ( colorSpace ) <nl> + { <nl> + case DRM_COLOR_YCBCR_BT2020 : <nl> + return EGL_ITU_REC2020_EXT ; <nl> + case DRM_COLOR_YCBCR_BT601 : <nl> + return EGL_ITU_REC601_EXT ; <nl> + case DRM_COLOR_YCBCR_BT709 : <nl> + return EGL_ITU_REC709_EXT ; <nl> + default : <nl> + CLog : : Log ( LOGERROR , " CEGLImage : : % s - failed to get colorspace for : % d " , __FUNCTION__ , colorSpace ) ; <nl> + break ; <nl> + } <nl> + <nl> + return - 1 ; <nl> + } <nl> + <nl> + int CDRMPRIMETexture : : GetColorRange ( int colorRange ) <nl> + { <nl> + switch ( colorRange ) <nl> + { <nl> + case DRM_COLOR_YCBCR_FULL_RANGE : <nl> + return EGL_YUV_FULL_RANGE_EXT ; <nl> + case DRM_COLOR_YCBCR_LIMITED_RANGE : <nl> + return EGL_YUV_NARROW_RANGE_EXT ; <nl> + default : <nl> + CLog : : Log ( LOGERROR , " CEGLImage : : % s - failed to get colorrange for : % d " , __FUNCTION__ , colorRange ) ; <nl> + break ; <nl> + } <nl> + <nl> + return - 1 ; <nl> + } <nl> mmm a / xbmc / cores / VideoPlayer / VideoRenderers / HwDecRender / DRMPRIMEEGL . h <nl> ppp b / xbmc / cores / VideoPlayer / VideoRenderers / HwDecRender / DRMPRIMEEGL . h <nl> class CDRMPRIMETexture <nl> GLuint m_texture { 0 } ; <nl> int m_texWidth { 0 } ; <nl> int m_texHeight { 0 } ; <nl> + <nl> + private : <nl> + static int GetColorSpace ( int colorSpace ) ; <nl> + static int GetColorRange ( int colorRange ) ; <nl> + <nl> } ; <nl> mmm a / xbmc / utils / EGLImage . cpp <nl> ppp b / xbmc / utils / EGLImage . cpp <nl> <nl> * / <nl> <nl> # include " EGLImage . h " <nl> + <nl> # include " EGLUtils . h " <nl> # include " log . h " <nl> <nl> - / * mmm CEGLImage mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - * / <nl> - <nl> namespace <nl> { <nl> const EGLint eglDmabufPlaneFdAttr [ CEGLImage : : MAX_NUM_PLANES ] = <nl> bool CEGLImage : : CreateImage ( EglAttrs imageAttrs ) <nl> { EGL_HEIGHT , imageAttrs . height } , <nl> { EGL_LINUX_DRM_FOURCC_EXT , static_cast < EGLint > ( imageAttrs . format ) } } ) ; <nl> <nl> - / * this should be configurable at a later point * / <nl> - attribs . Add ( { { EGL_YUV_COLOR_SPACE_HINT_EXT , EGL_ITU_REC709_EXT } , <nl> - { EGL_SAMPLE_RANGE_HINT_EXT , EGL_YUV_NARROW_RANGE_EXT } , <nl> - { EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT , EGL_YUV_CHROMA_SITING_0_EXT } , <nl> - { EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT , EGL_YUV_CHROMA_SITING_0_EXT } } ) ; <nl> + if ( imageAttrs . colorSpace ! = 0 & & imageAttrs . colorRange ! = 0 ) <nl> + { <nl> + attribs . Add ( { { EGL_YUV_COLOR_SPACE_HINT_EXT , imageAttrs . colorSpace } , <nl> + { EGL_SAMPLE_RANGE_HINT_EXT , imageAttrs . colorRange } , <nl> + { EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT , EGL_YUV_CHROMA_SITING_0_EXT } , <nl> + { EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT , EGL_YUV_CHROMA_SITING_0_EXT } } ) ; <nl> + } <nl> <nl> for ( int i = 0 ; i < MAX_NUM_PLANES ; i + + ) <nl> { <nl> mmm a / xbmc / utils / EGLImage . h <nl> ppp b / xbmc / utils / EGLImage . h <nl> class CEGLImage <nl> int width { 0 } ; <nl> int height { 0 } ; <nl> uint32_t format { 0 } ; <nl> + int colorSpace { 0 } ; <nl> + int colorRange { 0 } ; <nl> std : : array < EglPlane , MAX_NUM_PLANES > planes ; <nl> } ; <nl> <nl> | Merge pull request from lrusak / drmprimegles - 1img - colorspace | xbmc/xbmc | 93c008a4d4564d8ab4d249159c34c1b31b63cfb6 | 2018-10-02T16:22:32Z |
mmm a / example / gluon / image_classification . py <nl> ppp b / example / gluon / image_classification . py <nl> def train ( epochs , ctx ) : <nl> metric . update ( label , outputs ) <nl> if opt . log_interval and not ( i + 1 ) % opt . log_interval : <nl> name , acc = metric . get ( ) <nl> - logging . info ( ' [ Epoch % d Batch % d ] speed : % f samples / s , training : % s = % f ' % ( <nl> + logging . info ( ' Epoch [ % d ] Batch [ % d ] \ tSpeed : % f samples / sec \ t % s = % f ' % ( <nl> epoch , i , batch_size / ( time . time ( ) - btic ) , name , acc ) ) <nl> btic = time . time ( ) <nl> <nl> mmm a / example / image - classification / README . md <nl> ppp b / example / image - classification / README . md <nl> The ` benchmark . py ` can be used to run a series of benchmarks against different i <nl> - ` - - worker_file ` : file that contains a list of worker hostnames or list of worker ip addresses that have passwordless ssh enabled . <nl> - ` - - worker_count ` : number of workers to run benchmark on . <nl> - ` - - gpu_count ` : number of gpus on each worker to use . <nl> - - ` - - networks ` : one or more networks in the format network_name : batch_size : image_size . <nl> + - ` - - networks ` : one or more networks in the format mode : network_name : batch_size : image_size . ( Use ` native ` mode for imagenet benchmarks and any of the symbolic / imperative / hybrid for gluon benchmarks ) . Be sure to use appropriate models according to the mode you are using . <nl> <nl> The ` benchmark . py ` script runs benchmarks on variable number of gpus upto gpu_count starting from 1 gpu doubling the number of gpus in each run using ` kv - store = device ` and after that running on variable number of nodes on all gpus starting with 1 node upto ` worker_count ` doubling the number of nodes used in each run using ` kv - store = dist_sync_device ` . <nl> <nl> An example to run the benchmark script is shown below with 8 workers and 16 gpus on each worker : <nl> ` ` ` <nl> python benchmark . py - - worker_file / opt / deeplearning / workers - - worker_count 8 \ <nl> - - - gpu_count 16 - - networks ' inception - v3 : 32 : 299 ' <nl> + - - gpu_count 16 - - networks ' native : inception - v3 : 32 : 299 ' <nl> + ` ` ` <nl> + <nl> + Additionally , this script also runs [ Gluon vision models ] ( mxnet / python / mxnet / gluon / model_zoo / model_store . py ) benchmarking [ image_classification ] ( mxnet / example / gluon / image_classification . py ) script <nl> + for all three symbolic , imperative and hybrid paradigms using synthetic data . <nl> + An example to run the benchmark script is shown below with 8 workers and 16 gpus on each worker : <nl> + ` ` ` <nl> + python benchmark . py - - worker_file / opt / deeplearning / workers - - worker_count 8 \ <nl> + - - gpu_count 16 - - networks ' imperative : resnet152_v1 : 32 : 299 ' <nl> + ` ` ` <nl> + <nl> + To run benchmark on gluon vision models , use ` - - benchmark 1 ` as the argument to ` image_classification . py ` , An example is shown below : <nl> + ` ` ` <nl> + python . . / gluon / image_classification . py - - dataset dummy - - gpus 2 - - epochs 1 - - benchmark - - mode imperative \ <nl> + - - model resnet152_v1 - - batch - size 32 - - log - interval 1 - - kv - store dist_sync_device <nl> ` ` ` <nl> <nl> # # # Scalability Results <nl> mmm a / example / image - classification / benchmark . py <nl> ppp b / example / image - classification / benchmark . py <nl> def startCmd ( self , timeout ) : <nl> LOGGER = setup_logging ( log_loc ) <nl> <nl> class Network ( object ) : <nl> - def __init__ ( self , name , img_size , batch_size ) : <nl> + def __init__ ( self , mode , name , img_size , batch_size ) : <nl> + self . mode = mode <nl> self . name = name <nl> self . img_size = img_size <nl> self . batch_size = batch_size <nl> def parse_args ( ) : <nl> class NetworkArgumentAction ( argparse . Action ) : <nl> def validate ( self , attrs ) : <nl> args = attrs . split ( ' : ' ) <nl> - if len ( args ) ! = 3 or isinstance ( args [ 0 ] , str ) = = False : <nl> - print ( ' expected network attributes in format network_name : batch_size : image_size \ <nl> - \ nThe network_name is a valid model defined as network_name . py in the image - classification / symbol folder . ' ) <nl> + if len ( args ) ! = 4 or isinstance ( args [ 0 ] , str ) = = False or isinstance ( args [ 1 ] , str ) = = False : <nl> + print ( ' expected network attributes in format mode : network_name : batch_size : image_size \ <nl> + \ nThe network_name is a valid model defined as network_name . py in the image - classification / symbol folder . \ <nl> + \ nOr a gluon vision model defined in mxnet / python / mxnet / gluon / model_zoo / model_store . py . ' ) <nl> sys . exit ( 1 ) <nl> try : <nl> - # check if the network exists <nl> - importlib . import_module ( ' symbols . ' + args [ 0 ] ) <nl> - batch_size = int ( args [ 1 ] ) <nl> - img_size = int ( args [ 2 ] ) <nl> - return Network ( name = args [ 0 ] , batch_size = batch_size , img_size = img_size ) <nl> + # check if the network exists <nl> + if args [ 0 ] = = ' native ' : <nl> + importlib . import_module ( ' symbols . ' + args [ 1 ] ) <nl> + batch_size = int ( args [ 2 ] ) <nl> + img_size = int ( args [ 3 ] ) <nl> + return Network ( mode = args [ 0 ] , name = args [ 1 ] , batch_size = batch_size , img_size = img_size ) <nl> except Exception as e : <nl> - print ( ' expected network attributes in format network_name : batch_size : image_size \ <nl> - \ nThe network_name is a valid model defined as network_name . py in the image - classification / symbol folder . ' ) <nl> + print ( ' expected network attributes in format mode : network_name : batch_size : image_size \ <nl> + \ nThe network_name is a valid model defined as network_name . py in the image - classification / symbol folder . \ <nl> + \ nOr a gluon vision model defined in mxnet / python / mxnet / gluon / model_zoo / model_store . py . ' ) <nl> print ( e ) <nl> sys . exit ( 1 ) <nl> + <nl> def __init__ ( self , * args , * * kw ) : <nl> kw [ ' nargs ' ] = ' + ' <nl> argparse . Action . __init__ ( self , * args , * * kw ) <nl> + <nl> def __call__ ( self , parser , namespace , values , option_string = None ) : <nl> if isinstance ( values , list ) = = True : <nl> setattr ( namespace , self . dest , map ( self . validate , values ) ) <nl> else : <nl> setattr ( namespace , self . dest , self . validate ( values ) ) <nl> + <nl> parser = argparse . ArgumentParser ( description = ' Run Benchmark on various imagenet networks using train_imagenent . py ' ) <nl> - parser . add_argument ( ' - - networks ' , dest = ' networks ' , nargs = ' + ' , type = str , help = ' one or more networks in the format network_name : batch_size : image_size \ <nl> - \ nThe network_name is a valid model defined as network_name . py in the image - classification / symbol folder . ' , action = NetworkArgumentAction ) <nl> - parser . add_argument ( ' - - worker_file ' , type = str , help = ' file that contains a list of worker hostnames or list of worker ip addresses that can be sshed without a password . ' , required = True ) <nl> + parser . add_argument ( ' - - networks ' , dest = ' networks ' , nargs = ' + ' , type = str , help = ' one or more networks in the format mode : network_name : batch_size : image_size \ <nl> + \ nThe network_name is a valid model defined as network_name . py in the image - classification / symbol folder for native imagenet \ <nl> + \ n Or a gluon vision model defined in mxnet / python / mxnet / gluon / model_zoo / model_store . py . ' , <nl> + action = NetworkArgumentAction ) <nl> + parser . add_argument ( ' - - worker_file ' , type = str , <nl> + help = ' file that contains a list of worker hostnames or list of worker ip addresses that can be sshed without a password . ' , <nl> + required = True ) <nl> parser . add_argument ( ' - - worker_count ' , type = int , help = ' number of workers to run benchmark on . ' , required = True ) <nl> parser . add_argument ( ' - - gpu_count ' , type = int , help = ' number of gpus on each worker to use . ' , required = True ) <nl> args = parser . parse_args ( ) <nl> return args <nl> <nl> def series ( max_count ) : <nl> - i = 1 <nl> - s = [ ] <nl> + i = 1 <nl> + s = [ ] <nl> while i < = max_count : <nl> s . append ( i ) <nl> - i = i * 2 <nl> + i = i * 2 <nl> if s [ - 1 ] < max_count : <nl> s . append ( max_count ) <nl> return s <nl> def series ( max_count ) : <nl> ' ' ' <nl> Choose the middle iteration to get the images processed per sec <nl> ' ' ' <nl> - def images_processed ( log_loc ) : <nl> - f = open ( log_loc ) <nl> - img_per_sec = re . findall ( " ( ? : Batch \ s + \ [ 30 \ ] \ \ \ \ tSpeed : \ s + ) ( \ d + \ . \ d + ) ( ? : \ s + ) " , str ( f . readlines ( ) ) ) <nl> + def images_processed ( log_loc , mode ) : <nl> + f = open ( log_loc ) <nl> + if mode = = ' native ' : <nl> + img_per_sec = re . findall ( " ( ? : Batch \ s + \ [ 30 \ ] \ \ \ \ tSpeed : \ s + ) ( \ d + \ . \ d + ) ( ? : \ s + ) " , str ( f . readlines ( ) ) ) <nl> + else : <nl> + img_per_sec = re . findall ( " ( ? : Batch \ s + \ [ 3 \ ] \ \ \ \ tSpeed : \ s + ) ( \ d + \ . \ d + ) ( ? : \ s + ) " , str ( f . readlines ( ) ) ) <nl> f . close ( ) <nl> img_per_sec = map ( float , img_per_sec ) <nl> total_img_per_sec = sum ( img_per_sec ) <nl> def generate_hosts_file ( num_nodes , workers_file , args_workers_file ) : <nl> f . close ( ) <nl> return <nl> <nl> - def stop_old_processes ( hosts_file ) : <nl> - stop_args = [ ' python ' , ' . . / . . / tools / kill - mxnet . py ' , hosts_file ] <nl> + def stop_old_processes ( hosts_file , prog_name ) : <nl> + stop_args = [ ' python ' , ' . . / . . / tools / kill - mxnet . py ' , hosts_file , ' python ' , prog_name ] <nl> stop_args_str = ' ' . join ( stop_args ) <nl> LOGGER . info ( ' killing old remote processes \ n % s ' , stop_args_str ) <nl> stop = subprocess . check_output ( stop_args , stderr = subprocess . STDOUT ) <nl> LOGGER . debug ( stop ) <nl> time . sleep ( 1 ) <nl> <nl> - def run_imagenet ( kv_store , data_shape , batch_size , num_gpus , num_nodes , network , args_workers_file ) : <nl> - imagenet_args = [ ' python ' , ' train_imagenet . py ' , ' - - gpus ' , ' , ' . join ( str ( i ) for i in range ( num_gpus ) ) , \ <nl> - ' - - network ' , network , ' - - batch - size ' , str ( batch_size * num_gpus ) , \ <nl> - ' - - image - shape ' , ' 3 , ' + str ( data_shape ) + ' , ' + str ( data_shape ) , ' - - num - epochs ' , ' 1 ' , ' - - kv - store ' , kv_store , ' - - benchmark ' , ' 1 ' , ' - - disp - batches ' , ' 10 ' ] <nl> - log = log_loc + ' / ' + network + ' _ ' + str ( num_nodes * num_gpus ) + ' _log ' <nl> - hosts = log_loc + ' / ' + network + ' _ ' + str ( num_nodes * num_gpus ) + ' _workers ' <nl> + def run_benchmark ( kv_store , data_shape , batch_size , num_gpus , num_nodes , network , args_workers_file , mode ) : <nl> + if mode = = ' native ' : <nl> + benchmark_args = [ ' python ' , ' train_imagenet . py ' , ' - - gpus ' , ' , ' . join ( str ( i ) for i in range ( num_gpus ) ) , \ <nl> + ' - - network ' , network , ' - - batch - size ' , str ( batch_size * num_gpus ) , \ <nl> + ' - - image - shape ' , ' 3 , ' + str ( data_shape ) + ' , ' + str ( data_shape ) , ' - - num - epochs ' , ' 1 ' , <nl> + ' - - kv - store ' , kv_store , ' - - benchmark ' , ' 1 ' , ' - - disp - batches ' , ' 10 ' ] <nl> + else : <nl> + benchmark_args = [ ' python ' , ' . . / gluon / image_classification . py ' , ' - - dataset ' , ' dummy ' , ' - - gpus ' , str ( num_gpus ) , \ <nl> + ' - - epochs ' , ' 1 ' , ' - - benchmark ' , ' - - mode ' , mode , ' - - model ' , network , ' - - batch - size ' , <nl> + str ( batch_size ) , \ <nl> + ' - - log - interval ' , str ( 1 ) , ' - - kvstore ' , kv_store ] <nl> + <nl> + log = log_loc + ' / ' + network + ' _ ' + str ( num_nodes * num_gpus ) + ' _log ' <nl> + hosts = log_loc + ' / ' + network + ' _ ' + str ( num_nodes * num_gpus ) + ' _workers ' <nl> generate_hosts_file ( num_nodes , hosts , args_workers_file ) <nl> - stop_old_processes ( hosts ) <nl> - launch_args = [ ' . . / . . / tools / launch . py ' , ' - n ' , str ( num_nodes ) , ' - s ' , str ( num_nodes * 2 ) , ' - H ' , hosts , ' ' . join ( imagenet_args ) ] <nl> + if mode = = ' native ' : <nl> + stop_old_processes ( hosts , ' train_imagenet . py ' ) <nl> + else : <nl> + stop_old_processes ( hosts , ' . . / gluon / image - classification . py ' ) <nl> + launch_args = [ ' . . / . . / tools / launch . py ' , ' - n ' , str ( num_nodes ) , ' - s ' , str ( num_nodes * 2 ) , ' - H ' , hosts , <nl> + ' ' . join ( benchmark_args ) ] <nl> <nl> - # use train_imagenet when running on a single node <nl> + # use train_imagenet / image_classification when running on a single node <nl> if kv_store = = ' device ' : <nl> - imagenet = RunCmd ( imagenet_args , log ) <nl> - imagenet . startCmd ( timeout = 60 * 10 ) <nl> + imagenet = RunCmd ( benchmark_args , log ) <nl> + imagenet . startCmd ( timeout = 60 * 10 ) <nl> else : <nl> launch = RunCmd ( launch_args , log ) <nl> - launch . startCmd ( timeout = 60 * 10 ) <nl> + launch . startCmd ( timeout = 60 * 10 ) <nl> <nl> - stop_old_processes ( hosts ) <nl> - img_per_sec = images_processed ( log ) <nl> - LOGGER . info ( ' network : % s , num_gpus : % d , image / sec : % f ' , network , num_gpus * num_nodes , img_per_sec ) <nl> + if mode = = ' native ' : <nl> + stop_old_processes ( hosts , ' train_imagenet . py ' ) <nl> + else : <nl> + stop_old_processes ( hosts , ' . . / gluon / image - classification . py ' ) <nl> + img_per_sec = images_processed ( log , mode ) <nl> + LOGGER . info ( ' network : % s , num_gpus : % d , image / sec : % f ' , network , num_gpus * num_nodes , img_per_sec ) <nl> return img_per_sec <nl> <nl> def plot_graph ( args ) : <nl> - speedup_chart = pygal . Line ( x_title = ' gpus ' , y_title = ' speedup ' , logarithmic = True ) <nl> + speedup_chart = pygal . Line ( x_title = ' gpus ' , y_title = ' speedup ' , logarithmic = True ) <nl> speedup_chart . x_labels = map ( str , series ( args . worker_count * args . gpu_count ) ) <nl> speedup_chart . add ( ' ideal speedup ' , series ( args . worker_count * args . gpu_count ) ) <nl> for net in args . networks : <nl> image_single_gpu = net . gpu_speedup [ 1 ] if 1 in net . gpu_speedup or not net . gpu_speedup [ 1 ] else 1 <nl> - y_values = [ each / image_single_gpu for each in net . gpu_speedup . values ( ) ] <nl> - LOGGER . info ( ' % s : image_single_gpu : % . 2f ' % ( net . name , image_single_gpu ) ) <nl> + y_values = [ each / image_single_gpu for each in net . gpu_speedup . values ( ) ] <nl> + LOGGER . info ( ' % s : image_single_gpu : % . 2f ' % ( net . name , image_single_gpu ) ) <nl> LOGGER . debug ( ' network : % s , y_values : % s ' % ( net . name , ' ' . join ( map ( str , y_values ) ) ) ) <nl> - speedup_chart . add ( net . name , y_values \ <nl> - , formatter = lambda y_val , img = copy . deepcopy ( image_single_gpu ) , batch_size = copy . deepcopy ( net . batch_size ) : ' speedup : % . 2f , img / sec : % . 2f , batch / gpu : % d ' % \ <nl> + speedup_chart . add ( net . name , y_values \ <nl> + , formatter = lambda y_val , img = copy . deepcopy ( image_single_gpu ) , batch_size = copy . deepcopy ( <nl> + net . batch_size ) : ' speedup : % . 2f , img / sec : % . 2f , batch / gpu : % d ' % \ <nl> ( 0 if y_val is None else y_val , 0 if y_val is None else y_val * img , batch_size ) ) <nl> speedup_chart . render_to_file ( log_loc + ' / speedup . svg ' ) <nl> <nl> def write_csv ( log_loc , args ) : <nl> def main ( ) : <nl> args = parse_args ( ) <nl> for net in args . networks : <nl> - # use kv_store = ' device ' when running on 1 node <nl> + # use kv_store = ' device ' when running on 1 node <nl> for num_gpus in series ( args . gpu_count ) : <nl> - imgs_per_sec = run_imagenet ( kv_store = ' device ' , data_shape = net . img_size , batch_size = net . batch_size , \ <nl> - num_gpus = num_gpus , num_nodes = 1 , network = net . name , args_workers_file = args . worker_file ) <nl> + imgs_per_sec = run_benchmark ( kv_store = ' device ' , data_shape = net . img_size , batch_size = net . batch_size , \ <nl> + num_gpus = num_gpus , num_nodes = 1 , network = net . name , <nl> + args_workers_file = args . worker_file , mode = net . mode ) <nl> net . gpu_speedup [ num_gpus ] = imgs_per_sec <nl> for num_nodes in series ( args . worker_count ) [ 1 : : ] : <nl> - imgs_per_sec = run_imagenet ( kv_store = ' dist_sync_device ' , data_shape = net . img_size , batch_size = net . batch_size , \ <nl> - num_gpus = args . gpu_count , num_nodes = num_nodes , network = net . name , args_workers_file = args . worker_file ) <nl> + imgs_per_sec = run_benchmark ( kv_store = ' dist_sync_device ' , data_shape = net . img_size , <nl> + batch_size = net . batch_size , \ <nl> + num_gpus = args . gpu_count , num_nodes = num_nodes , network = net . name , <nl> + args_workers_file = args . worker_file , mode = net . mode ) <nl> net . gpu_speedup [ num_nodes * args . gpu_count ] = imgs_per_sec <nl> LOGGER . info ( ' Network : % s ( num_gpus , images_processed ) : % s ' , net . name , ' , ' . join ( map ( str , net . gpu_speedup . items ( ) ) ) ) <nl> write_csv ( log_loc , args ) <nl> | benchmark . py modified ( ) | apache/incubator-mxnet | 3d35260c3416d7fa102d440bf40c2f91f516dfd2 | 2017-09-08T18:35:48Z |
mmm a / src / allegro / src / x / xkeyboard . c <nl> ppp b / src / allegro / src / x / xkeyboard . c <nl> static int x_keyboard_init ( void ) <nl> <nl> # ifdef ALLEGRO_XWINDOWS_WITH_XIM <nl> / * Otherwise we are restricted to ISO - 8859 - 1 characters . * / <nl> + / * [ dacap ] Don ' t call setlocale ( ) <nl> if ( setlocale ( LC_ALL , " " ) = = NULL ) { <nl> TRACE ( PREFIX_W " Could not set default locale . \ n " ) ; <nl> } <nl> + * / <nl> <nl> / * TODO : is this needed ? <nl> modifiers = XSetLocaleModifiers ( " @ im = none " ) ; <nl> mmm a / src / main / main . cpp <nl> ppp b / src / main / main . cpp <nl> <nl> / / Aseprite <nl> - / / Copyright ( C ) 2001 - 2015 David Capello <nl> + / / Copyright ( C ) 2001 - 2016 David Capello <nl> / / <nl> / / This program is free software ; you can redistribute it and / or modify <nl> / / it under the terms of the GNU General Public License version 2 as <nl> <nl> # include " she / scoped_handle . h " <nl> # include " she / system . h " <nl> <nl> + # include < clocale > <nl> # include < cstdlib > <nl> # include < ctime > <nl> # include < iostream > <nl> namespace { <nl> / / Aseprite entry point . ( Called from she library . ) <nl> int app_main ( int argc , char * argv [ ] ) <nl> { <nl> + / / Initialize the locale . Aseprite isn ' t ready to handle numeric <nl> + / / fields with other locales ( e . g . we expect strings like " 10 . 32 " be <nl> + / / used in std : : strtod ( ) , not something like " 10 , 32 " ) . <nl> + std : : setlocale ( LC_ALL , " en - US " ) ; <nl> + ASSERT ( std : : strtod ( " 10 . 32 " , nullptr ) = = 10 . 32 ) ; <nl> + <nl> / / Initialize the random seed . <nl> - std : : srand ( static_cast < unsigned int > ( std : : time ( NULL ) ) ) ; <nl> + std : : srand ( static_cast < unsigned int > ( std : : time ( nullptr ) ) ) ; <nl> <nl> # ifdef _WIN32 <nl> : : CoInitialize ( NULL ) ; <nl> | Fix bug pressing warning icon to add palette color when active locale is non - English | aseprite/aseprite | 27b55030e26e93c5e8d9e7e21206c8709d46ff22 | 2016-03-28T18:30:00Z |
mmm a / tests / performance / polymorphic_parts_l . xml <nl> ppp b / tests / performance / polymorphic_parts_l . xml <nl> <nl> < min_insert_block_size_rows > 1000 < / min_insert_block_size_rows > <nl> < / settings > <nl> <nl> - < ! - - 50 parts - - > <nl> - < query > INSERT INTO hits_wide ( UserID ) SELECT rand ( ) FROM numbers ( 50000 ) < / query > <nl> - < query > INSERT INTO hits_compact ( UserID ) SELECT rand ( ) FROM numbers ( 50000 ) < / query > <nl> - < query > INSERT INTO hits_buffer ( UserID ) SELECT rand ( ) FROM numbers ( 50000 ) < / query > <nl> + < ! - - 100 parts - - > <nl> + < query > INSERT INTO hits_wide ( UserID ) SELECT rand ( ) FROM numbers ( 100000 ) < / query > <nl> + < query > INSERT INTO hits_compact ( UserID ) SELECT rand ( ) FROM numbers ( 100000 ) < / query > <nl> + < query > INSERT INTO hits_buffer ( UserID ) SELECT rand ( ) FROM numbers ( 100000 ) < / query > <nl> <nl> < drop_query > DROP TABLE IF EXISTS hits_wide < / drop_query > <nl> < drop_query > DROP TABLE IF EXISTS hits_compact < / drop_query > <nl> mmm a / tests / performance / polymorphic_parts_m . xml <nl> ppp b / tests / performance / polymorphic_parts_m . xml <nl> <nl> < min_insert_block_size_rows > 100 < / min_insert_block_size_rows > <nl> < / settings > <nl> <nl> - < ! - - 50 parts - - > <nl> - < query > INSERT INTO hits_wide ( UserID ) SELECT rand ( ) FROM numbers ( 5000 ) < / query > <nl> - < query > INSERT INTO hits_compact ( UserID ) SELECT rand ( ) FROM numbers ( 5000 ) < / query > <nl> - < query > INSERT INTO hits_buffer ( UserID ) SELECT rand ( ) FROM numbers ( 5000 ) < / query > <nl> + < ! - - 100 parts - - > <nl> + < query > INSERT INTO hits_wide ( UserID ) SELECT rand ( ) FROM numbers ( 10000 ) < / query > <nl> + < query > INSERT INTO hits_compact ( UserID ) SELECT rand ( ) FROM numbers ( 10000 ) < / query > <nl> + < query > INSERT INTO hits_buffer ( UserID ) SELECT rand ( ) FROM numbers ( 10000 ) < / query > <nl> <nl> < drop_query > DROP TABLE IF EXISTS hits_wide < / drop_query > <nl> < drop_query > DROP TABLE IF EXISTS hits_compact < / drop_query > <nl> mmm a / tests / performance / polymorphic_parts_s . xml <nl> ppp b / tests / performance / polymorphic_parts_s . xml <nl> <nl> < min_insert_block_size_rows > 1 < / min_insert_block_size_rows > <nl> < / settings > <nl> <nl> - < ! - - 50 parts - - > <nl> - < query > INSERT INTO hits_wide ( UserID ) SELECT rand ( ) FROM numbers ( 50 ) < / query > <nl> - < query > INSERT INTO hits_compact ( UserID ) SELECT rand ( ) FROM numbers ( 50 ) < / query > <nl> - < query > INSERT INTO hits_buffer ( UserID ) SELECT rand ( ) FROM numbers ( 50 ) < / query > <nl> + < ! - - 100 parts - - > <nl> + < query > INSERT INTO hits_wide ( UserID ) SELECT rand ( ) FROM numbers ( 100 ) < / query > <nl> + < query > INSERT INTO hits_compact ( UserID ) SELECT rand ( ) FROM numbers ( 100 ) < / query > <nl> + < query > INSERT INTO hits_buffer ( UserID ) SELECT rand ( ) FROM numbers ( 100 ) < / query > <nl> <nl> < drop_query > DROP TABLE IF EXISTS hits_wide < / drop_query > <nl> < drop_query > DROP TABLE IF EXISTS hits_compact < / drop_query > <nl> | increase number of rows | ClickHouse/ClickHouse | 7fb8a985281f9c663817d32d7939f61f3e258217 | 2020-06-11T21:33:30Z |
mmm a / DEPS <nl> ppp b / DEPS <nl> vars = { <nl> <nl> deps = { <nl> " v8 / build " : <nl> - Var ( " git_url " ) + " / chromium / src / build . git " + " @ " + " 119d5305247498fdd8a215b8e2b6c50223ac7d4b " , <nl> + Var ( " git_url " ) + " / chromium / src / build . git " + " @ " + " b81f2a05b5aa7f5b6cf843380eb276897b1ef626 " , <nl> " v8 / tools / gyp " : <nl> Var ( " git_url " ) + " / external / gyp . git " + " @ " + " 02b145a1a4f4e1c62e8bae06045caf852d9ef17f " , <nl> " v8 / third_party / icu " : <nl> deps = { <nl> " v8 / test / test262 / data " : <nl> Var ( " git_url " ) + " / external / github . com / tc39 / test262 . git " + " @ " + " 9c45e2ac684bae64614d8eb55789cae97323a7e7 " , <nl> " v8 / tools / clang " : <nl> - Var ( " git_url " ) + " / chromium / src / tools / clang . git " + " @ " + " 0bb0462a91310d88ab9d124d8db54a70c9e1d1b0 " , <nl> + Var ( " git_url " ) + " / chromium / src / tools / clang . git " + " @ " + " afdc842603935f994788bf2388e1155528448b2a " , <nl> } <nl> <nl> deps_os = { <nl> | Update V8 DEPS . | v8/v8 | e63a48ac5cd810a668f9960d088e43946aa87f2e | 2016-05-07T03:22:55Z |
mmm a / src / objective - c / tests / InteropTests . m <nl> ppp b / src / objective - c / tests / InteropTests . m <nl> + ( NSString * ) host { <nl> return nil ; <nl> } <nl> <nl> + / / This number indicates how many bytes of overhead does Protocol Buffers encoding add onto the <nl> + / / message . The number varies as different message . proto is used on different servers . The actual <nl> + / / number for each interop server is overridden in corresponding derived test classes . <nl> - ( int32_t ) encodingOverhead { <nl> return 0 ; <nl> } <nl> | Add comment to encodingOverhead | grpc/grpc | f69a885f176c1bac9b15d7b270a9dc50fbf3a4f6 | 2017-03-16T17:04:54Z |
mmm a / tensorflow / lite / g3doc / demo_ios . md <nl> ppp b / tensorflow / lite / g3doc / demo_ios . md <nl> model = tflite : : FlatBufferModel : : BuildFromFile ( [ graph_path UTF8String ] ) ; <nl> Behind the scenes , the model is loaded as a memory - mapped file . It offers faster <nl> load times and reduce the dirty pages in memory . <nl> <nl> - Construct a ` BuiltinOpResolver ` to use the TensorFliw Lite buildin ops . Then , <nl> + Construct a ` BuiltinOpResolver ` to use the TensorFlow Lite buildin ops . Then , <nl> create the interpreter object using ` InterpreterBuilder ` that takes the model <nl> file as argument as shown below . <nl> <nl> | Update demo_ios . md | tensorflow/tensorflow | c8814302770be9a58b5a09b73fd8a7261f8c0cfc | 2019-02-26T10:31:46Z |
mmm a / lib / SILPasses / ARC / ARCSequenceOpts . cpp <nl> ppp b / lib / SILPasses / ARC / ARCSequenceOpts . cpp <nl> class ARCSequenceOpts : public SILFunctionTransform { <nl> if ( ! getOptions ( ) . EnableARCOptimizations ) <nl> return ; <nl> <nl> + if ( ! EnableLoopARC ) { <nl> + auto * AA = getAnalysis < AliasAnalysis > ( ) ; <nl> + auto * POTA = getAnalysis < PostOrderAnalysis > ( ) ; <nl> + auto * RCFI = getAnalysis < RCIdentityAnalysis > ( ) - > get ( F ) ; <nl> + <nl> + if ( processFunction ( * F , false , AA , POTA , nullptr , nullptr , RCFI ) ) { <nl> + processFunction ( * F , true , AA , POTA , nullptr , nullptr , RCFI ) ; <nl> + invalidateAnalysis ( SILAnalysis : : InvalidationKind : : CallsAndInstructions ) ; <nl> + } <nl> + return ; <nl> + } <nl> + <nl> auto * LA = getAnalysis < SILLoopAnalysis > ( ) ; <nl> auto * LI = LA - > get ( F ) ; <nl> + auto * DA = getAnalysis < DominanceAnalysis > ( ) ; <nl> + auto * DI = DA - > get ( F ) ; <nl> <nl> / / Canonicalize the loops , invalidating if we need to . <nl> - if ( EnableLoopARC ) { <nl> - auto * DA = getAnalysis < DominanceAnalysis > ( ) ; <nl> - auto * DI = DA - > get ( F ) ; <nl> - <nl> - if ( canonicalizeAllLoops ( DI , LI ) ) { <nl> - / / We preserve loop info and the dominator tree . <nl> - DA - > lockInvalidation ( ) ; <nl> - LA - > lockInvalidation ( ) ; <nl> - PM - > invalidateAnalysis ( F , SILAnalysis : : InvalidationKind : : FunctionBody ) ; <nl> - DA - > unlockInvalidation ( ) ; <nl> - LA - > unlockInvalidation ( ) ; <nl> - } <nl> + if ( canonicalizeAllLoops ( DI , LI ) ) { <nl> + / / We preserve loop info and the dominator tree . <nl> + DA - > lockInvalidation ( ) ; <nl> + LA - > lockInvalidation ( ) ; <nl> + PM - > invalidateAnalysis ( F , SILAnalysis : : InvalidationKind : : FunctionBody ) ; <nl> + DA - > unlockInvalidation ( ) ; <nl> + LA - > unlockInvalidation ( ) ; <nl> } <nl> <nl> auto * AA = getAnalysis < AliasAnalysis > ( ) ; <nl> auto * POTA = getAnalysis < PostOrderAnalysis > ( ) ; <nl> auto * RCFI = getAnalysis < RCIdentityAnalysis > ( ) - > get ( F ) ; <nl> - LoopRegionFunctionInfo * LRFI = nullptr ; <nl> - <nl> - if ( EnableLoopARC ) <nl> - LRFI = getAnalysis < LoopRegionAnalysis > ( ) - > get ( F ) ; <nl> + auto * LRFI = getAnalysis < LoopRegionAnalysis > ( ) - > get ( F ) ; <nl> <nl> if ( processFunction ( * F , false , AA , POTA , LRFI , LI , RCFI ) ) { <nl> processFunction ( * F , true , AA , POTA , LRFI , LI , RCFI ) ; <nl> | [ loop - arc ] Small refactoring in preparation for changing ARCSequenceOpts to use a loop visitor . | apple/swift | 2faaa347dc079fc5ba0aecd6c140a909ef30241c | 2015-11-27T02:10:32Z |
mmm a / drivers / ruby2 / lib / func . rb <nl> ppp b / drivers / ruby2 / lib / func . rb <nl> def between ( l = nil , r = nil ) <nl> super ( Hash [ ( l ? [ [ ' left_bound ' , l ] ] : [ ] ) + ( r ? [ [ ' right_bound ' , r ] ] : [ ] ) ] ) <nl> end <nl> <nl> + def - @ ; RQL . new . sub ( 0 , self ) ; end <nl> + <nl> def [ ] ( ind ) <nl> if ind . class = = Fixnum <nl> return nth ( ind ) <nl> mmm a / drivers / ruby2 / test . rb <nl> ppp b / drivers / ruby2 / test . rb <nl> def test_pointdelete <nl> assert_equal ( data , tbl . order_by ( : id ) . run . to_a ) <nl> end <nl> <nl> + def test_write_python # from python tests <nl> + tbl . delete . run <nl> + docs = [ { " a " = > 3 , " b " = > 10 , " id " = > 1 } , <nl> + { " a " = > 9 , " b " = > - 5 , " id " = > 2 } , <nl> + { " a " = > 9 , " b " = > 3 , " id " = > 3 } ] <nl> + assert_equal ( { " inserted " = > ( docs . length ) } , tbl . insert ( docs ) . run ) <nl> + docs . each { | doc | assert_equal ( doc , tbl . get ( doc [ " id " ] ) . run ) } <nl> + assert_equal ( [ docs [ 0 ] ] , tbl . filter ( " a " = > 3 ) . run . to_a ) <nl> + assert_raise ( RuntimeError ) { tbl . filter ( " a " = > ( ( tbl . count + " " ) ) ) . run . to_a } <nl> + assert_equal ( nil , tbl . get ( 0 ) . run ) <nl> + assert_equal ( { " inserted " = > 1 } , tbl . insert ( { : id = > 100 , : text = > " \ u { 30b0 } \ u { 30eb } \ u { 30e1 } " } ) . run ) <nl> + assert_equal ( " \ u { 30b0 } \ u { 30eb } \ u { 30e1 } " , tbl . get ( 100 ) [ : text ] . run ) <nl> + tbl . delete . run <nl> + docs = [ { " id " = > 1 } , { " id " = > 2 } ] <nl> + assert_equal ( { " inserted " = > ( docs . length ) } , tbl . insert ( docs ) . run ) <nl> + assert_equal ( { " deleted " = > 1 } , tbl . limit ( 1 ) . delete . run ) <nl> + assert_equal ( 1 , tbl . run . to_a . length ) <nl> + tbl . delete . run <nl> + docs = ( 0 . . . 4 ) . map { | n | { " id " = > ( ( 100 + n ) ) , " a " = > ( n ) , " b " = > ( ( n % 3 ) ) } } <nl> + assert_equal ( { " inserted " = > ( docs . length ) } , tbl . insert ( docs ) . run ) <nl> + docs . each { | doc | assert_equal ( doc , tbl . get ( doc [ " id " ] ) . run ) } <nl> + tbl . delete . run <nl> + docs = ( 0 . . . 10 ) . map { | n | { " id " = > ( ( 100 + n ) ) , " a " = > ( n ) , " b " = > ( ( n % 3 ) ) } } <nl> + assert_equal ( { " inserted " = > ( docs . length ) } , tbl . insert ( docs ) . run ) <nl> + <nl> + # TODO : still an error ? <nl> + # assert_raise ( ArgumentError ) { r [ : a ] = = 5 } <nl> + # assert_raise ( ArgumentError ) { r [ : a ] ! = 5 } <nl> + assert_equal ( docs . select { | x | ( x [ " a " ] < 5 ) } , id_sort ( tbl . filter { | r | ( r [ : a ] < 5 ) } . run . to_a ) ) <nl> + assert_equal ( docs . select { | x | ( x [ " a " ] < = 5 ) } , id_sort ( tbl . filter { | r | ( r [ : a ] < = 5 ) } . run . to_a ) ) <nl> + assert_equal ( docs . select { | x | ( x [ " a " ] > 5 ) } , id_sort ( tbl . filter { | r | ( r [ : a ] > 5 ) } . run . to_a ) ) <nl> + assert_equal ( docs . select { | x | ( x [ " a " ] > = 5 ) } , id_sort ( tbl . filter { | r | ( r [ : a ] > = 5 ) } . run . to_a ) ) <nl> + assert_equal ( docs . select { | x | ( x [ " a " ] = = x [ " b " ] ) } , id_sort ( tbl . filter { | r | r [ : a ] . eq ( r [ : b ] ) } . run . to_a ) ) <nl> + <nl> + assert_equal ( r ( - 5 ) . run , - r ( 5 ) . run ) <nl> + assert_equal ( r ( 5 ) . run , + r ( 5 ) . run ) <nl> + <nl> + assert_equal ( 7 , ( r ( 3 ) + 4 ) . run ) <nl> + assert_equal ( - 1 , ( r ( 3 ) - 4 ) . run ) <nl> + assert_equal ( 12 , ( r ( 3 ) * 4 ) . run ) <nl> + assert_equal ( ( 3 . 0 / 4 ) , ( r ( 3 ) / 4 ) . run ) <nl> + assert_equal ( ( 3 % 2 ) , ( r ( 3 ) % 2 ) . run ) <nl> + assert_raise ( TypeError ) { ( 4 + r ( 3 ) ) } <nl> + assert_raise ( TypeError ) { ( 4 - r ( 3 ) ) } <nl> + assert_raise ( TypeError ) { ( 4 * r ( 3 ) ) } <nl> + assert_raise ( TypeError ) { ( 4 / r ( 3 ) ) } <nl> + assert_raise ( TypeError ) { ( 4 % r ( 3 ) ) } <nl> + <nl> + assert_equal ( 84 , ( ( ( r ( 3 ) + 4 ) * - r ( 6 ) ) * ( r ( - 5 ) + 3 ) ) . run ) <nl> + <nl> + tbl . delete . run <nl> + docs = ( 0 . . . 10 ) . map { | n | { " id " = > ( ( 100 + n ) ) , " a " = > ( n ) , " b " = > ( ( n % 3 ) ) } } <nl> + assert_equal ( { " inserted " = > ( docs . length ) } , tbl . insert ( docs ) . run ) <nl> + assert_equal ( { " unchanged " = > ( docs . length ) } , tbl . replace { | x | x } . run ) <nl> + assert_equal ( docs , id_sort ( tbl . run . to_a ) ) <nl> + assert_equal ( { " unchanged " = > 10 } , tbl . update { nil } . run ) <nl> + <nl> + res = tbl . update { 1 } . run <nl> + assert_equal ( 10 , res [ " errors " ] ) <nl> + res = tbl . update { | row | row [ : id ] } . run <nl> + assert_equal ( 10 , res [ " errors " ] ) <nl> + res = tbl . update { | r | r [ : id ] } . run <nl> + assert_equal ( 10 , res [ " errors " ] ) <nl> + <nl> + res = tbl . update { | row | r . branch ( ( row [ : id ] % 2 ) . eq ( 0 ) , { : id = > - 1 } , row ) } . run <nl> + assert_not_nil ( res [ " first_error " ] ) <nl> + filtered_res = res . reject { | k , v | ( k = = " first_error " ) } <nl> + assert_not_equal ( filtered_res , res ) <nl> + assert_equal ( { " replaced " = > 5 , " errors " = > 5 } , filtered_res ) <nl> + <nl> + assert_equal ( docs , id_sort ( tbl . run . to_a ) ) <nl> + end <nl> + <nl> def setup <nl> begin <nl> r . db_create ( ' test ' ) . run <nl> mmm a / src / rdb_protocol / btree . cc <nl> ppp b / src / rdb_protocol / btree . cc <nl> void rdb_replace ( const std : : string & primary_key , <nl> kv_location_delete ( & kv_location , key , slice , timestamp , txn ) ; <nl> } else { <nl> if ( * old_val - > el ( primary_key ) = = * new_val - > el ( primary_key ) ) { <nl> - conflict = resp - > add ( " replaced " , num_1 ) ; <nl> - kv_location_set ( & kv_location , key , new_val - > as_json ( ) , <nl> - slice , timestamp , txn ) ; <nl> + if ( * old_val = = * new_val ) { <nl> + conflict = resp - > add ( " unchanged " , num_1 ) ; <nl> + } else { <nl> + conflict = resp - > add ( " replaced " , num_1 ) ; <nl> + kv_location_set ( & kv_location , key , new_val - > as_json ( ) , <nl> + slice , timestamp , txn ) ; <nl> + } <nl> } else { <nl> std : : string msg = strprintf ( <nl> " Primary key ( % s ) cannot be changed ( % s - > % s ) " , <nl> mmm a / src / rdb_protocol / terms / rewrites . hpp <nl> ppp b / src / rdb_protocol / terms / rewrites . hpp <nl> class update_term_t : public rewrite_term_t { <nl> private : <nl> static void rewrite ( env_t * env , const Term2 * in , Term2 * out ) { <nl> rcheck ( in - > args_size ( ) = = 2 , " update requires 2 arguments " ) ; <nl> - int x = env - > gensym ( ) ; <nl> + int old_row = env - > gensym ( ) ; <nl> + int new_row = env - > gensym ( ) ; <nl> <nl> Term2 * arg = out ; <nl> # pragma GCC diagnostic push <nl> # pragma GCC diagnostic ignored " - Wshadow " <nl> - N2 ( REPLACE , * arg = in - > args ( 0 ) , arg = pb : : set_func ( arg , x ) ; <nl> + N2 ( REPLACE , * arg = in - > args ( 0 ) , arg = pb : : set_func ( arg , old_row ) ; <nl> N3 ( BRANCH , <nl> - N2 ( EQ , pb : : set_var ( arg , x ) , pb : : set_null ( arg ) ) , <nl> + N2 ( EQ , pb : : set_var ( arg , old_row ) , pb : : set_null ( arg ) ) , <nl> pb : : set_null ( arg ) , <nl> - N2 ( MERGE , <nl> - pb : : set_var ( arg , x ) , <nl> - N2 ( FUNCALL , * arg = in - > args ( 1 ) , pb : : set_var ( arg , x ) ) ) ) ) ; <nl> + N2 ( FUNCALL , arg = pb : : set_func ( arg , new_row ) ; <nl> + N3 ( BRANCH , <nl> + N2 ( EQ , pb : : set_var ( arg , new_row ) , pb : : set_null ( arg ) ) , <nl> + pb : : set_var ( arg , old_row ) , <nl> + N2 ( MERGE , pb : : set_var ( arg , old_row ) , pb : : set_var ( arg , new_row ) ) ) , <nl> + N2 ( FUNCALL , * arg = in - > args ( 1 ) , pb : : set_var ( arg , old_row ) ) ) ) ) <nl> # pragma GCC diagnostic pop <nl> } <nl> RDB_NAME ( " update " ) <nl> | Fixed update . | rethinkdb/rethinkdb | 578ce8c453469f5a9d05a1cb89f0fbedc90eb551 | 2013-01-28T22:52:54Z |
mmm a / libraries / chain / include / eos / chain / types . hpp <nl> ppp b / libraries / chain / include / eos / chain / types . hpp <nl> <nl> <nl> # define EOS_SYSTEM_CONTRACT_FUNCTIONS ( CreateAccount ) ( DefineStruct ) ( SetCode ) <nl> # define EOS_CONTRACT_FUNCTIONS ( Transfer ) ( TransferToLocked ) <nl> - # define EOS_STAKED_BALANCE_CONTRACT_FUNCTIONS ( CreateProducer ) ( UpdateProducer ) ( ApproveProducer ) <nl> + # define EOS_STAKED_BALANCE_CONTRACT_FUNCTIONS \ <nl> + ( CreateProducer ) ( UpdateProducer ) ( ApproveProducer ) ( SetVoteProxy ) ( AllowVoteProxying ) <nl> <nl> namespace eos { namespace chain { <nl> using std : : map ; <nl> mmm a / libraries / native_contract / include / eos / native_contract / producer_objects . hpp <nl> ppp b / libraries / native_contract / include / eos / native_contract / producer_objects . hpp <nl> class ProxyVoteObject : public chainbase : : object < chain : : proxy_vote_object_type , <nl> id_type id ; <nl> / / / The account receiving the proxied voting power <nl> types : : AccountName proxyTarget ; <nl> - / / / The list of accounts proxying their voting power to @ proxyTarget <nl> + / / / The list of accounts proxying their voting power to @ ref proxyTarget <nl> chain : : shared_set < types : : AccountName > proxySources ; <nl> / / / The total stake proxied to @ ref proxyTarget . At all times , this should be equal to the sum of stake over all <nl> / / / accounts in @ ref proxySources <nl> - types : : ShareType proxiedStake ; <nl> + types : : ShareType proxiedStake = 0 ; <nl> <nl> void addProxySource ( const types : : AccountName & source , chain : : ShareType sourceStake , chainbase : : database & db ) const ; <nl> void removeProxySource ( const types : : AccountName & source , chain : : ShareType sourceStake , <nl> chainbase : : database & db ) const ; <nl> void updateProxiedStake ( chain : : ShareType stakeDelta , chainbase : : database & db ) const ; <nl> + <nl> + / / / Cancel proxying votes to @ ref proxyTarget for all @ ref proxySources <nl> + void cancelProxies ( chainbase : : database & db ) const ; <nl> } ; <nl> <nl> / * * <nl> mmm a / libraries / native_contract / include / eos / native_contract / staked_balance_contract . hpp <nl> ppp b / libraries / native_contract / include / eos / native_contract / staked_balance_contract . hpp <nl> struct ApproveProducer { <nl> static void apply ( chain : : apply_context & context ) ; <nl> } ; <nl> <nl> + struct AllowVoteProxying { <nl> + static void validate ( chain : : message_validate_context & context ) ; <nl> + static void validate_preconditions ( chain : : precondition_validate_context & context ) ; <nl> + static void apply ( chain : : apply_context & context ) ; <nl> + } ; <nl> + <nl> + struct SetVoteProxy { <nl> + static void validate ( chain : : message_validate_context & ) { } <nl> + static void validate_preconditions ( chain : : precondition_validate_context & context ) ; <nl> + static void apply ( chain : : apply_context & context ) ; <nl> + } ; <nl> + <nl> } / / namespace eos <nl> mmm a / libraries / native_contract / include / eos / native_contract / staked_balance_objects . hpp <nl> ppp b / libraries / native_contract / include / eos / native_contract / staked_balance_objects . hpp <nl> class StakedBalanceObject : public chainbase : : object < chain : : staked_balance_objec <nl> types : : Time lastUnstakingTime = types : : Time : : maximum ( ) ; <nl> <nl> / / / The account ' s vote on producers . This may either be a list of approved producers , or an account to proxy vote to <nl> - fc : : static_variant < ProducerSlate , types : : AccountName > producerVotes ; <nl> + fc : : static_variant < ProducerSlate , types : : AccountName > producerVotes = ProducerSlate { } ; <nl> <nl> / * * <nl> * @ brief Add the provided stake to this balance , maintaining invariants <nl> class StakedBalanceObject : public chainbase : : object < chain : : staked_balance_objec <nl> * / <nl> void beginUnstakingTokens ( types : : ShareType amount , chainbase : : database & db ) const ; <nl> <nl> - void updateVotes ( types : : ShareType stakeDelta , chainbase : : database & db ) const ; <nl> + / * * <nl> + * @ brief Propagate the specified change in stake to the producer votes or the proxy <nl> + * @ param stakeDelta The change in stake <nl> + * @ param db Read - write reference to the database <nl> + * <nl> + * This method will apply the provided delta in voting stake to the next stage in the producer voting pipeline , <nl> + * whether that be the producers in the slate , or the account the votes are proxied to . <nl> + * <nl> + * This method will * not * update this object in any way . It will not adjust @ ref stakedBalance , etc <nl> + * / <nl> + void propagateVotes ( types : : ShareType stakeDelta , chainbase : : database & db ) const ; <nl> } ; <nl> <nl> struct byOwnerName ; <nl> mmm a / libraries / native_contract / producer_objects . cpp <nl> ppp b / libraries / native_contract / producer_objects . cpp <nl> <nl> # include < eos / native_contract / producer_objects . hpp > <nl> + # include < eos / native_contract / staked_balance_objects . hpp > <nl> <nl> # include < eos / chain / producer_object . hpp > <nl> <nl> void ProxyVoteObject : : addProxySource ( const AccountName & source , ShareType source <nl> pvo . proxySources . insert ( source ) ; <nl> pvo . proxiedStake + = sourceStake ; <nl> } ) ; <nl> - # warning TODO : Update proxy votes <nl> + db . get < StakedBalanceObject , byOwnerName > ( proxyTarget ) . propagateVotes ( sourceStake , db ) ; <nl> } <nl> <nl> void ProxyVoteObject : : removeProxySource ( const AccountName & source , ShareType sourceStake , <nl> void ProxyVoteObject : : removeProxySource ( const AccountName & source , ShareType sou <nl> pvo . proxySources . erase ( source ) ; <nl> pvo . proxiedStake - = sourceStake ; <nl> } ) ; <nl> - # warning TODO : Update proxy votes <nl> + db . get < StakedBalanceObject , byOwnerName > ( proxyTarget ) . propagateVotes ( sourceStake , db ) ; <nl> } <nl> <nl> void ProxyVoteObject : : updateProxiedStake ( ShareType stakeDelta , chainbase : : database & db ) const { <nl> db . modify ( * this , [ stakeDelta ] ( ProxyVoteObject & pvo ) { <nl> pvo . proxiedStake + = stakeDelta ; <nl> } ) ; <nl> - # warning TODO : Update proxy votes <nl> + db . get < StakedBalanceObject , byOwnerName > ( proxyTarget ) . propagateVotes ( stakeDelta , db ) ; <nl> + } <nl> + <nl> + void ProxyVoteObject : : cancelProxies ( chainbase : : database & db ) const { <nl> + boost : : for_each ( proxySources , [ & db ] ( const AccountName & source ) { <nl> + const auto & balance = db . get < StakedBalanceObject , byOwnerName > ( source ) ; <nl> + db . modify ( balance , [ ] ( StakedBalanceObject & sbo ) { <nl> + sbo . producerVotes = ProducerSlate { } ; <nl> + } ) ; <nl> + } ) ; <nl> } <nl> <nl> ProducerRound ProducerScheduleObject : : calculateNextRound ( chainbase : : database & db ) const { <nl> ProducerRound ProducerScheduleObject : : calculateNextRound ( chainbase : : database & db <nl> pso . currentRaceTime = newRaceTime ; <nl> } ) ; <nl> } else { <nl> - wlog ( " All producers finished race , or race time at maximum ; resetting race . " ) ; <nl> + wlog ( " Producer race finished ; restarting race . " ) ; <nl> resetProducerRace ( db ) ; <nl> } <nl> } catch ( ProducerRaceOverflowException & ) { <nl> mmm a / libraries / native_contract / staked_balance_contract . cpp <nl> ppp b / libraries / native_contract / staked_balance_contract . cpp <nl> void ApproveProducer : : validate_preconditions ( precondition_validate_context & cont <nl> void ApproveProducer : : apply ( apply_context & context ) { <nl> auto & db = context . mutable_db ; <nl> auto approve = context . msg . as < types : : ApproveProducer > ( ) ; <nl> - auto producer = db . find < ProducerVotesObject , byOwnerName > ( approve . producer ) ; <nl> - auto voter = db . find < StakedBalanceObject , byOwnerName > ( context . msg . sender ) ; <nl> + const auto & producer = db . get < ProducerVotesObject , byOwnerName > ( approve . producer ) ; <nl> + const auto & voter = db . get < StakedBalanceObject , byOwnerName > ( context . msg . sender ) ; <nl> auto raceTime = ProducerScheduleObject : : get ( db ) . currentRaceTime ; <nl> + auto totalVotingStake = voter . stakedBalance ; <nl> + <nl> + / / Check if voter is proxied to ; if so , we need to add in the proxied stake <nl> + if ( auto proxy = db . find < ProxyVoteObject , byTargetName > ( voter . ownerName ) ) <nl> + totalVotingStake + = proxy - > proxiedStake ; <nl> <nl> / / Add / remove votes from producer <nl> - db . modify ( * producer , <nl> - [ approve = approve . approve , amount = voter - > stakedBalance , & raceTime ] ( ProducerVotesObject & pvo ) { <nl> + db . modify ( producer , [ approve = approve . approve , totalVotingStake , & raceTime ] ( ProducerVotesObject & pvo ) { <nl> if ( approve ) <nl> - pvo . updateVotes ( amount , raceTime ) ; <nl> + pvo . updateVotes ( totalVotingStake , raceTime ) ; <nl> else <nl> - pvo . updateVotes ( - amount , raceTime ) ; <nl> + pvo . updateVotes ( - totalVotingStake , raceTime ) ; <nl> } ) ; <nl> / / Add / remove producer from voter ' s approved producer list <nl> - db . modify ( * voter , [ & approve ] ( StakedBalanceObject & sbo ) { <nl> + db . modify ( voter , [ & approve ] ( StakedBalanceObject & sbo ) { <nl> auto & slate = sbo . producerVotes . get < ProducerSlate > ( ) ; <nl> if ( approve . approve ) <nl> slate . add ( approve . producer ) ; <nl> void ApproveProducer : : apply ( apply_context & context ) { <nl> } ) ; <nl> } <nl> <nl> + void AllowVoteProxying : : validate ( message_validate_context & context ) { <nl> + auto allow = context . msg . as < types : : AllowVoteProxying > ( ) ; <nl> + EOS_ASSERT ( allow . allow = = 0 | | allow . allow = = 1 , message_validate_exception , <nl> + " Unknown allow value : $ { val } ; must be either 0 or 1 " , ( " val " , allow . allow ) ) ; <nl> + } <nl> + <nl> + void AllowVoteProxying : : validate_preconditions ( precondition_validate_context & context ) { <nl> + auto allow = context . msg . as < types : : AllowVoteProxying > ( ) ; <nl> + auto proxy = context . db . find < ProxyVoteObject , byTargetName > ( context . msg . sender ) ; <nl> + if ( allow . allow ) <nl> + EOS_ASSERT ( proxy = = nullptr , message_precondition_exception , <nl> + " Account ' $ { name } ' already allows vote proxying " , ( " name " , context . msg . sender ) ) ; <nl> + else <nl> + EOS_ASSERT ( proxy ! = nullptr , message_precondition_exception , <nl> + " Account ' $ { name } ' already disallows vote proxying " , ( " name " , context . msg . sender ) ) ; <nl> + } <nl> + <nl> + void AllowVoteProxying : : apply ( apply_context & context ) { <nl> + auto allow = context . msg . as < types : : AllowVoteProxying > ( ) ; <nl> + auto & db = context . mutable_db ; <nl> + if ( allow . allow ) <nl> + db . create < ProxyVoteObject > ( [ target = context . msg . sender ] ( ProxyVoteObject & pvo ) { <nl> + pvo . proxyTarget = target ; <nl> + } ) ; <nl> + else { <nl> + const auto & proxy = db . get < ProxyVoteObject , byTargetName > ( context . msg . sender ) ; <nl> + proxy . cancelProxies ( db ) ; <nl> + db . remove ( proxy ) ; <nl> + } <nl> + } <nl> + <nl> + void SetVoteProxy : : validate_preconditions ( precondition_validate_context & context ) { <nl> + auto svp = context . msg . as < types : : SetVoteProxy > ( ) ; <nl> + const auto & db = context . db ; <nl> + <nl> + auto proxy = db . find < ProxyVoteObject , byTargetName > ( context . msg . sender ) ; <nl> + EOS_ASSERT ( proxy = = nullptr , message_precondition_exception , <nl> + " Account ' $ { src } ' cannot proxy its votes , since it allows other accounts to proxy to it " , <nl> + ( " src " , context . msg . sender ) ) ; <nl> + <nl> + if ( svp . proxy ! = context . msg . sender ) { <nl> + / / We are trying to enable proxying to svp . proxy <nl> + auto proxy = db . find < ProxyVoteObject , byTargetName > ( svp . proxy ) ; <nl> + EOS_ASSERT ( proxy ! = nullptr , message_precondition_exception , <nl> + " Proxy target ' $ { target } ' does not allow votes to be proxied to it " , ( " target " , svp . proxy ) ) ; <nl> + } else { <nl> + / / We are trying to disable proxying to sender . producerVotes . get < AccountName > ( ) <nl> + const auto & sender = db . get < StakedBalanceObject , byOwnerName > ( context . msg . sender ) ; <nl> + EOS_ASSERT ( sender . producerVotes . contains < AccountName > ( ) , message_precondition_exception , <nl> + " Account ' $ { name } ' does not currently proxy its votes to any account " , ( " name " , context . msg . sender ) ) ; <nl> + } <nl> + } <nl> + <nl> + void SetVoteProxy : : apply ( apply_context & context ) { <nl> + auto svp = context . msg . as < types : : SetVoteProxy > ( ) ; <nl> + auto & db = context . mutable_db ; <nl> + const auto & proxy = db . get < ProxyVoteObject , byTargetName > ( svp . proxy ) ; <nl> + const auto & balance = db . get < StakedBalanceObject , byOwnerName > ( context . msg . sender ) ; <nl> + <nl> + if ( svp . proxy ! = context . msg . sender ) <nl> + / / We are enabling proxying to svp . proxy <nl> + proxy . addProxySource ( context . msg . sender , balance . stakedBalance , db ) ; <nl> + else { <nl> + / / We are disabling proxying to balance . producerVotes . get < AccountName > ( ) <nl> + proxy . removeProxySource ( context . msg . sender , balance . stakedBalance , db ) ; <nl> + db . modify ( balance , [ ] ( StakedBalanceObject & sbo ) { sbo . producerVotes = ProducerSlate { } ; } ) ; <nl> + } <nl> + } <nl> + <nl> } / / namespace eos <nl> mmm a / libraries / native_contract / staked_balance_objects . cpp <nl> ppp b / libraries / native_contract / staked_balance_objects . cpp <nl> void StakedBalanceObject : : stakeTokens ( ShareType newStake , chainbase : : database & d <nl> sbo . stakedBalance + = newStake ; <nl> } ) ; <nl> <nl> - updateVotes ( newStake , db ) ; <nl> + propagateVotes ( newStake , db ) ; <nl> } <nl> <nl> void StakedBalanceObject : : beginUnstakingTokens ( ShareType amount , chainbase : : database & db ) const { <nl> void StakedBalanceObject : : beginUnstakingTokens ( ShareType amount , chainbase : : data <nl> } ) ; <nl> } <nl> <nl> - void StakedBalanceObject : : updateVotes ( ShareType stakeDelta , chainbase : : database & db ) const { <nl> + void StakedBalanceObject : : propagateVotes ( ShareType stakeDelta , chainbase : : database & db ) const { <nl> if ( producerVotes . contains < ProducerSlate > ( ) ) <nl> / / This account votes for producers directly ; update their stakes <nl> boost : : for_each ( producerVotes . get < ProducerSlate > ( ) . range ( ) , [ & db , & stakeDelta ] ( const AccountName & name ) { <nl> mmm a / libraries / types / types . eos <nl> ppp b / libraries / types / types . eos <nl> struct UpdateProducer <nl> # implies message . sender account <nl> struct ApproveProducer <nl> producer AccountName <nl> - approve Int8 # 0 or 1 <nl> + approve Int8 # 0 or 1 <nl> <nl> - # implies message . sender account <nl> + # implies message . sender account <nl> + struct AllowVoteProxying <nl> + allow Int8 # 0 or 1 <nl> + <nl> + # implies message . sender account <nl> struct SetVoteProxy <nl> proxy AccountName <nl> <nl> | Ref : Finish vote proxying ( untested ) | EOSIO/eos | 55ce1180f8cfa4f12f50f4463cb45c6d83191009 | 2017-06-23T23:04:25Z |