(CommandList children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-d)} {(py)} {(-o)} {(KW_Bang '!')} {(-d)} {(unix)} {(-o)} {(KW_Bang '!')} {(-d)} {(stmhal)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('script must be run from root of the repository'))}) (C {(exit)} {(1)}) ] spids: [16777215 60] ) ] spids: [16777215 74] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:output) op:Equal rhs:{(codestats.dat)} spids:[80])] spids: [80] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:RM) op:Equal rhs:{(/bin/rm)} spids:[87])] spids: [87] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:AWK) op:Equal rhs:{(awk)} spids:[90])] spids: [90] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:MAKE) op:Equal rhs:{(DQ ('make -j2'))} spids:[93])] spids: [93] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:bin_unix) op:Equal rhs:{(unix/micropython)} spids:[102])] spids: [102] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:bin_stmhal) op: Equal rhs: {(stmhal/build-PYBV10/firmware.elf)} spids: [105] ) ] spids: [105] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:bin_barearm_1) op: Equal rhs: {(bare-arm/build/flash.elf)} spids: [108] ) ] spids: [108] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:bin_barearm_2) op: Equal rhs: {(bare-arm/build/firmware.elf)} spids: [111] ) ] spids: [111] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:bin_minimal) op: Equal rhs: {(minimal/build/firmware.elf)} spids: [114] ) ] spids: [114] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:bin_cc3200_1) op: Equal rhs: {(cc3200/build/LAUNCHXL/application.axf)} spids: [117] ) ] spids: [117] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:bin_cc3200_2) op: Equal rhs: {(cc3200/build/LAUNCHXL/release/application.axf)} spids: [121] ) ] spids: [121] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:bin_cc3200_3) op: Equal rhs: {(cc3200/build/WIPY/release/application.axf)} spids: [125] ) ] spids: [125] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:size_unix) op:Equal rhs:{(DQ (0))} spids:[133])] spids: [133] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:size_stmhal) op:Equal rhs:{(DQ (0))} spids:[138])] spids: [138] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:size_barearm) op:Equal rhs:{(DQ (0))} spids:[143])] spids: [143] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:size_minimal) op:Equal rhs:{(DQ (0))} spids:[148])] spids: [148] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:size_cc3200) op:Equal rhs:{(DQ (0))} spids:[153])] spids: [153] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pystones) op:Equal rhs:{(DQ (0))} spids:[162])] spids: [162] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pystoneavg) op: Equal rhs: {(/tmp/pystoneavg.py)} spids: [171] ) ] spids: [171] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$pystoneavg')} spids: [176] ) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('import pystone\n') ('samples = [pystone.pystones(300000)[1] for i in range(5)]\n') ('samples.sort()\n') ('stones = sum(samples[1:-1]) / (len(samples) - 2) # exclude smallest and largest\n') ('print(') (Right_DoubleQuote '"') ('stones %g') (Right_DoubleQuote '"') (' % stones)\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [180] ) ] ) (FuncDef name: get_size body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {($ VSub_Number '$2')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Pipeline children: [ (C {(size)} {($ VSub_Number '$2')}) (C {(tail)} {(-n1)}) (C {($ VSub_Name '$AWK')} {(SQ <'{print $1}'>)}) ] negated: False ) ] spids: [16777215 215] ) ] else_action: [(C {(echo)} {($ VSub_Number '$1')})] spids: [237 245] ) ] spids: [201] ) spids: [195 200] ) (FuncDef name: get_size2 body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {($ VSub_Number '$2')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Pipeline children: [ (C {(size)} {($ VSub_Number '$2')}) (C {(tail)} {(-n1)}) (C {($ VSub_Name '$AWK')} {(SQ <'{print $1}'>)}) ] negated: False ) ] spids: [16777215 270] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {($ VSub_Number '$3')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Pipeline children: [ (C {(size)} {($ VSub_Number '$3')}) (C {(tail)} {(-n1)}) (C {($ VSub_Name '$AWK')} {(SQ <'{print $1}'>)}) ] negated: False ) ] spids: [292 303] ) ] else_action: [(C {(echo)} {($ VSub_Number '$1')})] spids: [325 333] ) ] spids: [256] ) spids: [250 255] ) (FuncDef name: get_size3 body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {($ VSub_Number '$2')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Pipeline children: [ (C {(size)} {($ VSub_Number '$2')}) (C {(tail)} {(-n1)}) (C {($ VSub_Name '$AWK')} {(SQ <'{print $1}'>)}) ] negated: False ) ] spids: [16777215 358] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {($ VSub_Number '$3')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Pipeline children: [ (C {(size)} {($ VSub_Number '$3')}) (C {(tail)} {(-n1)}) (C {($ VSub_Name '$AWK')} {(SQ <'{print $1}'>)}) ] negated: False ) ] spids: [380 391] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {($ VSub_Number '$4')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Pipeline children: [ (C {(size)} {($ VSub_Number '$4')}) (C {(tail)} {(-n1)}) (C {($ VSub_Name '$AWK')} {(SQ <'{print $1}'>)}) ] negated: False ) ] spids: [413 424] ) ] else_action: [(C {(echo)} {($ VSub_Number '$1')})] spids: [446 454] ) ] spids: [344] ) spids: [338 343] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {($ VSub_Name '$output')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:last_rev) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(tail)} {(-n1)} {($ VSub_Name '$output')}) (C {($ VSub_Name '$AWK')} {(SQ <'{print $1}'>)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [477 491] ) } spids: [476] ) ] spids: [476] ) ] spids: [16777215 473] ) ] else_action: [ (SimpleCommand words: [ {(echo)} {(DQ ('# hash size_unix size_stmhal size_barearm size_minimal size_cc3200 pystones'))} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$output')} spids: [502] ) ] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:last_rev) op:Equal rhs:{(DQ (v1.0))} spids:[507])] spids: [507] ) ] spids: [493 512] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:hashes) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(log)} {(--format) (Lit_Other '=') (format) (Lit_Other ':') (DQ ('%H'))} {(--reverse)} {(${ VSub_Name last_rev) (..master)} ) ] ) left_token: <Left_CommandSub '$('> spids: [519 538] ) } spids: [518] ) ] spids: [518] ) (ForEach iter_name: hash iter_words: [{($ VSub_Name '$hashes')}] do_arg_iter: False body: (DoGroup children: [ (C {(git)} {(checkout)} {($ VSub_Name '$hash')}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-ne)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(DQ (aborting))}) (C {(exit)} {(1)})] spids: [16777215 582] ) ] spids: [16777215 597] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(grep)} {(-q)} { (SQ < '#if defined(MP_CLOCKS_PER_SEC) && (MP_CLOCKS_PER_SEC == 1000000) // POSIX' > ) } {(unix/modtime.c)} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(apply)} {(patch)}) (SimpleCommand words: [{(git)} {(apply)} {(-)}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('diff --git a/unix/modtime.c b/unix/modtime.c\n') ('index 77d2945..dae0644 100644\n') ('--- a/unix/modtime.c\n') ('+++ b/unix/modtime.c\n') ('@@ -55,10 +55,8 @@ void msec_sleep_tv(struct timeval *tv) {\n') (' #define MP_CLOCKS_PER_SEC CLOCKS_PER_SEC\n') (' #endif\n') (' \n') ( '-#if defined(MP_CLOCKS_PER_SEC) && (MP_CLOCKS_PER_SEC == 1000000) // POSIX\n' ) ('-#define CLOCK_DIV 1000.0\n') ( '-#elif defined(MP_CLOCKS_PER_SEC) && (MP_CLOCKS_PER_SEC == 1000) // WIN32\n' ) ('-#define CLOCK_DIV 1.0\n') ('+#if defined(MP_CLOCKS_PER_SEC)\n') ('+#define CLOCK_DIV (MP_CLOCKS_PER_SEC / 1000.0F)\n') (' #else\n') (' #error Unsupported clock() implementation\n') (' #endif\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [635] ) ] ) ] spids: [16777215 619] ) ] spids: [16777215 658] ) (C {($ VSub_Name '$RM')} {($ VSub_Name '$bin_unix')}) (C {($ VSub_Name '$MAKE')} {(-C)} {(unix)} {(Lit_VarLike 'CFLAGS_EXTRA=') (-DNDEBUG)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:size_unix) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(get_size)} {($ VSub_Name '$size_unix')} {($ VSub_Name '$bin_unix')}) ] ) left_token: <Left_CommandSub '$('> spids: [683 689] ) } spids: [682] ) ] spids: [682] ) (C {(git)} {(checkout)} {(unix/modtime.c)}) (C {($ VSub_Name '$RM')} {($ VSub_Name '$bin_stmhal')}) (C {($ VSub_Name '$MAKE')} {(-C)} {(stmhal)} {(Lit_VarLike 'board=') (PYBV10)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:size_stmhal) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(get_size)} {($ VSub_Name '$size_stmhal')} {($ VSub_Name '$bin_stmhal')} ) ] ) left_token: <Left_CommandSub '$('> spids: [726 732] ) } spids: [725] ) ] spids: [725] ) (C {($ VSub_Name '$RM')} {($ VSub_Name '$bin_barearm_1')} {($ VSub_Name '$bin_barearm_2')}) (C {($ VSub_Name '$MAKE')} {(-C)} {(bare-arm)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:size_barearm) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(get_size2)} {($ VSub_Name '$size_barearm')} {($ VSub_Name '$bin_barearm_1')} {($ VSub_Name '$bin_barearm_2')} ) ] ) left_token: <Left_CommandSub '$('> spids: [756 764] ) } spids: [755] ) ] spids: [755] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(minimal/Makefile)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {($ VSub_Name '$RM')} {($ VSub_Name '$bin_minimal')}) (C {($ VSub_Name '$MAKE')} {(-C)} {(minimal)} {(Lit_VarLike 'CROSS=') (1)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:size_minimal) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(get_size)} {($ VSub_Name '$size_minimal')} {($ VSub_Name '$bin_minimal')} ) ] ) left_token: <Left_CommandSub '$('> spids: [803 809] ) } spids: [802] ) ] spids: [802] ) ] spids: [16777215 784] ) ] spids: [16777215 812] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(cc3200/Makefile)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {($ VSub_Name '$RM')} {($ VSub_Name '$bin_cc3200_1')} {($ VSub_Name '$bin_cc3200_2')} {($ VSub_Name '$bin_cc3200_3')} ) (C {($ VSub_Name '$MAKE')} {(-C)} {(cc3200)} {(Lit_VarLike 'BTARGET=') (application)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:size_cc3200) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(get_size3)} {($ VSub_Name '$size_cc3200')} {($ VSub_Name '$bin_cc3200_1')} {($ VSub_Name '$bin_cc3200_2')} {($ VSub_Name '$bin_cc3200_3')} ) ] ) left_token: <Left_CommandSub '$('> spids: [855 865] ) } spids: [854] ) ] spids: [854] ) ] spids: [16777215 832] ) ] spids: [16777215 868] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-x)} {($ VSub_Name '$bin_unix')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:new_pystones) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {($ VSub_Name '$bin_unix')} {($ VSub_Name '$pystoneavg')}) ] ) left_token: <Left_CommandSub '$('> spids: [892 896] ) } spids: [891] ) ] spids: [891] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(echo)} {($ VSub_Name '$new_pystones')}) (C {(grep)} {(-q)} {(DQ ('^stones'))}) ] negated: False ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pystones) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$new_pystones')}) (C {($ VSub_Name '$AWK')} {(SQ <'{print $2}'>)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [924 936] ) } spids: [923] ) ] spids: [923] ) ] spids: [16777215 920] ) ] spids: [16777215 939] ) ] spids: [16777215 888] ) ] spids: [16777215 942] ) (SimpleCommand words: [ {(echo)} { (DQ ($ VSub_Name '$hash') (' ') ($ VSub_Name '$size_unix') (' ') ($ VSub_Name '$size_stmhal') (' ') ($ VSub_Name '$size_barearm') (' ') ($ VSub_Name '$size_minimal') (' ') ($ VSub_Name '$size_cc3200') (' ') ($ VSub_Name '$pystones') ) } ] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {($ VSub_Name '$output')} spids: [969] ) ] ) ] spids: [553 974] ) spids: [549 551] ) (C {(git)} {(checkout)} {(master)}) (C {($ VSub_Name '$RM')} {($ VSub_Name '$pystoneavg')}) ] )