fast-path.generated.go 731 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731
  1. // +build !notfastpath
  2. // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
  3. // Use of this source code is governed by a MIT license found in the LICENSE file.
  4. // ************************************************************
  5. // DO NOT EDIT.
  6. // THIS FILE IS AUTO-GENERATED from fast-path.go.tmpl
  7. // ************************************************************
  8. package codec
  9. // Fast path functions try to create a fast path encode or decode implementation
  10. // for common maps and slices.
  11. //
  12. // We define the functions and register then in this single file
  13. // so as not to pollute the encode.go and decode.go, and create a dependency in there.
  14. // This file can be omitted without causing a build failure.
  15. //
  16. // The advantage of fast paths is:
  17. // - Many calls bypass reflection altogether
  18. //
  19. // Currently support
  20. // - slice of all builtin types,
  21. // - map of all builtin types to string or interface value
  22. // - symmetrical maps of all builtin types (e.g. str-str, uint8-uint8)
  23. // This should provide adequate "typical" implementations.
  24. //
  25. // Note that fast track decode functions must handle values for which an address cannot be obtained.
  26. // For example:
  27. // m2 := map[string]int{}
  28. // p2 := []interface{}{m2}
  29. // // decoding into p2 will bomb if fast track functions do not treat like unaddressable.
  30. //
  31. import (
  32. "reflect"
  33. "sort"
  34. )
  35. const fastpathEnabled = true
  36. type fastpathT struct{}
  37. var fastpathTV fastpathT
  38. type fastpathE struct {
  39. rtid uintptr
  40. rt reflect.Type
  41. encfn func(*Encoder, *codecFnInfo, reflect.Value)
  42. decfn func(*Decoder, *codecFnInfo, reflect.Value)
  43. }
  44. type fastpathA [271]fastpathE
  45. func (x *fastpathA) index(rtid uintptr) int {
  46. // use binary search to grab the index (adapted from sort/search.go)
  47. h, i, j := 0, 0, 271 // len(x)
  48. for i < j {
  49. h = i + (j-i)/2
  50. if x[h].rtid < rtid {
  51. i = h + 1
  52. } else {
  53. j = h
  54. }
  55. }
  56. if i < 271 && x[i].rtid == rtid {
  57. return i
  58. }
  59. return -1
  60. }
  61. type fastpathAslice []fastpathE
  62. func (x fastpathAslice) Len() int { return len(x) }
  63. func (x fastpathAslice) Less(i, j int) bool { return x[i].rtid < x[j].rtid }
  64. func (x fastpathAslice) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
  65. var fastpathAV fastpathA
  66. // due to possible initialization loop error, make fastpath in an init()
  67. func init() {
  68. if useLookupRecognizedTypes && recognizedRtidsLoaded {
  69. panic("recognizedRtidsLoaded = true - cannot happen")
  70. }
  71. i := 0
  72. fn := func(v interface{},
  73. fe func(*Encoder, *codecFnInfo, reflect.Value),
  74. fd func(*Decoder, *codecFnInfo, reflect.Value)) (f fastpathE) {
  75. xrt := reflect.TypeOf(v)
  76. xptr := rt2id(xrt)
  77. if useLookupRecognizedTypes {
  78. recognizedRtids = append(recognizedRtids, xptr)
  79. recognizedRtidPtrs = append(recognizedRtidPtrs, rt2id(reflect.PtrTo(xrt)))
  80. }
  81. fastpathAV[i] = fastpathE{xptr, xrt, fe, fd}
  82. i++
  83. return
  84. }
  85. fn([]interface{}(nil), (*Encoder).fastpathEncSliceIntfR, (*Decoder).fastpathDecSliceIntfR)
  86. fn([]string(nil), (*Encoder).fastpathEncSliceStringR, (*Decoder).fastpathDecSliceStringR)
  87. fn([]float32(nil), (*Encoder).fastpathEncSliceFloat32R, (*Decoder).fastpathDecSliceFloat32R)
  88. fn([]float64(nil), (*Encoder).fastpathEncSliceFloat64R, (*Decoder).fastpathDecSliceFloat64R)
  89. fn([]uint(nil), (*Encoder).fastpathEncSliceUintR, (*Decoder).fastpathDecSliceUintR)
  90. fn([]uint16(nil), (*Encoder).fastpathEncSliceUint16R, (*Decoder).fastpathDecSliceUint16R)
  91. fn([]uint32(nil), (*Encoder).fastpathEncSliceUint32R, (*Decoder).fastpathDecSliceUint32R)
  92. fn([]uint64(nil), (*Encoder).fastpathEncSliceUint64R, (*Decoder).fastpathDecSliceUint64R)
  93. fn([]uintptr(nil), (*Encoder).fastpathEncSliceUintptrR, (*Decoder).fastpathDecSliceUintptrR)
  94. fn([]int(nil), (*Encoder).fastpathEncSliceIntR, (*Decoder).fastpathDecSliceIntR)
  95. fn([]int8(nil), (*Encoder).fastpathEncSliceInt8R, (*Decoder).fastpathDecSliceInt8R)
  96. fn([]int16(nil), (*Encoder).fastpathEncSliceInt16R, (*Decoder).fastpathDecSliceInt16R)
  97. fn([]int32(nil), (*Encoder).fastpathEncSliceInt32R, (*Decoder).fastpathDecSliceInt32R)
  98. fn([]int64(nil), (*Encoder).fastpathEncSliceInt64R, (*Decoder).fastpathDecSliceInt64R)
  99. fn([]bool(nil), (*Encoder).fastpathEncSliceBoolR, (*Decoder).fastpathDecSliceBoolR)
  100. fn(map[interface{}]interface{}(nil), (*Encoder).fastpathEncMapIntfIntfR, (*Decoder).fastpathDecMapIntfIntfR)
  101. fn(map[interface{}]string(nil), (*Encoder).fastpathEncMapIntfStringR, (*Decoder).fastpathDecMapIntfStringR)
  102. fn(map[interface{}]uint(nil), (*Encoder).fastpathEncMapIntfUintR, (*Decoder).fastpathDecMapIntfUintR)
  103. fn(map[interface{}]uint8(nil), (*Encoder).fastpathEncMapIntfUint8R, (*Decoder).fastpathDecMapIntfUint8R)
  104. fn(map[interface{}]uint16(nil), (*Encoder).fastpathEncMapIntfUint16R, (*Decoder).fastpathDecMapIntfUint16R)
  105. fn(map[interface{}]uint32(nil), (*Encoder).fastpathEncMapIntfUint32R, (*Decoder).fastpathDecMapIntfUint32R)
  106. fn(map[interface{}]uint64(nil), (*Encoder).fastpathEncMapIntfUint64R, (*Decoder).fastpathDecMapIntfUint64R)
  107. fn(map[interface{}]uintptr(nil), (*Encoder).fastpathEncMapIntfUintptrR, (*Decoder).fastpathDecMapIntfUintptrR)
  108. fn(map[interface{}]int(nil), (*Encoder).fastpathEncMapIntfIntR, (*Decoder).fastpathDecMapIntfIntR)
  109. fn(map[interface{}]int8(nil), (*Encoder).fastpathEncMapIntfInt8R, (*Decoder).fastpathDecMapIntfInt8R)
  110. fn(map[interface{}]int16(nil), (*Encoder).fastpathEncMapIntfInt16R, (*Decoder).fastpathDecMapIntfInt16R)
  111. fn(map[interface{}]int32(nil), (*Encoder).fastpathEncMapIntfInt32R, (*Decoder).fastpathDecMapIntfInt32R)
  112. fn(map[interface{}]int64(nil), (*Encoder).fastpathEncMapIntfInt64R, (*Decoder).fastpathDecMapIntfInt64R)
  113. fn(map[interface{}]float32(nil), (*Encoder).fastpathEncMapIntfFloat32R, (*Decoder).fastpathDecMapIntfFloat32R)
  114. fn(map[interface{}]float64(nil), (*Encoder).fastpathEncMapIntfFloat64R, (*Decoder).fastpathDecMapIntfFloat64R)
  115. fn(map[interface{}]bool(nil), (*Encoder).fastpathEncMapIntfBoolR, (*Decoder).fastpathDecMapIntfBoolR)
  116. fn(map[string]interface{}(nil), (*Encoder).fastpathEncMapStringIntfR, (*Decoder).fastpathDecMapStringIntfR)
  117. fn(map[string]string(nil), (*Encoder).fastpathEncMapStringStringR, (*Decoder).fastpathDecMapStringStringR)
  118. fn(map[string]uint(nil), (*Encoder).fastpathEncMapStringUintR, (*Decoder).fastpathDecMapStringUintR)
  119. fn(map[string]uint8(nil), (*Encoder).fastpathEncMapStringUint8R, (*Decoder).fastpathDecMapStringUint8R)
  120. fn(map[string]uint16(nil), (*Encoder).fastpathEncMapStringUint16R, (*Decoder).fastpathDecMapStringUint16R)
  121. fn(map[string]uint32(nil), (*Encoder).fastpathEncMapStringUint32R, (*Decoder).fastpathDecMapStringUint32R)
  122. fn(map[string]uint64(nil), (*Encoder).fastpathEncMapStringUint64R, (*Decoder).fastpathDecMapStringUint64R)
  123. fn(map[string]uintptr(nil), (*Encoder).fastpathEncMapStringUintptrR, (*Decoder).fastpathDecMapStringUintptrR)
  124. fn(map[string]int(nil), (*Encoder).fastpathEncMapStringIntR, (*Decoder).fastpathDecMapStringIntR)
  125. fn(map[string]int8(nil), (*Encoder).fastpathEncMapStringInt8R, (*Decoder).fastpathDecMapStringInt8R)
  126. fn(map[string]int16(nil), (*Encoder).fastpathEncMapStringInt16R, (*Decoder).fastpathDecMapStringInt16R)
  127. fn(map[string]int32(nil), (*Encoder).fastpathEncMapStringInt32R, (*Decoder).fastpathDecMapStringInt32R)
  128. fn(map[string]int64(nil), (*Encoder).fastpathEncMapStringInt64R, (*Decoder).fastpathDecMapStringInt64R)
  129. fn(map[string]float32(nil), (*Encoder).fastpathEncMapStringFloat32R, (*Decoder).fastpathDecMapStringFloat32R)
  130. fn(map[string]float64(nil), (*Encoder).fastpathEncMapStringFloat64R, (*Decoder).fastpathDecMapStringFloat64R)
  131. fn(map[string]bool(nil), (*Encoder).fastpathEncMapStringBoolR, (*Decoder).fastpathDecMapStringBoolR)
  132. fn(map[float32]interface{}(nil), (*Encoder).fastpathEncMapFloat32IntfR, (*Decoder).fastpathDecMapFloat32IntfR)
  133. fn(map[float32]string(nil), (*Encoder).fastpathEncMapFloat32StringR, (*Decoder).fastpathDecMapFloat32StringR)
  134. fn(map[float32]uint(nil), (*Encoder).fastpathEncMapFloat32UintR, (*Decoder).fastpathDecMapFloat32UintR)
  135. fn(map[float32]uint8(nil), (*Encoder).fastpathEncMapFloat32Uint8R, (*Decoder).fastpathDecMapFloat32Uint8R)
  136. fn(map[float32]uint16(nil), (*Encoder).fastpathEncMapFloat32Uint16R, (*Decoder).fastpathDecMapFloat32Uint16R)
  137. fn(map[float32]uint32(nil), (*Encoder).fastpathEncMapFloat32Uint32R, (*Decoder).fastpathDecMapFloat32Uint32R)
  138. fn(map[float32]uint64(nil), (*Encoder).fastpathEncMapFloat32Uint64R, (*Decoder).fastpathDecMapFloat32Uint64R)
  139. fn(map[float32]uintptr(nil), (*Encoder).fastpathEncMapFloat32UintptrR, (*Decoder).fastpathDecMapFloat32UintptrR)
  140. fn(map[float32]int(nil), (*Encoder).fastpathEncMapFloat32IntR, (*Decoder).fastpathDecMapFloat32IntR)
  141. fn(map[float32]int8(nil), (*Encoder).fastpathEncMapFloat32Int8R, (*Decoder).fastpathDecMapFloat32Int8R)
  142. fn(map[float32]int16(nil), (*Encoder).fastpathEncMapFloat32Int16R, (*Decoder).fastpathDecMapFloat32Int16R)
  143. fn(map[float32]int32(nil), (*Encoder).fastpathEncMapFloat32Int32R, (*Decoder).fastpathDecMapFloat32Int32R)
  144. fn(map[float32]int64(nil), (*Encoder).fastpathEncMapFloat32Int64R, (*Decoder).fastpathDecMapFloat32Int64R)
  145. fn(map[float32]float32(nil), (*Encoder).fastpathEncMapFloat32Float32R, (*Decoder).fastpathDecMapFloat32Float32R)
  146. fn(map[float32]float64(nil), (*Encoder).fastpathEncMapFloat32Float64R, (*Decoder).fastpathDecMapFloat32Float64R)
  147. fn(map[float32]bool(nil), (*Encoder).fastpathEncMapFloat32BoolR, (*Decoder).fastpathDecMapFloat32BoolR)
  148. fn(map[float64]interface{}(nil), (*Encoder).fastpathEncMapFloat64IntfR, (*Decoder).fastpathDecMapFloat64IntfR)
  149. fn(map[float64]string(nil), (*Encoder).fastpathEncMapFloat64StringR, (*Decoder).fastpathDecMapFloat64StringR)
  150. fn(map[float64]uint(nil), (*Encoder).fastpathEncMapFloat64UintR, (*Decoder).fastpathDecMapFloat64UintR)
  151. fn(map[float64]uint8(nil), (*Encoder).fastpathEncMapFloat64Uint8R, (*Decoder).fastpathDecMapFloat64Uint8R)
  152. fn(map[float64]uint16(nil), (*Encoder).fastpathEncMapFloat64Uint16R, (*Decoder).fastpathDecMapFloat64Uint16R)
  153. fn(map[float64]uint32(nil), (*Encoder).fastpathEncMapFloat64Uint32R, (*Decoder).fastpathDecMapFloat64Uint32R)
  154. fn(map[float64]uint64(nil), (*Encoder).fastpathEncMapFloat64Uint64R, (*Decoder).fastpathDecMapFloat64Uint64R)
  155. fn(map[float64]uintptr(nil), (*Encoder).fastpathEncMapFloat64UintptrR, (*Decoder).fastpathDecMapFloat64UintptrR)
  156. fn(map[float64]int(nil), (*Encoder).fastpathEncMapFloat64IntR, (*Decoder).fastpathDecMapFloat64IntR)
  157. fn(map[float64]int8(nil), (*Encoder).fastpathEncMapFloat64Int8R, (*Decoder).fastpathDecMapFloat64Int8R)
  158. fn(map[float64]int16(nil), (*Encoder).fastpathEncMapFloat64Int16R, (*Decoder).fastpathDecMapFloat64Int16R)
  159. fn(map[float64]int32(nil), (*Encoder).fastpathEncMapFloat64Int32R, (*Decoder).fastpathDecMapFloat64Int32R)
  160. fn(map[float64]int64(nil), (*Encoder).fastpathEncMapFloat64Int64R, (*Decoder).fastpathDecMapFloat64Int64R)
  161. fn(map[float64]float32(nil), (*Encoder).fastpathEncMapFloat64Float32R, (*Decoder).fastpathDecMapFloat64Float32R)
  162. fn(map[float64]float64(nil), (*Encoder).fastpathEncMapFloat64Float64R, (*Decoder).fastpathDecMapFloat64Float64R)
  163. fn(map[float64]bool(nil), (*Encoder).fastpathEncMapFloat64BoolR, (*Decoder).fastpathDecMapFloat64BoolR)
  164. fn(map[uint]interface{}(nil), (*Encoder).fastpathEncMapUintIntfR, (*Decoder).fastpathDecMapUintIntfR)
  165. fn(map[uint]string(nil), (*Encoder).fastpathEncMapUintStringR, (*Decoder).fastpathDecMapUintStringR)
  166. fn(map[uint]uint(nil), (*Encoder).fastpathEncMapUintUintR, (*Decoder).fastpathDecMapUintUintR)
  167. fn(map[uint]uint8(nil), (*Encoder).fastpathEncMapUintUint8R, (*Decoder).fastpathDecMapUintUint8R)
  168. fn(map[uint]uint16(nil), (*Encoder).fastpathEncMapUintUint16R, (*Decoder).fastpathDecMapUintUint16R)
  169. fn(map[uint]uint32(nil), (*Encoder).fastpathEncMapUintUint32R, (*Decoder).fastpathDecMapUintUint32R)
  170. fn(map[uint]uint64(nil), (*Encoder).fastpathEncMapUintUint64R, (*Decoder).fastpathDecMapUintUint64R)
  171. fn(map[uint]uintptr(nil), (*Encoder).fastpathEncMapUintUintptrR, (*Decoder).fastpathDecMapUintUintptrR)
  172. fn(map[uint]int(nil), (*Encoder).fastpathEncMapUintIntR, (*Decoder).fastpathDecMapUintIntR)
  173. fn(map[uint]int8(nil), (*Encoder).fastpathEncMapUintInt8R, (*Decoder).fastpathDecMapUintInt8R)
  174. fn(map[uint]int16(nil), (*Encoder).fastpathEncMapUintInt16R, (*Decoder).fastpathDecMapUintInt16R)
  175. fn(map[uint]int32(nil), (*Encoder).fastpathEncMapUintInt32R, (*Decoder).fastpathDecMapUintInt32R)
  176. fn(map[uint]int64(nil), (*Encoder).fastpathEncMapUintInt64R, (*Decoder).fastpathDecMapUintInt64R)
  177. fn(map[uint]float32(nil), (*Encoder).fastpathEncMapUintFloat32R, (*Decoder).fastpathDecMapUintFloat32R)
  178. fn(map[uint]float64(nil), (*Encoder).fastpathEncMapUintFloat64R, (*Decoder).fastpathDecMapUintFloat64R)
  179. fn(map[uint]bool(nil), (*Encoder).fastpathEncMapUintBoolR, (*Decoder).fastpathDecMapUintBoolR)
  180. fn(map[uint8]interface{}(nil), (*Encoder).fastpathEncMapUint8IntfR, (*Decoder).fastpathDecMapUint8IntfR)
  181. fn(map[uint8]string(nil), (*Encoder).fastpathEncMapUint8StringR, (*Decoder).fastpathDecMapUint8StringR)
  182. fn(map[uint8]uint(nil), (*Encoder).fastpathEncMapUint8UintR, (*Decoder).fastpathDecMapUint8UintR)
  183. fn(map[uint8]uint8(nil), (*Encoder).fastpathEncMapUint8Uint8R, (*Decoder).fastpathDecMapUint8Uint8R)
  184. fn(map[uint8]uint16(nil), (*Encoder).fastpathEncMapUint8Uint16R, (*Decoder).fastpathDecMapUint8Uint16R)
  185. fn(map[uint8]uint32(nil), (*Encoder).fastpathEncMapUint8Uint32R, (*Decoder).fastpathDecMapUint8Uint32R)
  186. fn(map[uint8]uint64(nil), (*Encoder).fastpathEncMapUint8Uint64R, (*Decoder).fastpathDecMapUint8Uint64R)
  187. fn(map[uint8]uintptr(nil), (*Encoder).fastpathEncMapUint8UintptrR, (*Decoder).fastpathDecMapUint8UintptrR)
  188. fn(map[uint8]int(nil), (*Encoder).fastpathEncMapUint8IntR, (*Decoder).fastpathDecMapUint8IntR)
  189. fn(map[uint8]int8(nil), (*Encoder).fastpathEncMapUint8Int8R, (*Decoder).fastpathDecMapUint8Int8R)
  190. fn(map[uint8]int16(nil), (*Encoder).fastpathEncMapUint8Int16R, (*Decoder).fastpathDecMapUint8Int16R)
  191. fn(map[uint8]int32(nil), (*Encoder).fastpathEncMapUint8Int32R, (*Decoder).fastpathDecMapUint8Int32R)
  192. fn(map[uint8]int64(nil), (*Encoder).fastpathEncMapUint8Int64R, (*Decoder).fastpathDecMapUint8Int64R)
  193. fn(map[uint8]float32(nil), (*Encoder).fastpathEncMapUint8Float32R, (*Decoder).fastpathDecMapUint8Float32R)
  194. fn(map[uint8]float64(nil), (*Encoder).fastpathEncMapUint8Float64R, (*Decoder).fastpathDecMapUint8Float64R)
  195. fn(map[uint8]bool(nil), (*Encoder).fastpathEncMapUint8BoolR, (*Decoder).fastpathDecMapUint8BoolR)
  196. fn(map[uint16]interface{}(nil), (*Encoder).fastpathEncMapUint16IntfR, (*Decoder).fastpathDecMapUint16IntfR)
  197. fn(map[uint16]string(nil), (*Encoder).fastpathEncMapUint16StringR, (*Decoder).fastpathDecMapUint16StringR)
  198. fn(map[uint16]uint(nil), (*Encoder).fastpathEncMapUint16UintR, (*Decoder).fastpathDecMapUint16UintR)
  199. fn(map[uint16]uint8(nil), (*Encoder).fastpathEncMapUint16Uint8R, (*Decoder).fastpathDecMapUint16Uint8R)
  200. fn(map[uint16]uint16(nil), (*Encoder).fastpathEncMapUint16Uint16R, (*Decoder).fastpathDecMapUint16Uint16R)
  201. fn(map[uint16]uint32(nil), (*Encoder).fastpathEncMapUint16Uint32R, (*Decoder).fastpathDecMapUint16Uint32R)
  202. fn(map[uint16]uint64(nil), (*Encoder).fastpathEncMapUint16Uint64R, (*Decoder).fastpathDecMapUint16Uint64R)
  203. fn(map[uint16]uintptr(nil), (*Encoder).fastpathEncMapUint16UintptrR, (*Decoder).fastpathDecMapUint16UintptrR)
  204. fn(map[uint16]int(nil), (*Encoder).fastpathEncMapUint16IntR, (*Decoder).fastpathDecMapUint16IntR)
  205. fn(map[uint16]int8(nil), (*Encoder).fastpathEncMapUint16Int8R, (*Decoder).fastpathDecMapUint16Int8R)
  206. fn(map[uint16]int16(nil), (*Encoder).fastpathEncMapUint16Int16R, (*Decoder).fastpathDecMapUint16Int16R)
  207. fn(map[uint16]int32(nil), (*Encoder).fastpathEncMapUint16Int32R, (*Decoder).fastpathDecMapUint16Int32R)
  208. fn(map[uint16]int64(nil), (*Encoder).fastpathEncMapUint16Int64R, (*Decoder).fastpathDecMapUint16Int64R)
  209. fn(map[uint16]float32(nil), (*Encoder).fastpathEncMapUint16Float32R, (*Decoder).fastpathDecMapUint16Float32R)
  210. fn(map[uint16]float64(nil), (*Encoder).fastpathEncMapUint16Float64R, (*Decoder).fastpathDecMapUint16Float64R)
  211. fn(map[uint16]bool(nil), (*Encoder).fastpathEncMapUint16BoolR, (*Decoder).fastpathDecMapUint16BoolR)
  212. fn(map[uint32]interface{}(nil), (*Encoder).fastpathEncMapUint32IntfR, (*Decoder).fastpathDecMapUint32IntfR)
  213. fn(map[uint32]string(nil), (*Encoder).fastpathEncMapUint32StringR, (*Decoder).fastpathDecMapUint32StringR)
  214. fn(map[uint32]uint(nil), (*Encoder).fastpathEncMapUint32UintR, (*Decoder).fastpathDecMapUint32UintR)
  215. fn(map[uint32]uint8(nil), (*Encoder).fastpathEncMapUint32Uint8R, (*Decoder).fastpathDecMapUint32Uint8R)
  216. fn(map[uint32]uint16(nil), (*Encoder).fastpathEncMapUint32Uint16R, (*Decoder).fastpathDecMapUint32Uint16R)
  217. fn(map[uint32]uint32(nil), (*Encoder).fastpathEncMapUint32Uint32R, (*Decoder).fastpathDecMapUint32Uint32R)
  218. fn(map[uint32]uint64(nil), (*Encoder).fastpathEncMapUint32Uint64R, (*Decoder).fastpathDecMapUint32Uint64R)
  219. fn(map[uint32]uintptr(nil), (*Encoder).fastpathEncMapUint32UintptrR, (*Decoder).fastpathDecMapUint32UintptrR)
  220. fn(map[uint32]int(nil), (*Encoder).fastpathEncMapUint32IntR, (*Decoder).fastpathDecMapUint32IntR)
  221. fn(map[uint32]int8(nil), (*Encoder).fastpathEncMapUint32Int8R, (*Decoder).fastpathDecMapUint32Int8R)
  222. fn(map[uint32]int16(nil), (*Encoder).fastpathEncMapUint32Int16R, (*Decoder).fastpathDecMapUint32Int16R)
  223. fn(map[uint32]int32(nil), (*Encoder).fastpathEncMapUint32Int32R, (*Decoder).fastpathDecMapUint32Int32R)
  224. fn(map[uint32]int64(nil), (*Encoder).fastpathEncMapUint32Int64R, (*Decoder).fastpathDecMapUint32Int64R)
  225. fn(map[uint32]float32(nil), (*Encoder).fastpathEncMapUint32Float32R, (*Decoder).fastpathDecMapUint32Float32R)
  226. fn(map[uint32]float64(nil), (*Encoder).fastpathEncMapUint32Float64R, (*Decoder).fastpathDecMapUint32Float64R)
  227. fn(map[uint32]bool(nil), (*Encoder).fastpathEncMapUint32BoolR, (*Decoder).fastpathDecMapUint32BoolR)
  228. fn(map[uint64]interface{}(nil), (*Encoder).fastpathEncMapUint64IntfR, (*Decoder).fastpathDecMapUint64IntfR)
  229. fn(map[uint64]string(nil), (*Encoder).fastpathEncMapUint64StringR, (*Decoder).fastpathDecMapUint64StringR)
  230. fn(map[uint64]uint(nil), (*Encoder).fastpathEncMapUint64UintR, (*Decoder).fastpathDecMapUint64UintR)
  231. fn(map[uint64]uint8(nil), (*Encoder).fastpathEncMapUint64Uint8R, (*Decoder).fastpathDecMapUint64Uint8R)
  232. fn(map[uint64]uint16(nil), (*Encoder).fastpathEncMapUint64Uint16R, (*Decoder).fastpathDecMapUint64Uint16R)
  233. fn(map[uint64]uint32(nil), (*Encoder).fastpathEncMapUint64Uint32R, (*Decoder).fastpathDecMapUint64Uint32R)
  234. fn(map[uint64]uint64(nil), (*Encoder).fastpathEncMapUint64Uint64R, (*Decoder).fastpathDecMapUint64Uint64R)
  235. fn(map[uint64]uintptr(nil), (*Encoder).fastpathEncMapUint64UintptrR, (*Decoder).fastpathDecMapUint64UintptrR)
  236. fn(map[uint64]int(nil), (*Encoder).fastpathEncMapUint64IntR, (*Decoder).fastpathDecMapUint64IntR)
  237. fn(map[uint64]int8(nil), (*Encoder).fastpathEncMapUint64Int8R, (*Decoder).fastpathDecMapUint64Int8R)
  238. fn(map[uint64]int16(nil), (*Encoder).fastpathEncMapUint64Int16R, (*Decoder).fastpathDecMapUint64Int16R)
  239. fn(map[uint64]int32(nil), (*Encoder).fastpathEncMapUint64Int32R, (*Decoder).fastpathDecMapUint64Int32R)
  240. fn(map[uint64]int64(nil), (*Encoder).fastpathEncMapUint64Int64R, (*Decoder).fastpathDecMapUint64Int64R)
  241. fn(map[uint64]float32(nil), (*Encoder).fastpathEncMapUint64Float32R, (*Decoder).fastpathDecMapUint64Float32R)
  242. fn(map[uint64]float64(nil), (*Encoder).fastpathEncMapUint64Float64R, (*Decoder).fastpathDecMapUint64Float64R)
  243. fn(map[uint64]bool(nil), (*Encoder).fastpathEncMapUint64BoolR, (*Decoder).fastpathDecMapUint64BoolR)
  244. fn(map[uintptr]interface{}(nil), (*Encoder).fastpathEncMapUintptrIntfR, (*Decoder).fastpathDecMapUintptrIntfR)
  245. fn(map[uintptr]string(nil), (*Encoder).fastpathEncMapUintptrStringR, (*Decoder).fastpathDecMapUintptrStringR)
  246. fn(map[uintptr]uint(nil), (*Encoder).fastpathEncMapUintptrUintR, (*Decoder).fastpathDecMapUintptrUintR)
  247. fn(map[uintptr]uint8(nil), (*Encoder).fastpathEncMapUintptrUint8R, (*Decoder).fastpathDecMapUintptrUint8R)
  248. fn(map[uintptr]uint16(nil), (*Encoder).fastpathEncMapUintptrUint16R, (*Decoder).fastpathDecMapUintptrUint16R)
  249. fn(map[uintptr]uint32(nil), (*Encoder).fastpathEncMapUintptrUint32R, (*Decoder).fastpathDecMapUintptrUint32R)
  250. fn(map[uintptr]uint64(nil), (*Encoder).fastpathEncMapUintptrUint64R, (*Decoder).fastpathDecMapUintptrUint64R)
  251. fn(map[uintptr]uintptr(nil), (*Encoder).fastpathEncMapUintptrUintptrR, (*Decoder).fastpathDecMapUintptrUintptrR)
  252. fn(map[uintptr]int(nil), (*Encoder).fastpathEncMapUintptrIntR, (*Decoder).fastpathDecMapUintptrIntR)
  253. fn(map[uintptr]int8(nil), (*Encoder).fastpathEncMapUintptrInt8R, (*Decoder).fastpathDecMapUintptrInt8R)
  254. fn(map[uintptr]int16(nil), (*Encoder).fastpathEncMapUintptrInt16R, (*Decoder).fastpathDecMapUintptrInt16R)
  255. fn(map[uintptr]int32(nil), (*Encoder).fastpathEncMapUintptrInt32R, (*Decoder).fastpathDecMapUintptrInt32R)
  256. fn(map[uintptr]int64(nil), (*Encoder).fastpathEncMapUintptrInt64R, (*Decoder).fastpathDecMapUintptrInt64R)
  257. fn(map[uintptr]float32(nil), (*Encoder).fastpathEncMapUintptrFloat32R, (*Decoder).fastpathDecMapUintptrFloat32R)
  258. fn(map[uintptr]float64(nil), (*Encoder).fastpathEncMapUintptrFloat64R, (*Decoder).fastpathDecMapUintptrFloat64R)
  259. fn(map[uintptr]bool(nil), (*Encoder).fastpathEncMapUintptrBoolR, (*Decoder).fastpathDecMapUintptrBoolR)
  260. fn(map[int]interface{}(nil), (*Encoder).fastpathEncMapIntIntfR, (*Decoder).fastpathDecMapIntIntfR)
  261. fn(map[int]string(nil), (*Encoder).fastpathEncMapIntStringR, (*Decoder).fastpathDecMapIntStringR)
  262. fn(map[int]uint(nil), (*Encoder).fastpathEncMapIntUintR, (*Decoder).fastpathDecMapIntUintR)
  263. fn(map[int]uint8(nil), (*Encoder).fastpathEncMapIntUint8R, (*Decoder).fastpathDecMapIntUint8R)
  264. fn(map[int]uint16(nil), (*Encoder).fastpathEncMapIntUint16R, (*Decoder).fastpathDecMapIntUint16R)
  265. fn(map[int]uint32(nil), (*Encoder).fastpathEncMapIntUint32R, (*Decoder).fastpathDecMapIntUint32R)
  266. fn(map[int]uint64(nil), (*Encoder).fastpathEncMapIntUint64R, (*Decoder).fastpathDecMapIntUint64R)
  267. fn(map[int]uintptr(nil), (*Encoder).fastpathEncMapIntUintptrR, (*Decoder).fastpathDecMapIntUintptrR)
  268. fn(map[int]int(nil), (*Encoder).fastpathEncMapIntIntR, (*Decoder).fastpathDecMapIntIntR)
  269. fn(map[int]int8(nil), (*Encoder).fastpathEncMapIntInt8R, (*Decoder).fastpathDecMapIntInt8R)
  270. fn(map[int]int16(nil), (*Encoder).fastpathEncMapIntInt16R, (*Decoder).fastpathDecMapIntInt16R)
  271. fn(map[int]int32(nil), (*Encoder).fastpathEncMapIntInt32R, (*Decoder).fastpathDecMapIntInt32R)
  272. fn(map[int]int64(nil), (*Encoder).fastpathEncMapIntInt64R, (*Decoder).fastpathDecMapIntInt64R)
  273. fn(map[int]float32(nil), (*Encoder).fastpathEncMapIntFloat32R, (*Decoder).fastpathDecMapIntFloat32R)
  274. fn(map[int]float64(nil), (*Encoder).fastpathEncMapIntFloat64R, (*Decoder).fastpathDecMapIntFloat64R)
  275. fn(map[int]bool(nil), (*Encoder).fastpathEncMapIntBoolR, (*Decoder).fastpathDecMapIntBoolR)
  276. fn(map[int8]interface{}(nil), (*Encoder).fastpathEncMapInt8IntfR, (*Decoder).fastpathDecMapInt8IntfR)
  277. fn(map[int8]string(nil), (*Encoder).fastpathEncMapInt8StringR, (*Decoder).fastpathDecMapInt8StringR)
  278. fn(map[int8]uint(nil), (*Encoder).fastpathEncMapInt8UintR, (*Decoder).fastpathDecMapInt8UintR)
  279. fn(map[int8]uint8(nil), (*Encoder).fastpathEncMapInt8Uint8R, (*Decoder).fastpathDecMapInt8Uint8R)
  280. fn(map[int8]uint16(nil), (*Encoder).fastpathEncMapInt8Uint16R, (*Decoder).fastpathDecMapInt8Uint16R)
  281. fn(map[int8]uint32(nil), (*Encoder).fastpathEncMapInt8Uint32R, (*Decoder).fastpathDecMapInt8Uint32R)
  282. fn(map[int8]uint64(nil), (*Encoder).fastpathEncMapInt8Uint64R, (*Decoder).fastpathDecMapInt8Uint64R)
  283. fn(map[int8]uintptr(nil), (*Encoder).fastpathEncMapInt8UintptrR, (*Decoder).fastpathDecMapInt8UintptrR)
  284. fn(map[int8]int(nil), (*Encoder).fastpathEncMapInt8IntR, (*Decoder).fastpathDecMapInt8IntR)
  285. fn(map[int8]int8(nil), (*Encoder).fastpathEncMapInt8Int8R, (*Decoder).fastpathDecMapInt8Int8R)
  286. fn(map[int8]int16(nil), (*Encoder).fastpathEncMapInt8Int16R, (*Decoder).fastpathDecMapInt8Int16R)
  287. fn(map[int8]int32(nil), (*Encoder).fastpathEncMapInt8Int32R, (*Decoder).fastpathDecMapInt8Int32R)
  288. fn(map[int8]int64(nil), (*Encoder).fastpathEncMapInt8Int64R, (*Decoder).fastpathDecMapInt8Int64R)
  289. fn(map[int8]float32(nil), (*Encoder).fastpathEncMapInt8Float32R, (*Decoder).fastpathDecMapInt8Float32R)
  290. fn(map[int8]float64(nil), (*Encoder).fastpathEncMapInt8Float64R, (*Decoder).fastpathDecMapInt8Float64R)
  291. fn(map[int8]bool(nil), (*Encoder).fastpathEncMapInt8BoolR, (*Decoder).fastpathDecMapInt8BoolR)
  292. fn(map[int16]interface{}(nil), (*Encoder).fastpathEncMapInt16IntfR, (*Decoder).fastpathDecMapInt16IntfR)
  293. fn(map[int16]string(nil), (*Encoder).fastpathEncMapInt16StringR, (*Decoder).fastpathDecMapInt16StringR)
  294. fn(map[int16]uint(nil), (*Encoder).fastpathEncMapInt16UintR, (*Decoder).fastpathDecMapInt16UintR)
  295. fn(map[int16]uint8(nil), (*Encoder).fastpathEncMapInt16Uint8R, (*Decoder).fastpathDecMapInt16Uint8R)
  296. fn(map[int16]uint16(nil), (*Encoder).fastpathEncMapInt16Uint16R, (*Decoder).fastpathDecMapInt16Uint16R)
  297. fn(map[int16]uint32(nil), (*Encoder).fastpathEncMapInt16Uint32R, (*Decoder).fastpathDecMapInt16Uint32R)
  298. fn(map[int16]uint64(nil), (*Encoder).fastpathEncMapInt16Uint64R, (*Decoder).fastpathDecMapInt16Uint64R)
  299. fn(map[int16]uintptr(nil), (*Encoder).fastpathEncMapInt16UintptrR, (*Decoder).fastpathDecMapInt16UintptrR)
  300. fn(map[int16]int(nil), (*Encoder).fastpathEncMapInt16IntR, (*Decoder).fastpathDecMapInt16IntR)
  301. fn(map[int16]int8(nil), (*Encoder).fastpathEncMapInt16Int8R, (*Decoder).fastpathDecMapInt16Int8R)
  302. fn(map[int16]int16(nil), (*Encoder).fastpathEncMapInt16Int16R, (*Decoder).fastpathDecMapInt16Int16R)
  303. fn(map[int16]int32(nil), (*Encoder).fastpathEncMapInt16Int32R, (*Decoder).fastpathDecMapInt16Int32R)
  304. fn(map[int16]int64(nil), (*Encoder).fastpathEncMapInt16Int64R, (*Decoder).fastpathDecMapInt16Int64R)
  305. fn(map[int16]float32(nil), (*Encoder).fastpathEncMapInt16Float32R, (*Decoder).fastpathDecMapInt16Float32R)
  306. fn(map[int16]float64(nil), (*Encoder).fastpathEncMapInt16Float64R, (*Decoder).fastpathDecMapInt16Float64R)
  307. fn(map[int16]bool(nil), (*Encoder).fastpathEncMapInt16BoolR, (*Decoder).fastpathDecMapInt16BoolR)
  308. fn(map[int32]interface{}(nil), (*Encoder).fastpathEncMapInt32IntfR, (*Decoder).fastpathDecMapInt32IntfR)
  309. fn(map[int32]string(nil), (*Encoder).fastpathEncMapInt32StringR, (*Decoder).fastpathDecMapInt32StringR)
  310. fn(map[int32]uint(nil), (*Encoder).fastpathEncMapInt32UintR, (*Decoder).fastpathDecMapInt32UintR)
  311. fn(map[int32]uint8(nil), (*Encoder).fastpathEncMapInt32Uint8R, (*Decoder).fastpathDecMapInt32Uint8R)
  312. fn(map[int32]uint16(nil), (*Encoder).fastpathEncMapInt32Uint16R, (*Decoder).fastpathDecMapInt32Uint16R)
  313. fn(map[int32]uint32(nil), (*Encoder).fastpathEncMapInt32Uint32R, (*Decoder).fastpathDecMapInt32Uint32R)
  314. fn(map[int32]uint64(nil), (*Encoder).fastpathEncMapInt32Uint64R, (*Decoder).fastpathDecMapInt32Uint64R)
  315. fn(map[int32]uintptr(nil), (*Encoder).fastpathEncMapInt32UintptrR, (*Decoder).fastpathDecMapInt32UintptrR)
  316. fn(map[int32]int(nil), (*Encoder).fastpathEncMapInt32IntR, (*Decoder).fastpathDecMapInt32IntR)
  317. fn(map[int32]int8(nil), (*Encoder).fastpathEncMapInt32Int8R, (*Decoder).fastpathDecMapInt32Int8R)
  318. fn(map[int32]int16(nil), (*Encoder).fastpathEncMapInt32Int16R, (*Decoder).fastpathDecMapInt32Int16R)
  319. fn(map[int32]int32(nil), (*Encoder).fastpathEncMapInt32Int32R, (*Decoder).fastpathDecMapInt32Int32R)
  320. fn(map[int32]int64(nil), (*Encoder).fastpathEncMapInt32Int64R, (*Decoder).fastpathDecMapInt32Int64R)
  321. fn(map[int32]float32(nil), (*Encoder).fastpathEncMapInt32Float32R, (*Decoder).fastpathDecMapInt32Float32R)
  322. fn(map[int32]float64(nil), (*Encoder).fastpathEncMapInt32Float64R, (*Decoder).fastpathDecMapInt32Float64R)
  323. fn(map[int32]bool(nil), (*Encoder).fastpathEncMapInt32BoolR, (*Decoder).fastpathDecMapInt32BoolR)
  324. fn(map[int64]interface{}(nil), (*Encoder).fastpathEncMapInt64IntfR, (*Decoder).fastpathDecMapInt64IntfR)
  325. fn(map[int64]string(nil), (*Encoder).fastpathEncMapInt64StringR, (*Decoder).fastpathDecMapInt64StringR)
  326. fn(map[int64]uint(nil), (*Encoder).fastpathEncMapInt64UintR, (*Decoder).fastpathDecMapInt64UintR)
  327. fn(map[int64]uint8(nil), (*Encoder).fastpathEncMapInt64Uint8R, (*Decoder).fastpathDecMapInt64Uint8R)
  328. fn(map[int64]uint16(nil), (*Encoder).fastpathEncMapInt64Uint16R, (*Decoder).fastpathDecMapInt64Uint16R)
  329. fn(map[int64]uint32(nil), (*Encoder).fastpathEncMapInt64Uint32R, (*Decoder).fastpathDecMapInt64Uint32R)
  330. fn(map[int64]uint64(nil), (*Encoder).fastpathEncMapInt64Uint64R, (*Decoder).fastpathDecMapInt64Uint64R)
  331. fn(map[int64]uintptr(nil), (*Encoder).fastpathEncMapInt64UintptrR, (*Decoder).fastpathDecMapInt64UintptrR)
  332. fn(map[int64]int(nil), (*Encoder).fastpathEncMapInt64IntR, (*Decoder).fastpathDecMapInt64IntR)
  333. fn(map[int64]int8(nil), (*Encoder).fastpathEncMapInt64Int8R, (*Decoder).fastpathDecMapInt64Int8R)
  334. fn(map[int64]int16(nil), (*Encoder).fastpathEncMapInt64Int16R, (*Decoder).fastpathDecMapInt64Int16R)
  335. fn(map[int64]int32(nil), (*Encoder).fastpathEncMapInt64Int32R, (*Decoder).fastpathDecMapInt64Int32R)
  336. fn(map[int64]int64(nil), (*Encoder).fastpathEncMapInt64Int64R, (*Decoder).fastpathDecMapInt64Int64R)
  337. fn(map[int64]float32(nil), (*Encoder).fastpathEncMapInt64Float32R, (*Decoder).fastpathDecMapInt64Float32R)
  338. fn(map[int64]float64(nil), (*Encoder).fastpathEncMapInt64Float64R, (*Decoder).fastpathDecMapInt64Float64R)
  339. fn(map[int64]bool(nil), (*Encoder).fastpathEncMapInt64BoolR, (*Decoder).fastpathDecMapInt64BoolR)
  340. fn(map[bool]interface{}(nil), (*Encoder).fastpathEncMapBoolIntfR, (*Decoder).fastpathDecMapBoolIntfR)
  341. fn(map[bool]string(nil), (*Encoder).fastpathEncMapBoolStringR, (*Decoder).fastpathDecMapBoolStringR)
  342. fn(map[bool]uint(nil), (*Encoder).fastpathEncMapBoolUintR, (*Decoder).fastpathDecMapBoolUintR)
  343. fn(map[bool]uint8(nil), (*Encoder).fastpathEncMapBoolUint8R, (*Decoder).fastpathDecMapBoolUint8R)
  344. fn(map[bool]uint16(nil), (*Encoder).fastpathEncMapBoolUint16R, (*Decoder).fastpathDecMapBoolUint16R)
  345. fn(map[bool]uint32(nil), (*Encoder).fastpathEncMapBoolUint32R, (*Decoder).fastpathDecMapBoolUint32R)
  346. fn(map[bool]uint64(nil), (*Encoder).fastpathEncMapBoolUint64R, (*Decoder).fastpathDecMapBoolUint64R)
  347. fn(map[bool]uintptr(nil), (*Encoder).fastpathEncMapBoolUintptrR, (*Decoder).fastpathDecMapBoolUintptrR)
  348. fn(map[bool]int(nil), (*Encoder).fastpathEncMapBoolIntR, (*Decoder).fastpathDecMapBoolIntR)
  349. fn(map[bool]int8(nil), (*Encoder).fastpathEncMapBoolInt8R, (*Decoder).fastpathDecMapBoolInt8R)
  350. fn(map[bool]int16(nil), (*Encoder).fastpathEncMapBoolInt16R, (*Decoder).fastpathDecMapBoolInt16R)
  351. fn(map[bool]int32(nil), (*Encoder).fastpathEncMapBoolInt32R, (*Decoder).fastpathDecMapBoolInt32R)
  352. fn(map[bool]int64(nil), (*Encoder).fastpathEncMapBoolInt64R, (*Decoder).fastpathDecMapBoolInt64R)
  353. fn(map[bool]float32(nil), (*Encoder).fastpathEncMapBoolFloat32R, (*Decoder).fastpathDecMapBoolFloat32R)
  354. fn(map[bool]float64(nil), (*Encoder).fastpathEncMapBoolFloat64R, (*Decoder).fastpathDecMapBoolFloat64R)
  355. fn(map[bool]bool(nil), (*Encoder).fastpathEncMapBoolBoolR, (*Decoder).fastpathDecMapBoolBoolR)
  356. sort.Sort(fastpathAslice(fastpathAV[:]))
  357. }
  358. // -- encode
  359. // -- -- fast path type switch
  360. func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool {
  361. switch v := iv.(type) {
  362. case []interface{}:
  363. fastpathTV.EncSliceIntfV(v, e)
  364. case *[]interface{}:
  365. fastpathTV.EncSliceIntfV(*v, e)
  366. case map[interface{}]interface{}:
  367. fastpathTV.EncMapIntfIntfV(v, e)
  368. case *map[interface{}]interface{}:
  369. fastpathTV.EncMapIntfIntfV(*v, e)
  370. case map[interface{}]string:
  371. fastpathTV.EncMapIntfStringV(v, e)
  372. case *map[interface{}]string:
  373. fastpathTV.EncMapIntfStringV(*v, e)
  374. case map[interface{}]uint:
  375. fastpathTV.EncMapIntfUintV(v, e)
  376. case *map[interface{}]uint:
  377. fastpathTV.EncMapIntfUintV(*v, e)
  378. case map[interface{}]uint8:
  379. fastpathTV.EncMapIntfUint8V(v, e)
  380. case *map[interface{}]uint8:
  381. fastpathTV.EncMapIntfUint8V(*v, e)
  382. case map[interface{}]uint16:
  383. fastpathTV.EncMapIntfUint16V(v, e)
  384. case *map[interface{}]uint16:
  385. fastpathTV.EncMapIntfUint16V(*v, e)
  386. case map[interface{}]uint32:
  387. fastpathTV.EncMapIntfUint32V(v, e)
  388. case *map[interface{}]uint32:
  389. fastpathTV.EncMapIntfUint32V(*v, e)
  390. case map[interface{}]uint64:
  391. fastpathTV.EncMapIntfUint64V(v, e)
  392. case *map[interface{}]uint64:
  393. fastpathTV.EncMapIntfUint64V(*v, e)
  394. case map[interface{}]uintptr:
  395. fastpathTV.EncMapIntfUintptrV(v, e)
  396. case *map[interface{}]uintptr:
  397. fastpathTV.EncMapIntfUintptrV(*v, e)
  398. case map[interface{}]int:
  399. fastpathTV.EncMapIntfIntV(v, e)
  400. case *map[interface{}]int:
  401. fastpathTV.EncMapIntfIntV(*v, e)
  402. case map[interface{}]int8:
  403. fastpathTV.EncMapIntfInt8V(v, e)
  404. case *map[interface{}]int8:
  405. fastpathTV.EncMapIntfInt8V(*v, e)
  406. case map[interface{}]int16:
  407. fastpathTV.EncMapIntfInt16V(v, e)
  408. case *map[interface{}]int16:
  409. fastpathTV.EncMapIntfInt16V(*v, e)
  410. case map[interface{}]int32:
  411. fastpathTV.EncMapIntfInt32V(v, e)
  412. case *map[interface{}]int32:
  413. fastpathTV.EncMapIntfInt32V(*v, e)
  414. case map[interface{}]int64:
  415. fastpathTV.EncMapIntfInt64V(v, e)
  416. case *map[interface{}]int64:
  417. fastpathTV.EncMapIntfInt64V(*v, e)
  418. case map[interface{}]float32:
  419. fastpathTV.EncMapIntfFloat32V(v, e)
  420. case *map[interface{}]float32:
  421. fastpathTV.EncMapIntfFloat32V(*v, e)
  422. case map[interface{}]float64:
  423. fastpathTV.EncMapIntfFloat64V(v, e)
  424. case *map[interface{}]float64:
  425. fastpathTV.EncMapIntfFloat64V(*v, e)
  426. case map[interface{}]bool:
  427. fastpathTV.EncMapIntfBoolV(v, e)
  428. case *map[interface{}]bool:
  429. fastpathTV.EncMapIntfBoolV(*v, e)
  430. case []string:
  431. fastpathTV.EncSliceStringV(v, e)
  432. case *[]string:
  433. fastpathTV.EncSliceStringV(*v, e)
  434. case map[string]interface{}:
  435. fastpathTV.EncMapStringIntfV(v, e)
  436. case *map[string]interface{}:
  437. fastpathTV.EncMapStringIntfV(*v, e)
  438. case map[string]string:
  439. fastpathTV.EncMapStringStringV(v, e)
  440. case *map[string]string:
  441. fastpathTV.EncMapStringStringV(*v, e)
  442. case map[string]uint:
  443. fastpathTV.EncMapStringUintV(v, e)
  444. case *map[string]uint:
  445. fastpathTV.EncMapStringUintV(*v, e)
  446. case map[string]uint8:
  447. fastpathTV.EncMapStringUint8V(v, e)
  448. case *map[string]uint8:
  449. fastpathTV.EncMapStringUint8V(*v, e)
  450. case map[string]uint16:
  451. fastpathTV.EncMapStringUint16V(v, e)
  452. case *map[string]uint16:
  453. fastpathTV.EncMapStringUint16V(*v, e)
  454. case map[string]uint32:
  455. fastpathTV.EncMapStringUint32V(v, e)
  456. case *map[string]uint32:
  457. fastpathTV.EncMapStringUint32V(*v, e)
  458. case map[string]uint64:
  459. fastpathTV.EncMapStringUint64V(v, e)
  460. case *map[string]uint64:
  461. fastpathTV.EncMapStringUint64V(*v, e)
  462. case map[string]uintptr:
  463. fastpathTV.EncMapStringUintptrV(v, e)
  464. case *map[string]uintptr:
  465. fastpathTV.EncMapStringUintptrV(*v, e)
  466. case map[string]int:
  467. fastpathTV.EncMapStringIntV(v, e)
  468. case *map[string]int:
  469. fastpathTV.EncMapStringIntV(*v, e)
  470. case map[string]int8:
  471. fastpathTV.EncMapStringInt8V(v, e)
  472. case *map[string]int8:
  473. fastpathTV.EncMapStringInt8V(*v, e)
  474. case map[string]int16:
  475. fastpathTV.EncMapStringInt16V(v, e)
  476. case *map[string]int16:
  477. fastpathTV.EncMapStringInt16V(*v, e)
  478. case map[string]int32:
  479. fastpathTV.EncMapStringInt32V(v, e)
  480. case *map[string]int32:
  481. fastpathTV.EncMapStringInt32V(*v, e)
  482. case map[string]int64:
  483. fastpathTV.EncMapStringInt64V(v, e)
  484. case *map[string]int64:
  485. fastpathTV.EncMapStringInt64V(*v, e)
  486. case map[string]float32:
  487. fastpathTV.EncMapStringFloat32V(v, e)
  488. case *map[string]float32:
  489. fastpathTV.EncMapStringFloat32V(*v, e)
  490. case map[string]float64:
  491. fastpathTV.EncMapStringFloat64V(v, e)
  492. case *map[string]float64:
  493. fastpathTV.EncMapStringFloat64V(*v, e)
  494. case map[string]bool:
  495. fastpathTV.EncMapStringBoolV(v, e)
  496. case *map[string]bool:
  497. fastpathTV.EncMapStringBoolV(*v, e)
  498. case []float32:
  499. fastpathTV.EncSliceFloat32V(v, e)
  500. case *[]float32:
  501. fastpathTV.EncSliceFloat32V(*v, e)
  502. case map[float32]interface{}:
  503. fastpathTV.EncMapFloat32IntfV(v, e)
  504. case *map[float32]interface{}:
  505. fastpathTV.EncMapFloat32IntfV(*v, e)
  506. case map[float32]string:
  507. fastpathTV.EncMapFloat32StringV(v, e)
  508. case *map[float32]string:
  509. fastpathTV.EncMapFloat32StringV(*v, e)
  510. case map[float32]uint:
  511. fastpathTV.EncMapFloat32UintV(v, e)
  512. case *map[float32]uint:
  513. fastpathTV.EncMapFloat32UintV(*v, e)
  514. case map[float32]uint8:
  515. fastpathTV.EncMapFloat32Uint8V(v, e)
  516. case *map[float32]uint8:
  517. fastpathTV.EncMapFloat32Uint8V(*v, e)
  518. case map[float32]uint16:
  519. fastpathTV.EncMapFloat32Uint16V(v, e)
  520. case *map[float32]uint16:
  521. fastpathTV.EncMapFloat32Uint16V(*v, e)
  522. case map[float32]uint32:
  523. fastpathTV.EncMapFloat32Uint32V(v, e)
  524. case *map[float32]uint32:
  525. fastpathTV.EncMapFloat32Uint32V(*v, e)
  526. case map[float32]uint64:
  527. fastpathTV.EncMapFloat32Uint64V(v, e)
  528. case *map[float32]uint64:
  529. fastpathTV.EncMapFloat32Uint64V(*v, e)
  530. case map[float32]uintptr:
  531. fastpathTV.EncMapFloat32UintptrV(v, e)
  532. case *map[float32]uintptr:
  533. fastpathTV.EncMapFloat32UintptrV(*v, e)
  534. case map[float32]int:
  535. fastpathTV.EncMapFloat32IntV(v, e)
  536. case *map[float32]int:
  537. fastpathTV.EncMapFloat32IntV(*v, e)
  538. case map[float32]int8:
  539. fastpathTV.EncMapFloat32Int8V(v, e)
  540. case *map[float32]int8:
  541. fastpathTV.EncMapFloat32Int8V(*v, e)
  542. case map[float32]int16:
  543. fastpathTV.EncMapFloat32Int16V(v, e)
  544. case *map[float32]int16:
  545. fastpathTV.EncMapFloat32Int16V(*v, e)
  546. case map[float32]int32:
  547. fastpathTV.EncMapFloat32Int32V(v, e)
  548. case *map[float32]int32:
  549. fastpathTV.EncMapFloat32Int32V(*v, e)
  550. case map[float32]int64:
  551. fastpathTV.EncMapFloat32Int64V(v, e)
  552. case *map[float32]int64:
  553. fastpathTV.EncMapFloat32Int64V(*v, e)
  554. case map[float32]float32:
  555. fastpathTV.EncMapFloat32Float32V(v, e)
  556. case *map[float32]float32:
  557. fastpathTV.EncMapFloat32Float32V(*v, e)
  558. case map[float32]float64:
  559. fastpathTV.EncMapFloat32Float64V(v, e)
  560. case *map[float32]float64:
  561. fastpathTV.EncMapFloat32Float64V(*v, e)
  562. case map[float32]bool:
  563. fastpathTV.EncMapFloat32BoolV(v, e)
  564. case *map[float32]bool:
  565. fastpathTV.EncMapFloat32BoolV(*v, e)
  566. case []float64:
  567. fastpathTV.EncSliceFloat64V(v, e)
  568. case *[]float64:
  569. fastpathTV.EncSliceFloat64V(*v, e)
  570. case map[float64]interface{}:
  571. fastpathTV.EncMapFloat64IntfV(v, e)
  572. case *map[float64]interface{}:
  573. fastpathTV.EncMapFloat64IntfV(*v, e)
  574. case map[float64]string:
  575. fastpathTV.EncMapFloat64StringV(v, e)
  576. case *map[float64]string:
  577. fastpathTV.EncMapFloat64StringV(*v, e)
  578. case map[float64]uint:
  579. fastpathTV.EncMapFloat64UintV(v, e)
  580. case *map[float64]uint:
  581. fastpathTV.EncMapFloat64UintV(*v, e)
  582. case map[float64]uint8:
  583. fastpathTV.EncMapFloat64Uint8V(v, e)
  584. case *map[float64]uint8:
  585. fastpathTV.EncMapFloat64Uint8V(*v, e)
  586. case map[float64]uint16:
  587. fastpathTV.EncMapFloat64Uint16V(v, e)
  588. case *map[float64]uint16:
  589. fastpathTV.EncMapFloat64Uint16V(*v, e)
  590. case map[float64]uint32:
  591. fastpathTV.EncMapFloat64Uint32V(v, e)
  592. case *map[float64]uint32:
  593. fastpathTV.EncMapFloat64Uint32V(*v, e)
  594. case map[float64]uint64:
  595. fastpathTV.EncMapFloat64Uint64V(v, e)
  596. case *map[float64]uint64:
  597. fastpathTV.EncMapFloat64Uint64V(*v, e)
  598. case map[float64]uintptr:
  599. fastpathTV.EncMapFloat64UintptrV(v, e)
  600. case *map[float64]uintptr:
  601. fastpathTV.EncMapFloat64UintptrV(*v, e)
  602. case map[float64]int:
  603. fastpathTV.EncMapFloat64IntV(v, e)
  604. case *map[float64]int:
  605. fastpathTV.EncMapFloat64IntV(*v, e)
  606. case map[float64]int8:
  607. fastpathTV.EncMapFloat64Int8V(v, e)
  608. case *map[float64]int8:
  609. fastpathTV.EncMapFloat64Int8V(*v, e)
  610. case map[float64]int16:
  611. fastpathTV.EncMapFloat64Int16V(v, e)
  612. case *map[float64]int16:
  613. fastpathTV.EncMapFloat64Int16V(*v, e)
  614. case map[float64]int32:
  615. fastpathTV.EncMapFloat64Int32V(v, e)
  616. case *map[float64]int32:
  617. fastpathTV.EncMapFloat64Int32V(*v, e)
  618. case map[float64]int64:
  619. fastpathTV.EncMapFloat64Int64V(v, e)
  620. case *map[float64]int64:
  621. fastpathTV.EncMapFloat64Int64V(*v, e)
  622. case map[float64]float32:
  623. fastpathTV.EncMapFloat64Float32V(v, e)
  624. case *map[float64]float32:
  625. fastpathTV.EncMapFloat64Float32V(*v, e)
  626. case map[float64]float64:
  627. fastpathTV.EncMapFloat64Float64V(v, e)
  628. case *map[float64]float64:
  629. fastpathTV.EncMapFloat64Float64V(*v, e)
  630. case map[float64]bool:
  631. fastpathTV.EncMapFloat64BoolV(v, e)
  632. case *map[float64]bool:
  633. fastpathTV.EncMapFloat64BoolV(*v, e)
  634. case []uint:
  635. fastpathTV.EncSliceUintV(v, e)
  636. case *[]uint:
  637. fastpathTV.EncSliceUintV(*v, e)
  638. case map[uint]interface{}:
  639. fastpathTV.EncMapUintIntfV(v, e)
  640. case *map[uint]interface{}:
  641. fastpathTV.EncMapUintIntfV(*v, e)
  642. case map[uint]string:
  643. fastpathTV.EncMapUintStringV(v, e)
  644. case *map[uint]string:
  645. fastpathTV.EncMapUintStringV(*v, e)
  646. case map[uint]uint:
  647. fastpathTV.EncMapUintUintV(v, e)
  648. case *map[uint]uint:
  649. fastpathTV.EncMapUintUintV(*v, e)
  650. case map[uint]uint8:
  651. fastpathTV.EncMapUintUint8V(v, e)
  652. case *map[uint]uint8:
  653. fastpathTV.EncMapUintUint8V(*v, e)
  654. case map[uint]uint16:
  655. fastpathTV.EncMapUintUint16V(v, e)
  656. case *map[uint]uint16:
  657. fastpathTV.EncMapUintUint16V(*v, e)
  658. case map[uint]uint32:
  659. fastpathTV.EncMapUintUint32V(v, e)
  660. case *map[uint]uint32:
  661. fastpathTV.EncMapUintUint32V(*v, e)
  662. case map[uint]uint64:
  663. fastpathTV.EncMapUintUint64V(v, e)
  664. case *map[uint]uint64:
  665. fastpathTV.EncMapUintUint64V(*v, e)
  666. case map[uint]uintptr:
  667. fastpathTV.EncMapUintUintptrV(v, e)
  668. case *map[uint]uintptr:
  669. fastpathTV.EncMapUintUintptrV(*v, e)
  670. case map[uint]int:
  671. fastpathTV.EncMapUintIntV(v, e)
  672. case *map[uint]int:
  673. fastpathTV.EncMapUintIntV(*v, e)
  674. case map[uint]int8:
  675. fastpathTV.EncMapUintInt8V(v, e)
  676. case *map[uint]int8:
  677. fastpathTV.EncMapUintInt8V(*v, e)
  678. case map[uint]int16:
  679. fastpathTV.EncMapUintInt16V(v, e)
  680. case *map[uint]int16:
  681. fastpathTV.EncMapUintInt16V(*v, e)
  682. case map[uint]int32:
  683. fastpathTV.EncMapUintInt32V(v, e)
  684. case *map[uint]int32:
  685. fastpathTV.EncMapUintInt32V(*v, e)
  686. case map[uint]int64:
  687. fastpathTV.EncMapUintInt64V(v, e)
  688. case *map[uint]int64:
  689. fastpathTV.EncMapUintInt64V(*v, e)
  690. case map[uint]float32:
  691. fastpathTV.EncMapUintFloat32V(v, e)
  692. case *map[uint]float32:
  693. fastpathTV.EncMapUintFloat32V(*v, e)
  694. case map[uint]float64:
  695. fastpathTV.EncMapUintFloat64V(v, e)
  696. case *map[uint]float64:
  697. fastpathTV.EncMapUintFloat64V(*v, e)
  698. case map[uint]bool:
  699. fastpathTV.EncMapUintBoolV(v, e)
  700. case *map[uint]bool:
  701. fastpathTV.EncMapUintBoolV(*v, e)
  702. case map[uint8]interface{}:
  703. fastpathTV.EncMapUint8IntfV(v, e)
  704. case *map[uint8]interface{}:
  705. fastpathTV.EncMapUint8IntfV(*v, e)
  706. case map[uint8]string:
  707. fastpathTV.EncMapUint8StringV(v, e)
  708. case *map[uint8]string:
  709. fastpathTV.EncMapUint8StringV(*v, e)
  710. case map[uint8]uint:
  711. fastpathTV.EncMapUint8UintV(v, e)
  712. case *map[uint8]uint:
  713. fastpathTV.EncMapUint8UintV(*v, e)
  714. case map[uint8]uint8:
  715. fastpathTV.EncMapUint8Uint8V(v, e)
  716. case *map[uint8]uint8:
  717. fastpathTV.EncMapUint8Uint8V(*v, e)
  718. case map[uint8]uint16:
  719. fastpathTV.EncMapUint8Uint16V(v, e)
  720. case *map[uint8]uint16:
  721. fastpathTV.EncMapUint8Uint16V(*v, e)
  722. case map[uint8]uint32:
  723. fastpathTV.EncMapUint8Uint32V(v, e)
  724. case *map[uint8]uint32:
  725. fastpathTV.EncMapUint8Uint32V(*v, e)
  726. case map[uint8]uint64:
  727. fastpathTV.EncMapUint8Uint64V(v, e)
  728. case *map[uint8]uint64:
  729. fastpathTV.EncMapUint8Uint64V(*v, e)
  730. case map[uint8]uintptr:
  731. fastpathTV.EncMapUint8UintptrV(v, e)
  732. case *map[uint8]uintptr:
  733. fastpathTV.EncMapUint8UintptrV(*v, e)
  734. case map[uint8]int:
  735. fastpathTV.EncMapUint8IntV(v, e)
  736. case *map[uint8]int:
  737. fastpathTV.EncMapUint8IntV(*v, e)
  738. case map[uint8]int8:
  739. fastpathTV.EncMapUint8Int8V(v, e)
  740. case *map[uint8]int8:
  741. fastpathTV.EncMapUint8Int8V(*v, e)
  742. case map[uint8]int16:
  743. fastpathTV.EncMapUint8Int16V(v, e)
  744. case *map[uint8]int16:
  745. fastpathTV.EncMapUint8Int16V(*v, e)
  746. case map[uint8]int32:
  747. fastpathTV.EncMapUint8Int32V(v, e)
  748. case *map[uint8]int32:
  749. fastpathTV.EncMapUint8Int32V(*v, e)
  750. case map[uint8]int64:
  751. fastpathTV.EncMapUint8Int64V(v, e)
  752. case *map[uint8]int64:
  753. fastpathTV.EncMapUint8Int64V(*v, e)
  754. case map[uint8]float32:
  755. fastpathTV.EncMapUint8Float32V(v, e)
  756. case *map[uint8]float32:
  757. fastpathTV.EncMapUint8Float32V(*v, e)
  758. case map[uint8]float64:
  759. fastpathTV.EncMapUint8Float64V(v, e)
  760. case *map[uint8]float64:
  761. fastpathTV.EncMapUint8Float64V(*v, e)
  762. case map[uint8]bool:
  763. fastpathTV.EncMapUint8BoolV(v, e)
  764. case *map[uint8]bool:
  765. fastpathTV.EncMapUint8BoolV(*v, e)
  766. case []uint16:
  767. fastpathTV.EncSliceUint16V(v, e)
  768. case *[]uint16:
  769. fastpathTV.EncSliceUint16V(*v, e)
  770. case map[uint16]interface{}:
  771. fastpathTV.EncMapUint16IntfV(v, e)
  772. case *map[uint16]interface{}:
  773. fastpathTV.EncMapUint16IntfV(*v, e)
  774. case map[uint16]string:
  775. fastpathTV.EncMapUint16StringV(v, e)
  776. case *map[uint16]string:
  777. fastpathTV.EncMapUint16StringV(*v, e)
  778. case map[uint16]uint:
  779. fastpathTV.EncMapUint16UintV(v, e)
  780. case *map[uint16]uint:
  781. fastpathTV.EncMapUint16UintV(*v, e)
  782. case map[uint16]uint8:
  783. fastpathTV.EncMapUint16Uint8V(v, e)
  784. case *map[uint16]uint8:
  785. fastpathTV.EncMapUint16Uint8V(*v, e)
  786. case map[uint16]uint16:
  787. fastpathTV.EncMapUint16Uint16V(v, e)
  788. case *map[uint16]uint16:
  789. fastpathTV.EncMapUint16Uint16V(*v, e)
  790. case map[uint16]uint32:
  791. fastpathTV.EncMapUint16Uint32V(v, e)
  792. case *map[uint16]uint32:
  793. fastpathTV.EncMapUint16Uint32V(*v, e)
  794. case map[uint16]uint64:
  795. fastpathTV.EncMapUint16Uint64V(v, e)
  796. case *map[uint16]uint64:
  797. fastpathTV.EncMapUint16Uint64V(*v, e)
  798. case map[uint16]uintptr:
  799. fastpathTV.EncMapUint16UintptrV(v, e)
  800. case *map[uint16]uintptr:
  801. fastpathTV.EncMapUint16UintptrV(*v, e)
  802. case map[uint16]int:
  803. fastpathTV.EncMapUint16IntV(v, e)
  804. case *map[uint16]int:
  805. fastpathTV.EncMapUint16IntV(*v, e)
  806. case map[uint16]int8:
  807. fastpathTV.EncMapUint16Int8V(v, e)
  808. case *map[uint16]int8:
  809. fastpathTV.EncMapUint16Int8V(*v, e)
  810. case map[uint16]int16:
  811. fastpathTV.EncMapUint16Int16V(v, e)
  812. case *map[uint16]int16:
  813. fastpathTV.EncMapUint16Int16V(*v, e)
  814. case map[uint16]int32:
  815. fastpathTV.EncMapUint16Int32V(v, e)
  816. case *map[uint16]int32:
  817. fastpathTV.EncMapUint16Int32V(*v, e)
  818. case map[uint16]int64:
  819. fastpathTV.EncMapUint16Int64V(v, e)
  820. case *map[uint16]int64:
  821. fastpathTV.EncMapUint16Int64V(*v, e)
  822. case map[uint16]float32:
  823. fastpathTV.EncMapUint16Float32V(v, e)
  824. case *map[uint16]float32:
  825. fastpathTV.EncMapUint16Float32V(*v, e)
  826. case map[uint16]float64:
  827. fastpathTV.EncMapUint16Float64V(v, e)
  828. case *map[uint16]float64:
  829. fastpathTV.EncMapUint16Float64V(*v, e)
  830. case map[uint16]bool:
  831. fastpathTV.EncMapUint16BoolV(v, e)
  832. case *map[uint16]bool:
  833. fastpathTV.EncMapUint16BoolV(*v, e)
  834. case []uint32:
  835. fastpathTV.EncSliceUint32V(v, e)
  836. case *[]uint32:
  837. fastpathTV.EncSliceUint32V(*v, e)
  838. case map[uint32]interface{}:
  839. fastpathTV.EncMapUint32IntfV(v, e)
  840. case *map[uint32]interface{}:
  841. fastpathTV.EncMapUint32IntfV(*v, e)
  842. case map[uint32]string:
  843. fastpathTV.EncMapUint32StringV(v, e)
  844. case *map[uint32]string:
  845. fastpathTV.EncMapUint32StringV(*v, e)
  846. case map[uint32]uint:
  847. fastpathTV.EncMapUint32UintV(v, e)
  848. case *map[uint32]uint:
  849. fastpathTV.EncMapUint32UintV(*v, e)
  850. case map[uint32]uint8:
  851. fastpathTV.EncMapUint32Uint8V(v, e)
  852. case *map[uint32]uint8:
  853. fastpathTV.EncMapUint32Uint8V(*v, e)
  854. case map[uint32]uint16:
  855. fastpathTV.EncMapUint32Uint16V(v, e)
  856. case *map[uint32]uint16:
  857. fastpathTV.EncMapUint32Uint16V(*v, e)
  858. case map[uint32]uint32:
  859. fastpathTV.EncMapUint32Uint32V(v, e)
  860. case *map[uint32]uint32:
  861. fastpathTV.EncMapUint32Uint32V(*v, e)
  862. case map[uint32]uint64:
  863. fastpathTV.EncMapUint32Uint64V(v, e)
  864. case *map[uint32]uint64:
  865. fastpathTV.EncMapUint32Uint64V(*v, e)
  866. case map[uint32]uintptr:
  867. fastpathTV.EncMapUint32UintptrV(v, e)
  868. case *map[uint32]uintptr:
  869. fastpathTV.EncMapUint32UintptrV(*v, e)
  870. case map[uint32]int:
  871. fastpathTV.EncMapUint32IntV(v, e)
  872. case *map[uint32]int:
  873. fastpathTV.EncMapUint32IntV(*v, e)
  874. case map[uint32]int8:
  875. fastpathTV.EncMapUint32Int8V(v, e)
  876. case *map[uint32]int8:
  877. fastpathTV.EncMapUint32Int8V(*v, e)
  878. case map[uint32]int16:
  879. fastpathTV.EncMapUint32Int16V(v, e)
  880. case *map[uint32]int16:
  881. fastpathTV.EncMapUint32Int16V(*v, e)
  882. case map[uint32]int32:
  883. fastpathTV.EncMapUint32Int32V(v, e)
  884. case *map[uint32]int32:
  885. fastpathTV.EncMapUint32Int32V(*v, e)
  886. case map[uint32]int64:
  887. fastpathTV.EncMapUint32Int64V(v, e)
  888. case *map[uint32]int64:
  889. fastpathTV.EncMapUint32Int64V(*v, e)
  890. case map[uint32]float32:
  891. fastpathTV.EncMapUint32Float32V(v, e)
  892. case *map[uint32]float32:
  893. fastpathTV.EncMapUint32Float32V(*v, e)
  894. case map[uint32]float64:
  895. fastpathTV.EncMapUint32Float64V(v, e)
  896. case *map[uint32]float64:
  897. fastpathTV.EncMapUint32Float64V(*v, e)
  898. case map[uint32]bool:
  899. fastpathTV.EncMapUint32BoolV(v, e)
  900. case *map[uint32]bool:
  901. fastpathTV.EncMapUint32BoolV(*v, e)
  902. case []uint64:
  903. fastpathTV.EncSliceUint64V(v, e)
  904. case *[]uint64:
  905. fastpathTV.EncSliceUint64V(*v, e)
  906. case map[uint64]interface{}:
  907. fastpathTV.EncMapUint64IntfV(v, e)
  908. case *map[uint64]interface{}:
  909. fastpathTV.EncMapUint64IntfV(*v, e)
  910. case map[uint64]string:
  911. fastpathTV.EncMapUint64StringV(v, e)
  912. case *map[uint64]string:
  913. fastpathTV.EncMapUint64StringV(*v, e)
  914. case map[uint64]uint:
  915. fastpathTV.EncMapUint64UintV(v, e)
  916. case *map[uint64]uint:
  917. fastpathTV.EncMapUint64UintV(*v, e)
  918. case map[uint64]uint8:
  919. fastpathTV.EncMapUint64Uint8V(v, e)
  920. case *map[uint64]uint8:
  921. fastpathTV.EncMapUint64Uint8V(*v, e)
  922. case map[uint64]uint16:
  923. fastpathTV.EncMapUint64Uint16V(v, e)
  924. case *map[uint64]uint16:
  925. fastpathTV.EncMapUint64Uint16V(*v, e)
  926. case map[uint64]uint32:
  927. fastpathTV.EncMapUint64Uint32V(v, e)
  928. case *map[uint64]uint32:
  929. fastpathTV.EncMapUint64Uint32V(*v, e)
  930. case map[uint64]uint64:
  931. fastpathTV.EncMapUint64Uint64V(v, e)
  932. case *map[uint64]uint64:
  933. fastpathTV.EncMapUint64Uint64V(*v, e)
  934. case map[uint64]uintptr:
  935. fastpathTV.EncMapUint64UintptrV(v, e)
  936. case *map[uint64]uintptr:
  937. fastpathTV.EncMapUint64UintptrV(*v, e)
  938. case map[uint64]int:
  939. fastpathTV.EncMapUint64IntV(v, e)
  940. case *map[uint64]int:
  941. fastpathTV.EncMapUint64IntV(*v, e)
  942. case map[uint64]int8:
  943. fastpathTV.EncMapUint64Int8V(v, e)
  944. case *map[uint64]int8:
  945. fastpathTV.EncMapUint64Int8V(*v, e)
  946. case map[uint64]int16:
  947. fastpathTV.EncMapUint64Int16V(v, e)
  948. case *map[uint64]int16:
  949. fastpathTV.EncMapUint64Int16V(*v, e)
  950. case map[uint64]int32:
  951. fastpathTV.EncMapUint64Int32V(v, e)
  952. case *map[uint64]int32:
  953. fastpathTV.EncMapUint64Int32V(*v, e)
  954. case map[uint64]int64:
  955. fastpathTV.EncMapUint64Int64V(v, e)
  956. case *map[uint64]int64:
  957. fastpathTV.EncMapUint64Int64V(*v, e)
  958. case map[uint64]float32:
  959. fastpathTV.EncMapUint64Float32V(v, e)
  960. case *map[uint64]float32:
  961. fastpathTV.EncMapUint64Float32V(*v, e)
  962. case map[uint64]float64:
  963. fastpathTV.EncMapUint64Float64V(v, e)
  964. case *map[uint64]float64:
  965. fastpathTV.EncMapUint64Float64V(*v, e)
  966. case map[uint64]bool:
  967. fastpathTV.EncMapUint64BoolV(v, e)
  968. case *map[uint64]bool:
  969. fastpathTV.EncMapUint64BoolV(*v, e)
  970. case []uintptr:
  971. fastpathTV.EncSliceUintptrV(v, e)
  972. case *[]uintptr:
  973. fastpathTV.EncSliceUintptrV(*v, e)
  974. case map[uintptr]interface{}:
  975. fastpathTV.EncMapUintptrIntfV(v, e)
  976. case *map[uintptr]interface{}:
  977. fastpathTV.EncMapUintptrIntfV(*v, e)
  978. case map[uintptr]string:
  979. fastpathTV.EncMapUintptrStringV(v, e)
  980. case *map[uintptr]string:
  981. fastpathTV.EncMapUintptrStringV(*v, e)
  982. case map[uintptr]uint:
  983. fastpathTV.EncMapUintptrUintV(v, e)
  984. case *map[uintptr]uint:
  985. fastpathTV.EncMapUintptrUintV(*v, e)
  986. case map[uintptr]uint8:
  987. fastpathTV.EncMapUintptrUint8V(v, e)
  988. case *map[uintptr]uint8:
  989. fastpathTV.EncMapUintptrUint8V(*v, e)
  990. case map[uintptr]uint16:
  991. fastpathTV.EncMapUintptrUint16V(v, e)
  992. case *map[uintptr]uint16:
  993. fastpathTV.EncMapUintptrUint16V(*v, e)
  994. case map[uintptr]uint32:
  995. fastpathTV.EncMapUintptrUint32V(v, e)
  996. case *map[uintptr]uint32:
  997. fastpathTV.EncMapUintptrUint32V(*v, e)
  998. case map[uintptr]uint64:
  999. fastpathTV.EncMapUintptrUint64V(v, e)
  1000. case *map[uintptr]uint64:
  1001. fastpathTV.EncMapUintptrUint64V(*v, e)
  1002. case map[uintptr]uintptr:
  1003. fastpathTV.EncMapUintptrUintptrV(v, e)
  1004. case *map[uintptr]uintptr:
  1005. fastpathTV.EncMapUintptrUintptrV(*v, e)
  1006. case map[uintptr]int:
  1007. fastpathTV.EncMapUintptrIntV(v, e)
  1008. case *map[uintptr]int:
  1009. fastpathTV.EncMapUintptrIntV(*v, e)
  1010. case map[uintptr]int8:
  1011. fastpathTV.EncMapUintptrInt8V(v, e)
  1012. case *map[uintptr]int8:
  1013. fastpathTV.EncMapUintptrInt8V(*v, e)
  1014. case map[uintptr]int16:
  1015. fastpathTV.EncMapUintptrInt16V(v, e)
  1016. case *map[uintptr]int16:
  1017. fastpathTV.EncMapUintptrInt16V(*v, e)
  1018. case map[uintptr]int32:
  1019. fastpathTV.EncMapUintptrInt32V(v, e)
  1020. case *map[uintptr]int32:
  1021. fastpathTV.EncMapUintptrInt32V(*v, e)
  1022. case map[uintptr]int64:
  1023. fastpathTV.EncMapUintptrInt64V(v, e)
  1024. case *map[uintptr]int64:
  1025. fastpathTV.EncMapUintptrInt64V(*v, e)
  1026. case map[uintptr]float32:
  1027. fastpathTV.EncMapUintptrFloat32V(v, e)
  1028. case *map[uintptr]float32:
  1029. fastpathTV.EncMapUintptrFloat32V(*v, e)
  1030. case map[uintptr]float64:
  1031. fastpathTV.EncMapUintptrFloat64V(v, e)
  1032. case *map[uintptr]float64:
  1033. fastpathTV.EncMapUintptrFloat64V(*v, e)
  1034. case map[uintptr]bool:
  1035. fastpathTV.EncMapUintptrBoolV(v, e)
  1036. case *map[uintptr]bool:
  1037. fastpathTV.EncMapUintptrBoolV(*v, e)
  1038. case []int:
  1039. fastpathTV.EncSliceIntV(v, e)
  1040. case *[]int:
  1041. fastpathTV.EncSliceIntV(*v, e)
  1042. case map[int]interface{}:
  1043. fastpathTV.EncMapIntIntfV(v, e)
  1044. case *map[int]interface{}:
  1045. fastpathTV.EncMapIntIntfV(*v, e)
  1046. case map[int]string:
  1047. fastpathTV.EncMapIntStringV(v, e)
  1048. case *map[int]string:
  1049. fastpathTV.EncMapIntStringV(*v, e)
  1050. case map[int]uint:
  1051. fastpathTV.EncMapIntUintV(v, e)
  1052. case *map[int]uint:
  1053. fastpathTV.EncMapIntUintV(*v, e)
  1054. case map[int]uint8:
  1055. fastpathTV.EncMapIntUint8V(v, e)
  1056. case *map[int]uint8:
  1057. fastpathTV.EncMapIntUint8V(*v, e)
  1058. case map[int]uint16:
  1059. fastpathTV.EncMapIntUint16V(v, e)
  1060. case *map[int]uint16:
  1061. fastpathTV.EncMapIntUint16V(*v, e)
  1062. case map[int]uint32:
  1063. fastpathTV.EncMapIntUint32V(v, e)
  1064. case *map[int]uint32:
  1065. fastpathTV.EncMapIntUint32V(*v, e)
  1066. case map[int]uint64:
  1067. fastpathTV.EncMapIntUint64V(v, e)
  1068. case *map[int]uint64:
  1069. fastpathTV.EncMapIntUint64V(*v, e)
  1070. case map[int]uintptr:
  1071. fastpathTV.EncMapIntUintptrV(v, e)
  1072. case *map[int]uintptr:
  1073. fastpathTV.EncMapIntUintptrV(*v, e)
  1074. case map[int]int:
  1075. fastpathTV.EncMapIntIntV(v, e)
  1076. case *map[int]int:
  1077. fastpathTV.EncMapIntIntV(*v, e)
  1078. case map[int]int8:
  1079. fastpathTV.EncMapIntInt8V(v, e)
  1080. case *map[int]int8:
  1081. fastpathTV.EncMapIntInt8V(*v, e)
  1082. case map[int]int16:
  1083. fastpathTV.EncMapIntInt16V(v, e)
  1084. case *map[int]int16:
  1085. fastpathTV.EncMapIntInt16V(*v, e)
  1086. case map[int]int32:
  1087. fastpathTV.EncMapIntInt32V(v, e)
  1088. case *map[int]int32:
  1089. fastpathTV.EncMapIntInt32V(*v, e)
  1090. case map[int]int64:
  1091. fastpathTV.EncMapIntInt64V(v, e)
  1092. case *map[int]int64:
  1093. fastpathTV.EncMapIntInt64V(*v, e)
  1094. case map[int]float32:
  1095. fastpathTV.EncMapIntFloat32V(v, e)
  1096. case *map[int]float32:
  1097. fastpathTV.EncMapIntFloat32V(*v, e)
  1098. case map[int]float64:
  1099. fastpathTV.EncMapIntFloat64V(v, e)
  1100. case *map[int]float64:
  1101. fastpathTV.EncMapIntFloat64V(*v, e)
  1102. case map[int]bool:
  1103. fastpathTV.EncMapIntBoolV(v, e)
  1104. case *map[int]bool:
  1105. fastpathTV.EncMapIntBoolV(*v, e)
  1106. case []int8:
  1107. fastpathTV.EncSliceInt8V(v, e)
  1108. case *[]int8:
  1109. fastpathTV.EncSliceInt8V(*v, e)
  1110. case map[int8]interface{}:
  1111. fastpathTV.EncMapInt8IntfV(v, e)
  1112. case *map[int8]interface{}:
  1113. fastpathTV.EncMapInt8IntfV(*v, e)
  1114. case map[int8]string:
  1115. fastpathTV.EncMapInt8StringV(v, e)
  1116. case *map[int8]string:
  1117. fastpathTV.EncMapInt8StringV(*v, e)
  1118. case map[int8]uint:
  1119. fastpathTV.EncMapInt8UintV(v, e)
  1120. case *map[int8]uint:
  1121. fastpathTV.EncMapInt8UintV(*v, e)
  1122. case map[int8]uint8:
  1123. fastpathTV.EncMapInt8Uint8V(v, e)
  1124. case *map[int8]uint8:
  1125. fastpathTV.EncMapInt8Uint8V(*v, e)
  1126. case map[int8]uint16:
  1127. fastpathTV.EncMapInt8Uint16V(v, e)
  1128. case *map[int8]uint16:
  1129. fastpathTV.EncMapInt8Uint16V(*v, e)
  1130. case map[int8]uint32:
  1131. fastpathTV.EncMapInt8Uint32V(v, e)
  1132. case *map[int8]uint32:
  1133. fastpathTV.EncMapInt8Uint32V(*v, e)
  1134. case map[int8]uint64:
  1135. fastpathTV.EncMapInt8Uint64V(v, e)
  1136. case *map[int8]uint64:
  1137. fastpathTV.EncMapInt8Uint64V(*v, e)
  1138. case map[int8]uintptr:
  1139. fastpathTV.EncMapInt8UintptrV(v, e)
  1140. case *map[int8]uintptr:
  1141. fastpathTV.EncMapInt8UintptrV(*v, e)
  1142. case map[int8]int:
  1143. fastpathTV.EncMapInt8IntV(v, e)
  1144. case *map[int8]int:
  1145. fastpathTV.EncMapInt8IntV(*v, e)
  1146. case map[int8]int8:
  1147. fastpathTV.EncMapInt8Int8V(v, e)
  1148. case *map[int8]int8:
  1149. fastpathTV.EncMapInt8Int8V(*v, e)
  1150. case map[int8]int16:
  1151. fastpathTV.EncMapInt8Int16V(v, e)
  1152. case *map[int8]int16:
  1153. fastpathTV.EncMapInt8Int16V(*v, e)
  1154. case map[int8]int32:
  1155. fastpathTV.EncMapInt8Int32V(v, e)
  1156. case *map[int8]int32:
  1157. fastpathTV.EncMapInt8Int32V(*v, e)
  1158. case map[int8]int64:
  1159. fastpathTV.EncMapInt8Int64V(v, e)
  1160. case *map[int8]int64:
  1161. fastpathTV.EncMapInt8Int64V(*v, e)
  1162. case map[int8]float32:
  1163. fastpathTV.EncMapInt8Float32V(v, e)
  1164. case *map[int8]float32:
  1165. fastpathTV.EncMapInt8Float32V(*v, e)
  1166. case map[int8]float64:
  1167. fastpathTV.EncMapInt8Float64V(v, e)
  1168. case *map[int8]float64:
  1169. fastpathTV.EncMapInt8Float64V(*v, e)
  1170. case map[int8]bool:
  1171. fastpathTV.EncMapInt8BoolV(v, e)
  1172. case *map[int8]bool:
  1173. fastpathTV.EncMapInt8BoolV(*v, e)
  1174. case []int16:
  1175. fastpathTV.EncSliceInt16V(v, e)
  1176. case *[]int16:
  1177. fastpathTV.EncSliceInt16V(*v, e)
  1178. case map[int16]interface{}:
  1179. fastpathTV.EncMapInt16IntfV(v, e)
  1180. case *map[int16]interface{}:
  1181. fastpathTV.EncMapInt16IntfV(*v, e)
  1182. case map[int16]string:
  1183. fastpathTV.EncMapInt16StringV(v, e)
  1184. case *map[int16]string:
  1185. fastpathTV.EncMapInt16StringV(*v, e)
  1186. case map[int16]uint:
  1187. fastpathTV.EncMapInt16UintV(v, e)
  1188. case *map[int16]uint:
  1189. fastpathTV.EncMapInt16UintV(*v, e)
  1190. case map[int16]uint8:
  1191. fastpathTV.EncMapInt16Uint8V(v, e)
  1192. case *map[int16]uint8:
  1193. fastpathTV.EncMapInt16Uint8V(*v, e)
  1194. case map[int16]uint16:
  1195. fastpathTV.EncMapInt16Uint16V(v, e)
  1196. case *map[int16]uint16:
  1197. fastpathTV.EncMapInt16Uint16V(*v, e)
  1198. case map[int16]uint32:
  1199. fastpathTV.EncMapInt16Uint32V(v, e)
  1200. case *map[int16]uint32:
  1201. fastpathTV.EncMapInt16Uint32V(*v, e)
  1202. case map[int16]uint64:
  1203. fastpathTV.EncMapInt16Uint64V(v, e)
  1204. case *map[int16]uint64:
  1205. fastpathTV.EncMapInt16Uint64V(*v, e)
  1206. case map[int16]uintptr:
  1207. fastpathTV.EncMapInt16UintptrV(v, e)
  1208. case *map[int16]uintptr:
  1209. fastpathTV.EncMapInt16UintptrV(*v, e)
  1210. case map[int16]int:
  1211. fastpathTV.EncMapInt16IntV(v, e)
  1212. case *map[int16]int:
  1213. fastpathTV.EncMapInt16IntV(*v, e)
  1214. case map[int16]int8:
  1215. fastpathTV.EncMapInt16Int8V(v, e)
  1216. case *map[int16]int8:
  1217. fastpathTV.EncMapInt16Int8V(*v, e)
  1218. case map[int16]int16:
  1219. fastpathTV.EncMapInt16Int16V(v, e)
  1220. case *map[int16]int16:
  1221. fastpathTV.EncMapInt16Int16V(*v, e)
  1222. case map[int16]int32:
  1223. fastpathTV.EncMapInt16Int32V(v, e)
  1224. case *map[int16]int32:
  1225. fastpathTV.EncMapInt16Int32V(*v, e)
  1226. case map[int16]int64:
  1227. fastpathTV.EncMapInt16Int64V(v, e)
  1228. case *map[int16]int64:
  1229. fastpathTV.EncMapInt16Int64V(*v, e)
  1230. case map[int16]float32:
  1231. fastpathTV.EncMapInt16Float32V(v, e)
  1232. case *map[int16]float32:
  1233. fastpathTV.EncMapInt16Float32V(*v, e)
  1234. case map[int16]float64:
  1235. fastpathTV.EncMapInt16Float64V(v, e)
  1236. case *map[int16]float64:
  1237. fastpathTV.EncMapInt16Float64V(*v, e)
  1238. case map[int16]bool:
  1239. fastpathTV.EncMapInt16BoolV(v, e)
  1240. case *map[int16]bool:
  1241. fastpathTV.EncMapInt16BoolV(*v, e)
  1242. case []int32:
  1243. fastpathTV.EncSliceInt32V(v, e)
  1244. case *[]int32:
  1245. fastpathTV.EncSliceInt32V(*v, e)
  1246. case map[int32]interface{}:
  1247. fastpathTV.EncMapInt32IntfV(v, e)
  1248. case *map[int32]interface{}:
  1249. fastpathTV.EncMapInt32IntfV(*v, e)
  1250. case map[int32]string:
  1251. fastpathTV.EncMapInt32StringV(v, e)
  1252. case *map[int32]string:
  1253. fastpathTV.EncMapInt32StringV(*v, e)
  1254. case map[int32]uint:
  1255. fastpathTV.EncMapInt32UintV(v, e)
  1256. case *map[int32]uint:
  1257. fastpathTV.EncMapInt32UintV(*v, e)
  1258. case map[int32]uint8:
  1259. fastpathTV.EncMapInt32Uint8V(v, e)
  1260. case *map[int32]uint8:
  1261. fastpathTV.EncMapInt32Uint8V(*v, e)
  1262. case map[int32]uint16:
  1263. fastpathTV.EncMapInt32Uint16V(v, e)
  1264. case *map[int32]uint16:
  1265. fastpathTV.EncMapInt32Uint16V(*v, e)
  1266. case map[int32]uint32:
  1267. fastpathTV.EncMapInt32Uint32V(v, e)
  1268. case *map[int32]uint32:
  1269. fastpathTV.EncMapInt32Uint32V(*v, e)
  1270. case map[int32]uint64:
  1271. fastpathTV.EncMapInt32Uint64V(v, e)
  1272. case *map[int32]uint64:
  1273. fastpathTV.EncMapInt32Uint64V(*v, e)
  1274. case map[int32]uintptr:
  1275. fastpathTV.EncMapInt32UintptrV(v, e)
  1276. case *map[int32]uintptr:
  1277. fastpathTV.EncMapInt32UintptrV(*v, e)
  1278. case map[int32]int:
  1279. fastpathTV.EncMapInt32IntV(v, e)
  1280. case *map[int32]int:
  1281. fastpathTV.EncMapInt32IntV(*v, e)
  1282. case map[int32]int8:
  1283. fastpathTV.EncMapInt32Int8V(v, e)
  1284. case *map[int32]int8:
  1285. fastpathTV.EncMapInt32Int8V(*v, e)
  1286. case map[int32]int16:
  1287. fastpathTV.EncMapInt32Int16V(v, e)
  1288. case *map[int32]int16:
  1289. fastpathTV.EncMapInt32Int16V(*v, e)
  1290. case map[int32]int32:
  1291. fastpathTV.EncMapInt32Int32V(v, e)
  1292. case *map[int32]int32:
  1293. fastpathTV.EncMapInt32Int32V(*v, e)
  1294. case map[int32]int64:
  1295. fastpathTV.EncMapInt32Int64V(v, e)
  1296. case *map[int32]int64:
  1297. fastpathTV.EncMapInt32Int64V(*v, e)
  1298. case map[int32]float32:
  1299. fastpathTV.EncMapInt32Float32V(v, e)
  1300. case *map[int32]float32:
  1301. fastpathTV.EncMapInt32Float32V(*v, e)
  1302. case map[int32]float64:
  1303. fastpathTV.EncMapInt32Float64V(v, e)
  1304. case *map[int32]float64:
  1305. fastpathTV.EncMapInt32Float64V(*v, e)
  1306. case map[int32]bool:
  1307. fastpathTV.EncMapInt32BoolV(v, e)
  1308. case *map[int32]bool:
  1309. fastpathTV.EncMapInt32BoolV(*v, e)
  1310. case []int64:
  1311. fastpathTV.EncSliceInt64V(v, e)
  1312. case *[]int64:
  1313. fastpathTV.EncSliceInt64V(*v, e)
  1314. case map[int64]interface{}:
  1315. fastpathTV.EncMapInt64IntfV(v, e)
  1316. case *map[int64]interface{}:
  1317. fastpathTV.EncMapInt64IntfV(*v, e)
  1318. case map[int64]string:
  1319. fastpathTV.EncMapInt64StringV(v, e)
  1320. case *map[int64]string:
  1321. fastpathTV.EncMapInt64StringV(*v, e)
  1322. case map[int64]uint:
  1323. fastpathTV.EncMapInt64UintV(v, e)
  1324. case *map[int64]uint:
  1325. fastpathTV.EncMapInt64UintV(*v, e)
  1326. case map[int64]uint8:
  1327. fastpathTV.EncMapInt64Uint8V(v, e)
  1328. case *map[int64]uint8:
  1329. fastpathTV.EncMapInt64Uint8V(*v, e)
  1330. case map[int64]uint16:
  1331. fastpathTV.EncMapInt64Uint16V(v, e)
  1332. case *map[int64]uint16:
  1333. fastpathTV.EncMapInt64Uint16V(*v, e)
  1334. case map[int64]uint32:
  1335. fastpathTV.EncMapInt64Uint32V(v, e)
  1336. case *map[int64]uint32:
  1337. fastpathTV.EncMapInt64Uint32V(*v, e)
  1338. case map[int64]uint64:
  1339. fastpathTV.EncMapInt64Uint64V(v, e)
  1340. case *map[int64]uint64:
  1341. fastpathTV.EncMapInt64Uint64V(*v, e)
  1342. case map[int64]uintptr:
  1343. fastpathTV.EncMapInt64UintptrV(v, e)
  1344. case *map[int64]uintptr:
  1345. fastpathTV.EncMapInt64UintptrV(*v, e)
  1346. case map[int64]int:
  1347. fastpathTV.EncMapInt64IntV(v, e)
  1348. case *map[int64]int:
  1349. fastpathTV.EncMapInt64IntV(*v, e)
  1350. case map[int64]int8:
  1351. fastpathTV.EncMapInt64Int8V(v, e)
  1352. case *map[int64]int8:
  1353. fastpathTV.EncMapInt64Int8V(*v, e)
  1354. case map[int64]int16:
  1355. fastpathTV.EncMapInt64Int16V(v, e)
  1356. case *map[int64]int16:
  1357. fastpathTV.EncMapInt64Int16V(*v, e)
  1358. case map[int64]int32:
  1359. fastpathTV.EncMapInt64Int32V(v, e)
  1360. case *map[int64]int32:
  1361. fastpathTV.EncMapInt64Int32V(*v, e)
  1362. case map[int64]int64:
  1363. fastpathTV.EncMapInt64Int64V(v, e)
  1364. case *map[int64]int64:
  1365. fastpathTV.EncMapInt64Int64V(*v, e)
  1366. case map[int64]float32:
  1367. fastpathTV.EncMapInt64Float32V(v, e)
  1368. case *map[int64]float32:
  1369. fastpathTV.EncMapInt64Float32V(*v, e)
  1370. case map[int64]float64:
  1371. fastpathTV.EncMapInt64Float64V(v, e)
  1372. case *map[int64]float64:
  1373. fastpathTV.EncMapInt64Float64V(*v, e)
  1374. case map[int64]bool:
  1375. fastpathTV.EncMapInt64BoolV(v, e)
  1376. case *map[int64]bool:
  1377. fastpathTV.EncMapInt64BoolV(*v, e)
  1378. case []bool:
  1379. fastpathTV.EncSliceBoolV(v, e)
  1380. case *[]bool:
  1381. fastpathTV.EncSliceBoolV(*v, e)
  1382. case map[bool]interface{}:
  1383. fastpathTV.EncMapBoolIntfV(v, e)
  1384. case *map[bool]interface{}:
  1385. fastpathTV.EncMapBoolIntfV(*v, e)
  1386. case map[bool]string:
  1387. fastpathTV.EncMapBoolStringV(v, e)
  1388. case *map[bool]string:
  1389. fastpathTV.EncMapBoolStringV(*v, e)
  1390. case map[bool]uint:
  1391. fastpathTV.EncMapBoolUintV(v, e)
  1392. case *map[bool]uint:
  1393. fastpathTV.EncMapBoolUintV(*v, e)
  1394. case map[bool]uint8:
  1395. fastpathTV.EncMapBoolUint8V(v, e)
  1396. case *map[bool]uint8:
  1397. fastpathTV.EncMapBoolUint8V(*v, e)
  1398. case map[bool]uint16:
  1399. fastpathTV.EncMapBoolUint16V(v, e)
  1400. case *map[bool]uint16:
  1401. fastpathTV.EncMapBoolUint16V(*v, e)
  1402. case map[bool]uint32:
  1403. fastpathTV.EncMapBoolUint32V(v, e)
  1404. case *map[bool]uint32:
  1405. fastpathTV.EncMapBoolUint32V(*v, e)
  1406. case map[bool]uint64:
  1407. fastpathTV.EncMapBoolUint64V(v, e)
  1408. case *map[bool]uint64:
  1409. fastpathTV.EncMapBoolUint64V(*v, e)
  1410. case map[bool]uintptr:
  1411. fastpathTV.EncMapBoolUintptrV(v, e)
  1412. case *map[bool]uintptr:
  1413. fastpathTV.EncMapBoolUintptrV(*v, e)
  1414. case map[bool]int:
  1415. fastpathTV.EncMapBoolIntV(v, e)
  1416. case *map[bool]int:
  1417. fastpathTV.EncMapBoolIntV(*v, e)
  1418. case map[bool]int8:
  1419. fastpathTV.EncMapBoolInt8V(v, e)
  1420. case *map[bool]int8:
  1421. fastpathTV.EncMapBoolInt8V(*v, e)
  1422. case map[bool]int16:
  1423. fastpathTV.EncMapBoolInt16V(v, e)
  1424. case *map[bool]int16:
  1425. fastpathTV.EncMapBoolInt16V(*v, e)
  1426. case map[bool]int32:
  1427. fastpathTV.EncMapBoolInt32V(v, e)
  1428. case *map[bool]int32:
  1429. fastpathTV.EncMapBoolInt32V(*v, e)
  1430. case map[bool]int64:
  1431. fastpathTV.EncMapBoolInt64V(v, e)
  1432. case *map[bool]int64:
  1433. fastpathTV.EncMapBoolInt64V(*v, e)
  1434. case map[bool]float32:
  1435. fastpathTV.EncMapBoolFloat32V(v, e)
  1436. case *map[bool]float32:
  1437. fastpathTV.EncMapBoolFloat32V(*v, e)
  1438. case map[bool]float64:
  1439. fastpathTV.EncMapBoolFloat64V(v, e)
  1440. case *map[bool]float64:
  1441. fastpathTV.EncMapBoolFloat64V(*v, e)
  1442. case map[bool]bool:
  1443. fastpathTV.EncMapBoolBoolV(v, e)
  1444. case *map[bool]bool:
  1445. fastpathTV.EncMapBoolBoolV(*v, e)
  1446. default:
  1447. _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release)
  1448. return false
  1449. }
  1450. return true
  1451. }
  1452. // -- -- fast path functions
  1453. func (e *Encoder) fastpathEncSliceIntfR(f *codecFnInfo, rv reflect.Value) {
  1454. if f.ti.mbs {
  1455. fastpathTV.EncAsMapSliceIntfV(rv2i(rv).([]interface{}), e)
  1456. } else {
  1457. fastpathTV.EncSliceIntfV(rv2i(rv).([]interface{}), e)
  1458. }
  1459. }
  1460. func (_ fastpathT) EncSliceIntfV(v []interface{}, e *Encoder) {
  1461. if v == nil {
  1462. e.e.EncodeNil()
  1463. return
  1464. }
  1465. ee, esep := e.e, e.hh.hasElemSeparators()
  1466. ee.WriteArrayStart(len(v))
  1467. for _, v2 := range v {
  1468. if esep {
  1469. ee.WriteArrayElem()
  1470. }
  1471. e.encode(v2)
  1472. }
  1473. ee.WriteArrayEnd()
  1474. }
  1475. func (_ fastpathT) EncAsMapSliceIntfV(v []interface{}, e *Encoder) {
  1476. ee, esep := e.e, e.hh.hasElemSeparators()
  1477. if len(v)%2 == 1 {
  1478. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  1479. return
  1480. }
  1481. ee.WriteMapStart(len(v) / 2)
  1482. for j, v2 := range v {
  1483. if esep {
  1484. if j%2 == 0 {
  1485. ee.WriteMapElemKey()
  1486. } else {
  1487. ee.WriteMapElemValue()
  1488. }
  1489. }
  1490. e.encode(v2)
  1491. }
  1492. ee.WriteMapEnd()
  1493. }
  1494. func (e *Encoder) fastpathEncSliceStringR(f *codecFnInfo, rv reflect.Value) {
  1495. if f.ti.mbs {
  1496. fastpathTV.EncAsMapSliceStringV(rv2i(rv).([]string), e)
  1497. } else {
  1498. fastpathTV.EncSliceStringV(rv2i(rv).([]string), e)
  1499. }
  1500. }
  1501. func (_ fastpathT) EncSliceStringV(v []string, e *Encoder) {
  1502. if v == nil {
  1503. e.e.EncodeNil()
  1504. return
  1505. }
  1506. ee, esep := e.e, e.hh.hasElemSeparators()
  1507. ee.WriteArrayStart(len(v))
  1508. for _, v2 := range v {
  1509. if esep {
  1510. ee.WriteArrayElem()
  1511. }
  1512. ee.EncodeString(c_UTF8, v2)
  1513. }
  1514. ee.WriteArrayEnd()
  1515. }
  1516. func (_ fastpathT) EncAsMapSliceStringV(v []string, e *Encoder) {
  1517. ee, esep := e.e, e.hh.hasElemSeparators()
  1518. if len(v)%2 == 1 {
  1519. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  1520. return
  1521. }
  1522. ee.WriteMapStart(len(v) / 2)
  1523. for j, v2 := range v {
  1524. if esep {
  1525. if j%2 == 0 {
  1526. ee.WriteMapElemKey()
  1527. } else {
  1528. ee.WriteMapElemValue()
  1529. }
  1530. }
  1531. ee.EncodeString(c_UTF8, v2)
  1532. }
  1533. ee.WriteMapEnd()
  1534. }
  1535. func (e *Encoder) fastpathEncSliceFloat32R(f *codecFnInfo, rv reflect.Value) {
  1536. if f.ti.mbs {
  1537. fastpathTV.EncAsMapSliceFloat32V(rv2i(rv).([]float32), e)
  1538. } else {
  1539. fastpathTV.EncSliceFloat32V(rv2i(rv).([]float32), e)
  1540. }
  1541. }
  1542. func (_ fastpathT) EncSliceFloat32V(v []float32, e *Encoder) {
  1543. if v == nil {
  1544. e.e.EncodeNil()
  1545. return
  1546. }
  1547. ee, esep := e.e, e.hh.hasElemSeparators()
  1548. ee.WriteArrayStart(len(v))
  1549. for _, v2 := range v {
  1550. if esep {
  1551. ee.WriteArrayElem()
  1552. }
  1553. ee.EncodeFloat32(v2)
  1554. }
  1555. ee.WriteArrayEnd()
  1556. }
  1557. func (_ fastpathT) EncAsMapSliceFloat32V(v []float32, e *Encoder) {
  1558. ee, esep := e.e, e.hh.hasElemSeparators()
  1559. if len(v)%2 == 1 {
  1560. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  1561. return
  1562. }
  1563. ee.WriteMapStart(len(v) / 2)
  1564. for j, v2 := range v {
  1565. if esep {
  1566. if j%2 == 0 {
  1567. ee.WriteMapElemKey()
  1568. } else {
  1569. ee.WriteMapElemValue()
  1570. }
  1571. }
  1572. ee.EncodeFloat32(v2)
  1573. }
  1574. ee.WriteMapEnd()
  1575. }
  1576. func (e *Encoder) fastpathEncSliceFloat64R(f *codecFnInfo, rv reflect.Value) {
  1577. if f.ti.mbs {
  1578. fastpathTV.EncAsMapSliceFloat64V(rv2i(rv).([]float64), e)
  1579. } else {
  1580. fastpathTV.EncSliceFloat64V(rv2i(rv).([]float64), e)
  1581. }
  1582. }
  1583. func (_ fastpathT) EncSliceFloat64V(v []float64, e *Encoder) {
  1584. if v == nil {
  1585. e.e.EncodeNil()
  1586. return
  1587. }
  1588. ee, esep := e.e, e.hh.hasElemSeparators()
  1589. ee.WriteArrayStart(len(v))
  1590. for _, v2 := range v {
  1591. if esep {
  1592. ee.WriteArrayElem()
  1593. }
  1594. ee.EncodeFloat64(v2)
  1595. }
  1596. ee.WriteArrayEnd()
  1597. }
  1598. func (_ fastpathT) EncAsMapSliceFloat64V(v []float64, e *Encoder) {
  1599. ee, esep := e.e, e.hh.hasElemSeparators()
  1600. if len(v)%2 == 1 {
  1601. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  1602. return
  1603. }
  1604. ee.WriteMapStart(len(v) / 2)
  1605. for j, v2 := range v {
  1606. if esep {
  1607. if j%2 == 0 {
  1608. ee.WriteMapElemKey()
  1609. } else {
  1610. ee.WriteMapElemValue()
  1611. }
  1612. }
  1613. ee.EncodeFloat64(v2)
  1614. }
  1615. ee.WriteMapEnd()
  1616. }
  1617. func (e *Encoder) fastpathEncSliceUintR(f *codecFnInfo, rv reflect.Value) {
  1618. if f.ti.mbs {
  1619. fastpathTV.EncAsMapSliceUintV(rv2i(rv).([]uint), e)
  1620. } else {
  1621. fastpathTV.EncSliceUintV(rv2i(rv).([]uint), e)
  1622. }
  1623. }
  1624. func (_ fastpathT) EncSliceUintV(v []uint, e *Encoder) {
  1625. if v == nil {
  1626. e.e.EncodeNil()
  1627. return
  1628. }
  1629. ee, esep := e.e, e.hh.hasElemSeparators()
  1630. ee.WriteArrayStart(len(v))
  1631. for _, v2 := range v {
  1632. if esep {
  1633. ee.WriteArrayElem()
  1634. }
  1635. ee.EncodeUint(uint64(v2))
  1636. }
  1637. ee.WriteArrayEnd()
  1638. }
  1639. func (_ fastpathT) EncAsMapSliceUintV(v []uint, e *Encoder) {
  1640. ee, esep := e.e, e.hh.hasElemSeparators()
  1641. if len(v)%2 == 1 {
  1642. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  1643. return
  1644. }
  1645. ee.WriteMapStart(len(v) / 2)
  1646. for j, v2 := range v {
  1647. if esep {
  1648. if j%2 == 0 {
  1649. ee.WriteMapElemKey()
  1650. } else {
  1651. ee.WriteMapElemValue()
  1652. }
  1653. }
  1654. ee.EncodeUint(uint64(v2))
  1655. }
  1656. ee.WriteMapEnd()
  1657. }
  1658. func (e *Encoder) fastpathEncSliceUint16R(f *codecFnInfo, rv reflect.Value) {
  1659. if f.ti.mbs {
  1660. fastpathTV.EncAsMapSliceUint16V(rv2i(rv).([]uint16), e)
  1661. } else {
  1662. fastpathTV.EncSliceUint16V(rv2i(rv).([]uint16), e)
  1663. }
  1664. }
  1665. func (_ fastpathT) EncSliceUint16V(v []uint16, e *Encoder) {
  1666. if v == nil {
  1667. e.e.EncodeNil()
  1668. return
  1669. }
  1670. ee, esep := e.e, e.hh.hasElemSeparators()
  1671. ee.WriteArrayStart(len(v))
  1672. for _, v2 := range v {
  1673. if esep {
  1674. ee.WriteArrayElem()
  1675. }
  1676. ee.EncodeUint(uint64(v2))
  1677. }
  1678. ee.WriteArrayEnd()
  1679. }
  1680. func (_ fastpathT) EncAsMapSliceUint16V(v []uint16, e *Encoder) {
  1681. ee, esep := e.e, e.hh.hasElemSeparators()
  1682. if len(v)%2 == 1 {
  1683. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  1684. return
  1685. }
  1686. ee.WriteMapStart(len(v) / 2)
  1687. for j, v2 := range v {
  1688. if esep {
  1689. if j%2 == 0 {
  1690. ee.WriteMapElemKey()
  1691. } else {
  1692. ee.WriteMapElemValue()
  1693. }
  1694. }
  1695. ee.EncodeUint(uint64(v2))
  1696. }
  1697. ee.WriteMapEnd()
  1698. }
  1699. func (e *Encoder) fastpathEncSliceUint32R(f *codecFnInfo, rv reflect.Value) {
  1700. if f.ti.mbs {
  1701. fastpathTV.EncAsMapSliceUint32V(rv2i(rv).([]uint32), e)
  1702. } else {
  1703. fastpathTV.EncSliceUint32V(rv2i(rv).([]uint32), e)
  1704. }
  1705. }
  1706. func (_ fastpathT) EncSliceUint32V(v []uint32, e *Encoder) {
  1707. if v == nil {
  1708. e.e.EncodeNil()
  1709. return
  1710. }
  1711. ee, esep := e.e, e.hh.hasElemSeparators()
  1712. ee.WriteArrayStart(len(v))
  1713. for _, v2 := range v {
  1714. if esep {
  1715. ee.WriteArrayElem()
  1716. }
  1717. ee.EncodeUint(uint64(v2))
  1718. }
  1719. ee.WriteArrayEnd()
  1720. }
  1721. func (_ fastpathT) EncAsMapSliceUint32V(v []uint32, e *Encoder) {
  1722. ee, esep := e.e, e.hh.hasElemSeparators()
  1723. if len(v)%2 == 1 {
  1724. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  1725. return
  1726. }
  1727. ee.WriteMapStart(len(v) / 2)
  1728. for j, v2 := range v {
  1729. if esep {
  1730. if j%2 == 0 {
  1731. ee.WriteMapElemKey()
  1732. } else {
  1733. ee.WriteMapElemValue()
  1734. }
  1735. }
  1736. ee.EncodeUint(uint64(v2))
  1737. }
  1738. ee.WriteMapEnd()
  1739. }
  1740. func (e *Encoder) fastpathEncSliceUint64R(f *codecFnInfo, rv reflect.Value) {
  1741. if f.ti.mbs {
  1742. fastpathTV.EncAsMapSliceUint64V(rv2i(rv).([]uint64), e)
  1743. } else {
  1744. fastpathTV.EncSliceUint64V(rv2i(rv).([]uint64), e)
  1745. }
  1746. }
  1747. func (_ fastpathT) EncSliceUint64V(v []uint64, e *Encoder) {
  1748. if v == nil {
  1749. e.e.EncodeNil()
  1750. return
  1751. }
  1752. ee, esep := e.e, e.hh.hasElemSeparators()
  1753. ee.WriteArrayStart(len(v))
  1754. for _, v2 := range v {
  1755. if esep {
  1756. ee.WriteArrayElem()
  1757. }
  1758. ee.EncodeUint(uint64(v2))
  1759. }
  1760. ee.WriteArrayEnd()
  1761. }
  1762. func (_ fastpathT) EncAsMapSliceUint64V(v []uint64, e *Encoder) {
  1763. ee, esep := e.e, e.hh.hasElemSeparators()
  1764. if len(v)%2 == 1 {
  1765. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  1766. return
  1767. }
  1768. ee.WriteMapStart(len(v) / 2)
  1769. for j, v2 := range v {
  1770. if esep {
  1771. if j%2 == 0 {
  1772. ee.WriteMapElemKey()
  1773. } else {
  1774. ee.WriteMapElemValue()
  1775. }
  1776. }
  1777. ee.EncodeUint(uint64(v2))
  1778. }
  1779. ee.WriteMapEnd()
  1780. }
  1781. func (e *Encoder) fastpathEncSliceUintptrR(f *codecFnInfo, rv reflect.Value) {
  1782. if f.ti.mbs {
  1783. fastpathTV.EncAsMapSliceUintptrV(rv2i(rv).([]uintptr), e)
  1784. } else {
  1785. fastpathTV.EncSliceUintptrV(rv2i(rv).([]uintptr), e)
  1786. }
  1787. }
  1788. func (_ fastpathT) EncSliceUintptrV(v []uintptr, e *Encoder) {
  1789. if v == nil {
  1790. e.e.EncodeNil()
  1791. return
  1792. }
  1793. ee, esep := e.e, e.hh.hasElemSeparators()
  1794. ee.WriteArrayStart(len(v))
  1795. for _, v2 := range v {
  1796. if esep {
  1797. ee.WriteArrayElem()
  1798. }
  1799. e.encode(v2)
  1800. }
  1801. ee.WriteArrayEnd()
  1802. }
  1803. func (_ fastpathT) EncAsMapSliceUintptrV(v []uintptr, e *Encoder) {
  1804. ee, esep := e.e, e.hh.hasElemSeparators()
  1805. if len(v)%2 == 1 {
  1806. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  1807. return
  1808. }
  1809. ee.WriteMapStart(len(v) / 2)
  1810. for j, v2 := range v {
  1811. if esep {
  1812. if j%2 == 0 {
  1813. ee.WriteMapElemKey()
  1814. } else {
  1815. ee.WriteMapElemValue()
  1816. }
  1817. }
  1818. e.encode(v2)
  1819. }
  1820. ee.WriteMapEnd()
  1821. }
  1822. func (e *Encoder) fastpathEncSliceIntR(f *codecFnInfo, rv reflect.Value) {
  1823. if f.ti.mbs {
  1824. fastpathTV.EncAsMapSliceIntV(rv2i(rv).([]int), e)
  1825. } else {
  1826. fastpathTV.EncSliceIntV(rv2i(rv).([]int), e)
  1827. }
  1828. }
  1829. func (_ fastpathT) EncSliceIntV(v []int, e *Encoder) {
  1830. if v == nil {
  1831. e.e.EncodeNil()
  1832. return
  1833. }
  1834. ee, esep := e.e, e.hh.hasElemSeparators()
  1835. ee.WriteArrayStart(len(v))
  1836. for _, v2 := range v {
  1837. if esep {
  1838. ee.WriteArrayElem()
  1839. }
  1840. ee.EncodeInt(int64(v2))
  1841. }
  1842. ee.WriteArrayEnd()
  1843. }
  1844. func (_ fastpathT) EncAsMapSliceIntV(v []int, e *Encoder) {
  1845. ee, esep := e.e, e.hh.hasElemSeparators()
  1846. if len(v)%2 == 1 {
  1847. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  1848. return
  1849. }
  1850. ee.WriteMapStart(len(v) / 2)
  1851. for j, v2 := range v {
  1852. if esep {
  1853. if j%2 == 0 {
  1854. ee.WriteMapElemKey()
  1855. } else {
  1856. ee.WriteMapElemValue()
  1857. }
  1858. }
  1859. ee.EncodeInt(int64(v2))
  1860. }
  1861. ee.WriteMapEnd()
  1862. }
  1863. func (e *Encoder) fastpathEncSliceInt8R(f *codecFnInfo, rv reflect.Value) {
  1864. if f.ti.mbs {
  1865. fastpathTV.EncAsMapSliceInt8V(rv2i(rv).([]int8), e)
  1866. } else {
  1867. fastpathTV.EncSliceInt8V(rv2i(rv).([]int8), e)
  1868. }
  1869. }
  1870. func (_ fastpathT) EncSliceInt8V(v []int8, e *Encoder) {
  1871. if v == nil {
  1872. e.e.EncodeNil()
  1873. return
  1874. }
  1875. ee, esep := e.e, e.hh.hasElemSeparators()
  1876. ee.WriteArrayStart(len(v))
  1877. for _, v2 := range v {
  1878. if esep {
  1879. ee.WriteArrayElem()
  1880. }
  1881. ee.EncodeInt(int64(v2))
  1882. }
  1883. ee.WriteArrayEnd()
  1884. }
  1885. func (_ fastpathT) EncAsMapSliceInt8V(v []int8, e *Encoder) {
  1886. ee, esep := e.e, e.hh.hasElemSeparators()
  1887. if len(v)%2 == 1 {
  1888. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  1889. return
  1890. }
  1891. ee.WriteMapStart(len(v) / 2)
  1892. for j, v2 := range v {
  1893. if esep {
  1894. if j%2 == 0 {
  1895. ee.WriteMapElemKey()
  1896. } else {
  1897. ee.WriteMapElemValue()
  1898. }
  1899. }
  1900. ee.EncodeInt(int64(v2))
  1901. }
  1902. ee.WriteMapEnd()
  1903. }
  1904. func (e *Encoder) fastpathEncSliceInt16R(f *codecFnInfo, rv reflect.Value) {
  1905. if f.ti.mbs {
  1906. fastpathTV.EncAsMapSliceInt16V(rv2i(rv).([]int16), e)
  1907. } else {
  1908. fastpathTV.EncSliceInt16V(rv2i(rv).([]int16), e)
  1909. }
  1910. }
  1911. func (_ fastpathT) EncSliceInt16V(v []int16, e *Encoder) {
  1912. if v == nil {
  1913. e.e.EncodeNil()
  1914. return
  1915. }
  1916. ee, esep := e.e, e.hh.hasElemSeparators()
  1917. ee.WriteArrayStart(len(v))
  1918. for _, v2 := range v {
  1919. if esep {
  1920. ee.WriteArrayElem()
  1921. }
  1922. ee.EncodeInt(int64(v2))
  1923. }
  1924. ee.WriteArrayEnd()
  1925. }
  1926. func (_ fastpathT) EncAsMapSliceInt16V(v []int16, e *Encoder) {
  1927. ee, esep := e.e, e.hh.hasElemSeparators()
  1928. if len(v)%2 == 1 {
  1929. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  1930. return
  1931. }
  1932. ee.WriteMapStart(len(v) / 2)
  1933. for j, v2 := range v {
  1934. if esep {
  1935. if j%2 == 0 {
  1936. ee.WriteMapElemKey()
  1937. } else {
  1938. ee.WriteMapElemValue()
  1939. }
  1940. }
  1941. ee.EncodeInt(int64(v2))
  1942. }
  1943. ee.WriteMapEnd()
  1944. }
  1945. func (e *Encoder) fastpathEncSliceInt32R(f *codecFnInfo, rv reflect.Value) {
  1946. if f.ti.mbs {
  1947. fastpathTV.EncAsMapSliceInt32V(rv2i(rv).([]int32), e)
  1948. } else {
  1949. fastpathTV.EncSliceInt32V(rv2i(rv).([]int32), e)
  1950. }
  1951. }
  1952. func (_ fastpathT) EncSliceInt32V(v []int32, e *Encoder) {
  1953. if v == nil {
  1954. e.e.EncodeNil()
  1955. return
  1956. }
  1957. ee, esep := e.e, e.hh.hasElemSeparators()
  1958. ee.WriteArrayStart(len(v))
  1959. for _, v2 := range v {
  1960. if esep {
  1961. ee.WriteArrayElem()
  1962. }
  1963. ee.EncodeInt(int64(v2))
  1964. }
  1965. ee.WriteArrayEnd()
  1966. }
  1967. func (_ fastpathT) EncAsMapSliceInt32V(v []int32, e *Encoder) {
  1968. ee, esep := e.e, e.hh.hasElemSeparators()
  1969. if len(v)%2 == 1 {
  1970. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  1971. return
  1972. }
  1973. ee.WriteMapStart(len(v) / 2)
  1974. for j, v2 := range v {
  1975. if esep {
  1976. if j%2 == 0 {
  1977. ee.WriteMapElemKey()
  1978. } else {
  1979. ee.WriteMapElemValue()
  1980. }
  1981. }
  1982. ee.EncodeInt(int64(v2))
  1983. }
  1984. ee.WriteMapEnd()
  1985. }
  1986. func (e *Encoder) fastpathEncSliceInt64R(f *codecFnInfo, rv reflect.Value) {
  1987. if f.ti.mbs {
  1988. fastpathTV.EncAsMapSliceInt64V(rv2i(rv).([]int64), e)
  1989. } else {
  1990. fastpathTV.EncSliceInt64V(rv2i(rv).([]int64), e)
  1991. }
  1992. }
  1993. func (_ fastpathT) EncSliceInt64V(v []int64, e *Encoder) {
  1994. if v == nil {
  1995. e.e.EncodeNil()
  1996. return
  1997. }
  1998. ee, esep := e.e, e.hh.hasElemSeparators()
  1999. ee.WriteArrayStart(len(v))
  2000. for _, v2 := range v {
  2001. if esep {
  2002. ee.WriteArrayElem()
  2003. }
  2004. ee.EncodeInt(int64(v2))
  2005. }
  2006. ee.WriteArrayEnd()
  2007. }
  2008. func (_ fastpathT) EncAsMapSliceInt64V(v []int64, e *Encoder) {
  2009. ee, esep := e.e, e.hh.hasElemSeparators()
  2010. if len(v)%2 == 1 {
  2011. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  2012. return
  2013. }
  2014. ee.WriteMapStart(len(v) / 2)
  2015. for j, v2 := range v {
  2016. if esep {
  2017. if j%2 == 0 {
  2018. ee.WriteMapElemKey()
  2019. } else {
  2020. ee.WriteMapElemValue()
  2021. }
  2022. }
  2023. ee.EncodeInt(int64(v2))
  2024. }
  2025. ee.WriteMapEnd()
  2026. }
  2027. func (e *Encoder) fastpathEncSliceBoolR(f *codecFnInfo, rv reflect.Value) {
  2028. if f.ti.mbs {
  2029. fastpathTV.EncAsMapSliceBoolV(rv2i(rv).([]bool), e)
  2030. } else {
  2031. fastpathTV.EncSliceBoolV(rv2i(rv).([]bool), e)
  2032. }
  2033. }
  2034. func (_ fastpathT) EncSliceBoolV(v []bool, e *Encoder) {
  2035. if v == nil {
  2036. e.e.EncodeNil()
  2037. return
  2038. }
  2039. ee, esep := e.e, e.hh.hasElemSeparators()
  2040. ee.WriteArrayStart(len(v))
  2041. for _, v2 := range v {
  2042. if esep {
  2043. ee.WriteArrayElem()
  2044. }
  2045. ee.EncodeBool(v2)
  2046. }
  2047. ee.WriteArrayEnd()
  2048. }
  2049. func (_ fastpathT) EncAsMapSliceBoolV(v []bool, e *Encoder) {
  2050. ee, esep := e.e, e.hh.hasElemSeparators()
  2051. if len(v)%2 == 1 {
  2052. e.errorf("mapBySlice requires even slice length, but got %v", len(v))
  2053. return
  2054. }
  2055. ee.WriteMapStart(len(v) / 2)
  2056. for j, v2 := range v {
  2057. if esep {
  2058. if j%2 == 0 {
  2059. ee.WriteMapElemKey()
  2060. } else {
  2061. ee.WriteMapElemValue()
  2062. }
  2063. }
  2064. ee.EncodeBool(v2)
  2065. }
  2066. ee.WriteMapEnd()
  2067. }
  2068. func (e *Encoder) fastpathEncMapIntfIntfR(f *codecFnInfo, rv reflect.Value) {
  2069. fastpathTV.EncMapIntfIntfV(rv2i(rv).(map[interface{}]interface{}), e)
  2070. }
  2071. func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, e *Encoder) {
  2072. if v == nil {
  2073. e.e.EncodeNil()
  2074. return
  2075. }
  2076. ee, esep := e.e, e.hh.hasElemSeparators()
  2077. ee.WriteMapStart(len(v))
  2078. if e.h.Canonical {
  2079. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2080. e2 := NewEncoderBytes(&mksv, e.hh)
  2081. v2 := make([]bytesI, len(v))
  2082. var i, l int
  2083. var vp *bytesI
  2084. for k2, _ := range v {
  2085. l = len(mksv)
  2086. e2.MustEncode(k2)
  2087. vp = &v2[i]
  2088. vp.v = mksv[l:]
  2089. vp.i = k2
  2090. i++
  2091. }
  2092. sort.Sort(bytesISlice(v2))
  2093. for j := range v2 {
  2094. if esep {
  2095. ee.WriteMapElemKey()
  2096. }
  2097. e.asis(v2[j].v)
  2098. if esep {
  2099. ee.WriteMapElemValue()
  2100. }
  2101. e.encode(v[v2[j].i])
  2102. }
  2103. } else {
  2104. for k2, v2 := range v {
  2105. if esep {
  2106. ee.WriteMapElemKey()
  2107. }
  2108. e.encode(k2)
  2109. if esep {
  2110. ee.WriteMapElemValue()
  2111. }
  2112. e.encode(v2)
  2113. }
  2114. }
  2115. ee.WriteMapEnd()
  2116. }
  2117. func (e *Encoder) fastpathEncMapIntfStringR(f *codecFnInfo, rv reflect.Value) {
  2118. fastpathTV.EncMapIntfStringV(rv2i(rv).(map[interface{}]string), e)
  2119. }
  2120. func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, e *Encoder) {
  2121. if v == nil {
  2122. e.e.EncodeNil()
  2123. return
  2124. }
  2125. ee, esep := e.e, e.hh.hasElemSeparators()
  2126. ee.WriteMapStart(len(v))
  2127. if e.h.Canonical {
  2128. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2129. e2 := NewEncoderBytes(&mksv, e.hh)
  2130. v2 := make([]bytesI, len(v))
  2131. var i, l int
  2132. var vp *bytesI
  2133. for k2, _ := range v {
  2134. l = len(mksv)
  2135. e2.MustEncode(k2)
  2136. vp = &v2[i]
  2137. vp.v = mksv[l:]
  2138. vp.i = k2
  2139. i++
  2140. }
  2141. sort.Sort(bytesISlice(v2))
  2142. for j := range v2 {
  2143. if esep {
  2144. ee.WriteMapElemKey()
  2145. }
  2146. e.asis(v2[j].v)
  2147. if esep {
  2148. ee.WriteMapElemValue()
  2149. }
  2150. e.encode(v[v2[j].i])
  2151. }
  2152. } else {
  2153. for k2, v2 := range v {
  2154. if esep {
  2155. ee.WriteMapElemKey()
  2156. }
  2157. e.encode(k2)
  2158. if esep {
  2159. ee.WriteMapElemValue()
  2160. }
  2161. ee.EncodeString(c_UTF8, v2)
  2162. }
  2163. }
  2164. ee.WriteMapEnd()
  2165. }
  2166. func (e *Encoder) fastpathEncMapIntfUintR(f *codecFnInfo, rv reflect.Value) {
  2167. fastpathTV.EncMapIntfUintV(rv2i(rv).(map[interface{}]uint), e)
  2168. }
  2169. func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, e *Encoder) {
  2170. if v == nil {
  2171. e.e.EncodeNil()
  2172. return
  2173. }
  2174. ee, esep := e.e, e.hh.hasElemSeparators()
  2175. ee.WriteMapStart(len(v))
  2176. if e.h.Canonical {
  2177. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2178. e2 := NewEncoderBytes(&mksv, e.hh)
  2179. v2 := make([]bytesI, len(v))
  2180. var i, l int
  2181. var vp *bytesI
  2182. for k2, _ := range v {
  2183. l = len(mksv)
  2184. e2.MustEncode(k2)
  2185. vp = &v2[i]
  2186. vp.v = mksv[l:]
  2187. vp.i = k2
  2188. i++
  2189. }
  2190. sort.Sort(bytesISlice(v2))
  2191. for j := range v2 {
  2192. if esep {
  2193. ee.WriteMapElemKey()
  2194. }
  2195. e.asis(v2[j].v)
  2196. if esep {
  2197. ee.WriteMapElemValue()
  2198. }
  2199. e.encode(v[v2[j].i])
  2200. }
  2201. } else {
  2202. for k2, v2 := range v {
  2203. if esep {
  2204. ee.WriteMapElemKey()
  2205. }
  2206. e.encode(k2)
  2207. if esep {
  2208. ee.WriteMapElemValue()
  2209. }
  2210. ee.EncodeUint(uint64(v2))
  2211. }
  2212. }
  2213. ee.WriteMapEnd()
  2214. }
  2215. func (e *Encoder) fastpathEncMapIntfUint8R(f *codecFnInfo, rv reflect.Value) {
  2216. fastpathTV.EncMapIntfUint8V(rv2i(rv).(map[interface{}]uint8), e)
  2217. }
  2218. func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, e *Encoder) {
  2219. if v == nil {
  2220. e.e.EncodeNil()
  2221. return
  2222. }
  2223. ee, esep := e.e, e.hh.hasElemSeparators()
  2224. ee.WriteMapStart(len(v))
  2225. if e.h.Canonical {
  2226. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2227. e2 := NewEncoderBytes(&mksv, e.hh)
  2228. v2 := make([]bytesI, len(v))
  2229. var i, l int
  2230. var vp *bytesI
  2231. for k2, _ := range v {
  2232. l = len(mksv)
  2233. e2.MustEncode(k2)
  2234. vp = &v2[i]
  2235. vp.v = mksv[l:]
  2236. vp.i = k2
  2237. i++
  2238. }
  2239. sort.Sort(bytesISlice(v2))
  2240. for j := range v2 {
  2241. if esep {
  2242. ee.WriteMapElemKey()
  2243. }
  2244. e.asis(v2[j].v)
  2245. if esep {
  2246. ee.WriteMapElemValue()
  2247. }
  2248. e.encode(v[v2[j].i])
  2249. }
  2250. } else {
  2251. for k2, v2 := range v {
  2252. if esep {
  2253. ee.WriteMapElemKey()
  2254. }
  2255. e.encode(k2)
  2256. if esep {
  2257. ee.WriteMapElemValue()
  2258. }
  2259. ee.EncodeUint(uint64(v2))
  2260. }
  2261. }
  2262. ee.WriteMapEnd()
  2263. }
  2264. func (e *Encoder) fastpathEncMapIntfUint16R(f *codecFnInfo, rv reflect.Value) {
  2265. fastpathTV.EncMapIntfUint16V(rv2i(rv).(map[interface{}]uint16), e)
  2266. }
  2267. func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, e *Encoder) {
  2268. if v == nil {
  2269. e.e.EncodeNil()
  2270. return
  2271. }
  2272. ee, esep := e.e, e.hh.hasElemSeparators()
  2273. ee.WriteMapStart(len(v))
  2274. if e.h.Canonical {
  2275. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2276. e2 := NewEncoderBytes(&mksv, e.hh)
  2277. v2 := make([]bytesI, len(v))
  2278. var i, l int
  2279. var vp *bytesI
  2280. for k2, _ := range v {
  2281. l = len(mksv)
  2282. e2.MustEncode(k2)
  2283. vp = &v2[i]
  2284. vp.v = mksv[l:]
  2285. vp.i = k2
  2286. i++
  2287. }
  2288. sort.Sort(bytesISlice(v2))
  2289. for j := range v2 {
  2290. if esep {
  2291. ee.WriteMapElemKey()
  2292. }
  2293. e.asis(v2[j].v)
  2294. if esep {
  2295. ee.WriteMapElemValue()
  2296. }
  2297. e.encode(v[v2[j].i])
  2298. }
  2299. } else {
  2300. for k2, v2 := range v {
  2301. if esep {
  2302. ee.WriteMapElemKey()
  2303. }
  2304. e.encode(k2)
  2305. if esep {
  2306. ee.WriteMapElemValue()
  2307. }
  2308. ee.EncodeUint(uint64(v2))
  2309. }
  2310. }
  2311. ee.WriteMapEnd()
  2312. }
  2313. func (e *Encoder) fastpathEncMapIntfUint32R(f *codecFnInfo, rv reflect.Value) {
  2314. fastpathTV.EncMapIntfUint32V(rv2i(rv).(map[interface{}]uint32), e)
  2315. }
  2316. func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, e *Encoder) {
  2317. if v == nil {
  2318. e.e.EncodeNil()
  2319. return
  2320. }
  2321. ee, esep := e.e, e.hh.hasElemSeparators()
  2322. ee.WriteMapStart(len(v))
  2323. if e.h.Canonical {
  2324. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2325. e2 := NewEncoderBytes(&mksv, e.hh)
  2326. v2 := make([]bytesI, len(v))
  2327. var i, l int
  2328. var vp *bytesI
  2329. for k2, _ := range v {
  2330. l = len(mksv)
  2331. e2.MustEncode(k2)
  2332. vp = &v2[i]
  2333. vp.v = mksv[l:]
  2334. vp.i = k2
  2335. i++
  2336. }
  2337. sort.Sort(bytesISlice(v2))
  2338. for j := range v2 {
  2339. if esep {
  2340. ee.WriteMapElemKey()
  2341. }
  2342. e.asis(v2[j].v)
  2343. if esep {
  2344. ee.WriteMapElemValue()
  2345. }
  2346. e.encode(v[v2[j].i])
  2347. }
  2348. } else {
  2349. for k2, v2 := range v {
  2350. if esep {
  2351. ee.WriteMapElemKey()
  2352. }
  2353. e.encode(k2)
  2354. if esep {
  2355. ee.WriteMapElemValue()
  2356. }
  2357. ee.EncodeUint(uint64(v2))
  2358. }
  2359. }
  2360. ee.WriteMapEnd()
  2361. }
  2362. func (e *Encoder) fastpathEncMapIntfUint64R(f *codecFnInfo, rv reflect.Value) {
  2363. fastpathTV.EncMapIntfUint64V(rv2i(rv).(map[interface{}]uint64), e)
  2364. }
  2365. func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, e *Encoder) {
  2366. if v == nil {
  2367. e.e.EncodeNil()
  2368. return
  2369. }
  2370. ee, esep := e.e, e.hh.hasElemSeparators()
  2371. ee.WriteMapStart(len(v))
  2372. if e.h.Canonical {
  2373. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2374. e2 := NewEncoderBytes(&mksv, e.hh)
  2375. v2 := make([]bytesI, len(v))
  2376. var i, l int
  2377. var vp *bytesI
  2378. for k2, _ := range v {
  2379. l = len(mksv)
  2380. e2.MustEncode(k2)
  2381. vp = &v2[i]
  2382. vp.v = mksv[l:]
  2383. vp.i = k2
  2384. i++
  2385. }
  2386. sort.Sort(bytesISlice(v2))
  2387. for j := range v2 {
  2388. if esep {
  2389. ee.WriteMapElemKey()
  2390. }
  2391. e.asis(v2[j].v)
  2392. if esep {
  2393. ee.WriteMapElemValue()
  2394. }
  2395. e.encode(v[v2[j].i])
  2396. }
  2397. } else {
  2398. for k2, v2 := range v {
  2399. if esep {
  2400. ee.WriteMapElemKey()
  2401. }
  2402. e.encode(k2)
  2403. if esep {
  2404. ee.WriteMapElemValue()
  2405. }
  2406. ee.EncodeUint(uint64(v2))
  2407. }
  2408. }
  2409. ee.WriteMapEnd()
  2410. }
  2411. func (e *Encoder) fastpathEncMapIntfUintptrR(f *codecFnInfo, rv reflect.Value) {
  2412. fastpathTV.EncMapIntfUintptrV(rv2i(rv).(map[interface{}]uintptr), e)
  2413. }
  2414. func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, e *Encoder) {
  2415. if v == nil {
  2416. e.e.EncodeNil()
  2417. return
  2418. }
  2419. ee, esep := e.e, e.hh.hasElemSeparators()
  2420. ee.WriteMapStart(len(v))
  2421. if e.h.Canonical {
  2422. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2423. e2 := NewEncoderBytes(&mksv, e.hh)
  2424. v2 := make([]bytesI, len(v))
  2425. var i, l int
  2426. var vp *bytesI
  2427. for k2, _ := range v {
  2428. l = len(mksv)
  2429. e2.MustEncode(k2)
  2430. vp = &v2[i]
  2431. vp.v = mksv[l:]
  2432. vp.i = k2
  2433. i++
  2434. }
  2435. sort.Sort(bytesISlice(v2))
  2436. for j := range v2 {
  2437. if esep {
  2438. ee.WriteMapElemKey()
  2439. }
  2440. e.asis(v2[j].v)
  2441. if esep {
  2442. ee.WriteMapElemValue()
  2443. }
  2444. e.encode(v[v2[j].i])
  2445. }
  2446. } else {
  2447. for k2, v2 := range v {
  2448. if esep {
  2449. ee.WriteMapElemKey()
  2450. }
  2451. e.encode(k2)
  2452. if esep {
  2453. ee.WriteMapElemValue()
  2454. }
  2455. e.encode(v2)
  2456. }
  2457. }
  2458. ee.WriteMapEnd()
  2459. }
  2460. func (e *Encoder) fastpathEncMapIntfIntR(f *codecFnInfo, rv reflect.Value) {
  2461. fastpathTV.EncMapIntfIntV(rv2i(rv).(map[interface{}]int), e)
  2462. }
  2463. func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, e *Encoder) {
  2464. if v == nil {
  2465. e.e.EncodeNil()
  2466. return
  2467. }
  2468. ee, esep := e.e, e.hh.hasElemSeparators()
  2469. ee.WriteMapStart(len(v))
  2470. if e.h.Canonical {
  2471. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2472. e2 := NewEncoderBytes(&mksv, e.hh)
  2473. v2 := make([]bytesI, len(v))
  2474. var i, l int
  2475. var vp *bytesI
  2476. for k2, _ := range v {
  2477. l = len(mksv)
  2478. e2.MustEncode(k2)
  2479. vp = &v2[i]
  2480. vp.v = mksv[l:]
  2481. vp.i = k2
  2482. i++
  2483. }
  2484. sort.Sort(bytesISlice(v2))
  2485. for j := range v2 {
  2486. if esep {
  2487. ee.WriteMapElemKey()
  2488. }
  2489. e.asis(v2[j].v)
  2490. if esep {
  2491. ee.WriteMapElemValue()
  2492. }
  2493. e.encode(v[v2[j].i])
  2494. }
  2495. } else {
  2496. for k2, v2 := range v {
  2497. if esep {
  2498. ee.WriteMapElemKey()
  2499. }
  2500. e.encode(k2)
  2501. if esep {
  2502. ee.WriteMapElemValue()
  2503. }
  2504. ee.EncodeInt(int64(v2))
  2505. }
  2506. }
  2507. ee.WriteMapEnd()
  2508. }
  2509. func (e *Encoder) fastpathEncMapIntfInt8R(f *codecFnInfo, rv reflect.Value) {
  2510. fastpathTV.EncMapIntfInt8V(rv2i(rv).(map[interface{}]int8), e)
  2511. }
  2512. func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, e *Encoder) {
  2513. if v == nil {
  2514. e.e.EncodeNil()
  2515. return
  2516. }
  2517. ee, esep := e.e, e.hh.hasElemSeparators()
  2518. ee.WriteMapStart(len(v))
  2519. if e.h.Canonical {
  2520. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2521. e2 := NewEncoderBytes(&mksv, e.hh)
  2522. v2 := make([]bytesI, len(v))
  2523. var i, l int
  2524. var vp *bytesI
  2525. for k2, _ := range v {
  2526. l = len(mksv)
  2527. e2.MustEncode(k2)
  2528. vp = &v2[i]
  2529. vp.v = mksv[l:]
  2530. vp.i = k2
  2531. i++
  2532. }
  2533. sort.Sort(bytesISlice(v2))
  2534. for j := range v2 {
  2535. if esep {
  2536. ee.WriteMapElemKey()
  2537. }
  2538. e.asis(v2[j].v)
  2539. if esep {
  2540. ee.WriteMapElemValue()
  2541. }
  2542. e.encode(v[v2[j].i])
  2543. }
  2544. } else {
  2545. for k2, v2 := range v {
  2546. if esep {
  2547. ee.WriteMapElemKey()
  2548. }
  2549. e.encode(k2)
  2550. if esep {
  2551. ee.WriteMapElemValue()
  2552. }
  2553. ee.EncodeInt(int64(v2))
  2554. }
  2555. }
  2556. ee.WriteMapEnd()
  2557. }
  2558. func (e *Encoder) fastpathEncMapIntfInt16R(f *codecFnInfo, rv reflect.Value) {
  2559. fastpathTV.EncMapIntfInt16V(rv2i(rv).(map[interface{}]int16), e)
  2560. }
  2561. func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, e *Encoder) {
  2562. if v == nil {
  2563. e.e.EncodeNil()
  2564. return
  2565. }
  2566. ee, esep := e.e, e.hh.hasElemSeparators()
  2567. ee.WriteMapStart(len(v))
  2568. if e.h.Canonical {
  2569. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2570. e2 := NewEncoderBytes(&mksv, e.hh)
  2571. v2 := make([]bytesI, len(v))
  2572. var i, l int
  2573. var vp *bytesI
  2574. for k2, _ := range v {
  2575. l = len(mksv)
  2576. e2.MustEncode(k2)
  2577. vp = &v2[i]
  2578. vp.v = mksv[l:]
  2579. vp.i = k2
  2580. i++
  2581. }
  2582. sort.Sort(bytesISlice(v2))
  2583. for j := range v2 {
  2584. if esep {
  2585. ee.WriteMapElemKey()
  2586. }
  2587. e.asis(v2[j].v)
  2588. if esep {
  2589. ee.WriteMapElemValue()
  2590. }
  2591. e.encode(v[v2[j].i])
  2592. }
  2593. } else {
  2594. for k2, v2 := range v {
  2595. if esep {
  2596. ee.WriteMapElemKey()
  2597. }
  2598. e.encode(k2)
  2599. if esep {
  2600. ee.WriteMapElemValue()
  2601. }
  2602. ee.EncodeInt(int64(v2))
  2603. }
  2604. }
  2605. ee.WriteMapEnd()
  2606. }
  2607. func (e *Encoder) fastpathEncMapIntfInt32R(f *codecFnInfo, rv reflect.Value) {
  2608. fastpathTV.EncMapIntfInt32V(rv2i(rv).(map[interface{}]int32), e)
  2609. }
  2610. func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, e *Encoder) {
  2611. if v == nil {
  2612. e.e.EncodeNil()
  2613. return
  2614. }
  2615. ee, esep := e.e, e.hh.hasElemSeparators()
  2616. ee.WriteMapStart(len(v))
  2617. if e.h.Canonical {
  2618. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2619. e2 := NewEncoderBytes(&mksv, e.hh)
  2620. v2 := make([]bytesI, len(v))
  2621. var i, l int
  2622. var vp *bytesI
  2623. for k2, _ := range v {
  2624. l = len(mksv)
  2625. e2.MustEncode(k2)
  2626. vp = &v2[i]
  2627. vp.v = mksv[l:]
  2628. vp.i = k2
  2629. i++
  2630. }
  2631. sort.Sort(bytesISlice(v2))
  2632. for j := range v2 {
  2633. if esep {
  2634. ee.WriteMapElemKey()
  2635. }
  2636. e.asis(v2[j].v)
  2637. if esep {
  2638. ee.WriteMapElemValue()
  2639. }
  2640. e.encode(v[v2[j].i])
  2641. }
  2642. } else {
  2643. for k2, v2 := range v {
  2644. if esep {
  2645. ee.WriteMapElemKey()
  2646. }
  2647. e.encode(k2)
  2648. if esep {
  2649. ee.WriteMapElemValue()
  2650. }
  2651. ee.EncodeInt(int64(v2))
  2652. }
  2653. }
  2654. ee.WriteMapEnd()
  2655. }
  2656. func (e *Encoder) fastpathEncMapIntfInt64R(f *codecFnInfo, rv reflect.Value) {
  2657. fastpathTV.EncMapIntfInt64V(rv2i(rv).(map[interface{}]int64), e)
  2658. }
  2659. func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, e *Encoder) {
  2660. if v == nil {
  2661. e.e.EncodeNil()
  2662. return
  2663. }
  2664. ee, esep := e.e, e.hh.hasElemSeparators()
  2665. ee.WriteMapStart(len(v))
  2666. if e.h.Canonical {
  2667. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2668. e2 := NewEncoderBytes(&mksv, e.hh)
  2669. v2 := make([]bytesI, len(v))
  2670. var i, l int
  2671. var vp *bytesI
  2672. for k2, _ := range v {
  2673. l = len(mksv)
  2674. e2.MustEncode(k2)
  2675. vp = &v2[i]
  2676. vp.v = mksv[l:]
  2677. vp.i = k2
  2678. i++
  2679. }
  2680. sort.Sort(bytesISlice(v2))
  2681. for j := range v2 {
  2682. if esep {
  2683. ee.WriteMapElemKey()
  2684. }
  2685. e.asis(v2[j].v)
  2686. if esep {
  2687. ee.WriteMapElemValue()
  2688. }
  2689. e.encode(v[v2[j].i])
  2690. }
  2691. } else {
  2692. for k2, v2 := range v {
  2693. if esep {
  2694. ee.WriteMapElemKey()
  2695. }
  2696. e.encode(k2)
  2697. if esep {
  2698. ee.WriteMapElemValue()
  2699. }
  2700. ee.EncodeInt(int64(v2))
  2701. }
  2702. }
  2703. ee.WriteMapEnd()
  2704. }
  2705. func (e *Encoder) fastpathEncMapIntfFloat32R(f *codecFnInfo, rv reflect.Value) {
  2706. fastpathTV.EncMapIntfFloat32V(rv2i(rv).(map[interface{}]float32), e)
  2707. }
  2708. func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, e *Encoder) {
  2709. if v == nil {
  2710. e.e.EncodeNil()
  2711. return
  2712. }
  2713. ee, esep := e.e, e.hh.hasElemSeparators()
  2714. ee.WriteMapStart(len(v))
  2715. if e.h.Canonical {
  2716. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2717. e2 := NewEncoderBytes(&mksv, e.hh)
  2718. v2 := make([]bytesI, len(v))
  2719. var i, l int
  2720. var vp *bytesI
  2721. for k2, _ := range v {
  2722. l = len(mksv)
  2723. e2.MustEncode(k2)
  2724. vp = &v2[i]
  2725. vp.v = mksv[l:]
  2726. vp.i = k2
  2727. i++
  2728. }
  2729. sort.Sort(bytesISlice(v2))
  2730. for j := range v2 {
  2731. if esep {
  2732. ee.WriteMapElemKey()
  2733. }
  2734. e.asis(v2[j].v)
  2735. if esep {
  2736. ee.WriteMapElemValue()
  2737. }
  2738. e.encode(v[v2[j].i])
  2739. }
  2740. } else {
  2741. for k2, v2 := range v {
  2742. if esep {
  2743. ee.WriteMapElemKey()
  2744. }
  2745. e.encode(k2)
  2746. if esep {
  2747. ee.WriteMapElemValue()
  2748. }
  2749. ee.EncodeFloat32(v2)
  2750. }
  2751. }
  2752. ee.WriteMapEnd()
  2753. }
  2754. func (e *Encoder) fastpathEncMapIntfFloat64R(f *codecFnInfo, rv reflect.Value) {
  2755. fastpathTV.EncMapIntfFloat64V(rv2i(rv).(map[interface{}]float64), e)
  2756. }
  2757. func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, e *Encoder) {
  2758. if v == nil {
  2759. e.e.EncodeNil()
  2760. return
  2761. }
  2762. ee, esep := e.e, e.hh.hasElemSeparators()
  2763. ee.WriteMapStart(len(v))
  2764. if e.h.Canonical {
  2765. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2766. e2 := NewEncoderBytes(&mksv, e.hh)
  2767. v2 := make([]bytesI, len(v))
  2768. var i, l int
  2769. var vp *bytesI
  2770. for k2, _ := range v {
  2771. l = len(mksv)
  2772. e2.MustEncode(k2)
  2773. vp = &v2[i]
  2774. vp.v = mksv[l:]
  2775. vp.i = k2
  2776. i++
  2777. }
  2778. sort.Sort(bytesISlice(v2))
  2779. for j := range v2 {
  2780. if esep {
  2781. ee.WriteMapElemKey()
  2782. }
  2783. e.asis(v2[j].v)
  2784. if esep {
  2785. ee.WriteMapElemValue()
  2786. }
  2787. e.encode(v[v2[j].i])
  2788. }
  2789. } else {
  2790. for k2, v2 := range v {
  2791. if esep {
  2792. ee.WriteMapElemKey()
  2793. }
  2794. e.encode(k2)
  2795. if esep {
  2796. ee.WriteMapElemValue()
  2797. }
  2798. ee.EncodeFloat64(v2)
  2799. }
  2800. }
  2801. ee.WriteMapEnd()
  2802. }
  2803. func (e *Encoder) fastpathEncMapIntfBoolR(f *codecFnInfo, rv reflect.Value) {
  2804. fastpathTV.EncMapIntfBoolV(rv2i(rv).(map[interface{}]bool), e)
  2805. }
  2806. func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, e *Encoder) {
  2807. if v == nil {
  2808. e.e.EncodeNil()
  2809. return
  2810. }
  2811. ee, esep := e.e, e.hh.hasElemSeparators()
  2812. ee.WriteMapStart(len(v))
  2813. if e.h.Canonical {
  2814. var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding
  2815. e2 := NewEncoderBytes(&mksv, e.hh)
  2816. v2 := make([]bytesI, len(v))
  2817. var i, l int
  2818. var vp *bytesI
  2819. for k2, _ := range v {
  2820. l = len(mksv)
  2821. e2.MustEncode(k2)
  2822. vp = &v2[i]
  2823. vp.v = mksv[l:]
  2824. vp.i = k2
  2825. i++
  2826. }
  2827. sort.Sort(bytesISlice(v2))
  2828. for j := range v2 {
  2829. if esep {
  2830. ee.WriteMapElemKey()
  2831. }
  2832. e.asis(v2[j].v)
  2833. if esep {
  2834. ee.WriteMapElemValue()
  2835. }
  2836. e.encode(v[v2[j].i])
  2837. }
  2838. } else {
  2839. for k2, v2 := range v {
  2840. if esep {
  2841. ee.WriteMapElemKey()
  2842. }
  2843. e.encode(k2)
  2844. if esep {
  2845. ee.WriteMapElemValue()
  2846. }
  2847. ee.EncodeBool(v2)
  2848. }
  2849. }
  2850. ee.WriteMapEnd()
  2851. }
  2852. func (e *Encoder) fastpathEncMapStringIntfR(f *codecFnInfo, rv reflect.Value) {
  2853. fastpathTV.EncMapStringIntfV(rv2i(rv).(map[string]interface{}), e)
  2854. }
  2855. func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, e *Encoder) {
  2856. if v == nil {
  2857. e.e.EncodeNil()
  2858. return
  2859. }
  2860. ee, esep := e.e, e.hh.hasElemSeparators()
  2861. ee.WriteMapStart(len(v))
  2862. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  2863. if e.h.Canonical {
  2864. v2 := make([]string, len(v))
  2865. var i int
  2866. for k, _ := range v {
  2867. v2[i] = string(k)
  2868. i++
  2869. }
  2870. sort.Sort(stringSlice(v2))
  2871. for _, k2 := range v2 {
  2872. if esep {
  2873. ee.WriteMapElemKey()
  2874. }
  2875. if asSymbols {
  2876. ee.EncodeSymbol(k2)
  2877. } else {
  2878. ee.EncodeString(c_UTF8, k2)
  2879. }
  2880. if esep {
  2881. ee.WriteMapElemValue()
  2882. }
  2883. e.encode(v[string(k2)])
  2884. }
  2885. } else {
  2886. for k2, v2 := range v {
  2887. if esep {
  2888. ee.WriteMapElemKey()
  2889. }
  2890. if asSymbols {
  2891. ee.EncodeSymbol(k2)
  2892. } else {
  2893. ee.EncodeString(c_UTF8, k2)
  2894. }
  2895. if esep {
  2896. ee.WriteMapElemValue()
  2897. }
  2898. e.encode(v2)
  2899. }
  2900. }
  2901. ee.WriteMapEnd()
  2902. }
  2903. func (e *Encoder) fastpathEncMapStringStringR(f *codecFnInfo, rv reflect.Value) {
  2904. fastpathTV.EncMapStringStringV(rv2i(rv).(map[string]string), e)
  2905. }
  2906. func (_ fastpathT) EncMapStringStringV(v map[string]string, e *Encoder) {
  2907. if v == nil {
  2908. e.e.EncodeNil()
  2909. return
  2910. }
  2911. ee, esep := e.e, e.hh.hasElemSeparators()
  2912. ee.WriteMapStart(len(v))
  2913. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  2914. if e.h.Canonical {
  2915. v2 := make([]string, len(v))
  2916. var i int
  2917. for k, _ := range v {
  2918. v2[i] = string(k)
  2919. i++
  2920. }
  2921. sort.Sort(stringSlice(v2))
  2922. for _, k2 := range v2 {
  2923. if esep {
  2924. ee.WriteMapElemKey()
  2925. }
  2926. if asSymbols {
  2927. ee.EncodeSymbol(k2)
  2928. } else {
  2929. ee.EncodeString(c_UTF8, k2)
  2930. }
  2931. if esep {
  2932. ee.WriteMapElemValue()
  2933. }
  2934. ee.EncodeString(c_UTF8, v[string(k2)])
  2935. }
  2936. } else {
  2937. for k2, v2 := range v {
  2938. if esep {
  2939. ee.WriteMapElemKey()
  2940. }
  2941. if asSymbols {
  2942. ee.EncodeSymbol(k2)
  2943. } else {
  2944. ee.EncodeString(c_UTF8, k2)
  2945. }
  2946. if esep {
  2947. ee.WriteMapElemValue()
  2948. }
  2949. ee.EncodeString(c_UTF8, v2)
  2950. }
  2951. }
  2952. ee.WriteMapEnd()
  2953. }
  2954. func (e *Encoder) fastpathEncMapStringUintR(f *codecFnInfo, rv reflect.Value) {
  2955. fastpathTV.EncMapStringUintV(rv2i(rv).(map[string]uint), e)
  2956. }
  2957. func (_ fastpathT) EncMapStringUintV(v map[string]uint, e *Encoder) {
  2958. if v == nil {
  2959. e.e.EncodeNil()
  2960. return
  2961. }
  2962. ee, esep := e.e, e.hh.hasElemSeparators()
  2963. ee.WriteMapStart(len(v))
  2964. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  2965. if e.h.Canonical {
  2966. v2 := make([]string, len(v))
  2967. var i int
  2968. for k, _ := range v {
  2969. v2[i] = string(k)
  2970. i++
  2971. }
  2972. sort.Sort(stringSlice(v2))
  2973. for _, k2 := range v2 {
  2974. if esep {
  2975. ee.WriteMapElemKey()
  2976. }
  2977. if asSymbols {
  2978. ee.EncodeSymbol(k2)
  2979. } else {
  2980. ee.EncodeString(c_UTF8, k2)
  2981. }
  2982. if esep {
  2983. ee.WriteMapElemValue()
  2984. }
  2985. ee.EncodeUint(uint64(v[string(k2)]))
  2986. }
  2987. } else {
  2988. for k2, v2 := range v {
  2989. if esep {
  2990. ee.WriteMapElemKey()
  2991. }
  2992. if asSymbols {
  2993. ee.EncodeSymbol(k2)
  2994. } else {
  2995. ee.EncodeString(c_UTF8, k2)
  2996. }
  2997. if esep {
  2998. ee.WriteMapElemValue()
  2999. }
  3000. ee.EncodeUint(uint64(v2))
  3001. }
  3002. }
  3003. ee.WriteMapEnd()
  3004. }
  3005. func (e *Encoder) fastpathEncMapStringUint8R(f *codecFnInfo, rv reflect.Value) {
  3006. fastpathTV.EncMapStringUint8V(rv2i(rv).(map[string]uint8), e)
  3007. }
  3008. func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, e *Encoder) {
  3009. if v == nil {
  3010. e.e.EncodeNil()
  3011. return
  3012. }
  3013. ee, esep := e.e, e.hh.hasElemSeparators()
  3014. ee.WriteMapStart(len(v))
  3015. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  3016. if e.h.Canonical {
  3017. v2 := make([]string, len(v))
  3018. var i int
  3019. for k, _ := range v {
  3020. v2[i] = string(k)
  3021. i++
  3022. }
  3023. sort.Sort(stringSlice(v2))
  3024. for _, k2 := range v2 {
  3025. if esep {
  3026. ee.WriteMapElemKey()
  3027. }
  3028. if asSymbols {
  3029. ee.EncodeSymbol(k2)
  3030. } else {
  3031. ee.EncodeString(c_UTF8, k2)
  3032. }
  3033. if esep {
  3034. ee.WriteMapElemValue()
  3035. }
  3036. ee.EncodeUint(uint64(v[string(k2)]))
  3037. }
  3038. } else {
  3039. for k2, v2 := range v {
  3040. if esep {
  3041. ee.WriteMapElemKey()
  3042. }
  3043. if asSymbols {
  3044. ee.EncodeSymbol(k2)
  3045. } else {
  3046. ee.EncodeString(c_UTF8, k2)
  3047. }
  3048. if esep {
  3049. ee.WriteMapElemValue()
  3050. }
  3051. ee.EncodeUint(uint64(v2))
  3052. }
  3053. }
  3054. ee.WriteMapEnd()
  3055. }
  3056. func (e *Encoder) fastpathEncMapStringUint16R(f *codecFnInfo, rv reflect.Value) {
  3057. fastpathTV.EncMapStringUint16V(rv2i(rv).(map[string]uint16), e)
  3058. }
  3059. func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, e *Encoder) {
  3060. if v == nil {
  3061. e.e.EncodeNil()
  3062. return
  3063. }
  3064. ee, esep := e.e, e.hh.hasElemSeparators()
  3065. ee.WriteMapStart(len(v))
  3066. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  3067. if e.h.Canonical {
  3068. v2 := make([]string, len(v))
  3069. var i int
  3070. for k, _ := range v {
  3071. v2[i] = string(k)
  3072. i++
  3073. }
  3074. sort.Sort(stringSlice(v2))
  3075. for _, k2 := range v2 {
  3076. if esep {
  3077. ee.WriteMapElemKey()
  3078. }
  3079. if asSymbols {
  3080. ee.EncodeSymbol(k2)
  3081. } else {
  3082. ee.EncodeString(c_UTF8, k2)
  3083. }
  3084. if esep {
  3085. ee.WriteMapElemValue()
  3086. }
  3087. ee.EncodeUint(uint64(v[string(k2)]))
  3088. }
  3089. } else {
  3090. for k2, v2 := range v {
  3091. if esep {
  3092. ee.WriteMapElemKey()
  3093. }
  3094. if asSymbols {
  3095. ee.EncodeSymbol(k2)
  3096. } else {
  3097. ee.EncodeString(c_UTF8, k2)
  3098. }
  3099. if esep {
  3100. ee.WriteMapElemValue()
  3101. }
  3102. ee.EncodeUint(uint64(v2))
  3103. }
  3104. }
  3105. ee.WriteMapEnd()
  3106. }
  3107. func (e *Encoder) fastpathEncMapStringUint32R(f *codecFnInfo, rv reflect.Value) {
  3108. fastpathTV.EncMapStringUint32V(rv2i(rv).(map[string]uint32), e)
  3109. }
  3110. func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, e *Encoder) {
  3111. if v == nil {
  3112. e.e.EncodeNil()
  3113. return
  3114. }
  3115. ee, esep := e.e, e.hh.hasElemSeparators()
  3116. ee.WriteMapStart(len(v))
  3117. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  3118. if e.h.Canonical {
  3119. v2 := make([]string, len(v))
  3120. var i int
  3121. for k, _ := range v {
  3122. v2[i] = string(k)
  3123. i++
  3124. }
  3125. sort.Sort(stringSlice(v2))
  3126. for _, k2 := range v2 {
  3127. if esep {
  3128. ee.WriteMapElemKey()
  3129. }
  3130. if asSymbols {
  3131. ee.EncodeSymbol(k2)
  3132. } else {
  3133. ee.EncodeString(c_UTF8, k2)
  3134. }
  3135. if esep {
  3136. ee.WriteMapElemValue()
  3137. }
  3138. ee.EncodeUint(uint64(v[string(k2)]))
  3139. }
  3140. } else {
  3141. for k2, v2 := range v {
  3142. if esep {
  3143. ee.WriteMapElemKey()
  3144. }
  3145. if asSymbols {
  3146. ee.EncodeSymbol(k2)
  3147. } else {
  3148. ee.EncodeString(c_UTF8, k2)
  3149. }
  3150. if esep {
  3151. ee.WriteMapElemValue()
  3152. }
  3153. ee.EncodeUint(uint64(v2))
  3154. }
  3155. }
  3156. ee.WriteMapEnd()
  3157. }
  3158. func (e *Encoder) fastpathEncMapStringUint64R(f *codecFnInfo, rv reflect.Value) {
  3159. fastpathTV.EncMapStringUint64V(rv2i(rv).(map[string]uint64), e)
  3160. }
  3161. func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, e *Encoder) {
  3162. if v == nil {
  3163. e.e.EncodeNil()
  3164. return
  3165. }
  3166. ee, esep := e.e, e.hh.hasElemSeparators()
  3167. ee.WriteMapStart(len(v))
  3168. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  3169. if e.h.Canonical {
  3170. v2 := make([]string, len(v))
  3171. var i int
  3172. for k, _ := range v {
  3173. v2[i] = string(k)
  3174. i++
  3175. }
  3176. sort.Sort(stringSlice(v2))
  3177. for _, k2 := range v2 {
  3178. if esep {
  3179. ee.WriteMapElemKey()
  3180. }
  3181. if asSymbols {
  3182. ee.EncodeSymbol(k2)
  3183. } else {
  3184. ee.EncodeString(c_UTF8, k2)
  3185. }
  3186. if esep {
  3187. ee.WriteMapElemValue()
  3188. }
  3189. ee.EncodeUint(uint64(v[string(k2)]))
  3190. }
  3191. } else {
  3192. for k2, v2 := range v {
  3193. if esep {
  3194. ee.WriteMapElemKey()
  3195. }
  3196. if asSymbols {
  3197. ee.EncodeSymbol(k2)
  3198. } else {
  3199. ee.EncodeString(c_UTF8, k2)
  3200. }
  3201. if esep {
  3202. ee.WriteMapElemValue()
  3203. }
  3204. ee.EncodeUint(uint64(v2))
  3205. }
  3206. }
  3207. ee.WriteMapEnd()
  3208. }
  3209. func (e *Encoder) fastpathEncMapStringUintptrR(f *codecFnInfo, rv reflect.Value) {
  3210. fastpathTV.EncMapStringUintptrV(rv2i(rv).(map[string]uintptr), e)
  3211. }
  3212. func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, e *Encoder) {
  3213. if v == nil {
  3214. e.e.EncodeNil()
  3215. return
  3216. }
  3217. ee, esep := e.e, e.hh.hasElemSeparators()
  3218. ee.WriteMapStart(len(v))
  3219. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  3220. if e.h.Canonical {
  3221. v2 := make([]string, len(v))
  3222. var i int
  3223. for k, _ := range v {
  3224. v2[i] = string(k)
  3225. i++
  3226. }
  3227. sort.Sort(stringSlice(v2))
  3228. for _, k2 := range v2 {
  3229. if esep {
  3230. ee.WriteMapElemKey()
  3231. }
  3232. if asSymbols {
  3233. ee.EncodeSymbol(k2)
  3234. } else {
  3235. ee.EncodeString(c_UTF8, k2)
  3236. }
  3237. if esep {
  3238. ee.WriteMapElemValue()
  3239. }
  3240. e.encode(v[string(k2)])
  3241. }
  3242. } else {
  3243. for k2, v2 := range v {
  3244. if esep {
  3245. ee.WriteMapElemKey()
  3246. }
  3247. if asSymbols {
  3248. ee.EncodeSymbol(k2)
  3249. } else {
  3250. ee.EncodeString(c_UTF8, k2)
  3251. }
  3252. if esep {
  3253. ee.WriteMapElemValue()
  3254. }
  3255. e.encode(v2)
  3256. }
  3257. }
  3258. ee.WriteMapEnd()
  3259. }
  3260. func (e *Encoder) fastpathEncMapStringIntR(f *codecFnInfo, rv reflect.Value) {
  3261. fastpathTV.EncMapStringIntV(rv2i(rv).(map[string]int), e)
  3262. }
  3263. func (_ fastpathT) EncMapStringIntV(v map[string]int, e *Encoder) {
  3264. if v == nil {
  3265. e.e.EncodeNil()
  3266. return
  3267. }
  3268. ee, esep := e.e, e.hh.hasElemSeparators()
  3269. ee.WriteMapStart(len(v))
  3270. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  3271. if e.h.Canonical {
  3272. v2 := make([]string, len(v))
  3273. var i int
  3274. for k, _ := range v {
  3275. v2[i] = string(k)
  3276. i++
  3277. }
  3278. sort.Sort(stringSlice(v2))
  3279. for _, k2 := range v2 {
  3280. if esep {
  3281. ee.WriteMapElemKey()
  3282. }
  3283. if asSymbols {
  3284. ee.EncodeSymbol(k2)
  3285. } else {
  3286. ee.EncodeString(c_UTF8, k2)
  3287. }
  3288. if esep {
  3289. ee.WriteMapElemValue()
  3290. }
  3291. ee.EncodeInt(int64(v[string(k2)]))
  3292. }
  3293. } else {
  3294. for k2, v2 := range v {
  3295. if esep {
  3296. ee.WriteMapElemKey()
  3297. }
  3298. if asSymbols {
  3299. ee.EncodeSymbol(k2)
  3300. } else {
  3301. ee.EncodeString(c_UTF8, k2)
  3302. }
  3303. if esep {
  3304. ee.WriteMapElemValue()
  3305. }
  3306. ee.EncodeInt(int64(v2))
  3307. }
  3308. }
  3309. ee.WriteMapEnd()
  3310. }
  3311. func (e *Encoder) fastpathEncMapStringInt8R(f *codecFnInfo, rv reflect.Value) {
  3312. fastpathTV.EncMapStringInt8V(rv2i(rv).(map[string]int8), e)
  3313. }
  3314. func (_ fastpathT) EncMapStringInt8V(v map[string]int8, e *Encoder) {
  3315. if v == nil {
  3316. e.e.EncodeNil()
  3317. return
  3318. }
  3319. ee, esep := e.e, e.hh.hasElemSeparators()
  3320. ee.WriteMapStart(len(v))
  3321. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  3322. if e.h.Canonical {
  3323. v2 := make([]string, len(v))
  3324. var i int
  3325. for k, _ := range v {
  3326. v2[i] = string(k)
  3327. i++
  3328. }
  3329. sort.Sort(stringSlice(v2))
  3330. for _, k2 := range v2 {
  3331. if esep {
  3332. ee.WriteMapElemKey()
  3333. }
  3334. if asSymbols {
  3335. ee.EncodeSymbol(k2)
  3336. } else {
  3337. ee.EncodeString(c_UTF8, k2)
  3338. }
  3339. if esep {
  3340. ee.WriteMapElemValue()
  3341. }
  3342. ee.EncodeInt(int64(v[string(k2)]))
  3343. }
  3344. } else {
  3345. for k2, v2 := range v {
  3346. if esep {
  3347. ee.WriteMapElemKey()
  3348. }
  3349. if asSymbols {
  3350. ee.EncodeSymbol(k2)
  3351. } else {
  3352. ee.EncodeString(c_UTF8, k2)
  3353. }
  3354. if esep {
  3355. ee.WriteMapElemValue()
  3356. }
  3357. ee.EncodeInt(int64(v2))
  3358. }
  3359. }
  3360. ee.WriteMapEnd()
  3361. }
  3362. func (e *Encoder) fastpathEncMapStringInt16R(f *codecFnInfo, rv reflect.Value) {
  3363. fastpathTV.EncMapStringInt16V(rv2i(rv).(map[string]int16), e)
  3364. }
  3365. func (_ fastpathT) EncMapStringInt16V(v map[string]int16, e *Encoder) {
  3366. if v == nil {
  3367. e.e.EncodeNil()
  3368. return
  3369. }
  3370. ee, esep := e.e, e.hh.hasElemSeparators()
  3371. ee.WriteMapStart(len(v))
  3372. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  3373. if e.h.Canonical {
  3374. v2 := make([]string, len(v))
  3375. var i int
  3376. for k, _ := range v {
  3377. v2[i] = string(k)
  3378. i++
  3379. }
  3380. sort.Sort(stringSlice(v2))
  3381. for _, k2 := range v2 {
  3382. if esep {
  3383. ee.WriteMapElemKey()
  3384. }
  3385. if asSymbols {
  3386. ee.EncodeSymbol(k2)
  3387. } else {
  3388. ee.EncodeString(c_UTF8, k2)
  3389. }
  3390. if esep {
  3391. ee.WriteMapElemValue()
  3392. }
  3393. ee.EncodeInt(int64(v[string(k2)]))
  3394. }
  3395. } else {
  3396. for k2, v2 := range v {
  3397. if esep {
  3398. ee.WriteMapElemKey()
  3399. }
  3400. if asSymbols {
  3401. ee.EncodeSymbol(k2)
  3402. } else {
  3403. ee.EncodeString(c_UTF8, k2)
  3404. }
  3405. if esep {
  3406. ee.WriteMapElemValue()
  3407. }
  3408. ee.EncodeInt(int64(v2))
  3409. }
  3410. }
  3411. ee.WriteMapEnd()
  3412. }
  3413. func (e *Encoder) fastpathEncMapStringInt32R(f *codecFnInfo, rv reflect.Value) {
  3414. fastpathTV.EncMapStringInt32V(rv2i(rv).(map[string]int32), e)
  3415. }
  3416. func (_ fastpathT) EncMapStringInt32V(v map[string]int32, e *Encoder) {
  3417. if v == nil {
  3418. e.e.EncodeNil()
  3419. return
  3420. }
  3421. ee, esep := e.e, e.hh.hasElemSeparators()
  3422. ee.WriteMapStart(len(v))
  3423. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  3424. if e.h.Canonical {
  3425. v2 := make([]string, len(v))
  3426. var i int
  3427. for k, _ := range v {
  3428. v2[i] = string(k)
  3429. i++
  3430. }
  3431. sort.Sort(stringSlice(v2))
  3432. for _, k2 := range v2 {
  3433. if esep {
  3434. ee.WriteMapElemKey()
  3435. }
  3436. if asSymbols {
  3437. ee.EncodeSymbol(k2)
  3438. } else {
  3439. ee.EncodeString(c_UTF8, k2)
  3440. }
  3441. if esep {
  3442. ee.WriteMapElemValue()
  3443. }
  3444. ee.EncodeInt(int64(v[string(k2)]))
  3445. }
  3446. } else {
  3447. for k2, v2 := range v {
  3448. if esep {
  3449. ee.WriteMapElemKey()
  3450. }
  3451. if asSymbols {
  3452. ee.EncodeSymbol(k2)
  3453. } else {
  3454. ee.EncodeString(c_UTF8, k2)
  3455. }
  3456. if esep {
  3457. ee.WriteMapElemValue()
  3458. }
  3459. ee.EncodeInt(int64(v2))
  3460. }
  3461. }
  3462. ee.WriteMapEnd()
  3463. }
  3464. func (e *Encoder) fastpathEncMapStringInt64R(f *codecFnInfo, rv reflect.Value) {
  3465. fastpathTV.EncMapStringInt64V(rv2i(rv).(map[string]int64), e)
  3466. }
  3467. func (_ fastpathT) EncMapStringInt64V(v map[string]int64, e *Encoder) {
  3468. if v == nil {
  3469. e.e.EncodeNil()
  3470. return
  3471. }
  3472. ee, esep := e.e, e.hh.hasElemSeparators()
  3473. ee.WriteMapStart(len(v))
  3474. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  3475. if e.h.Canonical {
  3476. v2 := make([]string, len(v))
  3477. var i int
  3478. for k, _ := range v {
  3479. v2[i] = string(k)
  3480. i++
  3481. }
  3482. sort.Sort(stringSlice(v2))
  3483. for _, k2 := range v2 {
  3484. if esep {
  3485. ee.WriteMapElemKey()
  3486. }
  3487. if asSymbols {
  3488. ee.EncodeSymbol(k2)
  3489. } else {
  3490. ee.EncodeString(c_UTF8, k2)
  3491. }
  3492. if esep {
  3493. ee.WriteMapElemValue()
  3494. }
  3495. ee.EncodeInt(int64(v[string(k2)]))
  3496. }
  3497. } else {
  3498. for k2, v2 := range v {
  3499. if esep {
  3500. ee.WriteMapElemKey()
  3501. }
  3502. if asSymbols {
  3503. ee.EncodeSymbol(k2)
  3504. } else {
  3505. ee.EncodeString(c_UTF8, k2)
  3506. }
  3507. if esep {
  3508. ee.WriteMapElemValue()
  3509. }
  3510. ee.EncodeInt(int64(v2))
  3511. }
  3512. }
  3513. ee.WriteMapEnd()
  3514. }
  3515. func (e *Encoder) fastpathEncMapStringFloat32R(f *codecFnInfo, rv reflect.Value) {
  3516. fastpathTV.EncMapStringFloat32V(rv2i(rv).(map[string]float32), e)
  3517. }
  3518. func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, e *Encoder) {
  3519. if v == nil {
  3520. e.e.EncodeNil()
  3521. return
  3522. }
  3523. ee, esep := e.e, e.hh.hasElemSeparators()
  3524. ee.WriteMapStart(len(v))
  3525. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  3526. if e.h.Canonical {
  3527. v2 := make([]string, len(v))
  3528. var i int
  3529. for k, _ := range v {
  3530. v2[i] = string(k)
  3531. i++
  3532. }
  3533. sort.Sort(stringSlice(v2))
  3534. for _, k2 := range v2 {
  3535. if esep {
  3536. ee.WriteMapElemKey()
  3537. }
  3538. if asSymbols {
  3539. ee.EncodeSymbol(k2)
  3540. } else {
  3541. ee.EncodeString(c_UTF8, k2)
  3542. }
  3543. if esep {
  3544. ee.WriteMapElemValue()
  3545. }
  3546. ee.EncodeFloat32(v[string(k2)])
  3547. }
  3548. } else {
  3549. for k2, v2 := range v {
  3550. if esep {
  3551. ee.WriteMapElemKey()
  3552. }
  3553. if asSymbols {
  3554. ee.EncodeSymbol(k2)
  3555. } else {
  3556. ee.EncodeString(c_UTF8, k2)
  3557. }
  3558. if esep {
  3559. ee.WriteMapElemValue()
  3560. }
  3561. ee.EncodeFloat32(v2)
  3562. }
  3563. }
  3564. ee.WriteMapEnd()
  3565. }
  3566. func (e *Encoder) fastpathEncMapStringFloat64R(f *codecFnInfo, rv reflect.Value) {
  3567. fastpathTV.EncMapStringFloat64V(rv2i(rv).(map[string]float64), e)
  3568. }
  3569. func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, e *Encoder) {
  3570. if v == nil {
  3571. e.e.EncodeNil()
  3572. return
  3573. }
  3574. ee, esep := e.e, e.hh.hasElemSeparators()
  3575. ee.WriteMapStart(len(v))
  3576. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  3577. if e.h.Canonical {
  3578. v2 := make([]string, len(v))
  3579. var i int
  3580. for k, _ := range v {
  3581. v2[i] = string(k)
  3582. i++
  3583. }
  3584. sort.Sort(stringSlice(v2))
  3585. for _, k2 := range v2 {
  3586. if esep {
  3587. ee.WriteMapElemKey()
  3588. }
  3589. if asSymbols {
  3590. ee.EncodeSymbol(k2)
  3591. } else {
  3592. ee.EncodeString(c_UTF8, k2)
  3593. }
  3594. if esep {
  3595. ee.WriteMapElemValue()
  3596. }
  3597. ee.EncodeFloat64(v[string(k2)])
  3598. }
  3599. } else {
  3600. for k2, v2 := range v {
  3601. if esep {
  3602. ee.WriteMapElemKey()
  3603. }
  3604. if asSymbols {
  3605. ee.EncodeSymbol(k2)
  3606. } else {
  3607. ee.EncodeString(c_UTF8, k2)
  3608. }
  3609. if esep {
  3610. ee.WriteMapElemValue()
  3611. }
  3612. ee.EncodeFloat64(v2)
  3613. }
  3614. }
  3615. ee.WriteMapEnd()
  3616. }
  3617. func (e *Encoder) fastpathEncMapStringBoolR(f *codecFnInfo, rv reflect.Value) {
  3618. fastpathTV.EncMapStringBoolV(rv2i(rv).(map[string]bool), e)
  3619. }
  3620. func (_ fastpathT) EncMapStringBoolV(v map[string]bool, e *Encoder) {
  3621. if v == nil {
  3622. e.e.EncodeNil()
  3623. return
  3624. }
  3625. ee, esep := e.e, e.hh.hasElemSeparators()
  3626. ee.WriteMapStart(len(v))
  3627. asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
  3628. if e.h.Canonical {
  3629. v2 := make([]string, len(v))
  3630. var i int
  3631. for k, _ := range v {
  3632. v2[i] = string(k)
  3633. i++
  3634. }
  3635. sort.Sort(stringSlice(v2))
  3636. for _, k2 := range v2 {
  3637. if esep {
  3638. ee.WriteMapElemKey()
  3639. }
  3640. if asSymbols {
  3641. ee.EncodeSymbol(k2)
  3642. } else {
  3643. ee.EncodeString(c_UTF8, k2)
  3644. }
  3645. if esep {
  3646. ee.WriteMapElemValue()
  3647. }
  3648. ee.EncodeBool(v[string(k2)])
  3649. }
  3650. } else {
  3651. for k2, v2 := range v {
  3652. if esep {
  3653. ee.WriteMapElemKey()
  3654. }
  3655. if asSymbols {
  3656. ee.EncodeSymbol(k2)
  3657. } else {
  3658. ee.EncodeString(c_UTF8, k2)
  3659. }
  3660. if esep {
  3661. ee.WriteMapElemValue()
  3662. }
  3663. ee.EncodeBool(v2)
  3664. }
  3665. }
  3666. ee.WriteMapEnd()
  3667. }
  3668. func (e *Encoder) fastpathEncMapFloat32IntfR(f *codecFnInfo, rv reflect.Value) {
  3669. fastpathTV.EncMapFloat32IntfV(rv2i(rv).(map[float32]interface{}), e)
  3670. }
  3671. func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, e *Encoder) {
  3672. if v == nil {
  3673. e.e.EncodeNil()
  3674. return
  3675. }
  3676. ee, esep := e.e, e.hh.hasElemSeparators()
  3677. ee.WriteMapStart(len(v))
  3678. if e.h.Canonical {
  3679. v2 := make([]float64, len(v))
  3680. var i int
  3681. for k, _ := range v {
  3682. v2[i] = float64(k)
  3683. i++
  3684. }
  3685. sort.Sort(floatSlice(v2))
  3686. for _, k2 := range v2 {
  3687. if esep {
  3688. ee.WriteMapElemKey()
  3689. }
  3690. ee.EncodeFloat32(float32(k2))
  3691. if esep {
  3692. ee.WriteMapElemValue()
  3693. }
  3694. e.encode(v[float32(k2)])
  3695. }
  3696. } else {
  3697. for k2, v2 := range v {
  3698. if esep {
  3699. ee.WriteMapElemKey()
  3700. }
  3701. ee.EncodeFloat32(k2)
  3702. if esep {
  3703. ee.WriteMapElemValue()
  3704. }
  3705. e.encode(v2)
  3706. }
  3707. }
  3708. ee.WriteMapEnd()
  3709. }
  3710. func (e *Encoder) fastpathEncMapFloat32StringR(f *codecFnInfo, rv reflect.Value) {
  3711. fastpathTV.EncMapFloat32StringV(rv2i(rv).(map[float32]string), e)
  3712. }
  3713. func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, e *Encoder) {
  3714. if v == nil {
  3715. e.e.EncodeNil()
  3716. return
  3717. }
  3718. ee, esep := e.e, e.hh.hasElemSeparators()
  3719. ee.WriteMapStart(len(v))
  3720. if e.h.Canonical {
  3721. v2 := make([]float64, len(v))
  3722. var i int
  3723. for k, _ := range v {
  3724. v2[i] = float64(k)
  3725. i++
  3726. }
  3727. sort.Sort(floatSlice(v2))
  3728. for _, k2 := range v2 {
  3729. if esep {
  3730. ee.WriteMapElemKey()
  3731. }
  3732. ee.EncodeFloat32(float32(k2))
  3733. if esep {
  3734. ee.WriteMapElemValue()
  3735. }
  3736. ee.EncodeString(c_UTF8, v[float32(k2)])
  3737. }
  3738. } else {
  3739. for k2, v2 := range v {
  3740. if esep {
  3741. ee.WriteMapElemKey()
  3742. }
  3743. ee.EncodeFloat32(k2)
  3744. if esep {
  3745. ee.WriteMapElemValue()
  3746. }
  3747. ee.EncodeString(c_UTF8, v2)
  3748. }
  3749. }
  3750. ee.WriteMapEnd()
  3751. }
  3752. func (e *Encoder) fastpathEncMapFloat32UintR(f *codecFnInfo, rv reflect.Value) {
  3753. fastpathTV.EncMapFloat32UintV(rv2i(rv).(map[float32]uint), e)
  3754. }
  3755. func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, e *Encoder) {
  3756. if v == nil {
  3757. e.e.EncodeNil()
  3758. return
  3759. }
  3760. ee, esep := e.e, e.hh.hasElemSeparators()
  3761. ee.WriteMapStart(len(v))
  3762. if e.h.Canonical {
  3763. v2 := make([]float64, len(v))
  3764. var i int
  3765. for k, _ := range v {
  3766. v2[i] = float64(k)
  3767. i++
  3768. }
  3769. sort.Sort(floatSlice(v2))
  3770. for _, k2 := range v2 {
  3771. if esep {
  3772. ee.WriteMapElemKey()
  3773. }
  3774. ee.EncodeFloat32(float32(k2))
  3775. if esep {
  3776. ee.WriteMapElemValue()
  3777. }
  3778. ee.EncodeUint(uint64(v[float32(k2)]))
  3779. }
  3780. } else {
  3781. for k2, v2 := range v {
  3782. if esep {
  3783. ee.WriteMapElemKey()
  3784. }
  3785. ee.EncodeFloat32(k2)
  3786. if esep {
  3787. ee.WriteMapElemValue()
  3788. }
  3789. ee.EncodeUint(uint64(v2))
  3790. }
  3791. }
  3792. ee.WriteMapEnd()
  3793. }
  3794. func (e *Encoder) fastpathEncMapFloat32Uint8R(f *codecFnInfo, rv reflect.Value) {
  3795. fastpathTV.EncMapFloat32Uint8V(rv2i(rv).(map[float32]uint8), e)
  3796. }
  3797. func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, e *Encoder) {
  3798. if v == nil {
  3799. e.e.EncodeNil()
  3800. return
  3801. }
  3802. ee, esep := e.e, e.hh.hasElemSeparators()
  3803. ee.WriteMapStart(len(v))
  3804. if e.h.Canonical {
  3805. v2 := make([]float64, len(v))
  3806. var i int
  3807. for k, _ := range v {
  3808. v2[i] = float64(k)
  3809. i++
  3810. }
  3811. sort.Sort(floatSlice(v2))
  3812. for _, k2 := range v2 {
  3813. if esep {
  3814. ee.WriteMapElemKey()
  3815. }
  3816. ee.EncodeFloat32(float32(k2))
  3817. if esep {
  3818. ee.WriteMapElemValue()
  3819. }
  3820. ee.EncodeUint(uint64(v[float32(k2)]))
  3821. }
  3822. } else {
  3823. for k2, v2 := range v {
  3824. if esep {
  3825. ee.WriteMapElemKey()
  3826. }
  3827. ee.EncodeFloat32(k2)
  3828. if esep {
  3829. ee.WriteMapElemValue()
  3830. }
  3831. ee.EncodeUint(uint64(v2))
  3832. }
  3833. }
  3834. ee.WriteMapEnd()
  3835. }
  3836. func (e *Encoder) fastpathEncMapFloat32Uint16R(f *codecFnInfo, rv reflect.Value) {
  3837. fastpathTV.EncMapFloat32Uint16V(rv2i(rv).(map[float32]uint16), e)
  3838. }
  3839. func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, e *Encoder) {
  3840. if v == nil {
  3841. e.e.EncodeNil()
  3842. return
  3843. }
  3844. ee, esep := e.e, e.hh.hasElemSeparators()
  3845. ee.WriteMapStart(len(v))
  3846. if e.h.Canonical {
  3847. v2 := make([]float64, len(v))
  3848. var i int
  3849. for k, _ := range v {
  3850. v2[i] = float64(k)
  3851. i++
  3852. }
  3853. sort.Sort(floatSlice(v2))
  3854. for _, k2 := range v2 {
  3855. if esep {
  3856. ee.WriteMapElemKey()
  3857. }
  3858. ee.EncodeFloat32(float32(k2))
  3859. if esep {
  3860. ee.WriteMapElemValue()
  3861. }
  3862. ee.EncodeUint(uint64(v[float32(k2)]))
  3863. }
  3864. } else {
  3865. for k2, v2 := range v {
  3866. if esep {
  3867. ee.WriteMapElemKey()
  3868. }
  3869. ee.EncodeFloat32(k2)
  3870. if esep {
  3871. ee.WriteMapElemValue()
  3872. }
  3873. ee.EncodeUint(uint64(v2))
  3874. }
  3875. }
  3876. ee.WriteMapEnd()
  3877. }
  3878. func (e *Encoder) fastpathEncMapFloat32Uint32R(f *codecFnInfo, rv reflect.Value) {
  3879. fastpathTV.EncMapFloat32Uint32V(rv2i(rv).(map[float32]uint32), e)
  3880. }
  3881. func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, e *Encoder) {
  3882. if v == nil {
  3883. e.e.EncodeNil()
  3884. return
  3885. }
  3886. ee, esep := e.e, e.hh.hasElemSeparators()
  3887. ee.WriteMapStart(len(v))
  3888. if e.h.Canonical {
  3889. v2 := make([]float64, len(v))
  3890. var i int
  3891. for k, _ := range v {
  3892. v2[i] = float64(k)
  3893. i++
  3894. }
  3895. sort.Sort(floatSlice(v2))
  3896. for _, k2 := range v2 {
  3897. if esep {
  3898. ee.WriteMapElemKey()
  3899. }
  3900. ee.EncodeFloat32(float32(k2))
  3901. if esep {
  3902. ee.WriteMapElemValue()
  3903. }
  3904. ee.EncodeUint(uint64(v[float32(k2)]))
  3905. }
  3906. } else {
  3907. for k2, v2 := range v {
  3908. if esep {
  3909. ee.WriteMapElemKey()
  3910. }
  3911. ee.EncodeFloat32(k2)
  3912. if esep {
  3913. ee.WriteMapElemValue()
  3914. }
  3915. ee.EncodeUint(uint64(v2))
  3916. }
  3917. }
  3918. ee.WriteMapEnd()
  3919. }
  3920. func (e *Encoder) fastpathEncMapFloat32Uint64R(f *codecFnInfo, rv reflect.Value) {
  3921. fastpathTV.EncMapFloat32Uint64V(rv2i(rv).(map[float32]uint64), e)
  3922. }
  3923. func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, e *Encoder) {
  3924. if v == nil {
  3925. e.e.EncodeNil()
  3926. return
  3927. }
  3928. ee, esep := e.e, e.hh.hasElemSeparators()
  3929. ee.WriteMapStart(len(v))
  3930. if e.h.Canonical {
  3931. v2 := make([]float64, len(v))
  3932. var i int
  3933. for k, _ := range v {
  3934. v2[i] = float64(k)
  3935. i++
  3936. }
  3937. sort.Sort(floatSlice(v2))
  3938. for _, k2 := range v2 {
  3939. if esep {
  3940. ee.WriteMapElemKey()
  3941. }
  3942. ee.EncodeFloat32(float32(k2))
  3943. if esep {
  3944. ee.WriteMapElemValue()
  3945. }
  3946. ee.EncodeUint(uint64(v[float32(k2)]))
  3947. }
  3948. } else {
  3949. for k2, v2 := range v {
  3950. if esep {
  3951. ee.WriteMapElemKey()
  3952. }
  3953. ee.EncodeFloat32(k2)
  3954. if esep {
  3955. ee.WriteMapElemValue()
  3956. }
  3957. ee.EncodeUint(uint64(v2))
  3958. }
  3959. }
  3960. ee.WriteMapEnd()
  3961. }
  3962. func (e *Encoder) fastpathEncMapFloat32UintptrR(f *codecFnInfo, rv reflect.Value) {
  3963. fastpathTV.EncMapFloat32UintptrV(rv2i(rv).(map[float32]uintptr), e)
  3964. }
  3965. func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, e *Encoder) {
  3966. if v == nil {
  3967. e.e.EncodeNil()
  3968. return
  3969. }
  3970. ee, esep := e.e, e.hh.hasElemSeparators()
  3971. ee.WriteMapStart(len(v))
  3972. if e.h.Canonical {
  3973. v2 := make([]float64, len(v))
  3974. var i int
  3975. for k, _ := range v {
  3976. v2[i] = float64(k)
  3977. i++
  3978. }
  3979. sort.Sort(floatSlice(v2))
  3980. for _, k2 := range v2 {
  3981. if esep {
  3982. ee.WriteMapElemKey()
  3983. }
  3984. ee.EncodeFloat32(float32(k2))
  3985. if esep {
  3986. ee.WriteMapElemValue()
  3987. }
  3988. e.encode(v[float32(k2)])
  3989. }
  3990. } else {
  3991. for k2, v2 := range v {
  3992. if esep {
  3993. ee.WriteMapElemKey()
  3994. }
  3995. ee.EncodeFloat32(k2)
  3996. if esep {
  3997. ee.WriteMapElemValue()
  3998. }
  3999. e.encode(v2)
  4000. }
  4001. }
  4002. ee.WriteMapEnd()
  4003. }
  4004. func (e *Encoder) fastpathEncMapFloat32IntR(f *codecFnInfo, rv reflect.Value) {
  4005. fastpathTV.EncMapFloat32IntV(rv2i(rv).(map[float32]int), e)
  4006. }
  4007. func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, e *Encoder) {
  4008. if v == nil {
  4009. e.e.EncodeNil()
  4010. return
  4011. }
  4012. ee, esep := e.e, e.hh.hasElemSeparators()
  4013. ee.WriteMapStart(len(v))
  4014. if e.h.Canonical {
  4015. v2 := make([]float64, len(v))
  4016. var i int
  4017. for k, _ := range v {
  4018. v2[i] = float64(k)
  4019. i++
  4020. }
  4021. sort.Sort(floatSlice(v2))
  4022. for _, k2 := range v2 {
  4023. if esep {
  4024. ee.WriteMapElemKey()
  4025. }
  4026. ee.EncodeFloat32(float32(k2))
  4027. if esep {
  4028. ee.WriteMapElemValue()
  4029. }
  4030. ee.EncodeInt(int64(v[float32(k2)]))
  4031. }
  4032. } else {
  4033. for k2, v2 := range v {
  4034. if esep {
  4035. ee.WriteMapElemKey()
  4036. }
  4037. ee.EncodeFloat32(k2)
  4038. if esep {
  4039. ee.WriteMapElemValue()
  4040. }
  4041. ee.EncodeInt(int64(v2))
  4042. }
  4043. }
  4044. ee.WriteMapEnd()
  4045. }
  4046. func (e *Encoder) fastpathEncMapFloat32Int8R(f *codecFnInfo, rv reflect.Value) {
  4047. fastpathTV.EncMapFloat32Int8V(rv2i(rv).(map[float32]int8), e)
  4048. }
  4049. func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, e *Encoder) {
  4050. if v == nil {
  4051. e.e.EncodeNil()
  4052. return
  4053. }
  4054. ee, esep := e.e, e.hh.hasElemSeparators()
  4055. ee.WriteMapStart(len(v))
  4056. if e.h.Canonical {
  4057. v2 := make([]float64, len(v))
  4058. var i int
  4059. for k, _ := range v {
  4060. v2[i] = float64(k)
  4061. i++
  4062. }
  4063. sort.Sort(floatSlice(v2))
  4064. for _, k2 := range v2 {
  4065. if esep {
  4066. ee.WriteMapElemKey()
  4067. }
  4068. ee.EncodeFloat32(float32(k2))
  4069. if esep {
  4070. ee.WriteMapElemValue()
  4071. }
  4072. ee.EncodeInt(int64(v[float32(k2)]))
  4073. }
  4074. } else {
  4075. for k2, v2 := range v {
  4076. if esep {
  4077. ee.WriteMapElemKey()
  4078. }
  4079. ee.EncodeFloat32(k2)
  4080. if esep {
  4081. ee.WriteMapElemValue()
  4082. }
  4083. ee.EncodeInt(int64(v2))
  4084. }
  4085. }
  4086. ee.WriteMapEnd()
  4087. }
  4088. func (e *Encoder) fastpathEncMapFloat32Int16R(f *codecFnInfo, rv reflect.Value) {
  4089. fastpathTV.EncMapFloat32Int16V(rv2i(rv).(map[float32]int16), e)
  4090. }
  4091. func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, e *Encoder) {
  4092. if v == nil {
  4093. e.e.EncodeNil()
  4094. return
  4095. }
  4096. ee, esep := e.e, e.hh.hasElemSeparators()
  4097. ee.WriteMapStart(len(v))
  4098. if e.h.Canonical {
  4099. v2 := make([]float64, len(v))
  4100. var i int
  4101. for k, _ := range v {
  4102. v2[i] = float64(k)
  4103. i++
  4104. }
  4105. sort.Sort(floatSlice(v2))
  4106. for _, k2 := range v2 {
  4107. if esep {
  4108. ee.WriteMapElemKey()
  4109. }
  4110. ee.EncodeFloat32(float32(k2))
  4111. if esep {
  4112. ee.WriteMapElemValue()
  4113. }
  4114. ee.EncodeInt(int64(v[float32(k2)]))
  4115. }
  4116. } else {
  4117. for k2, v2 := range v {
  4118. if esep {
  4119. ee.WriteMapElemKey()
  4120. }
  4121. ee.EncodeFloat32(k2)
  4122. if esep {
  4123. ee.WriteMapElemValue()
  4124. }
  4125. ee.EncodeInt(int64(v2))
  4126. }
  4127. }
  4128. ee.WriteMapEnd()
  4129. }
  4130. func (e *Encoder) fastpathEncMapFloat32Int32R(f *codecFnInfo, rv reflect.Value) {
  4131. fastpathTV.EncMapFloat32Int32V(rv2i(rv).(map[float32]int32), e)
  4132. }
  4133. func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, e *Encoder) {
  4134. if v == nil {
  4135. e.e.EncodeNil()
  4136. return
  4137. }
  4138. ee, esep := e.e, e.hh.hasElemSeparators()
  4139. ee.WriteMapStart(len(v))
  4140. if e.h.Canonical {
  4141. v2 := make([]float64, len(v))
  4142. var i int
  4143. for k, _ := range v {
  4144. v2[i] = float64(k)
  4145. i++
  4146. }
  4147. sort.Sort(floatSlice(v2))
  4148. for _, k2 := range v2 {
  4149. if esep {
  4150. ee.WriteMapElemKey()
  4151. }
  4152. ee.EncodeFloat32(float32(k2))
  4153. if esep {
  4154. ee.WriteMapElemValue()
  4155. }
  4156. ee.EncodeInt(int64(v[float32(k2)]))
  4157. }
  4158. } else {
  4159. for k2, v2 := range v {
  4160. if esep {
  4161. ee.WriteMapElemKey()
  4162. }
  4163. ee.EncodeFloat32(k2)
  4164. if esep {
  4165. ee.WriteMapElemValue()
  4166. }
  4167. ee.EncodeInt(int64(v2))
  4168. }
  4169. }
  4170. ee.WriteMapEnd()
  4171. }
  4172. func (e *Encoder) fastpathEncMapFloat32Int64R(f *codecFnInfo, rv reflect.Value) {
  4173. fastpathTV.EncMapFloat32Int64V(rv2i(rv).(map[float32]int64), e)
  4174. }
  4175. func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, e *Encoder) {
  4176. if v == nil {
  4177. e.e.EncodeNil()
  4178. return
  4179. }
  4180. ee, esep := e.e, e.hh.hasElemSeparators()
  4181. ee.WriteMapStart(len(v))
  4182. if e.h.Canonical {
  4183. v2 := make([]float64, len(v))
  4184. var i int
  4185. for k, _ := range v {
  4186. v2[i] = float64(k)
  4187. i++
  4188. }
  4189. sort.Sort(floatSlice(v2))
  4190. for _, k2 := range v2 {
  4191. if esep {
  4192. ee.WriteMapElemKey()
  4193. }
  4194. ee.EncodeFloat32(float32(k2))
  4195. if esep {
  4196. ee.WriteMapElemValue()
  4197. }
  4198. ee.EncodeInt(int64(v[float32(k2)]))
  4199. }
  4200. } else {
  4201. for k2, v2 := range v {
  4202. if esep {
  4203. ee.WriteMapElemKey()
  4204. }
  4205. ee.EncodeFloat32(k2)
  4206. if esep {
  4207. ee.WriteMapElemValue()
  4208. }
  4209. ee.EncodeInt(int64(v2))
  4210. }
  4211. }
  4212. ee.WriteMapEnd()
  4213. }
  4214. func (e *Encoder) fastpathEncMapFloat32Float32R(f *codecFnInfo, rv reflect.Value) {
  4215. fastpathTV.EncMapFloat32Float32V(rv2i(rv).(map[float32]float32), e)
  4216. }
  4217. func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, e *Encoder) {
  4218. if v == nil {
  4219. e.e.EncodeNil()
  4220. return
  4221. }
  4222. ee, esep := e.e, e.hh.hasElemSeparators()
  4223. ee.WriteMapStart(len(v))
  4224. if e.h.Canonical {
  4225. v2 := make([]float64, len(v))
  4226. var i int
  4227. for k, _ := range v {
  4228. v2[i] = float64(k)
  4229. i++
  4230. }
  4231. sort.Sort(floatSlice(v2))
  4232. for _, k2 := range v2 {
  4233. if esep {
  4234. ee.WriteMapElemKey()
  4235. }
  4236. ee.EncodeFloat32(float32(k2))
  4237. if esep {
  4238. ee.WriteMapElemValue()
  4239. }
  4240. ee.EncodeFloat32(v[float32(k2)])
  4241. }
  4242. } else {
  4243. for k2, v2 := range v {
  4244. if esep {
  4245. ee.WriteMapElemKey()
  4246. }
  4247. ee.EncodeFloat32(k2)
  4248. if esep {
  4249. ee.WriteMapElemValue()
  4250. }
  4251. ee.EncodeFloat32(v2)
  4252. }
  4253. }
  4254. ee.WriteMapEnd()
  4255. }
  4256. func (e *Encoder) fastpathEncMapFloat32Float64R(f *codecFnInfo, rv reflect.Value) {
  4257. fastpathTV.EncMapFloat32Float64V(rv2i(rv).(map[float32]float64), e)
  4258. }
  4259. func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, e *Encoder) {
  4260. if v == nil {
  4261. e.e.EncodeNil()
  4262. return
  4263. }
  4264. ee, esep := e.e, e.hh.hasElemSeparators()
  4265. ee.WriteMapStart(len(v))
  4266. if e.h.Canonical {
  4267. v2 := make([]float64, len(v))
  4268. var i int
  4269. for k, _ := range v {
  4270. v2[i] = float64(k)
  4271. i++
  4272. }
  4273. sort.Sort(floatSlice(v2))
  4274. for _, k2 := range v2 {
  4275. if esep {
  4276. ee.WriteMapElemKey()
  4277. }
  4278. ee.EncodeFloat32(float32(k2))
  4279. if esep {
  4280. ee.WriteMapElemValue()
  4281. }
  4282. ee.EncodeFloat64(v[float32(k2)])
  4283. }
  4284. } else {
  4285. for k2, v2 := range v {
  4286. if esep {
  4287. ee.WriteMapElemKey()
  4288. }
  4289. ee.EncodeFloat32(k2)
  4290. if esep {
  4291. ee.WriteMapElemValue()
  4292. }
  4293. ee.EncodeFloat64(v2)
  4294. }
  4295. }
  4296. ee.WriteMapEnd()
  4297. }
  4298. func (e *Encoder) fastpathEncMapFloat32BoolR(f *codecFnInfo, rv reflect.Value) {
  4299. fastpathTV.EncMapFloat32BoolV(rv2i(rv).(map[float32]bool), e)
  4300. }
  4301. func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, e *Encoder) {
  4302. if v == nil {
  4303. e.e.EncodeNil()
  4304. return
  4305. }
  4306. ee, esep := e.e, e.hh.hasElemSeparators()
  4307. ee.WriteMapStart(len(v))
  4308. if e.h.Canonical {
  4309. v2 := make([]float64, len(v))
  4310. var i int
  4311. for k, _ := range v {
  4312. v2[i] = float64(k)
  4313. i++
  4314. }
  4315. sort.Sort(floatSlice(v2))
  4316. for _, k2 := range v2 {
  4317. if esep {
  4318. ee.WriteMapElemKey()
  4319. }
  4320. ee.EncodeFloat32(float32(k2))
  4321. if esep {
  4322. ee.WriteMapElemValue()
  4323. }
  4324. ee.EncodeBool(v[float32(k2)])
  4325. }
  4326. } else {
  4327. for k2, v2 := range v {
  4328. if esep {
  4329. ee.WriteMapElemKey()
  4330. }
  4331. ee.EncodeFloat32(k2)
  4332. if esep {
  4333. ee.WriteMapElemValue()
  4334. }
  4335. ee.EncodeBool(v2)
  4336. }
  4337. }
  4338. ee.WriteMapEnd()
  4339. }
  4340. func (e *Encoder) fastpathEncMapFloat64IntfR(f *codecFnInfo, rv reflect.Value) {
  4341. fastpathTV.EncMapFloat64IntfV(rv2i(rv).(map[float64]interface{}), e)
  4342. }
  4343. func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, e *Encoder) {
  4344. if v == nil {
  4345. e.e.EncodeNil()
  4346. return
  4347. }
  4348. ee, esep := e.e, e.hh.hasElemSeparators()
  4349. ee.WriteMapStart(len(v))
  4350. if e.h.Canonical {
  4351. v2 := make([]float64, len(v))
  4352. var i int
  4353. for k, _ := range v {
  4354. v2[i] = float64(k)
  4355. i++
  4356. }
  4357. sort.Sort(floatSlice(v2))
  4358. for _, k2 := range v2 {
  4359. if esep {
  4360. ee.WriteMapElemKey()
  4361. }
  4362. ee.EncodeFloat64(float64(k2))
  4363. if esep {
  4364. ee.WriteMapElemValue()
  4365. }
  4366. e.encode(v[float64(k2)])
  4367. }
  4368. } else {
  4369. for k2, v2 := range v {
  4370. if esep {
  4371. ee.WriteMapElemKey()
  4372. }
  4373. ee.EncodeFloat64(k2)
  4374. if esep {
  4375. ee.WriteMapElemValue()
  4376. }
  4377. e.encode(v2)
  4378. }
  4379. }
  4380. ee.WriteMapEnd()
  4381. }
  4382. func (e *Encoder) fastpathEncMapFloat64StringR(f *codecFnInfo, rv reflect.Value) {
  4383. fastpathTV.EncMapFloat64StringV(rv2i(rv).(map[float64]string), e)
  4384. }
  4385. func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, e *Encoder) {
  4386. if v == nil {
  4387. e.e.EncodeNil()
  4388. return
  4389. }
  4390. ee, esep := e.e, e.hh.hasElemSeparators()
  4391. ee.WriteMapStart(len(v))
  4392. if e.h.Canonical {
  4393. v2 := make([]float64, len(v))
  4394. var i int
  4395. for k, _ := range v {
  4396. v2[i] = float64(k)
  4397. i++
  4398. }
  4399. sort.Sort(floatSlice(v2))
  4400. for _, k2 := range v2 {
  4401. if esep {
  4402. ee.WriteMapElemKey()
  4403. }
  4404. ee.EncodeFloat64(float64(k2))
  4405. if esep {
  4406. ee.WriteMapElemValue()
  4407. }
  4408. ee.EncodeString(c_UTF8, v[float64(k2)])
  4409. }
  4410. } else {
  4411. for k2, v2 := range v {
  4412. if esep {
  4413. ee.WriteMapElemKey()
  4414. }
  4415. ee.EncodeFloat64(k2)
  4416. if esep {
  4417. ee.WriteMapElemValue()
  4418. }
  4419. ee.EncodeString(c_UTF8, v2)
  4420. }
  4421. }
  4422. ee.WriteMapEnd()
  4423. }
  4424. func (e *Encoder) fastpathEncMapFloat64UintR(f *codecFnInfo, rv reflect.Value) {
  4425. fastpathTV.EncMapFloat64UintV(rv2i(rv).(map[float64]uint), e)
  4426. }
  4427. func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, e *Encoder) {
  4428. if v == nil {
  4429. e.e.EncodeNil()
  4430. return
  4431. }
  4432. ee, esep := e.e, e.hh.hasElemSeparators()
  4433. ee.WriteMapStart(len(v))
  4434. if e.h.Canonical {
  4435. v2 := make([]float64, len(v))
  4436. var i int
  4437. for k, _ := range v {
  4438. v2[i] = float64(k)
  4439. i++
  4440. }
  4441. sort.Sort(floatSlice(v2))
  4442. for _, k2 := range v2 {
  4443. if esep {
  4444. ee.WriteMapElemKey()
  4445. }
  4446. ee.EncodeFloat64(float64(k2))
  4447. if esep {
  4448. ee.WriteMapElemValue()
  4449. }
  4450. ee.EncodeUint(uint64(v[float64(k2)]))
  4451. }
  4452. } else {
  4453. for k2, v2 := range v {
  4454. if esep {
  4455. ee.WriteMapElemKey()
  4456. }
  4457. ee.EncodeFloat64(k2)
  4458. if esep {
  4459. ee.WriteMapElemValue()
  4460. }
  4461. ee.EncodeUint(uint64(v2))
  4462. }
  4463. }
  4464. ee.WriteMapEnd()
  4465. }
  4466. func (e *Encoder) fastpathEncMapFloat64Uint8R(f *codecFnInfo, rv reflect.Value) {
  4467. fastpathTV.EncMapFloat64Uint8V(rv2i(rv).(map[float64]uint8), e)
  4468. }
  4469. func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, e *Encoder) {
  4470. if v == nil {
  4471. e.e.EncodeNil()
  4472. return
  4473. }
  4474. ee, esep := e.e, e.hh.hasElemSeparators()
  4475. ee.WriteMapStart(len(v))
  4476. if e.h.Canonical {
  4477. v2 := make([]float64, len(v))
  4478. var i int
  4479. for k, _ := range v {
  4480. v2[i] = float64(k)
  4481. i++
  4482. }
  4483. sort.Sort(floatSlice(v2))
  4484. for _, k2 := range v2 {
  4485. if esep {
  4486. ee.WriteMapElemKey()
  4487. }
  4488. ee.EncodeFloat64(float64(k2))
  4489. if esep {
  4490. ee.WriteMapElemValue()
  4491. }
  4492. ee.EncodeUint(uint64(v[float64(k2)]))
  4493. }
  4494. } else {
  4495. for k2, v2 := range v {
  4496. if esep {
  4497. ee.WriteMapElemKey()
  4498. }
  4499. ee.EncodeFloat64(k2)
  4500. if esep {
  4501. ee.WriteMapElemValue()
  4502. }
  4503. ee.EncodeUint(uint64(v2))
  4504. }
  4505. }
  4506. ee.WriteMapEnd()
  4507. }
  4508. func (e *Encoder) fastpathEncMapFloat64Uint16R(f *codecFnInfo, rv reflect.Value) {
  4509. fastpathTV.EncMapFloat64Uint16V(rv2i(rv).(map[float64]uint16), e)
  4510. }
  4511. func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, e *Encoder) {
  4512. if v == nil {
  4513. e.e.EncodeNil()
  4514. return
  4515. }
  4516. ee, esep := e.e, e.hh.hasElemSeparators()
  4517. ee.WriteMapStart(len(v))
  4518. if e.h.Canonical {
  4519. v2 := make([]float64, len(v))
  4520. var i int
  4521. for k, _ := range v {
  4522. v2[i] = float64(k)
  4523. i++
  4524. }
  4525. sort.Sort(floatSlice(v2))
  4526. for _, k2 := range v2 {
  4527. if esep {
  4528. ee.WriteMapElemKey()
  4529. }
  4530. ee.EncodeFloat64(float64(k2))
  4531. if esep {
  4532. ee.WriteMapElemValue()
  4533. }
  4534. ee.EncodeUint(uint64(v[float64(k2)]))
  4535. }
  4536. } else {
  4537. for k2, v2 := range v {
  4538. if esep {
  4539. ee.WriteMapElemKey()
  4540. }
  4541. ee.EncodeFloat64(k2)
  4542. if esep {
  4543. ee.WriteMapElemValue()
  4544. }
  4545. ee.EncodeUint(uint64(v2))
  4546. }
  4547. }
  4548. ee.WriteMapEnd()
  4549. }
  4550. func (e *Encoder) fastpathEncMapFloat64Uint32R(f *codecFnInfo, rv reflect.Value) {
  4551. fastpathTV.EncMapFloat64Uint32V(rv2i(rv).(map[float64]uint32), e)
  4552. }
  4553. func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, e *Encoder) {
  4554. if v == nil {
  4555. e.e.EncodeNil()
  4556. return
  4557. }
  4558. ee, esep := e.e, e.hh.hasElemSeparators()
  4559. ee.WriteMapStart(len(v))
  4560. if e.h.Canonical {
  4561. v2 := make([]float64, len(v))
  4562. var i int
  4563. for k, _ := range v {
  4564. v2[i] = float64(k)
  4565. i++
  4566. }
  4567. sort.Sort(floatSlice(v2))
  4568. for _, k2 := range v2 {
  4569. if esep {
  4570. ee.WriteMapElemKey()
  4571. }
  4572. ee.EncodeFloat64(float64(k2))
  4573. if esep {
  4574. ee.WriteMapElemValue()
  4575. }
  4576. ee.EncodeUint(uint64(v[float64(k2)]))
  4577. }
  4578. } else {
  4579. for k2, v2 := range v {
  4580. if esep {
  4581. ee.WriteMapElemKey()
  4582. }
  4583. ee.EncodeFloat64(k2)
  4584. if esep {
  4585. ee.WriteMapElemValue()
  4586. }
  4587. ee.EncodeUint(uint64(v2))
  4588. }
  4589. }
  4590. ee.WriteMapEnd()
  4591. }
  4592. func (e *Encoder) fastpathEncMapFloat64Uint64R(f *codecFnInfo, rv reflect.Value) {
  4593. fastpathTV.EncMapFloat64Uint64V(rv2i(rv).(map[float64]uint64), e)
  4594. }
  4595. func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, e *Encoder) {
  4596. if v == nil {
  4597. e.e.EncodeNil()
  4598. return
  4599. }
  4600. ee, esep := e.e, e.hh.hasElemSeparators()
  4601. ee.WriteMapStart(len(v))
  4602. if e.h.Canonical {
  4603. v2 := make([]float64, len(v))
  4604. var i int
  4605. for k, _ := range v {
  4606. v2[i] = float64(k)
  4607. i++
  4608. }
  4609. sort.Sort(floatSlice(v2))
  4610. for _, k2 := range v2 {
  4611. if esep {
  4612. ee.WriteMapElemKey()
  4613. }
  4614. ee.EncodeFloat64(float64(k2))
  4615. if esep {
  4616. ee.WriteMapElemValue()
  4617. }
  4618. ee.EncodeUint(uint64(v[float64(k2)]))
  4619. }
  4620. } else {
  4621. for k2, v2 := range v {
  4622. if esep {
  4623. ee.WriteMapElemKey()
  4624. }
  4625. ee.EncodeFloat64(k2)
  4626. if esep {
  4627. ee.WriteMapElemValue()
  4628. }
  4629. ee.EncodeUint(uint64(v2))
  4630. }
  4631. }
  4632. ee.WriteMapEnd()
  4633. }
  4634. func (e *Encoder) fastpathEncMapFloat64UintptrR(f *codecFnInfo, rv reflect.Value) {
  4635. fastpathTV.EncMapFloat64UintptrV(rv2i(rv).(map[float64]uintptr), e)
  4636. }
  4637. func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, e *Encoder) {
  4638. if v == nil {
  4639. e.e.EncodeNil()
  4640. return
  4641. }
  4642. ee, esep := e.e, e.hh.hasElemSeparators()
  4643. ee.WriteMapStart(len(v))
  4644. if e.h.Canonical {
  4645. v2 := make([]float64, len(v))
  4646. var i int
  4647. for k, _ := range v {
  4648. v2[i] = float64(k)
  4649. i++
  4650. }
  4651. sort.Sort(floatSlice(v2))
  4652. for _, k2 := range v2 {
  4653. if esep {
  4654. ee.WriteMapElemKey()
  4655. }
  4656. ee.EncodeFloat64(float64(k2))
  4657. if esep {
  4658. ee.WriteMapElemValue()
  4659. }
  4660. e.encode(v[float64(k2)])
  4661. }
  4662. } else {
  4663. for k2, v2 := range v {
  4664. if esep {
  4665. ee.WriteMapElemKey()
  4666. }
  4667. ee.EncodeFloat64(k2)
  4668. if esep {
  4669. ee.WriteMapElemValue()
  4670. }
  4671. e.encode(v2)
  4672. }
  4673. }
  4674. ee.WriteMapEnd()
  4675. }
  4676. func (e *Encoder) fastpathEncMapFloat64IntR(f *codecFnInfo, rv reflect.Value) {
  4677. fastpathTV.EncMapFloat64IntV(rv2i(rv).(map[float64]int), e)
  4678. }
  4679. func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, e *Encoder) {
  4680. if v == nil {
  4681. e.e.EncodeNil()
  4682. return
  4683. }
  4684. ee, esep := e.e, e.hh.hasElemSeparators()
  4685. ee.WriteMapStart(len(v))
  4686. if e.h.Canonical {
  4687. v2 := make([]float64, len(v))
  4688. var i int
  4689. for k, _ := range v {
  4690. v2[i] = float64(k)
  4691. i++
  4692. }
  4693. sort.Sort(floatSlice(v2))
  4694. for _, k2 := range v2 {
  4695. if esep {
  4696. ee.WriteMapElemKey()
  4697. }
  4698. ee.EncodeFloat64(float64(k2))
  4699. if esep {
  4700. ee.WriteMapElemValue()
  4701. }
  4702. ee.EncodeInt(int64(v[float64(k2)]))
  4703. }
  4704. } else {
  4705. for k2, v2 := range v {
  4706. if esep {
  4707. ee.WriteMapElemKey()
  4708. }
  4709. ee.EncodeFloat64(k2)
  4710. if esep {
  4711. ee.WriteMapElemValue()
  4712. }
  4713. ee.EncodeInt(int64(v2))
  4714. }
  4715. }
  4716. ee.WriteMapEnd()
  4717. }
  4718. func (e *Encoder) fastpathEncMapFloat64Int8R(f *codecFnInfo, rv reflect.Value) {
  4719. fastpathTV.EncMapFloat64Int8V(rv2i(rv).(map[float64]int8), e)
  4720. }
  4721. func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, e *Encoder) {
  4722. if v == nil {
  4723. e.e.EncodeNil()
  4724. return
  4725. }
  4726. ee, esep := e.e, e.hh.hasElemSeparators()
  4727. ee.WriteMapStart(len(v))
  4728. if e.h.Canonical {
  4729. v2 := make([]float64, len(v))
  4730. var i int
  4731. for k, _ := range v {
  4732. v2[i] = float64(k)
  4733. i++
  4734. }
  4735. sort.Sort(floatSlice(v2))
  4736. for _, k2 := range v2 {
  4737. if esep {
  4738. ee.WriteMapElemKey()
  4739. }
  4740. ee.EncodeFloat64(float64(k2))
  4741. if esep {
  4742. ee.WriteMapElemValue()
  4743. }
  4744. ee.EncodeInt(int64(v[float64(k2)]))
  4745. }
  4746. } else {
  4747. for k2, v2 := range v {
  4748. if esep {
  4749. ee.WriteMapElemKey()
  4750. }
  4751. ee.EncodeFloat64(k2)
  4752. if esep {
  4753. ee.WriteMapElemValue()
  4754. }
  4755. ee.EncodeInt(int64(v2))
  4756. }
  4757. }
  4758. ee.WriteMapEnd()
  4759. }
  4760. func (e *Encoder) fastpathEncMapFloat64Int16R(f *codecFnInfo, rv reflect.Value) {
  4761. fastpathTV.EncMapFloat64Int16V(rv2i(rv).(map[float64]int16), e)
  4762. }
  4763. func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, e *Encoder) {
  4764. if v == nil {
  4765. e.e.EncodeNil()
  4766. return
  4767. }
  4768. ee, esep := e.e, e.hh.hasElemSeparators()
  4769. ee.WriteMapStart(len(v))
  4770. if e.h.Canonical {
  4771. v2 := make([]float64, len(v))
  4772. var i int
  4773. for k, _ := range v {
  4774. v2[i] = float64(k)
  4775. i++
  4776. }
  4777. sort.Sort(floatSlice(v2))
  4778. for _, k2 := range v2 {
  4779. if esep {
  4780. ee.WriteMapElemKey()
  4781. }
  4782. ee.EncodeFloat64(float64(k2))
  4783. if esep {
  4784. ee.WriteMapElemValue()
  4785. }
  4786. ee.EncodeInt(int64(v[float64(k2)]))
  4787. }
  4788. } else {
  4789. for k2, v2 := range v {
  4790. if esep {
  4791. ee.WriteMapElemKey()
  4792. }
  4793. ee.EncodeFloat64(k2)
  4794. if esep {
  4795. ee.WriteMapElemValue()
  4796. }
  4797. ee.EncodeInt(int64(v2))
  4798. }
  4799. }
  4800. ee.WriteMapEnd()
  4801. }
  4802. func (e *Encoder) fastpathEncMapFloat64Int32R(f *codecFnInfo, rv reflect.Value) {
  4803. fastpathTV.EncMapFloat64Int32V(rv2i(rv).(map[float64]int32), e)
  4804. }
  4805. func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, e *Encoder) {
  4806. if v == nil {
  4807. e.e.EncodeNil()
  4808. return
  4809. }
  4810. ee, esep := e.e, e.hh.hasElemSeparators()
  4811. ee.WriteMapStart(len(v))
  4812. if e.h.Canonical {
  4813. v2 := make([]float64, len(v))
  4814. var i int
  4815. for k, _ := range v {
  4816. v2[i] = float64(k)
  4817. i++
  4818. }
  4819. sort.Sort(floatSlice(v2))
  4820. for _, k2 := range v2 {
  4821. if esep {
  4822. ee.WriteMapElemKey()
  4823. }
  4824. ee.EncodeFloat64(float64(k2))
  4825. if esep {
  4826. ee.WriteMapElemValue()
  4827. }
  4828. ee.EncodeInt(int64(v[float64(k2)]))
  4829. }
  4830. } else {
  4831. for k2, v2 := range v {
  4832. if esep {
  4833. ee.WriteMapElemKey()
  4834. }
  4835. ee.EncodeFloat64(k2)
  4836. if esep {
  4837. ee.WriteMapElemValue()
  4838. }
  4839. ee.EncodeInt(int64(v2))
  4840. }
  4841. }
  4842. ee.WriteMapEnd()
  4843. }
  4844. func (e *Encoder) fastpathEncMapFloat64Int64R(f *codecFnInfo, rv reflect.Value) {
  4845. fastpathTV.EncMapFloat64Int64V(rv2i(rv).(map[float64]int64), e)
  4846. }
  4847. func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, e *Encoder) {
  4848. if v == nil {
  4849. e.e.EncodeNil()
  4850. return
  4851. }
  4852. ee, esep := e.e, e.hh.hasElemSeparators()
  4853. ee.WriteMapStart(len(v))
  4854. if e.h.Canonical {
  4855. v2 := make([]float64, len(v))
  4856. var i int
  4857. for k, _ := range v {
  4858. v2[i] = float64(k)
  4859. i++
  4860. }
  4861. sort.Sort(floatSlice(v2))
  4862. for _, k2 := range v2 {
  4863. if esep {
  4864. ee.WriteMapElemKey()
  4865. }
  4866. ee.EncodeFloat64(float64(k2))
  4867. if esep {
  4868. ee.WriteMapElemValue()
  4869. }
  4870. ee.EncodeInt(int64(v[float64(k2)]))
  4871. }
  4872. } else {
  4873. for k2, v2 := range v {
  4874. if esep {
  4875. ee.WriteMapElemKey()
  4876. }
  4877. ee.EncodeFloat64(k2)
  4878. if esep {
  4879. ee.WriteMapElemValue()
  4880. }
  4881. ee.EncodeInt(int64(v2))
  4882. }
  4883. }
  4884. ee.WriteMapEnd()
  4885. }
  4886. func (e *Encoder) fastpathEncMapFloat64Float32R(f *codecFnInfo, rv reflect.Value) {
  4887. fastpathTV.EncMapFloat64Float32V(rv2i(rv).(map[float64]float32), e)
  4888. }
  4889. func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, e *Encoder) {
  4890. if v == nil {
  4891. e.e.EncodeNil()
  4892. return
  4893. }
  4894. ee, esep := e.e, e.hh.hasElemSeparators()
  4895. ee.WriteMapStart(len(v))
  4896. if e.h.Canonical {
  4897. v2 := make([]float64, len(v))
  4898. var i int
  4899. for k, _ := range v {
  4900. v2[i] = float64(k)
  4901. i++
  4902. }
  4903. sort.Sort(floatSlice(v2))
  4904. for _, k2 := range v2 {
  4905. if esep {
  4906. ee.WriteMapElemKey()
  4907. }
  4908. ee.EncodeFloat64(float64(k2))
  4909. if esep {
  4910. ee.WriteMapElemValue()
  4911. }
  4912. ee.EncodeFloat32(v[float64(k2)])
  4913. }
  4914. } else {
  4915. for k2, v2 := range v {
  4916. if esep {
  4917. ee.WriteMapElemKey()
  4918. }
  4919. ee.EncodeFloat64(k2)
  4920. if esep {
  4921. ee.WriteMapElemValue()
  4922. }
  4923. ee.EncodeFloat32(v2)
  4924. }
  4925. }
  4926. ee.WriteMapEnd()
  4927. }
  4928. func (e *Encoder) fastpathEncMapFloat64Float64R(f *codecFnInfo, rv reflect.Value) {
  4929. fastpathTV.EncMapFloat64Float64V(rv2i(rv).(map[float64]float64), e)
  4930. }
  4931. func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, e *Encoder) {
  4932. if v == nil {
  4933. e.e.EncodeNil()
  4934. return
  4935. }
  4936. ee, esep := e.e, e.hh.hasElemSeparators()
  4937. ee.WriteMapStart(len(v))
  4938. if e.h.Canonical {
  4939. v2 := make([]float64, len(v))
  4940. var i int
  4941. for k, _ := range v {
  4942. v2[i] = float64(k)
  4943. i++
  4944. }
  4945. sort.Sort(floatSlice(v2))
  4946. for _, k2 := range v2 {
  4947. if esep {
  4948. ee.WriteMapElemKey()
  4949. }
  4950. ee.EncodeFloat64(float64(k2))
  4951. if esep {
  4952. ee.WriteMapElemValue()
  4953. }
  4954. ee.EncodeFloat64(v[float64(k2)])
  4955. }
  4956. } else {
  4957. for k2, v2 := range v {
  4958. if esep {
  4959. ee.WriteMapElemKey()
  4960. }
  4961. ee.EncodeFloat64(k2)
  4962. if esep {
  4963. ee.WriteMapElemValue()
  4964. }
  4965. ee.EncodeFloat64(v2)
  4966. }
  4967. }
  4968. ee.WriteMapEnd()
  4969. }
  4970. func (e *Encoder) fastpathEncMapFloat64BoolR(f *codecFnInfo, rv reflect.Value) {
  4971. fastpathTV.EncMapFloat64BoolV(rv2i(rv).(map[float64]bool), e)
  4972. }
  4973. func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, e *Encoder) {
  4974. if v == nil {
  4975. e.e.EncodeNil()
  4976. return
  4977. }
  4978. ee, esep := e.e, e.hh.hasElemSeparators()
  4979. ee.WriteMapStart(len(v))
  4980. if e.h.Canonical {
  4981. v2 := make([]float64, len(v))
  4982. var i int
  4983. for k, _ := range v {
  4984. v2[i] = float64(k)
  4985. i++
  4986. }
  4987. sort.Sort(floatSlice(v2))
  4988. for _, k2 := range v2 {
  4989. if esep {
  4990. ee.WriteMapElemKey()
  4991. }
  4992. ee.EncodeFloat64(float64(k2))
  4993. if esep {
  4994. ee.WriteMapElemValue()
  4995. }
  4996. ee.EncodeBool(v[float64(k2)])
  4997. }
  4998. } else {
  4999. for k2, v2 := range v {
  5000. if esep {
  5001. ee.WriteMapElemKey()
  5002. }
  5003. ee.EncodeFloat64(k2)
  5004. if esep {
  5005. ee.WriteMapElemValue()
  5006. }
  5007. ee.EncodeBool(v2)
  5008. }
  5009. }
  5010. ee.WriteMapEnd()
  5011. }
  5012. func (e *Encoder) fastpathEncMapUintIntfR(f *codecFnInfo, rv reflect.Value) {
  5013. fastpathTV.EncMapUintIntfV(rv2i(rv).(map[uint]interface{}), e)
  5014. }
  5015. func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, e *Encoder) {
  5016. if v == nil {
  5017. e.e.EncodeNil()
  5018. return
  5019. }
  5020. ee, esep := e.e, e.hh.hasElemSeparators()
  5021. ee.WriteMapStart(len(v))
  5022. if e.h.Canonical {
  5023. v2 := make([]uint64, len(v))
  5024. var i int
  5025. for k, _ := range v {
  5026. v2[i] = uint64(k)
  5027. i++
  5028. }
  5029. sort.Sort(uintSlice(v2))
  5030. for _, k2 := range v2 {
  5031. if esep {
  5032. ee.WriteMapElemKey()
  5033. }
  5034. ee.EncodeUint(uint64(uint(k2)))
  5035. if esep {
  5036. ee.WriteMapElemValue()
  5037. }
  5038. e.encode(v[uint(k2)])
  5039. }
  5040. } else {
  5041. for k2, v2 := range v {
  5042. if esep {
  5043. ee.WriteMapElemKey()
  5044. }
  5045. ee.EncodeUint(uint64(k2))
  5046. if esep {
  5047. ee.WriteMapElemValue()
  5048. }
  5049. e.encode(v2)
  5050. }
  5051. }
  5052. ee.WriteMapEnd()
  5053. }
  5054. func (e *Encoder) fastpathEncMapUintStringR(f *codecFnInfo, rv reflect.Value) {
  5055. fastpathTV.EncMapUintStringV(rv2i(rv).(map[uint]string), e)
  5056. }
  5057. func (_ fastpathT) EncMapUintStringV(v map[uint]string, e *Encoder) {
  5058. if v == nil {
  5059. e.e.EncodeNil()
  5060. return
  5061. }
  5062. ee, esep := e.e, e.hh.hasElemSeparators()
  5063. ee.WriteMapStart(len(v))
  5064. if e.h.Canonical {
  5065. v2 := make([]uint64, len(v))
  5066. var i int
  5067. for k, _ := range v {
  5068. v2[i] = uint64(k)
  5069. i++
  5070. }
  5071. sort.Sort(uintSlice(v2))
  5072. for _, k2 := range v2 {
  5073. if esep {
  5074. ee.WriteMapElemKey()
  5075. }
  5076. ee.EncodeUint(uint64(uint(k2)))
  5077. if esep {
  5078. ee.WriteMapElemValue()
  5079. }
  5080. ee.EncodeString(c_UTF8, v[uint(k2)])
  5081. }
  5082. } else {
  5083. for k2, v2 := range v {
  5084. if esep {
  5085. ee.WriteMapElemKey()
  5086. }
  5087. ee.EncodeUint(uint64(k2))
  5088. if esep {
  5089. ee.WriteMapElemValue()
  5090. }
  5091. ee.EncodeString(c_UTF8, v2)
  5092. }
  5093. }
  5094. ee.WriteMapEnd()
  5095. }
  5096. func (e *Encoder) fastpathEncMapUintUintR(f *codecFnInfo, rv reflect.Value) {
  5097. fastpathTV.EncMapUintUintV(rv2i(rv).(map[uint]uint), e)
  5098. }
  5099. func (_ fastpathT) EncMapUintUintV(v map[uint]uint, e *Encoder) {
  5100. if v == nil {
  5101. e.e.EncodeNil()
  5102. return
  5103. }
  5104. ee, esep := e.e, e.hh.hasElemSeparators()
  5105. ee.WriteMapStart(len(v))
  5106. if e.h.Canonical {
  5107. v2 := make([]uint64, len(v))
  5108. var i int
  5109. for k, _ := range v {
  5110. v2[i] = uint64(k)
  5111. i++
  5112. }
  5113. sort.Sort(uintSlice(v2))
  5114. for _, k2 := range v2 {
  5115. if esep {
  5116. ee.WriteMapElemKey()
  5117. }
  5118. ee.EncodeUint(uint64(uint(k2)))
  5119. if esep {
  5120. ee.WriteMapElemValue()
  5121. }
  5122. ee.EncodeUint(uint64(v[uint(k2)]))
  5123. }
  5124. } else {
  5125. for k2, v2 := range v {
  5126. if esep {
  5127. ee.WriteMapElemKey()
  5128. }
  5129. ee.EncodeUint(uint64(k2))
  5130. if esep {
  5131. ee.WriteMapElemValue()
  5132. }
  5133. ee.EncodeUint(uint64(v2))
  5134. }
  5135. }
  5136. ee.WriteMapEnd()
  5137. }
  5138. func (e *Encoder) fastpathEncMapUintUint8R(f *codecFnInfo, rv reflect.Value) {
  5139. fastpathTV.EncMapUintUint8V(rv2i(rv).(map[uint]uint8), e)
  5140. }
  5141. func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, e *Encoder) {
  5142. if v == nil {
  5143. e.e.EncodeNil()
  5144. return
  5145. }
  5146. ee, esep := e.e, e.hh.hasElemSeparators()
  5147. ee.WriteMapStart(len(v))
  5148. if e.h.Canonical {
  5149. v2 := make([]uint64, len(v))
  5150. var i int
  5151. for k, _ := range v {
  5152. v2[i] = uint64(k)
  5153. i++
  5154. }
  5155. sort.Sort(uintSlice(v2))
  5156. for _, k2 := range v2 {
  5157. if esep {
  5158. ee.WriteMapElemKey()
  5159. }
  5160. ee.EncodeUint(uint64(uint(k2)))
  5161. if esep {
  5162. ee.WriteMapElemValue()
  5163. }
  5164. ee.EncodeUint(uint64(v[uint(k2)]))
  5165. }
  5166. } else {
  5167. for k2, v2 := range v {
  5168. if esep {
  5169. ee.WriteMapElemKey()
  5170. }
  5171. ee.EncodeUint(uint64(k2))
  5172. if esep {
  5173. ee.WriteMapElemValue()
  5174. }
  5175. ee.EncodeUint(uint64(v2))
  5176. }
  5177. }
  5178. ee.WriteMapEnd()
  5179. }
  5180. func (e *Encoder) fastpathEncMapUintUint16R(f *codecFnInfo, rv reflect.Value) {
  5181. fastpathTV.EncMapUintUint16V(rv2i(rv).(map[uint]uint16), e)
  5182. }
  5183. func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, e *Encoder) {
  5184. if v == nil {
  5185. e.e.EncodeNil()
  5186. return
  5187. }
  5188. ee, esep := e.e, e.hh.hasElemSeparators()
  5189. ee.WriteMapStart(len(v))
  5190. if e.h.Canonical {
  5191. v2 := make([]uint64, len(v))
  5192. var i int
  5193. for k, _ := range v {
  5194. v2[i] = uint64(k)
  5195. i++
  5196. }
  5197. sort.Sort(uintSlice(v2))
  5198. for _, k2 := range v2 {
  5199. if esep {
  5200. ee.WriteMapElemKey()
  5201. }
  5202. ee.EncodeUint(uint64(uint(k2)))
  5203. if esep {
  5204. ee.WriteMapElemValue()
  5205. }
  5206. ee.EncodeUint(uint64(v[uint(k2)]))
  5207. }
  5208. } else {
  5209. for k2, v2 := range v {
  5210. if esep {
  5211. ee.WriteMapElemKey()
  5212. }
  5213. ee.EncodeUint(uint64(k2))
  5214. if esep {
  5215. ee.WriteMapElemValue()
  5216. }
  5217. ee.EncodeUint(uint64(v2))
  5218. }
  5219. }
  5220. ee.WriteMapEnd()
  5221. }
  5222. func (e *Encoder) fastpathEncMapUintUint32R(f *codecFnInfo, rv reflect.Value) {
  5223. fastpathTV.EncMapUintUint32V(rv2i(rv).(map[uint]uint32), e)
  5224. }
  5225. func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, e *Encoder) {
  5226. if v == nil {
  5227. e.e.EncodeNil()
  5228. return
  5229. }
  5230. ee, esep := e.e, e.hh.hasElemSeparators()
  5231. ee.WriteMapStart(len(v))
  5232. if e.h.Canonical {
  5233. v2 := make([]uint64, len(v))
  5234. var i int
  5235. for k, _ := range v {
  5236. v2[i] = uint64(k)
  5237. i++
  5238. }
  5239. sort.Sort(uintSlice(v2))
  5240. for _, k2 := range v2 {
  5241. if esep {
  5242. ee.WriteMapElemKey()
  5243. }
  5244. ee.EncodeUint(uint64(uint(k2)))
  5245. if esep {
  5246. ee.WriteMapElemValue()
  5247. }
  5248. ee.EncodeUint(uint64(v[uint(k2)]))
  5249. }
  5250. } else {
  5251. for k2, v2 := range v {
  5252. if esep {
  5253. ee.WriteMapElemKey()
  5254. }
  5255. ee.EncodeUint(uint64(k2))
  5256. if esep {
  5257. ee.WriteMapElemValue()
  5258. }
  5259. ee.EncodeUint(uint64(v2))
  5260. }
  5261. }
  5262. ee.WriteMapEnd()
  5263. }
  5264. func (e *Encoder) fastpathEncMapUintUint64R(f *codecFnInfo, rv reflect.Value) {
  5265. fastpathTV.EncMapUintUint64V(rv2i(rv).(map[uint]uint64), e)
  5266. }
  5267. func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, e *Encoder) {
  5268. if v == nil {
  5269. e.e.EncodeNil()
  5270. return
  5271. }
  5272. ee, esep := e.e, e.hh.hasElemSeparators()
  5273. ee.WriteMapStart(len(v))
  5274. if e.h.Canonical {
  5275. v2 := make([]uint64, len(v))
  5276. var i int
  5277. for k, _ := range v {
  5278. v2[i] = uint64(k)
  5279. i++
  5280. }
  5281. sort.Sort(uintSlice(v2))
  5282. for _, k2 := range v2 {
  5283. if esep {
  5284. ee.WriteMapElemKey()
  5285. }
  5286. ee.EncodeUint(uint64(uint(k2)))
  5287. if esep {
  5288. ee.WriteMapElemValue()
  5289. }
  5290. ee.EncodeUint(uint64(v[uint(k2)]))
  5291. }
  5292. } else {
  5293. for k2, v2 := range v {
  5294. if esep {
  5295. ee.WriteMapElemKey()
  5296. }
  5297. ee.EncodeUint(uint64(k2))
  5298. if esep {
  5299. ee.WriteMapElemValue()
  5300. }
  5301. ee.EncodeUint(uint64(v2))
  5302. }
  5303. }
  5304. ee.WriteMapEnd()
  5305. }
  5306. func (e *Encoder) fastpathEncMapUintUintptrR(f *codecFnInfo, rv reflect.Value) {
  5307. fastpathTV.EncMapUintUintptrV(rv2i(rv).(map[uint]uintptr), e)
  5308. }
  5309. func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, e *Encoder) {
  5310. if v == nil {
  5311. e.e.EncodeNil()
  5312. return
  5313. }
  5314. ee, esep := e.e, e.hh.hasElemSeparators()
  5315. ee.WriteMapStart(len(v))
  5316. if e.h.Canonical {
  5317. v2 := make([]uint64, len(v))
  5318. var i int
  5319. for k, _ := range v {
  5320. v2[i] = uint64(k)
  5321. i++
  5322. }
  5323. sort.Sort(uintSlice(v2))
  5324. for _, k2 := range v2 {
  5325. if esep {
  5326. ee.WriteMapElemKey()
  5327. }
  5328. ee.EncodeUint(uint64(uint(k2)))
  5329. if esep {
  5330. ee.WriteMapElemValue()
  5331. }
  5332. e.encode(v[uint(k2)])
  5333. }
  5334. } else {
  5335. for k2, v2 := range v {
  5336. if esep {
  5337. ee.WriteMapElemKey()
  5338. }
  5339. ee.EncodeUint(uint64(k2))
  5340. if esep {
  5341. ee.WriteMapElemValue()
  5342. }
  5343. e.encode(v2)
  5344. }
  5345. }
  5346. ee.WriteMapEnd()
  5347. }
  5348. func (e *Encoder) fastpathEncMapUintIntR(f *codecFnInfo, rv reflect.Value) {
  5349. fastpathTV.EncMapUintIntV(rv2i(rv).(map[uint]int), e)
  5350. }
  5351. func (_ fastpathT) EncMapUintIntV(v map[uint]int, e *Encoder) {
  5352. if v == nil {
  5353. e.e.EncodeNil()
  5354. return
  5355. }
  5356. ee, esep := e.e, e.hh.hasElemSeparators()
  5357. ee.WriteMapStart(len(v))
  5358. if e.h.Canonical {
  5359. v2 := make([]uint64, len(v))
  5360. var i int
  5361. for k, _ := range v {
  5362. v2[i] = uint64(k)
  5363. i++
  5364. }
  5365. sort.Sort(uintSlice(v2))
  5366. for _, k2 := range v2 {
  5367. if esep {
  5368. ee.WriteMapElemKey()
  5369. }
  5370. ee.EncodeUint(uint64(uint(k2)))
  5371. if esep {
  5372. ee.WriteMapElemValue()
  5373. }
  5374. ee.EncodeInt(int64(v[uint(k2)]))
  5375. }
  5376. } else {
  5377. for k2, v2 := range v {
  5378. if esep {
  5379. ee.WriteMapElemKey()
  5380. }
  5381. ee.EncodeUint(uint64(k2))
  5382. if esep {
  5383. ee.WriteMapElemValue()
  5384. }
  5385. ee.EncodeInt(int64(v2))
  5386. }
  5387. }
  5388. ee.WriteMapEnd()
  5389. }
  5390. func (e *Encoder) fastpathEncMapUintInt8R(f *codecFnInfo, rv reflect.Value) {
  5391. fastpathTV.EncMapUintInt8V(rv2i(rv).(map[uint]int8), e)
  5392. }
  5393. func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, e *Encoder) {
  5394. if v == nil {
  5395. e.e.EncodeNil()
  5396. return
  5397. }
  5398. ee, esep := e.e, e.hh.hasElemSeparators()
  5399. ee.WriteMapStart(len(v))
  5400. if e.h.Canonical {
  5401. v2 := make([]uint64, len(v))
  5402. var i int
  5403. for k, _ := range v {
  5404. v2[i] = uint64(k)
  5405. i++
  5406. }
  5407. sort.Sort(uintSlice(v2))
  5408. for _, k2 := range v2 {
  5409. if esep {
  5410. ee.WriteMapElemKey()
  5411. }
  5412. ee.EncodeUint(uint64(uint(k2)))
  5413. if esep {
  5414. ee.WriteMapElemValue()
  5415. }
  5416. ee.EncodeInt(int64(v[uint(k2)]))
  5417. }
  5418. } else {
  5419. for k2, v2 := range v {
  5420. if esep {
  5421. ee.WriteMapElemKey()
  5422. }
  5423. ee.EncodeUint(uint64(k2))
  5424. if esep {
  5425. ee.WriteMapElemValue()
  5426. }
  5427. ee.EncodeInt(int64(v2))
  5428. }
  5429. }
  5430. ee.WriteMapEnd()
  5431. }
  5432. func (e *Encoder) fastpathEncMapUintInt16R(f *codecFnInfo, rv reflect.Value) {
  5433. fastpathTV.EncMapUintInt16V(rv2i(rv).(map[uint]int16), e)
  5434. }
  5435. func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, e *Encoder) {
  5436. if v == nil {
  5437. e.e.EncodeNil()
  5438. return
  5439. }
  5440. ee, esep := e.e, e.hh.hasElemSeparators()
  5441. ee.WriteMapStart(len(v))
  5442. if e.h.Canonical {
  5443. v2 := make([]uint64, len(v))
  5444. var i int
  5445. for k, _ := range v {
  5446. v2[i] = uint64(k)
  5447. i++
  5448. }
  5449. sort.Sort(uintSlice(v2))
  5450. for _, k2 := range v2 {
  5451. if esep {
  5452. ee.WriteMapElemKey()
  5453. }
  5454. ee.EncodeUint(uint64(uint(k2)))
  5455. if esep {
  5456. ee.WriteMapElemValue()
  5457. }
  5458. ee.EncodeInt(int64(v[uint(k2)]))
  5459. }
  5460. } else {
  5461. for k2, v2 := range v {
  5462. if esep {
  5463. ee.WriteMapElemKey()
  5464. }
  5465. ee.EncodeUint(uint64(k2))
  5466. if esep {
  5467. ee.WriteMapElemValue()
  5468. }
  5469. ee.EncodeInt(int64(v2))
  5470. }
  5471. }
  5472. ee.WriteMapEnd()
  5473. }
  5474. func (e *Encoder) fastpathEncMapUintInt32R(f *codecFnInfo, rv reflect.Value) {
  5475. fastpathTV.EncMapUintInt32V(rv2i(rv).(map[uint]int32), e)
  5476. }
  5477. func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, e *Encoder) {
  5478. if v == nil {
  5479. e.e.EncodeNil()
  5480. return
  5481. }
  5482. ee, esep := e.e, e.hh.hasElemSeparators()
  5483. ee.WriteMapStart(len(v))
  5484. if e.h.Canonical {
  5485. v2 := make([]uint64, len(v))
  5486. var i int
  5487. for k, _ := range v {
  5488. v2[i] = uint64(k)
  5489. i++
  5490. }
  5491. sort.Sort(uintSlice(v2))
  5492. for _, k2 := range v2 {
  5493. if esep {
  5494. ee.WriteMapElemKey()
  5495. }
  5496. ee.EncodeUint(uint64(uint(k2)))
  5497. if esep {
  5498. ee.WriteMapElemValue()
  5499. }
  5500. ee.EncodeInt(int64(v[uint(k2)]))
  5501. }
  5502. } else {
  5503. for k2, v2 := range v {
  5504. if esep {
  5505. ee.WriteMapElemKey()
  5506. }
  5507. ee.EncodeUint(uint64(k2))
  5508. if esep {
  5509. ee.WriteMapElemValue()
  5510. }
  5511. ee.EncodeInt(int64(v2))
  5512. }
  5513. }
  5514. ee.WriteMapEnd()
  5515. }
  5516. func (e *Encoder) fastpathEncMapUintInt64R(f *codecFnInfo, rv reflect.Value) {
  5517. fastpathTV.EncMapUintInt64V(rv2i(rv).(map[uint]int64), e)
  5518. }
  5519. func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, e *Encoder) {
  5520. if v == nil {
  5521. e.e.EncodeNil()
  5522. return
  5523. }
  5524. ee, esep := e.e, e.hh.hasElemSeparators()
  5525. ee.WriteMapStart(len(v))
  5526. if e.h.Canonical {
  5527. v2 := make([]uint64, len(v))
  5528. var i int
  5529. for k, _ := range v {
  5530. v2[i] = uint64(k)
  5531. i++
  5532. }
  5533. sort.Sort(uintSlice(v2))
  5534. for _, k2 := range v2 {
  5535. if esep {
  5536. ee.WriteMapElemKey()
  5537. }
  5538. ee.EncodeUint(uint64(uint(k2)))
  5539. if esep {
  5540. ee.WriteMapElemValue()
  5541. }
  5542. ee.EncodeInt(int64(v[uint(k2)]))
  5543. }
  5544. } else {
  5545. for k2, v2 := range v {
  5546. if esep {
  5547. ee.WriteMapElemKey()
  5548. }
  5549. ee.EncodeUint(uint64(k2))
  5550. if esep {
  5551. ee.WriteMapElemValue()
  5552. }
  5553. ee.EncodeInt(int64(v2))
  5554. }
  5555. }
  5556. ee.WriteMapEnd()
  5557. }
  5558. func (e *Encoder) fastpathEncMapUintFloat32R(f *codecFnInfo, rv reflect.Value) {
  5559. fastpathTV.EncMapUintFloat32V(rv2i(rv).(map[uint]float32), e)
  5560. }
  5561. func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, e *Encoder) {
  5562. if v == nil {
  5563. e.e.EncodeNil()
  5564. return
  5565. }
  5566. ee, esep := e.e, e.hh.hasElemSeparators()
  5567. ee.WriteMapStart(len(v))
  5568. if e.h.Canonical {
  5569. v2 := make([]uint64, len(v))
  5570. var i int
  5571. for k, _ := range v {
  5572. v2[i] = uint64(k)
  5573. i++
  5574. }
  5575. sort.Sort(uintSlice(v2))
  5576. for _, k2 := range v2 {
  5577. if esep {
  5578. ee.WriteMapElemKey()
  5579. }
  5580. ee.EncodeUint(uint64(uint(k2)))
  5581. if esep {
  5582. ee.WriteMapElemValue()
  5583. }
  5584. ee.EncodeFloat32(v[uint(k2)])
  5585. }
  5586. } else {
  5587. for k2, v2 := range v {
  5588. if esep {
  5589. ee.WriteMapElemKey()
  5590. }
  5591. ee.EncodeUint(uint64(k2))
  5592. if esep {
  5593. ee.WriteMapElemValue()
  5594. }
  5595. ee.EncodeFloat32(v2)
  5596. }
  5597. }
  5598. ee.WriteMapEnd()
  5599. }
  5600. func (e *Encoder) fastpathEncMapUintFloat64R(f *codecFnInfo, rv reflect.Value) {
  5601. fastpathTV.EncMapUintFloat64V(rv2i(rv).(map[uint]float64), e)
  5602. }
  5603. func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, e *Encoder) {
  5604. if v == nil {
  5605. e.e.EncodeNil()
  5606. return
  5607. }
  5608. ee, esep := e.e, e.hh.hasElemSeparators()
  5609. ee.WriteMapStart(len(v))
  5610. if e.h.Canonical {
  5611. v2 := make([]uint64, len(v))
  5612. var i int
  5613. for k, _ := range v {
  5614. v2[i] = uint64(k)
  5615. i++
  5616. }
  5617. sort.Sort(uintSlice(v2))
  5618. for _, k2 := range v2 {
  5619. if esep {
  5620. ee.WriteMapElemKey()
  5621. }
  5622. ee.EncodeUint(uint64(uint(k2)))
  5623. if esep {
  5624. ee.WriteMapElemValue()
  5625. }
  5626. ee.EncodeFloat64(v[uint(k2)])
  5627. }
  5628. } else {
  5629. for k2, v2 := range v {
  5630. if esep {
  5631. ee.WriteMapElemKey()
  5632. }
  5633. ee.EncodeUint(uint64(k2))
  5634. if esep {
  5635. ee.WriteMapElemValue()
  5636. }
  5637. ee.EncodeFloat64(v2)
  5638. }
  5639. }
  5640. ee.WriteMapEnd()
  5641. }
  5642. func (e *Encoder) fastpathEncMapUintBoolR(f *codecFnInfo, rv reflect.Value) {
  5643. fastpathTV.EncMapUintBoolV(rv2i(rv).(map[uint]bool), e)
  5644. }
  5645. func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, e *Encoder) {
  5646. if v == nil {
  5647. e.e.EncodeNil()
  5648. return
  5649. }
  5650. ee, esep := e.e, e.hh.hasElemSeparators()
  5651. ee.WriteMapStart(len(v))
  5652. if e.h.Canonical {
  5653. v2 := make([]uint64, len(v))
  5654. var i int
  5655. for k, _ := range v {
  5656. v2[i] = uint64(k)
  5657. i++
  5658. }
  5659. sort.Sort(uintSlice(v2))
  5660. for _, k2 := range v2 {
  5661. if esep {
  5662. ee.WriteMapElemKey()
  5663. }
  5664. ee.EncodeUint(uint64(uint(k2)))
  5665. if esep {
  5666. ee.WriteMapElemValue()
  5667. }
  5668. ee.EncodeBool(v[uint(k2)])
  5669. }
  5670. } else {
  5671. for k2, v2 := range v {
  5672. if esep {
  5673. ee.WriteMapElemKey()
  5674. }
  5675. ee.EncodeUint(uint64(k2))
  5676. if esep {
  5677. ee.WriteMapElemValue()
  5678. }
  5679. ee.EncodeBool(v2)
  5680. }
  5681. }
  5682. ee.WriteMapEnd()
  5683. }
  5684. func (e *Encoder) fastpathEncMapUint8IntfR(f *codecFnInfo, rv reflect.Value) {
  5685. fastpathTV.EncMapUint8IntfV(rv2i(rv).(map[uint8]interface{}), e)
  5686. }
  5687. func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, e *Encoder) {
  5688. if v == nil {
  5689. e.e.EncodeNil()
  5690. return
  5691. }
  5692. ee, esep := e.e, e.hh.hasElemSeparators()
  5693. ee.WriteMapStart(len(v))
  5694. if e.h.Canonical {
  5695. v2 := make([]uint64, len(v))
  5696. var i int
  5697. for k, _ := range v {
  5698. v2[i] = uint64(k)
  5699. i++
  5700. }
  5701. sort.Sort(uintSlice(v2))
  5702. for _, k2 := range v2 {
  5703. if esep {
  5704. ee.WriteMapElemKey()
  5705. }
  5706. ee.EncodeUint(uint64(uint8(k2)))
  5707. if esep {
  5708. ee.WriteMapElemValue()
  5709. }
  5710. e.encode(v[uint8(k2)])
  5711. }
  5712. } else {
  5713. for k2, v2 := range v {
  5714. if esep {
  5715. ee.WriteMapElemKey()
  5716. }
  5717. ee.EncodeUint(uint64(k2))
  5718. if esep {
  5719. ee.WriteMapElemValue()
  5720. }
  5721. e.encode(v2)
  5722. }
  5723. }
  5724. ee.WriteMapEnd()
  5725. }
  5726. func (e *Encoder) fastpathEncMapUint8StringR(f *codecFnInfo, rv reflect.Value) {
  5727. fastpathTV.EncMapUint8StringV(rv2i(rv).(map[uint8]string), e)
  5728. }
  5729. func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, e *Encoder) {
  5730. if v == nil {
  5731. e.e.EncodeNil()
  5732. return
  5733. }
  5734. ee, esep := e.e, e.hh.hasElemSeparators()
  5735. ee.WriteMapStart(len(v))
  5736. if e.h.Canonical {
  5737. v2 := make([]uint64, len(v))
  5738. var i int
  5739. for k, _ := range v {
  5740. v2[i] = uint64(k)
  5741. i++
  5742. }
  5743. sort.Sort(uintSlice(v2))
  5744. for _, k2 := range v2 {
  5745. if esep {
  5746. ee.WriteMapElemKey()
  5747. }
  5748. ee.EncodeUint(uint64(uint8(k2)))
  5749. if esep {
  5750. ee.WriteMapElemValue()
  5751. }
  5752. ee.EncodeString(c_UTF8, v[uint8(k2)])
  5753. }
  5754. } else {
  5755. for k2, v2 := range v {
  5756. if esep {
  5757. ee.WriteMapElemKey()
  5758. }
  5759. ee.EncodeUint(uint64(k2))
  5760. if esep {
  5761. ee.WriteMapElemValue()
  5762. }
  5763. ee.EncodeString(c_UTF8, v2)
  5764. }
  5765. }
  5766. ee.WriteMapEnd()
  5767. }
  5768. func (e *Encoder) fastpathEncMapUint8UintR(f *codecFnInfo, rv reflect.Value) {
  5769. fastpathTV.EncMapUint8UintV(rv2i(rv).(map[uint8]uint), e)
  5770. }
  5771. func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, e *Encoder) {
  5772. if v == nil {
  5773. e.e.EncodeNil()
  5774. return
  5775. }
  5776. ee, esep := e.e, e.hh.hasElemSeparators()
  5777. ee.WriteMapStart(len(v))
  5778. if e.h.Canonical {
  5779. v2 := make([]uint64, len(v))
  5780. var i int
  5781. for k, _ := range v {
  5782. v2[i] = uint64(k)
  5783. i++
  5784. }
  5785. sort.Sort(uintSlice(v2))
  5786. for _, k2 := range v2 {
  5787. if esep {
  5788. ee.WriteMapElemKey()
  5789. }
  5790. ee.EncodeUint(uint64(uint8(k2)))
  5791. if esep {
  5792. ee.WriteMapElemValue()
  5793. }
  5794. ee.EncodeUint(uint64(v[uint8(k2)]))
  5795. }
  5796. } else {
  5797. for k2, v2 := range v {
  5798. if esep {
  5799. ee.WriteMapElemKey()
  5800. }
  5801. ee.EncodeUint(uint64(k2))
  5802. if esep {
  5803. ee.WriteMapElemValue()
  5804. }
  5805. ee.EncodeUint(uint64(v2))
  5806. }
  5807. }
  5808. ee.WriteMapEnd()
  5809. }
  5810. func (e *Encoder) fastpathEncMapUint8Uint8R(f *codecFnInfo, rv reflect.Value) {
  5811. fastpathTV.EncMapUint8Uint8V(rv2i(rv).(map[uint8]uint8), e)
  5812. }
  5813. func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, e *Encoder) {
  5814. if v == nil {
  5815. e.e.EncodeNil()
  5816. return
  5817. }
  5818. ee, esep := e.e, e.hh.hasElemSeparators()
  5819. ee.WriteMapStart(len(v))
  5820. if e.h.Canonical {
  5821. v2 := make([]uint64, len(v))
  5822. var i int
  5823. for k, _ := range v {
  5824. v2[i] = uint64(k)
  5825. i++
  5826. }
  5827. sort.Sort(uintSlice(v2))
  5828. for _, k2 := range v2 {
  5829. if esep {
  5830. ee.WriteMapElemKey()
  5831. }
  5832. ee.EncodeUint(uint64(uint8(k2)))
  5833. if esep {
  5834. ee.WriteMapElemValue()
  5835. }
  5836. ee.EncodeUint(uint64(v[uint8(k2)]))
  5837. }
  5838. } else {
  5839. for k2, v2 := range v {
  5840. if esep {
  5841. ee.WriteMapElemKey()
  5842. }
  5843. ee.EncodeUint(uint64(k2))
  5844. if esep {
  5845. ee.WriteMapElemValue()
  5846. }
  5847. ee.EncodeUint(uint64(v2))
  5848. }
  5849. }
  5850. ee.WriteMapEnd()
  5851. }
  5852. func (e *Encoder) fastpathEncMapUint8Uint16R(f *codecFnInfo, rv reflect.Value) {
  5853. fastpathTV.EncMapUint8Uint16V(rv2i(rv).(map[uint8]uint16), e)
  5854. }
  5855. func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, e *Encoder) {
  5856. if v == nil {
  5857. e.e.EncodeNil()
  5858. return
  5859. }
  5860. ee, esep := e.e, e.hh.hasElemSeparators()
  5861. ee.WriteMapStart(len(v))
  5862. if e.h.Canonical {
  5863. v2 := make([]uint64, len(v))
  5864. var i int
  5865. for k, _ := range v {
  5866. v2[i] = uint64(k)
  5867. i++
  5868. }
  5869. sort.Sort(uintSlice(v2))
  5870. for _, k2 := range v2 {
  5871. if esep {
  5872. ee.WriteMapElemKey()
  5873. }
  5874. ee.EncodeUint(uint64(uint8(k2)))
  5875. if esep {
  5876. ee.WriteMapElemValue()
  5877. }
  5878. ee.EncodeUint(uint64(v[uint8(k2)]))
  5879. }
  5880. } else {
  5881. for k2, v2 := range v {
  5882. if esep {
  5883. ee.WriteMapElemKey()
  5884. }
  5885. ee.EncodeUint(uint64(k2))
  5886. if esep {
  5887. ee.WriteMapElemValue()
  5888. }
  5889. ee.EncodeUint(uint64(v2))
  5890. }
  5891. }
  5892. ee.WriteMapEnd()
  5893. }
  5894. func (e *Encoder) fastpathEncMapUint8Uint32R(f *codecFnInfo, rv reflect.Value) {
  5895. fastpathTV.EncMapUint8Uint32V(rv2i(rv).(map[uint8]uint32), e)
  5896. }
  5897. func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, e *Encoder) {
  5898. if v == nil {
  5899. e.e.EncodeNil()
  5900. return
  5901. }
  5902. ee, esep := e.e, e.hh.hasElemSeparators()
  5903. ee.WriteMapStart(len(v))
  5904. if e.h.Canonical {
  5905. v2 := make([]uint64, len(v))
  5906. var i int
  5907. for k, _ := range v {
  5908. v2[i] = uint64(k)
  5909. i++
  5910. }
  5911. sort.Sort(uintSlice(v2))
  5912. for _, k2 := range v2 {
  5913. if esep {
  5914. ee.WriteMapElemKey()
  5915. }
  5916. ee.EncodeUint(uint64(uint8(k2)))
  5917. if esep {
  5918. ee.WriteMapElemValue()
  5919. }
  5920. ee.EncodeUint(uint64(v[uint8(k2)]))
  5921. }
  5922. } else {
  5923. for k2, v2 := range v {
  5924. if esep {
  5925. ee.WriteMapElemKey()
  5926. }
  5927. ee.EncodeUint(uint64(k2))
  5928. if esep {
  5929. ee.WriteMapElemValue()
  5930. }
  5931. ee.EncodeUint(uint64(v2))
  5932. }
  5933. }
  5934. ee.WriteMapEnd()
  5935. }
  5936. func (e *Encoder) fastpathEncMapUint8Uint64R(f *codecFnInfo, rv reflect.Value) {
  5937. fastpathTV.EncMapUint8Uint64V(rv2i(rv).(map[uint8]uint64), e)
  5938. }
  5939. func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, e *Encoder) {
  5940. if v == nil {
  5941. e.e.EncodeNil()
  5942. return
  5943. }
  5944. ee, esep := e.e, e.hh.hasElemSeparators()
  5945. ee.WriteMapStart(len(v))
  5946. if e.h.Canonical {
  5947. v2 := make([]uint64, len(v))
  5948. var i int
  5949. for k, _ := range v {
  5950. v2[i] = uint64(k)
  5951. i++
  5952. }
  5953. sort.Sort(uintSlice(v2))
  5954. for _, k2 := range v2 {
  5955. if esep {
  5956. ee.WriteMapElemKey()
  5957. }
  5958. ee.EncodeUint(uint64(uint8(k2)))
  5959. if esep {
  5960. ee.WriteMapElemValue()
  5961. }
  5962. ee.EncodeUint(uint64(v[uint8(k2)]))
  5963. }
  5964. } else {
  5965. for k2, v2 := range v {
  5966. if esep {
  5967. ee.WriteMapElemKey()
  5968. }
  5969. ee.EncodeUint(uint64(k2))
  5970. if esep {
  5971. ee.WriteMapElemValue()
  5972. }
  5973. ee.EncodeUint(uint64(v2))
  5974. }
  5975. }
  5976. ee.WriteMapEnd()
  5977. }
  5978. func (e *Encoder) fastpathEncMapUint8UintptrR(f *codecFnInfo, rv reflect.Value) {
  5979. fastpathTV.EncMapUint8UintptrV(rv2i(rv).(map[uint8]uintptr), e)
  5980. }
  5981. func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, e *Encoder) {
  5982. if v == nil {
  5983. e.e.EncodeNil()
  5984. return
  5985. }
  5986. ee, esep := e.e, e.hh.hasElemSeparators()
  5987. ee.WriteMapStart(len(v))
  5988. if e.h.Canonical {
  5989. v2 := make([]uint64, len(v))
  5990. var i int
  5991. for k, _ := range v {
  5992. v2[i] = uint64(k)
  5993. i++
  5994. }
  5995. sort.Sort(uintSlice(v2))
  5996. for _, k2 := range v2 {
  5997. if esep {
  5998. ee.WriteMapElemKey()
  5999. }
  6000. ee.EncodeUint(uint64(uint8(k2)))
  6001. if esep {
  6002. ee.WriteMapElemValue()
  6003. }
  6004. e.encode(v[uint8(k2)])
  6005. }
  6006. } else {
  6007. for k2, v2 := range v {
  6008. if esep {
  6009. ee.WriteMapElemKey()
  6010. }
  6011. ee.EncodeUint(uint64(k2))
  6012. if esep {
  6013. ee.WriteMapElemValue()
  6014. }
  6015. e.encode(v2)
  6016. }
  6017. }
  6018. ee.WriteMapEnd()
  6019. }
  6020. func (e *Encoder) fastpathEncMapUint8IntR(f *codecFnInfo, rv reflect.Value) {
  6021. fastpathTV.EncMapUint8IntV(rv2i(rv).(map[uint8]int), e)
  6022. }
  6023. func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, e *Encoder) {
  6024. if v == nil {
  6025. e.e.EncodeNil()
  6026. return
  6027. }
  6028. ee, esep := e.e, e.hh.hasElemSeparators()
  6029. ee.WriteMapStart(len(v))
  6030. if e.h.Canonical {
  6031. v2 := make([]uint64, len(v))
  6032. var i int
  6033. for k, _ := range v {
  6034. v2[i] = uint64(k)
  6035. i++
  6036. }
  6037. sort.Sort(uintSlice(v2))
  6038. for _, k2 := range v2 {
  6039. if esep {
  6040. ee.WriteMapElemKey()
  6041. }
  6042. ee.EncodeUint(uint64(uint8(k2)))
  6043. if esep {
  6044. ee.WriteMapElemValue()
  6045. }
  6046. ee.EncodeInt(int64(v[uint8(k2)]))
  6047. }
  6048. } else {
  6049. for k2, v2 := range v {
  6050. if esep {
  6051. ee.WriteMapElemKey()
  6052. }
  6053. ee.EncodeUint(uint64(k2))
  6054. if esep {
  6055. ee.WriteMapElemValue()
  6056. }
  6057. ee.EncodeInt(int64(v2))
  6058. }
  6059. }
  6060. ee.WriteMapEnd()
  6061. }
  6062. func (e *Encoder) fastpathEncMapUint8Int8R(f *codecFnInfo, rv reflect.Value) {
  6063. fastpathTV.EncMapUint8Int8V(rv2i(rv).(map[uint8]int8), e)
  6064. }
  6065. func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, e *Encoder) {
  6066. if v == nil {
  6067. e.e.EncodeNil()
  6068. return
  6069. }
  6070. ee, esep := e.e, e.hh.hasElemSeparators()
  6071. ee.WriteMapStart(len(v))
  6072. if e.h.Canonical {
  6073. v2 := make([]uint64, len(v))
  6074. var i int
  6075. for k, _ := range v {
  6076. v2[i] = uint64(k)
  6077. i++
  6078. }
  6079. sort.Sort(uintSlice(v2))
  6080. for _, k2 := range v2 {
  6081. if esep {
  6082. ee.WriteMapElemKey()
  6083. }
  6084. ee.EncodeUint(uint64(uint8(k2)))
  6085. if esep {
  6086. ee.WriteMapElemValue()
  6087. }
  6088. ee.EncodeInt(int64(v[uint8(k2)]))
  6089. }
  6090. } else {
  6091. for k2, v2 := range v {
  6092. if esep {
  6093. ee.WriteMapElemKey()
  6094. }
  6095. ee.EncodeUint(uint64(k2))
  6096. if esep {
  6097. ee.WriteMapElemValue()
  6098. }
  6099. ee.EncodeInt(int64(v2))
  6100. }
  6101. }
  6102. ee.WriteMapEnd()
  6103. }
  6104. func (e *Encoder) fastpathEncMapUint8Int16R(f *codecFnInfo, rv reflect.Value) {
  6105. fastpathTV.EncMapUint8Int16V(rv2i(rv).(map[uint8]int16), e)
  6106. }
  6107. func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, e *Encoder) {
  6108. if v == nil {
  6109. e.e.EncodeNil()
  6110. return
  6111. }
  6112. ee, esep := e.e, e.hh.hasElemSeparators()
  6113. ee.WriteMapStart(len(v))
  6114. if e.h.Canonical {
  6115. v2 := make([]uint64, len(v))
  6116. var i int
  6117. for k, _ := range v {
  6118. v2[i] = uint64(k)
  6119. i++
  6120. }
  6121. sort.Sort(uintSlice(v2))
  6122. for _, k2 := range v2 {
  6123. if esep {
  6124. ee.WriteMapElemKey()
  6125. }
  6126. ee.EncodeUint(uint64(uint8(k2)))
  6127. if esep {
  6128. ee.WriteMapElemValue()
  6129. }
  6130. ee.EncodeInt(int64(v[uint8(k2)]))
  6131. }
  6132. } else {
  6133. for k2, v2 := range v {
  6134. if esep {
  6135. ee.WriteMapElemKey()
  6136. }
  6137. ee.EncodeUint(uint64(k2))
  6138. if esep {
  6139. ee.WriteMapElemValue()
  6140. }
  6141. ee.EncodeInt(int64(v2))
  6142. }
  6143. }
  6144. ee.WriteMapEnd()
  6145. }
  6146. func (e *Encoder) fastpathEncMapUint8Int32R(f *codecFnInfo, rv reflect.Value) {
  6147. fastpathTV.EncMapUint8Int32V(rv2i(rv).(map[uint8]int32), e)
  6148. }
  6149. func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, e *Encoder) {
  6150. if v == nil {
  6151. e.e.EncodeNil()
  6152. return
  6153. }
  6154. ee, esep := e.e, e.hh.hasElemSeparators()
  6155. ee.WriteMapStart(len(v))
  6156. if e.h.Canonical {
  6157. v2 := make([]uint64, len(v))
  6158. var i int
  6159. for k, _ := range v {
  6160. v2[i] = uint64(k)
  6161. i++
  6162. }
  6163. sort.Sort(uintSlice(v2))
  6164. for _, k2 := range v2 {
  6165. if esep {
  6166. ee.WriteMapElemKey()
  6167. }
  6168. ee.EncodeUint(uint64(uint8(k2)))
  6169. if esep {
  6170. ee.WriteMapElemValue()
  6171. }
  6172. ee.EncodeInt(int64(v[uint8(k2)]))
  6173. }
  6174. } else {
  6175. for k2, v2 := range v {
  6176. if esep {
  6177. ee.WriteMapElemKey()
  6178. }
  6179. ee.EncodeUint(uint64(k2))
  6180. if esep {
  6181. ee.WriteMapElemValue()
  6182. }
  6183. ee.EncodeInt(int64(v2))
  6184. }
  6185. }
  6186. ee.WriteMapEnd()
  6187. }
  6188. func (e *Encoder) fastpathEncMapUint8Int64R(f *codecFnInfo, rv reflect.Value) {
  6189. fastpathTV.EncMapUint8Int64V(rv2i(rv).(map[uint8]int64), e)
  6190. }
  6191. func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, e *Encoder) {
  6192. if v == nil {
  6193. e.e.EncodeNil()
  6194. return
  6195. }
  6196. ee, esep := e.e, e.hh.hasElemSeparators()
  6197. ee.WriteMapStart(len(v))
  6198. if e.h.Canonical {
  6199. v2 := make([]uint64, len(v))
  6200. var i int
  6201. for k, _ := range v {
  6202. v2[i] = uint64(k)
  6203. i++
  6204. }
  6205. sort.Sort(uintSlice(v2))
  6206. for _, k2 := range v2 {
  6207. if esep {
  6208. ee.WriteMapElemKey()
  6209. }
  6210. ee.EncodeUint(uint64(uint8(k2)))
  6211. if esep {
  6212. ee.WriteMapElemValue()
  6213. }
  6214. ee.EncodeInt(int64(v[uint8(k2)]))
  6215. }
  6216. } else {
  6217. for k2, v2 := range v {
  6218. if esep {
  6219. ee.WriteMapElemKey()
  6220. }
  6221. ee.EncodeUint(uint64(k2))
  6222. if esep {
  6223. ee.WriteMapElemValue()
  6224. }
  6225. ee.EncodeInt(int64(v2))
  6226. }
  6227. }
  6228. ee.WriteMapEnd()
  6229. }
  6230. func (e *Encoder) fastpathEncMapUint8Float32R(f *codecFnInfo, rv reflect.Value) {
  6231. fastpathTV.EncMapUint8Float32V(rv2i(rv).(map[uint8]float32), e)
  6232. }
  6233. func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, e *Encoder) {
  6234. if v == nil {
  6235. e.e.EncodeNil()
  6236. return
  6237. }
  6238. ee, esep := e.e, e.hh.hasElemSeparators()
  6239. ee.WriteMapStart(len(v))
  6240. if e.h.Canonical {
  6241. v2 := make([]uint64, len(v))
  6242. var i int
  6243. for k, _ := range v {
  6244. v2[i] = uint64(k)
  6245. i++
  6246. }
  6247. sort.Sort(uintSlice(v2))
  6248. for _, k2 := range v2 {
  6249. if esep {
  6250. ee.WriteMapElemKey()
  6251. }
  6252. ee.EncodeUint(uint64(uint8(k2)))
  6253. if esep {
  6254. ee.WriteMapElemValue()
  6255. }
  6256. ee.EncodeFloat32(v[uint8(k2)])
  6257. }
  6258. } else {
  6259. for k2, v2 := range v {
  6260. if esep {
  6261. ee.WriteMapElemKey()
  6262. }
  6263. ee.EncodeUint(uint64(k2))
  6264. if esep {
  6265. ee.WriteMapElemValue()
  6266. }
  6267. ee.EncodeFloat32(v2)
  6268. }
  6269. }
  6270. ee.WriteMapEnd()
  6271. }
  6272. func (e *Encoder) fastpathEncMapUint8Float64R(f *codecFnInfo, rv reflect.Value) {
  6273. fastpathTV.EncMapUint8Float64V(rv2i(rv).(map[uint8]float64), e)
  6274. }
  6275. func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, e *Encoder) {
  6276. if v == nil {
  6277. e.e.EncodeNil()
  6278. return
  6279. }
  6280. ee, esep := e.e, e.hh.hasElemSeparators()
  6281. ee.WriteMapStart(len(v))
  6282. if e.h.Canonical {
  6283. v2 := make([]uint64, len(v))
  6284. var i int
  6285. for k, _ := range v {
  6286. v2[i] = uint64(k)
  6287. i++
  6288. }
  6289. sort.Sort(uintSlice(v2))
  6290. for _, k2 := range v2 {
  6291. if esep {
  6292. ee.WriteMapElemKey()
  6293. }
  6294. ee.EncodeUint(uint64(uint8(k2)))
  6295. if esep {
  6296. ee.WriteMapElemValue()
  6297. }
  6298. ee.EncodeFloat64(v[uint8(k2)])
  6299. }
  6300. } else {
  6301. for k2, v2 := range v {
  6302. if esep {
  6303. ee.WriteMapElemKey()
  6304. }
  6305. ee.EncodeUint(uint64(k2))
  6306. if esep {
  6307. ee.WriteMapElemValue()
  6308. }
  6309. ee.EncodeFloat64(v2)
  6310. }
  6311. }
  6312. ee.WriteMapEnd()
  6313. }
  6314. func (e *Encoder) fastpathEncMapUint8BoolR(f *codecFnInfo, rv reflect.Value) {
  6315. fastpathTV.EncMapUint8BoolV(rv2i(rv).(map[uint8]bool), e)
  6316. }
  6317. func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, e *Encoder) {
  6318. if v == nil {
  6319. e.e.EncodeNil()
  6320. return
  6321. }
  6322. ee, esep := e.e, e.hh.hasElemSeparators()
  6323. ee.WriteMapStart(len(v))
  6324. if e.h.Canonical {
  6325. v2 := make([]uint64, len(v))
  6326. var i int
  6327. for k, _ := range v {
  6328. v2[i] = uint64(k)
  6329. i++
  6330. }
  6331. sort.Sort(uintSlice(v2))
  6332. for _, k2 := range v2 {
  6333. if esep {
  6334. ee.WriteMapElemKey()
  6335. }
  6336. ee.EncodeUint(uint64(uint8(k2)))
  6337. if esep {
  6338. ee.WriteMapElemValue()
  6339. }
  6340. ee.EncodeBool(v[uint8(k2)])
  6341. }
  6342. } else {
  6343. for k2, v2 := range v {
  6344. if esep {
  6345. ee.WriteMapElemKey()
  6346. }
  6347. ee.EncodeUint(uint64(k2))
  6348. if esep {
  6349. ee.WriteMapElemValue()
  6350. }
  6351. ee.EncodeBool(v2)
  6352. }
  6353. }
  6354. ee.WriteMapEnd()
  6355. }
  6356. func (e *Encoder) fastpathEncMapUint16IntfR(f *codecFnInfo, rv reflect.Value) {
  6357. fastpathTV.EncMapUint16IntfV(rv2i(rv).(map[uint16]interface{}), e)
  6358. }
  6359. func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, e *Encoder) {
  6360. if v == nil {
  6361. e.e.EncodeNil()
  6362. return
  6363. }
  6364. ee, esep := e.e, e.hh.hasElemSeparators()
  6365. ee.WriteMapStart(len(v))
  6366. if e.h.Canonical {
  6367. v2 := make([]uint64, len(v))
  6368. var i int
  6369. for k, _ := range v {
  6370. v2[i] = uint64(k)
  6371. i++
  6372. }
  6373. sort.Sort(uintSlice(v2))
  6374. for _, k2 := range v2 {
  6375. if esep {
  6376. ee.WriteMapElemKey()
  6377. }
  6378. ee.EncodeUint(uint64(uint16(k2)))
  6379. if esep {
  6380. ee.WriteMapElemValue()
  6381. }
  6382. e.encode(v[uint16(k2)])
  6383. }
  6384. } else {
  6385. for k2, v2 := range v {
  6386. if esep {
  6387. ee.WriteMapElemKey()
  6388. }
  6389. ee.EncodeUint(uint64(k2))
  6390. if esep {
  6391. ee.WriteMapElemValue()
  6392. }
  6393. e.encode(v2)
  6394. }
  6395. }
  6396. ee.WriteMapEnd()
  6397. }
  6398. func (e *Encoder) fastpathEncMapUint16StringR(f *codecFnInfo, rv reflect.Value) {
  6399. fastpathTV.EncMapUint16StringV(rv2i(rv).(map[uint16]string), e)
  6400. }
  6401. func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, e *Encoder) {
  6402. if v == nil {
  6403. e.e.EncodeNil()
  6404. return
  6405. }
  6406. ee, esep := e.e, e.hh.hasElemSeparators()
  6407. ee.WriteMapStart(len(v))
  6408. if e.h.Canonical {
  6409. v2 := make([]uint64, len(v))
  6410. var i int
  6411. for k, _ := range v {
  6412. v2[i] = uint64(k)
  6413. i++
  6414. }
  6415. sort.Sort(uintSlice(v2))
  6416. for _, k2 := range v2 {
  6417. if esep {
  6418. ee.WriteMapElemKey()
  6419. }
  6420. ee.EncodeUint(uint64(uint16(k2)))
  6421. if esep {
  6422. ee.WriteMapElemValue()
  6423. }
  6424. ee.EncodeString(c_UTF8, v[uint16(k2)])
  6425. }
  6426. } else {
  6427. for k2, v2 := range v {
  6428. if esep {
  6429. ee.WriteMapElemKey()
  6430. }
  6431. ee.EncodeUint(uint64(k2))
  6432. if esep {
  6433. ee.WriteMapElemValue()
  6434. }
  6435. ee.EncodeString(c_UTF8, v2)
  6436. }
  6437. }
  6438. ee.WriteMapEnd()
  6439. }
  6440. func (e *Encoder) fastpathEncMapUint16UintR(f *codecFnInfo, rv reflect.Value) {
  6441. fastpathTV.EncMapUint16UintV(rv2i(rv).(map[uint16]uint), e)
  6442. }
  6443. func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, e *Encoder) {
  6444. if v == nil {
  6445. e.e.EncodeNil()
  6446. return
  6447. }
  6448. ee, esep := e.e, e.hh.hasElemSeparators()
  6449. ee.WriteMapStart(len(v))
  6450. if e.h.Canonical {
  6451. v2 := make([]uint64, len(v))
  6452. var i int
  6453. for k, _ := range v {
  6454. v2[i] = uint64(k)
  6455. i++
  6456. }
  6457. sort.Sort(uintSlice(v2))
  6458. for _, k2 := range v2 {
  6459. if esep {
  6460. ee.WriteMapElemKey()
  6461. }
  6462. ee.EncodeUint(uint64(uint16(k2)))
  6463. if esep {
  6464. ee.WriteMapElemValue()
  6465. }
  6466. ee.EncodeUint(uint64(v[uint16(k2)]))
  6467. }
  6468. } else {
  6469. for k2, v2 := range v {
  6470. if esep {
  6471. ee.WriteMapElemKey()
  6472. }
  6473. ee.EncodeUint(uint64(k2))
  6474. if esep {
  6475. ee.WriteMapElemValue()
  6476. }
  6477. ee.EncodeUint(uint64(v2))
  6478. }
  6479. }
  6480. ee.WriteMapEnd()
  6481. }
  6482. func (e *Encoder) fastpathEncMapUint16Uint8R(f *codecFnInfo, rv reflect.Value) {
  6483. fastpathTV.EncMapUint16Uint8V(rv2i(rv).(map[uint16]uint8), e)
  6484. }
  6485. func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, e *Encoder) {
  6486. if v == nil {
  6487. e.e.EncodeNil()
  6488. return
  6489. }
  6490. ee, esep := e.e, e.hh.hasElemSeparators()
  6491. ee.WriteMapStart(len(v))
  6492. if e.h.Canonical {
  6493. v2 := make([]uint64, len(v))
  6494. var i int
  6495. for k, _ := range v {
  6496. v2[i] = uint64(k)
  6497. i++
  6498. }
  6499. sort.Sort(uintSlice(v2))
  6500. for _, k2 := range v2 {
  6501. if esep {
  6502. ee.WriteMapElemKey()
  6503. }
  6504. ee.EncodeUint(uint64(uint16(k2)))
  6505. if esep {
  6506. ee.WriteMapElemValue()
  6507. }
  6508. ee.EncodeUint(uint64(v[uint16(k2)]))
  6509. }
  6510. } else {
  6511. for k2, v2 := range v {
  6512. if esep {
  6513. ee.WriteMapElemKey()
  6514. }
  6515. ee.EncodeUint(uint64(k2))
  6516. if esep {
  6517. ee.WriteMapElemValue()
  6518. }
  6519. ee.EncodeUint(uint64(v2))
  6520. }
  6521. }
  6522. ee.WriteMapEnd()
  6523. }
  6524. func (e *Encoder) fastpathEncMapUint16Uint16R(f *codecFnInfo, rv reflect.Value) {
  6525. fastpathTV.EncMapUint16Uint16V(rv2i(rv).(map[uint16]uint16), e)
  6526. }
  6527. func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, e *Encoder) {
  6528. if v == nil {
  6529. e.e.EncodeNil()
  6530. return
  6531. }
  6532. ee, esep := e.e, e.hh.hasElemSeparators()
  6533. ee.WriteMapStart(len(v))
  6534. if e.h.Canonical {
  6535. v2 := make([]uint64, len(v))
  6536. var i int
  6537. for k, _ := range v {
  6538. v2[i] = uint64(k)
  6539. i++
  6540. }
  6541. sort.Sort(uintSlice(v2))
  6542. for _, k2 := range v2 {
  6543. if esep {
  6544. ee.WriteMapElemKey()
  6545. }
  6546. ee.EncodeUint(uint64(uint16(k2)))
  6547. if esep {
  6548. ee.WriteMapElemValue()
  6549. }
  6550. ee.EncodeUint(uint64(v[uint16(k2)]))
  6551. }
  6552. } else {
  6553. for k2, v2 := range v {
  6554. if esep {
  6555. ee.WriteMapElemKey()
  6556. }
  6557. ee.EncodeUint(uint64(k2))
  6558. if esep {
  6559. ee.WriteMapElemValue()
  6560. }
  6561. ee.EncodeUint(uint64(v2))
  6562. }
  6563. }
  6564. ee.WriteMapEnd()
  6565. }
  6566. func (e *Encoder) fastpathEncMapUint16Uint32R(f *codecFnInfo, rv reflect.Value) {
  6567. fastpathTV.EncMapUint16Uint32V(rv2i(rv).(map[uint16]uint32), e)
  6568. }
  6569. func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, e *Encoder) {
  6570. if v == nil {
  6571. e.e.EncodeNil()
  6572. return
  6573. }
  6574. ee, esep := e.e, e.hh.hasElemSeparators()
  6575. ee.WriteMapStart(len(v))
  6576. if e.h.Canonical {
  6577. v2 := make([]uint64, len(v))
  6578. var i int
  6579. for k, _ := range v {
  6580. v2[i] = uint64(k)
  6581. i++
  6582. }
  6583. sort.Sort(uintSlice(v2))
  6584. for _, k2 := range v2 {
  6585. if esep {
  6586. ee.WriteMapElemKey()
  6587. }
  6588. ee.EncodeUint(uint64(uint16(k2)))
  6589. if esep {
  6590. ee.WriteMapElemValue()
  6591. }
  6592. ee.EncodeUint(uint64(v[uint16(k2)]))
  6593. }
  6594. } else {
  6595. for k2, v2 := range v {
  6596. if esep {
  6597. ee.WriteMapElemKey()
  6598. }
  6599. ee.EncodeUint(uint64(k2))
  6600. if esep {
  6601. ee.WriteMapElemValue()
  6602. }
  6603. ee.EncodeUint(uint64(v2))
  6604. }
  6605. }
  6606. ee.WriteMapEnd()
  6607. }
  6608. func (e *Encoder) fastpathEncMapUint16Uint64R(f *codecFnInfo, rv reflect.Value) {
  6609. fastpathTV.EncMapUint16Uint64V(rv2i(rv).(map[uint16]uint64), e)
  6610. }
  6611. func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, e *Encoder) {
  6612. if v == nil {
  6613. e.e.EncodeNil()
  6614. return
  6615. }
  6616. ee, esep := e.e, e.hh.hasElemSeparators()
  6617. ee.WriteMapStart(len(v))
  6618. if e.h.Canonical {
  6619. v2 := make([]uint64, len(v))
  6620. var i int
  6621. for k, _ := range v {
  6622. v2[i] = uint64(k)
  6623. i++
  6624. }
  6625. sort.Sort(uintSlice(v2))
  6626. for _, k2 := range v2 {
  6627. if esep {
  6628. ee.WriteMapElemKey()
  6629. }
  6630. ee.EncodeUint(uint64(uint16(k2)))
  6631. if esep {
  6632. ee.WriteMapElemValue()
  6633. }
  6634. ee.EncodeUint(uint64(v[uint16(k2)]))
  6635. }
  6636. } else {
  6637. for k2, v2 := range v {
  6638. if esep {
  6639. ee.WriteMapElemKey()
  6640. }
  6641. ee.EncodeUint(uint64(k2))
  6642. if esep {
  6643. ee.WriteMapElemValue()
  6644. }
  6645. ee.EncodeUint(uint64(v2))
  6646. }
  6647. }
  6648. ee.WriteMapEnd()
  6649. }
  6650. func (e *Encoder) fastpathEncMapUint16UintptrR(f *codecFnInfo, rv reflect.Value) {
  6651. fastpathTV.EncMapUint16UintptrV(rv2i(rv).(map[uint16]uintptr), e)
  6652. }
  6653. func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, e *Encoder) {
  6654. if v == nil {
  6655. e.e.EncodeNil()
  6656. return
  6657. }
  6658. ee, esep := e.e, e.hh.hasElemSeparators()
  6659. ee.WriteMapStart(len(v))
  6660. if e.h.Canonical {
  6661. v2 := make([]uint64, len(v))
  6662. var i int
  6663. for k, _ := range v {
  6664. v2[i] = uint64(k)
  6665. i++
  6666. }
  6667. sort.Sort(uintSlice(v2))
  6668. for _, k2 := range v2 {
  6669. if esep {
  6670. ee.WriteMapElemKey()
  6671. }
  6672. ee.EncodeUint(uint64(uint16(k2)))
  6673. if esep {
  6674. ee.WriteMapElemValue()
  6675. }
  6676. e.encode(v[uint16(k2)])
  6677. }
  6678. } else {
  6679. for k2, v2 := range v {
  6680. if esep {
  6681. ee.WriteMapElemKey()
  6682. }
  6683. ee.EncodeUint(uint64(k2))
  6684. if esep {
  6685. ee.WriteMapElemValue()
  6686. }
  6687. e.encode(v2)
  6688. }
  6689. }
  6690. ee.WriteMapEnd()
  6691. }
  6692. func (e *Encoder) fastpathEncMapUint16IntR(f *codecFnInfo, rv reflect.Value) {
  6693. fastpathTV.EncMapUint16IntV(rv2i(rv).(map[uint16]int), e)
  6694. }
  6695. func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, e *Encoder) {
  6696. if v == nil {
  6697. e.e.EncodeNil()
  6698. return
  6699. }
  6700. ee, esep := e.e, e.hh.hasElemSeparators()
  6701. ee.WriteMapStart(len(v))
  6702. if e.h.Canonical {
  6703. v2 := make([]uint64, len(v))
  6704. var i int
  6705. for k, _ := range v {
  6706. v2[i] = uint64(k)
  6707. i++
  6708. }
  6709. sort.Sort(uintSlice(v2))
  6710. for _, k2 := range v2 {
  6711. if esep {
  6712. ee.WriteMapElemKey()
  6713. }
  6714. ee.EncodeUint(uint64(uint16(k2)))
  6715. if esep {
  6716. ee.WriteMapElemValue()
  6717. }
  6718. ee.EncodeInt(int64(v[uint16(k2)]))
  6719. }
  6720. } else {
  6721. for k2, v2 := range v {
  6722. if esep {
  6723. ee.WriteMapElemKey()
  6724. }
  6725. ee.EncodeUint(uint64(k2))
  6726. if esep {
  6727. ee.WriteMapElemValue()
  6728. }
  6729. ee.EncodeInt(int64(v2))
  6730. }
  6731. }
  6732. ee.WriteMapEnd()
  6733. }
  6734. func (e *Encoder) fastpathEncMapUint16Int8R(f *codecFnInfo, rv reflect.Value) {
  6735. fastpathTV.EncMapUint16Int8V(rv2i(rv).(map[uint16]int8), e)
  6736. }
  6737. func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, e *Encoder) {
  6738. if v == nil {
  6739. e.e.EncodeNil()
  6740. return
  6741. }
  6742. ee, esep := e.e, e.hh.hasElemSeparators()
  6743. ee.WriteMapStart(len(v))
  6744. if e.h.Canonical {
  6745. v2 := make([]uint64, len(v))
  6746. var i int
  6747. for k, _ := range v {
  6748. v2[i] = uint64(k)
  6749. i++
  6750. }
  6751. sort.Sort(uintSlice(v2))
  6752. for _, k2 := range v2 {
  6753. if esep {
  6754. ee.WriteMapElemKey()
  6755. }
  6756. ee.EncodeUint(uint64(uint16(k2)))
  6757. if esep {
  6758. ee.WriteMapElemValue()
  6759. }
  6760. ee.EncodeInt(int64(v[uint16(k2)]))
  6761. }
  6762. } else {
  6763. for k2, v2 := range v {
  6764. if esep {
  6765. ee.WriteMapElemKey()
  6766. }
  6767. ee.EncodeUint(uint64(k2))
  6768. if esep {
  6769. ee.WriteMapElemValue()
  6770. }
  6771. ee.EncodeInt(int64(v2))
  6772. }
  6773. }
  6774. ee.WriteMapEnd()
  6775. }
  6776. func (e *Encoder) fastpathEncMapUint16Int16R(f *codecFnInfo, rv reflect.Value) {
  6777. fastpathTV.EncMapUint16Int16V(rv2i(rv).(map[uint16]int16), e)
  6778. }
  6779. func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, e *Encoder) {
  6780. if v == nil {
  6781. e.e.EncodeNil()
  6782. return
  6783. }
  6784. ee, esep := e.e, e.hh.hasElemSeparators()
  6785. ee.WriteMapStart(len(v))
  6786. if e.h.Canonical {
  6787. v2 := make([]uint64, len(v))
  6788. var i int
  6789. for k, _ := range v {
  6790. v2[i] = uint64(k)
  6791. i++
  6792. }
  6793. sort.Sort(uintSlice(v2))
  6794. for _, k2 := range v2 {
  6795. if esep {
  6796. ee.WriteMapElemKey()
  6797. }
  6798. ee.EncodeUint(uint64(uint16(k2)))
  6799. if esep {
  6800. ee.WriteMapElemValue()
  6801. }
  6802. ee.EncodeInt(int64(v[uint16(k2)]))
  6803. }
  6804. } else {
  6805. for k2, v2 := range v {
  6806. if esep {
  6807. ee.WriteMapElemKey()
  6808. }
  6809. ee.EncodeUint(uint64(k2))
  6810. if esep {
  6811. ee.WriteMapElemValue()
  6812. }
  6813. ee.EncodeInt(int64(v2))
  6814. }
  6815. }
  6816. ee.WriteMapEnd()
  6817. }
  6818. func (e *Encoder) fastpathEncMapUint16Int32R(f *codecFnInfo, rv reflect.Value) {
  6819. fastpathTV.EncMapUint16Int32V(rv2i(rv).(map[uint16]int32), e)
  6820. }
  6821. func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, e *Encoder) {
  6822. if v == nil {
  6823. e.e.EncodeNil()
  6824. return
  6825. }
  6826. ee, esep := e.e, e.hh.hasElemSeparators()
  6827. ee.WriteMapStart(len(v))
  6828. if e.h.Canonical {
  6829. v2 := make([]uint64, len(v))
  6830. var i int
  6831. for k, _ := range v {
  6832. v2[i] = uint64(k)
  6833. i++
  6834. }
  6835. sort.Sort(uintSlice(v2))
  6836. for _, k2 := range v2 {
  6837. if esep {
  6838. ee.WriteMapElemKey()
  6839. }
  6840. ee.EncodeUint(uint64(uint16(k2)))
  6841. if esep {
  6842. ee.WriteMapElemValue()
  6843. }
  6844. ee.EncodeInt(int64(v[uint16(k2)]))
  6845. }
  6846. } else {
  6847. for k2, v2 := range v {
  6848. if esep {
  6849. ee.WriteMapElemKey()
  6850. }
  6851. ee.EncodeUint(uint64(k2))
  6852. if esep {
  6853. ee.WriteMapElemValue()
  6854. }
  6855. ee.EncodeInt(int64(v2))
  6856. }
  6857. }
  6858. ee.WriteMapEnd()
  6859. }
  6860. func (e *Encoder) fastpathEncMapUint16Int64R(f *codecFnInfo, rv reflect.Value) {
  6861. fastpathTV.EncMapUint16Int64V(rv2i(rv).(map[uint16]int64), e)
  6862. }
  6863. func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, e *Encoder) {
  6864. if v == nil {
  6865. e.e.EncodeNil()
  6866. return
  6867. }
  6868. ee, esep := e.e, e.hh.hasElemSeparators()
  6869. ee.WriteMapStart(len(v))
  6870. if e.h.Canonical {
  6871. v2 := make([]uint64, len(v))
  6872. var i int
  6873. for k, _ := range v {
  6874. v2[i] = uint64(k)
  6875. i++
  6876. }
  6877. sort.Sort(uintSlice(v2))
  6878. for _, k2 := range v2 {
  6879. if esep {
  6880. ee.WriteMapElemKey()
  6881. }
  6882. ee.EncodeUint(uint64(uint16(k2)))
  6883. if esep {
  6884. ee.WriteMapElemValue()
  6885. }
  6886. ee.EncodeInt(int64(v[uint16(k2)]))
  6887. }
  6888. } else {
  6889. for k2, v2 := range v {
  6890. if esep {
  6891. ee.WriteMapElemKey()
  6892. }
  6893. ee.EncodeUint(uint64(k2))
  6894. if esep {
  6895. ee.WriteMapElemValue()
  6896. }
  6897. ee.EncodeInt(int64(v2))
  6898. }
  6899. }
  6900. ee.WriteMapEnd()
  6901. }
  6902. func (e *Encoder) fastpathEncMapUint16Float32R(f *codecFnInfo, rv reflect.Value) {
  6903. fastpathTV.EncMapUint16Float32V(rv2i(rv).(map[uint16]float32), e)
  6904. }
  6905. func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, e *Encoder) {
  6906. if v == nil {
  6907. e.e.EncodeNil()
  6908. return
  6909. }
  6910. ee, esep := e.e, e.hh.hasElemSeparators()
  6911. ee.WriteMapStart(len(v))
  6912. if e.h.Canonical {
  6913. v2 := make([]uint64, len(v))
  6914. var i int
  6915. for k, _ := range v {
  6916. v2[i] = uint64(k)
  6917. i++
  6918. }
  6919. sort.Sort(uintSlice(v2))
  6920. for _, k2 := range v2 {
  6921. if esep {
  6922. ee.WriteMapElemKey()
  6923. }
  6924. ee.EncodeUint(uint64(uint16(k2)))
  6925. if esep {
  6926. ee.WriteMapElemValue()
  6927. }
  6928. ee.EncodeFloat32(v[uint16(k2)])
  6929. }
  6930. } else {
  6931. for k2, v2 := range v {
  6932. if esep {
  6933. ee.WriteMapElemKey()
  6934. }
  6935. ee.EncodeUint(uint64(k2))
  6936. if esep {
  6937. ee.WriteMapElemValue()
  6938. }
  6939. ee.EncodeFloat32(v2)
  6940. }
  6941. }
  6942. ee.WriteMapEnd()
  6943. }
  6944. func (e *Encoder) fastpathEncMapUint16Float64R(f *codecFnInfo, rv reflect.Value) {
  6945. fastpathTV.EncMapUint16Float64V(rv2i(rv).(map[uint16]float64), e)
  6946. }
  6947. func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, e *Encoder) {
  6948. if v == nil {
  6949. e.e.EncodeNil()
  6950. return
  6951. }
  6952. ee, esep := e.e, e.hh.hasElemSeparators()
  6953. ee.WriteMapStart(len(v))
  6954. if e.h.Canonical {
  6955. v2 := make([]uint64, len(v))
  6956. var i int
  6957. for k, _ := range v {
  6958. v2[i] = uint64(k)
  6959. i++
  6960. }
  6961. sort.Sort(uintSlice(v2))
  6962. for _, k2 := range v2 {
  6963. if esep {
  6964. ee.WriteMapElemKey()
  6965. }
  6966. ee.EncodeUint(uint64(uint16(k2)))
  6967. if esep {
  6968. ee.WriteMapElemValue()
  6969. }
  6970. ee.EncodeFloat64(v[uint16(k2)])
  6971. }
  6972. } else {
  6973. for k2, v2 := range v {
  6974. if esep {
  6975. ee.WriteMapElemKey()
  6976. }
  6977. ee.EncodeUint(uint64(k2))
  6978. if esep {
  6979. ee.WriteMapElemValue()
  6980. }
  6981. ee.EncodeFloat64(v2)
  6982. }
  6983. }
  6984. ee.WriteMapEnd()
  6985. }
  6986. func (e *Encoder) fastpathEncMapUint16BoolR(f *codecFnInfo, rv reflect.Value) {
  6987. fastpathTV.EncMapUint16BoolV(rv2i(rv).(map[uint16]bool), e)
  6988. }
  6989. func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, e *Encoder) {
  6990. if v == nil {
  6991. e.e.EncodeNil()
  6992. return
  6993. }
  6994. ee, esep := e.e, e.hh.hasElemSeparators()
  6995. ee.WriteMapStart(len(v))
  6996. if e.h.Canonical {
  6997. v2 := make([]uint64, len(v))
  6998. var i int
  6999. for k, _ := range v {
  7000. v2[i] = uint64(k)
  7001. i++
  7002. }
  7003. sort.Sort(uintSlice(v2))
  7004. for _, k2 := range v2 {
  7005. if esep {
  7006. ee.WriteMapElemKey()
  7007. }
  7008. ee.EncodeUint(uint64(uint16(k2)))
  7009. if esep {
  7010. ee.WriteMapElemValue()
  7011. }
  7012. ee.EncodeBool(v[uint16(k2)])
  7013. }
  7014. } else {
  7015. for k2, v2 := range v {
  7016. if esep {
  7017. ee.WriteMapElemKey()
  7018. }
  7019. ee.EncodeUint(uint64(k2))
  7020. if esep {
  7021. ee.WriteMapElemValue()
  7022. }
  7023. ee.EncodeBool(v2)
  7024. }
  7025. }
  7026. ee.WriteMapEnd()
  7027. }
  7028. func (e *Encoder) fastpathEncMapUint32IntfR(f *codecFnInfo, rv reflect.Value) {
  7029. fastpathTV.EncMapUint32IntfV(rv2i(rv).(map[uint32]interface{}), e)
  7030. }
  7031. func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, e *Encoder) {
  7032. if v == nil {
  7033. e.e.EncodeNil()
  7034. return
  7035. }
  7036. ee, esep := e.e, e.hh.hasElemSeparators()
  7037. ee.WriteMapStart(len(v))
  7038. if e.h.Canonical {
  7039. v2 := make([]uint64, len(v))
  7040. var i int
  7041. for k, _ := range v {
  7042. v2[i] = uint64(k)
  7043. i++
  7044. }
  7045. sort.Sort(uintSlice(v2))
  7046. for _, k2 := range v2 {
  7047. if esep {
  7048. ee.WriteMapElemKey()
  7049. }
  7050. ee.EncodeUint(uint64(uint32(k2)))
  7051. if esep {
  7052. ee.WriteMapElemValue()
  7053. }
  7054. e.encode(v[uint32(k2)])
  7055. }
  7056. } else {
  7057. for k2, v2 := range v {
  7058. if esep {
  7059. ee.WriteMapElemKey()
  7060. }
  7061. ee.EncodeUint(uint64(k2))
  7062. if esep {
  7063. ee.WriteMapElemValue()
  7064. }
  7065. e.encode(v2)
  7066. }
  7067. }
  7068. ee.WriteMapEnd()
  7069. }
  7070. func (e *Encoder) fastpathEncMapUint32StringR(f *codecFnInfo, rv reflect.Value) {
  7071. fastpathTV.EncMapUint32StringV(rv2i(rv).(map[uint32]string), e)
  7072. }
  7073. func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, e *Encoder) {
  7074. if v == nil {
  7075. e.e.EncodeNil()
  7076. return
  7077. }
  7078. ee, esep := e.e, e.hh.hasElemSeparators()
  7079. ee.WriteMapStart(len(v))
  7080. if e.h.Canonical {
  7081. v2 := make([]uint64, len(v))
  7082. var i int
  7083. for k, _ := range v {
  7084. v2[i] = uint64(k)
  7085. i++
  7086. }
  7087. sort.Sort(uintSlice(v2))
  7088. for _, k2 := range v2 {
  7089. if esep {
  7090. ee.WriteMapElemKey()
  7091. }
  7092. ee.EncodeUint(uint64(uint32(k2)))
  7093. if esep {
  7094. ee.WriteMapElemValue()
  7095. }
  7096. ee.EncodeString(c_UTF8, v[uint32(k2)])
  7097. }
  7098. } else {
  7099. for k2, v2 := range v {
  7100. if esep {
  7101. ee.WriteMapElemKey()
  7102. }
  7103. ee.EncodeUint(uint64(k2))
  7104. if esep {
  7105. ee.WriteMapElemValue()
  7106. }
  7107. ee.EncodeString(c_UTF8, v2)
  7108. }
  7109. }
  7110. ee.WriteMapEnd()
  7111. }
  7112. func (e *Encoder) fastpathEncMapUint32UintR(f *codecFnInfo, rv reflect.Value) {
  7113. fastpathTV.EncMapUint32UintV(rv2i(rv).(map[uint32]uint), e)
  7114. }
  7115. func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, e *Encoder) {
  7116. if v == nil {
  7117. e.e.EncodeNil()
  7118. return
  7119. }
  7120. ee, esep := e.e, e.hh.hasElemSeparators()
  7121. ee.WriteMapStart(len(v))
  7122. if e.h.Canonical {
  7123. v2 := make([]uint64, len(v))
  7124. var i int
  7125. for k, _ := range v {
  7126. v2[i] = uint64(k)
  7127. i++
  7128. }
  7129. sort.Sort(uintSlice(v2))
  7130. for _, k2 := range v2 {
  7131. if esep {
  7132. ee.WriteMapElemKey()
  7133. }
  7134. ee.EncodeUint(uint64(uint32(k2)))
  7135. if esep {
  7136. ee.WriteMapElemValue()
  7137. }
  7138. ee.EncodeUint(uint64(v[uint32(k2)]))
  7139. }
  7140. } else {
  7141. for k2, v2 := range v {
  7142. if esep {
  7143. ee.WriteMapElemKey()
  7144. }
  7145. ee.EncodeUint(uint64(k2))
  7146. if esep {
  7147. ee.WriteMapElemValue()
  7148. }
  7149. ee.EncodeUint(uint64(v2))
  7150. }
  7151. }
  7152. ee.WriteMapEnd()
  7153. }
  7154. func (e *Encoder) fastpathEncMapUint32Uint8R(f *codecFnInfo, rv reflect.Value) {
  7155. fastpathTV.EncMapUint32Uint8V(rv2i(rv).(map[uint32]uint8), e)
  7156. }
  7157. func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, e *Encoder) {
  7158. if v == nil {
  7159. e.e.EncodeNil()
  7160. return
  7161. }
  7162. ee, esep := e.e, e.hh.hasElemSeparators()
  7163. ee.WriteMapStart(len(v))
  7164. if e.h.Canonical {
  7165. v2 := make([]uint64, len(v))
  7166. var i int
  7167. for k, _ := range v {
  7168. v2[i] = uint64(k)
  7169. i++
  7170. }
  7171. sort.Sort(uintSlice(v2))
  7172. for _, k2 := range v2 {
  7173. if esep {
  7174. ee.WriteMapElemKey()
  7175. }
  7176. ee.EncodeUint(uint64(uint32(k2)))
  7177. if esep {
  7178. ee.WriteMapElemValue()
  7179. }
  7180. ee.EncodeUint(uint64(v[uint32(k2)]))
  7181. }
  7182. } else {
  7183. for k2, v2 := range v {
  7184. if esep {
  7185. ee.WriteMapElemKey()
  7186. }
  7187. ee.EncodeUint(uint64(k2))
  7188. if esep {
  7189. ee.WriteMapElemValue()
  7190. }
  7191. ee.EncodeUint(uint64(v2))
  7192. }
  7193. }
  7194. ee.WriteMapEnd()
  7195. }
  7196. func (e *Encoder) fastpathEncMapUint32Uint16R(f *codecFnInfo, rv reflect.Value) {
  7197. fastpathTV.EncMapUint32Uint16V(rv2i(rv).(map[uint32]uint16), e)
  7198. }
  7199. func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, e *Encoder) {
  7200. if v == nil {
  7201. e.e.EncodeNil()
  7202. return
  7203. }
  7204. ee, esep := e.e, e.hh.hasElemSeparators()
  7205. ee.WriteMapStart(len(v))
  7206. if e.h.Canonical {
  7207. v2 := make([]uint64, len(v))
  7208. var i int
  7209. for k, _ := range v {
  7210. v2[i] = uint64(k)
  7211. i++
  7212. }
  7213. sort.Sort(uintSlice(v2))
  7214. for _, k2 := range v2 {
  7215. if esep {
  7216. ee.WriteMapElemKey()
  7217. }
  7218. ee.EncodeUint(uint64(uint32(k2)))
  7219. if esep {
  7220. ee.WriteMapElemValue()
  7221. }
  7222. ee.EncodeUint(uint64(v[uint32(k2)]))
  7223. }
  7224. } else {
  7225. for k2, v2 := range v {
  7226. if esep {
  7227. ee.WriteMapElemKey()
  7228. }
  7229. ee.EncodeUint(uint64(k2))
  7230. if esep {
  7231. ee.WriteMapElemValue()
  7232. }
  7233. ee.EncodeUint(uint64(v2))
  7234. }
  7235. }
  7236. ee.WriteMapEnd()
  7237. }
  7238. func (e *Encoder) fastpathEncMapUint32Uint32R(f *codecFnInfo, rv reflect.Value) {
  7239. fastpathTV.EncMapUint32Uint32V(rv2i(rv).(map[uint32]uint32), e)
  7240. }
  7241. func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, e *Encoder) {
  7242. if v == nil {
  7243. e.e.EncodeNil()
  7244. return
  7245. }
  7246. ee, esep := e.e, e.hh.hasElemSeparators()
  7247. ee.WriteMapStart(len(v))
  7248. if e.h.Canonical {
  7249. v2 := make([]uint64, len(v))
  7250. var i int
  7251. for k, _ := range v {
  7252. v2[i] = uint64(k)
  7253. i++
  7254. }
  7255. sort.Sort(uintSlice(v2))
  7256. for _, k2 := range v2 {
  7257. if esep {
  7258. ee.WriteMapElemKey()
  7259. }
  7260. ee.EncodeUint(uint64(uint32(k2)))
  7261. if esep {
  7262. ee.WriteMapElemValue()
  7263. }
  7264. ee.EncodeUint(uint64(v[uint32(k2)]))
  7265. }
  7266. } else {
  7267. for k2, v2 := range v {
  7268. if esep {
  7269. ee.WriteMapElemKey()
  7270. }
  7271. ee.EncodeUint(uint64(k2))
  7272. if esep {
  7273. ee.WriteMapElemValue()
  7274. }
  7275. ee.EncodeUint(uint64(v2))
  7276. }
  7277. }
  7278. ee.WriteMapEnd()
  7279. }
  7280. func (e *Encoder) fastpathEncMapUint32Uint64R(f *codecFnInfo, rv reflect.Value) {
  7281. fastpathTV.EncMapUint32Uint64V(rv2i(rv).(map[uint32]uint64), e)
  7282. }
  7283. func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, e *Encoder) {
  7284. if v == nil {
  7285. e.e.EncodeNil()
  7286. return
  7287. }
  7288. ee, esep := e.e, e.hh.hasElemSeparators()
  7289. ee.WriteMapStart(len(v))
  7290. if e.h.Canonical {
  7291. v2 := make([]uint64, len(v))
  7292. var i int
  7293. for k, _ := range v {
  7294. v2[i] = uint64(k)
  7295. i++
  7296. }
  7297. sort.Sort(uintSlice(v2))
  7298. for _, k2 := range v2 {
  7299. if esep {
  7300. ee.WriteMapElemKey()
  7301. }
  7302. ee.EncodeUint(uint64(uint32(k2)))
  7303. if esep {
  7304. ee.WriteMapElemValue()
  7305. }
  7306. ee.EncodeUint(uint64(v[uint32(k2)]))
  7307. }
  7308. } else {
  7309. for k2, v2 := range v {
  7310. if esep {
  7311. ee.WriteMapElemKey()
  7312. }
  7313. ee.EncodeUint(uint64(k2))
  7314. if esep {
  7315. ee.WriteMapElemValue()
  7316. }
  7317. ee.EncodeUint(uint64(v2))
  7318. }
  7319. }
  7320. ee.WriteMapEnd()
  7321. }
  7322. func (e *Encoder) fastpathEncMapUint32UintptrR(f *codecFnInfo, rv reflect.Value) {
  7323. fastpathTV.EncMapUint32UintptrV(rv2i(rv).(map[uint32]uintptr), e)
  7324. }
  7325. func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, e *Encoder) {
  7326. if v == nil {
  7327. e.e.EncodeNil()
  7328. return
  7329. }
  7330. ee, esep := e.e, e.hh.hasElemSeparators()
  7331. ee.WriteMapStart(len(v))
  7332. if e.h.Canonical {
  7333. v2 := make([]uint64, len(v))
  7334. var i int
  7335. for k, _ := range v {
  7336. v2[i] = uint64(k)
  7337. i++
  7338. }
  7339. sort.Sort(uintSlice(v2))
  7340. for _, k2 := range v2 {
  7341. if esep {
  7342. ee.WriteMapElemKey()
  7343. }
  7344. ee.EncodeUint(uint64(uint32(k2)))
  7345. if esep {
  7346. ee.WriteMapElemValue()
  7347. }
  7348. e.encode(v[uint32(k2)])
  7349. }
  7350. } else {
  7351. for k2, v2 := range v {
  7352. if esep {
  7353. ee.WriteMapElemKey()
  7354. }
  7355. ee.EncodeUint(uint64(k2))
  7356. if esep {
  7357. ee.WriteMapElemValue()
  7358. }
  7359. e.encode(v2)
  7360. }
  7361. }
  7362. ee.WriteMapEnd()
  7363. }
  7364. func (e *Encoder) fastpathEncMapUint32IntR(f *codecFnInfo, rv reflect.Value) {
  7365. fastpathTV.EncMapUint32IntV(rv2i(rv).(map[uint32]int), e)
  7366. }
  7367. func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, e *Encoder) {
  7368. if v == nil {
  7369. e.e.EncodeNil()
  7370. return
  7371. }
  7372. ee, esep := e.e, e.hh.hasElemSeparators()
  7373. ee.WriteMapStart(len(v))
  7374. if e.h.Canonical {
  7375. v2 := make([]uint64, len(v))
  7376. var i int
  7377. for k, _ := range v {
  7378. v2[i] = uint64(k)
  7379. i++
  7380. }
  7381. sort.Sort(uintSlice(v2))
  7382. for _, k2 := range v2 {
  7383. if esep {
  7384. ee.WriteMapElemKey()
  7385. }
  7386. ee.EncodeUint(uint64(uint32(k2)))
  7387. if esep {
  7388. ee.WriteMapElemValue()
  7389. }
  7390. ee.EncodeInt(int64(v[uint32(k2)]))
  7391. }
  7392. } else {
  7393. for k2, v2 := range v {
  7394. if esep {
  7395. ee.WriteMapElemKey()
  7396. }
  7397. ee.EncodeUint(uint64(k2))
  7398. if esep {
  7399. ee.WriteMapElemValue()
  7400. }
  7401. ee.EncodeInt(int64(v2))
  7402. }
  7403. }
  7404. ee.WriteMapEnd()
  7405. }
  7406. func (e *Encoder) fastpathEncMapUint32Int8R(f *codecFnInfo, rv reflect.Value) {
  7407. fastpathTV.EncMapUint32Int8V(rv2i(rv).(map[uint32]int8), e)
  7408. }
  7409. func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, e *Encoder) {
  7410. if v == nil {
  7411. e.e.EncodeNil()
  7412. return
  7413. }
  7414. ee, esep := e.e, e.hh.hasElemSeparators()
  7415. ee.WriteMapStart(len(v))
  7416. if e.h.Canonical {
  7417. v2 := make([]uint64, len(v))
  7418. var i int
  7419. for k, _ := range v {
  7420. v2[i] = uint64(k)
  7421. i++
  7422. }
  7423. sort.Sort(uintSlice(v2))
  7424. for _, k2 := range v2 {
  7425. if esep {
  7426. ee.WriteMapElemKey()
  7427. }
  7428. ee.EncodeUint(uint64(uint32(k2)))
  7429. if esep {
  7430. ee.WriteMapElemValue()
  7431. }
  7432. ee.EncodeInt(int64(v[uint32(k2)]))
  7433. }
  7434. } else {
  7435. for k2, v2 := range v {
  7436. if esep {
  7437. ee.WriteMapElemKey()
  7438. }
  7439. ee.EncodeUint(uint64(k2))
  7440. if esep {
  7441. ee.WriteMapElemValue()
  7442. }
  7443. ee.EncodeInt(int64(v2))
  7444. }
  7445. }
  7446. ee.WriteMapEnd()
  7447. }
  7448. func (e *Encoder) fastpathEncMapUint32Int16R(f *codecFnInfo, rv reflect.Value) {
  7449. fastpathTV.EncMapUint32Int16V(rv2i(rv).(map[uint32]int16), e)
  7450. }
  7451. func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, e *Encoder) {
  7452. if v == nil {
  7453. e.e.EncodeNil()
  7454. return
  7455. }
  7456. ee, esep := e.e, e.hh.hasElemSeparators()
  7457. ee.WriteMapStart(len(v))
  7458. if e.h.Canonical {
  7459. v2 := make([]uint64, len(v))
  7460. var i int
  7461. for k, _ := range v {
  7462. v2[i] = uint64(k)
  7463. i++
  7464. }
  7465. sort.Sort(uintSlice(v2))
  7466. for _, k2 := range v2 {
  7467. if esep {
  7468. ee.WriteMapElemKey()
  7469. }
  7470. ee.EncodeUint(uint64(uint32(k2)))
  7471. if esep {
  7472. ee.WriteMapElemValue()
  7473. }
  7474. ee.EncodeInt(int64(v[uint32(k2)]))
  7475. }
  7476. } else {
  7477. for k2, v2 := range v {
  7478. if esep {
  7479. ee.WriteMapElemKey()
  7480. }
  7481. ee.EncodeUint(uint64(k2))
  7482. if esep {
  7483. ee.WriteMapElemValue()
  7484. }
  7485. ee.EncodeInt(int64(v2))
  7486. }
  7487. }
  7488. ee.WriteMapEnd()
  7489. }
  7490. func (e *Encoder) fastpathEncMapUint32Int32R(f *codecFnInfo, rv reflect.Value) {
  7491. fastpathTV.EncMapUint32Int32V(rv2i(rv).(map[uint32]int32), e)
  7492. }
  7493. func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, e *Encoder) {
  7494. if v == nil {
  7495. e.e.EncodeNil()
  7496. return
  7497. }
  7498. ee, esep := e.e, e.hh.hasElemSeparators()
  7499. ee.WriteMapStart(len(v))
  7500. if e.h.Canonical {
  7501. v2 := make([]uint64, len(v))
  7502. var i int
  7503. for k, _ := range v {
  7504. v2[i] = uint64(k)
  7505. i++
  7506. }
  7507. sort.Sort(uintSlice(v2))
  7508. for _, k2 := range v2 {
  7509. if esep {
  7510. ee.WriteMapElemKey()
  7511. }
  7512. ee.EncodeUint(uint64(uint32(k2)))
  7513. if esep {
  7514. ee.WriteMapElemValue()
  7515. }
  7516. ee.EncodeInt(int64(v[uint32(k2)]))
  7517. }
  7518. } else {
  7519. for k2, v2 := range v {
  7520. if esep {
  7521. ee.WriteMapElemKey()
  7522. }
  7523. ee.EncodeUint(uint64(k2))
  7524. if esep {
  7525. ee.WriteMapElemValue()
  7526. }
  7527. ee.EncodeInt(int64(v2))
  7528. }
  7529. }
  7530. ee.WriteMapEnd()
  7531. }
  7532. func (e *Encoder) fastpathEncMapUint32Int64R(f *codecFnInfo, rv reflect.Value) {
  7533. fastpathTV.EncMapUint32Int64V(rv2i(rv).(map[uint32]int64), e)
  7534. }
  7535. func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, e *Encoder) {
  7536. if v == nil {
  7537. e.e.EncodeNil()
  7538. return
  7539. }
  7540. ee, esep := e.e, e.hh.hasElemSeparators()
  7541. ee.WriteMapStart(len(v))
  7542. if e.h.Canonical {
  7543. v2 := make([]uint64, len(v))
  7544. var i int
  7545. for k, _ := range v {
  7546. v2[i] = uint64(k)
  7547. i++
  7548. }
  7549. sort.Sort(uintSlice(v2))
  7550. for _, k2 := range v2 {
  7551. if esep {
  7552. ee.WriteMapElemKey()
  7553. }
  7554. ee.EncodeUint(uint64(uint32(k2)))
  7555. if esep {
  7556. ee.WriteMapElemValue()
  7557. }
  7558. ee.EncodeInt(int64(v[uint32(k2)]))
  7559. }
  7560. } else {
  7561. for k2, v2 := range v {
  7562. if esep {
  7563. ee.WriteMapElemKey()
  7564. }
  7565. ee.EncodeUint(uint64(k2))
  7566. if esep {
  7567. ee.WriteMapElemValue()
  7568. }
  7569. ee.EncodeInt(int64(v2))
  7570. }
  7571. }
  7572. ee.WriteMapEnd()
  7573. }
  7574. func (e *Encoder) fastpathEncMapUint32Float32R(f *codecFnInfo, rv reflect.Value) {
  7575. fastpathTV.EncMapUint32Float32V(rv2i(rv).(map[uint32]float32), e)
  7576. }
  7577. func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, e *Encoder) {
  7578. if v == nil {
  7579. e.e.EncodeNil()
  7580. return
  7581. }
  7582. ee, esep := e.e, e.hh.hasElemSeparators()
  7583. ee.WriteMapStart(len(v))
  7584. if e.h.Canonical {
  7585. v2 := make([]uint64, len(v))
  7586. var i int
  7587. for k, _ := range v {
  7588. v2[i] = uint64(k)
  7589. i++
  7590. }
  7591. sort.Sort(uintSlice(v2))
  7592. for _, k2 := range v2 {
  7593. if esep {
  7594. ee.WriteMapElemKey()
  7595. }
  7596. ee.EncodeUint(uint64(uint32(k2)))
  7597. if esep {
  7598. ee.WriteMapElemValue()
  7599. }
  7600. ee.EncodeFloat32(v[uint32(k2)])
  7601. }
  7602. } else {
  7603. for k2, v2 := range v {
  7604. if esep {
  7605. ee.WriteMapElemKey()
  7606. }
  7607. ee.EncodeUint(uint64(k2))
  7608. if esep {
  7609. ee.WriteMapElemValue()
  7610. }
  7611. ee.EncodeFloat32(v2)
  7612. }
  7613. }
  7614. ee.WriteMapEnd()
  7615. }
  7616. func (e *Encoder) fastpathEncMapUint32Float64R(f *codecFnInfo, rv reflect.Value) {
  7617. fastpathTV.EncMapUint32Float64V(rv2i(rv).(map[uint32]float64), e)
  7618. }
  7619. func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, e *Encoder) {
  7620. if v == nil {
  7621. e.e.EncodeNil()
  7622. return
  7623. }
  7624. ee, esep := e.e, e.hh.hasElemSeparators()
  7625. ee.WriteMapStart(len(v))
  7626. if e.h.Canonical {
  7627. v2 := make([]uint64, len(v))
  7628. var i int
  7629. for k, _ := range v {
  7630. v2[i] = uint64(k)
  7631. i++
  7632. }
  7633. sort.Sort(uintSlice(v2))
  7634. for _, k2 := range v2 {
  7635. if esep {
  7636. ee.WriteMapElemKey()
  7637. }
  7638. ee.EncodeUint(uint64(uint32(k2)))
  7639. if esep {
  7640. ee.WriteMapElemValue()
  7641. }
  7642. ee.EncodeFloat64(v[uint32(k2)])
  7643. }
  7644. } else {
  7645. for k2, v2 := range v {
  7646. if esep {
  7647. ee.WriteMapElemKey()
  7648. }
  7649. ee.EncodeUint(uint64(k2))
  7650. if esep {
  7651. ee.WriteMapElemValue()
  7652. }
  7653. ee.EncodeFloat64(v2)
  7654. }
  7655. }
  7656. ee.WriteMapEnd()
  7657. }
  7658. func (e *Encoder) fastpathEncMapUint32BoolR(f *codecFnInfo, rv reflect.Value) {
  7659. fastpathTV.EncMapUint32BoolV(rv2i(rv).(map[uint32]bool), e)
  7660. }
  7661. func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, e *Encoder) {
  7662. if v == nil {
  7663. e.e.EncodeNil()
  7664. return
  7665. }
  7666. ee, esep := e.e, e.hh.hasElemSeparators()
  7667. ee.WriteMapStart(len(v))
  7668. if e.h.Canonical {
  7669. v2 := make([]uint64, len(v))
  7670. var i int
  7671. for k, _ := range v {
  7672. v2[i] = uint64(k)
  7673. i++
  7674. }
  7675. sort.Sort(uintSlice(v2))
  7676. for _, k2 := range v2 {
  7677. if esep {
  7678. ee.WriteMapElemKey()
  7679. }
  7680. ee.EncodeUint(uint64(uint32(k2)))
  7681. if esep {
  7682. ee.WriteMapElemValue()
  7683. }
  7684. ee.EncodeBool(v[uint32(k2)])
  7685. }
  7686. } else {
  7687. for k2, v2 := range v {
  7688. if esep {
  7689. ee.WriteMapElemKey()
  7690. }
  7691. ee.EncodeUint(uint64(k2))
  7692. if esep {
  7693. ee.WriteMapElemValue()
  7694. }
  7695. ee.EncodeBool(v2)
  7696. }
  7697. }
  7698. ee.WriteMapEnd()
  7699. }
  7700. func (e *Encoder) fastpathEncMapUint64IntfR(f *codecFnInfo, rv reflect.Value) {
  7701. fastpathTV.EncMapUint64IntfV(rv2i(rv).(map[uint64]interface{}), e)
  7702. }
  7703. func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, e *Encoder) {
  7704. if v == nil {
  7705. e.e.EncodeNil()
  7706. return
  7707. }
  7708. ee, esep := e.e, e.hh.hasElemSeparators()
  7709. ee.WriteMapStart(len(v))
  7710. if e.h.Canonical {
  7711. v2 := make([]uint64, len(v))
  7712. var i int
  7713. for k, _ := range v {
  7714. v2[i] = uint64(k)
  7715. i++
  7716. }
  7717. sort.Sort(uintSlice(v2))
  7718. for _, k2 := range v2 {
  7719. if esep {
  7720. ee.WriteMapElemKey()
  7721. }
  7722. ee.EncodeUint(uint64(uint64(k2)))
  7723. if esep {
  7724. ee.WriteMapElemValue()
  7725. }
  7726. e.encode(v[uint64(k2)])
  7727. }
  7728. } else {
  7729. for k2, v2 := range v {
  7730. if esep {
  7731. ee.WriteMapElemKey()
  7732. }
  7733. ee.EncodeUint(uint64(k2))
  7734. if esep {
  7735. ee.WriteMapElemValue()
  7736. }
  7737. e.encode(v2)
  7738. }
  7739. }
  7740. ee.WriteMapEnd()
  7741. }
  7742. func (e *Encoder) fastpathEncMapUint64StringR(f *codecFnInfo, rv reflect.Value) {
  7743. fastpathTV.EncMapUint64StringV(rv2i(rv).(map[uint64]string), e)
  7744. }
  7745. func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, e *Encoder) {
  7746. if v == nil {
  7747. e.e.EncodeNil()
  7748. return
  7749. }
  7750. ee, esep := e.e, e.hh.hasElemSeparators()
  7751. ee.WriteMapStart(len(v))
  7752. if e.h.Canonical {
  7753. v2 := make([]uint64, len(v))
  7754. var i int
  7755. for k, _ := range v {
  7756. v2[i] = uint64(k)
  7757. i++
  7758. }
  7759. sort.Sort(uintSlice(v2))
  7760. for _, k2 := range v2 {
  7761. if esep {
  7762. ee.WriteMapElemKey()
  7763. }
  7764. ee.EncodeUint(uint64(uint64(k2)))
  7765. if esep {
  7766. ee.WriteMapElemValue()
  7767. }
  7768. ee.EncodeString(c_UTF8, v[uint64(k2)])
  7769. }
  7770. } else {
  7771. for k2, v2 := range v {
  7772. if esep {
  7773. ee.WriteMapElemKey()
  7774. }
  7775. ee.EncodeUint(uint64(k2))
  7776. if esep {
  7777. ee.WriteMapElemValue()
  7778. }
  7779. ee.EncodeString(c_UTF8, v2)
  7780. }
  7781. }
  7782. ee.WriteMapEnd()
  7783. }
  7784. func (e *Encoder) fastpathEncMapUint64UintR(f *codecFnInfo, rv reflect.Value) {
  7785. fastpathTV.EncMapUint64UintV(rv2i(rv).(map[uint64]uint), e)
  7786. }
  7787. func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, e *Encoder) {
  7788. if v == nil {
  7789. e.e.EncodeNil()
  7790. return
  7791. }
  7792. ee, esep := e.e, e.hh.hasElemSeparators()
  7793. ee.WriteMapStart(len(v))
  7794. if e.h.Canonical {
  7795. v2 := make([]uint64, len(v))
  7796. var i int
  7797. for k, _ := range v {
  7798. v2[i] = uint64(k)
  7799. i++
  7800. }
  7801. sort.Sort(uintSlice(v2))
  7802. for _, k2 := range v2 {
  7803. if esep {
  7804. ee.WriteMapElemKey()
  7805. }
  7806. ee.EncodeUint(uint64(uint64(k2)))
  7807. if esep {
  7808. ee.WriteMapElemValue()
  7809. }
  7810. ee.EncodeUint(uint64(v[uint64(k2)]))
  7811. }
  7812. } else {
  7813. for k2, v2 := range v {
  7814. if esep {
  7815. ee.WriteMapElemKey()
  7816. }
  7817. ee.EncodeUint(uint64(k2))
  7818. if esep {
  7819. ee.WriteMapElemValue()
  7820. }
  7821. ee.EncodeUint(uint64(v2))
  7822. }
  7823. }
  7824. ee.WriteMapEnd()
  7825. }
  7826. func (e *Encoder) fastpathEncMapUint64Uint8R(f *codecFnInfo, rv reflect.Value) {
  7827. fastpathTV.EncMapUint64Uint8V(rv2i(rv).(map[uint64]uint8), e)
  7828. }
  7829. func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, e *Encoder) {
  7830. if v == nil {
  7831. e.e.EncodeNil()
  7832. return
  7833. }
  7834. ee, esep := e.e, e.hh.hasElemSeparators()
  7835. ee.WriteMapStart(len(v))
  7836. if e.h.Canonical {
  7837. v2 := make([]uint64, len(v))
  7838. var i int
  7839. for k, _ := range v {
  7840. v2[i] = uint64(k)
  7841. i++
  7842. }
  7843. sort.Sort(uintSlice(v2))
  7844. for _, k2 := range v2 {
  7845. if esep {
  7846. ee.WriteMapElemKey()
  7847. }
  7848. ee.EncodeUint(uint64(uint64(k2)))
  7849. if esep {
  7850. ee.WriteMapElemValue()
  7851. }
  7852. ee.EncodeUint(uint64(v[uint64(k2)]))
  7853. }
  7854. } else {
  7855. for k2, v2 := range v {
  7856. if esep {
  7857. ee.WriteMapElemKey()
  7858. }
  7859. ee.EncodeUint(uint64(k2))
  7860. if esep {
  7861. ee.WriteMapElemValue()
  7862. }
  7863. ee.EncodeUint(uint64(v2))
  7864. }
  7865. }
  7866. ee.WriteMapEnd()
  7867. }
  7868. func (e *Encoder) fastpathEncMapUint64Uint16R(f *codecFnInfo, rv reflect.Value) {
  7869. fastpathTV.EncMapUint64Uint16V(rv2i(rv).(map[uint64]uint16), e)
  7870. }
  7871. func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, e *Encoder) {
  7872. if v == nil {
  7873. e.e.EncodeNil()
  7874. return
  7875. }
  7876. ee, esep := e.e, e.hh.hasElemSeparators()
  7877. ee.WriteMapStart(len(v))
  7878. if e.h.Canonical {
  7879. v2 := make([]uint64, len(v))
  7880. var i int
  7881. for k, _ := range v {
  7882. v2[i] = uint64(k)
  7883. i++
  7884. }
  7885. sort.Sort(uintSlice(v2))
  7886. for _, k2 := range v2 {
  7887. if esep {
  7888. ee.WriteMapElemKey()
  7889. }
  7890. ee.EncodeUint(uint64(uint64(k2)))
  7891. if esep {
  7892. ee.WriteMapElemValue()
  7893. }
  7894. ee.EncodeUint(uint64(v[uint64(k2)]))
  7895. }
  7896. } else {
  7897. for k2, v2 := range v {
  7898. if esep {
  7899. ee.WriteMapElemKey()
  7900. }
  7901. ee.EncodeUint(uint64(k2))
  7902. if esep {
  7903. ee.WriteMapElemValue()
  7904. }
  7905. ee.EncodeUint(uint64(v2))
  7906. }
  7907. }
  7908. ee.WriteMapEnd()
  7909. }
  7910. func (e *Encoder) fastpathEncMapUint64Uint32R(f *codecFnInfo, rv reflect.Value) {
  7911. fastpathTV.EncMapUint64Uint32V(rv2i(rv).(map[uint64]uint32), e)
  7912. }
  7913. func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, e *Encoder) {
  7914. if v == nil {
  7915. e.e.EncodeNil()
  7916. return
  7917. }
  7918. ee, esep := e.e, e.hh.hasElemSeparators()
  7919. ee.WriteMapStart(len(v))
  7920. if e.h.Canonical {
  7921. v2 := make([]uint64, len(v))
  7922. var i int
  7923. for k, _ := range v {
  7924. v2[i] = uint64(k)
  7925. i++
  7926. }
  7927. sort.Sort(uintSlice(v2))
  7928. for _, k2 := range v2 {
  7929. if esep {
  7930. ee.WriteMapElemKey()
  7931. }
  7932. ee.EncodeUint(uint64(uint64(k2)))
  7933. if esep {
  7934. ee.WriteMapElemValue()
  7935. }
  7936. ee.EncodeUint(uint64(v[uint64(k2)]))
  7937. }
  7938. } else {
  7939. for k2, v2 := range v {
  7940. if esep {
  7941. ee.WriteMapElemKey()
  7942. }
  7943. ee.EncodeUint(uint64(k2))
  7944. if esep {
  7945. ee.WriteMapElemValue()
  7946. }
  7947. ee.EncodeUint(uint64(v2))
  7948. }
  7949. }
  7950. ee.WriteMapEnd()
  7951. }
  7952. func (e *Encoder) fastpathEncMapUint64Uint64R(f *codecFnInfo, rv reflect.Value) {
  7953. fastpathTV.EncMapUint64Uint64V(rv2i(rv).(map[uint64]uint64), e)
  7954. }
  7955. func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, e *Encoder) {
  7956. if v == nil {
  7957. e.e.EncodeNil()
  7958. return
  7959. }
  7960. ee, esep := e.e, e.hh.hasElemSeparators()
  7961. ee.WriteMapStart(len(v))
  7962. if e.h.Canonical {
  7963. v2 := make([]uint64, len(v))
  7964. var i int
  7965. for k, _ := range v {
  7966. v2[i] = uint64(k)
  7967. i++
  7968. }
  7969. sort.Sort(uintSlice(v2))
  7970. for _, k2 := range v2 {
  7971. if esep {
  7972. ee.WriteMapElemKey()
  7973. }
  7974. ee.EncodeUint(uint64(uint64(k2)))
  7975. if esep {
  7976. ee.WriteMapElemValue()
  7977. }
  7978. ee.EncodeUint(uint64(v[uint64(k2)]))
  7979. }
  7980. } else {
  7981. for k2, v2 := range v {
  7982. if esep {
  7983. ee.WriteMapElemKey()
  7984. }
  7985. ee.EncodeUint(uint64(k2))
  7986. if esep {
  7987. ee.WriteMapElemValue()
  7988. }
  7989. ee.EncodeUint(uint64(v2))
  7990. }
  7991. }
  7992. ee.WriteMapEnd()
  7993. }
  7994. func (e *Encoder) fastpathEncMapUint64UintptrR(f *codecFnInfo, rv reflect.Value) {
  7995. fastpathTV.EncMapUint64UintptrV(rv2i(rv).(map[uint64]uintptr), e)
  7996. }
  7997. func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, e *Encoder) {
  7998. if v == nil {
  7999. e.e.EncodeNil()
  8000. return
  8001. }
  8002. ee, esep := e.e, e.hh.hasElemSeparators()
  8003. ee.WriteMapStart(len(v))
  8004. if e.h.Canonical {
  8005. v2 := make([]uint64, len(v))
  8006. var i int
  8007. for k, _ := range v {
  8008. v2[i] = uint64(k)
  8009. i++
  8010. }
  8011. sort.Sort(uintSlice(v2))
  8012. for _, k2 := range v2 {
  8013. if esep {
  8014. ee.WriteMapElemKey()
  8015. }
  8016. ee.EncodeUint(uint64(uint64(k2)))
  8017. if esep {
  8018. ee.WriteMapElemValue()
  8019. }
  8020. e.encode(v[uint64(k2)])
  8021. }
  8022. } else {
  8023. for k2, v2 := range v {
  8024. if esep {
  8025. ee.WriteMapElemKey()
  8026. }
  8027. ee.EncodeUint(uint64(k2))
  8028. if esep {
  8029. ee.WriteMapElemValue()
  8030. }
  8031. e.encode(v2)
  8032. }
  8033. }
  8034. ee.WriteMapEnd()
  8035. }
  8036. func (e *Encoder) fastpathEncMapUint64IntR(f *codecFnInfo, rv reflect.Value) {
  8037. fastpathTV.EncMapUint64IntV(rv2i(rv).(map[uint64]int), e)
  8038. }
  8039. func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, e *Encoder) {
  8040. if v == nil {
  8041. e.e.EncodeNil()
  8042. return
  8043. }
  8044. ee, esep := e.e, e.hh.hasElemSeparators()
  8045. ee.WriteMapStart(len(v))
  8046. if e.h.Canonical {
  8047. v2 := make([]uint64, len(v))
  8048. var i int
  8049. for k, _ := range v {
  8050. v2[i] = uint64(k)
  8051. i++
  8052. }
  8053. sort.Sort(uintSlice(v2))
  8054. for _, k2 := range v2 {
  8055. if esep {
  8056. ee.WriteMapElemKey()
  8057. }
  8058. ee.EncodeUint(uint64(uint64(k2)))
  8059. if esep {
  8060. ee.WriteMapElemValue()
  8061. }
  8062. ee.EncodeInt(int64(v[uint64(k2)]))
  8063. }
  8064. } else {
  8065. for k2, v2 := range v {
  8066. if esep {
  8067. ee.WriteMapElemKey()
  8068. }
  8069. ee.EncodeUint(uint64(k2))
  8070. if esep {
  8071. ee.WriteMapElemValue()
  8072. }
  8073. ee.EncodeInt(int64(v2))
  8074. }
  8075. }
  8076. ee.WriteMapEnd()
  8077. }
  8078. func (e *Encoder) fastpathEncMapUint64Int8R(f *codecFnInfo, rv reflect.Value) {
  8079. fastpathTV.EncMapUint64Int8V(rv2i(rv).(map[uint64]int8), e)
  8080. }
  8081. func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, e *Encoder) {
  8082. if v == nil {
  8083. e.e.EncodeNil()
  8084. return
  8085. }
  8086. ee, esep := e.e, e.hh.hasElemSeparators()
  8087. ee.WriteMapStart(len(v))
  8088. if e.h.Canonical {
  8089. v2 := make([]uint64, len(v))
  8090. var i int
  8091. for k, _ := range v {
  8092. v2[i] = uint64(k)
  8093. i++
  8094. }
  8095. sort.Sort(uintSlice(v2))
  8096. for _, k2 := range v2 {
  8097. if esep {
  8098. ee.WriteMapElemKey()
  8099. }
  8100. ee.EncodeUint(uint64(uint64(k2)))
  8101. if esep {
  8102. ee.WriteMapElemValue()
  8103. }
  8104. ee.EncodeInt(int64(v[uint64(k2)]))
  8105. }
  8106. } else {
  8107. for k2, v2 := range v {
  8108. if esep {
  8109. ee.WriteMapElemKey()
  8110. }
  8111. ee.EncodeUint(uint64(k2))
  8112. if esep {
  8113. ee.WriteMapElemValue()
  8114. }
  8115. ee.EncodeInt(int64(v2))
  8116. }
  8117. }
  8118. ee.WriteMapEnd()
  8119. }
  8120. func (e *Encoder) fastpathEncMapUint64Int16R(f *codecFnInfo, rv reflect.Value) {
  8121. fastpathTV.EncMapUint64Int16V(rv2i(rv).(map[uint64]int16), e)
  8122. }
  8123. func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, e *Encoder) {
  8124. if v == nil {
  8125. e.e.EncodeNil()
  8126. return
  8127. }
  8128. ee, esep := e.e, e.hh.hasElemSeparators()
  8129. ee.WriteMapStart(len(v))
  8130. if e.h.Canonical {
  8131. v2 := make([]uint64, len(v))
  8132. var i int
  8133. for k, _ := range v {
  8134. v2[i] = uint64(k)
  8135. i++
  8136. }
  8137. sort.Sort(uintSlice(v2))
  8138. for _, k2 := range v2 {
  8139. if esep {
  8140. ee.WriteMapElemKey()
  8141. }
  8142. ee.EncodeUint(uint64(uint64(k2)))
  8143. if esep {
  8144. ee.WriteMapElemValue()
  8145. }
  8146. ee.EncodeInt(int64(v[uint64(k2)]))
  8147. }
  8148. } else {
  8149. for k2, v2 := range v {
  8150. if esep {
  8151. ee.WriteMapElemKey()
  8152. }
  8153. ee.EncodeUint(uint64(k2))
  8154. if esep {
  8155. ee.WriteMapElemValue()
  8156. }
  8157. ee.EncodeInt(int64(v2))
  8158. }
  8159. }
  8160. ee.WriteMapEnd()
  8161. }
  8162. func (e *Encoder) fastpathEncMapUint64Int32R(f *codecFnInfo, rv reflect.Value) {
  8163. fastpathTV.EncMapUint64Int32V(rv2i(rv).(map[uint64]int32), e)
  8164. }
  8165. func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, e *Encoder) {
  8166. if v == nil {
  8167. e.e.EncodeNil()
  8168. return
  8169. }
  8170. ee, esep := e.e, e.hh.hasElemSeparators()
  8171. ee.WriteMapStart(len(v))
  8172. if e.h.Canonical {
  8173. v2 := make([]uint64, len(v))
  8174. var i int
  8175. for k, _ := range v {
  8176. v2[i] = uint64(k)
  8177. i++
  8178. }
  8179. sort.Sort(uintSlice(v2))
  8180. for _, k2 := range v2 {
  8181. if esep {
  8182. ee.WriteMapElemKey()
  8183. }
  8184. ee.EncodeUint(uint64(uint64(k2)))
  8185. if esep {
  8186. ee.WriteMapElemValue()
  8187. }
  8188. ee.EncodeInt(int64(v[uint64(k2)]))
  8189. }
  8190. } else {
  8191. for k2, v2 := range v {
  8192. if esep {
  8193. ee.WriteMapElemKey()
  8194. }
  8195. ee.EncodeUint(uint64(k2))
  8196. if esep {
  8197. ee.WriteMapElemValue()
  8198. }
  8199. ee.EncodeInt(int64(v2))
  8200. }
  8201. }
  8202. ee.WriteMapEnd()
  8203. }
  8204. func (e *Encoder) fastpathEncMapUint64Int64R(f *codecFnInfo, rv reflect.Value) {
  8205. fastpathTV.EncMapUint64Int64V(rv2i(rv).(map[uint64]int64), e)
  8206. }
  8207. func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, e *Encoder) {
  8208. if v == nil {
  8209. e.e.EncodeNil()
  8210. return
  8211. }
  8212. ee, esep := e.e, e.hh.hasElemSeparators()
  8213. ee.WriteMapStart(len(v))
  8214. if e.h.Canonical {
  8215. v2 := make([]uint64, len(v))
  8216. var i int
  8217. for k, _ := range v {
  8218. v2[i] = uint64(k)
  8219. i++
  8220. }
  8221. sort.Sort(uintSlice(v2))
  8222. for _, k2 := range v2 {
  8223. if esep {
  8224. ee.WriteMapElemKey()
  8225. }
  8226. ee.EncodeUint(uint64(uint64(k2)))
  8227. if esep {
  8228. ee.WriteMapElemValue()
  8229. }
  8230. ee.EncodeInt(int64(v[uint64(k2)]))
  8231. }
  8232. } else {
  8233. for k2, v2 := range v {
  8234. if esep {
  8235. ee.WriteMapElemKey()
  8236. }
  8237. ee.EncodeUint(uint64(k2))
  8238. if esep {
  8239. ee.WriteMapElemValue()
  8240. }
  8241. ee.EncodeInt(int64(v2))
  8242. }
  8243. }
  8244. ee.WriteMapEnd()
  8245. }
  8246. func (e *Encoder) fastpathEncMapUint64Float32R(f *codecFnInfo, rv reflect.Value) {
  8247. fastpathTV.EncMapUint64Float32V(rv2i(rv).(map[uint64]float32), e)
  8248. }
  8249. func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, e *Encoder) {
  8250. if v == nil {
  8251. e.e.EncodeNil()
  8252. return
  8253. }
  8254. ee, esep := e.e, e.hh.hasElemSeparators()
  8255. ee.WriteMapStart(len(v))
  8256. if e.h.Canonical {
  8257. v2 := make([]uint64, len(v))
  8258. var i int
  8259. for k, _ := range v {
  8260. v2[i] = uint64(k)
  8261. i++
  8262. }
  8263. sort.Sort(uintSlice(v2))
  8264. for _, k2 := range v2 {
  8265. if esep {
  8266. ee.WriteMapElemKey()
  8267. }
  8268. ee.EncodeUint(uint64(uint64(k2)))
  8269. if esep {
  8270. ee.WriteMapElemValue()
  8271. }
  8272. ee.EncodeFloat32(v[uint64(k2)])
  8273. }
  8274. } else {
  8275. for k2, v2 := range v {
  8276. if esep {
  8277. ee.WriteMapElemKey()
  8278. }
  8279. ee.EncodeUint(uint64(k2))
  8280. if esep {
  8281. ee.WriteMapElemValue()
  8282. }
  8283. ee.EncodeFloat32(v2)
  8284. }
  8285. }
  8286. ee.WriteMapEnd()
  8287. }
  8288. func (e *Encoder) fastpathEncMapUint64Float64R(f *codecFnInfo, rv reflect.Value) {
  8289. fastpathTV.EncMapUint64Float64V(rv2i(rv).(map[uint64]float64), e)
  8290. }
  8291. func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, e *Encoder) {
  8292. if v == nil {
  8293. e.e.EncodeNil()
  8294. return
  8295. }
  8296. ee, esep := e.e, e.hh.hasElemSeparators()
  8297. ee.WriteMapStart(len(v))
  8298. if e.h.Canonical {
  8299. v2 := make([]uint64, len(v))
  8300. var i int
  8301. for k, _ := range v {
  8302. v2[i] = uint64(k)
  8303. i++
  8304. }
  8305. sort.Sort(uintSlice(v2))
  8306. for _, k2 := range v2 {
  8307. if esep {
  8308. ee.WriteMapElemKey()
  8309. }
  8310. ee.EncodeUint(uint64(uint64(k2)))
  8311. if esep {
  8312. ee.WriteMapElemValue()
  8313. }
  8314. ee.EncodeFloat64(v[uint64(k2)])
  8315. }
  8316. } else {
  8317. for k2, v2 := range v {
  8318. if esep {
  8319. ee.WriteMapElemKey()
  8320. }
  8321. ee.EncodeUint(uint64(k2))
  8322. if esep {
  8323. ee.WriteMapElemValue()
  8324. }
  8325. ee.EncodeFloat64(v2)
  8326. }
  8327. }
  8328. ee.WriteMapEnd()
  8329. }
  8330. func (e *Encoder) fastpathEncMapUint64BoolR(f *codecFnInfo, rv reflect.Value) {
  8331. fastpathTV.EncMapUint64BoolV(rv2i(rv).(map[uint64]bool), e)
  8332. }
  8333. func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, e *Encoder) {
  8334. if v == nil {
  8335. e.e.EncodeNil()
  8336. return
  8337. }
  8338. ee, esep := e.e, e.hh.hasElemSeparators()
  8339. ee.WriteMapStart(len(v))
  8340. if e.h.Canonical {
  8341. v2 := make([]uint64, len(v))
  8342. var i int
  8343. for k, _ := range v {
  8344. v2[i] = uint64(k)
  8345. i++
  8346. }
  8347. sort.Sort(uintSlice(v2))
  8348. for _, k2 := range v2 {
  8349. if esep {
  8350. ee.WriteMapElemKey()
  8351. }
  8352. ee.EncodeUint(uint64(uint64(k2)))
  8353. if esep {
  8354. ee.WriteMapElemValue()
  8355. }
  8356. ee.EncodeBool(v[uint64(k2)])
  8357. }
  8358. } else {
  8359. for k2, v2 := range v {
  8360. if esep {
  8361. ee.WriteMapElemKey()
  8362. }
  8363. ee.EncodeUint(uint64(k2))
  8364. if esep {
  8365. ee.WriteMapElemValue()
  8366. }
  8367. ee.EncodeBool(v2)
  8368. }
  8369. }
  8370. ee.WriteMapEnd()
  8371. }
  8372. func (e *Encoder) fastpathEncMapUintptrIntfR(f *codecFnInfo, rv reflect.Value) {
  8373. fastpathTV.EncMapUintptrIntfV(rv2i(rv).(map[uintptr]interface{}), e)
  8374. }
  8375. func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, e *Encoder) {
  8376. if v == nil {
  8377. e.e.EncodeNil()
  8378. return
  8379. }
  8380. ee, esep := e.e, e.hh.hasElemSeparators()
  8381. ee.WriteMapStart(len(v))
  8382. if e.h.Canonical {
  8383. v2 := make([]uint64, len(v))
  8384. var i int
  8385. for k, _ := range v {
  8386. v2[i] = uint64(k)
  8387. i++
  8388. }
  8389. sort.Sort(uintSlice(v2))
  8390. for _, k2 := range v2 {
  8391. if esep {
  8392. ee.WriteMapElemKey()
  8393. }
  8394. e.encode(uintptr(k2))
  8395. if esep {
  8396. ee.WriteMapElemValue()
  8397. }
  8398. e.encode(v[uintptr(k2)])
  8399. }
  8400. } else {
  8401. for k2, v2 := range v {
  8402. if esep {
  8403. ee.WriteMapElemKey()
  8404. }
  8405. e.encode(k2)
  8406. if esep {
  8407. ee.WriteMapElemValue()
  8408. }
  8409. e.encode(v2)
  8410. }
  8411. }
  8412. ee.WriteMapEnd()
  8413. }
  8414. func (e *Encoder) fastpathEncMapUintptrStringR(f *codecFnInfo, rv reflect.Value) {
  8415. fastpathTV.EncMapUintptrStringV(rv2i(rv).(map[uintptr]string), e)
  8416. }
  8417. func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, e *Encoder) {
  8418. if v == nil {
  8419. e.e.EncodeNil()
  8420. return
  8421. }
  8422. ee, esep := e.e, e.hh.hasElemSeparators()
  8423. ee.WriteMapStart(len(v))
  8424. if e.h.Canonical {
  8425. v2 := make([]uint64, len(v))
  8426. var i int
  8427. for k, _ := range v {
  8428. v2[i] = uint64(k)
  8429. i++
  8430. }
  8431. sort.Sort(uintSlice(v2))
  8432. for _, k2 := range v2 {
  8433. if esep {
  8434. ee.WriteMapElemKey()
  8435. }
  8436. e.encode(uintptr(k2))
  8437. if esep {
  8438. ee.WriteMapElemValue()
  8439. }
  8440. ee.EncodeString(c_UTF8, v[uintptr(k2)])
  8441. }
  8442. } else {
  8443. for k2, v2 := range v {
  8444. if esep {
  8445. ee.WriteMapElemKey()
  8446. }
  8447. e.encode(k2)
  8448. if esep {
  8449. ee.WriteMapElemValue()
  8450. }
  8451. ee.EncodeString(c_UTF8, v2)
  8452. }
  8453. }
  8454. ee.WriteMapEnd()
  8455. }
  8456. func (e *Encoder) fastpathEncMapUintptrUintR(f *codecFnInfo, rv reflect.Value) {
  8457. fastpathTV.EncMapUintptrUintV(rv2i(rv).(map[uintptr]uint), e)
  8458. }
  8459. func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, e *Encoder) {
  8460. if v == nil {
  8461. e.e.EncodeNil()
  8462. return
  8463. }
  8464. ee, esep := e.e, e.hh.hasElemSeparators()
  8465. ee.WriteMapStart(len(v))
  8466. if e.h.Canonical {
  8467. v2 := make([]uint64, len(v))
  8468. var i int
  8469. for k, _ := range v {
  8470. v2[i] = uint64(k)
  8471. i++
  8472. }
  8473. sort.Sort(uintSlice(v2))
  8474. for _, k2 := range v2 {
  8475. if esep {
  8476. ee.WriteMapElemKey()
  8477. }
  8478. e.encode(uintptr(k2))
  8479. if esep {
  8480. ee.WriteMapElemValue()
  8481. }
  8482. ee.EncodeUint(uint64(v[uintptr(k2)]))
  8483. }
  8484. } else {
  8485. for k2, v2 := range v {
  8486. if esep {
  8487. ee.WriteMapElemKey()
  8488. }
  8489. e.encode(k2)
  8490. if esep {
  8491. ee.WriteMapElemValue()
  8492. }
  8493. ee.EncodeUint(uint64(v2))
  8494. }
  8495. }
  8496. ee.WriteMapEnd()
  8497. }
  8498. func (e *Encoder) fastpathEncMapUintptrUint8R(f *codecFnInfo, rv reflect.Value) {
  8499. fastpathTV.EncMapUintptrUint8V(rv2i(rv).(map[uintptr]uint8), e)
  8500. }
  8501. func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, e *Encoder) {
  8502. if v == nil {
  8503. e.e.EncodeNil()
  8504. return
  8505. }
  8506. ee, esep := e.e, e.hh.hasElemSeparators()
  8507. ee.WriteMapStart(len(v))
  8508. if e.h.Canonical {
  8509. v2 := make([]uint64, len(v))
  8510. var i int
  8511. for k, _ := range v {
  8512. v2[i] = uint64(k)
  8513. i++
  8514. }
  8515. sort.Sort(uintSlice(v2))
  8516. for _, k2 := range v2 {
  8517. if esep {
  8518. ee.WriteMapElemKey()
  8519. }
  8520. e.encode(uintptr(k2))
  8521. if esep {
  8522. ee.WriteMapElemValue()
  8523. }
  8524. ee.EncodeUint(uint64(v[uintptr(k2)]))
  8525. }
  8526. } else {
  8527. for k2, v2 := range v {
  8528. if esep {
  8529. ee.WriteMapElemKey()
  8530. }
  8531. e.encode(k2)
  8532. if esep {
  8533. ee.WriteMapElemValue()
  8534. }
  8535. ee.EncodeUint(uint64(v2))
  8536. }
  8537. }
  8538. ee.WriteMapEnd()
  8539. }
  8540. func (e *Encoder) fastpathEncMapUintptrUint16R(f *codecFnInfo, rv reflect.Value) {
  8541. fastpathTV.EncMapUintptrUint16V(rv2i(rv).(map[uintptr]uint16), e)
  8542. }
  8543. func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, e *Encoder) {
  8544. if v == nil {
  8545. e.e.EncodeNil()
  8546. return
  8547. }
  8548. ee, esep := e.e, e.hh.hasElemSeparators()
  8549. ee.WriteMapStart(len(v))
  8550. if e.h.Canonical {
  8551. v2 := make([]uint64, len(v))
  8552. var i int
  8553. for k, _ := range v {
  8554. v2[i] = uint64(k)
  8555. i++
  8556. }
  8557. sort.Sort(uintSlice(v2))
  8558. for _, k2 := range v2 {
  8559. if esep {
  8560. ee.WriteMapElemKey()
  8561. }
  8562. e.encode(uintptr(k2))
  8563. if esep {
  8564. ee.WriteMapElemValue()
  8565. }
  8566. ee.EncodeUint(uint64(v[uintptr(k2)]))
  8567. }
  8568. } else {
  8569. for k2, v2 := range v {
  8570. if esep {
  8571. ee.WriteMapElemKey()
  8572. }
  8573. e.encode(k2)
  8574. if esep {
  8575. ee.WriteMapElemValue()
  8576. }
  8577. ee.EncodeUint(uint64(v2))
  8578. }
  8579. }
  8580. ee.WriteMapEnd()
  8581. }
  8582. func (e *Encoder) fastpathEncMapUintptrUint32R(f *codecFnInfo, rv reflect.Value) {
  8583. fastpathTV.EncMapUintptrUint32V(rv2i(rv).(map[uintptr]uint32), e)
  8584. }
  8585. func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, e *Encoder) {
  8586. if v == nil {
  8587. e.e.EncodeNil()
  8588. return
  8589. }
  8590. ee, esep := e.e, e.hh.hasElemSeparators()
  8591. ee.WriteMapStart(len(v))
  8592. if e.h.Canonical {
  8593. v2 := make([]uint64, len(v))
  8594. var i int
  8595. for k, _ := range v {
  8596. v2[i] = uint64(k)
  8597. i++
  8598. }
  8599. sort.Sort(uintSlice(v2))
  8600. for _, k2 := range v2 {
  8601. if esep {
  8602. ee.WriteMapElemKey()
  8603. }
  8604. e.encode(uintptr(k2))
  8605. if esep {
  8606. ee.WriteMapElemValue()
  8607. }
  8608. ee.EncodeUint(uint64(v[uintptr(k2)]))
  8609. }
  8610. } else {
  8611. for k2, v2 := range v {
  8612. if esep {
  8613. ee.WriteMapElemKey()
  8614. }
  8615. e.encode(k2)
  8616. if esep {
  8617. ee.WriteMapElemValue()
  8618. }
  8619. ee.EncodeUint(uint64(v2))
  8620. }
  8621. }
  8622. ee.WriteMapEnd()
  8623. }
  8624. func (e *Encoder) fastpathEncMapUintptrUint64R(f *codecFnInfo, rv reflect.Value) {
  8625. fastpathTV.EncMapUintptrUint64V(rv2i(rv).(map[uintptr]uint64), e)
  8626. }
  8627. func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, e *Encoder) {
  8628. if v == nil {
  8629. e.e.EncodeNil()
  8630. return
  8631. }
  8632. ee, esep := e.e, e.hh.hasElemSeparators()
  8633. ee.WriteMapStart(len(v))
  8634. if e.h.Canonical {
  8635. v2 := make([]uint64, len(v))
  8636. var i int
  8637. for k, _ := range v {
  8638. v2[i] = uint64(k)
  8639. i++
  8640. }
  8641. sort.Sort(uintSlice(v2))
  8642. for _, k2 := range v2 {
  8643. if esep {
  8644. ee.WriteMapElemKey()
  8645. }
  8646. e.encode(uintptr(k2))
  8647. if esep {
  8648. ee.WriteMapElemValue()
  8649. }
  8650. ee.EncodeUint(uint64(v[uintptr(k2)]))
  8651. }
  8652. } else {
  8653. for k2, v2 := range v {
  8654. if esep {
  8655. ee.WriteMapElemKey()
  8656. }
  8657. e.encode(k2)
  8658. if esep {
  8659. ee.WriteMapElemValue()
  8660. }
  8661. ee.EncodeUint(uint64(v2))
  8662. }
  8663. }
  8664. ee.WriteMapEnd()
  8665. }
  8666. func (e *Encoder) fastpathEncMapUintptrUintptrR(f *codecFnInfo, rv reflect.Value) {
  8667. fastpathTV.EncMapUintptrUintptrV(rv2i(rv).(map[uintptr]uintptr), e)
  8668. }
  8669. func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, e *Encoder) {
  8670. if v == nil {
  8671. e.e.EncodeNil()
  8672. return
  8673. }
  8674. ee, esep := e.e, e.hh.hasElemSeparators()
  8675. ee.WriteMapStart(len(v))
  8676. if e.h.Canonical {
  8677. v2 := make([]uint64, len(v))
  8678. var i int
  8679. for k, _ := range v {
  8680. v2[i] = uint64(k)
  8681. i++
  8682. }
  8683. sort.Sort(uintSlice(v2))
  8684. for _, k2 := range v2 {
  8685. if esep {
  8686. ee.WriteMapElemKey()
  8687. }
  8688. e.encode(uintptr(k2))
  8689. if esep {
  8690. ee.WriteMapElemValue()
  8691. }
  8692. e.encode(v[uintptr(k2)])
  8693. }
  8694. } else {
  8695. for k2, v2 := range v {
  8696. if esep {
  8697. ee.WriteMapElemKey()
  8698. }
  8699. e.encode(k2)
  8700. if esep {
  8701. ee.WriteMapElemValue()
  8702. }
  8703. e.encode(v2)
  8704. }
  8705. }
  8706. ee.WriteMapEnd()
  8707. }
  8708. func (e *Encoder) fastpathEncMapUintptrIntR(f *codecFnInfo, rv reflect.Value) {
  8709. fastpathTV.EncMapUintptrIntV(rv2i(rv).(map[uintptr]int), e)
  8710. }
  8711. func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, e *Encoder) {
  8712. if v == nil {
  8713. e.e.EncodeNil()
  8714. return
  8715. }
  8716. ee, esep := e.e, e.hh.hasElemSeparators()
  8717. ee.WriteMapStart(len(v))
  8718. if e.h.Canonical {
  8719. v2 := make([]uint64, len(v))
  8720. var i int
  8721. for k, _ := range v {
  8722. v2[i] = uint64(k)
  8723. i++
  8724. }
  8725. sort.Sort(uintSlice(v2))
  8726. for _, k2 := range v2 {
  8727. if esep {
  8728. ee.WriteMapElemKey()
  8729. }
  8730. e.encode(uintptr(k2))
  8731. if esep {
  8732. ee.WriteMapElemValue()
  8733. }
  8734. ee.EncodeInt(int64(v[uintptr(k2)]))
  8735. }
  8736. } else {
  8737. for k2, v2 := range v {
  8738. if esep {
  8739. ee.WriteMapElemKey()
  8740. }
  8741. e.encode(k2)
  8742. if esep {
  8743. ee.WriteMapElemValue()
  8744. }
  8745. ee.EncodeInt(int64(v2))
  8746. }
  8747. }
  8748. ee.WriteMapEnd()
  8749. }
  8750. func (e *Encoder) fastpathEncMapUintptrInt8R(f *codecFnInfo, rv reflect.Value) {
  8751. fastpathTV.EncMapUintptrInt8V(rv2i(rv).(map[uintptr]int8), e)
  8752. }
  8753. func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, e *Encoder) {
  8754. if v == nil {
  8755. e.e.EncodeNil()
  8756. return
  8757. }
  8758. ee, esep := e.e, e.hh.hasElemSeparators()
  8759. ee.WriteMapStart(len(v))
  8760. if e.h.Canonical {
  8761. v2 := make([]uint64, len(v))
  8762. var i int
  8763. for k, _ := range v {
  8764. v2[i] = uint64(k)
  8765. i++
  8766. }
  8767. sort.Sort(uintSlice(v2))
  8768. for _, k2 := range v2 {
  8769. if esep {
  8770. ee.WriteMapElemKey()
  8771. }
  8772. e.encode(uintptr(k2))
  8773. if esep {
  8774. ee.WriteMapElemValue()
  8775. }
  8776. ee.EncodeInt(int64(v[uintptr(k2)]))
  8777. }
  8778. } else {
  8779. for k2, v2 := range v {
  8780. if esep {
  8781. ee.WriteMapElemKey()
  8782. }
  8783. e.encode(k2)
  8784. if esep {
  8785. ee.WriteMapElemValue()
  8786. }
  8787. ee.EncodeInt(int64(v2))
  8788. }
  8789. }
  8790. ee.WriteMapEnd()
  8791. }
  8792. func (e *Encoder) fastpathEncMapUintptrInt16R(f *codecFnInfo, rv reflect.Value) {
  8793. fastpathTV.EncMapUintptrInt16V(rv2i(rv).(map[uintptr]int16), e)
  8794. }
  8795. func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, e *Encoder) {
  8796. if v == nil {
  8797. e.e.EncodeNil()
  8798. return
  8799. }
  8800. ee, esep := e.e, e.hh.hasElemSeparators()
  8801. ee.WriteMapStart(len(v))
  8802. if e.h.Canonical {
  8803. v2 := make([]uint64, len(v))
  8804. var i int
  8805. for k, _ := range v {
  8806. v2[i] = uint64(k)
  8807. i++
  8808. }
  8809. sort.Sort(uintSlice(v2))
  8810. for _, k2 := range v2 {
  8811. if esep {
  8812. ee.WriteMapElemKey()
  8813. }
  8814. e.encode(uintptr(k2))
  8815. if esep {
  8816. ee.WriteMapElemValue()
  8817. }
  8818. ee.EncodeInt(int64(v[uintptr(k2)]))
  8819. }
  8820. } else {
  8821. for k2, v2 := range v {
  8822. if esep {
  8823. ee.WriteMapElemKey()
  8824. }
  8825. e.encode(k2)
  8826. if esep {
  8827. ee.WriteMapElemValue()
  8828. }
  8829. ee.EncodeInt(int64(v2))
  8830. }
  8831. }
  8832. ee.WriteMapEnd()
  8833. }
  8834. func (e *Encoder) fastpathEncMapUintptrInt32R(f *codecFnInfo, rv reflect.Value) {
  8835. fastpathTV.EncMapUintptrInt32V(rv2i(rv).(map[uintptr]int32), e)
  8836. }
  8837. func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, e *Encoder) {
  8838. if v == nil {
  8839. e.e.EncodeNil()
  8840. return
  8841. }
  8842. ee, esep := e.e, e.hh.hasElemSeparators()
  8843. ee.WriteMapStart(len(v))
  8844. if e.h.Canonical {
  8845. v2 := make([]uint64, len(v))
  8846. var i int
  8847. for k, _ := range v {
  8848. v2[i] = uint64(k)
  8849. i++
  8850. }
  8851. sort.Sort(uintSlice(v2))
  8852. for _, k2 := range v2 {
  8853. if esep {
  8854. ee.WriteMapElemKey()
  8855. }
  8856. e.encode(uintptr(k2))
  8857. if esep {
  8858. ee.WriteMapElemValue()
  8859. }
  8860. ee.EncodeInt(int64(v[uintptr(k2)]))
  8861. }
  8862. } else {
  8863. for k2, v2 := range v {
  8864. if esep {
  8865. ee.WriteMapElemKey()
  8866. }
  8867. e.encode(k2)
  8868. if esep {
  8869. ee.WriteMapElemValue()
  8870. }
  8871. ee.EncodeInt(int64(v2))
  8872. }
  8873. }
  8874. ee.WriteMapEnd()
  8875. }
  8876. func (e *Encoder) fastpathEncMapUintptrInt64R(f *codecFnInfo, rv reflect.Value) {
  8877. fastpathTV.EncMapUintptrInt64V(rv2i(rv).(map[uintptr]int64), e)
  8878. }
  8879. func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, e *Encoder) {
  8880. if v == nil {
  8881. e.e.EncodeNil()
  8882. return
  8883. }
  8884. ee, esep := e.e, e.hh.hasElemSeparators()
  8885. ee.WriteMapStart(len(v))
  8886. if e.h.Canonical {
  8887. v2 := make([]uint64, len(v))
  8888. var i int
  8889. for k, _ := range v {
  8890. v2[i] = uint64(k)
  8891. i++
  8892. }
  8893. sort.Sort(uintSlice(v2))
  8894. for _, k2 := range v2 {
  8895. if esep {
  8896. ee.WriteMapElemKey()
  8897. }
  8898. e.encode(uintptr(k2))
  8899. if esep {
  8900. ee.WriteMapElemValue()
  8901. }
  8902. ee.EncodeInt(int64(v[uintptr(k2)]))
  8903. }
  8904. } else {
  8905. for k2, v2 := range v {
  8906. if esep {
  8907. ee.WriteMapElemKey()
  8908. }
  8909. e.encode(k2)
  8910. if esep {
  8911. ee.WriteMapElemValue()
  8912. }
  8913. ee.EncodeInt(int64(v2))
  8914. }
  8915. }
  8916. ee.WriteMapEnd()
  8917. }
  8918. func (e *Encoder) fastpathEncMapUintptrFloat32R(f *codecFnInfo, rv reflect.Value) {
  8919. fastpathTV.EncMapUintptrFloat32V(rv2i(rv).(map[uintptr]float32), e)
  8920. }
  8921. func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, e *Encoder) {
  8922. if v == nil {
  8923. e.e.EncodeNil()
  8924. return
  8925. }
  8926. ee, esep := e.e, e.hh.hasElemSeparators()
  8927. ee.WriteMapStart(len(v))
  8928. if e.h.Canonical {
  8929. v2 := make([]uint64, len(v))
  8930. var i int
  8931. for k, _ := range v {
  8932. v2[i] = uint64(k)
  8933. i++
  8934. }
  8935. sort.Sort(uintSlice(v2))
  8936. for _, k2 := range v2 {
  8937. if esep {
  8938. ee.WriteMapElemKey()
  8939. }
  8940. e.encode(uintptr(k2))
  8941. if esep {
  8942. ee.WriteMapElemValue()
  8943. }
  8944. ee.EncodeFloat32(v[uintptr(k2)])
  8945. }
  8946. } else {
  8947. for k2, v2 := range v {
  8948. if esep {
  8949. ee.WriteMapElemKey()
  8950. }
  8951. e.encode(k2)
  8952. if esep {
  8953. ee.WriteMapElemValue()
  8954. }
  8955. ee.EncodeFloat32(v2)
  8956. }
  8957. }
  8958. ee.WriteMapEnd()
  8959. }
  8960. func (e *Encoder) fastpathEncMapUintptrFloat64R(f *codecFnInfo, rv reflect.Value) {
  8961. fastpathTV.EncMapUintptrFloat64V(rv2i(rv).(map[uintptr]float64), e)
  8962. }
  8963. func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, e *Encoder) {
  8964. if v == nil {
  8965. e.e.EncodeNil()
  8966. return
  8967. }
  8968. ee, esep := e.e, e.hh.hasElemSeparators()
  8969. ee.WriteMapStart(len(v))
  8970. if e.h.Canonical {
  8971. v2 := make([]uint64, len(v))
  8972. var i int
  8973. for k, _ := range v {
  8974. v2[i] = uint64(k)
  8975. i++
  8976. }
  8977. sort.Sort(uintSlice(v2))
  8978. for _, k2 := range v2 {
  8979. if esep {
  8980. ee.WriteMapElemKey()
  8981. }
  8982. e.encode(uintptr(k2))
  8983. if esep {
  8984. ee.WriteMapElemValue()
  8985. }
  8986. ee.EncodeFloat64(v[uintptr(k2)])
  8987. }
  8988. } else {
  8989. for k2, v2 := range v {
  8990. if esep {
  8991. ee.WriteMapElemKey()
  8992. }
  8993. e.encode(k2)
  8994. if esep {
  8995. ee.WriteMapElemValue()
  8996. }
  8997. ee.EncodeFloat64(v2)
  8998. }
  8999. }
  9000. ee.WriteMapEnd()
  9001. }
  9002. func (e *Encoder) fastpathEncMapUintptrBoolR(f *codecFnInfo, rv reflect.Value) {
  9003. fastpathTV.EncMapUintptrBoolV(rv2i(rv).(map[uintptr]bool), e)
  9004. }
  9005. func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, e *Encoder) {
  9006. if v == nil {
  9007. e.e.EncodeNil()
  9008. return
  9009. }
  9010. ee, esep := e.e, e.hh.hasElemSeparators()
  9011. ee.WriteMapStart(len(v))
  9012. if e.h.Canonical {
  9013. v2 := make([]uint64, len(v))
  9014. var i int
  9015. for k, _ := range v {
  9016. v2[i] = uint64(k)
  9017. i++
  9018. }
  9019. sort.Sort(uintSlice(v2))
  9020. for _, k2 := range v2 {
  9021. if esep {
  9022. ee.WriteMapElemKey()
  9023. }
  9024. e.encode(uintptr(k2))
  9025. if esep {
  9026. ee.WriteMapElemValue()
  9027. }
  9028. ee.EncodeBool(v[uintptr(k2)])
  9029. }
  9030. } else {
  9031. for k2, v2 := range v {
  9032. if esep {
  9033. ee.WriteMapElemKey()
  9034. }
  9035. e.encode(k2)
  9036. if esep {
  9037. ee.WriteMapElemValue()
  9038. }
  9039. ee.EncodeBool(v2)
  9040. }
  9041. }
  9042. ee.WriteMapEnd()
  9043. }
  9044. func (e *Encoder) fastpathEncMapIntIntfR(f *codecFnInfo, rv reflect.Value) {
  9045. fastpathTV.EncMapIntIntfV(rv2i(rv).(map[int]interface{}), e)
  9046. }
  9047. func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, e *Encoder) {
  9048. if v == nil {
  9049. e.e.EncodeNil()
  9050. return
  9051. }
  9052. ee, esep := e.e, e.hh.hasElemSeparators()
  9053. ee.WriteMapStart(len(v))
  9054. if e.h.Canonical {
  9055. v2 := make([]int64, len(v))
  9056. var i int
  9057. for k, _ := range v {
  9058. v2[i] = int64(k)
  9059. i++
  9060. }
  9061. sort.Sort(intSlice(v2))
  9062. for _, k2 := range v2 {
  9063. if esep {
  9064. ee.WriteMapElemKey()
  9065. }
  9066. ee.EncodeInt(int64(int(k2)))
  9067. if esep {
  9068. ee.WriteMapElemValue()
  9069. }
  9070. e.encode(v[int(k2)])
  9071. }
  9072. } else {
  9073. for k2, v2 := range v {
  9074. if esep {
  9075. ee.WriteMapElemKey()
  9076. }
  9077. ee.EncodeInt(int64(k2))
  9078. if esep {
  9079. ee.WriteMapElemValue()
  9080. }
  9081. e.encode(v2)
  9082. }
  9083. }
  9084. ee.WriteMapEnd()
  9085. }
  9086. func (e *Encoder) fastpathEncMapIntStringR(f *codecFnInfo, rv reflect.Value) {
  9087. fastpathTV.EncMapIntStringV(rv2i(rv).(map[int]string), e)
  9088. }
  9089. func (_ fastpathT) EncMapIntStringV(v map[int]string, e *Encoder) {
  9090. if v == nil {
  9091. e.e.EncodeNil()
  9092. return
  9093. }
  9094. ee, esep := e.e, e.hh.hasElemSeparators()
  9095. ee.WriteMapStart(len(v))
  9096. if e.h.Canonical {
  9097. v2 := make([]int64, len(v))
  9098. var i int
  9099. for k, _ := range v {
  9100. v2[i] = int64(k)
  9101. i++
  9102. }
  9103. sort.Sort(intSlice(v2))
  9104. for _, k2 := range v2 {
  9105. if esep {
  9106. ee.WriteMapElemKey()
  9107. }
  9108. ee.EncodeInt(int64(int(k2)))
  9109. if esep {
  9110. ee.WriteMapElemValue()
  9111. }
  9112. ee.EncodeString(c_UTF8, v[int(k2)])
  9113. }
  9114. } else {
  9115. for k2, v2 := range v {
  9116. if esep {
  9117. ee.WriteMapElemKey()
  9118. }
  9119. ee.EncodeInt(int64(k2))
  9120. if esep {
  9121. ee.WriteMapElemValue()
  9122. }
  9123. ee.EncodeString(c_UTF8, v2)
  9124. }
  9125. }
  9126. ee.WriteMapEnd()
  9127. }
  9128. func (e *Encoder) fastpathEncMapIntUintR(f *codecFnInfo, rv reflect.Value) {
  9129. fastpathTV.EncMapIntUintV(rv2i(rv).(map[int]uint), e)
  9130. }
  9131. func (_ fastpathT) EncMapIntUintV(v map[int]uint, e *Encoder) {
  9132. if v == nil {
  9133. e.e.EncodeNil()
  9134. return
  9135. }
  9136. ee, esep := e.e, e.hh.hasElemSeparators()
  9137. ee.WriteMapStart(len(v))
  9138. if e.h.Canonical {
  9139. v2 := make([]int64, len(v))
  9140. var i int
  9141. for k, _ := range v {
  9142. v2[i] = int64(k)
  9143. i++
  9144. }
  9145. sort.Sort(intSlice(v2))
  9146. for _, k2 := range v2 {
  9147. if esep {
  9148. ee.WriteMapElemKey()
  9149. }
  9150. ee.EncodeInt(int64(int(k2)))
  9151. if esep {
  9152. ee.WriteMapElemValue()
  9153. }
  9154. ee.EncodeUint(uint64(v[int(k2)]))
  9155. }
  9156. } else {
  9157. for k2, v2 := range v {
  9158. if esep {
  9159. ee.WriteMapElemKey()
  9160. }
  9161. ee.EncodeInt(int64(k2))
  9162. if esep {
  9163. ee.WriteMapElemValue()
  9164. }
  9165. ee.EncodeUint(uint64(v2))
  9166. }
  9167. }
  9168. ee.WriteMapEnd()
  9169. }
  9170. func (e *Encoder) fastpathEncMapIntUint8R(f *codecFnInfo, rv reflect.Value) {
  9171. fastpathTV.EncMapIntUint8V(rv2i(rv).(map[int]uint8), e)
  9172. }
  9173. func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, e *Encoder) {
  9174. if v == nil {
  9175. e.e.EncodeNil()
  9176. return
  9177. }
  9178. ee, esep := e.e, e.hh.hasElemSeparators()
  9179. ee.WriteMapStart(len(v))
  9180. if e.h.Canonical {
  9181. v2 := make([]int64, len(v))
  9182. var i int
  9183. for k, _ := range v {
  9184. v2[i] = int64(k)
  9185. i++
  9186. }
  9187. sort.Sort(intSlice(v2))
  9188. for _, k2 := range v2 {
  9189. if esep {
  9190. ee.WriteMapElemKey()
  9191. }
  9192. ee.EncodeInt(int64(int(k2)))
  9193. if esep {
  9194. ee.WriteMapElemValue()
  9195. }
  9196. ee.EncodeUint(uint64(v[int(k2)]))
  9197. }
  9198. } else {
  9199. for k2, v2 := range v {
  9200. if esep {
  9201. ee.WriteMapElemKey()
  9202. }
  9203. ee.EncodeInt(int64(k2))
  9204. if esep {
  9205. ee.WriteMapElemValue()
  9206. }
  9207. ee.EncodeUint(uint64(v2))
  9208. }
  9209. }
  9210. ee.WriteMapEnd()
  9211. }
  9212. func (e *Encoder) fastpathEncMapIntUint16R(f *codecFnInfo, rv reflect.Value) {
  9213. fastpathTV.EncMapIntUint16V(rv2i(rv).(map[int]uint16), e)
  9214. }
  9215. func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, e *Encoder) {
  9216. if v == nil {
  9217. e.e.EncodeNil()
  9218. return
  9219. }
  9220. ee, esep := e.e, e.hh.hasElemSeparators()
  9221. ee.WriteMapStart(len(v))
  9222. if e.h.Canonical {
  9223. v2 := make([]int64, len(v))
  9224. var i int
  9225. for k, _ := range v {
  9226. v2[i] = int64(k)
  9227. i++
  9228. }
  9229. sort.Sort(intSlice(v2))
  9230. for _, k2 := range v2 {
  9231. if esep {
  9232. ee.WriteMapElemKey()
  9233. }
  9234. ee.EncodeInt(int64(int(k2)))
  9235. if esep {
  9236. ee.WriteMapElemValue()
  9237. }
  9238. ee.EncodeUint(uint64(v[int(k2)]))
  9239. }
  9240. } else {
  9241. for k2, v2 := range v {
  9242. if esep {
  9243. ee.WriteMapElemKey()
  9244. }
  9245. ee.EncodeInt(int64(k2))
  9246. if esep {
  9247. ee.WriteMapElemValue()
  9248. }
  9249. ee.EncodeUint(uint64(v2))
  9250. }
  9251. }
  9252. ee.WriteMapEnd()
  9253. }
  9254. func (e *Encoder) fastpathEncMapIntUint32R(f *codecFnInfo, rv reflect.Value) {
  9255. fastpathTV.EncMapIntUint32V(rv2i(rv).(map[int]uint32), e)
  9256. }
  9257. func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, e *Encoder) {
  9258. if v == nil {
  9259. e.e.EncodeNil()
  9260. return
  9261. }
  9262. ee, esep := e.e, e.hh.hasElemSeparators()
  9263. ee.WriteMapStart(len(v))
  9264. if e.h.Canonical {
  9265. v2 := make([]int64, len(v))
  9266. var i int
  9267. for k, _ := range v {
  9268. v2[i] = int64(k)
  9269. i++
  9270. }
  9271. sort.Sort(intSlice(v2))
  9272. for _, k2 := range v2 {
  9273. if esep {
  9274. ee.WriteMapElemKey()
  9275. }
  9276. ee.EncodeInt(int64(int(k2)))
  9277. if esep {
  9278. ee.WriteMapElemValue()
  9279. }
  9280. ee.EncodeUint(uint64(v[int(k2)]))
  9281. }
  9282. } else {
  9283. for k2, v2 := range v {
  9284. if esep {
  9285. ee.WriteMapElemKey()
  9286. }
  9287. ee.EncodeInt(int64(k2))
  9288. if esep {
  9289. ee.WriteMapElemValue()
  9290. }
  9291. ee.EncodeUint(uint64(v2))
  9292. }
  9293. }
  9294. ee.WriteMapEnd()
  9295. }
  9296. func (e *Encoder) fastpathEncMapIntUint64R(f *codecFnInfo, rv reflect.Value) {
  9297. fastpathTV.EncMapIntUint64V(rv2i(rv).(map[int]uint64), e)
  9298. }
  9299. func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, e *Encoder) {
  9300. if v == nil {
  9301. e.e.EncodeNil()
  9302. return
  9303. }
  9304. ee, esep := e.e, e.hh.hasElemSeparators()
  9305. ee.WriteMapStart(len(v))
  9306. if e.h.Canonical {
  9307. v2 := make([]int64, len(v))
  9308. var i int
  9309. for k, _ := range v {
  9310. v2[i] = int64(k)
  9311. i++
  9312. }
  9313. sort.Sort(intSlice(v2))
  9314. for _, k2 := range v2 {
  9315. if esep {
  9316. ee.WriteMapElemKey()
  9317. }
  9318. ee.EncodeInt(int64(int(k2)))
  9319. if esep {
  9320. ee.WriteMapElemValue()
  9321. }
  9322. ee.EncodeUint(uint64(v[int(k2)]))
  9323. }
  9324. } else {
  9325. for k2, v2 := range v {
  9326. if esep {
  9327. ee.WriteMapElemKey()
  9328. }
  9329. ee.EncodeInt(int64(k2))
  9330. if esep {
  9331. ee.WriteMapElemValue()
  9332. }
  9333. ee.EncodeUint(uint64(v2))
  9334. }
  9335. }
  9336. ee.WriteMapEnd()
  9337. }
  9338. func (e *Encoder) fastpathEncMapIntUintptrR(f *codecFnInfo, rv reflect.Value) {
  9339. fastpathTV.EncMapIntUintptrV(rv2i(rv).(map[int]uintptr), e)
  9340. }
  9341. func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, e *Encoder) {
  9342. if v == nil {
  9343. e.e.EncodeNil()
  9344. return
  9345. }
  9346. ee, esep := e.e, e.hh.hasElemSeparators()
  9347. ee.WriteMapStart(len(v))
  9348. if e.h.Canonical {
  9349. v2 := make([]int64, len(v))
  9350. var i int
  9351. for k, _ := range v {
  9352. v2[i] = int64(k)
  9353. i++
  9354. }
  9355. sort.Sort(intSlice(v2))
  9356. for _, k2 := range v2 {
  9357. if esep {
  9358. ee.WriteMapElemKey()
  9359. }
  9360. ee.EncodeInt(int64(int(k2)))
  9361. if esep {
  9362. ee.WriteMapElemValue()
  9363. }
  9364. e.encode(v[int(k2)])
  9365. }
  9366. } else {
  9367. for k2, v2 := range v {
  9368. if esep {
  9369. ee.WriteMapElemKey()
  9370. }
  9371. ee.EncodeInt(int64(k2))
  9372. if esep {
  9373. ee.WriteMapElemValue()
  9374. }
  9375. e.encode(v2)
  9376. }
  9377. }
  9378. ee.WriteMapEnd()
  9379. }
  9380. func (e *Encoder) fastpathEncMapIntIntR(f *codecFnInfo, rv reflect.Value) {
  9381. fastpathTV.EncMapIntIntV(rv2i(rv).(map[int]int), e)
  9382. }
  9383. func (_ fastpathT) EncMapIntIntV(v map[int]int, e *Encoder) {
  9384. if v == nil {
  9385. e.e.EncodeNil()
  9386. return
  9387. }
  9388. ee, esep := e.e, e.hh.hasElemSeparators()
  9389. ee.WriteMapStart(len(v))
  9390. if e.h.Canonical {
  9391. v2 := make([]int64, len(v))
  9392. var i int
  9393. for k, _ := range v {
  9394. v2[i] = int64(k)
  9395. i++
  9396. }
  9397. sort.Sort(intSlice(v2))
  9398. for _, k2 := range v2 {
  9399. if esep {
  9400. ee.WriteMapElemKey()
  9401. }
  9402. ee.EncodeInt(int64(int(k2)))
  9403. if esep {
  9404. ee.WriteMapElemValue()
  9405. }
  9406. ee.EncodeInt(int64(v[int(k2)]))
  9407. }
  9408. } else {
  9409. for k2, v2 := range v {
  9410. if esep {
  9411. ee.WriteMapElemKey()
  9412. }
  9413. ee.EncodeInt(int64(k2))
  9414. if esep {
  9415. ee.WriteMapElemValue()
  9416. }
  9417. ee.EncodeInt(int64(v2))
  9418. }
  9419. }
  9420. ee.WriteMapEnd()
  9421. }
  9422. func (e *Encoder) fastpathEncMapIntInt8R(f *codecFnInfo, rv reflect.Value) {
  9423. fastpathTV.EncMapIntInt8V(rv2i(rv).(map[int]int8), e)
  9424. }
  9425. func (_ fastpathT) EncMapIntInt8V(v map[int]int8, e *Encoder) {
  9426. if v == nil {
  9427. e.e.EncodeNil()
  9428. return
  9429. }
  9430. ee, esep := e.e, e.hh.hasElemSeparators()
  9431. ee.WriteMapStart(len(v))
  9432. if e.h.Canonical {
  9433. v2 := make([]int64, len(v))
  9434. var i int
  9435. for k, _ := range v {
  9436. v2[i] = int64(k)
  9437. i++
  9438. }
  9439. sort.Sort(intSlice(v2))
  9440. for _, k2 := range v2 {
  9441. if esep {
  9442. ee.WriteMapElemKey()
  9443. }
  9444. ee.EncodeInt(int64(int(k2)))
  9445. if esep {
  9446. ee.WriteMapElemValue()
  9447. }
  9448. ee.EncodeInt(int64(v[int(k2)]))
  9449. }
  9450. } else {
  9451. for k2, v2 := range v {
  9452. if esep {
  9453. ee.WriteMapElemKey()
  9454. }
  9455. ee.EncodeInt(int64(k2))
  9456. if esep {
  9457. ee.WriteMapElemValue()
  9458. }
  9459. ee.EncodeInt(int64(v2))
  9460. }
  9461. }
  9462. ee.WriteMapEnd()
  9463. }
  9464. func (e *Encoder) fastpathEncMapIntInt16R(f *codecFnInfo, rv reflect.Value) {
  9465. fastpathTV.EncMapIntInt16V(rv2i(rv).(map[int]int16), e)
  9466. }
  9467. func (_ fastpathT) EncMapIntInt16V(v map[int]int16, e *Encoder) {
  9468. if v == nil {
  9469. e.e.EncodeNil()
  9470. return
  9471. }
  9472. ee, esep := e.e, e.hh.hasElemSeparators()
  9473. ee.WriteMapStart(len(v))
  9474. if e.h.Canonical {
  9475. v2 := make([]int64, len(v))
  9476. var i int
  9477. for k, _ := range v {
  9478. v2[i] = int64(k)
  9479. i++
  9480. }
  9481. sort.Sort(intSlice(v2))
  9482. for _, k2 := range v2 {
  9483. if esep {
  9484. ee.WriteMapElemKey()
  9485. }
  9486. ee.EncodeInt(int64(int(k2)))
  9487. if esep {
  9488. ee.WriteMapElemValue()
  9489. }
  9490. ee.EncodeInt(int64(v[int(k2)]))
  9491. }
  9492. } else {
  9493. for k2, v2 := range v {
  9494. if esep {
  9495. ee.WriteMapElemKey()
  9496. }
  9497. ee.EncodeInt(int64(k2))
  9498. if esep {
  9499. ee.WriteMapElemValue()
  9500. }
  9501. ee.EncodeInt(int64(v2))
  9502. }
  9503. }
  9504. ee.WriteMapEnd()
  9505. }
  9506. func (e *Encoder) fastpathEncMapIntInt32R(f *codecFnInfo, rv reflect.Value) {
  9507. fastpathTV.EncMapIntInt32V(rv2i(rv).(map[int]int32), e)
  9508. }
  9509. func (_ fastpathT) EncMapIntInt32V(v map[int]int32, e *Encoder) {
  9510. if v == nil {
  9511. e.e.EncodeNil()
  9512. return
  9513. }
  9514. ee, esep := e.e, e.hh.hasElemSeparators()
  9515. ee.WriteMapStart(len(v))
  9516. if e.h.Canonical {
  9517. v2 := make([]int64, len(v))
  9518. var i int
  9519. for k, _ := range v {
  9520. v2[i] = int64(k)
  9521. i++
  9522. }
  9523. sort.Sort(intSlice(v2))
  9524. for _, k2 := range v2 {
  9525. if esep {
  9526. ee.WriteMapElemKey()
  9527. }
  9528. ee.EncodeInt(int64(int(k2)))
  9529. if esep {
  9530. ee.WriteMapElemValue()
  9531. }
  9532. ee.EncodeInt(int64(v[int(k2)]))
  9533. }
  9534. } else {
  9535. for k2, v2 := range v {
  9536. if esep {
  9537. ee.WriteMapElemKey()
  9538. }
  9539. ee.EncodeInt(int64(k2))
  9540. if esep {
  9541. ee.WriteMapElemValue()
  9542. }
  9543. ee.EncodeInt(int64(v2))
  9544. }
  9545. }
  9546. ee.WriteMapEnd()
  9547. }
  9548. func (e *Encoder) fastpathEncMapIntInt64R(f *codecFnInfo, rv reflect.Value) {
  9549. fastpathTV.EncMapIntInt64V(rv2i(rv).(map[int]int64), e)
  9550. }
  9551. func (_ fastpathT) EncMapIntInt64V(v map[int]int64, e *Encoder) {
  9552. if v == nil {
  9553. e.e.EncodeNil()
  9554. return
  9555. }
  9556. ee, esep := e.e, e.hh.hasElemSeparators()
  9557. ee.WriteMapStart(len(v))
  9558. if e.h.Canonical {
  9559. v2 := make([]int64, len(v))
  9560. var i int
  9561. for k, _ := range v {
  9562. v2[i] = int64(k)
  9563. i++
  9564. }
  9565. sort.Sort(intSlice(v2))
  9566. for _, k2 := range v2 {
  9567. if esep {
  9568. ee.WriteMapElemKey()
  9569. }
  9570. ee.EncodeInt(int64(int(k2)))
  9571. if esep {
  9572. ee.WriteMapElemValue()
  9573. }
  9574. ee.EncodeInt(int64(v[int(k2)]))
  9575. }
  9576. } else {
  9577. for k2, v2 := range v {
  9578. if esep {
  9579. ee.WriteMapElemKey()
  9580. }
  9581. ee.EncodeInt(int64(k2))
  9582. if esep {
  9583. ee.WriteMapElemValue()
  9584. }
  9585. ee.EncodeInt(int64(v2))
  9586. }
  9587. }
  9588. ee.WriteMapEnd()
  9589. }
  9590. func (e *Encoder) fastpathEncMapIntFloat32R(f *codecFnInfo, rv reflect.Value) {
  9591. fastpathTV.EncMapIntFloat32V(rv2i(rv).(map[int]float32), e)
  9592. }
  9593. func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, e *Encoder) {
  9594. if v == nil {
  9595. e.e.EncodeNil()
  9596. return
  9597. }
  9598. ee, esep := e.e, e.hh.hasElemSeparators()
  9599. ee.WriteMapStart(len(v))
  9600. if e.h.Canonical {
  9601. v2 := make([]int64, len(v))
  9602. var i int
  9603. for k, _ := range v {
  9604. v2[i] = int64(k)
  9605. i++
  9606. }
  9607. sort.Sort(intSlice(v2))
  9608. for _, k2 := range v2 {
  9609. if esep {
  9610. ee.WriteMapElemKey()
  9611. }
  9612. ee.EncodeInt(int64(int(k2)))
  9613. if esep {
  9614. ee.WriteMapElemValue()
  9615. }
  9616. ee.EncodeFloat32(v[int(k2)])
  9617. }
  9618. } else {
  9619. for k2, v2 := range v {
  9620. if esep {
  9621. ee.WriteMapElemKey()
  9622. }
  9623. ee.EncodeInt(int64(k2))
  9624. if esep {
  9625. ee.WriteMapElemValue()
  9626. }
  9627. ee.EncodeFloat32(v2)
  9628. }
  9629. }
  9630. ee.WriteMapEnd()
  9631. }
  9632. func (e *Encoder) fastpathEncMapIntFloat64R(f *codecFnInfo, rv reflect.Value) {
  9633. fastpathTV.EncMapIntFloat64V(rv2i(rv).(map[int]float64), e)
  9634. }
  9635. func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, e *Encoder) {
  9636. if v == nil {
  9637. e.e.EncodeNil()
  9638. return
  9639. }
  9640. ee, esep := e.e, e.hh.hasElemSeparators()
  9641. ee.WriteMapStart(len(v))
  9642. if e.h.Canonical {
  9643. v2 := make([]int64, len(v))
  9644. var i int
  9645. for k, _ := range v {
  9646. v2[i] = int64(k)
  9647. i++
  9648. }
  9649. sort.Sort(intSlice(v2))
  9650. for _, k2 := range v2 {
  9651. if esep {
  9652. ee.WriteMapElemKey()
  9653. }
  9654. ee.EncodeInt(int64(int(k2)))
  9655. if esep {
  9656. ee.WriteMapElemValue()
  9657. }
  9658. ee.EncodeFloat64(v[int(k2)])
  9659. }
  9660. } else {
  9661. for k2, v2 := range v {
  9662. if esep {
  9663. ee.WriteMapElemKey()
  9664. }
  9665. ee.EncodeInt(int64(k2))
  9666. if esep {
  9667. ee.WriteMapElemValue()
  9668. }
  9669. ee.EncodeFloat64(v2)
  9670. }
  9671. }
  9672. ee.WriteMapEnd()
  9673. }
  9674. func (e *Encoder) fastpathEncMapIntBoolR(f *codecFnInfo, rv reflect.Value) {
  9675. fastpathTV.EncMapIntBoolV(rv2i(rv).(map[int]bool), e)
  9676. }
  9677. func (_ fastpathT) EncMapIntBoolV(v map[int]bool, e *Encoder) {
  9678. if v == nil {
  9679. e.e.EncodeNil()
  9680. return
  9681. }
  9682. ee, esep := e.e, e.hh.hasElemSeparators()
  9683. ee.WriteMapStart(len(v))
  9684. if e.h.Canonical {
  9685. v2 := make([]int64, len(v))
  9686. var i int
  9687. for k, _ := range v {
  9688. v2[i] = int64(k)
  9689. i++
  9690. }
  9691. sort.Sort(intSlice(v2))
  9692. for _, k2 := range v2 {
  9693. if esep {
  9694. ee.WriteMapElemKey()
  9695. }
  9696. ee.EncodeInt(int64(int(k2)))
  9697. if esep {
  9698. ee.WriteMapElemValue()
  9699. }
  9700. ee.EncodeBool(v[int(k2)])
  9701. }
  9702. } else {
  9703. for k2, v2 := range v {
  9704. if esep {
  9705. ee.WriteMapElemKey()
  9706. }
  9707. ee.EncodeInt(int64(k2))
  9708. if esep {
  9709. ee.WriteMapElemValue()
  9710. }
  9711. ee.EncodeBool(v2)
  9712. }
  9713. }
  9714. ee.WriteMapEnd()
  9715. }
  9716. func (e *Encoder) fastpathEncMapInt8IntfR(f *codecFnInfo, rv reflect.Value) {
  9717. fastpathTV.EncMapInt8IntfV(rv2i(rv).(map[int8]interface{}), e)
  9718. }
  9719. func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, e *Encoder) {
  9720. if v == nil {
  9721. e.e.EncodeNil()
  9722. return
  9723. }
  9724. ee, esep := e.e, e.hh.hasElemSeparators()
  9725. ee.WriteMapStart(len(v))
  9726. if e.h.Canonical {
  9727. v2 := make([]int64, len(v))
  9728. var i int
  9729. for k, _ := range v {
  9730. v2[i] = int64(k)
  9731. i++
  9732. }
  9733. sort.Sort(intSlice(v2))
  9734. for _, k2 := range v2 {
  9735. if esep {
  9736. ee.WriteMapElemKey()
  9737. }
  9738. ee.EncodeInt(int64(int8(k2)))
  9739. if esep {
  9740. ee.WriteMapElemValue()
  9741. }
  9742. e.encode(v[int8(k2)])
  9743. }
  9744. } else {
  9745. for k2, v2 := range v {
  9746. if esep {
  9747. ee.WriteMapElemKey()
  9748. }
  9749. ee.EncodeInt(int64(k2))
  9750. if esep {
  9751. ee.WriteMapElemValue()
  9752. }
  9753. e.encode(v2)
  9754. }
  9755. }
  9756. ee.WriteMapEnd()
  9757. }
  9758. func (e *Encoder) fastpathEncMapInt8StringR(f *codecFnInfo, rv reflect.Value) {
  9759. fastpathTV.EncMapInt8StringV(rv2i(rv).(map[int8]string), e)
  9760. }
  9761. func (_ fastpathT) EncMapInt8StringV(v map[int8]string, e *Encoder) {
  9762. if v == nil {
  9763. e.e.EncodeNil()
  9764. return
  9765. }
  9766. ee, esep := e.e, e.hh.hasElemSeparators()
  9767. ee.WriteMapStart(len(v))
  9768. if e.h.Canonical {
  9769. v2 := make([]int64, len(v))
  9770. var i int
  9771. for k, _ := range v {
  9772. v2[i] = int64(k)
  9773. i++
  9774. }
  9775. sort.Sort(intSlice(v2))
  9776. for _, k2 := range v2 {
  9777. if esep {
  9778. ee.WriteMapElemKey()
  9779. }
  9780. ee.EncodeInt(int64(int8(k2)))
  9781. if esep {
  9782. ee.WriteMapElemValue()
  9783. }
  9784. ee.EncodeString(c_UTF8, v[int8(k2)])
  9785. }
  9786. } else {
  9787. for k2, v2 := range v {
  9788. if esep {
  9789. ee.WriteMapElemKey()
  9790. }
  9791. ee.EncodeInt(int64(k2))
  9792. if esep {
  9793. ee.WriteMapElemValue()
  9794. }
  9795. ee.EncodeString(c_UTF8, v2)
  9796. }
  9797. }
  9798. ee.WriteMapEnd()
  9799. }
  9800. func (e *Encoder) fastpathEncMapInt8UintR(f *codecFnInfo, rv reflect.Value) {
  9801. fastpathTV.EncMapInt8UintV(rv2i(rv).(map[int8]uint), e)
  9802. }
  9803. func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, e *Encoder) {
  9804. if v == nil {
  9805. e.e.EncodeNil()
  9806. return
  9807. }
  9808. ee, esep := e.e, e.hh.hasElemSeparators()
  9809. ee.WriteMapStart(len(v))
  9810. if e.h.Canonical {
  9811. v2 := make([]int64, len(v))
  9812. var i int
  9813. for k, _ := range v {
  9814. v2[i] = int64(k)
  9815. i++
  9816. }
  9817. sort.Sort(intSlice(v2))
  9818. for _, k2 := range v2 {
  9819. if esep {
  9820. ee.WriteMapElemKey()
  9821. }
  9822. ee.EncodeInt(int64(int8(k2)))
  9823. if esep {
  9824. ee.WriteMapElemValue()
  9825. }
  9826. ee.EncodeUint(uint64(v[int8(k2)]))
  9827. }
  9828. } else {
  9829. for k2, v2 := range v {
  9830. if esep {
  9831. ee.WriteMapElemKey()
  9832. }
  9833. ee.EncodeInt(int64(k2))
  9834. if esep {
  9835. ee.WriteMapElemValue()
  9836. }
  9837. ee.EncodeUint(uint64(v2))
  9838. }
  9839. }
  9840. ee.WriteMapEnd()
  9841. }
  9842. func (e *Encoder) fastpathEncMapInt8Uint8R(f *codecFnInfo, rv reflect.Value) {
  9843. fastpathTV.EncMapInt8Uint8V(rv2i(rv).(map[int8]uint8), e)
  9844. }
  9845. func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, e *Encoder) {
  9846. if v == nil {
  9847. e.e.EncodeNil()
  9848. return
  9849. }
  9850. ee, esep := e.e, e.hh.hasElemSeparators()
  9851. ee.WriteMapStart(len(v))
  9852. if e.h.Canonical {
  9853. v2 := make([]int64, len(v))
  9854. var i int
  9855. for k, _ := range v {
  9856. v2[i] = int64(k)
  9857. i++
  9858. }
  9859. sort.Sort(intSlice(v2))
  9860. for _, k2 := range v2 {
  9861. if esep {
  9862. ee.WriteMapElemKey()
  9863. }
  9864. ee.EncodeInt(int64(int8(k2)))
  9865. if esep {
  9866. ee.WriteMapElemValue()
  9867. }
  9868. ee.EncodeUint(uint64(v[int8(k2)]))
  9869. }
  9870. } else {
  9871. for k2, v2 := range v {
  9872. if esep {
  9873. ee.WriteMapElemKey()
  9874. }
  9875. ee.EncodeInt(int64(k2))
  9876. if esep {
  9877. ee.WriteMapElemValue()
  9878. }
  9879. ee.EncodeUint(uint64(v2))
  9880. }
  9881. }
  9882. ee.WriteMapEnd()
  9883. }
  9884. func (e *Encoder) fastpathEncMapInt8Uint16R(f *codecFnInfo, rv reflect.Value) {
  9885. fastpathTV.EncMapInt8Uint16V(rv2i(rv).(map[int8]uint16), e)
  9886. }
  9887. func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, e *Encoder) {
  9888. if v == nil {
  9889. e.e.EncodeNil()
  9890. return
  9891. }
  9892. ee, esep := e.e, e.hh.hasElemSeparators()
  9893. ee.WriteMapStart(len(v))
  9894. if e.h.Canonical {
  9895. v2 := make([]int64, len(v))
  9896. var i int
  9897. for k, _ := range v {
  9898. v2[i] = int64(k)
  9899. i++
  9900. }
  9901. sort.Sort(intSlice(v2))
  9902. for _, k2 := range v2 {
  9903. if esep {
  9904. ee.WriteMapElemKey()
  9905. }
  9906. ee.EncodeInt(int64(int8(k2)))
  9907. if esep {
  9908. ee.WriteMapElemValue()
  9909. }
  9910. ee.EncodeUint(uint64(v[int8(k2)]))
  9911. }
  9912. } else {
  9913. for k2, v2 := range v {
  9914. if esep {
  9915. ee.WriteMapElemKey()
  9916. }
  9917. ee.EncodeInt(int64(k2))
  9918. if esep {
  9919. ee.WriteMapElemValue()
  9920. }
  9921. ee.EncodeUint(uint64(v2))
  9922. }
  9923. }
  9924. ee.WriteMapEnd()
  9925. }
  9926. func (e *Encoder) fastpathEncMapInt8Uint32R(f *codecFnInfo, rv reflect.Value) {
  9927. fastpathTV.EncMapInt8Uint32V(rv2i(rv).(map[int8]uint32), e)
  9928. }
  9929. func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, e *Encoder) {
  9930. if v == nil {
  9931. e.e.EncodeNil()
  9932. return
  9933. }
  9934. ee, esep := e.e, e.hh.hasElemSeparators()
  9935. ee.WriteMapStart(len(v))
  9936. if e.h.Canonical {
  9937. v2 := make([]int64, len(v))
  9938. var i int
  9939. for k, _ := range v {
  9940. v2[i] = int64(k)
  9941. i++
  9942. }
  9943. sort.Sort(intSlice(v2))
  9944. for _, k2 := range v2 {
  9945. if esep {
  9946. ee.WriteMapElemKey()
  9947. }
  9948. ee.EncodeInt(int64(int8(k2)))
  9949. if esep {
  9950. ee.WriteMapElemValue()
  9951. }
  9952. ee.EncodeUint(uint64(v[int8(k2)]))
  9953. }
  9954. } else {
  9955. for k2, v2 := range v {
  9956. if esep {
  9957. ee.WriteMapElemKey()
  9958. }
  9959. ee.EncodeInt(int64(k2))
  9960. if esep {
  9961. ee.WriteMapElemValue()
  9962. }
  9963. ee.EncodeUint(uint64(v2))
  9964. }
  9965. }
  9966. ee.WriteMapEnd()
  9967. }
  9968. func (e *Encoder) fastpathEncMapInt8Uint64R(f *codecFnInfo, rv reflect.Value) {
  9969. fastpathTV.EncMapInt8Uint64V(rv2i(rv).(map[int8]uint64), e)
  9970. }
  9971. func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, e *Encoder) {
  9972. if v == nil {
  9973. e.e.EncodeNil()
  9974. return
  9975. }
  9976. ee, esep := e.e, e.hh.hasElemSeparators()
  9977. ee.WriteMapStart(len(v))
  9978. if e.h.Canonical {
  9979. v2 := make([]int64, len(v))
  9980. var i int
  9981. for k, _ := range v {
  9982. v2[i] = int64(k)
  9983. i++
  9984. }
  9985. sort.Sort(intSlice(v2))
  9986. for _, k2 := range v2 {
  9987. if esep {
  9988. ee.WriteMapElemKey()
  9989. }
  9990. ee.EncodeInt(int64(int8(k2)))
  9991. if esep {
  9992. ee.WriteMapElemValue()
  9993. }
  9994. ee.EncodeUint(uint64(v[int8(k2)]))
  9995. }
  9996. } else {
  9997. for k2, v2 := range v {
  9998. if esep {
  9999. ee.WriteMapElemKey()
  10000. }
  10001. ee.EncodeInt(int64(k2))
  10002. if esep {
  10003. ee.WriteMapElemValue()
  10004. }
  10005. ee.EncodeUint(uint64(v2))
  10006. }
  10007. }
  10008. ee.WriteMapEnd()
  10009. }
  10010. func (e *Encoder) fastpathEncMapInt8UintptrR(f *codecFnInfo, rv reflect.Value) {
  10011. fastpathTV.EncMapInt8UintptrV(rv2i(rv).(map[int8]uintptr), e)
  10012. }
  10013. func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, e *Encoder) {
  10014. if v == nil {
  10015. e.e.EncodeNil()
  10016. return
  10017. }
  10018. ee, esep := e.e, e.hh.hasElemSeparators()
  10019. ee.WriteMapStart(len(v))
  10020. if e.h.Canonical {
  10021. v2 := make([]int64, len(v))
  10022. var i int
  10023. for k, _ := range v {
  10024. v2[i] = int64(k)
  10025. i++
  10026. }
  10027. sort.Sort(intSlice(v2))
  10028. for _, k2 := range v2 {
  10029. if esep {
  10030. ee.WriteMapElemKey()
  10031. }
  10032. ee.EncodeInt(int64(int8(k2)))
  10033. if esep {
  10034. ee.WriteMapElemValue()
  10035. }
  10036. e.encode(v[int8(k2)])
  10037. }
  10038. } else {
  10039. for k2, v2 := range v {
  10040. if esep {
  10041. ee.WriteMapElemKey()
  10042. }
  10043. ee.EncodeInt(int64(k2))
  10044. if esep {
  10045. ee.WriteMapElemValue()
  10046. }
  10047. e.encode(v2)
  10048. }
  10049. }
  10050. ee.WriteMapEnd()
  10051. }
  10052. func (e *Encoder) fastpathEncMapInt8IntR(f *codecFnInfo, rv reflect.Value) {
  10053. fastpathTV.EncMapInt8IntV(rv2i(rv).(map[int8]int), e)
  10054. }
  10055. func (_ fastpathT) EncMapInt8IntV(v map[int8]int, e *Encoder) {
  10056. if v == nil {
  10057. e.e.EncodeNil()
  10058. return
  10059. }
  10060. ee, esep := e.e, e.hh.hasElemSeparators()
  10061. ee.WriteMapStart(len(v))
  10062. if e.h.Canonical {
  10063. v2 := make([]int64, len(v))
  10064. var i int
  10065. for k, _ := range v {
  10066. v2[i] = int64(k)
  10067. i++
  10068. }
  10069. sort.Sort(intSlice(v2))
  10070. for _, k2 := range v2 {
  10071. if esep {
  10072. ee.WriteMapElemKey()
  10073. }
  10074. ee.EncodeInt(int64(int8(k2)))
  10075. if esep {
  10076. ee.WriteMapElemValue()
  10077. }
  10078. ee.EncodeInt(int64(v[int8(k2)]))
  10079. }
  10080. } else {
  10081. for k2, v2 := range v {
  10082. if esep {
  10083. ee.WriteMapElemKey()
  10084. }
  10085. ee.EncodeInt(int64(k2))
  10086. if esep {
  10087. ee.WriteMapElemValue()
  10088. }
  10089. ee.EncodeInt(int64(v2))
  10090. }
  10091. }
  10092. ee.WriteMapEnd()
  10093. }
  10094. func (e *Encoder) fastpathEncMapInt8Int8R(f *codecFnInfo, rv reflect.Value) {
  10095. fastpathTV.EncMapInt8Int8V(rv2i(rv).(map[int8]int8), e)
  10096. }
  10097. func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, e *Encoder) {
  10098. if v == nil {
  10099. e.e.EncodeNil()
  10100. return
  10101. }
  10102. ee, esep := e.e, e.hh.hasElemSeparators()
  10103. ee.WriteMapStart(len(v))
  10104. if e.h.Canonical {
  10105. v2 := make([]int64, len(v))
  10106. var i int
  10107. for k, _ := range v {
  10108. v2[i] = int64(k)
  10109. i++
  10110. }
  10111. sort.Sort(intSlice(v2))
  10112. for _, k2 := range v2 {
  10113. if esep {
  10114. ee.WriteMapElemKey()
  10115. }
  10116. ee.EncodeInt(int64(int8(k2)))
  10117. if esep {
  10118. ee.WriteMapElemValue()
  10119. }
  10120. ee.EncodeInt(int64(v[int8(k2)]))
  10121. }
  10122. } else {
  10123. for k2, v2 := range v {
  10124. if esep {
  10125. ee.WriteMapElemKey()
  10126. }
  10127. ee.EncodeInt(int64(k2))
  10128. if esep {
  10129. ee.WriteMapElemValue()
  10130. }
  10131. ee.EncodeInt(int64(v2))
  10132. }
  10133. }
  10134. ee.WriteMapEnd()
  10135. }
  10136. func (e *Encoder) fastpathEncMapInt8Int16R(f *codecFnInfo, rv reflect.Value) {
  10137. fastpathTV.EncMapInt8Int16V(rv2i(rv).(map[int8]int16), e)
  10138. }
  10139. func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, e *Encoder) {
  10140. if v == nil {
  10141. e.e.EncodeNil()
  10142. return
  10143. }
  10144. ee, esep := e.e, e.hh.hasElemSeparators()
  10145. ee.WriteMapStart(len(v))
  10146. if e.h.Canonical {
  10147. v2 := make([]int64, len(v))
  10148. var i int
  10149. for k, _ := range v {
  10150. v2[i] = int64(k)
  10151. i++
  10152. }
  10153. sort.Sort(intSlice(v2))
  10154. for _, k2 := range v2 {
  10155. if esep {
  10156. ee.WriteMapElemKey()
  10157. }
  10158. ee.EncodeInt(int64(int8(k2)))
  10159. if esep {
  10160. ee.WriteMapElemValue()
  10161. }
  10162. ee.EncodeInt(int64(v[int8(k2)]))
  10163. }
  10164. } else {
  10165. for k2, v2 := range v {
  10166. if esep {
  10167. ee.WriteMapElemKey()
  10168. }
  10169. ee.EncodeInt(int64(k2))
  10170. if esep {
  10171. ee.WriteMapElemValue()
  10172. }
  10173. ee.EncodeInt(int64(v2))
  10174. }
  10175. }
  10176. ee.WriteMapEnd()
  10177. }
  10178. func (e *Encoder) fastpathEncMapInt8Int32R(f *codecFnInfo, rv reflect.Value) {
  10179. fastpathTV.EncMapInt8Int32V(rv2i(rv).(map[int8]int32), e)
  10180. }
  10181. func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, e *Encoder) {
  10182. if v == nil {
  10183. e.e.EncodeNil()
  10184. return
  10185. }
  10186. ee, esep := e.e, e.hh.hasElemSeparators()
  10187. ee.WriteMapStart(len(v))
  10188. if e.h.Canonical {
  10189. v2 := make([]int64, len(v))
  10190. var i int
  10191. for k, _ := range v {
  10192. v2[i] = int64(k)
  10193. i++
  10194. }
  10195. sort.Sort(intSlice(v2))
  10196. for _, k2 := range v2 {
  10197. if esep {
  10198. ee.WriteMapElemKey()
  10199. }
  10200. ee.EncodeInt(int64(int8(k2)))
  10201. if esep {
  10202. ee.WriteMapElemValue()
  10203. }
  10204. ee.EncodeInt(int64(v[int8(k2)]))
  10205. }
  10206. } else {
  10207. for k2, v2 := range v {
  10208. if esep {
  10209. ee.WriteMapElemKey()
  10210. }
  10211. ee.EncodeInt(int64(k2))
  10212. if esep {
  10213. ee.WriteMapElemValue()
  10214. }
  10215. ee.EncodeInt(int64(v2))
  10216. }
  10217. }
  10218. ee.WriteMapEnd()
  10219. }
  10220. func (e *Encoder) fastpathEncMapInt8Int64R(f *codecFnInfo, rv reflect.Value) {
  10221. fastpathTV.EncMapInt8Int64V(rv2i(rv).(map[int8]int64), e)
  10222. }
  10223. func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, e *Encoder) {
  10224. if v == nil {
  10225. e.e.EncodeNil()
  10226. return
  10227. }
  10228. ee, esep := e.e, e.hh.hasElemSeparators()
  10229. ee.WriteMapStart(len(v))
  10230. if e.h.Canonical {
  10231. v2 := make([]int64, len(v))
  10232. var i int
  10233. for k, _ := range v {
  10234. v2[i] = int64(k)
  10235. i++
  10236. }
  10237. sort.Sort(intSlice(v2))
  10238. for _, k2 := range v2 {
  10239. if esep {
  10240. ee.WriteMapElemKey()
  10241. }
  10242. ee.EncodeInt(int64(int8(k2)))
  10243. if esep {
  10244. ee.WriteMapElemValue()
  10245. }
  10246. ee.EncodeInt(int64(v[int8(k2)]))
  10247. }
  10248. } else {
  10249. for k2, v2 := range v {
  10250. if esep {
  10251. ee.WriteMapElemKey()
  10252. }
  10253. ee.EncodeInt(int64(k2))
  10254. if esep {
  10255. ee.WriteMapElemValue()
  10256. }
  10257. ee.EncodeInt(int64(v2))
  10258. }
  10259. }
  10260. ee.WriteMapEnd()
  10261. }
  10262. func (e *Encoder) fastpathEncMapInt8Float32R(f *codecFnInfo, rv reflect.Value) {
  10263. fastpathTV.EncMapInt8Float32V(rv2i(rv).(map[int8]float32), e)
  10264. }
  10265. func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, e *Encoder) {
  10266. if v == nil {
  10267. e.e.EncodeNil()
  10268. return
  10269. }
  10270. ee, esep := e.e, e.hh.hasElemSeparators()
  10271. ee.WriteMapStart(len(v))
  10272. if e.h.Canonical {
  10273. v2 := make([]int64, len(v))
  10274. var i int
  10275. for k, _ := range v {
  10276. v2[i] = int64(k)
  10277. i++
  10278. }
  10279. sort.Sort(intSlice(v2))
  10280. for _, k2 := range v2 {
  10281. if esep {
  10282. ee.WriteMapElemKey()
  10283. }
  10284. ee.EncodeInt(int64(int8(k2)))
  10285. if esep {
  10286. ee.WriteMapElemValue()
  10287. }
  10288. ee.EncodeFloat32(v[int8(k2)])
  10289. }
  10290. } else {
  10291. for k2, v2 := range v {
  10292. if esep {
  10293. ee.WriteMapElemKey()
  10294. }
  10295. ee.EncodeInt(int64(k2))
  10296. if esep {
  10297. ee.WriteMapElemValue()
  10298. }
  10299. ee.EncodeFloat32(v2)
  10300. }
  10301. }
  10302. ee.WriteMapEnd()
  10303. }
  10304. func (e *Encoder) fastpathEncMapInt8Float64R(f *codecFnInfo, rv reflect.Value) {
  10305. fastpathTV.EncMapInt8Float64V(rv2i(rv).(map[int8]float64), e)
  10306. }
  10307. func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, e *Encoder) {
  10308. if v == nil {
  10309. e.e.EncodeNil()
  10310. return
  10311. }
  10312. ee, esep := e.e, e.hh.hasElemSeparators()
  10313. ee.WriteMapStart(len(v))
  10314. if e.h.Canonical {
  10315. v2 := make([]int64, len(v))
  10316. var i int
  10317. for k, _ := range v {
  10318. v2[i] = int64(k)
  10319. i++
  10320. }
  10321. sort.Sort(intSlice(v2))
  10322. for _, k2 := range v2 {
  10323. if esep {
  10324. ee.WriteMapElemKey()
  10325. }
  10326. ee.EncodeInt(int64(int8(k2)))
  10327. if esep {
  10328. ee.WriteMapElemValue()
  10329. }
  10330. ee.EncodeFloat64(v[int8(k2)])
  10331. }
  10332. } else {
  10333. for k2, v2 := range v {
  10334. if esep {
  10335. ee.WriteMapElemKey()
  10336. }
  10337. ee.EncodeInt(int64(k2))
  10338. if esep {
  10339. ee.WriteMapElemValue()
  10340. }
  10341. ee.EncodeFloat64(v2)
  10342. }
  10343. }
  10344. ee.WriteMapEnd()
  10345. }
  10346. func (e *Encoder) fastpathEncMapInt8BoolR(f *codecFnInfo, rv reflect.Value) {
  10347. fastpathTV.EncMapInt8BoolV(rv2i(rv).(map[int8]bool), e)
  10348. }
  10349. func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, e *Encoder) {
  10350. if v == nil {
  10351. e.e.EncodeNil()
  10352. return
  10353. }
  10354. ee, esep := e.e, e.hh.hasElemSeparators()
  10355. ee.WriteMapStart(len(v))
  10356. if e.h.Canonical {
  10357. v2 := make([]int64, len(v))
  10358. var i int
  10359. for k, _ := range v {
  10360. v2[i] = int64(k)
  10361. i++
  10362. }
  10363. sort.Sort(intSlice(v2))
  10364. for _, k2 := range v2 {
  10365. if esep {
  10366. ee.WriteMapElemKey()
  10367. }
  10368. ee.EncodeInt(int64(int8(k2)))
  10369. if esep {
  10370. ee.WriteMapElemValue()
  10371. }
  10372. ee.EncodeBool(v[int8(k2)])
  10373. }
  10374. } else {
  10375. for k2, v2 := range v {
  10376. if esep {
  10377. ee.WriteMapElemKey()
  10378. }
  10379. ee.EncodeInt(int64(k2))
  10380. if esep {
  10381. ee.WriteMapElemValue()
  10382. }
  10383. ee.EncodeBool(v2)
  10384. }
  10385. }
  10386. ee.WriteMapEnd()
  10387. }
  10388. func (e *Encoder) fastpathEncMapInt16IntfR(f *codecFnInfo, rv reflect.Value) {
  10389. fastpathTV.EncMapInt16IntfV(rv2i(rv).(map[int16]interface{}), e)
  10390. }
  10391. func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, e *Encoder) {
  10392. if v == nil {
  10393. e.e.EncodeNil()
  10394. return
  10395. }
  10396. ee, esep := e.e, e.hh.hasElemSeparators()
  10397. ee.WriteMapStart(len(v))
  10398. if e.h.Canonical {
  10399. v2 := make([]int64, len(v))
  10400. var i int
  10401. for k, _ := range v {
  10402. v2[i] = int64(k)
  10403. i++
  10404. }
  10405. sort.Sort(intSlice(v2))
  10406. for _, k2 := range v2 {
  10407. if esep {
  10408. ee.WriteMapElemKey()
  10409. }
  10410. ee.EncodeInt(int64(int16(k2)))
  10411. if esep {
  10412. ee.WriteMapElemValue()
  10413. }
  10414. e.encode(v[int16(k2)])
  10415. }
  10416. } else {
  10417. for k2, v2 := range v {
  10418. if esep {
  10419. ee.WriteMapElemKey()
  10420. }
  10421. ee.EncodeInt(int64(k2))
  10422. if esep {
  10423. ee.WriteMapElemValue()
  10424. }
  10425. e.encode(v2)
  10426. }
  10427. }
  10428. ee.WriteMapEnd()
  10429. }
  10430. func (e *Encoder) fastpathEncMapInt16StringR(f *codecFnInfo, rv reflect.Value) {
  10431. fastpathTV.EncMapInt16StringV(rv2i(rv).(map[int16]string), e)
  10432. }
  10433. func (_ fastpathT) EncMapInt16StringV(v map[int16]string, e *Encoder) {
  10434. if v == nil {
  10435. e.e.EncodeNil()
  10436. return
  10437. }
  10438. ee, esep := e.e, e.hh.hasElemSeparators()
  10439. ee.WriteMapStart(len(v))
  10440. if e.h.Canonical {
  10441. v2 := make([]int64, len(v))
  10442. var i int
  10443. for k, _ := range v {
  10444. v2[i] = int64(k)
  10445. i++
  10446. }
  10447. sort.Sort(intSlice(v2))
  10448. for _, k2 := range v2 {
  10449. if esep {
  10450. ee.WriteMapElemKey()
  10451. }
  10452. ee.EncodeInt(int64(int16(k2)))
  10453. if esep {
  10454. ee.WriteMapElemValue()
  10455. }
  10456. ee.EncodeString(c_UTF8, v[int16(k2)])
  10457. }
  10458. } else {
  10459. for k2, v2 := range v {
  10460. if esep {
  10461. ee.WriteMapElemKey()
  10462. }
  10463. ee.EncodeInt(int64(k2))
  10464. if esep {
  10465. ee.WriteMapElemValue()
  10466. }
  10467. ee.EncodeString(c_UTF8, v2)
  10468. }
  10469. }
  10470. ee.WriteMapEnd()
  10471. }
  10472. func (e *Encoder) fastpathEncMapInt16UintR(f *codecFnInfo, rv reflect.Value) {
  10473. fastpathTV.EncMapInt16UintV(rv2i(rv).(map[int16]uint), e)
  10474. }
  10475. func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, e *Encoder) {
  10476. if v == nil {
  10477. e.e.EncodeNil()
  10478. return
  10479. }
  10480. ee, esep := e.e, e.hh.hasElemSeparators()
  10481. ee.WriteMapStart(len(v))
  10482. if e.h.Canonical {
  10483. v2 := make([]int64, len(v))
  10484. var i int
  10485. for k, _ := range v {
  10486. v2[i] = int64(k)
  10487. i++
  10488. }
  10489. sort.Sort(intSlice(v2))
  10490. for _, k2 := range v2 {
  10491. if esep {
  10492. ee.WriteMapElemKey()
  10493. }
  10494. ee.EncodeInt(int64(int16(k2)))
  10495. if esep {
  10496. ee.WriteMapElemValue()
  10497. }
  10498. ee.EncodeUint(uint64(v[int16(k2)]))
  10499. }
  10500. } else {
  10501. for k2, v2 := range v {
  10502. if esep {
  10503. ee.WriteMapElemKey()
  10504. }
  10505. ee.EncodeInt(int64(k2))
  10506. if esep {
  10507. ee.WriteMapElemValue()
  10508. }
  10509. ee.EncodeUint(uint64(v2))
  10510. }
  10511. }
  10512. ee.WriteMapEnd()
  10513. }
  10514. func (e *Encoder) fastpathEncMapInt16Uint8R(f *codecFnInfo, rv reflect.Value) {
  10515. fastpathTV.EncMapInt16Uint8V(rv2i(rv).(map[int16]uint8), e)
  10516. }
  10517. func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, e *Encoder) {
  10518. if v == nil {
  10519. e.e.EncodeNil()
  10520. return
  10521. }
  10522. ee, esep := e.e, e.hh.hasElemSeparators()
  10523. ee.WriteMapStart(len(v))
  10524. if e.h.Canonical {
  10525. v2 := make([]int64, len(v))
  10526. var i int
  10527. for k, _ := range v {
  10528. v2[i] = int64(k)
  10529. i++
  10530. }
  10531. sort.Sort(intSlice(v2))
  10532. for _, k2 := range v2 {
  10533. if esep {
  10534. ee.WriteMapElemKey()
  10535. }
  10536. ee.EncodeInt(int64(int16(k2)))
  10537. if esep {
  10538. ee.WriteMapElemValue()
  10539. }
  10540. ee.EncodeUint(uint64(v[int16(k2)]))
  10541. }
  10542. } else {
  10543. for k2, v2 := range v {
  10544. if esep {
  10545. ee.WriteMapElemKey()
  10546. }
  10547. ee.EncodeInt(int64(k2))
  10548. if esep {
  10549. ee.WriteMapElemValue()
  10550. }
  10551. ee.EncodeUint(uint64(v2))
  10552. }
  10553. }
  10554. ee.WriteMapEnd()
  10555. }
  10556. func (e *Encoder) fastpathEncMapInt16Uint16R(f *codecFnInfo, rv reflect.Value) {
  10557. fastpathTV.EncMapInt16Uint16V(rv2i(rv).(map[int16]uint16), e)
  10558. }
  10559. func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, e *Encoder) {
  10560. if v == nil {
  10561. e.e.EncodeNil()
  10562. return
  10563. }
  10564. ee, esep := e.e, e.hh.hasElemSeparators()
  10565. ee.WriteMapStart(len(v))
  10566. if e.h.Canonical {
  10567. v2 := make([]int64, len(v))
  10568. var i int
  10569. for k, _ := range v {
  10570. v2[i] = int64(k)
  10571. i++
  10572. }
  10573. sort.Sort(intSlice(v2))
  10574. for _, k2 := range v2 {
  10575. if esep {
  10576. ee.WriteMapElemKey()
  10577. }
  10578. ee.EncodeInt(int64(int16(k2)))
  10579. if esep {
  10580. ee.WriteMapElemValue()
  10581. }
  10582. ee.EncodeUint(uint64(v[int16(k2)]))
  10583. }
  10584. } else {
  10585. for k2, v2 := range v {
  10586. if esep {
  10587. ee.WriteMapElemKey()
  10588. }
  10589. ee.EncodeInt(int64(k2))
  10590. if esep {
  10591. ee.WriteMapElemValue()
  10592. }
  10593. ee.EncodeUint(uint64(v2))
  10594. }
  10595. }
  10596. ee.WriteMapEnd()
  10597. }
  10598. func (e *Encoder) fastpathEncMapInt16Uint32R(f *codecFnInfo, rv reflect.Value) {
  10599. fastpathTV.EncMapInt16Uint32V(rv2i(rv).(map[int16]uint32), e)
  10600. }
  10601. func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, e *Encoder) {
  10602. if v == nil {
  10603. e.e.EncodeNil()
  10604. return
  10605. }
  10606. ee, esep := e.e, e.hh.hasElemSeparators()
  10607. ee.WriteMapStart(len(v))
  10608. if e.h.Canonical {
  10609. v2 := make([]int64, len(v))
  10610. var i int
  10611. for k, _ := range v {
  10612. v2[i] = int64(k)
  10613. i++
  10614. }
  10615. sort.Sort(intSlice(v2))
  10616. for _, k2 := range v2 {
  10617. if esep {
  10618. ee.WriteMapElemKey()
  10619. }
  10620. ee.EncodeInt(int64(int16(k2)))
  10621. if esep {
  10622. ee.WriteMapElemValue()
  10623. }
  10624. ee.EncodeUint(uint64(v[int16(k2)]))
  10625. }
  10626. } else {
  10627. for k2, v2 := range v {
  10628. if esep {
  10629. ee.WriteMapElemKey()
  10630. }
  10631. ee.EncodeInt(int64(k2))
  10632. if esep {
  10633. ee.WriteMapElemValue()
  10634. }
  10635. ee.EncodeUint(uint64(v2))
  10636. }
  10637. }
  10638. ee.WriteMapEnd()
  10639. }
  10640. func (e *Encoder) fastpathEncMapInt16Uint64R(f *codecFnInfo, rv reflect.Value) {
  10641. fastpathTV.EncMapInt16Uint64V(rv2i(rv).(map[int16]uint64), e)
  10642. }
  10643. func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, e *Encoder) {
  10644. if v == nil {
  10645. e.e.EncodeNil()
  10646. return
  10647. }
  10648. ee, esep := e.e, e.hh.hasElemSeparators()
  10649. ee.WriteMapStart(len(v))
  10650. if e.h.Canonical {
  10651. v2 := make([]int64, len(v))
  10652. var i int
  10653. for k, _ := range v {
  10654. v2[i] = int64(k)
  10655. i++
  10656. }
  10657. sort.Sort(intSlice(v2))
  10658. for _, k2 := range v2 {
  10659. if esep {
  10660. ee.WriteMapElemKey()
  10661. }
  10662. ee.EncodeInt(int64(int16(k2)))
  10663. if esep {
  10664. ee.WriteMapElemValue()
  10665. }
  10666. ee.EncodeUint(uint64(v[int16(k2)]))
  10667. }
  10668. } else {
  10669. for k2, v2 := range v {
  10670. if esep {
  10671. ee.WriteMapElemKey()
  10672. }
  10673. ee.EncodeInt(int64(k2))
  10674. if esep {
  10675. ee.WriteMapElemValue()
  10676. }
  10677. ee.EncodeUint(uint64(v2))
  10678. }
  10679. }
  10680. ee.WriteMapEnd()
  10681. }
  10682. func (e *Encoder) fastpathEncMapInt16UintptrR(f *codecFnInfo, rv reflect.Value) {
  10683. fastpathTV.EncMapInt16UintptrV(rv2i(rv).(map[int16]uintptr), e)
  10684. }
  10685. func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, e *Encoder) {
  10686. if v == nil {
  10687. e.e.EncodeNil()
  10688. return
  10689. }
  10690. ee, esep := e.e, e.hh.hasElemSeparators()
  10691. ee.WriteMapStart(len(v))
  10692. if e.h.Canonical {
  10693. v2 := make([]int64, len(v))
  10694. var i int
  10695. for k, _ := range v {
  10696. v2[i] = int64(k)
  10697. i++
  10698. }
  10699. sort.Sort(intSlice(v2))
  10700. for _, k2 := range v2 {
  10701. if esep {
  10702. ee.WriteMapElemKey()
  10703. }
  10704. ee.EncodeInt(int64(int16(k2)))
  10705. if esep {
  10706. ee.WriteMapElemValue()
  10707. }
  10708. e.encode(v[int16(k2)])
  10709. }
  10710. } else {
  10711. for k2, v2 := range v {
  10712. if esep {
  10713. ee.WriteMapElemKey()
  10714. }
  10715. ee.EncodeInt(int64(k2))
  10716. if esep {
  10717. ee.WriteMapElemValue()
  10718. }
  10719. e.encode(v2)
  10720. }
  10721. }
  10722. ee.WriteMapEnd()
  10723. }
  10724. func (e *Encoder) fastpathEncMapInt16IntR(f *codecFnInfo, rv reflect.Value) {
  10725. fastpathTV.EncMapInt16IntV(rv2i(rv).(map[int16]int), e)
  10726. }
  10727. func (_ fastpathT) EncMapInt16IntV(v map[int16]int, e *Encoder) {
  10728. if v == nil {
  10729. e.e.EncodeNil()
  10730. return
  10731. }
  10732. ee, esep := e.e, e.hh.hasElemSeparators()
  10733. ee.WriteMapStart(len(v))
  10734. if e.h.Canonical {
  10735. v2 := make([]int64, len(v))
  10736. var i int
  10737. for k, _ := range v {
  10738. v2[i] = int64(k)
  10739. i++
  10740. }
  10741. sort.Sort(intSlice(v2))
  10742. for _, k2 := range v2 {
  10743. if esep {
  10744. ee.WriteMapElemKey()
  10745. }
  10746. ee.EncodeInt(int64(int16(k2)))
  10747. if esep {
  10748. ee.WriteMapElemValue()
  10749. }
  10750. ee.EncodeInt(int64(v[int16(k2)]))
  10751. }
  10752. } else {
  10753. for k2, v2 := range v {
  10754. if esep {
  10755. ee.WriteMapElemKey()
  10756. }
  10757. ee.EncodeInt(int64(k2))
  10758. if esep {
  10759. ee.WriteMapElemValue()
  10760. }
  10761. ee.EncodeInt(int64(v2))
  10762. }
  10763. }
  10764. ee.WriteMapEnd()
  10765. }
  10766. func (e *Encoder) fastpathEncMapInt16Int8R(f *codecFnInfo, rv reflect.Value) {
  10767. fastpathTV.EncMapInt16Int8V(rv2i(rv).(map[int16]int8), e)
  10768. }
  10769. func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, e *Encoder) {
  10770. if v == nil {
  10771. e.e.EncodeNil()
  10772. return
  10773. }
  10774. ee, esep := e.e, e.hh.hasElemSeparators()
  10775. ee.WriteMapStart(len(v))
  10776. if e.h.Canonical {
  10777. v2 := make([]int64, len(v))
  10778. var i int
  10779. for k, _ := range v {
  10780. v2[i] = int64(k)
  10781. i++
  10782. }
  10783. sort.Sort(intSlice(v2))
  10784. for _, k2 := range v2 {
  10785. if esep {
  10786. ee.WriteMapElemKey()
  10787. }
  10788. ee.EncodeInt(int64(int16(k2)))
  10789. if esep {
  10790. ee.WriteMapElemValue()
  10791. }
  10792. ee.EncodeInt(int64(v[int16(k2)]))
  10793. }
  10794. } else {
  10795. for k2, v2 := range v {
  10796. if esep {
  10797. ee.WriteMapElemKey()
  10798. }
  10799. ee.EncodeInt(int64(k2))
  10800. if esep {
  10801. ee.WriteMapElemValue()
  10802. }
  10803. ee.EncodeInt(int64(v2))
  10804. }
  10805. }
  10806. ee.WriteMapEnd()
  10807. }
  10808. func (e *Encoder) fastpathEncMapInt16Int16R(f *codecFnInfo, rv reflect.Value) {
  10809. fastpathTV.EncMapInt16Int16V(rv2i(rv).(map[int16]int16), e)
  10810. }
  10811. func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, e *Encoder) {
  10812. if v == nil {
  10813. e.e.EncodeNil()
  10814. return
  10815. }
  10816. ee, esep := e.e, e.hh.hasElemSeparators()
  10817. ee.WriteMapStart(len(v))
  10818. if e.h.Canonical {
  10819. v2 := make([]int64, len(v))
  10820. var i int
  10821. for k, _ := range v {
  10822. v2[i] = int64(k)
  10823. i++
  10824. }
  10825. sort.Sort(intSlice(v2))
  10826. for _, k2 := range v2 {
  10827. if esep {
  10828. ee.WriteMapElemKey()
  10829. }
  10830. ee.EncodeInt(int64(int16(k2)))
  10831. if esep {
  10832. ee.WriteMapElemValue()
  10833. }
  10834. ee.EncodeInt(int64(v[int16(k2)]))
  10835. }
  10836. } else {
  10837. for k2, v2 := range v {
  10838. if esep {
  10839. ee.WriteMapElemKey()
  10840. }
  10841. ee.EncodeInt(int64(k2))
  10842. if esep {
  10843. ee.WriteMapElemValue()
  10844. }
  10845. ee.EncodeInt(int64(v2))
  10846. }
  10847. }
  10848. ee.WriteMapEnd()
  10849. }
  10850. func (e *Encoder) fastpathEncMapInt16Int32R(f *codecFnInfo, rv reflect.Value) {
  10851. fastpathTV.EncMapInt16Int32V(rv2i(rv).(map[int16]int32), e)
  10852. }
  10853. func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, e *Encoder) {
  10854. if v == nil {
  10855. e.e.EncodeNil()
  10856. return
  10857. }
  10858. ee, esep := e.e, e.hh.hasElemSeparators()
  10859. ee.WriteMapStart(len(v))
  10860. if e.h.Canonical {
  10861. v2 := make([]int64, len(v))
  10862. var i int
  10863. for k, _ := range v {
  10864. v2[i] = int64(k)
  10865. i++
  10866. }
  10867. sort.Sort(intSlice(v2))
  10868. for _, k2 := range v2 {
  10869. if esep {
  10870. ee.WriteMapElemKey()
  10871. }
  10872. ee.EncodeInt(int64(int16(k2)))
  10873. if esep {
  10874. ee.WriteMapElemValue()
  10875. }
  10876. ee.EncodeInt(int64(v[int16(k2)]))
  10877. }
  10878. } else {
  10879. for k2, v2 := range v {
  10880. if esep {
  10881. ee.WriteMapElemKey()
  10882. }
  10883. ee.EncodeInt(int64(k2))
  10884. if esep {
  10885. ee.WriteMapElemValue()
  10886. }
  10887. ee.EncodeInt(int64(v2))
  10888. }
  10889. }
  10890. ee.WriteMapEnd()
  10891. }
  10892. func (e *Encoder) fastpathEncMapInt16Int64R(f *codecFnInfo, rv reflect.Value) {
  10893. fastpathTV.EncMapInt16Int64V(rv2i(rv).(map[int16]int64), e)
  10894. }
  10895. func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, e *Encoder) {
  10896. if v == nil {
  10897. e.e.EncodeNil()
  10898. return
  10899. }
  10900. ee, esep := e.e, e.hh.hasElemSeparators()
  10901. ee.WriteMapStart(len(v))
  10902. if e.h.Canonical {
  10903. v2 := make([]int64, len(v))
  10904. var i int
  10905. for k, _ := range v {
  10906. v2[i] = int64(k)
  10907. i++
  10908. }
  10909. sort.Sort(intSlice(v2))
  10910. for _, k2 := range v2 {
  10911. if esep {
  10912. ee.WriteMapElemKey()
  10913. }
  10914. ee.EncodeInt(int64(int16(k2)))
  10915. if esep {
  10916. ee.WriteMapElemValue()
  10917. }
  10918. ee.EncodeInt(int64(v[int16(k2)]))
  10919. }
  10920. } else {
  10921. for k2, v2 := range v {
  10922. if esep {
  10923. ee.WriteMapElemKey()
  10924. }
  10925. ee.EncodeInt(int64(k2))
  10926. if esep {
  10927. ee.WriteMapElemValue()
  10928. }
  10929. ee.EncodeInt(int64(v2))
  10930. }
  10931. }
  10932. ee.WriteMapEnd()
  10933. }
  10934. func (e *Encoder) fastpathEncMapInt16Float32R(f *codecFnInfo, rv reflect.Value) {
  10935. fastpathTV.EncMapInt16Float32V(rv2i(rv).(map[int16]float32), e)
  10936. }
  10937. func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, e *Encoder) {
  10938. if v == nil {
  10939. e.e.EncodeNil()
  10940. return
  10941. }
  10942. ee, esep := e.e, e.hh.hasElemSeparators()
  10943. ee.WriteMapStart(len(v))
  10944. if e.h.Canonical {
  10945. v2 := make([]int64, len(v))
  10946. var i int
  10947. for k, _ := range v {
  10948. v2[i] = int64(k)
  10949. i++
  10950. }
  10951. sort.Sort(intSlice(v2))
  10952. for _, k2 := range v2 {
  10953. if esep {
  10954. ee.WriteMapElemKey()
  10955. }
  10956. ee.EncodeInt(int64(int16(k2)))
  10957. if esep {
  10958. ee.WriteMapElemValue()
  10959. }
  10960. ee.EncodeFloat32(v[int16(k2)])
  10961. }
  10962. } else {
  10963. for k2, v2 := range v {
  10964. if esep {
  10965. ee.WriteMapElemKey()
  10966. }
  10967. ee.EncodeInt(int64(k2))
  10968. if esep {
  10969. ee.WriteMapElemValue()
  10970. }
  10971. ee.EncodeFloat32(v2)
  10972. }
  10973. }
  10974. ee.WriteMapEnd()
  10975. }
  10976. func (e *Encoder) fastpathEncMapInt16Float64R(f *codecFnInfo, rv reflect.Value) {
  10977. fastpathTV.EncMapInt16Float64V(rv2i(rv).(map[int16]float64), e)
  10978. }
  10979. func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, e *Encoder) {
  10980. if v == nil {
  10981. e.e.EncodeNil()
  10982. return
  10983. }
  10984. ee, esep := e.e, e.hh.hasElemSeparators()
  10985. ee.WriteMapStart(len(v))
  10986. if e.h.Canonical {
  10987. v2 := make([]int64, len(v))
  10988. var i int
  10989. for k, _ := range v {
  10990. v2[i] = int64(k)
  10991. i++
  10992. }
  10993. sort.Sort(intSlice(v2))
  10994. for _, k2 := range v2 {
  10995. if esep {
  10996. ee.WriteMapElemKey()
  10997. }
  10998. ee.EncodeInt(int64(int16(k2)))
  10999. if esep {
  11000. ee.WriteMapElemValue()
  11001. }
  11002. ee.EncodeFloat64(v[int16(k2)])
  11003. }
  11004. } else {
  11005. for k2, v2 := range v {
  11006. if esep {
  11007. ee.WriteMapElemKey()
  11008. }
  11009. ee.EncodeInt(int64(k2))
  11010. if esep {
  11011. ee.WriteMapElemValue()
  11012. }
  11013. ee.EncodeFloat64(v2)
  11014. }
  11015. }
  11016. ee.WriteMapEnd()
  11017. }
  11018. func (e *Encoder) fastpathEncMapInt16BoolR(f *codecFnInfo, rv reflect.Value) {
  11019. fastpathTV.EncMapInt16BoolV(rv2i(rv).(map[int16]bool), e)
  11020. }
  11021. func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, e *Encoder) {
  11022. if v == nil {
  11023. e.e.EncodeNil()
  11024. return
  11025. }
  11026. ee, esep := e.e, e.hh.hasElemSeparators()
  11027. ee.WriteMapStart(len(v))
  11028. if e.h.Canonical {
  11029. v2 := make([]int64, len(v))
  11030. var i int
  11031. for k, _ := range v {
  11032. v2[i] = int64(k)
  11033. i++
  11034. }
  11035. sort.Sort(intSlice(v2))
  11036. for _, k2 := range v2 {
  11037. if esep {
  11038. ee.WriteMapElemKey()
  11039. }
  11040. ee.EncodeInt(int64(int16(k2)))
  11041. if esep {
  11042. ee.WriteMapElemValue()
  11043. }
  11044. ee.EncodeBool(v[int16(k2)])
  11045. }
  11046. } else {
  11047. for k2, v2 := range v {
  11048. if esep {
  11049. ee.WriteMapElemKey()
  11050. }
  11051. ee.EncodeInt(int64(k2))
  11052. if esep {
  11053. ee.WriteMapElemValue()
  11054. }
  11055. ee.EncodeBool(v2)
  11056. }
  11057. }
  11058. ee.WriteMapEnd()
  11059. }
  11060. func (e *Encoder) fastpathEncMapInt32IntfR(f *codecFnInfo, rv reflect.Value) {
  11061. fastpathTV.EncMapInt32IntfV(rv2i(rv).(map[int32]interface{}), e)
  11062. }
  11063. func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, e *Encoder) {
  11064. if v == nil {
  11065. e.e.EncodeNil()
  11066. return
  11067. }
  11068. ee, esep := e.e, e.hh.hasElemSeparators()
  11069. ee.WriteMapStart(len(v))
  11070. if e.h.Canonical {
  11071. v2 := make([]int64, len(v))
  11072. var i int
  11073. for k, _ := range v {
  11074. v2[i] = int64(k)
  11075. i++
  11076. }
  11077. sort.Sort(intSlice(v2))
  11078. for _, k2 := range v2 {
  11079. if esep {
  11080. ee.WriteMapElemKey()
  11081. }
  11082. ee.EncodeInt(int64(int32(k2)))
  11083. if esep {
  11084. ee.WriteMapElemValue()
  11085. }
  11086. e.encode(v[int32(k2)])
  11087. }
  11088. } else {
  11089. for k2, v2 := range v {
  11090. if esep {
  11091. ee.WriteMapElemKey()
  11092. }
  11093. ee.EncodeInt(int64(k2))
  11094. if esep {
  11095. ee.WriteMapElemValue()
  11096. }
  11097. e.encode(v2)
  11098. }
  11099. }
  11100. ee.WriteMapEnd()
  11101. }
  11102. func (e *Encoder) fastpathEncMapInt32StringR(f *codecFnInfo, rv reflect.Value) {
  11103. fastpathTV.EncMapInt32StringV(rv2i(rv).(map[int32]string), e)
  11104. }
  11105. func (_ fastpathT) EncMapInt32StringV(v map[int32]string, e *Encoder) {
  11106. if v == nil {
  11107. e.e.EncodeNil()
  11108. return
  11109. }
  11110. ee, esep := e.e, e.hh.hasElemSeparators()
  11111. ee.WriteMapStart(len(v))
  11112. if e.h.Canonical {
  11113. v2 := make([]int64, len(v))
  11114. var i int
  11115. for k, _ := range v {
  11116. v2[i] = int64(k)
  11117. i++
  11118. }
  11119. sort.Sort(intSlice(v2))
  11120. for _, k2 := range v2 {
  11121. if esep {
  11122. ee.WriteMapElemKey()
  11123. }
  11124. ee.EncodeInt(int64(int32(k2)))
  11125. if esep {
  11126. ee.WriteMapElemValue()
  11127. }
  11128. ee.EncodeString(c_UTF8, v[int32(k2)])
  11129. }
  11130. } else {
  11131. for k2, v2 := range v {
  11132. if esep {
  11133. ee.WriteMapElemKey()
  11134. }
  11135. ee.EncodeInt(int64(k2))
  11136. if esep {
  11137. ee.WriteMapElemValue()
  11138. }
  11139. ee.EncodeString(c_UTF8, v2)
  11140. }
  11141. }
  11142. ee.WriteMapEnd()
  11143. }
  11144. func (e *Encoder) fastpathEncMapInt32UintR(f *codecFnInfo, rv reflect.Value) {
  11145. fastpathTV.EncMapInt32UintV(rv2i(rv).(map[int32]uint), e)
  11146. }
  11147. func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, e *Encoder) {
  11148. if v == nil {
  11149. e.e.EncodeNil()
  11150. return
  11151. }
  11152. ee, esep := e.e, e.hh.hasElemSeparators()
  11153. ee.WriteMapStart(len(v))
  11154. if e.h.Canonical {
  11155. v2 := make([]int64, len(v))
  11156. var i int
  11157. for k, _ := range v {
  11158. v2[i] = int64(k)
  11159. i++
  11160. }
  11161. sort.Sort(intSlice(v2))
  11162. for _, k2 := range v2 {
  11163. if esep {
  11164. ee.WriteMapElemKey()
  11165. }
  11166. ee.EncodeInt(int64(int32(k2)))
  11167. if esep {
  11168. ee.WriteMapElemValue()
  11169. }
  11170. ee.EncodeUint(uint64(v[int32(k2)]))
  11171. }
  11172. } else {
  11173. for k2, v2 := range v {
  11174. if esep {
  11175. ee.WriteMapElemKey()
  11176. }
  11177. ee.EncodeInt(int64(k2))
  11178. if esep {
  11179. ee.WriteMapElemValue()
  11180. }
  11181. ee.EncodeUint(uint64(v2))
  11182. }
  11183. }
  11184. ee.WriteMapEnd()
  11185. }
  11186. func (e *Encoder) fastpathEncMapInt32Uint8R(f *codecFnInfo, rv reflect.Value) {
  11187. fastpathTV.EncMapInt32Uint8V(rv2i(rv).(map[int32]uint8), e)
  11188. }
  11189. func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, e *Encoder) {
  11190. if v == nil {
  11191. e.e.EncodeNil()
  11192. return
  11193. }
  11194. ee, esep := e.e, e.hh.hasElemSeparators()
  11195. ee.WriteMapStart(len(v))
  11196. if e.h.Canonical {
  11197. v2 := make([]int64, len(v))
  11198. var i int
  11199. for k, _ := range v {
  11200. v2[i] = int64(k)
  11201. i++
  11202. }
  11203. sort.Sort(intSlice(v2))
  11204. for _, k2 := range v2 {
  11205. if esep {
  11206. ee.WriteMapElemKey()
  11207. }
  11208. ee.EncodeInt(int64(int32(k2)))
  11209. if esep {
  11210. ee.WriteMapElemValue()
  11211. }
  11212. ee.EncodeUint(uint64(v[int32(k2)]))
  11213. }
  11214. } else {
  11215. for k2, v2 := range v {
  11216. if esep {
  11217. ee.WriteMapElemKey()
  11218. }
  11219. ee.EncodeInt(int64(k2))
  11220. if esep {
  11221. ee.WriteMapElemValue()
  11222. }
  11223. ee.EncodeUint(uint64(v2))
  11224. }
  11225. }
  11226. ee.WriteMapEnd()
  11227. }
  11228. func (e *Encoder) fastpathEncMapInt32Uint16R(f *codecFnInfo, rv reflect.Value) {
  11229. fastpathTV.EncMapInt32Uint16V(rv2i(rv).(map[int32]uint16), e)
  11230. }
  11231. func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, e *Encoder) {
  11232. if v == nil {
  11233. e.e.EncodeNil()
  11234. return
  11235. }
  11236. ee, esep := e.e, e.hh.hasElemSeparators()
  11237. ee.WriteMapStart(len(v))
  11238. if e.h.Canonical {
  11239. v2 := make([]int64, len(v))
  11240. var i int
  11241. for k, _ := range v {
  11242. v2[i] = int64(k)
  11243. i++
  11244. }
  11245. sort.Sort(intSlice(v2))
  11246. for _, k2 := range v2 {
  11247. if esep {
  11248. ee.WriteMapElemKey()
  11249. }
  11250. ee.EncodeInt(int64(int32(k2)))
  11251. if esep {
  11252. ee.WriteMapElemValue()
  11253. }
  11254. ee.EncodeUint(uint64(v[int32(k2)]))
  11255. }
  11256. } else {
  11257. for k2, v2 := range v {
  11258. if esep {
  11259. ee.WriteMapElemKey()
  11260. }
  11261. ee.EncodeInt(int64(k2))
  11262. if esep {
  11263. ee.WriteMapElemValue()
  11264. }
  11265. ee.EncodeUint(uint64(v2))
  11266. }
  11267. }
  11268. ee.WriteMapEnd()
  11269. }
  11270. func (e *Encoder) fastpathEncMapInt32Uint32R(f *codecFnInfo, rv reflect.Value) {
  11271. fastpathTV.EncMapInt32Uint32V(rv2i(rv).(map[int32]uint32), e)
  11272. }
  11273. func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, e *Encoder) {
  11274. if v == nil {
  11275. e.e.EncodeNil()
  11276. return
  11277. }
  11278. ee, esep := e.e, e.hh.hasElemSeparators()
  11279. ee.WriteMapStart(len(v))
  11280. if e.h.Canonical {
  11281. v2 := make([]int64, len(v))
  11282. var i int
  11283. for k, _ := range v {
  11284. v2[i] = int64(k)
  11285. i++
  11286. }
  11287. sort.Sort(intSlice(v2))
  11288. for _, k2 := range v2 {
  11289. if esep {
  11290. ee.WriteMapElemKey()
  11291. }
  11292. ee.EncodeInt(int64(int32(k2)))
  11293. if esep {
  11294. ee.WriteMapElemValue()
  11295. }
  11296. ee.EncodeUint(uint64(v[int32(k2)]))
  11297. }
  11298. } else {
  11299. for k2, v2 := range v {
  11300. if esep {
  11301. ee.WriteMapElemKey()
  11302. }
  11303. ee.EncodeInt(int64(k2))
  11304. if esep {
  11305. ee.WriteMapElemValue()
  11306. }
  11307. ee.EncodeUint(uint64(v2))
  11308. }
  11309. }
  11310. ee.WriteMapEnd()
  11311. }
  11312. func (e *Encoder) fastpathEncMapInt32Uint64R(f *codecFnInfo, rv reflect.Value) {
  11313. fastpathTV.EncMapInt32Uint64V(rv2i(rv).(map[int32]uint64), e)
  11314. }
  11315. func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, e *Encoder) {
  11316. if v == nil {
  11317. e.e.EncodeNil()
  11318. return
  11319. }
  11320. ee, esep := e.e, e.hh.hasElemSeparators()
  11321. ee.WriteMapStart(len(v))
  11322. if e.h.Canonical {
  11323. v2 := make([]int64, len(v))
  11324. var i int
  11325. for k, _ := range v {
  11326. v2[i] = int64(k)
  11327. i++
  11328. }
  11329. sort.Sort(intSlice(v2))
  11330. for _, k2 := range v2 {
  11331. if esep {
  11332. ee.WriteMapElemKey()
  11333. }
  11334. ee.EncodeInt(int64(int32(k2)))
  11335. if esep {
  11336. ee.WriteMapElemValue()
  11337. }
  11338. ee.EncodeUint(uint64(v[int32(k2)]))
  11339. }
  11340. } else {
  11341. for k2, v2 := range v {
  11342. if esep {
  11343. ee.WriteMapElemKey()
  11344. }
  11345. ee.EncodeInt(int64(k2))
  11346. if esep {
  11347. ee.WriteMapElemValue()
  11348. }
  11349. ee.EncodeUint(uint64(v2))
  11350. }
  11351. }
  11352. ee.WriteMapEnd()
  11353. }
  11354. func (e *Encoder) fastpathEncMapInt32UintptrR(f *codecFnInfo, rv reflect.Value) {
  11355. fastpathTV.EncMapInt32UintptrV(rv2i(rv).(map[int32]uintptr), e)
  11356. }
  11357. func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, e *Encoder) {
  11358. if v == nil {
  11359. e.e.EncodeNil()
  11360. return
  11361. }
  11362. ee, esep := e.e, e.hh.hasElemSeparators()
  11363. ee.WriteMapStart(len(v))
  11364. if e.h.Canonical {
  11365. v2 := make([]int64, len(v))
  11366. var i int
  11367. for k, _ := range v {
  11368. v2[i] = int64(k)
  11369. i++
  11370. }
  11371. sort.Sort(intSlice(v2))
  11372. for _, k2 := range v2 {
  11373. if esep {
  11374. ee.WriteMapElemKey()
  11375. }
  11376. ee.EncodeInt(int64(int32(k2)))
  11377. if esep {
  11378. ee.WriteMapElemValue()
  11379. }
  11380. e.encode(v[int32(k2)])
  11381. }
  11382. } else {
  11383. for k2, v2 := range v {
  11384. if esep {
  11385. ee.WriteMapElemKey()
  11386. }
  11387. ee.EncodeInt(int64(k2))
  11388. if esep {
  11389. ee.WriteMapElemValue()
  11390. }
  11391. e.encode(v2)
  11392. }
  11393. }
  11394. ee.WriteMapEnd()
  11395. }
  11396. func (e *Encoder) fastpathEncMapInt32IntR(f *codecFnInfo, rv reflect.Value) {
  11397. fastpathTV.EncMapInt32IntV(rv2i(rv).(map[int32]int), e)
  11398. }
  11399. func (_ fastpathT) EncMapInt32IntV(v map[int32]int, e *Encoder) {
  11400. if v == nil {
  11401. e.e.EncodeNil()
  11402. return
  11403. }
  11404. ee, esep := e.e, e.hh.hasElemSeparators()
  11405. ee.WriteMapStart(len(v))
  11406. if e.h.Canonical {
  11407. v2 := make([]int64, len(v))
  11408. var i int
  11409. for k, _ := range v {
  11410. v2[i] = int64(k)
  11411. i++
  11412. }
  11413. sort.Sort(intSlice(v2))
  11414. for _, k2 := range v2 {
  11415. if esep {
  11416. ee.WriteMapElemKey()
  11417. }
  11418. ee.EncodeInt(int64(int32(k2)))
  11419. if esep {
  11420. ee.WriteMapElemValue()
  11421. }
  11422. ee.EncodeInt(int64(v[int32(k2)]))
  11423. }
  11424. } else {
  11425. for k2, v2 := range v {
  11426. if esep {
  11427. ee.WriteMapElemKey()
  11428. }
  11429. ee.EncodeInt(int64(k2))
  11430. if esep {
  11431. ee.WriteMapElemValue()
  11432. }
  11433. ee.EncodeInt(int64(v2))
  11434. }
  11435. }
  11436. ee.WriteMapEnd()
  11437. }
  11438. func (e *Encoder) fastpathEncMapInt32Int8R(f *codecFnInfo, rv reflect.Value) {
  11439. fastpathTV.EncMapInt32Int8V(rv2i(rv).(map[int32]int8), e)
  11440. }
  11441. func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, e *Encoder) {
  11442. if v == nil {
  11443. e.e.EncodeNil()
  11444. return
  11445. }
  11446. ee, esep := e.e, e.hh.hasElemSeparators()
  11447. ee.WriteMapStart(len(v))
  11448. if e.h.Canonical {
  11449. v2 := make([]int64, len(v))
  11450. var i int
  11451. for k, _ := range v {
  11452. v2[i] = int64(k)
  11453. i++
  11454. }
  11455. sort.Sort(intSlice(v2))
  11456. for _, k2 := range v2 {
  11457. if esep {
  11458. ee.WriteMapElemKey()
  11459. }
  11460. ee.EncodeInt(int64(int32(k2)))
  11461. if esep {
  11462. ee.WriteMapElemValue()
  11463. }
  11464. ee.EncodeInt(int64(v[int32(k2)]))
  11465. }
  11466. } else {
  11467. for k2, v2 := range v {
  11468. if esep {
  11469. ee.WriteMapElemKey()
  11470. }
  11471. ee.EncodeInt(int64(k2))
  11472. if esep {
  11473. ee.WriteMapElemValue()
  11474. }
  11475. ee.EncodeInt(int64(v2))
  11476. }
  11477. }
  11478. ee.WriteMapEnd()
  11479. }
  11480. func (e *Encoder) fastpathEncMapInt32Int16R(f *codecFnInfo, rv reflect.Value) {
  11481. fastpathTV.EncMapInt32Int16V(rv2i(rv).(map[int32]int16), e)
  11482. }
  11483. func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, e *Encoder) {
  11484. if v == nil {
  11485. e.e.EncodeNil()
  11486. return
  11487. }
  11488. ee, esep := e.e, e.hh.hasElemSeparators()
  11489. ee.WriteMapStart(len(v))
  11490. if e.h.Canonical {
  11491. v2 := make([]int64, len(v))
  11492. var i int
  11493. for k, _ := range v {
  11494. v2[i] = int64(k)
  11495. i++
  11496. }
  11497. sort.Sort(intSlice(v2))
  11498. for _, k2 := range v2 {
  11499. if esep {
  11500. ee.WriteMapElemKey()
  11501. }
  11502. ee.EncodeInt(int64(int32(k2)))
  11503. if esep {
  11504. ee.WriteMapElemValue()
  11505. }
  11506. ee.EncodeInt(int64(v[int32(k2)]))
  11507. }
  11508. } else {
  11509. for k2, v2 := range v {
  11510. if esep {
  11511. ee.WriteMapElemKey()
  11512. }
  11513. ee.EncodeInt(int64(k2))
  11514. if esep {
  11515. ee.WriteMapElemValue()
  11516. }
  11517. ee.EncodeInt(int64(v2))
  11518. }
  11519. }
  11520. ee.WriteMapEnd()
  11521. }
  11522. func (e *Encoder) fastpathEncMapInt32Int32R(f *codecFnInfo, rv reflect.Value) {
  11523. fastpathTV.EncMapInt32Int32V(rv2i(rv).(map[int32]int32), e)
  11524. }
  11525. func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, e *Encoder) {
  11526. if v == nil {
  11527. e.e.EncodeNil()
  11528. return
  11529. }
  11530. ee, esep := e.e, e.hh.hasElemSeparators()
  11531. ee.WriteMapStart(len(v))
  11532. if e.h.Canonical {
  11533. v2 := make([]int64, len(v))
  11534. var i int
  11535. for k, _ := range v {
  11536. v2[i] = int64(k)
  11537. i++
  11538. }
  11539. sort.Sort(intSlice(v2))
  11540. for _, k2 := range v2 {
  11541. if esep {
  11542. ee.WriteMapElemKey()
  11543. }
  11544. ee.EncodeInt(int64(int32(k2)))
  11545. if esep {
  11546. ee.WriteMapElemValue()
  11547. }
  11548. ee.EncodeInt(int64(v[int32(k2)]))
  11549. }
  11550. } else {
  11551. for k2, v2 := range v {
  11552. if esep {
  11553. ee.WriteMapElemKey()
  11554. }
  11555. ee.EncodeInt(int64(k2))
  11556. if esep {
  11557. ee.WriteMapElemValue()
  11558. }
  11559. ee.EncodeInt(int64(v2))
  11560. }
  11561. }
  11562. ee.WriteMapEnd()
  11563. }
  11564. func (e *Encoder) fastpathEncMapInt32Int64R(f *codecFnInfo, rv reflect.Value) {
  11565. fastpathTV.EncMapInt32Int64V(rv2i(rv).(map[int32]int64), e)
  11566. }
  11567. func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, e *Encoder) {
  11568. if v == nil {
  11569. e.e.EncodeNil()
  11570. return
  11571. }
  11572. ee, esep := e.e, e.hh.hasElemSeparators()
  11573. ee.WriteMapStart(len(v))
  11574. if e.h.Canonical {
  11575. v2 := make([]int64, len(v))
  11576. var i int
  11577. for k, _ := range v {
  11578. v2[i] = int64(k)
  11579. i++
  11580. }
  11581. sort.Sort(intSlice(v2))
  11582. for _, k2 := range v2 {
  11583. if esep {
  11584. ee.WriteMapElemKey()
  11585. }
  11586. ee.EncodeInt(int64(int32(k2)))
  11587. if esep {
  11588. ee.WriteMapElemValue()
  11589. }
  11590. ee.EncodeInt(int64(v[int32(k2)]))
  11591. }
  11592. } else {
  11593. for k2, v2 := range v {
  11594. if esep {
  11595. ee.WriteMapElemKey()
  11596. }
  11597. ee.EncodeInt(int64(k2))
  11598. if esep {
  11599. ee.WriteMapElemValue()
  11600. }
  11601. ee.EncodeInt(int64(v2))
  11602. }
  11603. }
  11604. ee.WriteMapEnd()
  11605. }
  11606. func (e *Encoder) fastpathEncMapInt32Float32R(f *codecFnInfo, rv reflect.Value) {
  11607. fastpathTV.EncMapInt32Float32V(rv2i(rv).(map[int32]float32), e)
  11608. }
  11609. func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, e *Encoder) {
  11610. if v == nil {
  11611. e.e.EncodeNil()
  11612. return
  11613. }
  11614. ee, esep := e.e, e.hh.hasElemSeparators()
  11615. ee.WriteMapStart(len(v))
  11616. if e.h.Canonical {
  11617. v2 := make([]int64, len(v))
  11618. var i int
  11619. for k, _ := range v {
  11620. v2[i] = int64(k)
  11621. i++
  11622. }
  11623. sort.Sort(intSlice(v2))
  11624. for _, k2 := range v2 {
  11625. if esep {
  11626. ee.WriteMapElemKey()
  11627. }
  11628. ee.EncodeInt(int64(int32(k2)))
  11629. if esep {
  11630. ee.WriteMapElemValue()
  11631. }
  11632. ee.EncodeFloat32(v[int32(k2)])
  11633. }
  11634. } else {
  11635. for k2, v2 := range v {
  11636. if esep {
  11637. ee.WriteMapElemKey()
  11638. }
  11639. ee.EncodeInt(int64(k2))
  11640. if esep {
  11641. ee.WriteMapElemValue()
  11642. }
  11643. ee.EncodeFloat32(v2)
  11644. }
  11645. }
  11646. ee.WriteMapEnd()
  11647. }
  11648. func (e *Encoder) fastpathEncMapInt32Float64R(f *codecFnInfo, rv reflect.Value) {
  11649. fastpathTV.EncMapInt32Float64V(rv2i(rv).(map[int32]float64), e)
  11650. }
  11651. func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, e *Encoder) {
  11652. if v == nil {
  11653. e.e.EncodeNil()
  11654. return
  11655. }
  11656. ee, esep := e.e, e.hh.hasElemSeparators()
  11657. ee.WriteMapStart(len(v))
  11658. if e.h.Canonical {
  11659. v2 := make([]int64, len(v))
  11660. var i int
  11661. for k, _ := range v {
  11662. v2[i] = int64(k)
  11663. i++
  11664. }
  11665. sort.Sort(intSlice(v2))
  11666. for _, k2 := range v2 {
  11667. if esep {
  11668. ee.WriteMapElemKey()
  11669. }
  11670. ee.EncodeInt(int64(int32(k2)))
  11671. if esep {
  11672. ee.WriteMapElemValue()
  11673. }
  11674. ee.EncodeFloat64(v[int32(k2)])
  11675. }
  11676. } else {
  11677. for k2, v2 := range v {
  11678. if esep {
  11679. ee.WriteMapElemKey()
  11680. }
  11681. ee.EncodeInt(int64(k2))
  11682. if esep {
  11683. ee.WriteMapElemValue()
  11684. }
  11685. ee.EncodeFloat64(v2)
  11686. }
  11687. }
  11688. ee.WriteMapEnd()
  11689. }
  11690. func (e *Encoder) fastpathEncMapInt32BoolR(f *codecFnInfo, rv reflect.Value) {
  11691. fastpathTV.EncMapInt32BoolV(rv2i(rv).(map[int32]bool), e)
  11692. }
  11693. func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, e *Encoder) {
  11694. if v == nil {
  11695. e.e.EncodeNil()
  11696. return
  11697. }
  11698. ee, esep := e.e, e.hh.hasElemSeparators()
  11699. ee.WriteMapStart(len(v))
  11700. if e.h.Canonical {
  11701. v2 := make([]int64, len(v))
  11702. var i int
  11703. for k, _ := range v {
  11704. v2[i] = int64(k)
  11705. i++
  11706. }
  11707. sort.Sort(intSlice(v2))
  11708. for _, k2 := range v2 {
  11709. if esep {
  11710. ee.WriteMapElemKey()
  11711. }
  11712. ee.EncodeInt(int64(int32(k2)))
  11713. if esep {
  11714. ee.WriteMapElemValue()
  11715. }
  11716. ee.EncodeBool(v[int32(k2)])
  11717. }
  11718. } else {
  11719. for k2, v2 := range v {
  11720. if esep {
  11721. ee.WriteMapElemKey()
  11722. }
  11723. ee.EncodeInt(int64(k2))
  11724. if esep {
  11725. ee.WriteMapElemValue()
  11726. }
  11727. ee.EncodeBool(v2)
  11728. }
  11729. }
  11730. ee.WriteMapEnd()
  11731. }
  11732. func (e *Encoder) fastpathEncMapInt64IntfR(f *codecFnInfo, rv reflect.Value) {
  11733. fastpathTV.EncMapInt64IntfV(rv2i(rv).(map[int64]interface{}), e)
  11734. }
  11735. func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, e *Encoder) {
  11736. if v == nil {
  11737. e.e.EncodeNil()
  11738. return
  11739. }
  11740. ee, esep := e.e, e.hh.hasElemSeparators()
  11741. ee.WriteMapStart(len(v))
  11742. if e.h.Canonical {
  11743. v2 := make([]int64, len(v))
  11744. var i int
  11745. for k, _ := range v {
  11746. v2[i] = int64(k)
  11747. i++
  11748. }
  11749. sort.Sort(intSlice(v2))
  11750. for _, k2 := range v2 {
  11751. if esep {
  11752. ee.WriteMapElemKey()
  11753. }
  11754. ee.EncodeInt(int64(int64(k2)))
  11755. if esep {
  11756. ee.WriteMapElemValue()
  11757. }
  11758. e.encode(v[int64(k2)])
  11759. }
  11760. } else {
  11761. for k2, v2 := range v {
  11762. if esep {
  11763. ee.WriteMapElemKey()
  11764. }
  11765. ee.EncodeInt(int64(k2))
  11766. if esep {
  11767. ee.WriteMapElemValue()
  11768. }
  11769. e.encode(v2)
  11770. }
  11771. }
  11772. ee.WriteMapEnd()
  11773. }
  11774. func (e *Encoder) fastpathEncMapInt64StringR(f *codecFnInfo, rv reflect.Value) {
  11775. fastpathTV.EncMapInt64StringV(rv2i(rv).(map[int64]string), e)
  11776. }
  11777. func (_ fastpathT) EncMapInt64StringV(v map[int64]string, e *Encoder) {
  11778. if v == nil {
  11779. e.e.EncodeNil()
  11780. return
  11781. }
  11782. ee, esep := e.e, e.hh.hasElemSeparators()
  11783. ee.WriteMapStart(len(v))
  11784. if e.h.Canonical {
  11785. v2 := make([]int64, len(v))
  11786. var i int
  11787. for k, _ := range v {
  11788. v2[i] = int64(k)
  11789. i++
  11790. }
  11791. sort.Sort(intSlice(v2))
  11792. for _, k2 := range v2 {
  11793. if esep {
  11794. ee.WriteMapElemKey()
  11795. }
  11796. ee.EncodeInt(int64(int64(k2)))
  11797. if esep {
  11798. ee.WriteMapElemValue()
  11799. }
  11800. ee.EncodeString(c_UTF8, v[int64(k2)])
  11801. }
  11802. } else {
  11803. for k2, v2 := range v {
  11804. if esep {
  11805. ee.WriteMapElemKey()
  11806. }
  11807. ee.EncodeInt(int64(k2))
  11808. if esep {
  11809. ee.WriteMapElemValue()
  11810. }
  11811. ee.EncodeString(c_UTF8, v2)
  11812. }
  11813. }
  11814. ee.WriteMapEnd()
  11815. }
  11816. func (e *Encoder) fastpathEncMapInt64UintR(f *codecFnInfo, rv reflect.Value) {
  11817. fastpathTV.EncMapInt64UintV(rv2i(rv).(map[int64]uint), e)
  11818. }
  11819. func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, e *Encoder) {
  11820. if v == nil {
  11821. e.e.EncodeNil()
  11822. return
  11823. }
  11824. ee, esep := e.e, e.hh.hasElemSeparators()
  11825. ee.WriteMapStart(len(v))
  11826. if e.h.Canonical {
  11827. v2 := make([]int64, len(v))
  11828. var i int
  11829. for k, _ := range v {
  11830. v2[i] = int64(k)
  11831. i++
  11832. }
  11833. sort.Sort(intSlice(v2))
  11834. for _, k2 := range v2 {
  11835. if esep {
  11836. ee.WriteMapElemKey()
  11837. }
  11838. ee.EncodeInt(int64(int64(k2)))
  11839. if esep {
  11840. ee.WriteMapElemValue()
  11841. }
  11842. ee.EncodeUint(uint64(v[int64(k2)]))
  11843. }
  11844. } else {
  11845. for k2, v2 := range v {
  11846. if esep {
  11847. ee.WriteMapElemKey()
  11848. }
  11849. ee.EncodeInt(int64(k2))
  11850. if esep {
  11851. ee.WriteMapElemValue()
  11852. }
  11853. ee.EncodeUint(uint64(v2))
  11854. }
  11855. }
  11856. ee.WriteMapEnd()
  11857. }
  11858. func (e *Encoder) fastpathEncMapInt64Uint8R(f *codecFnInfo, rv reflect.Value) {
  11859. fastpathTV.EncMapInt64Uint8V(rv2i(rv).(map[int64]uint8), e)
  11860. }
  11861. func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, e *Encoder) {
  11862. if v == nil {
  11863. e.e.EncodeNil()
  11864. return
  11865. }
  11866. ee, esep := e.e, e.hh.hasElemSeparators()
  11867. ee.WriteMapStart(len(v))
  11868. if e.h.Canonical {
  11869. v2 := make([]int64, len(v))
  11870. var i int
  11871. for k, _ := range v {
  11872. v2[i] = int64(k)
  11873. i++
  11874. }
  11875. sort.Sort(intSlice(v2))
  11876. for _, k2 := range v2 {
  11877. if esep {
  11878. ee.WriteMapElemKey()
  11879. }
  11880. ee.EncodeInt(int64(int64(k2)))
  11881. if esep {
  11882. ee.WriteMapElemValue()
  11883. }
  11884. ee.EncodeUint(uint64(v[int64(k2)]))
  11885. }
  11886. } else {
  11887. for k2, v2 := range v {
  11888. if esep {
  11889. ee.WriteMapElemKey()
  11890. }
  11891. ee.EncodeInt(int64(k2))
  11892. if esep {
  11893. ee.WriteMapElemValue()
  11894. }
  11895. ee.EncodeUint(uint64(v2))
  11896. }
  11897. }
  11898. ee.WriteMapEnd()
  11899. }
  11900. func (e *Encoder) fastpathEncMapInt64Uint16R(f *codecFnInfo, rv reflect.Value) {
  11901. fastpathTV.EncMapInt64Uint16V(rv2i(rv).(map[int64]uint16), e)
  11902. }
  11903. func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, e *Encoder) {
  11904. if v == nil {
  11905. e.e.EncodeNil()
  11906. return
  11907. }
  11908. ee, esep := e.e, e.hh.hasElemSeparators()
  11909. ee.WriteMapStart(len(v))
  11910. if e.h.Canonical {
  11911. v2 := make([]int64, len(v))
  11912. var i int
  11913. for k, _ := range v {
  11914. v2[i] = int64(k)
  11915. i++
  11916. }
  11917. sort.Sort(intSlice(v2))
  11918. for _, k2 := range v2 {
  11919. if esep {
  11920. ee.WriteMapElemKey()
  11921. }
  11922. ee.EncodeInt(int64(int64(k2)))
  11923. if esep {
  11924. ee.WriteMapElemValue()
  11925. }
  11926. ee.EncodeUint(uint64(v[int64(k2)]))
  11927. }
  11928. } else {
  11929. for k2, v2 := range v {
  11930. if esep {
  11931. ee.WriteMapElemKey()
  11932. }
  11933. ee.EncodeInt(int64(k2))
  11934. if esep {
  11935. ee.WriteMapElemValue()
  11936. }
  11937. ee.EncodeUint(uint64(v2))
  11938. }
  11939. }
  11940. ee.WriteMapEnd()
  11941. }
  11942. func (e *Encoder) fastpathEncMapInt64Uint32R(f *codecFnInfo, rv reflect.Value) {
  11943. fastpathTV.EncMapInt64Uint32V(rv2i(rv).(map[int64]uint32), e)
  11944. }
  11945. func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, e *Encoder) {
  11946. if v == nil {
  11947. e.e.EncodeNil()
  11948. return
  11949. }
  11950. ee, esep := e.e, e.hh.hasElemSeparators()
  11951. ee.WriteMapStart(len(v))
  11952. if e.h.Canonical {
  11953. v2 := make([]int64, len(v))
  11954. var i int
  11955. for k, _ := range v {
  11956. v2[i] = int64(k)
  11957. i++
  11958. }
  11959. sort.Sort(intSlice(v2))
  11960. for _, k2 := range v2 {
  11961. if esep {
  11962. ee.WriteMapElemKey()
  11963. }
  11964. ee.EncodeInt(int64(int64(k2)))
  11965. if esep {
  11966. ee.WriteMapElemValue()
  11967. }
  11968. ee.EncodeUint(uint64(v[int64(k2)]))
  11969. }
  11970. } else {
  11971. for k2, v2 := range v {
  11972. if esep {
  11973. ee.WriteMapElemKey()
  11974. }
  11975. ee.EncodeInt(int64(k2))
  11976. if esep {
  11977. ee.WriteMapElemValue()
  11978. }
  11979. ee.EncodeUint(uint64(v2))
  11980. }
  11981. }
  11982. ee.WriteMapEnd()
  11983. }
  11984. func (e *Encoder) fastpathEncMapInt64Uint64R(f *codecFnInfo, rv reflect.Value) {
  11985. fastpathTV.EncMapInt64Uint64V(rv2i(rv).(map[int64]uint64), e)
  11986. }
  11987. func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, e *Encoder) {
  11988. if v == nil {
  11989. e.e.EncodeNil()
  11990. return
  11991. }
  11992. ee, esep := e.e, e.hh.hasElemSeparators()
  11993. ee.WriteMapStart(len(v))
  11994. if e.h.Canonical {
  11995. v2 := make([]int64, len(v))
  11996. var i int
  11997. for k, _ := range v {
  11998. v2[i] = int64(k)
  11999. i++
  12000. }
  12001. sort.Sort(intSlice(v2))
  12002. for _, k2 := range v2 {
  12003. if esep {
  12004. ee.WriteMapElemKey()
  12005. }
  12006. ee.EncodeInt(int64(int64(k2)))
  12007. if esep {
  12008. ee.WriteMapElemValue()
  12009. }
  12010. ee.EncodeUint(uint64(v[int64(k2)]))
  12011. }
  12012. } else {
  12013. for k2, v2 := range v {
  12014. if esep {
  12015. ee.WriteMapElemKey()
  12016. }
  12017. ee.EncodeInt(int64(k2))
  12018. if esep {
  12019. ee.WriteMapElemValue()
  12020. }
  12021. ee.EncodeUint(uint64(v2))
  12022. }
  12023. }
  12024. ee.WriteMapEnd()
  12025. }
  12026. func (e *Encoder) fastpathEncMapInt64UintptrR(f *codecFnInfo, rv reflect.Value) {
  12027. fastpathTV.EncMapInt64UintptrV(rv2i(rv).(map[int64]uintptr), e)
  12028. }
  12029. func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, e *Encoder) {
  12030. if v == nil {
  12031. e.e.EncodeNil()
  12032. return
  12033. }
  12034. ee, esep := e.e, e.hh.hasElemSeparators()
  12035. ee.WriteMapStart(len(v))
  12036. if e.h.Canonical {
  12037. v2 := make([]int64, len(v))
  12038. var i int
  12039. for k, _ := range v {
  12040. v2[i] = int64(k)
  12041. i++
  12042. }
  12043. sort.Sort(intSlice(v2))
  12044. for _, k2 := range v2 {
  12045. if esep {
  12046. ee.WriteMapElemKey()
  12047. }
  12048. ee.EncodeInt(int64(int64(k2)))
  12049. if esep {
  12050. ee.WriteMapElemValue()
  12051. }
  12052. e.encode(v[int64(k2)])
  12053. }
  12054. } else {
  12055. for k2, v2 := range v {
  12056. if esep {
  12057. ee.WriteMapElemKey()
  12058. }
  12059. ee.EncodeInt(int64(k2))
  12060. if esep {
  12061. ee.WriteMapElemValue()
  12062. }
  12063. e.encode(v2)
  12064. }
  12065. }
  12066. ee.WriteMapEnd()
  12067. }
  12068. func (e *Encoder) fastpathEncMapInt64IntR(f *codecFnInfo, rv reflect.Value) {
  12069. fastpathTV.EncMapInt64IntV(rv2i(rv).(map[int64]int), e)
  12070. }
  12071. func (_ fastpathT) EncMapInt64IntV(v map[int64]int, e *Encoder) {
  12072. if v == nil {
  12073. e.e.EncodeNil()
  12074. return
  12075. }
  12076. ee, esep := e.e, e.hh.hasElemSeparators()
  12077. ee.WriteMapStart(len(v))
  12078. if e.h.Canonical {
  12079. v2 := make([]int64, len(v))
  12080. var i int
  12081. for k, _ := range v {
  12082. v2[i] = int64(k)
  12083. i++
  12084. }
  12085. sort.Sort(intSlice(v2))
  12086. for _, k2 := range v2 {
  12087. if esep {
  12088. ee.WriteMapElemKey()
  12089. }
  12090. ee.EncodeInt(int64(int64(k2)))
  12091. if esep {
  12092. ee.WriteMapElemValue()
  12093. }
  12094. ee.EncodeInt(int64(v[int64(k2)]))
  12095. }
  12096. } else {
  12097. for k2, v2 := range v {
  12098. if esep {
  12099. ee.WriteMapElemKey()
  12100. }
  12101. ee.EncodeInt(int64(k2))
  12102. if esep {
  12103. ee.WriteMapElemValue()
  12104. }
  12105. ee.EncodeInt(int64(v2))
  12106. }
  12107. }
  12108. ee.WriteMapEnd()
  12109. }
  12110. func (e *Encoder) fastpathEncMapInt64Int8R(f *codecFnInfo, rv reflect.Value) {
  12111. fastpathTV.EncMapInt64Int8V(rv2i(rv).(map[int64]int8), e)
  12112. }
  12113. func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, e *Encoder) {
  12114. if v == nil {
  12115. e.e.EncodeNil()
  12116. return
  12117. }
  12118. ee, esep := e.e, e.hh.hasElemSeparators()
  12119. ee.WriteMapStart(len(v))
  12120. if e.h.Canonical {
  12121. v2 := make([]int64, len(v))
  12122. var i int
  12123. for k, _ := range v {
  12124. v2[i] = int64(k)
  12125. i++
  12126. }
  12127. sort.Sort(intSlice(v2))
  12128. for _, k2 := range v2 {
  12129. if esep {
  12130. ee.WriteMapElemKey()
  12131. }
  12132. ee.EncodeInt(int64(int64(k2)))
  12133. if esep {
  12134. ee.WriteMapElemValue()
  12135. }
  12136. ee.EncodeInt(int64(v[int64(k2)]))
  12137. }
  12138. } else {
  12139. for k2, v2 := range v {
  12140. if esep {
  12141. ee.WriteMapElemKey()
  12142. }
  12143. ee.EncodeInt(int64(k2))
  12144. if esep {
  12145. ee.WriteMapElemValue()
  12146. }
  12147. ee.EncodeInt(int64(v2))
  12148. }
  12149. }
  12150. ee.WriteMapEnd()
  12151. }
  12152. func (e *Encoder) fastpathEncMapInt64Int16R(f *codecFnInfo, rv reflect.Value) {
  12153. fastpathTV.EncMapInt64Int16V(rv2i(rv).(map[int64]int16), e)
  12154. }
  12155. func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, e *Encoder) {
  12156. if v == nil {
  12157. e.e.EncodeNil()
  12158. return
  12159. }
  12160. ee, esep := e.e, e.hh.hasElemSeparators()
  12161. ee.WriteMapStart(len(v))
  12162. if e.h.Canonical {
  12163. v2 := make([]int64, len(v))
  12164. var i int
  12165. for k, _ := range v {
  12166. v2[i] = int64(k)
  12167. i++
  12168. }
  12169. sort.Sort(intSlice(v2))
  12170. for _, k2 := range v2 {
  12171. if esep {
  12172. ee.WriteMapElemKey()
  12173. }
  12174. ee.EncodeInt(int64(int64(k2)))
  12175. if esep {
  12176. ee.WriteMapElemValue()
  12177. }
  12178. ee.EncodeInt(int64(v[int64(k2)]))
  12179. }
  12180. } else {
  12181. for k2, v2 := range v {
  12182. if esep {
  12183. ee.WriteMapElemKey()
  12184. }
  12185. ee.EncodeInt(int64(k2))
  12186. if esep {
  12187. ee.WriteMapElemValue()
  12188. }
  12189. ee.EncodeInt(int64(v2))
  12190. }
  12191. }
  12192. ee.WriteMapEnd()
  12193. }
  12194. func (e *Encoder) fastpathEncMapInt64Int32R(f *codecFnInfo, rv reflect.Value) {
  12195. fastpathTV.EncMapInt64Int32V(rv2i(rv).(map[int64]int32), e)
  12196. }
  12197. func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, e *Encoder) {
  12198. if v == nil {
  12199. e.e.EncodeNil()
  12200. return
  12201. }
  12202. ee, esep := e.e, e.hh.hasElemSeparators()
  12203. ee.WriteMapStart(len(v))
  12204. if e.h.Canonical {
  12205. v2 := make([]int64, len(v))
  12206. var i int
  12207. for k, _ := range v {
  12208. v2[i] = int64(k)
  12209. i++
  12210. }
  12211. sort.Sort(intSlice(v2))
  12212. for _, k2 := range v2 {
  12213. if esep {
  12214. ee.WriteMapElemKey()
  12215. }
  12216. ee.EncodeInt(int64(int64(k2)))
  12217. if esep {
  12218. ee.WriteMapElemValue()
  12219. }
  12220. ee.EncodeInt(int64(v[int64(k2)]))
  12221. }
  12222. } else {
  12223. for k2, v2 := range v {
  12224. if esep {
  12225. ee.WriteMapElemKey()
  12226. }
  12227. ee.EncodeInt(int64(k2))
  12228. if esep {
  12229. ee.WriteMapElemValue()
  12230. }
  12231. ee.EncodeInt(int64(v2))
  12232. }
  12233. }
  12234. ee.WriteMapEnd()
  12235. }
  12236. func (e *Encoder) fastpathEncMapInt64Int64R(f *codecFnInfo, rv reflect.Value) {
  12237. fastpathTV.EncMapInt64Int64V(rv2i(rv).(map[int64]int64), e)
  12238. }
  12239. func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, e *Encoder) {
  12240. if v == nil {
  12241. e.e.EncodeNil()
  12242. return
  12243. }
  12244. ee, esep := e.e, e.hh.hasElemSeparators()
  12245. ee.WriteMapStart(len(v))
  12246. if e.h.Canonical {
  12247. v2 := make([]int64, len(v))
  12248. var i int
  12249. for k, _ := range v {
  12250. v2[i] = int64(k)
  12251. i++
  12252. }
  12253. sort.Sort(intSlice(v2))
  12254. for _, k2 := range v2 {
  12255. if esep {
  12256. ee.WriteMapElemKey()
  12257. }
  12258. ee.EncodeInt(int64(int64(k2)))
  12259. if esep {
  12260. ee.WriteMapElemValue()
  12261. }
  12262. ee.EncodeInt(int64(v[int64(k2)]))
  12263. }
  12264. } else {
  12265. for k2, v2 := range v {
  12266. if esep {
  12267. ee.WriteMapElemKey()
  12268. }
  12269. ee.EncodeInt(int64(k2))
  12270. if esep {
  12271. ee.WriteMapElemValue()
  12272. }
  12273. ee.EncodeInt(int64(v2))
  12274. }
  12275. }
  12276. ee.WriteMapEnd()
  12277. }
  12278. func (e *Encoder) fastpathEncMapInt64Float32R(f *codecFnInfo, rv reflect.Value) {
  12279. fastpathTV.EncMapInt64Float32V(rv2i(rv).(map[int64]float32), e)
  12280. }
  12281. func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, e *Encoder) {
  12282. if v == nil {
  12283. e.e.EncodeNil()
  12284. return
  12285. }
  12286. ee, esep := e.e, e.hh.hasElemSeparators()
  12287. ee.WriteMapStart(len(v))
  12288. if e.h.Canonical {
  12289. v2 := make([]int64, len(v))
  12290. var i int
  12291. for k, _ := range v {
  12292. v2[i] = int64(k)
  12293. i++
  12294. }
  12295. sort.Sort(intSlice(v2))
  12296. for _, k2 := range v2 {
  12297. if esep {
  12298. ee.WriteMapElemKey()
  12299. }
  12300. ee.EncodeInt(int64(int64(k2)))
  12301. if esep {
  12302. ee.WriteMapElemValue()
  12303. }
  12304. ee.EncodeFloat32(v[int64(k2)])
  12305. }
  12306. } else {
  12307. for k2, v2 := range v {
  12308. if esep {
  12309. ee.WriteMapElemKey()
  12310. }
  12311. ee.EncodeInt(int64(k2))
  12312. if esep {
  12313. ee.WriteMapElemValue()
  12314. }
  12315. ee.EncodeFloat32(v2)
  12316. }
  12317. }
  12318. ee.WriteMapEnd()
  12319. }
  12320. func (e *Encoder) fastpathEncMapInt64Float64R(f *codecFnInfo, rv reflect.Value) {
  12321. fastpathTV.EncMapInt64Float64V(rv2i(rv).(map[int64]float64), e)
  12322. }
  12323. func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, e *Encoder) {
  12324. if v == nil {
  12325. e.e.EncodeNil()
  12326. return
  12327. }
  12328. ee, esep := e.e, e.hh.hasElemSeparators()
  12329. ee.WriteMapStart(len(v))
  12330. if e.h.Canonical {
  12331. v2 := make([]int64, len(v))
  12332. var i int
  12333. for k, _ := range v {
  12334. v2[i] = int64(k)
  12335. i++
  12336. }
  12337. sort.Sort(intSlice(v2))
  12338. for _, k2 := range v2 {
  12339. if esep {
  12340. ee.WriteMapElemKey()
  12341. }
  12342. ee.EncodeInt(int64(int64(k2)))
  12343. if esep {
  12344. ee.WriteMapElemValue()
  12345. }
  12346. ee.EncodeFloat64(v[int64(k2)])
  12347. }
  12348. } else {
  12349. for k2, v2 := range v {
  12350. if esep {
  12351. ee.WriteMapElemKey()
  12352. }
  12353. ee.EncodeInt(int64(k2))
  12354. if esep {
  12355. ee.WriteMapElemValue()
  12356. }
  12357. ee.EncodeFloat64(v2)
  12358. }
  12359. }
  12360. ee.WriteMapEnd()
  12361. }
  12362. func (e *Encoder) fastpathEncMapInt64BoolR(f *codecFnInfo, rv reflect.Value) {
  12363. fastpathTV.EncMapInt64BoolV(rv2i(rv).(map[int64]bool), e)
  12364. }
  12365. func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, e *Encoder) {
  12366. if v == nil {
  12367. e.e.EncodeNil()
  12368. return
  12369. }
  12370. ee, esep := e.e, e.hh.hasElemSeparators()
  12371. ee.WriteMapStart(len(v))
  12372. if e.h.Canonical {
  12373. v2 := make([]int64, len(v))
  12374. var i int
  12375. for k, _ := range v {
  12376. v2[i] = int64(k)
  12377. i++
  12378. }
  12379. sort.Sort(intSlice(v2))
  12380. for _, k2 := range v2 {
  12381. if esep {
  12382. ee.WriteMapElemKey()
  12383. }
  12384. ee.EncodeInt(int64(int64(k2)))
  12385. if esep {
  12386. ee.WriteMapElemValue()
  12387. }
  12388. ee.EncodeBool(v[int64(k2)])
  12389. }
  12390. } else {
  12391. for k2, v2 := range v {
  12392. if esep {
  12393. ee.WriteMapElemKey()
  12394. }
  12395. ee.EncodeInt(int64(k2))
  12396. if esep {
  12397. ee.WriteMapElemValue()
  12398. }
  12399. ee.EncodeBool(v2)
  12400. }
  12401. }
  12402. ee.WriteMapEnd()
  12403. }
  12404. func (e *Encoder) fastpathEncMapBoolIntfR(f *codecFnInfo, rv reflect.Value) {
  12405. fastpathTV.EncMapBoolIntfV(rv2i(rv).(map[bool]interface{}), e)
  12406. }
  12407. func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, e *Encoder) {
  12408. if v == nil {
  12409. e.e.EncodeNil()
  12410. return
  12411. }
  12412. ee, esep := e.e, e.hh.hasElemSeparators()
  12413. ee.WriteMapStart(len(v))
  12414. if e.h.Canonical {
  12415. v2 := make([]bool, len(v))
  12416. var i int
  12417. for k, _ := range v {
  12418. v2[i] = bool(k)
  12419. i++
  12420. }
  12421. sort.Sort(boolSlice(v2))
  12422. for _, k2 := range v2 {
  12423. if esep {
  12424. ee.WriteMapElemKey()
  12425. }
  12426. ee.EncodeBool(bool(k2))
  12427. if esep {
  12428. ee.WriteMapElemValue()
  12429. }
  12430. e.encode(v[bool(k2)])
  12431. }
  12432. } else {
  12433. for k2, v2 := range v {
  12434. if esep {
  12435. ee.WriteMapElemKey()
  12436. }
  12437. ee.EncodeBool(k2)
  12438. if esep {
  12439. ee.WriteMapElemValue()
  12440. }
  12441. e.encode(v2)
  12442. }
  12443. }
  12444. ee.WriteMapEnd()
  12445. }
  12446. func (e *Encoder) fastpathEncMapBoolStringR(f *codecFnInfo, rv reflect.Value) {
  12447. fastpathTV.EncMapBoolStringV(rv2i(rv).(map[bool]string), e)
  12448. }
  12449. func (_ fastpathT) EncMapBoolStringV(v map[bool]string, e *Encoder) {
  12450. if v == nil {
  12451. e.e.EncodeNil()
  12452. return
  12453. }
  12454. ee, esep := e.e, e.hh.hasElemSeparators()
  12455. ee.WriteMapStart(len(v))
  12456. if e.h.Canonical {
  12457. v2 := make([]bool, len(v))
  12458. var i int
  12459. for k, _ := range v {
  12460. v2[i] = bool(k)
  12461. i++
  12462. }
  12463. sort.Sort(boolSlice(v2))
  12464. for _, k2 := range v2 {
  12465. if esep {
  12466. ee.WriteMapElemKey()
  12467. }
  12468. ee.EncodeBool(bool(k2))
  12469. if esep {
  12470. ee.WriteMapElemValue()
  12471. }
  12472. ee.EncodeString(c_UTF8, v[bool(k2)])
  12473. }
  12474. } else {
  12475. for k2, v2 := range v {
  12476. if esep {
  12477. ee.WriteMapElemKey()
  12478. }
  12479. ee.EncodeBool(k2)
  12480. if esep {
  12481. ee.WriteMapElemValue()
  12482. }
  12483. ee.EncodeString(c_UTF8, v2)
  12484. }
  12485. }
  12486. ee.WriteMapEnd()
  12487. }
  12488. func (e *Encoder) fastpathEncMapBoolUintR(f *codecFnInfo, rv reflect.Value) {
  12489. fastpathTV.EncMapBoolUintV(rv2i(rv).(map[bool]uint), e)
  12490. }
  12491. func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, e *Encoder) {
  12492. if v == nil {
  12493. e.e.EncodeNil()
  12494. return
  12495. }
  12496. ee, esep := e.e, e.hh.hasElemSeparators()
  12497. ee.WriteMapStart(len(v))
  12498. if e.h.Canonical {
  12499. v2 := make([]bool, len(v))
  12500. var i int
  12501. for k, _ := range v {
  12502. v2[i] = bool(k)
  12503. i++
  12504. }
  12505. sort.Sort(boolSlice(v2))
  12506. for _, k2 := range v2 {
  12507. if esep {
  12508. ee.WriteMapElemKey()
  12509. }
  12510. ee.EncodeBool(bool(k2))
  12511. if esep {
  12512. ee.WriteMapElemValue()
  12513. }
  12514. ee.EncodeUint(uint64(v[bool(k2)]))
  12515. }
  12516. } else {
  12517. for k2, v2 := range v {
  12518. if esep {
  12519. ee.WriteMapElemKey()
  12520. }
  12521. ee.EncodeBool(k2)
  12522. if esep {
  12523. ee.WriteMapElemValue()
  12524. }
  12525. ee.EncodeUint(uint64(v2))
  12526. }
  12527. }
  12528. ee.WriteMapEnd()
  12529. }
  12530. func (e *Encoder) fastpathEncMapBoolUint8R(f *codecFnInfo, rv reflect.Value) {
  12531. fastpathTV.EncMapBoolUint8V(rv2i(rv).(map[bool]uint8), e)
  12532. }
  12533. func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, e *Encoder) {
  12534. if v == nil {
  12535. e.e.EncodeNil()
  12536. return
  12537. }
  12538. ee, esep := e.e, e.hh.hasElemSeparators()
  12539. ee.WriteMapStart(len(v))
  12540. if e.h.Canonical {
  12541. v2 := make([]bool, len(v))
  12542. var i int
  12543. for k, _ := range v {
  12544. v2[i] = bool(k)
  12545. i++
  12546. }
  12547. sort.Sort(boolSlice(v2))
  12548. for _, k2 := range v2 {
  12549. if esep {
  12550. ee.WriteMapElemKey()
  12551. }
  12552. ee.EncodeBool(bool(k2))
  12553. if esep {
  12554. ee.WriteMapElemValue()
  12555. }
  12556. ee.EncodeUint(uint64(v[bool(k2)]))
  12557. }
  12558. } else {
  12559. for k2, v2 := range v {
  12560. if esep {
  12561. ee.WriteMapElemKey()
  12562. }
  12563. ee.EncodeBool(k2)
  12564. if esep {
  12565. ee.WriteMapElemValue()
  12566. }
  12567. ee.EncodeUint(uint64(v2))
  12568. }
  12569. }
  12570. ee.WriteMapEnd()
  12571. }
  12572. func (e *Encoder) fastpathEncMapBoolUint16R(f *codecFnInfo, rv reflect.Value) {
  12573. fastpathTV.EncMapBoolUint16V(rv2i(rv).(map[bool]uint16), e)
  12574. }
  12575. func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, e *Encoder) {
  12576. if v == nil {
  12577. e.e.EncodeNil()
  12578. return
  12579. }
  12580. ee, esep := e.e, e.hh.hasElemSeparators()
  12581. ee.WriteMapStart(len(v))
  12582. if e.h.Canonical {
  12583. v2 := make([]bool, len(v))
  12584. var i int
  12585. for k, _ := range v {
  12586. v2[i] = bool(k)
  12587. i++
  12588. }
  12589. sort.Sort(boolSlice(v2))
  12590. for _, k2 := range v2 {
  12591. if esep {
  12592. ee.WriteMapElemKey()
  12593. }
  12594. ee.EncodeBool(bool(k2))
  12595. if esep {
  12596. ee.WriteMapElemValue()
  12597. }
  12598. ee.EncodeUint(uint64(v[bool(k2)]))
  12599. }
  12600. } else {
  12601. for k2, v2 := range v {
  12602. if esep {
  12603. ee.WriteMapElemKey()
  12604. }
  12605. ee.EncodeBool(k2)
  12606. if esep {
  12607. ee.WriteMapElemValue()
  12608. }
  12609. ee.EncodeUint(uint64(v2))
  12610. }
  12611. }
  12612. ee.WriteMapEnd()
  12613. }
  12614. func (e *Encoder) fastpathEncMapBoolUint32R(f *codecFnInfo, rv reflect.Value) {
  12615. fastpathTV.EncMapBoolUint32V(rv2i(rv).(map[bool]uint32), e)
  12616. }
  12617. func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, e *Encoder) {
  12618. if v == nil {
  12619. e.e.EncodeNil()
  12620. return
  12621. }
  12622. ee, esep := e.e, e.hh.hasElemSeparators()
  12623. ee.WriteMapStart(len(v))
  12624. if e.h.Canonical {
  12625. v2 := make([]bool, len(v))
  12626. var i int
  12627. for k, _ := range v {
  12628. v2[i] = bool(k)
  12629. i++
  12630. }
  12631. sort.Sort(boolSlice(v2))
  12632. for _, k2 := range v2 {
  12633. if esep {
  12634. ee.WriteMapElemKey()
  12635. }
  12636. ee.EncodeBool(bool(k2))
  12637. if esep {
  12638. ee.WriteMapElemValue()
  12639. }
  12640. ee.EncodeUint(uint64(v[bool(k2)]))
  12641. }
  12642. } else {
  12643. for k2, v2 := range v {
  12644. if esep {
  12645. ee.WriteMapElemKey()
  12646. }
  12647. ee.EncodeBool(k2)
  12648. if esep {
  12649. ee.WriteMapElemValue()
  12650. }
  12651. ee.EncodeUint(uint64(v2))
  12652. }
  12653. }
  12654. ee.WriteMapEnd()
  12655. }
  12656. func (e *Encoder) fastpathEncMapBoolUint64R(f *codecFnInfo, rv reflect.Value) {
  12657. fastpathTV.EncMapBoolUint64V(rv2i(rv).(map[bool]uint64), e)
  12658. }
  12659. func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, e *Encoder) {
  12660. if v == nil {
  12661. e.e.EncodeNil()
  12662. return
  12663. }
  12664. ee, esep := e.e, e.hh.hasElemSeparators()
  12665. ee.WriteMapStart(len(v))
  12666. if e.h.Canonical {
  12667. v2 := make([]bool, len(v))
  12668. var i int
  12669. for k, _ := range v {
  12670. v2[i] = bool(k)
  12671. i++
  12672. }
  12673. sort.Sort(boolSlice(v2))
  12674. for _, k2 := range v2 {
  12675. if esep {
  12676. ee.WriteMapElemKey()
  12677. }
  12678. ee.EncodeBool(bool(k2))
  12679. if esep {
  12680. ee.WriteMapElemValue()
  12681. }
  12682. ee.EncodeUint(uint64(v[bool(k2)]))
  12683. }
  12684. } else {
  12685. for k2, v2 := range v {
  12686. if esep {
  12687. ee.WriteMapElemKey()
  12688. }
  12689. ee.EncodeBool(k2)
  12690. if esep {
  12691. ee.WriteMapElemValue()
  12692. }
  12693. ee.EncodeUint(uint64(v2))
  12694. }
  12695. }
  12696. ee.WriteMapEnd()
  12697. }
  12698. func (e *Encoder) fastpathEncMapBoolUintptrR(f *codecFnInfo, rv reflect.Value) {
  12699. fastpathTV.EncMapBoolUintptrV(rv2i(rv).(map[bool]uintptr), e)
  12700. }
  12701. func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, e *Encoder) {
  12702. if v == nil {
  12703. e.e.EncodeNil()
  12704. return
  12705. }
  12706. ee, esep := e.e, e.hh.hasElemSeparators()
  12707. ee.WriteMapStart(len(v))
  12708. if e.h.Canonical {
  12709. v2 := make([]bool, len(v))
  12710. var i int
  12711. for k, _ := range v {
  12712. v2[i] = bool(k)
  12713. i++
  12714. }
  12715. sort.Sort(boolSlice(v2))
  12716. for _, k2 := range v2 {
  12717. if esep {
  12718. ee.WriteMapElemKey()
  12719. }
  12720. ee.EncodeBool(bool(k2))
  12721. if esep {
  12722. ee.WriteMapElemValue()
  12723. }
  12724. e.encode(v[bool(k2)])
  12725. }
  12726. } else {
  12727. for k2, v2 := range v {
  12728. if esep {
  12729. ee.WriteMapElemKey()
  12730. }
  12731. ee.EncodeBool(k2)
  12732. if esep {
  12733. ee.WriteMapElemValue()
  12734. }
  12735. e.encode(v2)
  12736. }
  12737. }
  12738. ee.WriteMapEnd()
  12739. }
  12740. func (e *Encoder) fastpathEncMapBoolIntR(f *codecFnInfo, rv reflect.Value) {
  12741. fastpathTV.EncMapBoolIntV(rv2i(rv).(map[bool]int), e)
  12742. }
  12743. func (_ fastpathT) EncMapBoolIntV(v map[bool]int, e *Encoder) {
  12744. if v == nil {
  12745. e.e.EncodeNil()
  12746. return
  12747. }
  12748. ee, esep := e.e, e.hh.hasElemSeparators()
  12749. ee.WriteMapStart(len(v))
  12750. if e.h.Canonical {
  12751. v2 := make([]bool, len(v))
  12752. var i int
  12753. for k, _ := range v {
  12754. v2[i] = bool(k)
  12755. i++
  12756. }
  12757. sort.Sort(boolSlice(v2))
  12758. for _, k2 := range v2 {
  12759. if esep {
  12760. ee.WriteMapElemKey()
  12761. }
  12762. ee.EncodeBool(bool(k2))
  12763. if esep {
  12764. ee.WriteMapElemValue()
  12765. }
  12766. ee.EncodeInt(int64(v[bool(k2)]))
  12767. }
  12768. } else {
  12769. for k2, v2 := range v {
  12770. if esep {
  12771. ee.WriteMapElemKey()
  12772. }
  12773. ee.EncodeBool(k2)
  12774. if esep {
  12775. ee.WriteMapElemValue()
  12776. }
  12777. ee.EncodeInt(int64(v2))
  12778. }
  12779. }
  12780. ee.WriteMapEnd()
  12781. }
  12782. func (e *Encoder) fastpathEncMapBoolInt8R(f *codecFnInfo, rv reflect.Value) {
  12783. fastpathTV.EncMapBoolInt8V(rv2i(rv).(map[bool]int8), e)
  12784. }
  12785. func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, e *Encoder) {
  12786. if v == nil {
  12787. e.e.EncodeNil()
  12788. return
  12789. }
  12790. ee, esep := e.e, e.hh.hasElemSeparators()
  12791. ee.WriteMapStart(len(v))
  12792. if e.h.Canonical {
  12793. v2 := make([]bool, len(v))
  12794. var i int
  12795. for k, _ := range v {
  12796. v2[i] = bool(k)
  12797. i++
  12798. }
  12799. sort.Sort(boolSlice(v2))
  12800. for _, k2 := range v2 {
  12801. if esep {
  12802. ee.WriteMapElemKey()
  12803. }
  12804. ee.EncodeBool(bool(k2))
  12805. if esep {
  12806. ee.WriteMapElemValue()
  12807. }
  12808. ee.EncodeInt(int64(v[bool(k2)]))
  12809. }
  12810. } else {
  12811. for k2, v2 := range v {
  12812. if esep {
  12813. ee.WriteMapElemKey()
  12814. }
  12815. ee.EncodeBool(k2)
  12816. if esep {
  12817. ee.WriteMapElemValue()
  12818. }
  12819. ee.EncodeInt(int64(v2))
  12820. }
  12821. }
  12822. ee.WriteMapEnd()
  12823. }
  12824. func (e *Encoder) fastpathEncMapBoolInt16R(f *codecFnInfo, rv reflect.Value) {
  12825. fastpathTV.EncMapBoolInt16V(rv2i(rv).(map[bool]int16), e)
  12826. }
  12827. func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, e *Encoder) {
  12828. if v == nil {
  12829. e.e.EncodeNil()
  12830. return
  12831. }
  12832. ee, esep := e.e, e.hh.hasElemSeparators()
  12833. ee.WriteMapStart(len(v))
  12834. if e.h.Canonical {
  12835. v2 := make([]bool, len(v))
  12836. var i int
  12837. for k, _ := range v {
  12838. v2[i] = bool(k)
  12839. i++
  12840. }
  12841. sort.Sort(boolSlice(v2))
  12842. for _, k2 := range v2 {
  12843. if esep {
  12844. ee.WriteMapElemKey()
  12845. }
  12846. ee.EncodeBool(bool(k2))
  12847. if esep {
  12848. ee.WriteMapElemValue()
  12849. }
  12850. ee.EncodeInt(int64(v[bool(k2)]))
  12851. }
  12852. } else {
  12853. for k2, v2 := range v {
  12854. if esep {
  12855. ee.WriteMapElemKey()
  12856. }
  12857. ee.EncodeBool(k2)
  12858. if esep {
  12859. ee.WriteMapElemValue()
  12860. }
  12861. ee.EncodeInt(int64(v2))
  12862. }
  12863. }
  12864. ee.WriteMapEnd()
  12865. }
  12866. func (e *Encoder) fastpathEncMapBoolInt32R(f *codecFnInfo, rv reflect.Value) {
  12867. fastpathTV.EncMapBoolInt32V(rv2i(rv).(map[bool]int32), e)
  12868. }
  12869. func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, e *Encoder) {
  12870. if v == nil {
  12871. e.e.EncodeNil()
  12872. return
  12873. }
  12874. ee, esep := e.e, e.hh.hasElemSeparators()
  12875. ee.WriteMapStart(len(v))
  12876. if e.h.Canonical {
  12877. v2 := make([]bool, len(v))
  12878. var i int
  12879. for k, _ := range v {
  12880. v2[i] = bool(k)
  12881. i++
  12882. }
  12883. sort.Sort(boolSlice(v2))
  12884. for _, k2 := range v2 {
  12885. if esep {
  12886. ee.WriteMapElemKey()
  12887. }
  12888. ee.EncodeBool(bool(k2))
  12889. if esep {
  12890. ee.WriteMapElemValue()
  12891. }
  12892. ee.EncodeInt(int64(v[bool(k2)]))
  12893. }
  12894. } else {
  12895. for k2, v2 := range v {
  12896. if esep {
  12897. ee.WriteMapElemKey()
  12898. }
  12899. ee.EncodeBool(k2)
  12900. if esep {
  12901. ee.WriteMapElemValue()
  12902. }
  12903. ee.EncodeInt(int64(v2))
  12904. }
  12905. }
  12906. ee.WriteMapEnd()
  12907. }
  12908. func (e *Encoder) fastpathEncMapBoolInt64R(f *codecFnInfo, rv reflect.Value) {
  12909. fastpathTV.EncMapBoolInt64V(rv2i(rv).(map[bool]int64), e)
  12910. }
  12911. func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, e *Encoder) {
  12912. if v == nil {
  12913. e.e.EncodeNil()
  12914. return
  12915. }
  12916. ee, esep := e.e, e.hh.hasElemSeparators()
  12917. ee.WriteMapStart(len(v))
  12918. if e.h.Canonical {
  12919. v2 := make([]bool, len(v))
  12920. var i int
  12921. for k, _ := range v {
  12922. v2[i] = bool(k)
  12923. i++
  12924. }
  12925. sort.Sort(boolSlice(v2))
  12926. for _, k2 := range v2 {
  12927. if esep {
  12928. ee.WriteMapElemKey()
  12929. }
  12930. ee.EncodeBool(bool(k2))
  12931. if esep {
  12932. ee.WriteMapElemValue()
  12933. }
  12934. ee.EncodeInt(int64(v[bool(k2)]))
  12935. }
  12936. } else {
  12937. for k2, v2 := range v {
  12938. if esep {
  12939. ee.WriteMapElemKey()
  12940. }
  12941. ee.EncodeBool(k2)
  12942. if esep {
  12943. ee.WriteMapElemValue()
  12944. }
  12945. ee.EncodeInt(int64(v2))
  12946. }
  12947. }
  12948. ee.WriteMapEnd()
  12949. }
  12950. func (e *Encoder) fastpathEncMapBoolFloat32R(f *codecFnInfo, rv reflect.Value) {
  12951. fastpathTV.EncMapBoolFloat32V(rv2i(rv).(map[bool]float32), e)
  12952. }
  12953. func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, e *Encoder) {
  12954. if v == nil {
  12955. e.e.EncodeNil()
  12956. return
  12957. }
  12958. ee, esep := e.e, e.hh.hasElemSeparators()
  12959. ee.WriteMapStart(len(v))
  12960. if e.h.Canonical {
  12961. v2 := make([]bool, len(v))
  12962. var i int
  12963. for k, _ := range v {
  12964. v2[i] = bool(k)
  12965. i++
  12966. }
  12967. sort.Sort(boolSlice(v2))
  12968. for _, k2 := range v2 {
  12969. if esep {
  12970. ee.WriteMapElemKey()
  12971. }
  12972. ee.EncodeBool(bool(k2))
  12973. if esep {
  12974. ee.WriteMapElemValue()
  12975. }
  12976. ee.EncodeFloat32(v[bool(k2)])
  12977. }
  12978. } else {
  12979. for k2, v2 := range v {
  12980. if esep {
  12981. ee.WriteMapElemKey()
  12982. }
  12983. ee.EncodeBool(k2)
  12984. if esep {
  12985. ee.WriteMapElemValue()
  12986. }
  12987. ee.EncodeFloat32(v2)
  12988. }
  12989. }
  12990. ee.WriteMapEnd()
  12991. }
  12992. func (e *Encoder) fastpathEncMapBoolFloat64R(f *codecFnInfo, rv reflect.Value) {
  12993. fastpathTV.EncMapBoolFloat64V(rv2i(rv).(map[bool]float64), e)
  12994. }
  12995. func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, e *Encoder) {
  12996. if v == nil {
  12997. e.e.EncodeNil()
  12998. return
  12999. }
  13000. ee, esep := e.e, e.hh.hasElemSeparators()
  13001. ee.WriteMapStart(len(v))
  13002. if e.h.Canonical {
  13003. v2 := make([]bool, len(v))
  13004. var i int
  13005. for k, _ := range v {
  13006. v2[i] = bool(k)
  13007. i++
  13008. }
  13009. sort.Sort(boolSlice(v2))
  13010. for _, k2 := range v2 {
  13011. if esep {
  13012. ee.WriteMapElemKey()
  13013. }
  13014. ee.EncodeBool(bool(k2))
  13015. if esep {
  13016. ee.WriteMapElemValue()
  13017. }
  13018. ee.EncodeFloat64(v[bool(k2)])
  13019. }
  13020. } else {
  13021. for k2, v2 := range v {
  13022. if esep {
  13023. ee.WriteMapElemKey()
  13024. }
  13025. ee.EncodeBool(k2)
  13026. if esep {
  13027. ee.WriteMapElemValue()
  13028. }
  13029. ee.EncodeFloat64(v2)
  13030. }
  13031. }
  13032. ee.WriteMapEnd()
  13033. }
  13034. func (e *Encoder) fastpathEncMapBoolBoolR(f *codecFnInfo, rv reflect.Value) {
  13035. fastpathTV.EncMapBoolBoolV(rv2i(rv).(map[bool]bool), e)
  13036. }
  13037. func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, e *Encoder) {
  13038. if v == nil {
  13039. e.e.EncodeNil()
  13040. return
  13041. }
  13042. ee, esep := e.e, e.hh.hasElemSeparators()
  13043. ee.WriteMapStart(len(v))
  13044. if e.h.Canonical {
  13045. v2 := make([]bool, len(v))
  13046. var i int
  13047. for k, _ := range v {
  13048. v2[i] = bool(k)
  13049. i++
  13050. }
  13051. sort.Sort(boolSlice(v2))
  13052. for _, k2 := range v2 {
  13053. if esep {
  13054. ee.WriteMapElemKey()
  13055. }
  13056. ee.EncodeBool(bool(k2))
  13057. if esep {
  13058. ee.WriteMapElemValue()
  13059. }
  13060. ee.EncodeBool(v[bool(k2)])
  13061. }
  13062. } else {
  13063. for k2, v2 := range v {
  13064. if esep {
  13065. ee.WriteMapElemKey()
  13066. }
  13067. ee.EncodeBool(k2)
  13068. if esep {
  13069. ee.WriteMapElemValue()
  13070. }
  13071. ee.EncodeBool(v2)
  13072. }
  13073. }
  13074. ee.WriteMapEnd()
  13075. }
  13076. // -- decode
  13077. // -- -- fast path type switch
  13078. func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool {
  13079. switch v := iv.(type) {
  13080. case []interface{}:
  13081. fastpathTV.DecSliceIntfV(v, false, d)
  13082. case *[]interface{}:
  13083. if v2, changed2 := fastpathTV.DecSliceIntfV(*v, true, d); changed2 {
  13084. *v = v2
  13085. }
  13086. case map[interface{}]interface{}:
  13087. fastpathTV.DecMapIntfIntfV(v, false, d)
  13088. case *map[interface{}]interface{}:
  13089. if v2, changed2 := fastpathTV.DecMapIntfIntfV(*v, true, d); changed2 {
  13090. *v = v2
  13091. }
  13092. case map[interface{}]string:
  13093. fastpathTV.DecMapIntfStringV(v, false, d)
  13094. case *map[interface{}]string:
  13095. if v2, changed2 := fastpathTV.DecMapIntfStringV(*v, true, d); changed2 {
  13096. *v = v2
  13097. }
  13098. case map[interface{}]uint:
  13099. fastpathTV.DecMapIntfUintV(v, false, d)
  13100. case *map[interface{}]uint:
  13101. if v2, changed2 := fastpathTV.DecMapIntfUintV(*v, true, d); changed2 {
  13102. *v = v2
  13103. }
  13104. case map[interface{}]uint8:
  13105. fastpathTV.DecMapIntfUint8V(v, false, d)
  13106. case *map[interface{}]uint8:
  13107. if v2, changed2 := fastpathTV.DecMapIntfUint8V(*v, true, d); changed2 {
  13108. *v = v2
  13109. }
  13110. case map[interface{}]uint16:
  13111. fastpathTV.DecMapIntfUint16V(v, false, d)
  13112. case *map[interface{}]uint16:
  13113. if v2, changed2 := fastpathTV.DecMapIntfUint16V(*v, true, d); changed2 {
  13114. *v = v2
  13115. }
  13116. case map[interface{}]uint32:
  13117. fastpathTV.DecMapIntfUint32V(v, false, d)
  13118. case *map[interface{}]uint32:
  13119. if v2, changed2 := fastpathTV.DecMapIntfUint32V(*v, true, d); changed2 {
  13120. *v = v2
  13121. }
  13122. case map[interface{}]uint64:
  13123. fastpathTV.DecMapIntfUint64V(v, false, d)
  13124. case *map[interface{}]uint64:
  13125. if v2, changed2 := fastpathTV.DecMapIntfUint64V(*v, true, d); changed2 {
  13126. *v = v2
  13127. }
  13128. case map[interface{}]uintptr:
  13129. fastpathTV.DecMapIntfUintptrV(v, false, d)
  13130. case *map[interface{}]uintptr:
  13131. if v2, changed2 := fastpathTV.DecMapIntfUintptrV(*v, true, d); changed2 {
  13132. *v = v2
  13133. }
  13134. case map[interface{}]int:
  13135. fastpathTV.DecMapIntfIntV(v, false, d)
  13136. case *map[interface{}]int:
  13137. if v2, changed2 := fastpathTV.DecMapIntfIntV(*v, true, d); changed2 {
  13138. *v = v2
  13139. }
  13140. case map[interface{}]int8:
  13141. fastpathTV.DecMapIntfInt8V(v, false, d)
  13142. case *map[interface{}]int8:
  13143. if v2, changed2 := fastpathTV.DecMapIntfInt8V(*v, true, d); changed2 {
  13144. *v = v2
  13145. }
  13146. case map[interface{}]int16:
  13147. fastpathTV.DecMapIntfInt16V(v, false, d)
  13148. case *map[interface{}]int16:
  13149. if v2, changed2 := fastpathTV.DecMapIntfInt16V(*v, true, d); changed2 {
  13150. *v = v2
  13151. }
  13152. case map[interface{}]int32:
  13153. fastpathTV.DecMapIntfInt32V(v, false, d)
  13154. case *map[interface{}]int32:
  13155. if v2, changed2 := fastpathTV.DecMapIntfInt32V(*v, true, d); changed2 {
  13156. *v = v2
  13157. }
  13158. case map[interface{}]int64:
  13159. fastpathTV.DecMapIntfInt64V(v, false, d)
  13160. case *map[interface{}]int64:
  13161. if v2, changed2 := fastpathTV.DecMapIntfInt64V(*v, true, d); changed2 {
  13162. *v = v2
  13163. }
  13164. case map[interface{}]float32:
  13165. fastpathTV.DecMapIntfFloat32V(v, false, d)
  13166. case *map[interface{}]float32:
  13167. if v2, changed2 := fastpathTV.DecMapIntfFloat32V(*v, true, d); changed2 {
  13168. *v = v2
  13169. }
  13170. case map[interface{}]float64:
  13171. fastpathTV.DecMapIntfFloat64V(v, false, d)
  13172. case *map[interface{}]float64:
  13173. if v2, changed2 := fastpathTV.DecMapIntfFloat64V(*v, true, d); changed2 {
  13174. *v = v2
  13175. }
  13176. case map[interface{}]bool:
  13177. fastpathTV.DecMapIntfBoolV(v, false, d)
  13178. case *map[interface{}]bool:
  13179. if v2, changed2 := fastpathTV.DecMapIntfBoolV(*v, true, d); changed2 {
  13180. *v = v2
  13181. }
  13182. case []string:
  13183. fastpathTV.DecSliceStringV(v, false, d)
  13184. case *[]string:
  13185. if v2, changed2 := fastpathTV.DecSliceStringV(*v, true, d); changed2 {
  13186. *v = v2
  13187. }
  13188. case map[string]interface{}:
  13189. fastpathTV.DecMapStringIntfV(v, false, d)
  13190. case *map[string]interface{}:
  13191. if v2, changed2 := fastpathTV.DecMapStringIntfV(*v, true, d); changed2 {
  13192. *v = v2
  13193. }
  13194. case map[string]string:
  13195. fastpathTV.DecMapStringStringV(v, false, d)
  13196. case *map[string]string:
  13197. if v2, changed2 := fastpathTV.DecMapStringStringV(*v, true, d); changed2 {
  13198. *v = v2
  13199. }
  13200. case map[string]uint:
  13201. fastpathTV.DecMapStringUintV(v, false, d)
  13202. case *map[string]uint:
  13203. if v2, changed2 := fastpathTV.DecMapStringUintV(*v, true, d); changed2 {
  13204. *v = v2
  13205. }
  13206. case map[string]uint8:
  13207. fastpathTV.DecMapStringUint8V(v, false, d)
  13208. case *map[string]uint8:
  13209. if v2, changed2 := fastpathTV.DecMapStringUint8V(*v, true, d); changed2 {
  13210. *v = v2
  13211. }
  13212. case map[string]uint16:
  13213. fastpathTV.DecMapStringUint16V(v, false, d)
  13214. case *map[string]uint16:
  13215. if v2, changed2 := fastpathTV.DecMapStringUint16V(*v, true, d); changed2 {
  13216. *v = v2
  13217. }
  13218. case map[string]uint32:
  13219. fastpathTV.DecMapStringUint32V(v, false, d)
  13220. case *map[string]uint32:
  13221. if v2, changed2 := fastpathTV.DecMapStringUint32V(*v, true, d); changed2 {
  13222. *v = v2
  13223. }
  13224. case map[string]uint64:
  13225. fastpathTV.DecMapStringUint64V(v, false, d)
  13226. case *map[string]uint64:
  13227. if v2, changed2 := fastpathTV.DecMapStringUint64V(*v, true, d); changed2 {
  13228. *v = v2
  13229. }
  13230. case map[string]uintptr:
  13231. fastpathTV.DecMapStringUintptrV(v, false, d)
  13232. case *map[string]uintptr:
  13233. if v2, changed2 := fastpathTV.DecMapStringUintptrV(*v, true, d); changed2 {
  13234. *v = v2
  13235. }
  13236. case map[string]int:
  13237. fastpathTV.DecMapStringIntV(v, false, d)
  13238. case *map[string]int:
  13239. if v2, changed2 := fastpathTV.DecMapStringIntV(*v, true, d); changed2 {
  13240. *v = v2
  13241. }
  13242. case map[string]int8:
  13243. fastpathTV.DecMapStringInt8V(v, false, d)
  13244. case *map[string]int8:
  13245. if v2, changed2 := fastpathTV.DecMapStringInt8V(*v, true, d); changed2 {
  13246. *v = v2
  13247. }
  13248. case map[string]int16:
  13249. fastpathTV.DecMapStringInt16V(v, false, d)
  13250. case *map[string]int16:
  13251. if v2, changed2 := fastpathTV.DecMapStringInt16V(*v, true, d); changed2 {
  13252. *v = v2
  13253. }
  13254. case map[string]int32:
  13255. fastpathTV.DecMapStringInt32V(v, false, d)
  13256. case *map[string]int32:
  13257. if v2, changed2 := fastpathTV.DecMapStringInt32V(*v, true, d); changed2 {
  13258. *v = v2
  13259. }
  13260. case map[string]int64:
  13261. fastpathTV.DecMapStringInt64V(v, false, d)
  13262. case *map[string]int64:
  13263. if v2, changed2 := fastpathTV.DecMapStringInt64V(*v, true, d); changed2 {
  13264. *v = v2
  13265. }
  13266. case map[string]float32:
  13267. fastpathTV.DecMapStringFloat32V(v, false, d)
  13268. case *map[string]float32:
  13269. if v2, changed2 := fastpathTV.DecMapStringFloat32V(*v, true, d); changed2 {
  13270. *v = v2
  13271. }
  13272. case map[string]float64:
  13273. fastpathTV.DecMapStringFloat64V(v, false, d)
  13274. case *map[string]float64:
  13275. if v2, changed2 := fastpathTV.DecMapStringFloat64V(*v, true, d); changed2 {
  13276. *v = v2
  13277. }
  13278. case map[string]bool:
  13279. fastpathTV.DecMapStringBoolV(v, false, d)
  13280. case *map[string]bool:
  13281. if v2, changed2 := fastpathTV.DecMapStringBoolV(*v, true, d); changed2 {
  13282. *v = v2
  13283. }
  13284. case []float32:
  13285. fastpathTV.DecSliceFloat32V(v, false, d)
  13286. case *[]float32:
  13287. if v2, changed2 := fastpathTV.DecSliceFloat32V(*v, true, d); changed2 {
  13288. *v = v2
  13289. }
  13290. case map[float32]interface{}:
  13291. fastpathTV.DecMapFloat32IntfV(v, false, d)
  13292. case *map[float32]interface{}:
  13293. if v2, changed2 := fastpathTV.DecMapFloat32IntfV(*v, true, d); changed2 {
  13294. *v = v2
  13295. }
  13296. case map[float32]string:
  13297. fastpathTV.DecMapFloat32StringV(v, false, d)
  13298. case *map[float32]string:
  13299. if v2, changed2 := fastpathTV.DecMapFloat32StringV(*v, true, d); changed2 {
  13300. *v = v2
  13301. }
  13302. case map[float32]uint:
  13303. fastpathTV.DecMapFloat32UintV(v, false, d)
  13304. case *map[float32]uint:
  13305. if v2, changed2 := fastpathTV.DecMapFloat32UintV(*v, true, d); changed2 {
  13306. *v = v2
  13307. }
  13308. case map[float32]uint8:
  13309. fastpathTV.DecMapFloat32Uint8V(v, false, d)
  13310. case *map[float32]uint8:
  13311. if v2, changed2 := fastpathTV.DecMapFloat32Uint8V(*v, true, d); changed2 {
  13312. *v = v2
  13313. }
  13314. case map[float32]uint16:
  13315. fastpathTV.DecMapFloat32Uint16V(v, false, d)
  13316. case *map[float32]uint16:
  13317. if v2, changed2 := fastpathTV.DecMapFloat32Uint16V(*v, true, d); changed2 {
  13318. *v = v2
  13319. }
  13320. case map[float32]uint32:
  13321. fastpathTV.DecMapFloat32Uint32V(v, false, d)
  13322. case *map[float32]uint32:
  13323. if v2, changed2 := fastpathTV.DecMapFloat32Uint32V(*v, true, d); changed2 {
  13324. *v = v2
  13325. }
  13326. case map[float32]uint64:
  13327. fastpathTV.DecMapFloat32Uint64V(v, false, d)
  13328. case *map[float32]uint64:
  13329. if v2, changed2 := fastpathTV.DecMapFloat32Uint64V(*v, true, d); changed2 {
  13330. *v = v2
  13331. }
  13332. case map[float32]uintptr:
  13333. fastpathTV.DecMapFloat32UintptrV(v, false, d)
  13334. case *map[float32]uintptr:
  13335. if v2, changed2 := fastpathTV.DecMapFloat32UintptrV(*v, true, d); changed2 {
  13336. *v = v2
  13337. }
  13338. case map[float32]int:
  13339. fastpathTV.DecMapFloat32IntV(v, false, d)
  13340. case *map[float32]int:
  13341. if v2, changed2 := fastpathTV.DecMapFloat32IntV(*v, true, d); changed2 {
  13342. *v = v2
  13343. }
  13344. case map[float32]int8:
  13345. fastpathTV.DecMapFloat32Int8V(v, false, d)
  13346. case *map[float32]int8:
  13347. if v2, changed2 := fastpathTV.DecMapFloat32Int8V(*v, true, d); changed2 {
  13348. *v = v2
  13349. }
  13350. case map[float32]int16:
  13351. fastpathTV.DecMapFloat32Int16V(v, false, d)
  13352. case *map[float32]int16:
  13353. if v2, changed2 := fastpathTV.DecMapFloat32Int16V(*v, true, d); changed2 {
  13354. *v = v2
  13355. }
  13356. case map[float32]int32:
  13357. fastpathTV.DecMapFloat32Int32V(v, false, d)
  13358. case *map[float32]int32:
  13359. if v2, changed2 := fastpathTV.DecMapFloat32Int32V(*v, true, d); changed2 {
  13360. *v = v2
  13361. }
  13362. case map[float32]int64:
  13363. fastpathTV.DecMapFloat32Int64V(v, false, d)
  13364. case *map[float32]int64:
  13365. if v2, changed2 := fastpathTV.DecMapFloat32Int64V(*v, true, d); changed2 {
  13366. *v = v2
  13367. }
  13368. case map[float32]float32:
  13369. fastpathTV.DecMapFloat32Float32V(v, false, d)
  13370. case *map[float32]float32:
  13371. if v2, changed2 := fastpathTV.DecMapFloat32Float32V(*v, true, d); changed2 {
  13372. *v = v2
  13373. }
  13374. case map[float32]float64:
  13375. fastpathTV.DecMapFloat32Float64V(v, false, d)
  13376. case *map[float32]float64:
  13377. if v2, changed2 := fastpathTV.DecMapFloat32Float64V(*v, true, d); changed2 {
  13378. *v = v2
  13379. }
  13380. case map[float32]bool:
  13381. fastpathTV.DecMapFloat32BoolV(v, false, d)
  13382. case *map[float32]bool:
  13383. if v2, changed2 := fastpathTV.DecMapFloat32BoolV(*v, true, d); changed2 {
  13384. *v = v2
  13385. }
  13386. case []float64:
  13387. fastpathTV.DecSliceFloat64V(v, false, d)
  13388. case *[]float64:
  13389. if v2, changed2 := fastpathTV.DecSliceFloat64V(*v, true, d); changed2 {
  13390. *v = v2
  13391. }
  13392. case map[float64]interface{}:
  13393. fastpathTV.DecMapFloat64IntfV(v, false, d)
  13394. case *map[float64]interface{}:
  13395. if v2, changed2 := fastpathTV.DecMapFloat64IntfV(*v, true, d); changed2 {
  13396. *v = v2
  13397. }
  13398. case map[float64]string:
  13399. fastpathTV.DecMapFloat64StringV(v, false, d)
  13400. case *map[float64]string:
  13401. if v2, changed2 := fastpathTV.DecMapFloat64StringV(*v, true, d); changed2 {
  13402. *v = v2
  13403. }
  13404. case map[float64]uint:
  13405. fastpathTV.DecMapFloat64UintV(v, false, d)
  13406. case *map[float64]uint:
  13407. if v2, changed2 := fastpathTV.DecMapFloat64UintV(*v, true, d); changed2 {
  13408. *v = v2
  13409. }
  13410. case map[float64]uint8:
  13411. fastpathTV.DecMapFloat64Uint8V(v, false, d)
  13412. case *map[float64]uint8:
  13413. if v2, changed2 := fastpathTV.DecMapFloat64Uint8V(*v, true, d); changed2 {
  13414. *v = v2
  13415. }
  13416. case map[float64]uint16:
  13417. fastpathTV.DecMapFloat64Uint16V(v, false, d)
  13418. case *map[float64]uint16:
  13419. if v2, changed2 := fastpathTV.DecMapFloat64Uint16V(*v, true, d); changed2 {
  13420. *v = v2
  13421. }
  13422. case map[float64]uint32:
  13423. fastpathTV.DecMapFloat64Uint32V(v, false, d)
  13424. case *map[float64]uint32:
  13425. if v2, changed2 := fastpathTV.DecMapFloat64Uint32V(*v, true, d); changed2 {
  13426. *v = v2
  13427. }
  13428. case map[float64]uint64:
  13429. fastpathTV.DecMapFloat64Uint64V(v, false, d)
  13430. case *map[float64]uint64:
  13431. if v2, changed2 := fastpathTV.DecMapFloat64Uint64V(*v, true, d); changed2 {
  13432. *v = v2
  13433. }
  13434. case map[float64]uintptr:
  13435. fastpathTV.DecMapFloat64UintptrV(v, false, d)
  13436. case *map[float64]uintptr:
  13437. if v2, changed2 := fastpathTV.DecMapFloat64UintptrV(*v, true, d); changed2 {
  13438. *v = v2
  13439. }
  13440. case map[float64]int:
  13441. fastpathTV.DecMapFloat64IntV(v, false, d)
  13442. case *map[float64]int:
  13443. if v2, changed2 := fastpathTV.DecMapFloat64IntV(*v, true, d); changed2 {
  13444. *v = v2
  13445. }
  13446. case map[float64]int8:
  13447. fastpathTV.DecMapFloat64Int8V(v, false, d)
  13448. case *map[float64]int8:
  13449. if v2, changed2 := fastpathTV.DecMapFloat64Int8V(*v, true, d); changed2 {
  13450. *v = v2
  13451. }
  13452. case map[float64]int16:
  13453. fastpathTV.DecMapFloat64Int16V(v, false, d)
  13454. case *map[float64]int16:
  13455. if v2, changed2 := fastpathTV.DecMapFloat64Int16V(*v, true, d); changed2 {
  13456. *v = v2
  13457. }
  13458. case map[float64]int32:
  13459. fastpathTV.DecMapFloat64Int32V(v, false, d)
  13460. case *map[float64]int32:
  13461. if v2, changed2 := fastpathTV.DecMapFloat64Int32V(*v, true, d); changed2 {
  13462. *v = v2
  13463. }
  13464. case map[float64]int64:
  13465. fastpathTV.DecMapFloat64Int64V(v, false, d)
  13466. case *map[float64]int64:
  13467. if v2, changed2 := fastpathTV.DecMapFloat64Int64V(*v, true, d); changed2 {
  13468. *v = v2
  13469. }
  13470. case map[float64]float32:
  13471. fastpathTV.DecMapFloat64Float32V(v, false, d)
  13472. case *map[float64]float32:
  13473. if v2, changed2 := fastpathTV.DecMapFloat64Float32V(*v, true, d); changed2 {
  13474. *v = v2
  13475. }
  13476. case map[float64]float64:
  13477. fastpathTV.DecMapFloat64Float64V(v, false, d)
  13478. case *map[float64]float64:
  13479. if v2, changed2 := fastpathTV.DecMapFloat64Float64V(*v, true, d); changed2 {
  13480. *v = v2
  13481. }
  13482. case map[float64]bool:
  13483. fastpathTV.DecMapFloat64BoolV(v, false, d)
  13484. case *map[float64]bool:
  13485. if v2, changed2 := fastpathTV.DecMapFloat64BoolV(*v, true, d); changed2 {
  13486. *v = v2
  13487. }
  13488. case []uint:
  13489. fastpathTV.DecSliceUintV(v, false, d)
  13490. case *[]uint:
  13491. if v2, changed2 := fastpathTV.DecSliceUintV(*v, true, d); changed2 {
  13492. *v = v2
  13493. }
  13494. case map[uint]interface{}:
  13495. fastpathTV.DecMapUintIntfV(v, false, d)
  13496. case *map[uint]interface{}:
  13497. if v2, changed2 := fastpathTV.DecMapUintIntfV(*v, true, d); changed2 {
  13498. *v = v2
  13499. }
  13500. case map[uint]string:
  13501. fastpathTV.DecMapUintStringV(v, false, d)
  13502. case *map[uint]string:
  13503. if v2, changed2 := fastpathTV.DecMapUintStringV(*v, true, d); changed2 {
  13504. *v = v2
  13505. }
  13506. case map[uint]uint:
  13507. fastpathTV.DecMapUintUintV(v, false, d)
  13508. case *map[uint]uint:
  13509. if v2, changed2 := fastpathTV.DecMapUintUintV(*v, true, d); changed2 {
  13510. *v = v2
  13511. }
  13512. case map[uint]uint8:
  13513. fastpathTV.DecMapUintUint8V(v, false, d)
  13514. case *map[uint]uint8:
  13515. if v2, changed2 := fastpathTV.DecMapUintUint8V(*v, true, d); changed2 {
  13516. *v = v2
  13517. }
  13518. case map[uint]uint16:
  13519. fastpathTV.DecMapUintUint16V(v, false, d)
  13520. case *map[uint]uint16:
  13521. if v2, changed2 := fastpathTV.DecMapUintUint16V(*v, true, d); changed2 {
  13522. *v = v2
  13523. }
  13524. case map[uint]uint32:
  13525. fastpathTV.DecMapUintUint32V(v, false, d)
  13526. case *map[uint]uint32:
  13527. if v2, changed2 := fastpathTV.DecMapUintUint32V(*v, true, d); changed2 {
  13528. *v = v2
  13529. }
  13530. case map[uint]uint64:
  13531. fastpathTV.DecMapUintUint64V(v, false, d)
  13532. case *map[uint]uint64:
  13533. if v2, changed2 := fastpathTV.DecMapUintUint64V(*v, true, d); changed2 {
  13534. *v = v2
  13535. }
  13536. case map[uint]uintptr:
  13537. fastpathTV.DecMapUintUintptrV(v, false, d)
  13538. case *map[uint]uintptr:
  13539. if v2, changed2 := fastpathTV.DecMapUintUintptrV(*v, true, d); changed2 {
  13540. *v = v2
  13541. }
  13542. case map[uint]int:
  13543. fastpathTV.DecMapUintIntV(v, false, d)
  13544. case *map[uint]int:
  13545. if v2, changed2 := fastpathTV.DecMapUintIntV(*v, true, d); changed2 {
  13546. *v = v2
  13547. }
  13548. case map[uint]int8:
  13549. fastpathTV.DecMapUintInt8V(v, false, d)
  13550. case *map[uint]int8:
  13551. if v2, changed2 := fastpathTV.DecMapUintInt8V(*v, true, d); changed2 {
  13552. *v = v2
  13553. }
  13554. case map[uint]int16:
  13555. fastpathTV.DecMapUintInt16V(v, false, d)
  13556. case *map[uint]int16:
  13557. if v2, changed2 := fastpathTV.DecMapUintInt16V(*v, true, d); changed2 {
  13558. *v = v2
  13559. }
  13560. case map[uint]int32:
  13561. fastpathTV.DecMapUintInt32V(v, false, d)
  13562. case *map[uint]int32:
  13563. if v2, changed2 := fastpathTV.DecMapUintInt32V(*v, true, d); changed2 {
  13564. *v = v2
  13565. }
  13566. case map[uint]int64:
  13567. fastpathTV.DecMapUintInt64V(v, false, d)
  13568. case *map[uint]int64:
  13569. if v2, changed2 := fastpathTV.DecMapUintInt64V(*v, true, d); changed2 {
  13570. *v = v2
  13571. }
  13572. case map[uint]float32:
  13573. fastpathTV.DecMapUintFloat32V(v, false, d)
  13574. case *map[uint]float32:
  13575. if v2, changed2 := fastpathTV.DecMapUintFloat32V(*v, true, d); changed2 {
  13576. *v = v2
  13577. }
  13578. case map[uint]float64:
  13579. fastpathTV.DecMapUintFloat64V(v, false, d)
  13580. case *map[uint]float64:
  13581. if v2, changed2 := fastpathTV.DecMapUintFloat64V(*v, true, d); changed2 {
  13582. *v = v2
  13583. }
  13584. case map[uint]bool:
  13585. fastpathTV.DecMapUintBoolV(v, false, d)
  13586. case *map[uint]bool:
  13587. if v2, changed2 := fastpathTV.DecMapUintBoolV(*v, true, d); changed2 {
  13588. *v = v2
  13589. }
  13590. case map[uint8]interface{}:
  13591. fastpathTV.DecMapUint8IntfV(v, false, d)
  13592. case *map[uint8]interface{}:
  13593. if v2, changed2 := fastpathTV.DecMapUint8IntfV(*v, true, d); changed2 {
  13594. *v = v2
  13595. }
  13596. case map[uint8]string:
  13597. fastpathTV.DecMapUint8StringV(v, false, d)
  13598. case *map[uint8]string:
  13599. if v2, changed2 := fastpathTV.DecMapUint8StringV(*v, true, d); changed2 {
  13600. *v = v2
  13601. }
  13602. case map[uint8]uint:
  13603. fastpathTV.DecMapUint8UintV(v, false, d)
  13604. case *map[uint8]uint:
  13605. if v2, changed2 := fastpathTV.DecMapUint8UintV(*v, true, d); changed2 {
  13606. *v = v2
  13607. }
  13608. case map[uint8]uint8:
  13609. fastpathTV.DecMapUint8Uint8V(v, false, d)
  13610. case *map[uint8]uint8:
  13611. if v2, changed2 := fastpathTV.DecMapUint8Uint8V(*v, true, d); changed2 {
  13612. *v = v2
  13613. }
  13614. case map[uint8]uint16:
  13615. fastpathTV.DecMapUint8Uint16V(v, false, d)
  13616. case *map[uint8]uint16:
  13617. if v2, changed2 := fastpathTV.DecMapUint8Uint16V(*v, true, d); changed2 {
  13618. *v = v2
  13619. }
  13620. case map[uint8]uint32:
  13621. fastpathTV.DecMapUint8Uint32V(v, false, d)
  13622. case *map[uint8]uint32:
  13623. if v2, changed2 := fastpathTV.DecMapUint8Uint32V(*v, true, d); changed2 {
  13624. *v = v2
  13625. }
  13626. case map[uint8]uint64:
  13627. fastpathTV.DecMapUint8Uint64V(v, false, d)
  13628. case *map[uint8]uint64:
  13629. if v2, changed2 := fastpathTV.DecMapUint8Uint64V(*v, true, d); changed2 {
  13630. *v = v2
  13631. }
  13632. case map[uint8]uintptr:
  13633. fastpathTV.DecMapUint8UintptrV(v, false, d)
  13634. case *map[uint8]uintptr:
  13635. if v2, changed2 := fastpathTV.DecMapUint8UintptrV(*v, true, d); changed2 {
  13636. *v = v2
  13637. }
  13638. case map[uint8]int:
  13639. fastpathTV.DecMapUint8IntV(v, false, d)
  13640. case *map[uint8]int:
  13641. if v2, changed2 := fastpathTV.DecMapUint8IntV(*v, true, d); changed2 {
  13642. *v = v2
  13643. }
  13644. case map[uint8]int8:
  13645. fastpathTV.DecMapUint8Int8V(v, false, d)
  13646. case *map[uint8]int8:
  13647. if v2, changed2 := fastpathTV.DecMapUint8Int8V(*v, true, d); changed2 {
  13648. *v = v2
  13649. }
  13650. case map[uint8]int16:
  13651. fastpathTV.DecMapUint8Int16V(v, false, d)
  13652. case *map[uint8]int16:
  13653. if v2, changed2 := fastpathTV.DecMapUint8Int16V(*v, true, d); changed2 {
  13654. *v = v2
  13655. }
  13656. case map[uint8]int32:
  13657. fastpathTV.DecMapUint8Int32V(v, false, d)
  13658. case *map[uint8]int32:
  13659. if v2, changed2 := fastpathTV.DecMapUint8Int32V(*v, true, d); changed2 {
  13660. *v = v2
  13661. }
  13662. case map[uint8]int64:
  13663. fastpathTV.DecMapUint8Int64V(v, false, d)
  13664. case *map[uint8]int64:
  13665. if v2, changed2 := fastpathTV.DecMapUint8Int64V(*v, true, d); changed2 {
  13666. *v = v2
  13667. }
  13668. case map[uint8]float32:
  13669. fastpathTV.DecMapUint8Float32V(v, false, d)
  13670. case *map[uint8]float32:
  13671. if v2, changed2 := fastpathTV.DecMapUint8Float32V(*v, true, d); changed2 {
  13672. *v = v2
  13673. }
  13674. case map[uint8]float64:
  13675. fastpathTV.DecMapUint8Float64V(v, false, d)
  13676. case *map[uint8]float64:
  13677. if v2, changed2 := fastpathTV.DecMapUint8Float64V(*v, true, d); changed2 {
  13678. *v = v2
  13679. }
  13680. case map[uint8]bool:
  13681. fastpathTV.DecMapUint8BoolV(v, false, d)
  13682. case *map[uint8]bool:
  13683. if v2, changed2 := fastpathTV.DecMapUint8BoolV(*v, true, d); changed2 {
  13684. *v = v2
  13685. }
  13686. case []uint16:
  13687. fastpathTV.DecSliceUint16V(v, false, d)
  13688. case *[]uint16:
  13689. if v2, changed2 := fastpathTV.DecSliceUint16V(*v, true, d); changed2 {
  13690. *v = v2
  13691. }
  13692. case map[uint16]interface{}:
  13693. fastpathTV.DecMapUint16IntfV(v, false, d)
  13694. case *map[uint16]interface{}:
  13695. if v2, changed2 := fastpathTV.DecMapUint16IntfV(*v, true, d); changed2 {
  13696. *v = v2
  13697. }
  13698. case map[uint16]string:
  13699. fastpathTV.DecMapUint16StringV(v, false, d)
  13700. case *map[uint16]string:
  13701. if v2, changed2 := fastpathTV.DecMapUint16StringV(*v, true, d); changed2 {
  13702. *v = v2
  13703. }
  13704. case map[uint16]uint:
  13705. fastpathTV.DecMapUint16UintV(v, false, d)
  13706. case *map[uint16]uint:
  13707. if v2, changed2 := fastpathTV.DecMapUint16UintV(*v, true, d); changed2 {
  13708. *v = v2
  13709. }
  13710. case map[uint16]uint8:
  13711. fastpathTV.DecMapUint16Uint8V(v, false, d)
  13712. case *map[uint16]uint8:
  13713. if v2, changed2 := fastpathTV.DecMapUint16Uint8V(*v, true, d); changed2 {
  13714. *v = v2
  13715. }
  13716. case map[uint16]uint16:
  13717. fastpathTV.DecMapUint16Uint16V(v, false, d)
  13718. case *map[uint16]uint16:
  13719. if v2, changed2 := fastpathTV.DecMapUint16Uint16V(*v, true, d); changed2 {
  13720. *v = v2
  13721. }
  13722. case map[uint16]uint32:
  13723. fastpathTV.DecMapUint16Uint32V(v, false, d)
  13724. case *map[uint16]uint32:
  13725. if v2, changed2 := fastpathTV.DecMapUint16Uint32V(*v, true, d); changed2 {
  13726. *v = v2
  13727. }
  13728. case map[uint16]uint64:
  13729. fastpathTV.DecMapUint16Uint64V(v, false, d)
  13730. case *map[uint16]uint64:
  13731. if v2, changed2 := fastpathTV.DecMapUint16Uint64V(*v, true, d); changed2 {
  13732. *v = v2
  13733. }
  13734. case map[uint16]uintptr:
  13735. fastpathTV.DecMapUint16UintptrV(v, false, d)
  13736. case *map[uint16]uintptr:
  13737. if v2, changed2 := fastpathTV.DecMapUint16UintptrV(*v, true, d); changed2 {
  13738. *v = v2
  13739. }
  13740. case map[uint16]int:
  13741. fastpathTV.DecMapUint16IntV(v, false, d)
  13742. case *map[uint16]int:
  13743. if v2, changed2 := fastpathTV.DecMapUint16IntV(*v, true, d); changed2 {
  13744. *v = v2
  13745. }
  13746. case map[uint16]int8:
  13747. fastpathTV.DecMapUint16Int8V(v, false, d)
  13748. case *map[uint16]int8:
  13749. if v2, changed2 := fastpathTV.DecMapUint16Int8V(*v, true, d); changed2 {
  13750. *v = v2
  13751. }
  13752. case map[uint16]int16:
  13753. fastpathTV.DecMapUint16Int16V(v, false, d)
  13754. case *map[uint16]int16:
  13755. if v2, changed2 := fastpathTV.DecMapUint16Int16V(*v, true, d); changed2 {
  13756. *v = v2
  13757. }
  13758. case map[uint16]int32:
  13759. fastpathTV.DecMapUint16Int32V(v, false, d)
  13760. case *map[uint16]int32:
  13761. if v2, changed2 := fastpathTV.DecMapUint16Int32V(*v, true, d); changed2 {
  13762. *v = v2
  13763. }
  13764. case map[uint16]int64:
  13765. fastpathTV.DecMapUint16Int64V(v, false, d)
  13766. case *map[uint16]int64:
  13767. if v2, changed2 := fastpathTV.DecMapUint16Int64V(*v, true, d); changed2 {
  13768. *v = v2
  13769. }
  13770. case map[uint16]float32:
  13771. fastpathTV.DecMapUint16Float32V(v, false, d)
  13772. case *map[uint16]float32:
  13773. if v2, changed2 := fastpathTV.DecMapUint16Float32V(*v, true, d); changed2 {
  13774. *v = v2
  13775. }
  13776. case map[uint16]float64:
  13777. fastpathTV.DecMapUint16Float64V(v, false, d)
  13778. case *map[uint16]float64:
  13779. if v2, changed2 := fastpathTV.DecMapUint16Float64V(*v, true, d); changed2 {
  13780. *v = v2
  13781. }
  13782. case map[uint16]bool:
  13783. fastpathTV.DecMapUint16BoolV(v, false, d)
  13784. case *map[uint16]bool:
  13785. if v2, changed2 := fastpathTV.DecMapUint16BoolV(*v, true, d); changed2 {
  13786. *v = v2
  13787. }
  13788. case []uint32:
  13789. fastpathTV.DecSliceUint32V(v, false, d)
  13790. case *[]uint32:
  13791. if v2, changed2 := fastpathTV.DecSliceUint32V(*v, true, d); changed2 {
  13792. *v = v2
  13793. }
  13794. case map[uint32]interface{}:
  13795. fastpathTV.DecMapUint32IntfV(v, false, d)
  13796. case *map[uint32]interface{}:
  13797. if v2, changed2 := fastpathTV.DecMapUint32IntfV(*v, true, d); changed2 {
  13798. *v = v2
  13799. }
  13800. case map[uint32]string:
  13801. fastpathTV.DecMapUint32StringV(v, false, d)
  13802. case *map[uint32]string:
  13803. if v2, changed2 := fastpathTV.DecMapUint32StringV(*v, true, d); changed2 {
  13804. *v = v2
  13805. }
  13806. case map[uint32]uint:
  13807. fastpathTV.DecMapUint32UintV(v, false, d)
  13808. case *map[uint32]uint:
  13809. if v2, changed2 := fastpathTV.DecMapUint32UintV(*v, true, d); changed2 {
  13810. *v = v2
  13811. }
  13812. case map[uint32]uint8:
  13813. fastpathTV.DecMapUint32Uint8V(v, false, d)
  13814. case *map[uint32]uint8:
  13815. if v2, changed2 := fastpathTV.DecMapUint32Uint8V(*v, true, d); changed2 {
  13816. *v = v2
  13817. }
  13818. case map[uint32]uint16:
  13819. fastpathTV.DecMapUint32Uint16V(v, false, d)
  13820. case *map[uint32]uint16:
  13821. if v2, changed2 := fastpathTV.DecMapUint32Uint16V(*v, true, d); changed2 {
  13822. *v = v2
  13823. }
  13824. case map[uint32]uint32:
  13825. fastpathTV.DecMapUint32Uint32V(v, false, d)
  13826. case *map[uint32]uint32:
  13827. if v2, changed2 := fastpathTV.DecMapUint32Uint32V(*v, true, d); changed2 {
  13828. *v = v2
  13829. }
  13830. case map[uint32]uint64:
  13831. fastpathTV.DecMapUint32Uint64V(v, false, d)
  13832. case *map[uint32]uint64:
  13833. if v2, changed2 := fastpathTV.DecMapUint32Uint64V(*v, true, d); changed2 {
  13834. *v = v2
  13835. }
  13836. case map[uint32]uintptr:
  13837. fastpathTV.DecMapUint32UintptrV(v, false, d)
  13838. case *map[uint32]uintptr:
  13839. if v2, changed2 := fastpathTV.DecMapUint32UintptrV(*v, true, d); changed2 {
  13840. *v = v2
  13841. }
  13842. case map[uint32]int:
  13843. fastpathTV.DecMapUint32IntV(v, false, d)
  13844. case *map[uint32]int:
  13845. if v2, changed2 := fastpathTV.DecMapUint32IntV(*v, true, d); changed2 {
  13846. *v = v2
  13847. }
  13848. case map[uint32]int8:
  13849. fastpathTV.DecMapUint32Int8V(v, false, d)
  13850. case *map[uint32]int8:
  13851. if v2, changed2 := fastpathTV.DecMapUint32Int8V(*v, true, d); changed2 {
  13852. *v = v2
  13853. }
  13854. case map[uint32]int16:
  13855. fastpathTV.DecMapUint32Int16V(v, false, d)
  13856. case *map[uint32]int16:
  13857. if v2, changed2 := fastpathTV.DecMapUint32Int16V(*v, true, d); changed2 {
  13858. *v = v2
  13859. }
  13860. case map[uint32]int32:
  13861. fastpathTV.DecMapUint32Int32V(v, false, d)
  13862. case *map[uint32]int32:
  13863. if v2, changed2 := fastpathTV.DecMapUint32Int32V(*v, true, d); changed2 {
  13864. *v = v2
  13865. }
  13866. case map[uint32]int64:
  13867. fastpathTV.DecMapUint32Int64V(v, false, d)
  13868. case *map[uint32]int64:
  13869. if v2, changed2 := fastpathTV.DecMapUint32Int64V(*v, true, d); changed2 {
  13870. *v = v2
  13871. }
  13872. case map[uint32]float32:
  13873. fastpathTV.DecMapUint32Float32V(v, false, d)
  13874. case *map[uint32]float32:
  13875. if v2, changed2 := fastpathTV.DecMapUint32Float32V(*v, true, d); changed2 {
  13876. *v = v2
  13877. }
  13878. case map[uint32]float64:
  13879. fastpathTV.DecMapUint32Float64V(v, false, d)
  13880. case *map[uint32]float64:
  13881. if v2, changed2 := fastpathTV.DecMapUint32Float64V(*v, true, d); changed2 {
  13882. *v = v2
  13883. }
  13884. case map[uint32]bool:
  13885. fastpathTV.DecMapUint32BoolV(v, false, d)
  13886. case *map[uint32]bool:
  13887. if v2, changed2 := fastpathTV.DecMapUint32BoolV(*v, true, d); changed2 {
  13888. *v = v2
  13889. }
  13890. case []uint64:
  13891. fastpathTV.DecSliceUint64V(v, false, d)
  13892. case *[]uint64:
  13893. if v2, changed2 := fastpathTV.DecSliceUint64V(*v, true, d); changed2 {
  13894. *v = v2
  13895. }
  13896. case map[uint64]interface{}:
  13897. fastpathTV.DecMapUint64IntfV(v, false, d)
  13898. case *map[uint64]interface{}:
  13899. if v2, changed2 := fastpathTV.DecMapUint64IntfV(*v, true, d); changed2 {
  13900. *v = v2
  13901. }
  13902. case map[uint64]string:
  13903. fastpathTV.DecMapUint64StringV(v, false, d)
  13904. case *map[uint64]string:
  13905. if v2, changed2 := fastpathTV.DecMapUint64StringV(*v, true, d); changed2 {
  13906. *v = v2
  13907. }
  13908. case map[uint64]uint:
  13909. fastpathTV.DecMapUint64UintV(v, false, d)
  13910. case *map[uint64]uint:
  13911. if v2, changed2 := fastpathTV.DecMapUint64UintV(*v, true, d); changed2 {
  13912. *v = v2
  13913. }
  13914. case map[uint64]uint8:
  13915. fastpathTV.DecMapUint64Uint8V(v, false, d)
  13916. case *map[uint64]uint8:
  13917. if v2, changed2 := fastpathTV.DecMapUint64Uint8V(*v, true, d); changed2 {
  13918. *v = v2
  13919. }
  13920. case map[uint64]uint16:
  13921. fastpathTV.DecMapUint64Uint16V(v, false, d)
  13922. case *map[uint64]uint16:
  13923. if v2, changed2 := fastpathTV.DecMapUint64Uint16V(*v, true, d); changed2 {
  13924. *v = v2
  13925. }
  13926. case map[uint64]uint32:
  13927. fastpathTV.DecMapUint64Uint32V(v, false, d)
  13928. case *map[uint64]uint32:
  13929. if v2, changed2 := fastpathTV.DecMapUint64Uint32V(*v, true, d); changed2 {
  13930. *v = v2
  13931. }
  13932. case map[uint64]uint64:
  13933. fastpathTV.DecMapUint64Uint64V(v, false, d)
  13934. case *map[uint64]uint64:
  13935. if v2, changed2 := fastpathTV.DecMapUint64Uint64V(*v, true, d); changed2 {
  13936. *v = v2
  13937. }
  13938. case map[uint64]uintptr:
  13939. fastpathTV.DecMapUint64UintptrV(v, false, d)
  13940. case *map[uint64]uintptr:
  13941. if v2, changed2 := fastpathTV.DecMapUint64UintptrV(*v, true, d); changed2 {
  13942. *v = v2
  13943. }
  13944. case map[uint64]int:
  13945. fastpathTV.DecMapUint64IntV(v, false, d)
  13946. case *map[uint64]int:
  13947. if v2, changed2 := fastpathTV.DecMapUint64IntV(*v, true, d); changed2 {
  13948. *v = v2
  13949. }
  13950. case map[uint64]int8:
  13951. fastpathTV.DecMapUint64Int8V(v, false, d)
  13952. case *map[uint64]int8:
  13953. if v2, changed2 := fastpathTV.DecMapUint64Int8V(*v, true, d); changed2 {
  13954. *v = v2
  13955. }
  13956. case map[uint64]int16:
  13957. fastpathTV.DecMapUint64Int16V(v, false, d)
  13958. case *map[uint64]int16:
  13959. if v2, changed2 := fastpathTV.DecMapUint64Int16V(*v, true, d); changed2 {
  13960. *v = v2
  13961. }
  13962. case map[uint64]int32:
  13963. fastpathTV.DecMapUint64Int32V(v, false, d)
  13964. case *map[uint64]int32:
  13965. if v2, changed2 := fastpathTV.DecMapUint64Int32V(*v, true, d); changed2 {
  13966. *v = v2
  13967. }
  13968. case map[uint64]int64:
  13969. fastpathTV.DecMapUint64Int64V(v, false, d)
  13970. case *map[uint64]int64:
  13971. if v2, changed2 := fastpathTV.DecMapUint64Int64V(*v, true, d); changed2 {
  13972. *v = v2
  13973. }
  13974. case map[uint64]float32:
  13975. fastpathTV.DecMapUint64Float32V(v, false, d)
  13976. case *map[uint64]float32:
  13977. if v2, changed2 := fastpathTV.DecMapUint64Float32V(*v, true, d); changed2 {
  13978. *v = v2
  13979. }
  13980. case map[uint64]float64:
  13981. fastpathTV.DecMapUint64Float64V(v, false, d)
  13982. case *map[uint64]float64:
  13983. if v2, changed2 := fastpathTV.DecMapUint64Float64V(*v, true, d); changed2 {
  13984. *v = v2
  13985. }
  13986. case map[uint64]bool:
  13987. fastpathTV.DecMapUint64BoolV(v, false, d)
  13988. case *map[uint64]bool:
  13989. if v2, changed2 := fastpathTV.DecMapUint64BoolV(*v, true, d); changed2 {
  13990. *v = v2
  13991. }
  13992. case []uintptr:
  13993. fastpathTV.DecSliceUintptrV(v, false, d)
  13994. case *[]uintptr:
  13995. if v2, changed2 := fastpathTV.DecSliceUintptrV(*v, true, d); changed2 {
  13996. *v = v2
  13997. }
  13998. case map[uintptr]interface{}:
  13999. fastpathTV.DecMapUintptrIntfV(v, false, d)
  14000. case *map[uintptr]interface{}:
  14001. if v2, changed2 := fastpathTV.DecMapUintptrIntfV(*v, true, d); changed2 {
  14002. *v = v2
  14003. }
  14004. case map[uintptr]string:
  14005. fastpathTV.DecMapUintptrStringV(v, false, d)
  14006. case *map[uintptr]string:
  14007. if v2, changed2 := fastpathTV.DecMapUintptrStringV(*v, true, d); changed2 {
  14008. *v = v2
  14009. }
  14010. case map[uintptr]uint:
  14011. fastpathTV.DecMapUintptrUintV(v, false, d)
  14012. case *map[uintptr]uint:
  14013. if v2, changed2 := fastpathTV.DecMapUintptrUintV(*v, true, d); changed2 {
  14014. *v = v2
  14015. }
  14016. case map[uintptr]uint8:
  14017. fastpathTV.DecMapUintptrUint8V(v, false, d)
  14018. case *map[uintptr]uint8:
  14019. if v2, changed2 := fastpathTV.DecMapUintptrUint8V(*v, true, d); changed2 {
  14020. *v = v2
  14021. }
  14022. case map[uintptr]uint16:
  14023. fastpathTV.DecMapUintptrUint16V(v, false, d)
  14024. case *map[uintptr]uint16:
  14025. if v2, changed2 := fastpathTV.DecMapUintptrUint16V(*v, true, d); changed2 {
  14026. *v = v2
  14027. }
  14028. case map[uintptr]uint32:
  14029. fastpathTV.DecMapUintptrUint32V(v, false, d)
  14030. case *map[uintptr]uint32:
  14031. if v2, changed2 := fastpathTV.DecMapUintptrUint32V(*v, true, d); changed2 {
  14032. *v = v2
  14033. }
  14034. case map[uintptr]uint64:
  14035. fastpathTV.DecMapUintptrUint64V(v, false, d)
  14036. case *map[uintptr]uint64:
  14037. if v2, changed2 := fastpathTV.DecMapUintptrUint64V(*v, true, d); changed2 {
  14038. *v = v2
  14039. }
  14040. case map[uintptr]uintptr:
  14041. fastpathTV.DecMapUintptrUintptrV(v, false, d)
  14042. case *map[uintptr]uintptr:
  14043. if v2, changed2 := fastpathTV.DecMapUintptrUintptrV(*v, true, d); changed2 {
  14044. *v = v2
  14045. }
  14046. case map[uintptr]int:
  14047. fastpathTV.DecMapUintptrIntV(v, false, d)
  14048. case *map[uintptr]int:
  14049. if v2, changed2 := fastpathTV.DecMapUintptrIntV(*v, true, d); changed2 {
  14050. *v = v2
  14051. }
  14052. case map[uintptr]int8:
  14053. fastpathTV.DecMapUintptrInt8V(v, false, d)
  14054. case *map[uintptr]int8:
  14055. if v2, changed2 := fastpathTV.DecMapUintptrInt8V(*v, true, d); changed2 {
  14056. *v = v2
  14057. }
  14058. case map[uintptr]int16:
  14059. fastpathTV.DecMapUintptrInt16V(v, false, d)
  14060. case *map[uintptr]int16:
  14061. if v2, changed2 := fastpathTV.DecMapUintptrInt16V(*v, true, d); changed2 {
  14062. *v = v2
  14063. }
  14064. case map[uintptr]int32:
  14065. fastpathTV.DecMapUintptrInt32V(v, false, d)
  14066. case *map[uintptr]int32:
  14067. if v2, changed2 := fastpathTV.DecMapUintptrInt32V(*v, true, d); changed2 {
  14068. *v = v2
  14069. }
  14070. case map[uintptr]int64:
  14071. fastpathTV.DecMapUintptrInt64V(v, false, d)
  14072. case *map[uintptr]int64:
  14073. if v2, changed2 := fastpathTV.DecMapUintptrInt64V(*v, true, d); changed2 {
  14074. *v = v2
  14075. }
  14076. case map[uintptr]float32:
  14077. fastpathTV.DecMapUintptrFloat32V(v, false, d)
  14078. case *map[uintptr]float32:
  14079. if v2, changed2 := fastpathTV.DecMapUintptrFloat32V(*v, true, d); changed2 {
  14080. *v = v2
  14081. }
  14082. case map[uintptr]float64:
  14083. fastpathTV.DecMapUintptrFloat64V(v, false, d)
  14084. case *map[uintptr]float64:
  14085. if v2, changed2 := fastpathTV.DecMapUintptrFloat64V(*v, true, d); changed2 {
  14086. *v = v2
  14087. }
  14088. case map[uintptr]bool:
  14089. fastpathTV.DecMapUintptrBoolV(v, false, d)
  14090. case *map[uintptr]bool:
  14091. if v2, changed2 := fastpathTV.DecMapUintptrBoolV(*v, true, d); changed2 {
  14092. *v = v2
  14093. }
  14094. case []int:
  14095. fastpathTV.DecSliceIntV(v, false, d)
  14096. case *[]int:
  14097. if v2, changed2 := fastpathTV.DecSliceIntV(*v, true, d); changed2 {
  14098. *v = v2
  14099. }
  14100. case map[int]interface{}:
  14101. fastpathTV.DecMapIntIntfV(v, false, d)
  14102. case *map[int]interface{}:
  14103. if v2, changed2 := fastpathTV.DecMapIntIntfV(*v, true, d); changed2 {
  14104. *v = v2
  14105. }
  14106. case map[int]string:
  14107. fastpathTV.DecMapIntStringV(v, false, d)
  14108. case *map[int]string:
  14109. if v2, changed2 := fastpathTV.DecMapIntStringV(*v, true, d); changed2 {
  14110. *v = v2
  14111. }
  14112. case map[int]uint:
  14113. fastpathTV.DecMapIntUintV(v, false, d)
  14114. case *map[int]uint:
  14115. if v2, changed2 := fastpathTV.DecMapIntUintV(*v, true, d); changed2 {
  14116. *v = v2
  14117. }
  14118. case map[int]uint8:
  14119. fastpathTV.DecMapIntUint8V(v, false, d)
  14120. case *map[int]uint8:
  14121. if v2, changed2 := fastpathTV.DecMapIntUint8V(*v, true, d); changed2 {
  14122. *v = v2
  14123. }
  14124. case map[int]uint16:
  14125. fastpathTV.DecMapIntUint16V(v, false, d)
  14126. case *map[int]uint16:
  14127. if v2, changed2 := fastpathTV.DecMapIntUint16V(*v, true, d); changed2 {
  14128. *v = v2
  14129. }
  14130. case map[int]uint32:
  14131. fastpathTV.DecMapIntUint32V(v, false, d)
  14132. case *map[int]uint32:
  14133. if v2, changed2 := fastpathTV.DecMapIntUint32V(*v, true, d); changed2 {
  14134. *v = v2
  14135. }
  14136. case map[int]uint64:
  14137. fastpathTV.DecMapIntUint64V(v, false, d)
  14138. case *map[int]uint64:
  14139. if v2, changed2 := fastpathTV.DecMapIntUint64V(*v, true, d); changed2 {
  14140. *v = v2
  14141. }
  14142. case map[int]uintptr:
  14143. fastpathTV.DecMapIntUintptrV(v, false, d)
  14144. case *map[int]uintptr:
  14145. if v2, changed2 := fastpathTV.DecMapIntUintptrV(*v, true, d); changed2 {
  14146. *v = v2
  14147. }
  14148. case map[int]int:
  14149. fastpathTV.DecMapIntIntV(v, false, d)
  14150. case *map[int]int:
  14151. if v2, changed2 := fastpathTV.DecMapIntIntV(*v, true, d); changed2 {
  14152. *v = v2
  14153. }
  14154. case map[int]int8:
  14155. fastpathTV.DecMapIntInt8V(v, false, d)
  14156. case *map[int]int8:
  14157. if v2, changed2 := fastpathTV.DecMapIntInt8V(*v, true, d); changed2 {
  14158. *v = v2
  14159. }
  14160. case map[int]int16:
  14161. fastpathTV.DecMapIntInt16V(v, false, d)
  14162. case *map[int]int16:
  14163. if v2, changed2 := fastpathTV.DecMapIntInt16V(*v, true, d); changed2 {
  14164. *v = v2
  14165. }
  14166. case map[int]int32:
  14167. fastpathTV.DecMapIntInt32V(v, false, d)
  14168. case *map[int]int32:
  14169. if v2, changed2 := fastpathTV.DecMapIntInt32V(*v, true, d); changed2 {
  14170. *v = v2
  14171. }
  14172. case map[int]int64:
  14173. fastpathTV.DecMapIntInt64V(v, false, d)
  14174. case *map[int]int64:
  14175. if v2, changed2 := fastpathTV.DecMapIntInt64V(*v, true, d); changed2 {
  14176. *v = v2
  14177. }
  14178. case map[int]float32:
  14179. fastpathTV.DecMapIntFloat32V(v, false, d)
  14180. case *map[int]float32:
  14181. if v2, changed2 := fastpathTV.DecMapIntFloat32V(*v, true, d); changed2 {
  14182. *v = v2
  14183. }
  14184. case map[int]float64:
  14185. fastpathTV.DecMapIntFloat64V(v, false, d)
  14186. case *map[int]float64:
  14187. if v2, changed2 := fastpathTV.DecMapIntFloat64V(*v, true, d); changed2 {
  14188. *v = v2
  14189. }
  14190. case map[int]bool:
  14191. fastpathTV.DecMapIntBoolV(v, false, d)
  14192. case *map[int]bool:
  14193. if v2, changed2 := fastpathTV.DecMapIntBoolV(*v, true, d); changed2 {
  14194. *v = v2
  14195. }
  14196. case []int8:
  14197. fastpathTV.DecSliceInt8V(v, false, d)
  14198. case *[]int8:
  14199. if v2, changed2 := fastpathTV.DecSliceInt8V(*v, true, d); changed2 {
  14200. *v = v2
  14201. }
  14202. case map[int8]interface{}:
  14203. fastpathTV.DecMapInt8IntfV(v, false, d)
  14204. case *map[int8]interface{}:
  14205. if v2, changed2 := fastpathTV.DecMapInt8IntfV(*v, true, d); changed2 {
  14206. *v = v2
  14207. }
  14208. case map[int8]string:
  14209. fastpathTV.DecMapInt8StringV(v, false, d)
  14210. case *map[int8]string:
  14211. if v2, changed2 := fastpathTV.DecMapInt8StringV(*v, true, d); changed2 {
  14212. *v = v2
  14213. }
  14214. case map[int8]uint:
  14215. fastpathTV.DecMapInt8UintV(v, false, d)
  14216. case *map[int8]uint:
  14217. if v2, changed2 := fastpathTV.DecMapInt8UintV(*v, true, d); changed2 {
  14218. *v = v2
  14219. }
  14220. case map[int8]uint8:
  14221. fastpathTV.DecMapInt8Uint8V(v, false, d)
  14222. case *map[int8]uint8:
  14223. if v2, changed2 := fastpathTV.DecMapInt8Uint8V(*v, true, d); changed2 {
  14224. *v = v2
  14225. }
  14226. case map[int8]uint16:
  14227. fastpathTV.DecMapInt8Uint16V(v, false, d)
  14228. case *map[int8]uint16:
  14229. if v2, changed2 := fastpathTV.DecMapInt8Uint16V(*v, true, d); changed2 {
  14230. *v = v2
  14231. }
  14232. case map[int8]uint32:
  14233. fastpathTV.DecMapInt8Uint32V(v, false, d)
  14234. case *map[int8]uint32:
  14235. if v2, changed2 := fastpathTV.DecMapInt8Uint32V(*v, true, d); changed2 {
  14236. *v = v2
  14237. }
  14238. case map[int8]uint64:
  14239. fastpathTV.DecMapInt8Uint64V(v, false, d)
  14240. case *map[int8]uint64:
  14241. if v2, changed2 := fastpathTV.DecMapInt8Uint64V(*v, true, d); changed2 {
  14242. *v = v2
  14243. }
  14244. case map[int8]uintptr:
  14245. fastpathTV.DecMapInt8UintptrV(v, false, d)
  14246. case *map[int8]uintptr:
  14247. if v2, changed2 := fastpathTV.DecMapInt8UintptrV(*v, true, d); changed2 {
  14248. *v = v2
  14249. }
  14250. case map[int8]int:
  14251. fastpathTV.DecMapInt8IntV(v, false, d)
  14252. case *map[int8]int:
  14253. if v2, changed2 := fastpathTV.DecMapInt8IntV(*v, true, d); changed2 {
  14254. *v = v2
  14255. }
  14256. case map[int8]int8:
  14257. fastpathTV.DecMapInt8Int8V(v, false, d)
  14258. case *map[int8]int8:
  14259. if v2, changed2 := fastpathTV.DecMapInt8Int8V(*v, true, d); changed2 {
  14260. *v = v2
  14261. }
  14262. case map[int8]int16:
  14263. fastpathTV.DecMapInt8Int16V(v, false, d)
  14264. case *map[int8]int16:
  14265. if v2, changed2 := fastpathTV.DecMapInt8Int16V(*v, true, d); changed2 {
  14266. *v = v2
  14267. }
  14268. case map[int8]int32:
  14269. fastpathTV.DecMapInt8Int32V(v, false, d)
  14270. case *map[int8]int32:
  14271. if v2, changed2 := fastpathTV.DecMapInt8Int32V(*v, true, d); changed2 {
  14272. *v = v2
  14273. }
  14274. case map[int8]int64:
  14275. fastpathTV.DecMapInt8Int64V(v, false, d)
  14276. case *map[int8]int64:
  14277. if v2, changed2 := fastpathTV.DecMapInt8Int64V(*v, true, d); changed2 {
  14278. *v = v2
  14279. }
  14280. case map[int8]float32:
  14281. fastpathTV.DecMapInt8Float32V(v, false, d)
  14282. case *map[int8]float32:
  14283. if v2, changed2 := fastpathTV.DecMapInt8Float32V(*v, true, d); changed2 {
  14284. *v = v2
  14285. }
  14286. case map[int8]float64:
  14287. fastpathTV.DecMapInt8Float64V(v, false, d)
  14288. case *map[int8]float64:
  14289. if v2, changed2 := fastpathTV.DecMapInt8Float64V(*v, true, d); changed2 {
  14290. *v = v2
  14291. }
  14292. case map[int8]bool:
  14293. fastpathTV.DecMapInt8BoolV(v, false, d)
  14294. case *map[int8]bool:
  14295. if v2, changed2 := fastpathTV.DecMapInt8BoolV(*v, true, d); changed2 {
  14296. *v = v2
  14297. }
  14298. case []int16:
  14299. fastpathTV.DecSliceInt16V(v, false, d)
  14300. case *[]int16:
  14301. if v2, changed2 := fastpathTV.DecSliceInt16V(*v, true, d); changed2 {
  14302. *v = v2
  14303. }
  14304. case map[int16]interface{}:
  14305. fastpathTV.DecMapInt16IntfV(v, false, d)
  14306. case *map[int16]interface{}:
  14307. if v2, changed2 := fastpathTV.DecMapInt16IntfV(*v, true, d); changed2 {
  14308. *v = v2
  14309. }
  14310. case map[int16]string:
  14311. fastpathTV.DecMapInt16StringV(v, false, d)
  14312. case *map[int16]string:
  14313. if v2, changed2 := fastpathTV.DecMapInt16StringV(*v, true, d); changed2 {
  14314. *v = v2
  14315. }
  14316. case map[int16]uint:
  14317. fastpathTV.DecMapInt16UintV(v, false, d)
  14318. case *map[int16]uint:
  14319. if v2, changed2 := fastpathTV.DecMapInt16UintV(*v, true, d); changed2 {
  14320. *v = v2
  14321. }
  14322. case map[int16]uint8:
  14323. fastpathTV.DecMapInt16Uint8V(v, false, d)
  14324. case *map[int16]uint8:
  14325. if v2, changed2 := fastpathTV.DecMapInt16Uint8V(*v, true, d); changed2 {
  14326. *v = v2
  14327. }
  14328. case map[int16]uint16:
  14329. fastpathTV.DecMapInt16Uint16V(v, false, d)
  14330. case *map[int16]uint16:
  14331. if v2, changed2 := fastpathTV.DecMapInt16Uint16V(*v, true, d); changed2 {
  14332. *v = v2
  14333. }
  14334. case map[int16]uint32:
  14335. fastpathTV.DecMapInt16Uint32V(v, false, d)
  14336. case *map[int16]uint32:
  14337. if v2, changed2 := fastpathTV.DecMapInt16Uint32V(*v, true, d); changed2 {
  14338. *v = v2
  14339. }
  14340. case map[int16]uint64:
  14341. fastpathTV.DecMapInt16Uint64V(v, false, d)
  14342. case *map[int16]uint64:
  14343. if v2, changed2 := fastpathTV.DecMapInt16Uint64V(*v, true, d); changed2 {
  14344. *v = v2
  14345. }
  14346. case map[int16]uintptr:
  14347. fastpathTV.DecMapInt16UintptrV(v, false, d)
  14348. case *map[int16]uintptr:
  14349. if v2, changed2 := fastpathTV.DecMapInt16UintptrV(*v, true, d); changed2 {
  14350. *v = v2
  14351. }
  14352. case map[int16]int:
  14353. fastpathTV.DecMapInt16IntV(v, false, d)
  14354. case *map[int16]int:
  14355. if v2, changed2 := fastpathTV.DecMapInt16IntV(*v, true, d); changed2 {
  14356. *v = v2
  14357. }
  14358. case map[int16]int8:
  14359. fastpathTV.DecMapInt16Int8V(v, false, d)
  14360. case *map[int16]int8:
  14361. if v2, changed2 := fastpathTV.DecMapInt16Int8V(*v, true, d); changed2 {
  14362. *v = v2
  14363. }
  14364. case map[int16]int16:
  14365. fastpathTV.DecMapInt16Int16V(v, false, d)
  14366. case *map[int16]int16:
  14367. if v2, changed2 := fastpathTV.DecMapInt16Int16V(*v, true, d); changed2 {
  14368. *v = v2
  14369. }
  14370. case map[int16]int32:
  14371. fastpathTV.DecMapInt16Int32V(v, false, d)
  14372. case *map[int16]int32:
  14373. if v2, changed2 := fastpathTV.DecMapInt16Int32V(*v, true, d); changed2 {
  14374. *v = v2
  14375. }
  14376. case map[int16]int64:
  14377. fastpathTV.DecMapInt16Int64V(v, false, d)
  14378. case *map[int16]int64:
  14379. if v2, changed2 := fastpathTV.DecMapInt16Int64V(*v, true, d); changed2 {
  14380. *v = v2
  14381. }
  14382. case map[int16]float32:
  14383. fastpathTV.DecMapInt16Float32V(v, false, d)
  14384. case *map[int16]float32:
  14385. if v2, changed2 := fastpathTV.DecMapInt16Float32V(*v, true, d); changed2 {
  14386. *v = v2
  14387. }
  14388. case map[int16]float64:
  14389. fastpathTV.DecMapInt16Float64V(v, false, d)
  14390. case *map[int16]float64:
  14391. if v2, changed2 := fastpathTV.DecMapInt16Float64V(*v, true, d); changed2 {
  14392. *v = v2
  14393. }
  14394. case map[int16]bool:
  14395. fastpathTV.DecMapInt16BoolV(v, false, d)
  14396. case *map[int16]bool:
  14397. if v2, changed2 := fastpathTV.DecMapInt16BoolV(*v, true, d); changed2 {
  14398. *v = v2
  14399. }
  14400. case []int32:
  14401. fastpathTV.DecSliceInt32V(v, false, d)
  14402. case *[]int32:
  14403. if v2, changed2 := fastpathTV.DecSliceInt32V(*v, true, d); changed2 {
  14404. *v = v2
  14405. }
  14406. case map[int32]interface{}:
  14407. fastpathTV.DecMapInt32IntfV(v, false, d)
  14408. case *map[int32]interface{}:
  14409. if v2, changed2 := fastpathTV.DecMapInt32IntfV(*v, true, d); changed2 {
  14410. *v = v2
  14411. }
  14412. case map[int32]string:
  14413. fastpathTV.DecMapInt32StringV(v, false, d)
  14414. case *map[int32]string:
  14415. if v2, changed2 := fastpathTV.DecMapInt32StringV(*v, true, d); changed2 {
  14416. *v = v2
  14417. }
  14418. case map[int32]uint:
  14419. fastpathTV.DecMapInt32UintV(v, false, d)
  14420. case *map[int32]uint:
  14421. if v2, changed2 := fastpathTV.DecMapInt32UintV(*v, true, d); changed2 {
  14422. *v = v2
  14423. }
  14424. case map[int32]uint8:
  14425. fastpathTV.DecMapInt32Uint8V(v, false, d)
  14426. case *map[int32]uint8:
  14427. if v2, changed2 := fastpathTV.DecMapInt32Uint8V(*v, true, d); changed2 {
  14428. *v = v2
  14429. }
  14430. case map[int32]uint16:
  14431. fastpathTV.DecMapInt32Uint16V(v, false, d)
  14432. case *map[int32]uint16:
  14433. if v2, changed2 := fastpathTV.DecMapInt32Uint16V(*v, true, d); changed2 {
  14434. *v = v2
  14435. }
  14436. case map[int32]uint32:
  14437. fastpathTV.DecMapInt32Uint32V(v, false, d)
  14438. case *map[int32]uint32:
  14439. if v2, changed2 := fastpathTV.DecMapInt32Uint32V(*v, true, d); changed2 {
  14440. *v = v2
  14441. }
  14442. case map[int32]uint64:
  14443. fastpathTV.DecMapInt32Uint64V(v, false, d)
  14444. case *map[int32]uint64:
  14445. if v2, changed2 := fastpathTV.DecMapInt32Uint64V(*v, true, d); changed2 {
  14446. *v = v2
  14447. }
  14448. case map[int32]uintptr:
  14449. fastpathTV.DecMapInt32UintptrV(v, false, d)
  14450. case *map[int32]uintptr:
  14451. if v2, changed2 := fastpathTV.DecMapInt32UintptrV(*v, true, d); changed2 {
  14452. *v = v2
  14453. }
  14454. case map[int32]int:
  14455. fastpathTV.DecMapInt32IntV(v, false, d)
  14456. case *map[int32]int:
  14457. if v2, changed2 := fastpathTV.DecMapInt32IntV(*v, true, d); changed2 {
  14458. *v = v2
  14459. }
  14460. case map[int32]int8:
  14461. fastpathTV.DecMapInt32Int8V(v, false, d)
  14462. case *map[int32]int8:
  14463. if v2, changed2 := fastpathTV.DecMapInt32Int8V(*v, true, d); changed2 {
  14464. *v = v2
  14465. }
  14466. case map[int32]int16:
  14467. fastpathTV.DecMapInt32Int16V(v, false, d)
  14468. case *map[int32]int16:
  14469. if v2, changed2 := fastpathTV.DecMapInt32Int16V(*v, true, d); changed2 {
  14470. *v = v2
  14471. }
  14472. case map[int32]int32:
  14473. fastpathTV.DecMapInt32Int32V(v, false, d)
  14474. case *map[int32]int32:
  14475. if v2, changed2 := fastpathTV.DecMapInt32Int32V(*v, true, d); changed2 {
  14476. *v = v2
  14477. }
  14478. case map[int32]int64:
  14479. fastpathTV.DecMapInt32Int64V(v, false, d)
  14480. case *map[int32]int64:
  14481. if v2, changed2 := fastpathTV.DecMapInt32Int64V(*v, true, d); changed2 {
  14482. *v = v2
  14483. }
  14484. case map[int32]float32:
  14485. fastpathTV.DecMapInt32Float32V(v, false, d)
  14486. case *map[int32]float32:
  14487. if v2, changed2 := fastpathTV.DecMapInt32Float32V(*v, true, d); changed2 {
  14488. *v = v2
  14489. }
  14490. case map[int32]float64:
  14491. fastpathTV.DecMapInt32Float64V(v, false, d)
  14492. case *map[int32]float64:
  14493. if v2, changed2 := fastpathTV.DecMapInt32Float64V(*v, true, d); changed2 {
  14494. *v = v2
  14495. }
  14496. case map[int32]bool:
  14497. fastpathTV.DecMapInt32BoolV(v, false, d)
  14498. case *map[int32]bool:
  14499. if v2, changed2 := fastpathTV.DecMapInt32BoolV(*v, true, d); changed2 {
  14500. *v = v2
  14501. }
  14502. case []int64:
  14503. fastpathTV.DecSliceInt64V(v, false, d)
  14504. case *[]int64:
  14505. if v2, changed2 := fastpathTV.DecSliceInt64V(*v, true, d); changed2 {
  14506. *v = v2
  14507. }
  14508. case map[int64]interface{}:
  14509. fastpathTV.DecMapInt64IntfV(v, false, d)
  14510. case *map[int64]interface{}:
  14511. if v2, changed2 := fastpathTV.DecMapInt64IntfV(*v, true, d); changed2 {
  14512. *v = v2
  14513. }
  14514. case map[int64]string:
  14515. fastpathTV.DecMapInt64StringV(v, false, d)
  14516. case *map[int64]string:
  14517. if v2, changed2 := fastpathTV.DecMapInt64StringV(*v, true, d); changed2 {
  14518. *v = v2
  14519. }
  14520. case map[int64]uint:
  14521. fastpathTV.DecMapInt64UintV(v, false, d)
  14522. case *map[int64]uint:
  14523. if v2, changed2 := fastpathTV.DecMapInt64UintV(*v, true, d); changed2 {
  14524. *v = v2
  14525. }
  14526. case map[int64]uint8:
  14527. fastpathTV.DecMapInt64Uint8V(v, false, d)
  14528. case *map[int64]uint8:
  14529. if v2, changed2 := fastpathTV.DecMapInt64Uint8V(*v, true, d); changed2 {
  14530. *v = v2
  14531. }
  14532. case map[int64]uint16:
  14533. fastpathTV.DecMapInt64Uint16V(v, false, d)
  14534. case *map[int64]uint16:
  14535. if v2, changed2 := fastpathTV.DecMapInt64Uint16V(*v, true, d); changed2 {
  14536. *v = v2
  14537. }
  14538. case map[int64]uint32:
  14539. fastpathTV.DecMapInt64Uint32V(v, false, d)
  14540. case *map[int64]uint32:
  14541. if v2, changed2 := fastpathTV.DecMapInt64Uint32V(*v, true, d); changed2 {
  14542. *v = v2
  14543. }
  14544. case map[int64]uint64:
  14545. fastpathTV.DecMapInt64Uint64V(v, false, d)
  14546. case *map[int64]uint64:
  14547. if v2, changed2 := fastpathTV.DecMapInt64Uint64V(*v, true, d); changed2 {
  14548. *v = v2
  14549. }
  14550. case map[int64]uintptr:
  14551. fastpathTV.DecMapInt64UintptrV(v, false, d)
  14552. case *map[int64]uintptr:
  14553. if v2, changed2 := fastpathTV.DecMapInt64UintptrV(*v, true, d); changed2 {
  14554. *v = v2
  14555. }
  14556. case map[int64]int:
  14557. fastpathTV.DecMapInt64IntV(v, false, d)
  14558. case *map[int64]int:
  14559. if v2, changed2 := fastpathTV.DecMapInt64IntV(*v, true, d); changed2 {
  14560. *v = v2
  14561. }
  14562. case map[int64]int8:
  14563. fastpathTV.DecMapInt64Int8V(v, false, d)
  14564. case *map[int64]int8:
  14565. if v2, changed2 := fastpathTV.DecMapInt64Int8V(*v, true, d); changed2 {
  14566. *v = v2
  14567. }
  14568. case map[int64]int16:
  14569. fastpathTV.DecMapInt64Int16V(v, false, d)
  14570. case *map[int64]int16:
  14571. if v2, changed2 := fastpathTV.DecMapInt64Int16V(*v, true, d); changed2 {
  14572. *v = v2
  14573. }
  14574. case map[int64]int32:
  14575. fastpathTV.DecMapInt64Int32V(v, false, d)
  14576. case *map[int64]int32:
  14577. if v2, changed2 := fastpathTV.DecMapInt64Int32V(*v, true, d); changed2 {
  14578. *v = v2
  14579. }
  14580. case map[int64]int64:
  14581. fastpathTV.DecMapInt64Int64V(v, false, d)
  14582. case *map[int64]int64:
  14583. if v2, changed2 := fastpathTV.DecMapInt64Int64V(*v, true, d); changed2 {
  14584. *v = v2
  14585. }
  14586. case map[int64]float32:
  14587. fastpathTV.DecMapInt64Float32V(v, false, d)
  14588. case *map[int64]float32:
  14589. if v2, changed2 := fastpathTV.DecMapInt64Float32V(*v, true, d); changed2 {
  14590. *v = v2
  14591. }
  14592. case map[int64]float64:
  14593. fastpathTV.DecMapInt64Float64V(v, false, d)
  14594. case *map[int64]float64:
  14595. if v2, changed2 := fastpathTV.DecMapInt64Float64V(*v, true, d); changed2 {
  14596. *v = v2
  14597. }
  14598. case map[int64]bool:
  14599. fastpathTV.DecMapInt64BoolV(v, false, d)
  14600. case *map[int64]bool:
  14601. if v2, changed2 := fastpathTV.DecMapInt64BoolV(*v, true, d); changed2 {
  14602. *v = v2
  14603. }
  14604. case []bool:
  14605. fastpathTV.DecSliceBoolV(v, false, d)
  14606. case *[]bool:
  14607. if v2, changed2 := fastpathTV.DecSliceBoolV(*v, true, d); changed2 {
  14608. *v = v2
  14609. }
  14610. case map[bool]interface{}:
  14611. fastpathTV.DecMapBoolIntfV(v, false, d)
  14612. case *map[bool]interface{}:
  14613. if v2, changed2 := fastpathTV.DecMapBoolIntfV(*v, true, d); changed2 {
  14614. *v = v2
  14615. }
  14616. case map[bool]string:
  14617. fastpathTV.DecMapBoolStringV(v, false, d)
  14618. case *map[bool]string:
  14619. if v2, changed2 := fastpathTV.DecMapBoolStringV(*v, true, d); changed2 {
  14620. *v = v2
  14621. }
  14622. case map[bool]uint:
  14623. fastpathTV.DecMapBoolUintV(v, false, d)
  14624. case *map[bool]uint:
  14625. if v2, changed2 := fastpathTV.DecMapBoolUintV(*v, true, d); changed2 {
  14626. *v = v2
  14627. }
  14628. case map[bool]uint8:
  14629. fastpathTV.DecMapBoolUint8V(v, false, d)
  14630. case *map[bool]uint8:
  14631. if v2, changed2 := fastpathTV.DecMapBoolUint8V(*v, true, d); changed2 {
  14632. *v = v2
  14633. }
  14634. case map[bool]uint16:
  14635. fastpathTV.DecMapBoolUint16V(v, false, d)
  14636. case *map[bool]uint16:
  14637. if v2, changed2 := fastpathTV.DecMapBoolUint16V(*v, true, d); changed2 {
  14638. *v = v2
  14639. }
  14640. case map[bool]uint32:
  14641. fastpathTV.DecMapBoolUint32V(v, false, d)
  14642. case *map[bool]uint32:
  14643. if v2, changed2 := fastpathTV.DecMapBoolUint32V(*v, true, d); changed2 {
  14644. *v = v2
  14645. }
  14646. case map[bool]uint64:
  14647. fastpathTV.DecMapBoolUint64V(v, false, d)
  14648. case *map[bool]uint64:
  14649. if v2, changed2 := fastpathTV.DecMapBoolUint64V(*v, true, d); changed2 {
  14650. *v = v2
  14651. }
  14652. case map[bool]uintptr:
  14653. fastpathTV.DecMapBoolUintptrV(v, false, d)
  14654. case *map[bool]uintptr:
  14655. if v2, changed2 := fastpathTV.DecMapBoolUintptrV(*v, true, d); changed2 {
  14656. *v = v2
  14657. }
  14658. case map[bool]int:
  14659. fastpathTV.DecMapBoolIntV(v, false, d)
  14660. case *map[bool]int:
  14661. if v2, changed2 := fastpathTV.DecMapBoolIntV(*v, true, d); changed2 {
  14662. *v = v2
  14663. }
  14664. case map[bool]int8:
  14665. fastpathTV.DecMapBoolInt8V(v, false, d)
  14666. case *map[bool]int8:
  14667. if v2, changed2 := fastpathTV.DecMapBoolInt8V(*v, true, d); changed2 {
  14668. *v = v2
  14669. }
  14670. case map[bool]int16:
  14671. fastpathTV.DecMapBoolInt16V(v, false, d)
  14672. case *map[bool]int16:
  14673. if v2, changed2 := fastpathTV.DecMapBoolInt16V(*v, true, d); changed2 {
  14674. *v = v2
  14675. }
  14676. case map[bool]int32:
  14677. fastpathTV.DecMapBoolInt32V(v, false, d)
  14678. case *map[bool]int32:
  14679. if v2, changed2 := fastpathTV.DecMapBoolInt32V(*v, true, d); changed2 {
  14680. *v = v2
  14681. }
  14682. case map[bool]int64:
  14683. fastpathTV.DecMapBoolInt64V(v, false, d)
  14684. case *map[bool]int64:
  14685. if v2, changed2 := fastpathTV.DecMapBoolInt64V(*v, true, d); changed2 {
  14686. *v = v2
  14687. }
  14688. case map[bool]float32:
  14689. fastpathTV.DecMapBoolFloat32V(v, false, d)
  14690. case *map[bool]float32:
  14691. if v2, changed2 := fastpathTV.DecMapBoolFloat32V(*v, true, d); changed2 {
  14692. *v = v2
  14693. }
  14694. case map[bool]float64:
  14695. fastpathTV.DecMapBoolFloat64V(v, false, d)
  14696. case *map[bool]float64:
  14697. if v2, changed2 := fastpathTV.DecMapBoolFloat64V(*v, true, d); changed2 {
  14698. *v = v2
  14699. }
  14700. case map[bool]bool:
  14701. fastpathTV.DecMapBoolBoolV(v, false, d)
  14702. case *map[bool]bool:
  14703. if v2, changed2 := fastpathTV.DecMapBoolBoolV(*v, true, d); changed2 {
  14704. *v = v2
  14705. }
  14706. default:
  14707. _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release)
  14708. return false
  14709. }
  14710. return true
  14711. }
  14712. func fastpathDecodeSetZeroTypeSwitch(iv interface{}, d *Decoder) bool {
  14713. switch v := iv.(type) {
  14714. case *[]interface{}:
  14715. *v = nil
  14716. case *map[interface{}]interface{}:
  14717. *v = nil
  14718. case *map[interface{}]string:
  14719. *v = nil
  14720. case *map[interface{}]uint:
  14721. *v = nil
  14722. case *map[interface{}]uint8:
  14723. *v = nil
  14724. case *map[interface{}]uint16:
  14725. *v = nil
  14726. case *map[interface{}]uint32:
  14727. *v = nil
  14728. case *map[interface{}]uint64:
  14729. *v = nil
  14730. case *map[interface{}]uintptr:
  14731. *v = nil
  14732. case *map[interface{}]int:
  14733. *v = nil
  14734. case *map[interface{}]int8:
  14735. *v = nil
  14736. case *map[interface{}]int16:
  14737. *v = nil
  14738. case *map[interface{}]int32:
  14739. *v = nil
  14740. case *map[interface{}]int64:
  14741. *v = nil
  14742. case *map[interface{}]float32:
  14743. *v = nil
  14744. case *map[interface{}]float64:
  14745. *v = nil
  14746. case *map[interface{}]bool:
  14747. *v = nil
  14748. case *[]string:
  14749. *v = nil
  14750. case *map[string]interface{}:
  14751. *v = nil
  14752. case *map[string]string:
  14753. *v = nil
  14754. case *map[string]uint:
  14755. *v = nil
  14756. case *map[string]uint8:
  14757. *v = nil
  14758. case *map[string]uint16:
  14759. *v = nil
  14760. case *map[string]uint32:
  14761. *v = nil
  14762. case *map[string]uint64:
  14763. *v = nil
  14764. case *map[string]uintptr:
  14765. *v = nil
  14766. case *map[string]int:
  14767. *v = nil
  14768. case *map[string]int8:
  14769. *v = nil
  14770. case *map[string]int16:
  14771. *v = nil
  14772. case *map[string]int32:
  14773. *v = nil
  14774. case *map[string]int64:
  14775. *v = nil
  14776. case *map[string]float32:
  14777. *v = nil
  14778. case *map[string]float64:
  14779. *v = nil
  14780. case *map[string]bool:
  14781. *v = nil
  14782. case *[]float32:
  14783. *v = nil
  14784. case *map[float32]interface{}:
  14785. *v = nil
  14786. case *map[float32]string:
  14787. *v = nil
  14788. case *map[float32]uint:
  14789. *v = nil
  14790. case *map[float32]uint8:
  14791. *v = nil
  14792. case *map[float32]uint16:
  14793. *v = nil
  14794. case *map[float32]uint32:
  14795. *v = nil
  14796. case *map[float32]uint64:
  14797. *v = nil
  14798. case *map[float32]uintptr:
  14799. *v = nil
  14800. case *map[float32]int:
  14801. *v = nil
  14802. case *map[float32]int8:
  14803. *v = nil
  14804. case *map[float32]int16:
  14805. *v = nil
  14806. case *map[float32]int32:
  14807. *v = nil
  14808. case *map[float32]int64:
  14809. *v = nil
  14810. case *map[float32]float32:
  14811. *v = nil
  14812. case *map[float32]float64:
  14813. *v = nil
  14814. case *map[float32]bool:
  14815. *v = nil
  14816. case *[]float64:
  14817. *v = nil
  14818. case *map[float64]interface{}:
  14819. *v = nil
  14820. case *map[float64]string:
  14821. *v = nil
  14822. case *map[float64]uint:
  14823. *v = nil
  14824. case *map[float64]uint8:
  14825. *v = nil
  14826. case *map[float64]uint16:
  14827. *v = nil
  14828. case *map[float64]uint32:
  14829. *v = nil
  14830. case *map[float64]uint64:
  14831. *v = nil
  14832. case *map[float64]uintptr:
  14833. *v = nil
  14834. case *map[float64]int:
  14835. *v = nil
  14836. case *map[float64]int8:
  14837. *v = nil
  14838. case *map[float64]int16:
  14839. *v = nil
  14840. case *map[float64]int32:
  14841. *v = nil
  14842. case *map[float64]int64:
  14843. *v = nil
  14844. case *map[float64]float32:
  14845. *v = nil
  14846. case *map[float64]float64:
  14847. *v = nil
  14848. case *map[float64]bool:
  14849. *v = nil
  14850. case *[]uint:
  14851. *v = nil
  14852. case *map[uint]interface{}:
  14853. *v = nil
  14854. case *map[uint]string:
  14855. *v = nil
  14856. case *map[uint]uint:
  14857. *v = nil
  14858. case *map[uint]uint8:
  14859. *v = nil
  14860. case *map[uint]uint16:
  14861. *v = nil
  14862. case *map[uint]uint32:
  14863. *v = nil
  14864. case *map[uint]uint64:
  14865. *v = nil
  14866. case *map[uint]uintptr:
  14867. *v = nil
  14868. case *map[uint]int:
  14869. *v = nil
  14870. case *map[uint]int8:
  14871. *v = nil
  14872. case *map[uint]int16:
  14873. *v = nil
  14874. case *map[uint]int32:
  14875. *v = nil
  14876. case *map[uint]int64:
  14877. *v = nil
  14878. case *map[uint]float32:
  14879. *v = nil
  14880. case *map[uint]float64:
  14881. *v = nil
  14882. case *map[uint]bool:
  14883. *v = nil
  14884. case *map[uint8]interface{}:
  14885. *v = nil
  14886. case *map[uint8]string:
  14887. *v = nil
  14888. case *map[uint8]uint:
  14889. *v = nil
  14890. case *map[uint8]uint8:
  14891. *v = nil
  14892. case *map[uint8]uint16:
  14893. *v = nil
  14894. case *map[uint8]uint32:
  14895. *v = nil
  14896. case *map[uint8]uint64:
  14897. *v = nil
  14898. case *map[uint8]uintptr:
  14899. *v = nil
  14900. case *map[uint8]int:
  14901. *v = nil
  14902. case *map[uint8]int8:
  14903. *v = nil
  14904. case *map[uint8]int16:
  14905. *v = nil
  14906. case *map[uint8]int32:
  14907. *v = nil
  14908. case *map[uint8]int64:
  14909. *v = nil
  14910. case *map[uint8]float32:
  14911. *v = nil
  14912. case *map[uint8]float64:
  14913. *v = nil
  14914. case *map[uint8]bool:
  14915. *v = nil
  14916. case *[]uint16:
  14917. *v = nil
  14918. case *map[uint16]interface{}:
  14919. *v = nil
  14920. case *map[uint16]string:
  14921. *v = nil
  14922. case *map[uint16]uint:
  14923. *v = nil
  14924. case *map[uint16]uint8:
  14925. *v = nil
  14926. case *map[uint16]uint16:
  14927. *v = nil
  14928. case *map[uint16]uint32:
  14929. *v = nil
  14930. case *map[uint16]uint64:
  14931. *v = nil
  14932. case *map[uint16]uintptr:
  14933. *v = nil
  14934. case *map[uint16]int:
  14935. *v = nil
  14936. case *map[uint16]int8:
  14937. *v = nil
  14938. case *map[uint16]int16:
  14939. *v = nil
  14940. case *map[uint16]int32:
  14941. *v = nil
  14942. case *map[uint16]int64:
  14943. *v = nil
  14944. case *map[uint16]float32:
  14945. *v = nil
  14946. case *map[uint16]float64:
  14947. *v = nil
  14948. case *map[uint16]bool:
  14949. *v = nil
  14950. case *[]uint32:
  14951. *v = nil
  14952. case *map[uint32]interface{}:
  14953. *v = nil
  14954. case *map[uint32]string:
  14955. *v = nil
  14956. case *map[uint32]uint:
  14957. *v = nil
  14958. case *map[uint32]uint8:
  14959. *v = nil
  14960. case *map[uint32]uint16:
  14961. *v = nil
  14962. case *map[uint32]uint32:
  14963. *v = nil
  14964. case *map[uint32]uint64:
  14965. *v = nil
  14966. case *map[uint32]uintptr:
  14967. *v = nil
  14968. case *map[uint32]int:
  14969. *v = nil
  14970. case *map[uint32]int8:
  14971. *v = nil
  14972. case *map[uint32]int16:
  14973. *v = nil
  14974. case *map[uint32]int32:
  14975. *v = nil
  14976. case *map[uint32]int64:
  14977. *v = nil
  14978. case *map[uint32]float32:
  14979. *v = nil
  14980. case *map[uint32]float64:
  14981. *v = nil
  14982. case *map[uint32]bool:
  14983. *v = nil
  14984. case *[]uint64:
  14985. *v = nil
  14986. case *map[uint64]interface{}:
  14987. *v = nil
  14988. case *map[uint64]string:
  14989. *v = nil
  14990. case *map[uint64]uint:
  14991. *v = nil
  14992. case *map[uint64]uint8:
  14993. *v = nil
  14994. case *map[uint64]uint16:
  14995. *v = nil
  14996. case *map[uint64]uint32:
  14997. *v = nil
  14998. case *map[uint64]uint64:
  14999. *v = nil
  15000. case *map[uint64]uintptr:
  15001. *v = nil
  15002. case *map[uint64]int:
  15003. *v = nil
  15004. case *map[uint64]int8:
  15005. *v = nil
  15006. case *map[uint64]int16:
  15007. *v = nil
  15008. case *map[uint64]int32:
  15009. *v = nil
  15010. case *map[uint64]int64:
  15011. *v = nil
  15012. case *map[uint64]float32:
  15013. *v = nil
  15014. case *map[uint64]float64:
  15015. *v = nil
  15016. case *map[uint64]bool:
  15017. *v = nil
  15018. case *[]uintptr:
  15019. *v = nil
  15020. case *map[uintptr]interface{}:
  15021. *v = nil
  15022. case *map[uintptr]string:
  15023. *v = nil
  15024. case *map[uintptr]uint:
  15025. *v = nil
  15026. case *map[uintptr]uint8:
  15027. *v = nil
  15028. case *map[uintptr]uint16:
  15029. *v = nil
  15030. case *map[uintptr]uint32:
  15031. *v = nil
  15032. case *map[uintptr]uint64:
  15033. *v = nil
  15034. case *map[uintptr]uintptr:
  15035. *v = nil
  15036. case *map[uintptr]int:
  15037. *v = nil
  15038. case *map[uintptr]int8:
  15039. *v = nil
  15040. case *map[uintptr]int16:
  15041. *v = nil
  15042. case *map[uintptr]int32:
  15043. *v = nil
  15044. case *map[uintptr]int64:
  15045. *v = nil
  15046. case *map[uintptr]float32:
  15047. *v = nil
  15048. case *map[uintptr]float64:
  15049. *v = nil
  15050. case *map[uintptr]bool:
  15051. *v = nil
  15052. case *[]int:
  15053. *v = nil
  15054. case *map[int]interface{}:
  15055. *v = nil
  15056. case *map[int]string:
  15057. *v = nil
  15058. case *map[int]uint:
  15059. *v = nil
  15060. case *map[int]uint8:
  15061. *v = nil
  15062. case *map[int]uint16:
  15063. *v = nil
  15064. case *map[int]uint32:
  15065. *v = nil
  15066. case *map[int]uint64:
  15067. *v = nil
  15068. case *map[int]uintptr:
  15069. *v = nil
  15070. case *map[int]int:
  15071. *v = nil
  15072. case *map[int]int8:
  15073. *v = nil
  15074. case *map[int]int16:
  15075. *v = nil
  15076. case *map[int]int32:
  15077. *v = nil
  15078. case *map[int]int64:
  15079. *v = nil
  15080. case *map[int]float32:
  15081. *v = nil
  15082. case *map[int]float64:
  15083. *v = nil
  15084. case *map[int]bool:
  15085. *v = nil
  15086. case *[]int8:
  15087. *v = nil
  15088. case *map[int8]interface{}:
  15089. *v = nil
  15090. case *map[int8]string:
  15091. *v = nil
  15092. case *map[int8]uint:
  15093. *v = nil
  15094. case *map[int8]uint8:
  15095. *v = nil
  15096. case *map[int8]uint16:
  15097. *v = nil
  15098. case *map[int8]uint32:
  15099. *v = nil
  15100. case *map[int8]uint64:
  15101. *v = nil
  15102. case *map[int8]uintptr:
  15103. *v = nil
  15104. case *map[int8]int:
  15105. *v = nil
  15106. case *map[int8]int8:
  15107. *v = nil
  15108. case *map[int8]int16:
  15109. *v = nil
  15110. case *map[int8]int32:
  15111. *v = nil
  15112. case *map[int8]int64:
  15113. *v = nil
  15114. case *map[int8]float32:
  15115. *v = nil
  15116. case *map[int8]float64:
  15117. *v = nil
  15118. case *map[int8]bool:
  15119. *v = nil
  15120. case *[]int16:
  15121. *v = nil
  15122. case *map[int16]interface{}:
  15123. *v = nil
  15124. case *map[int16]string:
  15125. *v = nil
  15126. case *map[int16]uint:
  15127. *v = nil
  15128. case *map[int16]uint8:
  15129. *v = nil
  15130. case *map[int16]uint16:
  15131. *v = nil
  15132. case *map[int16]uint32:
  15133. *v = nil
  15134. case *map[int16]uint64:
  15135. *v = nil
  15136. case *map[int16]uintptr:
  15137. *v = nil
  15138. case *map[int16]int:
  15139. *v = nil
  15140. case *map[int16]int8:
  15141. *v = nil
  15142. case *map[int16]int16:
  15143. *v = nil
  15144. case *map[int16]int32:
  15145. *v = nil
  15146. case *map[int16]int64:
  15147. *v = nil
  15148. case *map[int16]float32:
  15149. *v = nil
  15150. case *map[int16]float64:
  15151. *v = nil
  15152. case *map[int16]bool:
  15153. *v = nil
  15154. case *[]int32:
  15155. *v = nil
  15156. case *map[int32]interface{}:
  15157. *v = nil
  15158. case *map[int32]string:
  15159. *v = nil
  15160. case *map[int32]uint:
  15161. *v = nil
  15162. case *map[int32]uint8:
  15163. *v = nil
  15164. case *map[int32]uint16:
  15165. *v = nil
  15166. case *map[int32]uint32:
  15167. *v = nil
  15168. case *map[int32]uint64:
  15169. *v = nil
  15170. case *map[int32]uintptr:
  15171. *v = nil
  15172. case *map[int32]int:
  15173. *v = nil
  15174. case *map[int32]int8:
  15175. *v = nil
  15176. case *map[int32]int16:
  15177. *v = nil
  15178. case *map[int32]int32:
  15179. *v = nil
  15180. case *map[int32]int64:
  15181. *v = nil
  15182. case *map[int32]float32:
  15183. *v = nil
  15184. case *map[int32]float64:
  15185. *v = nil
  15186. case *map[int32]bool:
  15187. *v = nil
  15188. case *[]int64:
  15189. *v = nil
  15190. case *map[int64]interface{}:
  15191. *v = nil
  15192. case *map[int64]string:
  15193. *v = nil
  15194. case *map[int64]uint:
  15195. *v = nil
  15196. case *map[int64]uint8:
  15197. *v = nil
  15198. case *map[int64]uint16:
  15199. *v = nil
  15200. case *map[int64]uint32:
  15201. *v = nil
  15202. case *map[int64]uint64:
  15203. *v = nil
  15204. case *map[int64]uintptr:
  15205. *v = nil
  15206. case *map[int64]int:
  15207. *v = nil
  15208. case *map[int64]int8:
  15209. *v = nil
  15210. case *map[int64]int16:
  15211. *v = nil
  15212. case *map[int64]int32:
  15213. *v = nil
  15214. case *map[int64]int64:
  15215. *v = nil
  15216. case *map[int64]float32:
  15217. *v = nil
  15218. case *map[int64]float64:
  15219. *v = nil
  15220. case *map[int64]bool:
  15221. *v = nil
  15222. case *[]bool:
  15223. *v = nil
  15224. case *map[bool]interface{}:
  15225. *v = nil
  15226. case *map[bool]string:
  15227. *v = nil
  15228. case *map[bool]uint:
  15229. *v = nil
  15230. case *map[bool]uint8:
  15231. *v = nil
  15232. case *map[bool]uint16:
  15233. *v = nil
  15234. case *map[bool]uint32:
  15235. *v = nil
  15236. case *map[bool]uint64:
  15237. *v = nil
  15238. case *map[bool]uintptr:
  15239. *v = nil
  15240. case *map[bool]int:
  15241. *v = nil
  15242. case *map[bool]int8:
  15243. *v = nil
  15244. case *map[bool]int16:
  15245. *v = nil
  15246. case *map[bool]int32:
  15247. *v = nil
  15248. case *map[bool]int64:
  15249. *v = nil
  15250. case *map[bool]float32:
  15251. *v = nil
  15252. case *map[bool]float64:
  15253. *v = nil
  15254. case *map[bool]bool:
  15255. *v = nil
  15256. default:
  15257. _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release)
  15258. return false
  15259. }
  15260. return true
  15261. }
  15262. // -- -- fast path functions
  15263. func (d *Decoder) fastpathDecSliceIntfR(f *codecFnInfo, rv reflect.Value) {
  15264. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  15265. var vp = rv2i(rv).(*[]interface{})
  15266. if v, changed := fastpathTV.DecSliceIntfV(*vp, !array, d); changed {
  15267. *vp = v
  15268. }
  15269. } else {
  15270. fastpathTV.DecSliceIntfV(rv2i(rv).([]interface{}), !array, d)
  15271. }
  15272. }
  15273. func (f fastpathT) DecSliceIntfX(vp *[]interface{}, d *Decoder) {
  15274. if v, changed := f.DecSliceIntfV(*vp, true, d); changed {
  15275. *vp = v
  15276. }
  15277. }
  15278. func (_ fastpathT) DecSliceIntfV(v []interface{}, canChange bool, d *Decoder) (_ []interface{}, changed bool) {
  15279. dd := d.d
  15280. slh, containerLenS := d.decSliceHelperStart()
  15281. if containerLenS == 0 {
  15282. if canChange {
  15283. if v == nil {
  15284. v = []interface{}{}
  15285. } else if len(v) != 0 {
  15286. v = v[:0]
  15287. }
  15288. changed = true
  15289. }
  15290. slh.End()
  15291. return v, changed
  15292. }
  15293. hasLen := containerLenS > 0
  15294. var xlen int
  15295. if hasLen && canChange {
  15296. if containerLenS > cap(v) {
  15297. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16)
  15298. if xlen <= cap(v) {
  15299. v = v[:xlen]
  15300. } else {
  15301. v = make([]interface{}, xlen)
  15302. }
  15303. changed = true
  15304. } else if containerLenS != len(v) {
  15305. v = v[:containerLenS]
  15306. changed = true
  15307. }
  15308. }
  15309. j := 0
  15310. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  15311. if j == 0 && len(v) == 0 {
  15312. if hasLen {
  15313. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16)
  15314. } else {
  15315. xlen = 8
  15316. }
  15317. v = make([]interface{}, xlen)
  15318. changed = true
  15319. }
  15320. // if indefinite, etc, then expand the slice if necessary
  15321. var decodeIntoBlank bool
  15322. if j >= len(v) {
  15323. if canChange {
  15324. v = append(v, nil)
  15325. changed = true
  15326. } else {
  15327. d.arrayCannotExpand(len(v), j+1)
  15328. decodeIntoBlank = true
  15329. }
  15330. }
  15331. slh.ElemContainerState(j)
  15332. if decodeIntoBlank {
  15333. d.swallow()
  15334. } else {
  15335. d.decode(&v[j])
  15336. }
  15337. }
  15338. if canChange {
  15339. if j < len(v) {
  15340. v = v[:j]
  15341. changed = true
  15342. } else if j == 0 && v == nil {
  15343. v = make([]interface{}, 0)
  15344. changed = true
  15345. }
  15346. }
  15347. slh.End()
  15348. return v, changed
  15349. }
  15350. func (d *Decoder) fastpathDecSliceStringR(f *codecFnInfo, rv reflect.Value) {
  15351. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  15352. var vp = rv2i(rv).(*[]string)
  15353. if v, changed := fastpathTV.DecSliceStringV(*vp, !array, d); changed {
  15354. *vp = v
  15355. }
  15356. } else {
  15357. fastpathTV.DecSliceStringV(rv2i(rv).([]string), !array, d)
  15358. }
  15359. }
  15360. func (f fastpathT) DecSliceStringX(vp *[]string, d *Decoder) {
  15361. if v, changed := f.DecSliceStringV(*vp, true, d); changed {
  15362. *vp = v
  15363. }
  15364. }
  15365. func (_ fastpathT) DecSliceStringV(v []string, canChange bool, d *Decoder) (_ []string, changed bool) {
  15366. dd := d.d
  15367. slh, containerLenS := d.decSliceHelperStart()
  15368. if containerLenS == 0 {
  15369. if canChange {
  15370. if v == nil {
  15371. v = []string{}
  15372. } else if len(v) != 0 {
  15373. v = v[:0]
  15374. }
  15375. changed = true
  15376. }
  15377. slh.End()
  15378. return v, changed
  15379. }
  15380. hasLen := containerLenS > 0
  15381. var xlen int
  15382. if hasLen && canChange {
  15383. if containerLenS > cap(v) {
  15384. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16)
  15385. if xlen <= cap(v) {
  15386. v = v[:xlen]
  15387. } else {
  15388. v = make([]string, xlen)
  15389. }
  15390. changed = true
  15391. } else if containerLenS != len(v) {
  15392. v = v[:containerLenS]
  15393. changed = true
  15394. }
  15395. }
  15396. j := 0
  15397. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  15398. if j == 0 && len(v) == 0 {
  15399. if hasLen {
  15400. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16)
  15401. } else {
  15402. xlen = 8
  15403. }
  15404. v = make([]string, xlen)
  15405. changed = true
  15406. }
  15407. // if indefinite, etc, then expand the slice if necessary
  15408. var decodeIntoBlank bool
  15409. if j >= len(v) {
  15410. if canChange {
  15411. v = append(v, "")
  15412. changed = true
  15413. } else {
  15414. d.arrayCannotExpand(len(v), j+1)
  15415. decodeIntoBlank = true
  15416. }
  15417. }
  15418. slh.ElemContainerState(j)
  15419. if decodeIntoBlank {
  15420. d.swallow()
  15421. } else {
  15422. v[j] = dd.DecodeString()
  15423. }
  15424. }
  15425. if canChange {
  15426. if j < len(v) {
  15427. v = v[:j]
  15428. changed = true
  15429. } else if j == 0 && v == nil {
  15430. v = make([]string, 0)
  15431. changed = true
  15432. }
  15433. }
  15434. slh.End()
  15435. return v, changed
  15436. }
  15437. func (d *Decoder) fastpathDecSliceFloat32R(f *codecFnInfo, rv reflect.Value) {
  15438. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  15439. var vp = rv2i(rv).(*[]float32)
  15440. if v, changed := fastpathTV.DecSliceFloat32V(*vp, !array, d); changed {
  15441. *vp = v
  15442. }
  15443. } else {
  15444. fastpathTV.DecSliceFloat32V(rv2i(rv).([]float32), !array, d)
  15445. }
  15446. }
  15447. func (f fastpathT) DecSliceFloat32X(vp *[]float32, d *Decoder) {
  15448. if v, changed := f.DecSliceFloat32V(*vp, true, d); changed {
  15449. *vp = v
  15450. }
  15451. }
  15452. func (_ fastpathT) DecSliceFloat32V(v []float32, canChange bool, d *Decoder) (_ []float32, changed bool) {
  15453. dd := d.d
  15454. slh, containerLenS := d.decSliceHelperStart()
  15455. if containerLenS == 0 {
  15456. if canChange {
  15457. if v == nil {
  15458. v = []float32{}
  15459. } else if len(v) != 0 {
  15460. v = v[:0]
  15461. }
  15462. changed = true
  15463. }
  15464. slh.End()
  15465. return v, changed
  15466. }
  15467. hasLen := containerLenS > 0
  15468. var xlen int
  15469. if hasLen && canChange {
  15470. if containerLenS > cap(v) {
  15471. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4)
  15472. if xlen <= cap(v) {
  15473. v = v[:xlen]
  15474. } else {
  15475. v = make([]float32, xlen)
  15476. }
  15477. changed = true
  15478. } else if containerLenS != len(v) {
  15479. v = v[:containerLenS]
  15480. changed = true
  15481. }
  15482. }
  15483. j := 0
  15484. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  15485. if j == 0 && len(v) == 0 {
  15486. if hasLen {
  15487. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4)
  15488. } else {
  15489. xlen = 8
  15490. }
  15491. v = make([]float32, xlen)
  15492. changed = true
  15493. }
  15494. // if indefinite, etc, then expand the slice if necessary
  15495. var decodeIntoBlank bool
  15496. if j >= len(v) {
  15497. if canChange {
  15498. v = append(v, 0)
  15499. changed = true
  15500. } else {
  15501. d.arrayCannotExpand(len(v), j+1)
  15502. decodeIntoBlank = true
  15503. }
  15504. }
  15505. slh.ElemContainerState(j)
  15506. if decodeIntoBlank {
  15507. d.swallow()
  15508. } else {
  15509. v[j] = float32(dd.DecodeFloat(true))
  15510. }
  15511. }
  15512. if canChange {
  15513. if j < len(v) {
  15514. v = v[:j]
  15515. changed = true
  15516. } else if j == 0 && v == nil {
  15517. v = make([]float32, 0)
  15518. changed = true
  15519. }
  15520. }
  15521. slh.End()
  15522. return v, changed
  15523. }
  15524. func (d *Decoder) fastpathDecSliceFloat64R(f *codecFnInfo, rv reflect.Value) {
  15525. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  15526. var vp = rv2i(rv).(*[]float64)
  15527. if v, changed := fastpathTV.DecSliceFloat64V(*vp, !array, d); changed {
  15528. *vp = v
  15529. }
  15530. } else {
  15531. fastpathTV.DecSliceFloat64V(rv2i(rv).([]float64), !array, d)
  15532. }
  15533. }
  15534. func (f fastpathT) DecSliceFloat64X(vp *[]float64, d *Decoder) {
  15535. if v, changed := f.DecSliceFloat64V(*vp, true, d); changed {
  15536. *vp = v
  15537. }
  15538. }
  15539. func (_ fastpathT) DecSliceFloat64V(v []float64, canChange bool, d *Decoder) (_ []float64, changed bool) {
  15540. dd := d.d
  15541. slh, containerLenS := d.decSliceHelperStart()
  15542. if containerLenS == 0 {
  15543. if canChange {
  15544. if v == nil {
  15545. v = []float64{}
  15546. } else if len(v) != 0 {
  15547. v = v[:0]
  15548. }
  15549. changed = true
  15550. }
  15551. slh.End()
  15552. return v, changed
  15553. }
  15554. hasLen := containerLenS > 0
  15555. var xlen int
  15556. if hasLen && canChange {
  15557. if containerLenS > cap(v) {
  15558. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
  15559. if xlen <= cap(v) {
  15560. v = v[:xlen]
  15561. } else {
  15562. v = make([]float64, xlen)
  15563. }
  15564. changed = true
  15565. } else if containerLenS != len(v) {
  15566. v = v[:containerLenS]
  15567. changed = true
  15568. }
  15569. }
  15570. j := 0
  15571. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  15572. if j == 0 && len(v) == 0 {
  15573. if hasLen {
  15574. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
  15575. } else {
  15576. xlen = 8
  15577. }
  15578. v = make([]float64, xlen)
  15579. changed = true
  15580. }
  15581. // if indefinite, etc, then expand the slice if necessary
  15582. var decodeIntoBlank bool
  15583. if j >= len(v) {
  15584. if canChange {
  15585. v = append(v, 0)
  15586. changed = true
  15587. } else {
  15588. d.arrayCannotExpand(len(v), j+1)
  15589. decodeIntoBlank = true
  15590. }
  15591. }
  15592. slh.ElemContainerState(j)
  15593. if decodeIntoBlank {
  15594. d.swallow()
  15595. } else {
  15596. v[j] = dd.DecodeFloat(false)
  15597. }
  15598. }
  15599. if canChange {
  15600. if j < len(v) {
  15601. v = v[:j]
  15602. changed = true
  15603. } else if j == 0 && v == nil {
  15604. v = make([]float64, 0)
  15605. changed = true
  15606. }
  15607. }
  15608. slh.End()
  15609. return v, changed
  15610. }
  15611. func (d *Decoder) fastpathDecSliceUintR(f *codecFnInfo, rv reflect.Value) {
  15612. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  15613. var vp = rv2i(rv).(*[]uint)
  15614. if v, changed := fastpathTV.DecSliceUintV(*vp, !array, d); changed {
  15615. *vp = v
  15616. }
  15617. } else {
  15618. fastpathTV.DecSliceUintV(rv2i(rv).([]uint), !array, d)
  15619. }
  15620. }
  15621. func (f fastpathT) DecSliceUintX(vp *[]uint, d *Decoder) {
  15622. if v, changed := f.DecSliceUintV(*vp, true, d); changed {
  15623. *vp = v
  15624. }
  15625. }
  15626. func (_ fastpathT) DecSliceUintV(v []uint, canChange bool, d *Decoder) (_ []uint, changed bool) {
  15627. dd := d.d
  15628. slh, containerLenS := d.decSliceHelperStart()
  15629. if containerLenS == 0 {
  15630. if canChange {
  15631. if v == nil {
  15632. v = []uint{}
  15633. } else if len(v) != 0 {
  15634. v = v[:0]
  15635. }
  15636. changed = true
  15637. }
  15638. slh.End()
  15639. return v, changed
  15640. }
  15641. hasLen := containerLenS > 0
  15642. var xlen int
  15643. if hasLen && canChange {
  15644. if containerLenS > cap(v) {
  15645. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
  15646. if xlen <= cap(v) {
  15647. v = v[:xlen]
  15648. } else {
  15649. v = make([]uint, xlen)
  15650. }
  15651. changed = true
  15652. } else if containerLenS != len(v) {
  15653. v = v[:containerLenS]
  15654. changed = true
  15655. }
  15656. }
  15657. j := 0
  15658. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  15659. if j == 0 && len(v) == 0 {
  15660. if hasLen {
  15661. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
  15662. } else {
  15663. xlen = 8
  15664. }
  15665. v = make([]uint, xlen)
  15666. changed = true
  15667. }
  15668. // if indefinite, etc, then expand the slice if necessary
  15669. var decodeIntoBlank bool
  15670. if j >= len(v) {
  15671. if canChange {
  15672. v = append(v, 0)
  15673. changed = true
  15674. } else {
  15675. d.arrayCannotExpand(len(v), j+1)
  15676. decodeIntoBlank = true
  15677. }
  15678. }
  15679. slh.ElemContainerState(j)
  15680. if decodeIntoBlank {
  15681. d.swallow()
  15682. } else {
  15683. v[j] = uint(dd.DecodeUint(uintBitsize))
  15684. }
  15685. }
  15686. if canChange {
  15687. if j < len(v) {
  15688. v = v[:j]
  15689. changed = true
  15690. } else if j == 0 && v == nil {
  15691. v = make([]uint, 0)
  15692. changed = true
  15693. }
  15694. }
  15695. slh.End()
  15696. return v, changed
  15697. }
  15698. func (d *Decoder) fastpathDecSliceUint16R(f *codecFnInfo, rv reflect.Value) {
  15699. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  15700. var vp = rv2i(rv).(*[]uint16)
  15701. if v, changed := fastpathTV.DecSliceUint16V(*vp, !array, d); changed {
  15702. *vp = v
  15703. }
  15704. } else {
  15705. fastpathTV.DecSliceUint16V(rv2i(rv).([]uint16), !array, d)
  15706. }
  15707. }
  15708. func (f fastpathT) DecSliceUint16X(vp *[]uint16, d *Decoder) {
  15709. if v, changed := f.DecSliceUint16V(*vp, true, d); changed {
  15710. *vp = v
  15711. }
  15712. }
  15713. func (_ fastpathT) DecSliceUint16V(v []uint16, canChange bool, d *Decoder) (_ []uint16, changed bool) {
  15714. dd := d.d
  15715. slh, containerLenS := d.decSliceHelperStart()
  15716. if containerLenS == 0 {
  15717. if canChange {
  15718. if v == nil {
  15719. v = []uint16{}
  15720. } else if len(v) != 0 {
  15721. v = v[:0]
  15722. }
  15723. changed = true
  15724. }
  15725. slh.End()
  15726. return v, changed
  15727. }
  15728. hasLen := containerLenS > 0
  15729. var xlen int
  15730. if hasLen && canChange {
  15731. if containerLenS > cap(v) {
  15732. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2)
  15733. if xlen <= cap(v) {
  15734. v = v[:xlen]
  15735. } else {
  15736. v = make([]uint16, xlen)
  15737. }
  15738. changed = true
  15739. } else if containerLenS != len(v) {
  15740. v = v[:containerLenS]
  15741. changed = true
  15742. }
  15743. }
  15744. j := 0
  15745. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  15746. if j == 0 && len(v) == 0 {
  15747. if hasLen {
  15748. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2)
  15749. } else {
  15750. xlen = 8
  15751. }
  15752. v = make([]uint16, xlen)
  15753. changed = true
  15754. }
  15755. // if indefinite, etc, then expand the slice if necessary
  15756. var decodeIntoBlank bool
  15757. if j >= len(v) {
  15758. if canChange {
  15759. v = append(v, 0)
  15760. changed = true
  15761. } else {
  15762. d.arrayCannotExpand(len(v), j+1)
  15763. decodeIntoBlank = true
  15764. }
  15765. }
  15766. slh.ElemContainerState(j)
  15767. if decodeIntoBlank {
  15768. d.swallow()
  15769. } else {
  15770. v[j] = uint16(dd.DecodeUint(16))
  15771. }
  15772. }
  15773. if canChange {
  15774. if j < len(v) {
  15775. v = v[:j]
  15776. changed = true
  15777. } else if j == 0 && v == nil {
  15778. v = make([]uint16, 0)
  15779. changed = true
  15780. }
  15781. }
  15782. slh.End()
  15783. return v, changed
  15784. }
  15785. func (d *Decoder) fastpathDecSliceUint32R(f *codecFnInfo, rv reflect.Value) {
  15786. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  15787. var vp = rv2i(rv).(*[]uint32)
  15788. if v, changed := fastpathTV.DecSliceUint32V(*vp, !array, d); changed {
  15789. *vp = v
  15790. }
  15791. } else {
  15792. fastpathTV.DecSliceUint32V(rv2i(rv).([]uint32), !array, d)
  15793. }
  15794. }
  15795. func (f fastpathT) DecSliceUint32X(vp *[]uint32, d *Decoder) {
  15796. if v, changed := f.DecSliceUint32V(*vp, true, d); changed {
  15797. *vp = v
  15798. }
  15799. }
  15800. func (_ fastpathT) DecSliceUint32V(v []uint32, canChange bool, d *Decoder) (_ []uint32, changed bool) {
  15801. dd := d.d
  15802. slh, containerLenS := d.decSliceHelperStart()
  15803. if containerLenS == 0 {
  15804. if canChange {
  15805. if v == nil {
  15806. v = []uint32{}
  15807. } else if len(v) != 0 {
  15808. v = v[:0]
  15809. }
  15810. changed = true
  15811. }
  15812. slh.End()
  15813. return v, changed
  15814. }
  15815. hasLen := containerLenS > 0
  15816. var xlen int
  15817. if hasLen && canChange {
  15818. if containerLenS > cap(v) {
  15819. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4)
  15820. if xlen <= cap(v) {
  15821. v = v[:xlen]
  15822. } else {
  15823. v = make([]uint32, xlen)
  15824. }
  15825. changed = true
  15826. } else if containerLenS != len(v) {
  15827. v = v[:containerLenS]
  15828. changed = true
  15829. }
  15830. }
  15831. j := 0
  15832. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  15833. if j == 0 && len(v) == 0 {
  15834. if hasLen {
  15835. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4)
  15836. } else {
  15837. xlen = 8
  15838. }
  15839. v = make([]uint32, xlen)
  15840. changed = true
  15841. }
  15842. // if indefinite, etc, then expand the slice if necessary
  15843. var decodeIntoBlank bool
  15844. if j >= len(v) {
  15845. if canChange {
  15846. v = append(v, 0)
  15847. changed = true
  15848. } else {
  15849. d.arrayCannotExpand(len(v), j+1)
  15850. decodeIntoBlank = true
  15851. }
  15852. }
  15853. slh.ElemContainerState(j)
  15854. if decodeIntoBlank {
  15855. d.swallow()
  15856. } else {
  15857. v[j] = uint32(dd.DecodeUint(32))
  15858. }
  15859. }
  15860. if canChange {
  15861. if j < len(v) {
  15862. v = v[:j]
  15863. changed = true
  15864. } else if j == 0 && v == nil {
  15865. v = make([]uint32, 0)
  15866. changed = true
  15867. }
  15868. }
  15869. slh.End()
  15870. return v, changed
  15871. }
  15872. func (d *Decoder) fastpathDecSliceUint64R(f *codecFnInfo, rv reflect.Value) {
  15873. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  15874. var vp = rv2i(rv).(*[]uint64)
  15875. if v, changed := fastpathTV.DecSliceUint64V(*vp, !array, d); changed {
  15876. *vp = v
  15877. }
  15878. } else {
  15879. fastpathTV.DecSliceUint64V(rv2i(rv).([]uint64), !array, d)
  15880. }
  15881. }
  15882. func (f fastpathT) DecSliceUint64X(vp *[]uint64, d *Decoder) {
  15883. if v, changed := f.DecSliceUint64V(*vp, true, d); changed {
  15884. *vp = v
  15885. }
  15886. }
  15887. func (_ fastpathT) DecSliceUint64V(v []uint64, canChange bool, d *Decoder) (_ []uint64, changed bool) {
  15888. dd := d.d
  15889. slh, containerLenS := d.decSliceHelperStart()
  15890. if containerLenS == 0 {
  15891. if canChange {
  15892. if v == nil {
  15893. v = []uint64{}
  15894. } else if len(v) != 0 {
  15895. v = v[:0]
  15896. }
  15897. changed = true
  15898. }
  15899. slh.End()
  15900. return v, changed
  15901. }
  15902. hasLen := containerLenS > 0
  15903. var xlen int
  15904. if hasLen && canChange {
  15905. if containerLenS > cap(v) {
  15906. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
  15907. if xlen <= cap(v) {
  15908. v = v[:xlen]
  15909. } else {
  15910. v = make([]uint64, xlen)
  15911. }
  15912. changed = true
  15913. } else if containerLenS != len(v) {
  15914. v = v[:containerLenS]
  15915. changed = true
  15916. }
  15917. }
  15918. j := 0
  15919. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  15920. if j == 0 && len(v) == 0 {
  15921. if hasLen {
  15922. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
  15923. } else {
  15924. xlen = 8
  15925. }
  15926. v = make([]uint64, xlen)
  15927. changed = true
  15928. }
  15929. // if indefinite, etc, then expand the slice if necessary
  15930. var decodeIntoBlank bool
  15931. if j >= len(v) {
  15932. if canChange {
  15933. v = append(v, 0)
  15934. changed = true
  15935. } else {
  15936. d.arrayCannotExpand(len(v), j+1)
  15937. decodeIntoBlank = true
  15938. }
  15939. }
  15940. slh.ElemContainerState(j)
  15941. if decodeIntoBlank {
  15942. d.swallow()
  15943. } else {
  15944. v[j] = dd.DecodeUint(64)
  15945. }
  15946. }
  15947. if canChange {
  15948. if j < len(v) {
  15949. v = v[:j]
  15950. changed = true
  15951. } else if j == 0 && v == nil {
  15952. v = make([]uint64, 0)
  15953. changed = true
  15954. }
  15955. }
  15956. slh.End()
  15957. return v, changed
  15958. }
  15959. func (d *Decoder) fastpathDecSliceUintptrR(f *codecFnInfo, rv reflect.Value) {
  15960. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  15961. var vp = rv2i(rv).(*[]uintptr)
  15962. if v, changed := fastpathTV.DecSliceUintptrV(*vp, !array, d); changed {
  15963. *vp = v
  15964. }
  15965. } else {
  15966. fastpathTV.DecSliceUintptrV(rv2i(rv).([]uintptr), !array, d)
  15967. }
  15968. }
  15969. func (f fastpathT) DecSliceUintptrX(vp *[]uintptr, d *Decoder) {
  15970. if v, changed := f.DecSliceUintptrV(*vp, true, d); changed {
  15971. *vp = v
  15972. }
  15973. }
  15974. func (_ fastpathT) DecSliceUintptrV(v []uintptr, canChange bool, d *Decoder) (_ []uintptr, changed bool) {
  15975. dd := d.d
  15976. slh, containerLenS := d.decSliceHelperStart()
  15977. if containerLenS == 0 {
  15978. if canChange {
  15979. if v == nil {
  15980. v = []uintptr{}
  15981. } else if len(v) != 0 {
  15982. v = v[:0]
  15983. }
  15984. changed = true
  15985. }
  15986. slh.End()
  15987. return v, changed
  15988. }
  15989. hasLen := containerLenS > 0
  15990. var xlen int
  15991. if hasLen && canChange {
  15992. if containerLenS > cap(v) {
  15993. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
  15994. if xlen <= cap(v) {
  15995. v = v[:xlen]
  15996. } else {
  15997. v = make([]uintptr, xlen)
  15998. }
  15999. changed = true
  16000. } else if containerLenS != len(v) {
  16001. v = v[:containerLenS]
  16002. changed = true
  16003. }
  16004. }
  16005. j := 0
  16006. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  16007. if j == 0 && len(v) == 0 {
  16008. if hasLen {
  16009. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
  16010. } else {
  16011. xlen = 8
  16012. }
  16013. v = make([]uintptr, xlen)
  16014. changed = true
  16015. }
  16016. // if indefinite, etc, then expand the slice if necessary
  16017. var decodeIntoBlank bool
  16018. if j >= len(v) {
  16019. if canChange {
  16020. v = append(v, 0)
  16021. changed = true
  16022. } else {
  16023. d.arrayCannotExpand(len(v), j+1)
  16024. decodeIntoBlank = true
  16025. }
  16026. }
  16027. slh.ElemContainerState(j)
  16028. if decodeIntoBlank {
  16029. d.swallow()
  16030. } else {
  16031. v[j] = uintptr(dd.DecodeUint(uintBitsize))
  16032. }
  16033. }
  16034. if canChange {
  16035. if j < len(v) {
  16036. v = v[:j]
  16037. changed = true
  16038. } else if j == 0 && v == nil {
  16039. v = make([]uintptr, 0)
  16040. changed = true
  16041. }
  16042. }
  16043. slh.End()
  16044. return v, changed
  16045. }
  16046. func (d *Decoder) fastpathDecSliceIntR(f *codecFnInfo, rv reflect.Value) {
  16047. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  16048. var vp = rv2i(rv).(*[]int)
  16049. if v, changed := fastpathTV.DecSliceIntV(*vp, !array, d); changed {
  16050. *vp = v
  16051. }
  16052. } else {
  16053. fastpathTV.DecSliceIntV(rv2i(rv).([]int), !array, d)
  16054. }
  16055. }
  16056. func (f fastpathT) DecSliceIntX(vp *[]int, d *Decoder) {
  16057. if v, changed := f.DecSliceIntV(*vp, true, d); changed {
  16058. *vp = v
  16059. }
  16060. }
  16061. func (_ fastpathT) DecSliceIntV(v []int, canChange bool, d *Decoder) (_ []int, changed bool) {
  16062. dd := d.d
  16063. slh, containerLenS := d.decSliceHelperStart()
  16064. if containerLenS == 0 {
  16065. if canChange {
  16066. if v == nil {
  16067. v = []int{}
  16068. } else if len(v) != 0 {
  16069. v = v[:0]
  16070. }
  16071. changed = true
  16072. }
  16073. slh.End()
  16074. return v, changed
  16075. }
  16076. hasLen := containerLenS > 0
  16077. var xlen int
  16078. if hasLen && canChange {
  16079. if containerLenS > cap(v) {
  16080. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
  16081. if xlen <= cap(v) {
  16082. v = v[:xlen]
  16083. } else {
  16084. v = make([]int, xlen)
  16085. }
  16086. changed = true
  16087. } else if containerLenS != len(v) {
  16088. v = v[:containerLenS]
  16089. changed = true
  16090. }
  16091. }
  16092. j := 0
  16093. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  16094. if j == 0 && len(v) == 0 {
  16095. if hasLen {
  16096. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
  16097. } else {
  16098. xlen = 8
  16099. }
  16100. v = make([]int, xlen)
  16101. changed = true
  16102. }
  16103. // if indefinite, etc, then expand the slice if necessary
  16104. var decodeIntoBlank bool
  16105. if j >= len(v) {
  16106. if canChange {
  16107. v = append(v, 0)
  16108. changed = true
  16109. } else {
  16110. d.arrayCannotExpand(len(v), j+1)
  16111. decodeIntoBlank = true
  16112. }
  16113. }
  16114. slh.ElemContainerState(j)
  16115. if decodeIntoBlank {
  16116. d.swallow()
  16117. } else {
  16118. v[j] = int(dd.DecodeInt(intBitsize))
  16119. }
  16120. }
  16121. if canChange {
  16122. if j < len(v) {
  16123. v = v[:j]
  16124. changed = true
  16125. } else if j == 0 && v == nil {
  16126. v = make([]int, 0)
  16127. changed = true
  16128. }
  16129. }
  16130. slh.End()
  16131. return v, changed
  16132. }
  16133. func (d *Decoder) fastpathDecSliceInt8R(f *codecFnInfo, rv reflect.Value) {
  16134. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  16135. var vp = rv2i(rv).(*[]int8)
  16136. if v, changed := fastpathTV.DecSliceInt8V(*vp, !array, d); changed {
  16137. *vp = v
  16138. }
  16139. } else {
  16140. fastpathTV.DecSliceInt8V(rv2i(rv).([]int8), !array, d)
  16141. }
  16142. }
  16143. func (f fastpathT) DecSliceInt8X(vp *[]int8, d *Decoder) {
  16144. if v, changed := f.DecSliceInt8V(*vp, true, d); changed {
  16145. *vp = v
  16146. }
  16147. }
  16148. func (_ fastpathT) DecSliceInt8V(v []int8, canChange bool, d *Decoder) (_ []int8, changed bool) {
  16149. dd := d.d
  16150. slh, containerLenS := d.decSliceHelperStart()
  16151. if containerLenS == 0 {
  16152. if canChange {
  16153. if v == nil {
  16154. v = []int8{}
  16155. } else if len(v) != 0 {
  16156. v = v[:0]
  16157. }
  16158. changed = true
  16159. }
  16160. slh.End()
  16161. return v, changed
  16162. }
  16163. hasLen := containerLenS > 0
  16164. var xlen int
  16165. if hasLen && canChange {
  16166. if containerLenS > cap(v) {
  16167. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1)
  16168. if xlen <= cap(v) {
  16169. v = v[:xlen]
  16170. } else {
  16171. v = make([]int8, xlen)
  16172. }
  16173. changed = true
  16174. } else if containerLenS != len(v) {
  16175. v = v[:containerLenS]
  16176. changed = true
  16177. }
  16178. }
  16179. j := 0
  16180. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  16181. if j == 0 && len(v) == 0 {
  16182. if hasLen {
  16183. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1)
  16184. } else {
  16185. xlen = 8
  16186. }
  16187. v = make([]int8, xlen)
  16188. changed = true
  16189. }
  16190. // if indefinite, etc, then expand the slice if necessary
  16191. var decodeIntoBlank bool
  16192. if j >= len(v) {
  16193. if canChange {
  16194. v = append(v, 0)
  16195. changed = true
  16196. } else {
  16197. d.arrayCannotExpand(len(v), j+1)
  16198. decodeIntoBlank = true
  16199. }
  16200. }
  16201. slh.ElemContainerState(j)
  16202. if decodeIntoBlank {
  16203. d.swallow()
  16204. } else {
  16205. v[j] = int8(dd.DecodeInt(8))
  16206. }
  16207. }
  16208. if canChange {
  16209. if j < len(v) {
  16210. v = v[:j]
  16211. changed = true
  16212. } else if j == 0 && v == nil {
  16213. v = make([]int8, 0)
  16214. changed = true
  16215. }
  16216. }
  16217. slh.End()
  16218. return v, changed
  16219. }
  16220. func (d *Decoder) fastpathDecSliceInt16R(f *codecFnInfo, rv reflect.Value) {
  16221. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  16222. var vp = rv2i(rv).(*[]int16)
  16223. if v, changed := fastpathTV.DecSliceInt16V(*vp, !array, d); changed {
  16224. *vp = v
  16225. }
  16226. } else {
  16227. fastpathTV.DecSliceInt16V(rv2i(rv).([]int16), !array, d)
  16228. }
  16229. }
  16230. func (f fastpathT) DecSliceInt16X(vp *[]int16, d *Decoder) {
  16231. if v, changed := f.DecSliceInt16V(*vp, true, d); changed {
  16232. *vp = v
  16233. }
  16234. }
  16235. func (_ fastpathT) DecSliceInt16V(v []int16, canChange bool, d *Decoder) (_ []int16, changed bool) {
  16236. dd := d.d
  16237. slh, containerLenS := d.decSliceHelperStart()
  16238. if containerLenS == 0 {
  16239. if canChange {
  16240. if v == nil {
  16241. v = []int16{}
  16242. } else if len(v) != 0 {
  16243. v = v[:0]
  16244. }
  16245. changed = true
  16246. }
  16247. slh.End()
  16248. return v, changed
  16249. }
  16250. hasLen := containerLenS > 0
  16251. var xlen int
  16252. if hasLen && canChange {
  16253. if containerLenS > cap(v) {
  16254. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2)
  16255. if xlen <= cap(v) {
  16256. v = v[:xlen]
  16257. } else {
  16258. v = make([]int16, xlen)
  16259. }
  16260. changed = true
  16261. } else if containerLenS != len(v) {
  16262. v = v[:containerLenS]
  16263. changed = true
  16264. }
  16265. }
  16266. j := 0
  16267. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  16268. if j == 0 && len(v) == 0 {
  16269. if hasLen {
  16270. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2)
  16271. } else {
  16272. xlen = 8
  16273. }
  16274. v = make([]int16, xlen)
  16275. changed = true
  16276. }
  16277. // if indefinite, etc, then expand the slice if necessary
  16278. var decodeIntoBlank bool
  16279. if j >= len(v) {
  16280. if canChange {
  16281. v = append(v, 0)
  16282. changed = true
  16283. } else {
  16284. d.arrayCannotExpand(len(v), j+1)
  16285. decodeIntoBlank = true
  16286. }
  16287. }
  16288. slh.ElemContainerState(j)
  16289. if decodeIntoBlank {
  16290. d.swallow()
  16291. } else {
  16292. v[j] = int16(dd.DecodeInt(16))
  16293. }
  16294. }
  16295. if canChange {
  16296. if j < len(v) {
  16297. v = v[:j]
  16298. changed = true
  16299. } else if j == 0 && v == nil {
  16300. v = make([]int16, 0)
  16301. changed = true
  16302. }
  16303. }
  16304. slh.End()
  16305. return v, changed
  16306. }
  16307. func (d *Decoder) fastpathDecSliceInt32R(f *codecFnInfo, rv reflect.Value) {
  16308. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  16309. var vp = rv2i(rv).(*[]int32)
  16310. if v, changed := fastpathTV.DecSliceInt32V(*vp, !array, d); changed {
  16311. *vp = v
  16312. }
  16313. } else {
  16314. fastpathTV.DecSliceInt32V(rv2i(rv).([]int32), !array, d)
  16315. }
  16316. }
  16317. func (f fastpathT) DecSliceInt32X(vp *[]int32, d *Decoder) {
  16318. if v, changed := f.DecSliceInt32V(*vp, true, d); changed {
  16319. *vp = v
  16320. }
  16321. }
  16322. func (_ fastpathT) DecSliceInt32V(v []int32, canChange bool, d *Decoder) (_ []int32, changed bool) {
  16323. dd := d.d
  16324. slh, containerLenS := d.decSliceHelperStart()
  16325. if containerLenS == 0 {
  16326. if canChange {
  16327. if v == nil {
  16328. v = []int32{}
  16329. } else if len(v) != 0 {
  16330. v = v[:0]
  16331. }
  16332. changed = true
  16333. }
  16334. slh.End()
  16335. return v, changed
  16336. }
  16337. hasLen := containerLenS > 0
  16338. var xlen int
  16339. if hasLen && canChange {
  16340. if containerLenS > cap(v) {
  16341. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4)
  16342. if xlen <= cap(v) {
  16343. v = v[:xlen]
  16344. } else {
  16345. v = make([]int32, xlen)
  16346. }
  16347. changed = true
  16348. } else if containerLenS != len(v) {
  16349. v = v[:containerLenS]
  16350. changed = true
  16351. }
  16352. }
  16353. j := 0
  16354. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  16355. if j == 0 && len(v) == 0 {
  16356. if hasLen {
  16357. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4)
  16358. } else {
  16359. xlen = 8
  16360. }
  16361. v = make([]int32, xlen)
  16362. changed = true
  16363. }
  16364. // if indefinite, etc, then expand the slice if necessary
  16365. var decodeIntoBlank bool
  16366. if j >= len(v) {
  16367. if canChange {
  16368. v = append(v, 0)
  16369. changed = true
  16370. } else {
  16371. d.arrayCannotExpand(len(v), j+1)
  16372. decodeIntoBlank = true
  16373. }
  16374. }
  16375. slh.ElemContainerState(j)
  16376. if decodeIntoBlank {
  16377. d.swallow()
  16378. } else {
  16379. v[j] = int32(dd.DecodeInt(32))
  16380. }
  16381. }
  16382. if canChange {
  16383. if j < len(v) {
  16384. v = v[:j]
  16385. changed = true
  16386. } else if j == 0 && v == nil {
  16387. v = make([]int32, 0)
  16388. changed = true
  16389. }
  16390. }
  16391. slh.End()
  16392. return v, changed
  16393. }
  16394. func (d *Decoder) fastpathDecSliceInt64R(f *codecFnInfo, rv reflect.Value) {
  16395. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  16396. var vp = rv2i(rv).(*[]int64)
  16397. if v, changed := fastpathTV.DecSliceInt64V(*vp, !array, d); changed {
  16398. *vp = v
  16399. }
  16400. } else {
  16401. fastpathTV.DecSliceInt64V(rv2i(rv).([]int64), !array, d)
  16402. }
  16403. }
  16404. func (f fastpathT) DecSliceInt64X(vp *[]int64, d *Decoder) {
  16405. if v, changed := f.DecSliceInt64V(*vp, true, d); changed {
  16406. *vp = v
  16407. }
  16408. }
  16409. func (_ fastpathT) DecSliceInt64V(v []int64, canChange bool, d *Decoder) (_ []int64, changed bool) {
  16410. dd := d.d
  16411. slh, containerLenS := d.decSliceHelperStart()
  16412. if containerLenS == 0 {
  16413. if canChange {
  16414. if v == nil {
  16415. v = []int64{}
  16416. } else if len(v) != 0 {
  16417. v = v[:0]
  16418. }
  16419. changed = true
  16420. }
  16421. slh.End()
  16422. return v, changed
  16423. }
  16424. hasLen := containerLenS > 0
  16425. var xlen int
  16426. if hasLen && canChange {
  16427. if containerLenS > cap(v) {
  16428. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
  16429. if xlen <= cap(v) {
  16430. v = v[:xlen]
  16431. } else {
  16432. v = make([]int64, xlen)
  16433. }
  16434. changed = true
  16435. } else if containerLenS != len(v) {
  16436. v = v[:containerLenS]
  16437. changed = true
  16438. }
  16439. }
  16440. j := 0
  16441. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  16442. if j == 0 && len(v) == 0 {
  16443. if hasLen {
  16444. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
  16445. } else {
  16446. xlen = 8
  16447. }
  16448. v = make([]int64, xlen)
  16449. changed = true
  16450. }
  16451. // if indefinite, etc, then expand the slice if necessary
  16452. var decodeIntoBlank bool
  16453. if j >= len(v) {
  16454. if canChange {
  16455. v = append(v, 0)
  16456. changed = true
  16457. } else {
  16458. d.arrayCannotExpand(len(v), j+1)
  16459. decodeIntoBlank = true
  16460. }
  16461. }
  16462. slh.ElemContainerState(j)
  16463. if decodeIntoBlank {
  16464. d.swallow()
  16465. } else {
  16466. v[j] = dd.DecodeInt(64)
  16467. }
  16468. }
  16469. if canChange {
  16470. if j < len(v) {
  16471. v = v[:j]
  16472. changed = true
  16473. } else if j == 0 && v == nil {
  16474. v = make([]int64, 0)
  16475. changed = true
  16476. }
  16477. }
  16478. slh.End()
  16479. return v, changed
  16480. }
  16481. func (d *Decoder) fastpathDecSliceBoolR(f *codecFnInfo, rv reflect.Value) {
  16482. if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr {
  16483. var vp = rv2i(rv).(*[]bool)
  16484. if v, changed := fastpathTV.DecSliceBoolV(*vp, !array, d); changed {
  16485. *vp = v
  16486. }
  16487. } else {
  16488. fastpathTV.DecSliceBoolV(rv2i(rv).([]bool), !array, d)
  16489. }
  16490. }
  16491. func (f fastpathT) DecSliceBoolX(vp *[]bool, d *Decoder) {
  16492. if v, changed := f.DecSliceBoolV(*vp, true, d); changed {
  16493. *vp = v
  16494. }
  16495. }
  16496. func (_ fastpathT) DecSliceBoolV(v []bool, canChange bool, d *Decoder) (_ []bool, changed bool) {
  16497. dd := d.d
  16498. slh, containerLenS := d.decSliceHelperStart()
  16499. if containerLenS == 0 {
  16500. if canChange {
  16501. if v == nil {
  16502. v = []bool{}
  16503. } else if len(v) != 0 {
  16504. v = v[:0]
  16505. }
  16506. changed = true
  16507. }
  16508. slh.End()
  16509. return v, changed
  16510. }
  16511. hasLen := containerLenS > 0
  16512. var xlen int
  16513. if hasLen && canChange {
  16514. if containerLenS > cap(v) {
  16515. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1)
  16516. if xlen <= cap(v) {
  16517. v = v[:xlen]
  16518. } else {
  16519. v = make([]bool, xlen)
  16520. }
  16521. changed = true
  16522. } else if containerLenS != len(v) {
  16523. v = v[:containerLenS]
  16524. changed = true
  16525. }
  16526. }
  16527. j := 0
  16528. for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
  16529. if j == 0 && len(v) == 0 {
  16530. if hasLen {
  16531. xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1)
  16532. } else {
  16533. xlen = 8
  16534. }
  16535. v = make([]bool, xlen)
  16536. changed = true
  16537. }
  16538. // if indefinite, etc, then expand the slice if necessary
  16539. var decodeIntoBlank bool
  16540. if j >= len(v) {
  16541. if canChange {
  16542. v = append(v, false)
  16543. changed = true
  16544. } else {
  16545. d.arrayCannotExpand(len(v), j+1)
  16546. decodeIntoBlank = true
  16547. }
  16548. }
  16549. slh.ElemContainerState(j)
  16550. if decodeIntoBlank {
  16551. d.swallow()
  16552. } else {
  16553. v[j] = dd.DecodeBool()
  16554. }
  16555. }
  16556. if canChange {
  16557. if j < len(v) {
  16558. v = v[:j]
  16559. changed = true
  16560. } else if j == 0 && v == nil {
  16561. v = make([]bool, 0)
  16562. changed = true
  16563. }
  16564. }
  16565. slh.End()
  16566. return v, changed
  16567. }
  16568. func (d *Decoder) fastpathDecMapIntfIntfR(f *codecFnInfo, rv reflect.Value) {
  16569. if rv.Kind() == reflect.Ptr {
  16570. vp := rv2i(rv).(*map[interface{}]interface{})
  16571. if v, changed := fastpathTV.DecMapIntfIntfV(*vp, true, d); changed {
  16572. *vp = v
  16573. }
  16574. return
  16575. }
  16576. fastpathTV.DecMapIntfIntfV(rv2i(rv).(map[interface{}]interface{}), false, d)
  16577. }
  16578. func (f fastpathT) DecMapIntfIntfX(vp *map[interface{}]interface{}, d *Decoder) {
  16579. if v, changed := f.DecMapIntfIntfV(*vp, true, d); changed {
  16580. *vp = v
  16581. }
  16582. }
  16583. func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, canChange bool,
  16584. d *Decoder) (_ map[interface{}]interface{}, changed bool) {
  16585. dd, esep := d.d, d.hh.hasElemSeparators()
  16586. containerLen := dd.ReadMapStart()
  16587. if canChange && v == nil {
  16588. xlen := decInferLen(containerLen, d.h.MaxInitLen, 32)
  16589. v = make(map[interface{}]interface{}, xlen)
  16590. changed = true
  16591. }
  16592. if containerLen == 0 {
  16593. dd.ReadMapEnd()
  16594. return v, changed
  16595. }
  16596. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  16597. var mk interface{}
  16598. var mv interface{}
  16599. hasLen := containerLen > 0
  16600. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  16601. if esep {
  16602. dd.ReadMapElemKey()
  16603. }
  16604. mk = nil
  16605. d.decode(&mk)
  16606. if bv, bok := mk.([]byte); bok {
  16607. mk = d.string(bv)
  16608. }
  16609. if esep {
  16610. dd.ReadMapElemValue()
  16611. }
  16612. if dd.TryDecodeAsNil() {
  16613. if d.h.DeleteOnNilMapValue {
  16614. delete(v, mk)
  16615. } else {
  16616. v[mk] = nil
  16617. }
  16618. continue
  16619. }
  16620. if mapGet {
  16621. mv = v[mk]
  16622. } else {
  16623. mv = nil
  16624. }
  16625. d.decode(&mv)
  16626. if v != nil {
  16627. v[mk] = mv
  16628. }
  16629. }
  16630. dd.ReadMapEnd()
  16631. return v, changed
  16632. }
  16633. func (d *Decoder) fastpathDecMapIntfStringR(f *codecFnInfo, rv reflect.Value) {
  16634. if rv.Kind() == reflect.Ptr {
  16635. vp := rv2i(rv).(*map[interface{}]string)
  16636. if v, changed := fastpathTV.DecMapIntfStringV(*vp, true, d); changed {
  16637. *vp = v
  16638. }
  16639. return
  16640. }
  16641. fastpathTV.DecMapIntfStringV(rv2i(rv).(map[interface{}]string), false, d)
  16642. }
  16643. func (f fastpathT) DecMapIntfStringX(vp *map[interface{}]string, d *Decoder) {
  16644. if v, changed := f.DecMapIntfStringV(*vp, true, d); changed {
  16645. *vp = v
  16646. }
  16647. }
  16648. func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, canChange bool,
  16649. d *Decoder) (_ map[interface{}]string, changed bool) {
  16650. dd, esep := d.d, d.hh.hasElemSeparators()
  16651. containerLen := dd.ReadMapStart()
  16652. if canChange && v == nil {
  16653. xlen := decInferLen(containerLen, d.h.MaxInitLen, 32)
  16654. v = make(map[interface{}]string, xlen)
  16655. changed = true
  16656. }
  16657. if containerLen == 0 {
  16658. dd.ReadMapEnd()
  16659. return v, changed
  16660. }
  16661. var mk interface{}
  16662. var mv string
  16663. hasLen := containerLen > 0
  16664. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  16665. if esep {
  16666. dd.ReadMapElemKey()
  16667. }
  16668. mk = nil
  16669. d.decode(&mk)
  16670. if bv, bok := mk.([]byte); bok {
  16671. mk = d.string(bv)
  16672. }
  16673. if esep {
  16674. dd.ReadMapElemValue()
  16675. }
  16676. if dd.TryDecodeAsNil() {
  16677. if d.h.DeleteOnNilMapValue {
  16678. delete(v, mk)
  16679. } else {
  16680. v[mk] = ""
  16681. }
  16682. continue
  16683. }
  16684. mv = dd.DecodeString()
  16685. if v != nil {
  16686. v[mk] = mv
  16687. }
  16688. }
  16689. dd.ReadMapEnd()
  16690. return v, changed
  16691. }
  16692. func (d *Decoder) fastpathDecMapIntfUintR(f *codecFnInfo, rv reflect.Value) {
  16693. if rv.Kind() == reflect.Ptr {
  16694. vp := rv2i(rv).(*map[interface{}]uint)
  16695. if v, changed := fastpathTV.DecMapIntfUintV(*vp, true, d); changed {
  16696. *vp = v
  16697. }
  16698. return
  16699. }
  16700. fastpathTV.DecMapIntfUintV(rv2i(rv).(map[interface{}]uint), false, d)
  16701. }
  16702. func (f fastpathT) DecMapIntfUintX(vp *map[interface{}]uint, d *Decoder) {
  16703. if v, changed := f.DecMapIntfUintV(*vp, true, d); changed {
  16704. *vp = v
  16705. }
  16706. }
  16707. func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, canChange bool,
  16708. d *Decoder) (_ map[interface{}]uint, changed bool) {
  16709. dd, esep := d.d, d.hh.hasElemSeparators()
  16710. containerLen := dd.ReadMapStart()
  16711. if canChange && v == nil {
  16712. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  16713. v = make(map[interface{}]uint, xlen)
  16714. changed = true
  16715. }
  16716. if containerLen == 0 {
  16717. dd.ReadMapEnd()
  16718. return v, changed
  16719. }
  16720. var mk interface{}
  16721. var mv uint
  16722. hasLen := containerLen > 0
  16723. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  16724. if esep {
  16725. dd.ReadMapElemKey()
  16726. }
  16727. mk = nil
  16728. d.decode(&mk)
  16729. if bv, bok := mk.([]byte); bok {
  16730. mk = d.string(bv)
  16731. }
  16732. if esep {
  16733. dd.ReadMapElemValue()
  16734. }
  16735. if dd.TryDecodeAsNil() {
  16736. if d.h.DeleteOnNilMapValue {
  16737. delete(v, mk)
  16738. } else {
  16739. v[mk] = 0
  16740. }
  16741. continue
  16742. }
  16743. mv = uint(dd.DecodeUint(uintBitsize))
  16744. if v != nil {
  16745. v[mk] = mv
  16746. }
  16747. }
  16748. dd.ReadMapEnd()
  16749. return v, changed
  16750. }
  16751. func (d *Decoder) fastpathDecMapIntfUint8R(f *codecFnInfo, rv reflect.Value) {
  16752. if rv.Kind() == reflect.Ptr {
  16753. vp := rv2i(rv).(*map[interface{}]uint8)
  16754. if v, changed := fastpathTV.DecMapIntfUint8V(*vp, true, d); changed {
  16755. *vp = v
  16756. }
  16757. return
  16758. }
  16759. fastpathTV.DecMapIntfUint8V(rv2i(rv).(map[interface{}]uint8), false, d)
  16760. }
  16761. func (f fastpathT) DecMapIntfUint8X(vp *map[interface{}]uint8, d *Decoder) {
  16762. if v, changed := f.DecMapIntfUint8V(*vp, true, d); changed {
  16763. *vp = v
  16764. }
  16765. }
  16766. func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, canChange bool,
  16767. d *Decoder) (_ map[interface{}]uint8, changed bool) {
  16768. dd, esep := d.d, d.hh.hasElemSeparators()
  16769. containerLen := dd.ReadMapStart()
  16770. if canChange && v == nil {
  16771. xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
  16772. v = make(map[interface{}]uint8, xlen)
  16773. changed = true
  16774. }
  16775. if containerLen == 0 {
  16776. dd.ReadMapEnd()
  16777. return v, changed
  16778. }
  16779. var mk interface{}
  16780. var mv uint8
  16781. hasLen := containerLen > 0
  16782. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  16783. if esep {
  16784. dd.ReadMapElemKey()
  16785. }
  16786. mk = nil
  16787. d.decode(&mk)
  16788. if bv, bok := mk.([]byte); bok {
  16789. mk = d.string(bv)
  16790. }
  16791. if esep {
  16792. dd.ReadMapElemValue()
  16793. }
  16794. if dd.TryDecodeAsNil() {
  16795. if d.h.DeleteOnNilMapValue {
  16796. delete(v, mk)
  16797. } else {
  16798. v[mk] = 0
  16799. }
  16800. continue
  16801. }
  16802. mv = uint8(dd.DecodeUint(8))
  16803. if v != nil {
  16804. v[mk] = mv
  16805. }
  16806. }
  16807. dd.ReadMapEnd()
  16808. return v, changed
  16809. }
  16810. func (d *Decoder) fastpathDecMapIntfUint16R(f *codecFnInfo, rv reflect.Value) {
  16811. if rv.Kind() == reflect.Ptr {
  16812. vp := rv2i(rv).(*map[interface{}]uint16)
  16813. if v, changed := fastpathTV.DecMapIntfUint16V(*vp, true, d); changed {
  16814. *vp = v
  16815. }
  16816. return
  16817. }
  16818. fastpathTV.DecMapIntfUint16V(rv2i(rv).(map[interface{}]uint16), false, d)
  16819. }
  16820. func (f fastpathT) DecMapIntfUint16X(vp *map[interface{}]uint16, d *Decoder) {
  16821. if v, changed := f.DecMapIntfUint16V(*vp, true, d); changed {
  16822. *vp = v
  16823. }
  16824. }
  16825. func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, canChange bool,
  16826. d *Decoder) (_ map[interface{}]uint16, changed bool) {
  16827. dd, esep := d.d, d.hh.hasElemSeparators()
  16828. containerLen := dd.ReadMapStart()
  16829. if canChange && v == nil {
  16830. xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
  16831. v = make(map[interface{}]uint16, xlen)
  16832. changed = true
  16833. }
  16834. if containerLen == 0 {
  16835. dd.ReadMapEnd()
  16836. return v, changed
  16837. }
  16838. var mk interface{}
  16839. var mv uint16
  16840. hasLen := containerLen > 0
  16841. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  16842. if esep {
  16843. dd.ReadMapElemKey()
  16844. }
  16845. mk = nil
  16846. d.decode(&mk)
  16847. if bv, bok := mk.([]byte); bok {
  16848. mk = d.string(bv)
  16849. }
  16850. if esep {
  16851. dd.ReadMapElemValue()
  16852. }
  16853. if dd.TryDecodeAsNil() {
  16854. if d.h.DeleteOnNilMapValue {
  16855. delete(v, mk)
  16856. } else {
  16857. v[mk] = 0
  16858. }
  16859. continue
  16860. }
  16861. mv = uint16(dd.DecodeUint(16))
  16862. if v != nil {
  16863. v[mk] = mv
  16864. }
  16865. }
  16866. dd.ReadMapEnd()
  16867. return v, changed
  16868. }
  16869. func (d *Decoder) fastpathDecMapIntfUint32R(f *codecFnInfo, rv reflect.Value) {
  16870. if rv.Kind() == reflect.Ptr {
  16871. vp := rv2i(rv).(*map[interface{}]uint32)
  16872. if v, changed := fastpathTV.DecMapIntfUint32V(*vp, true, d); changed {
  16873. *vp = v
  16874. }
  16875. return
  16876. }
  16877. fastpathTV.DecMapIntfUint32V(rv2i(rv).(map[interface{}]uint32), false, d)
  16878. }
  16879. func (f fastpathT) DecMapIntfUint32X(vp *map[interface{}]uint32, d *Decoder) {
  16880. if v, changed := f.DecMapIntfUint32V(*vp, true, d); changed {
  16881. *vp = v
  16882. }
  16883. }
  16884. func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, canChange bool,
  16885. d *Decoder) (_ map[interface{}]uint32, changed bool) {
  16886. dd, esep := d.d, d.hh.hasElemSeparators()
  16887. containerLen := dd.ReadMapStart()
  16888. if canChange && v == nil {
  16889. xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
  16890. v = make(map[interface{}]uint32, xlen)
  16891. changed = true
  16892. }
  16893. if containerLen == 0 {
  16894. dd.ReadMapEnd()
  16895. return v, changed
  16896. }
  16897. var mk interface{}
  16898. var mv uint32
  16899. hasLen := containerLen > 0
  16900. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  16901. if esep {
  16902. dd.ReadMapElemKey()
  16903. }
  16904. mk = nil
  16905. d.decode(&mk)
  16906. if bv, bok := mk.([]byte); bok {
  16907. mk = d.string(bv)
  16908. }
  16909. if esep {
  16910. dd.ReadMapElemValue()
  16911. }
  16912. if dd.TryDecodeAsNil() {
  16913. if d.h.DeleteOnNilMapValue {
  16914. delete(v, mk)
  16915. } else {
  16916. v[mk] = 0
  16917. }
  16918. continue
  16919. }
  16920. mv = uint32(dd.DecodeUint(32))
  16921. if v != nil {
  16922. v[mk] = mv
  16923. }
  16924. }
  16925. dd.ReadMapEnd()
  16926. return v, changed
  16927. }
  16928. func (d *Decoder) fastpathDecMapIntfUint64R(f *codecFnInfo, rv reflect.Value) {
  16929. if rv.Kind() == reflect.Ptr {
  16930. vp := rv2i(rv).(*map[interface{}]uint64)
  16931. if v, changed := fastpathTV.DecMapIntfUint64V(*vp, true, d); changed {
  16932. *vp = v
  16933. }
  16934. return
  16935. }
  16936. fastpathTV.DecMapIntfUint64V(rv2i(rv).(map[interface{}]uint64), false, d)
  16937. }
  16938. func (f fastpathT) DecMapIntfUint64X(vp *map[interface{}]uint64, d *Decoder) {
  16939. if v, changed := f.DecMapIntfUint64V(*vp, true, d); changed {
  16940. *vp = v
  16941. }
  16942. }
  16943. func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, canChange bool,
  16944. d *Decoder) (_ map[interface{}]uint64, changed bool) {
  16945. dd, esep := d.d, d.hh.hasElemSeparators()
  16946. containerLen := dd.ReadMapStart()
  16947. if canChange && v == nil {
  16948. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  16949. v = make(map[interface{}]uint64, xlen)
  16950. changed = true
  16951. }
  16952. if containerLen == 0 {
  16953. dd.ReadMapEnd()
  16954. return v, changed
  16955. }
  16956. var mk interface{}
  16957. var mv uint64
  16958. hasLen := containerLen > 0
  16959. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  16960. if esep {
  16961. dd.ReadMapElemKey()
  16962. }
  16963. mk = nil
  16964. d.decode(&mk)
  16965. if bv, bok := mk.([]byte); bok {
  16966. mk = d.string(bv)
  16967. }
  16968. if esep {
  16969. dd.ReadMapElemValue()
  16970. }
  16971. if dd.TryDecodeAsNil() {
  16972. if d.h.DeleteOnNilMapValue {
  16973. delete(v, mk)
  16974. } else {
  16975. v[mk] = 0
  16976. }
  16977. continue
  16978. }
  16979. mv = dd.DecodeUint(64)
  16980. if v != nil {
  16981. v[mk] = mv
  16982. }
  16983. }
  16984. dd.ReadMapEnd()
  16985. return v, changed
  16986. }
  16987. func (d *Decoder) fastpathDecMapIntfUintptrR(f *codecFnInfo, rv reflect.Value) {
  16988. if rv.Kind() == reflect.Ptr {
  16989. vp := rv2i(rv).(*map[interface{}]uintptr)
  16990. if v, changed := fastpathTV.DecMapIntfUintptrV(*vp, true, d); changed {
  16991. *vp = v
  16992. }
  16993. return
  16994. }
  16995. fastpathTV.DecMapIntfUintptrV(rv2i(rv).(map[interface{}]uintptr), false, d)
  16996. }
  16997. func (f fastpathT) DecMapIntfUintptrX(vp *map[interface{}]uintptr, d *Decoder) {
  16998. if v, changed := f.DecMapIntfUintptrV(*vp, true, d); changed {
  16999. *vp = v
  17000. }
  17001. }
  17002. func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, canChange bool,
  17003. d *Decoder) (_ map[interface{}]uintptr, changed bool) {
  17004. dd, esep := d.d, d.hh.hasElemSeparators()
  17005. containerLen := dd.ReadMapStart()
  17006. if canChange && v == nil {
  17007. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  17008. v = make(map[interface{}]uintptr, xlen)
  17009. changed = true
  17010. }
  17011. if containerLen == 0 {
  17012. dd.ReadMapEnd()
  17013. return v, changed
  17014. }
  17015. var mk interface{}
  17016. var mv uintptr
  17017. hasLen := containerLen > 0
  17018. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17019. if esep {
  17020. dd.ReadMapElemKey()
  17021. }
  17022. mk = nil
  17023. d.decode(&mk)
  17024. if bv, bok := mk.([]byte); bok {
  17025. mk = d.string(bv)
  17026. }
  17027. if esep {
  17028. dd.ReadMapElemValue()
  17029. }
  17030. if dd.TryDecodeAsNil() {
  17031. if d.h.DeleteOnNilMapValue {
  17032. delete(v, mk)
  17033. } else {
  17034. v[mk] = 0
  17035. }
  17036. continue
  17037. }
  17038. mv = uintptr(dd.DecodeUint(uintBitsize))
  17039. if v != nil {
  17040. v[mk] = mv
  17041. }
  17042. }
  17043. dd.ReadMapEnd()
  17044. return v, changed
  17045. }
  17046. func (d *Decoder) fastpathDecMapIntfIntR(f *codecFnInfo, rv reflect.Value) {
  17047. if rv.Kind() == reflect.Ptr {
  17048. vp := rv2i(rv).(*map[interface{}]int)
  17049. if v, changed := fastpathTV.DecMapIntfIntV(*vp, true, d); changed {
  17050. *vp = v
  17051. }
  17052. return
  17053. }
  17054. fastpathTV.DecMapIntfIntV(rv2i(rv).(map[interface{}]int), false, d)
  17055. }
  17056. func (f fastpathT) DecMapIntfIntX(vp *map[interface{}]int, d *Decoder) {
  17057. if v, changed := f.DecMapIntfIntV(*vp, true, d); changed {
  17058. *vp = v
  17059. }
  17060. }
  17061. func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, canChange bool,
  17062. d *Decoder) (_ map[interface{}]int, changed bool) {
  17063. dd, esep := d.d, d.hh.hasElemSeparators()
  17064. containerLen := dd.ReadMapStart()
  17065. if canChange && v == nil {
  17066. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  17067. v = make(map[interface{}]int, xlen)
  17068. changed = true
  17069. }
  17070. if containerLen == 0 {
  17071. dd.ReadMapEnd()
  17072. return v, changed
  17073. }
  17074. var mk interface{}
  17075. var mv int
  17076. hasLen := containerLen > 0
  17077. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17078. if esep {
  17079. dd.ReadMapElemKey()
  17080. }
  17081. mk = nil
  17082. d.decode(&mk)
  17083. if bv, bok := mk.([]byte); bok {
  17084. mk = d.string(bv)
  17085. }
  17086. if esep {
  17087. dd.ReadMapElemValue()
  17088. }
  17089. if dd.TryDecodeAsNil() {
  17090. if d.h.DeleteOnNilMapValue {
  17091. delete(v, mk)
  17092. } else {
  17093. v[mk] = 0
  17094. }
  17095. continue
  17096. }
  17097. mv = int(dd.DecodeInt(intBitsize))
  17098. if v != nil {
  17099. v[mk] = mv
  17100. }
  17101. }
  17102. dd.ReadMapEnd()
  17103. return v, changed
  17104. }
  17105. func (d *Decoder) fastpathDecMapIntfInt8R(f *codecFnInfo, rv reflect.Value) {
  17106. if rv.Kind() == reflect.Ptr {
  17107. vp := rv2i(rv).(*map[interface{}]int8)
  17108. if v, changed := fastpathTV.DecMapIntfInt8V(*vp, true, d); changed {
  17109. *vp = v
  17110. }
  17111. return
  17112. }
  17113. fastpathTV.DecMapIntfInt8V(rv2i(rv).(map[interface{}]int8), false, d)
  17114. }
  17115. func (f fastpathT) DecMapIntfInt8X(vp *map[interface{}]int8, d *Decoder) {
  17116. if v, changed := f.DecMapIntfInt8V(*vp, true, d); changed {
  17117. *vp = v
  17118. }
  17119. }
  17120. func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, canChange bool,
  17121. d *Decoder) (_ map[interface{}]int8, changed bool) {
  17122. dd, esep := d.d, d.hh.hasElemSeparators()
  17123. containerLen := dd.ReadMapStart()
  17124. if canChange && v == nil {
  17125. xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
  17126. v = make(map[interface{}]int8, xlen)
  17127. changed = true
  17128. }
  17129. if containerLen == 0 {
  17130. dd.ReadMapEnd()
  17131. return v, changed
  17132. }
  17133. var mk interface{}
  17134. var mv int8
  17135. hasLen := containerLen > 0
  17136. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17137. if esep {
  17138. dd.ReadMapElemKey()
  17139. }
  17140. mk = nil
  17141. d.decode(&mk)
  17142. if bv, bok := mk.([]byte); bok {
  17143. mk = d.string(bv)
  17144. }
  17145. if esep {
  17146. dd.ReadMapElemValue()
  17147. }
  17148. if dd.TryDecodeAsNil() {
  17149. if d.h.DeleteOnNilMapValue {
  17150. delete(v, mk)
  17151. } else {
  17152. v[mk] = 0
  17153. }
  17154. continue
  17155. }
  17156. mv = int8(dd.DecodeInt(8))
  17157. if v != nil {
  17158. v[mk] = mv
  17159. }
  17160. }
  17161. dd.ReadMapEnd()
  17162. return v, changed
  17163. }
  17164. func (d *Decoder) fastpathDecMapIntfInt16R(f *codecFnInfo, rv reflect.Value) {
  17165. if rv.Kind() == reflect.Ptr {
  17166. vp := rv2i(rv).(*map[interface{}]int16)
  17167. if v, changed := fastpathTV.DecMapIntfInt16V(*vp, true, d); changed {
  17168. *vp = v
  17169. }
  17170. return
  17171. }
  17172. fastpathTV.DecMapIntfInt16V(rv2i(rv).(map[interface{}]int16), false, d)
  17173. }
  17174. func (f fastpathT) DecMapIntfInt16X(vp *map[interface{}]int16, d *Decoder) {
  17175. if v, changed := f.DecMapIntfInt16V(*vp, true, d); changed {
  17176. *vp = v
  17177. }
  17178. }
  17179. func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, canChange bool,
  17180. d *Decoder) (_ map[interface{}]int16, changed bool) {
  17181. dd, esep := d.d, d.hh.hasElemSeparators()
  17182. containerLen := dd.ReadMapStart()
  17183. if canChange && v == nil {
  17184. xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
  17185. v = make(map[interface{}]int16, xlen)
  17186. changed = true
  17187. }
  17188. if containerLen == 0 {
  17189. dd.ReadMapEnd()
  17190. return v, changed
  17191. }
  17192. var mk interface{}
  17193. var mv int16
  17194. hasLen := containerLen > 0
  17195. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17196. if esep {
  17197. dd.ReadMapElemKey()
  17198. }
  17199. mk = nil
  17200. d.decode(&mk)
  17201. if bv, bok := mk.([]byte); bok {
  17202. mk = d.string(bv)
  17203. }
  17204. if esep {
  17205. dd.ReadMapElemValue()
  17206. }
  17207. if dd.TryDecodeAsNil() {
  17208. if d.h.DeleteOnNilMapValue {
  17209. delete(v, mk)
  17210. } else {
  17211. v[mk] = 0
  17212. }
  17213. continue
  17214. }
  17215. mv = int16(dd.DecodeInt(16))
  17216. if v != nil {
  17217. v[mk] = mv
  17218. }
  17219. }
  17220. dd.ReadMapEnd()
  17221. return v, changed
  17222. }
  17223. func (d *Decoder) fastpathDecMapIntfInt32R(f *codecFnInfo, rv reflect.Value) {
  17224. if rv.Kind() == reflect.Ptr {
  17225. vp := rv2i(rv).(*map[interface{}]int32)
  17226. if v, changed := fastpathTV.DecMapIntfInt32V(*vp, true, d); changed {
  17227. *vp = v
  17228. }
  17229. return
  17230. }
  17231. fastpathTV.DecMapIntfInt32V(rv2i(rv).(map[interface{}]int32), false, d)
  17232. }
  17233. func (f fastpathT) DecMapIntfInt32X(vp *map[interface{}]int32, d *Decoder) {
  17234. if v, changed := f.DecMapIntfInt32V(*vp, true, d); changed {
  17235. *vp = v
  17236. }
  17237. }
  17238. func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, canChange bool,
  17239. d *Decoder) (_ map[interface{}]int32, changed bool) {
  17240. dd, esep := d.d, d.hh.hasElemSeparators()
  17241. containerLen := dd.ReadMapStart()
  17242. if canChange && v == nil {
  17243. xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
  17244. v = make(map[interface{}]int32, xlen)
  17245. changed = true
  17246. }
  17247. if containerLen == 0 {
  17248. dd.ReadMapEnd()
  17249. return v, changed
  17250. }
  17251. var mk interface{}
  17252. var mv int32
  17253. hasLen := containerLen > 0
  17254. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17255. if esep {
  17256. dd.ReadMapElemKey()
  17257. }
  17258. mk = nil
  17259. d.decode(&mk)
  17260. if bv, bok := mk.([]byte); bok {
  17261. mk = d.string(bv)
  17262. }
  17263. if esep {
  17264. dd.ReadMapElemValue()
  17265. }
  17266. if dd.TryDecodeAsNil() {
  17267. if d.h.DeleteOnNilMapValue {
  17268. delete(v, mk)
  17269. } else {
  17270. v[mk] = 0
  17271. }
  17272. continue
  17273. }
  17274. mv = int32(dd.DecodeInt(32))
  17275. if v != nil {
  17276. v[mk] = mv
  17277. }
  17278. }
  17279. dd.ReadMapEnd()
  17280. return v, changed
  17281. }
  17282. func (d *Decoder) fastpathDecMapIntfInt64R(f *codecFnInfo, rv reflect.Value) {
  17283. if rv.Kind() == reflect.Ptr {
  17284. vp := rv2i(rv).(*map[interface{}]int64)
  17285. if v, changed := fastpathTV.DecMapIntfInt64V(*vp, true, d); changed {
  17286. *vp = v
  17287. }
  17288. return
  17289. }
  17290. fastpathTV.DecMapIntfInt64V(rv2i(rv).(map[interface{}]int64), false, d)
  17291. }
  17292. func (f fastpathT) DecMapIntfInt64X(vp *map[interface{}]int64, d *Decoder) {
  17293. if v, changed := f.DecMapIntfInt64V(*vp, true, d); changed {
  17294. *vp = v
  17295. }
  17296. }
  17297. func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, canChange bool,
  17298. d *Decoder) (_ map[interface{}]int64, changed bool) {
  17299. dd, esep := d.d, d.hh.hasElemSeparators()
  17300. containerLen := dd.ReadMapStart()
  17301. if canChange && v == nil {
  17302. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  17303. v = make(map[interface{}]int64, xlen)
  17304. changed = true
  17305. }
  17306. if containerLen == 0 {
  17307. dd.ReadMapEnd()
  17308. return v, changed
  17309. }
  17310. var mk interface{}
  17311. var mv int64
  17312. hasLen := containerLen > 0
  17313. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17314. if esep {
  17315. dd.ReadMapElemKey()
  17316. }
  17317. mk = nil
  17318. d.decode(&mk)
  17319. if bv, bok := mk.([]byte); bok {
  17320. mk = d.string(bv)
  17321. }
  17322. if esep {
  17323. dd.ReadMapElemValue()
  17324. }
  17325. if dd.TryDecodeAsNil() {
  17326. if d.h.DeleteOnNilMapValue {
  17327. delete(v, mk)
  17328. } else {
  17329. v[mk] = 0
  17330. }
  17331. continue
  17332. }
  17333. mv = dd.DecodeInt(64)
  17334. if v != nil {
  17335. v[mk] = mv
  17336. }
  17337. }
  17338. dd.ReadMapEnd()
  17339. return v, changed
  17340. }
  17341. func (d *Decoder) fastpathDecMapIntfFloat32R(f *codecFnInfo, rv reflect.Value) {
  17342. if rv.Kind() == reflect.Ptr {
  17343. vp := rv2i(rv).(*map[interface{}]float32)
  17344. if v, changed := fastpathTV.DecMapIntfFloat32V(*vp, true, d); changed {
  17345. *vp = v
  17346. }
  17347. return
  17348. }
  17349. fastpathTV.DecMapIntfFloat32V(rv2i(rv).(map[interface{}]float32), false, d)
  17350. }
  17351. func (f fastpathT) DecMapIntfFloat32X(vp *map[interface{}]float32, d *Decoder) {
  17352. if v, changed := f.DecMapIntfFloat32V(*vp, true, d); changed {
  17353. *vp = v
  17354. }
  17355. }
  17356. func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, canChange bool,
  17357. d *Decoder) (_ map[interface{}]float32, changed bool) {
  17358. dd, esep := d.d, d.hh.hasElemSeparators()
  17359. containerLen := dd.ReadMapStart()
  17360. if canChange && v == nil {
  17361. xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
  17362. v = make(map[interface{}]float32, xlen)
  17363. changed = true
  17364. }
  17365. if containerLen == 0 {
  17366. dd.ReadMapEnd()
  17367. return v, changed
  17368. }
  17369. var mk interface{}
  17370. var mv float32
  17371. hasLen := containerLen > 0
  17372. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17373. if esep {
  17374. dd.ReadMapElemKey()
  17375. }
  17376. mk = nil
  17377. d.decode(&mk)
  17378. if bv, bok := mk.([]byte); bok {
  17379. mk = d.string(bv)
  17380. }
  17381. if esep {
  17382. dd.ReadMapElemValue()
  17383. }
  17384. if dd.TryDecodeAsNil() {
  17385. if d.h.DeleteOnNilMapValue {
  17386. delete(v, mk)
  17387. } else {
  17388. v[mk] = 0
  17389. }
  17390. continue
  17391. }
  17392. mv = float32(dd.DecodeFloat(true))
  17393. if v != nil {
  17394. v[mk] = mv
  17395. }
  17396. }
  17397. dd.ReadMapEnd()
  17398. return v, changed
  17399. }
  17400. func (d *Decoder) fastpathDecMapIntfFloat64R(f *codecFnInfo, rv reflect.Value) {
  17401. if rv.Kind() == reflect.Ptr {
  17402. vp := rv2i(rv).(*map[interface{}]float64)
  17403. if v, changed := fastpathTV.DecMapIntfFloat64V(*vp, true, d); changed {
  17404. *vp = v
  17405. }
  17406. return
  17407. }
  17408. fastpathTV.DecMapIntfFloat64V(rv2i(rv).(map[interface{}]float64), false, d)
  17409. }
  17410. func (f fastpathT) DecMapIntfFloat64X(vp *map[interface{}]float64, d *Decoder) {
  17411. if v, changed := f.DecMapIntfFloat64V(*vp, true, d); changed {
  17412. *vp = v
  17413. }
  17414. }
  17415. func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, canChange bool,
  17416. d *Decoder) (_ map[interface{}]float64, changed bool) {
  17417. dd, esep := d.d, d.hh.hasElemSeparators()
  17418. containerLen := dd.ReadMapStart()
  17419. if canChange && v == nil {
  17420. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  17421. v = make(map[interface{}]float64, xlen)
  17422. changed = true
  17423. }
  17424. if containerLen == 0 {
  17425. dd.ReadMapEnd()
  17426. return v, changed
  17427. }
  17428. var mk interface{}
  17429. var mv float64
  17430. hasLen := containerLen > 0
  17431. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17432. if esep {
  17433. dd.ReadMapElemKey()
  17434. }
  17435. mk = nil
  17436. d.decode(&mk)
  17437. if bv, bok := mk.([]byte); bok {
  17438. mk = d.string(bv)
  17439. }
  17440. if esep {
  17441. dd.ReadMapElemValue()
  17442. }
  17443. if dd.TryDecodeAsNil() {
  17444. if d.h.DeleteOnNilMapValue {
  17445. delete(v, mk)
  17446. } else {
  17447. v[mk] = 0
  17448. }
  17449. continue
  17450. }
  17451. mv = dd.DecodeFloat(false)
  17452. if v != nil {
  17453. v[mk] = mv
  17454. }
  17455. }
  17456. dd.ReadMapEnd()
  17457. return v, changed
  17458. }
  17459. func (d *Decoder) fastpathDecMapIntfBoolR(f *codecFnInfo, rv reflect.Value) {
  17460. if rv.Kind() == reflect.Ptr {
  17461. vp := rv2i(rv).(*map[interface{}]bool)
  17462. if v, changed := fastpathTV.DecMapIntfBoolV(*vp, true, d); changed {
  17463. *vp = v
  17464. }
  17465. return
  17466. }
  17467. fastpathTV.DecMapIntfBoolV(rv2i(rv).(map[interface{}]bool), false, d)
  17468. }
  17469. func (f fastpathT) DecMapIntfBoolX(vp *map[interface{}]bool, d *Decoder) {
  17470. if v, changed := f.DecMapIntfBoolV(*vp, true, d); changed {
  17471. *vp = v
  17472. }
  17473. }
  17474. func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, canChange bool,
  17475. d *Decoder) (_ map[interface{}]bool, changed bool) {
  17476. dd, esep := d.d, d.hh.hasElemSeparators()
  17477. containerLen := dd.ReadMapStart()
  17478. if canChange && v == nil {
  17479. xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
  17480. v = make(map[interface{}]bool, xlen)
  17481. changed = true
  17482. }
  17483. if containerLen == 0 {
  17484. dd.ReadMapEnd()
  17485. return v, changed
  17486. }
  17487. var mk interface{}
  17488. var mv bool
  17489. hasLen := containerLen > 0
  17490. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17491. if esep {
  17492. dd.ReadMapElemKey()
  17493. }
  17494. mk = nil
  17495. d.decode(&mk)
  17496. if bv, bok := mk.([]byte); bok {
  17497. mk = d.string(bv)
  17498. }
  17499. if esep {
  17500. dd.ReadMapElemValue()
  17501. }
  17502. if dd.TryDecodeAsNil() {
  17503. if d.h.DeleteOnNilMapValue {
  17504. delete(v, mk)
  17505. } else {
  17506. v[mk] = false
  17507. }
  17508. continue
  17509. }
  17510. mv = dd.DecodeBool()
  17511. if v != nil {
  17512. v[mk] = mv
  17513. }
  17514. }
  17515. dd.ReadMapEnd()
  17516. return v, changed
  17517. }
  17518. func (d *Decoder) fastpathDecMapStringIntfR(f *codecFnInfo, rv reflect.Value) {
  17519. if rv.Kind() == reflect.Ptr {
  17520. vp := rv2i(rv).(*map[string]interface{})
  17521. if v, changed := fastpathTV.DecMapStringIntfV(*vp, true, d); changed {
  17522. *vp = v
  17523. }
  17524. return
  17525. }
  17526. fastpathTV.DecMapStringIntfV(rv2i(rv).(map[string]interface{}), false, d)
  17527. }
  17528. func (f fastpathT) DecMapStringIntfX(vp *map[string]interface{}, d *Decoder) {
  17529. if v, changed := f.DecMapStringIntfV(*vp, true, d); changed {
  17530. *vp = v
  17531. }
  17532. }
  17533. func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, canChange bool,
  17534. d *Decoder) (_ map[string]interface{}, changed bool) {
  17535. dd, esep := d.d, d.hh.hasElemSeparators()
  17536. containerLen := dd.ReadMapStart()
  17537. if canChange && v == nil {
  17538. xlen := decInferLen(containerLen, d.h.MaxInitLen, 32)
  17539. v = make(map[string]interface{}, xlen)
  17540. changed = true
  17541. }
  17542. if containerLen == 0 {
  17543. dd.ReadMapEnd()
  17544. return v, changed
  17545. }
  17546. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  17547. var mk string
  17548. var mv interface{}
  17549. hasLen := containerLen > 0
  17550. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17551. if esep {
  17552. dd.ReadMapElemKey()
  17553. }
  17554. mk = dd.DecodeString()
  17555. if esep {
  17556. dd.ReadMapElemValue()
  17557. }
  17558. if dd.TryDecodeAsNil() {
  17559. if d.h.DeleteOnNilMapValue {
  17560. delete(v, mk)
  17561. } else {
  17562. v[mk] = nil
  17563. }
  17564. continue
  17565. }
  17566. if mapGet {
  17567. mv = v[mk]
  17568. } else {
  17569. mv = nil
  17570. }
  17571. d.decode(&mv)
  17572. if v != nil {
  17573. v[mk] = mv
  17574. }
  17575. }
  17576. dd.ReadMapEnd()
  17577. return v, changed
  17578. }
  17579. func (d *Decoder) fastpathDecMapStringStringR(f *codecFnInfo, rv reflect.Value) {
  17580. if rv.Kind() == reflect.Ptr {
  17581. vp := rv2i(rv).(*map[string]string)
  17582. if v, changed := fastpathTV.DecMapStringStringV(*vp, true, d); changed {
  17583. *vp = v
  17584. }
  17585. return
  17586. }
  17587. fastpathTV.DecMapStringStringV(rv2i(rv).(map[string]string), false, d)
  17588. }
  17589. func (f fastpathT) DecMapStringStringX(vp *map[string]string, d *Decoder) {
  17590. if v, changed := f.DecMapStringStringV(*vp, true, d); changed {
  17591. *vp = v
  17592. }
  17593. }
  17594. func (_ fastpathT) DecMapStringStringV(v map[string]string, canChange bool,
  17595. d *Decoder) (_ map[string]string, changed bool) {
  17596. dd, esep := d.d, d.hh.hasElemSeparators()
  17597. containerLen := dd.ReadMapStart()
  17598. if canChange && v == nil {
  17599. xlen := decInferLen(containerLen, d.h.MaxInitLen, 32)
  17600. v = make(map[string]string, xlen)
  17601. changed = true
  17602. }
  17603. if containerLen == 0 {
  17604. dd.ReadMapEnd()
  17605. return v, changed
  17606. }
  17607. var mk string
  17608. var mv string
  17609. hasLen := containerLen > 0
  17610. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17611. if esep {
  17612. dd.ReadMapElemKey()
  17613. }
  17614. mk = dd.DecodeString()
  17615. if esep {
  17616. dd.ReadMapElemValue()
  17617. }
  17618. if dd.TryDecodeAsNil() {
  17619. if d.h.DeleteOnNilMapValue {
  17620. delete(v, mk)
  17621. } else {
  17622. v[mk] = ""
  17623. }
  17624. continue
  17625. }
  17626. mv = dd.DecodeString()
  17627. if v != nil {
  17628. v[mk] = mv
  17629. }
  17630. }
  17631. dd.ReadMapEnd()
  17632. return v, changed
  17633. }
  17634. func (d *Decoder) fastpathDecMapStringUintR(f *codecFnInfo, rv reflect.Value) {
  17635. if rv.Kind() == reflect.Ptr {
  17636. vp := rv2i(rv).(*map[string]uint)
  17637. if v, changed := fastpathTV.DecMapStringUintV(*vp, true, d); changed {
  17638. *vp = v
  17639. }
  17640. return
  17641. }
  17642. fastpathTV.DecMapStringUintV(rv2i(rv).(map[string]uint), false, d)
  17643. }
  17644. func (f fastpathT) DecMapStringUintX(vp *map[string]uint, d *Decoder) {
  17645. if v, changed := f.DecMapStringUintV(*vp, true, d); changed {
  17646. *vp = v
  17647. }
  17648. }
  17649. func (_ fastpathT) DecMapStringUintV(v map[string]uint, canChange bool,
  17650. d *Decoder) (_ map[string]uint, changed bool) {
  17651. dd, esep := d.d, d.hh.hasElemSeparators()
  17652. containerLen := dd.ReadMapStart()
  17653. if canChange && v == nil {
  17654. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  17655. v = make(map[string]uint, xlen)
  17656. changed = true
  17657. }
  17658. if containerLen == 0 {
  17659. dd.ReadMapEnd()
  17660. return v, changed
  17661. }
  17662. var mk string
  17663. var mv uint
  17664. hasLen := containerLen > 0
  17665. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17666. if esep {
  17667. dd.ReadMapElemKey()
  17668. }
  17669. mk = dd.DecodeString()
  17670. if esep {
  17671. dd.ReadMapElemValue()
  17672. }
  17673. if dd.TryDecodeAsNil() {
  17674. if d.h.DeleteOnNilMapValue {
  17675. delete(v, mk)
  17676. } else {
  17677. v[mk] = 0
  17678. }
  17679. continue
  17680. }
  17681. mv = uint(dd.DecodeUint(uintBitsize))
  17682. if v != nil {
  17683. v[mk] = mv
  17684. }
  17685. }
  17686. dd.ReadMapEnd()
  17687. return v, changed
  17688. }
  17689. func (d *Decoder) fastpathDecMapStringUint8R(f *codecFnInfo, rv reflect.Value) {
  17690. if rv.Kind() == reflect.Ptr {
  17691. vp := rv2i(rv).(*map[string]uint8)
  17692. if v, changed := fastpathTV.DecMapStringUint8V(*vp, true, d); changed {
  17693. *vp = v
  17694. }
  17695. return
  17696. }
  17697. fastpathTV.DecMapStringUint8V(rv2i(rv).(map[string]uint8), false, d)
  17698. }
  17699. func (f fastpathT) DecMapStringUint8X(vp *map[string]uint8, d *Decoder) {
  17700. if v, changed := f.DecMapStringUint8V(*vp, true, d); changed {
  17701. *vp = v
  17702. }
  17703. }
  17704. func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, canChange bool,
  17705. d *Decoder) (_ map[string]uint8, changed bool) {
  17706. dd, esep := d.d, d.hh.hasElemSeparators()
  17707. containerLen := dd.ReadMapStart()
  17708. if canChange && v == nil {
  17709. xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
  17710. v = make(map[string]uint8, xlen)
  17711. changed = true
  17712. }
  17713. if containerLen == 0 {
  17714. dd.ReadMapEnd()
  17715. return v, changed
  17716. }
  17717. var mk string
  17718. var mv uint8
  17719. hasLen := containerLen > 0
  17720. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17721. if esep {
  17722. dd.ReadMapElemKey()
  17723. }
  17724. mk = dd.DecodeString()
  17725. if esep {
  17726. dd.ReadMapElemValue()
  17727. }
  17728. if dd.TryDecodeAsNil() {
  17729. if d.h.DeleteOnNilMapValue {
  17730. delete(v, mk)
  17731. } else {
  17732. v[mk] = 0
  17733. }
  17734. continue
  17735. }
  17736. mv = uint8(dd.DecodeUint(8))
  17737. if v != nil {
  17738. v[mk] = mv
  17739. }
  17740. }
  17741. dd.ReadMapEnd()
  17742. return v, changed
  17743. }
  17744. func (d *Decoder) fastpathDecMapStringUint16R(f *codecFnInfo, rv reflect.Value) {
  17745. if rv.Kind() == reflect.Ptr {
  17746. vp := rv2i(rv).(*map[string]uint16)
  17747. if v, changed := fastpathTV.DecMapStringUint16V(*vp, true, d); changed {
  17748. *vp = v
  17749. }
  17750. return
  17751. }
  17752. fastpathTV.DecMapStringUint16V(rv2i(rv).(map[string]uint16), false, d)
  17753. }
  17754. func (f fastpathT) DecMapStringUint16X(vp *map[string]uint16, d *Decoder) {
  17755. if v, changed := f.DecMapStringUint16V(*vp, true, d); changed {
  17756. *vp = v
  17757. }
  17758. }
  17759. func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, canChange bool,
  17760. d *Decoder) (_ map[string]uint16, changed bool) {
  17761. dd, esep := d.d, d.hh.hasElemSeparators()
  17762. containerLen := dd.ReadMapStart()
  17763. if canChange && v == nil {
  17764. xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
  17765. v = make(map[string]uint16, xlen)
  17766. changed = true
  17767. }
  17768. if containerLen == 0 {
  17769. dd.ReadMapEnd()
  17770. return v, changed
  17771. }
  17772. var mk string
  17773. var mv uint16
  17774. hasLen := containerLen > 0
  17775. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17776. if esep {
  17777. dd.ReadMapElemKey()
  17778. }
  17779. mk = dd.DecodeString()
  17780. if esep {
  17781. dd.ReadMapElemValue()
  17782. }
  17783. if dd.TryDecodeAsNil() {
  17784. if d.h.DeleteOnNilMapValue {
  17785. delete(v, mk)
  17786. } else {
  17787. v[mk] = 0
  17788. }
  17789. continue
  17790. }
  17791. mv = uint16(dd.DecodeUint(16))
  17792. if v != nil {
  17793. v[mk] = mv
  17794. }
  17795. }
  17796. dd.ReadMapEnd()
  17797. return v, changed
  17798. }
  17799. func (d *Decoder) fastpathDecMapStringUint32R(f *codecFnInfo, rv reflect.Value) {
  17800. if rv.Kind() == reflect.Ptr {
  17801. vp := rv2i(rv).(*map[string]uint32)
  17802. if v, changed := fastpathTV.DecMapStringUint32V(*vp, true, d); changed {
  17803. *vp = v
  17804. }
  17805. return
  17806. }
  17807. fastpathTV.DecMapStringUint32V(rv2i(rv).(map[string]uint32), false, d)
  17808. }
  17809. func (f fastpathT) DecMapStringUint32X(vp *map[string]uint32, d *Decoder) {
  17810. if v, changed := f.DecMapStringUint32V(*vp, true, d); changed {
  17811. *vp = v
  17812. }
  17813. }
  17814. func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, canChange bool,
  17815. d *Decoder) (_ map[string]uint32, changed bool) {
  17816. dd, esep := d.d, d.hh.hasElemSeparators()
  17817. containerLen := dd.ReadMapStart()
  17818. if canChange && v == nil {
  17819. xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
  17820. v = make(map[string]uint32, xlen)
  17821. changed = true
  17822. }
  17823. if containerLen == 0 {
  17824. dd.ReadMapEnd()
  17825. return v, changed
  17826. }
  17827. var mk string
  17828. var mv uint32
  17829. hasLen := containerLen > 0
  17830. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17831. if esep {
  17832. dd.ReadMapElemKey()
  17833. }
  17834. mk = dd.DecodeString()
  17835. if esep {
  17836. dd.ReadMapElemValue()
  17837. }
  17838. if dd.TryDecodeAsNil() {
  17839. if d.h.DeleteOnNilMapValue {
  17840. delete(v, mk)
  17841. } else {
  17842. v[mk] = 0
  17843. }
  17844. continue
  17845. }
  17846. mv = uint32(dd.DecodeUint(32))
  17847. if v != nil {
  17848. v[mk] = mv
  17849. }
  17850. }
  17851. dd.ReadMapEnd()
  17852. return v, changed
  17853. }
  17854. func (d *Decoder) fastpathDecMapStringUint64R(f *codecFnInfo, rv reflect.Value) {
  17855. if rv.Kind() == reflect.Ptr {
  17856. vp := rv2i(rv).(*map[string]uint64)
  17857. if v, changed := fastpathTV.DecMapStringUint64V(*vp, true, d); changed {
  17858. *vp = v
  17859. }
  17860. return
  17861. }
  17862. fastpathTV.DecMapStringUint64V(rv2i(rv).(map[string]uint64), false, d)
  17863. }
  17864. func (f fastpathT) DecMapStringUint64X(vp *map[string]uint64, d *Decoder) {
  17865. if v, changed := f.DecMapStringUint64V(*vp, true, d); changed {
  17866. *vp = v
  17867. }
  17868. }
  17869. func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, canChange bool,
  17870. d *Decoder) (_ map[string]uint64, changed bool) {
  17871. dd, esep := d.d, d.hh.hasElemSeparators()
  17872. containerLen := dd.ReadMapStart()
  17873. if canChange && v == nil {
  17874. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  17875. v = make(map[string]uint64, xlen)
  17876. changed = true
  17877. }
  17878. if containerLen == 0 {
  17879. dd.ReadMapEnd()
  17880. return v, changed
  17881. }
  17882. var mk string
  17883. var mv uint64
  17884. hasLen := containerLen > 0
  17885. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17886. if esep {
  17887. dd.ReadMapElemKey()
  17888. }
  17889. mk = dd.DecodeString()
  17890. if esep {
  17891. dd.ReadMapElemValue()
  17892. }
  17893. if dd.TryDecodeAsNil() {
  17894. if d.h.DeleteOnNilMapValue {
  17895. delete(v, mk)
  17896. } else {
  17897. v[mk] = 0
  17898. }
  17899. continue
  17900. }
  17901. mv = dd.DecodeUint(64)
  17902. if v != nil {
  17903. v[mk] = mv
  17904. }
  17905. }
  17906. dd.ReadMapEnd()
  17907. return v, changed
  17908. }
  17909. func (d *Decoder) fastpathDecMapStringUintptrR(f *codecFnInfo, rv reflect.Value) {
  17910. if rv.Kind() == reflect.Ptr {
  17911. vp := rv2i(rv).(*map[string]uintptr)
  17912. if v, changed := fastpathTV.DecMapStringUintptrV(*vp, true, d); changed {
  17913. *vp = v
  17914. }
  17915. return
  17916. }
  17917. fastpathTV.DecMapStringUintptrV(rv2i(rv).(map[string]uintptr), false, d)
  17918. }
  17919. func (f fastpathT) DecMapStringUintptrX(vp *map[string]uintptr, d *Decoder) {
  17920. if v, changed := f.DecMapStringUintptrV(*vp, true, d); changed {
  17921. *vp = v
  17922. }
  17923. }
  17924. func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, canChange bool,
  17925. d *Decoder) (_ map[string]uintptr, changed bool) {
  17926. dd, esep := d.d, d.hh.hasElemSeparators()
  17927. containerLen := dd.ReadMapStart()
  17928. if canChange && v == nil {
  17929. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  17930. v = make(map[string]uintptr, xlen)
  17931. changed = true
  17932. }
  17933. if containerLen == 0 {
  17934. dd.ReadMapEnd()
  17935. return v, changed
  17936. }
  17937. var mk string
  17938. var mv uintptr
  17939. hasLen := containerLen > 0
  17940. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17941. if esep {
  17942. dd.ReadMapElemKey()
  17943. }
  17944. mk = dd.DecodeString()
  17945. if esep {
  17946. dd.ReadMapElemValue()
  17947. }
  17948. if dd.TryDecodeAsNil() {
  17949. if d.h.DeleteOnNilMapValue {
  17950. delete(v, mk)
  17951. } else {
  17952. v[mk] = 0
  17953. }
  17954. continue
  17955. }
  17956. mv = uintptr(dd.DecodeUint(uintBitsize))
  17957. if v != nil {
  17958. v[mk] = mv
  17959. }
  17960. }
  17961. dd.ReadMapEnd()
  17962. return v, changed
  17963. }
  17964. func (d *Decoder) fastpathDecMapStringIntR(f *codecFnInfo, rv reflect.Value) {
  17965. if rv.Kind() == reflect.Ptr {
  17966. vp := rv2i(rv).(*map[string]int)
  17967. if v, changed := fastpathTV.DecMapStringIntV(*vp, true, d); changed {
  17968. *vp = v
  17969. }
  17970. return
  17971. }
  17972. fastpathTV.DecMapStringIntV(rv2i(rv).(map[string]int), false, d)
  17973. }
  17974. func (f fastpathT) DecMapStringIntX(vp *map[string]int, d *Decoder) {
  17975. if v, changed := f.DecMapStringIntV(*vp, true, d); changed {
  17976. *vp = v
  17977. }
  17978. }
  17979. func (_ fastpathT) DecMapStringIntV(v map[string]int, canChange bool,
  17980. d *Decoder) (_ map[string]int, changed bool) {
  17981. dd, esep := d.d, d.hh.hasElemSeparators()
  17982. containerLen := dd.ReadMapStart()
  17983. if canChange && v == nil {
  17984. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  17985. v = make(map[string]int, xlen)
  17986. changed = true
  17987. }
  17988. if containerLen == 0 {
  17989. dd.ReadMapEnd()
  17990. return v, changed
  17991. }
  17992. var mk string
  17993. var mv int
  17994. hasLen := containerLen > 0
  17995. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  17996. if esep {
  17997. dd.ReadMapElemKey()
  17998. }
  17999. mk = dd.DecodeString()
  18000. if esep {
  18001. dd.ReadMapElemValue()
  18002. }
  18003. if dd.TryDecodeAsNil() {
  18004. if d.h.DeleteOnNilMapValue {
  18005. delete(v, mk)
  18006. } else {
  18007. v[mk] = 0
  18008. }
  18009. continue
  18010. }
  18011. mv = int(dd.DecodeInt(intBitsize))
  18012. if v != nil {
  18013. v[mk] = mv
  18014. }
  18015. }
  18016. dd.ReadMapEnd()
  18017. return v, changed
  18018. }
  18019. func (d *Decoder) fastpathDecMapStringInt8R(f *codecFnInfo, rv reflect.Value) {
  18020. if rv.Kind() == reflect.Ptr {
  18021. vp := rv2i(rv).(*map[string]int8)
  18022. if v, changed := fastpathTV.DecMapStringInt8V(*vp, true, d); changed {
  18023. *vp = v
  18024. }
  18025. return
  18026. }
  18027. fastpathTV.DecMapStringInt8V(rv2i(rv).(map[string]int8), false, d)
  18028. }
  18029. func (f fastpathT) DecMapStringInt8X(vp *map[string]int8, d *Decoder) {
  18030. if v, changed := f.DecMapStringInt8V(*vp, true, d); changed {
  18031. *vp = v
  18032. }
  18033. }
  18034. func (_ fastpathT) DecMapStringInt8V(v map[string]int8, canChange bool,
  18035. d *Decoder) (_ map[string]int8, changed bool) {
  18036. dd, esep := d.d, d.hh.hasElemSeparators()
  18037. containerLen := dd.ReadMapStart()
  18038. if canChange && v == nil {
  18039. xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
  18040. v = make(map[string]int8, xlen)
  18041. changed = true
  18042. }
  18043. if containerLen == 0 {
  18044. dd.ReadMapEnd()
  18045. return v, changed
  18046. }
  18047. var mk string
  18048. var mv int8
  18049. hasLen := containerLen > 0
  18050. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18051. if esep {
  18052. dd.ReadMapElemKey()
  18053. }
  18054. mk = dd.DecodeString()
  18055. if esep {
  18056. dd.ReadMapElemValue()
  18057. }
  18058. if dd.TryDecodeAsNil() {
  18059. if d.h.DeleteOnNilMapValue {
  18060. delete(v, mk)
  18061. } else {
  18062. v[mk] = 0
  18063. }
  18064. continue
  18065. }
  18066. mv = int8(dd.DecodeInt(8))
  18067. if v != nil {
  18068. v[mk] = mv
  18069. }
  18070. }
  18071. dd.ReadMapEnd()
  18072. return v, changed
  18073. }
  18074. func (d *Decoder) fastpathDecMapStringInt16R(f *codecFnInfo, rv reflect.Value) {
  18075. if rv.Kind() == reflect.Ptr {
  18076. vp := rv2i(rv).(*map[string]int16)
  18077. if v, changed := fastpathTV.DecMapStringInt16V(*vp, true, d); changed {
  18078. *vp = v
  18079. }
  18080. return
  18081. }
  18082. fastpathTV.DecMapStringInt16V(rv2i(rv).(map[string]int16), false, d)
  18083. }
  18084. func (f fastpathT) DecMapStringInt16X(vp *map[string]int16, d *Decoder) {
  18085. if v, changed := f.DecMapStringInt16V(*vp, true, d); changed {
  18086. *vp = v
  18087. }
  18088. }
  18089. func (_ fastpathT) DecMapStringInt16V(v map[string]int16, canChange bool,
  18090. d *Decoder) (_ map[string]int16, changed bool) {
  18091. dd, esep := d.d, d.hh.hasElemSeparators()
  18092. containerLen := dd.ReadMapStart()
  18093. if canChange && v == nil {
  18094. xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
  18095. v = make(map[string]int16, xlen)
  18096. changed = true
  18097. }
  18098. if containerLen == 0 {
  18099. dd.ReadMapEnd()
  18100. return v, changed
  18101. }
  18102. var mk string
  18103. var mv int16
  18104. hasLen := containerLen > 0
  18105. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18106. if esep {
  18107. dd.ReadMapElemKey()
  18108. }
  18109. mk = dd.DecodeString()
  18110. if esep {
  18111. dd.ReadMapElemValue()
  18112. }
  18113. if dd.TryDecodeAsNil() {
  18114. if d.h.DeleteOnNilMapValue {
  18115. delete(v, mk)
  18116. } else {
  18117. v[mk] = 0
  18118. }
  18119. continue
  18120. }
  18121. mv = int16(dd.DecodeInt(16))
  18122. if v != nil {
  18123. v[mk] = mv
  18124. }
  18125. }
  18126. dd.ReadMapEnd()
  18127. return v, changed
  18128. }
  18129. func (d *Decoder) fastpathDecMapStringInt32R(f *codecFnInfo, rv reflect.Value) {
  18130. if rv.Kind() == reflect.Ptr {
  18131. vp := rv2i(rv).(*map[string]int32)
  18132. if v, changed := fastpathTV.DecMapStringInt32V(*vp, true, d); changed {
  18133. *vp = v
  18134. }
  18135. return
  18136. }
  18137. fastpathTV.DecMapStringInt32V(rv2i(rv).(map[string]int32), false, d)
  18138. }
  18139. func (f fastpathT) DecMapStringInt32X(vp *map[string]int32, d *Decoder) {
  18140. if v, changed := f.DecMapStringInt32V(*vp, true, d); changed {
  18141. *vp = v
  18142. }
  18143. }
  18144. func (_ fastpathT) DecMapStringInt32V(v map[string]int32, canChange bool,
  18145. d *Decoder) (_ map[string]int32, changed bool) {
  18146. dd, esep := d.d, d.hh.hasElemSeparators()
  18147. containerLen := dd.ReadMapStart()
  18148. if canChange && v == nil {
  18149. xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
  18150. v = make(map[string]int32, xlen)
  18151. changed = true
  18152. }
  18153. if containerLen == 0 {
  18154. dd.ReadMapEnd()
  18155. return v, changed
  18156. }
  18157. var mk string
  18158. var mv int32
  18159. hasLen := containerLen > 0
  18160. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18161. if esep {
  18162. dd.ReadMapElemKey()
  18163. }
  18164. mk = dd.DecodeString()
  18165. if esep {
  18166. dd.ReadMapElemValue()
  18167. }
  18168. if dd.TryDecodeAsNil() {
  18169. if d.h.DeleteOnNilMapValue {
  18170. delete(v, mk)
  18171. } else {
  18172. v[mk] = 0
  18173. }
  18174. continue
  18175. }
  18176. mv = int32(dd.DecodeInt(32))
  18177. if v != nil {
  18178. v[mk] = mv
  18179. }
  18180. }
  18181. dd.ReadMapEnd()
  18182. return v, changed
  18183. }
  18184. func (d *Decoder) fastpathDecMapStringInt64R(f *codecFnInfo, rv reflect.Value) {
  18185. if rv.Kind() == reflect.Ptr {
  18186. vp := rv2i(rv).(*map[string]int64)
  18187. if v, changed := fastpathTV.DecMapStringInt64V(*vp, true, d); changed {
  18188. *vp = v
  18189. }
  18190. return
  18191. }
  18192. fastpathTV.DecMapStringInt64V(rv2i(rv).(map[string]int64), false, d)
  18193. }
  18194. func (f fastpathT) DecMapStringInt64X(vp *map[string]int64, d *Decoder) {
  18195. if v, changed := f.DecMapStringInt64V(*vp, true, d); changed {
  18196. *vp = v
  18197. }
  18198. }
  18199. func (_ fastpathT) DecMapStringInt64V(v map[string]int64, canChange bool,
  18200. d *Decoder) (_ map[string]int64, changed bool) {
  18201. dd, esep := d.d, d.hh.hasElemSeparators()
  18202. containerLen := dd.ReadMapStart()
  18203. if canChange && v == nil {
  18204. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  18205. v = make(map[string]int64, xlen)
  18206. changed = true
  18207. }
  18208. if containerLen == 0 {
  18209. dd.ReadMapEnd()
  18210. return v, changed
  18211. }
  18212. var mk string
  18213. var mv int64
  18214. hasLen := containerLen > 0
  18215. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18216. if esep {
  18217. dd.ReadMapElemKey()
  18218. }
  18219. mk = dd.DecodeString()
  18220. if esep {
  18221. dd.ReadMapElemValue()
  18222. }
  18223. if dd.TryDecodeAsNil() {
  18224. if d.h.DeleteOnNilMapValue {
  18225. delete(v, mk)
  18226. } else {
  18227. v[mk] = 0
  18228. }
  18229. continue
  18230. }
  18231. mv = dd.DecodeInt(64)
  18232. if v != nil {
  18233. v[mk] = mv
  18234. }
  18235. }
  18236. dd.ReadMapEnd()
  18237. return v, changed
  18238. }
  18239. func (d *Decoder) fastpathDecMapStringFloat32R(f *codecFnInfo, rv reflect.Value) {
  18240. if rv.Kind() == reflect.Ptr {
  18241. vp := rv2i(rv).(*map[string]float32)
  18242. if v, changed := fastpathTV.DecMapStringFloat32V(*vp, true, d); changed {
  18243. *vp = v
  18244. }
  18245. return
  18246. }
  18247. fastpathTV.DecMapStringFloat32V(rv2i(rv).(map[string]float32), false, d)
  18248. }
  18249. func (f fastpathT) DecMapStringFloat32X(vp *map[string]float32, d *Decoder) {
  18250. if v, changed := f.DecMapStringFloat32V(*vp, true, d); changed {
  18251. *vp = v
  18252. }
  18253. }
  18254. func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, canChange bool,
  18255. d *Decoder) (_ map[string]float32, changed bool) {
  18256. dd, esep := d.d, d.hh.hasElemSeparators()
  18257. containerLen := dd.ReadMapStart()
  18258. if canChange && v == nil {
  18259. xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
  18260. v = make(map[string]float32, xlen)
  18261. changed = true
  18262. }
  18263. if containerLen == 0 {
  18264. dd.ReadMapEnd()
  18265. return v, changed
  18266. }
  18267. var mk string
  18268. var mv float32
  18269. hasLen := containerLen > 0
  18270. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18271. if esep {
  18272. dd.ReadMapElemKey()
  18273. }
  18274. mk = dd.DecodeString()
  18275. if esep {
  18276. dd.ReadMapElemValue()
  18277. }
  18278. if dd.TryDecodeAsNil() {
  18279. if d.h.DeleteOnNilMapValue {
  18280. delete(v, mk)
  18281. } else {
  18282. v[mk] = 0
  18283. }
  18284. continue
  18285. }
  18286. mv = float32(dd.DecodeFloat(true))
  18287. if v != nil {
  18288. v[mk] = mv
  18289. }
  18290. }
  18291. dd.ReadMapEnd()
  18292. return v, changed
  18293. }
  18294. func (d *Decoder) fastpathDecMapStringFloat64R(f *codecFnInfo, rv reflect.Value) {
  18295. if rv.Kind() == reflect.Ptr {
  18296. vp := rv2i(rv).(*map[string]float64)
  18297. if v, changed := fastpathTV.DecMapStringFloat64V(*vp, true, d); changed {
  18298. *vp = v
  18299. }
  18300. return
  18301. }
  18302. fastpathTV.DecMapStringFloat64V(rv2i(rv).(map[string]float64), false, d)
  18303. }
  18304. func (f fastpathT) DecMapStringFloat64X(vp *map[string]float64, d *Decoder) {
  18305. if v, changed := f.DecMapStringFloat64V(*vp, true, d); changed {
  18306. *vp = v
  18307. }
  18308. }
  18309. func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, canChange bool,
  18310. d *Decoder) (_ map[string]float64, changed bool) {
  18311. dd, esep := d.d, d.hh.hasElemSeparators()
  18312. containerLen := dd.ReadMapStart()
  18313. if canChange && v == nil {
  18314. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  18315. v = make(map[string]float64, xlen)
  18316. changed = true
  18317. }
  18318. if containerLen == 0 {
  18319. dd.ReadMapEnd()
  18320. return v, changed
  18321. }
  18322. var mk string
  18323. var mv float64
  18324. hasLen := containerLen > 0
  18325. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18326. if esep {
  18327. dd.ReadMapElemKey()
  18328. }
  18329. mk = dd.DecodeString()
  18330. if esep {
  18331. dd.ReadMapElemValue()
  18332. }
  18333. if dd.TryDecodeAsNil() {
  18334. if d.h.DeleteOnNilMapValue {
  18335. delete(v, mk)
  18336. } else {
  18337. v[mk] = 0
  18338. }
  18339. continue
  18340. }
  18341. mv = dd.DecodeFloat(false)
  18342. if v != nil {
  18343. v[mk] = mv
  18344. }
  18345. }
  18346. dd.ReadMapEnd()
  18347. return v, changed
  18348. }
  18349. func (d *Decoder) fastpathDecMapStringBoolR(f *codecFnInfo, rv reflect.Value) {
  18350. if rv.Kind() == reflect.Ptr {
  18351. vp := rv2i(rv).(*map[string]bool)
  18352. if v, changed := fastpathTV.DecMapStringBoolV(*vp, true, d); changed {
  18353. *vp = v
  18354. }
  18355. return
  18356. }
  18357. fastpathTV.DecMapStringBoolV(rv2i(rv).(map[string]bool), false, d)
  18358. }
  18359. func (f fastpathT) DecMapStringBoolX(vp *map[string]bool, d *Decoder) {
  18360. if v, changed := f.DecMapStringBoolV(*vp, true, d); changed {
  18361. *vp = v
  18362. }
  18363. }
  18364. func (_ fastpathT) DecMapStringBoolV(v map[string]bool, canChange bool,
  18365. d *Decoder) (_ map[string]bool, changed bool) {
  18366. dd, esep := d.d, d.hh.hasElemSeparators()
  18367. containerLen := dd.ReadMapStart()
  18368. if canChange && v == nil {
  18369. xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
  18370. v = make(map[string]bool, xlen)
  18371. changed = true
  18372. }
  18373. if containerLen == 0 {
  18374. dd.ReadMapEnd()
  18375. return v, changed
  18376. }
  18377. var mk string
  18378. var mv bool
  18379. hasLen := containerLen > 0
  18380. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18381. if esep {
  18382. dd.ReadMapElemKey()
  18383. }
  18384. mk = dd.DecodeString()
  18385. if esep {
  18386. dd.ReadMapElemValue()
  18387. }
  18388. if dd.TryDecodeAsNil() {
  18389. if d.h.DeleteOnNilMapValue {
  18390. delete(v, mk)
  18391. } else {
  18392. v[mk] = false
  18393. }
  18394. continue
  18395. }
  18396. mv = dd.DecodeBool()
  18397. if v != nil {
  18398. v[mk] = mv
  18399. }
  18400. }
  18401. dd.ReadMapEnd()
  18402. return v, changed
  18403. }
  18404. func (d *Decoder) fastpathDecMapFloat32IntfR(f *codecFnInfo, rv reflect.Value) {
  18405. if rv.Kind() == reflect.Ptr {
  18406. vp := rv2i(rv).(*map[float32]interface{})
  18407. if v, changed := fastpathTV.DecMapFloat32IntfV(*vp, true, d); changed {
  18408. *vp = v
  18409. }
  18410. return
  18411. }
  18412. fastpathTV.DecMapFloat32IntfV(rv2i(rv).(map[float32]interface{}), false, d)
  18413. }
  18414. func (f fastpathT) DecMapFloat32IntfX(vp *map[float32]interface{}, d *Decoder) {
  18415. if v, changed := f.DecMapFloat32IntfV(*vp, true, d); changed {
  18416. *vp = v
  18417. }
  18418. }
  18419. func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, canChange bool,
  18420. d *Decoder) (_ map[float32]interface{}, changed bool) {
  18421. dd, esep := d.d, d.hh.hasElemSeparators()
  18422. containerLen := dd.ReadMapStart()
  18423. if canChange && v == nil {
  18424. xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
  18425. v = make(map[float32]interface{}, xlen)
  18426. changed = true
  18427. }
  18428. if containerLen == 0 {
  18429. dd.ReadMapEnd()
  18430. return v, changed
  18431. }
  18432. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  18433. var mk float32
  18434. var mv interface{}
  18435. hasLen := containerLen > 0
  18436. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18437. if esep {
  18438. dd.ReadMapElemKey()
  18439. }
  18440. mk = float32(dd.DecodeFloat(true))
  18441. if esep {
  18442. dd.ReadMapElemValue()
  18443. }
  18444. if dd.TryDecodeAsNil() {
  18445. if d.h.DeleteOnNilMapValue {
  18446. delete(v, mk)
  18447. } else {
  18448. v[mk] = nil
  18449. }
  18450. continue
  18451. }
  18452. if mapGet {
  18453. mv = v[mk]
  18454. } else {
  18455. mv = nil
  18456. }
  18457. d.decode(&mv)
  18458. if v != nil {
  18459. v[mk] = mv
  18460. }
  18461. }
  18462. dd.ReadMapEnd()
  18463. return v, changed
  18464. }
  18465. func (d *Decoder) fastpathDecMapFloat32StringR(f *codecFnInfo, rv reflect.Value) {
  18466. if rv.Kind() == reflect.Ptr {
  18467. vp := rv2i(rv).(*map[float32]string)
  18468. if v, changed := fastpathTV.DecMapFloat32StringV(*vp, true, d); changed {
  18469. *vp = v
  18470. }
  18471. return
  18472. }
  18473. fastpathTV.DecMapFloat32StringV(rv2i(rv).(map[float32]string), false, d)
  18474. }
  18475. func (f fastpathT) DecMapFloat32StringX(vp *map[float32]string, d *Decoder) {
  18476. if v, changed := f.DecMapFloat32StringV(*vp, true, d); changed {
  18477. *vp = v
  18478. }
  18479. }
  18480. func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, canChange bool,
  18481. d *Decoder) (_ map[float32]string, changed bool) {
  18482. dd, esep := d.d, d.hh.hasElemSeparators()
  18483. containerLen := dd.ReadMapStart()
  18484. if canChange && v == nil {
  18485. xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
  18486. v = make(map[float32]string, xlen)
  18487. changed = true
  18488. }
  18489. if containerLen == 0 {
  18490. dd.ReadMapEnd()
  18491. return v, changed
  18492. }
  18493. var mk float32
  18494. var mv string
  18495. hasLen := containerLen > 0
  18496. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18497. if esep {
  18498. dd.ReadMapElemKey()
  18499. }
  18500. mk = float32(dd.DecodeFloat(true))
  18501. if esep {
  18502. dd.ReadMapElemValue()
  18503. }
  18504. if dd.TryDecodeAsNil() {
  18505. if d.h.DeleteOnNilMapValue {
  18506. delete(v, mk)
  18507. } else {
  18508. v[mk] = ""
  18509. }
  18510. continue
  18511. }
  18512. mv = dd.DecodeString()
  18513. if v != nil {
  18514. v[mk] = mv
  18515. }
  18516. }
  18517. dd.ReadMapEnd()
  18518. return v, changed
  18519. }
  18520. func (d *Decoder) fastpathDecMapFloat32UintR(f *codecFnInfo, rv reflect.Value) {
  18521. if rv.Kind() == reflect.Ptr {
  18522. vp := rv2i(rv).(*map[float32]uint)
  18523. if v, changed := fastpathTV.DecMapFloat32UintV(*vp, true, d); changed {
  18524. *vp = v
  18525. }
  18526. return
  18527. }
  18528. fastpathTV.DecMapFloat32UintV(rv2i(rv).(map[float32]uint), false, d)
  18529. }
  18530. func (f fastpathT) DecMapFloat32UintX(vp *map[float32]uint, d *Decoder) {
  18531. if v, changed := f.DecMapFloat32UintV(*vp, true, d); changed {
  18532. *vp = v
  18533. }
  18534. }
  18535. func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, canChange bool,
  18536. d *Decoder) (_ map[float32]uint, changed bool) {
  18537. dd, esep := d.d, d.hh.hasElemSeparators()
  18538. containerLen := dd.ReadMapStart()
  18539. if canChange && v == nil {
  18540. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  18541. v = make(map[float32]uint, xlen)
  18542. changed = true
  18543. }
  18544. if containerLen == 0 {
  18545. dd.ReadMapEnd()
  18546. return v, changed
  18547. }
  18548. var mk float32
  18549. var mv uint
  18550. hasLen := containerLen > 0
  18551. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18552. if esep {
  18553. dd.ReadMapElemKey()
  18554. }
  18555. mk = float32(dd.DecodeFloat(true))
  18556. if esep {
  18557. dd.ReadMapElemValue()
  18558. }
  18559. if dd.TryDecodeAsNil() {
  18560. if d.h.DeleteOnNilMapValue {
  18561. delete(v, mk)
  18562. } else {
  18563. v[mk] = 0
  18564. }
  18565. continue
  18566. }
  18567. mv = uint(dd.DecodeUint(uintBitsize))
  18568. if v != nil {
  18569. v[mk] = mv
  18570. }
  18571. }
  18572. dd.ReadMapEnd()
  18573. return v, changed
  18574. }
  18575. func (d *Decoder) fastpathDecMapFloat32Uint8R(f *codecFnInfo, rv reflect.Value) {
  18576. if rv.Kind() == reflect.Ptr {
  18577. vp := rv2i(rv).(*map[float32]uint8)
  18578. if v, changed := fastpathTV.DecMapFloat32Uint8V(*vp, true, d); changed {
  18579. *vp = v
  18580. }
  18581. return
  18582. }
  18583. fastpathTV.DecMapFloat32Uint8V(rv2i(rv).(map[float32]uint8), false, d)
  18584. }
  18585. func (f fastpathT) DecMapFloat32Uint8X(vp *map[float32]uint8, d *Decoder) {
  18586. if v, changed := f.DecMapFloat32Uint8V(*vp, true, d); changed {
  18587. *vp = v
  18588. }
  18589. }
  18590. func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, canChange bool,
  18591. d *Decoder) (_ map[float32]uint8, changed bool) {
  18592. dd, esep := d.d, d.hh.hasElemSeparators()
  18593. containerLen := dd.ReadMapStart()
  18594. if canChange && v == nil {
  18595. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  18596. v = make(map[float32]uint8, xlen)
  18597. changed = true
  18598. }
  18599. if containerLen == 0 {
  18600. dd.ReadMapEnd()
  18601. return v, changed
  18602. }
  18603. var mk float32
  18604. var mv uint8
  18605. hasLen := containerLen > 0
  18606. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18607. if esep {
  18608. dd.ReadMapElemKey()
  18609. }
  18610. mk = float32(dd.DecodeFloat(true))
  18611. if esep {
  18612. dd.ReadMapElemValue()
  18613. }
  18614. if dd.TryDecodeAsNil() {
  18615. if d.h.DeleteOnNilMapValue {
  18616. delete(v, mk)
  18617. } else {
  18618. v[mk] = 0
  18619. }
  18620. continue
  18621. }
  18622. mv = uint8(dd.DecodeUint(8))
  18623. if v != nil {
  18624. v[mk] = mv
  18625. }
  18626. }
  18627. dd.ReadMapEnd()
  18628. return v, changed
  18629. }
  18630. func (d *Decoder) fastpathDecMapFloat32Uint16R(f *codecFnInfo, rv reflect.Value) {
  18631. if rv.Kind() == reflect.Ptr {
  18632. vp := rv2i(rv).(*map[float32]uint16)
  18633. if v, changed := fastpathTV.DecMapFloat32Uint16V(*vp, true, d); changed {
  18634. *vp = v
  18635. }
  18636. return
  18637. }
  18638. fastpathTV.DecMapFloat32Uint16V(rv2i(rv).(map[float32]uint16), false, d)
  18639. }
  18640. func (f fastpathT) DecMapFloat32Uint16X(vp *map[float32]uint16, d *Decoder) {
  18641. if v, changed := f.DecMapFloat32Uint16V(*vp, true, d); changed {
  18642. *vp = v
  18643. }
  18644. }
  18645. func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, canChange bool,
  18646. d *Decoder) (_ map[float32]uint16, changed bool) {
  18647. dd, esep := d.d, d.hh.hasElemSeparators()
  18648. containerLen := dd.ReadMapStart()
  18649. if canChange && v == nil {
  18650. xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
  18651. v = make(map[float32]uint16, xlen)
  18652. changed = true
  18653. }
  18654. if containerLen == 0 {
  18655. dd.ReadMapEnd()
  18656. return v, changed
  18657. }
  18658. var mk float32
  18659. var mv uint16
  18660. hasLen := containerLen > 0
  18661. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18662. if esep {
  18663. dd.ReadMapElemKey()
  18664. }
  18665. mk = float32(dd.DecodeFloat(true))
  18666. if esep {
  18667. dd.ReadMapElemValue()
  18668. }
  18669. if dd.TryDecodeAsNil() {
  18670. if d.h.DeleteOnNilMapValue {
  18671. delete(v, mk)
  18672. } else {
  18673. v[mk] = 0
  18674. }
  18675. continue
  18676. }
  18677. mv = uint16(dd.DecodeUint(16))
  18678. if v != nil {
  18679. v[mk] = mv
  18680. }
  18681. }
  18682. dd.ReadMapEnd()
  18683. return v, changed
  18684. }
  18685. func (d *Decoder) fastpathDecMapFloat32Uint32R(f *codecFnInfo, rv reflect.Value) {
  18686. if rv.Kind() == reflect.Ptr {
  18687. vp := rv2i(rv).(*map[float32]uint32)
  18688. if v, changed := fastpathTV.DecMapFloat32Uint32V(*vp, true, d); changed {
  18689. *vp = v
  18690. }
  18691. return
  18692. }
  18693. fastpathTV.DecMapFloat32Uint32V(rv2i(rv).(map[float32]uint32), false, d)
  18694. }
  18695. func (f fastpathT) DecMapFloat32Uint32X(vp *map[float32]uint32, d *Decoder) {
  18696. if v, changed := f.DecMapFloat32Uint32V(*vp, true, d); changed {
  18697. *vp = v
  18698. }
  18699. }
  18700. func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, canChange bool,
  18701. d *Decoder) (_ map[float32]uint32, changed bool) {
  18702. dd, esep := d.d, d.hh.hasElemSeparators()
  18703. containerLen := dd.ReadMapStart()
  18704. if canChange && v == nil {
  18705. xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
  18706. v = make(map[float32]uint32, xlen)
  18707. changed = true
  18708. }
  18709. if containerLen == 0 {
  18710. dd.ReadMapEnd()
  18711. return v, changed
  18712. }
  18713. var mk float32
  18714. var mv uint32
  18715. hasLen := containerLen > 0
  18716. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18717. if esep {
  18718. dd.ReadMapElemKey()
  18719. }
  18720. mk = float32(dd.DecodeFloat(true))
  18721. if esep {
  18722. dd.ReadMapElemValue()
  18723. }
  18724. if dd.TryDecodeAsNil() {
  18725. if d.h.DeleteOnNilMapValue {
  18726. delete(v, mk)
  18727. } else {
  18728. v[mk] = 0
  18729. }
  18730. continue
  18731. }
  18732. mv = uint32(dd.DecodeUint(32))
  18733. if v != nil {
  18734. v[mk] = mv
  18735. }
  18736. }
  18737. dd.ReadMapEnd()
  18738. return v, changed
  18739. }
  18740. func (d *Decoder) fastpathDecMapFloat32Uint64R(f *codecFnInfo, rv reflect.Value) {
  18741. if rv.Kind() == reflect.Ptr {
  18742. vp := rv2i(rv).(*map[float32]uint64)
  18743. if v, changed := fastpathTV.DecMapFloat32Uint64V(*vp, true, d); changed {
  18744. *vp = v
  18745. }
  18746. return
  18747. }
  18748. fastpathTV.DecMapFloat32Uint64V(rv2i(rv).(map[float32]uint64), false, d)
  18749. }
  18750. func (f fastpathT) DecMapFloat32Uint64X(vp *map[float32]uint64, d *Decoder) {
  18751. if v, changed := f.DecMapFloat32Uint64V(*vp, true, d); changed {
  18752. *vp = v
  18753. }
  18754. }
  18755. func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, canChange bool,
  18756. d *Decoder) (_ map[float32]uint64, changed bool) {
  18757. dd, esep := d.d, d.hh.hasElemSeparators()
  18758. containerLen := dd.ReadMapStart()
  18759. if canChange && v == nil {
  18760. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  18761. v = make(map[float32]uint64, xlen)
  18762. changed = true
  18763. }
  18764. if containerLen == 0 {
  18765. dd.ReadMapEnd()
  18766. return v, changed
  18767. }
  18768. var mk float32
  18769. var mv uint64
  18770. hasLen := containerLen > 0
  18771. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18772. if esep {
  18773. dd.ReadMapElemKey()
  18774. }
  18775. mk = float32(dd.DecodeFloat(true))
  18776. if esep {
  18777. dd.ReadMapElemValue()
  18778. }
  18779. if dd.TryDecodeAsNil() {
  18780. if d.h.DeleteOnNilMapValue {
  18781. delete(v, mk)
  18782. } else {
  18783. v[mk] = 0
  18784. }
  18785. continue
  18786. }
  18787. mv = dd.DecodeUint(64)
  18788. if v != nil {
  18789. v[mk] = mv
  18790. }
  18791. }
  18792. dd.ReadMapEnd()
  18793. return v, changed
  18794. }
  18795. func (d *Decoder) fastpathDecMapFloat32UintptrR(f *codecFnInfo, rv reflect.Value) {
  18796. if rv.Kind() == reflect.Ptr {
  18797. vp := rv2i(rv).(*map[float32]uintptr)
  18798. if v, changed := fastpathTV.DecMapFloat32UintptrV(*vp, true, d); changed {
  18799. *vp = v
  18800. }
  18801. return
  18802. }
  18803. fastpathTV.DecMapFloat32UintptrV(rv2i(rv).(map[float32]uintptr), false, d)
  18804. }
  18805. func (f fastpathT) DecMapFloat32UintptrX(vp *map[float32]uintptr, d *Decoder) {
  18806. if v, changed := f.DecMapFloat32UintptrV(*vp, true, d); changed {
  18807. *vp = v
  18808. }
  18809. }
  18810. func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, canChange bool,
  18811. d *Decoder) (_ map[float32]uintptr, changed bool) {
  18812. dd, esep := d.d, d.hh.hasElemSeparators()
  18813. containerLen := dd.ReadMapStart()
  18814. if canChange && v == nil {
  18815. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  18816. v = make(map[float32]uintptr, xlen)
  18817. changed = true
  18818. }
  18819. if containerLen == 0 {
  18820. dd.ReadMapEnd()
  18821. return v, changed
  18822. }
  18823. var mk float32
  18824. var mv uintptr
  18825. hasLen := containerLen > 0
  18826. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18827. if esep {
  18828. dd.ReadMapElemKey()
  18829. }
  18830. mk = float32(dd.DecodeFloat(true))
  18831. if esep {
  18832. dd.ReadMapElemValue()
  18833. }
  18834. if dd.TryDecodeAsNil() {
  18835. if d.h.DeleteOnNilMapValue {
  18836. delete(v, mk)
  18837. } else {
  18838. v[mk] = 0
  18839. }
  18840. continue
  18841. }
  18842. mv = uintptr(dd.DecodeUint(uintBitsize))
  18843. if v != nil {
  18844. v[mk] = mv
  18845. }
  18846. }
  18847. dd.ReadMapEnd()
  18848. return v, changed
  18849. }
  18850. func (d *Decoder) fastpathDecMapFloat32IntR(f *codecFnInfo, rv reflect.Value) {
  18851. if rv.Kind() == reflect.Ptr {
  18852. vp := rv2i(rv).(*map[float32]int)
  18853. if v, changed := fastpathTV.DecMapFloat32IntV(*vp, true, d); changed {
  18854. *vp = v
  18855. }
  18856. return
  18857. }
  18858. fastpathTV.DecMapFloat32IntV(rv2i(rv).(map[float32]int), false, d)
  18859. }
  18860. func (f fastpathT) DecMapFloat32IntX(vp *map[float32]int, d *Decoder) {
  18861. if v, changed := f.DecMapFloat32IntV(*vp, true, d); changed {
  18862. *vp = v
  18863. }
  18864. }
  18865. func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, canChange bool,
  18866. d *Decoder) (_ map[float32]int, changed bool) {
  18867. dd, esep := d.d, d.hh.hasElemSeparators()
  18868. containerLen := dd.ReadMapStart()
  18869. if canChange && v == nil {
  18870. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  18871. v = make(map[float32]int, xlen)
  18872. changed = true
  18873. }
  18874. if containerLen == 0 {
  18875. dd.ReadMapEnd()
  18876. return v, changed
  18877. }
  18878. var mk float32
  18879. var mv int
  18880. hasLen := containerLen > 0
  18881. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18882. if esep {
  18883. dd.ReadMapElemKey()
  18884. }
  18885. mk = float32(dd.DecodeFloat(true))
  18886. if esep {
  18887. dd.ReadMapElemValue()
  18888. }
  18889. if dd.TryDecodeAsNil() {
  18890. if d.h.DeleteOnNilMapValue {
  18891. delete(v, mk)
  18892. } else {
  18893. v[mk] = 0
  18894. }
  18895. continue
  18896. }
  18897. mv = int(dd.DecodeInt(intBitsize))
  18898. if v != nil {
  18899. v[mk] = mv
  18900. }
  18901. }
  18902. dd.ReadMapEnd()
  18903. return v, changed
  18904. }
  18905. func (d *Decoder) fastpathDecMapFloat32Int8R(f *codecFnInfo, rv reflect.Value) {
  18906. if rv.Kind() == reflect.Ptr {
  18907. vp := rv2i(rv).(*map[float32]int8)
  18908. if v, changed := fastpathTV.DecMapFloat32Int8V(*vp, true, d); changed {
  18909. *vp = v
  18910. }
  18911. return
  18912. }
  18913. fastpathTV.DecMapFloat32Int8V(rv2i(rv).(map[float32]int8), false, d)
  18914. }
  18915. func (f fastpathT) DecMapFloat32Int8X(vp *map[float32]int8, d *Decoder) {
  18916. if v, changed := f.DecMapFloat32Int8V(*vp, true, d); changed {
  18917. *vp = v
  18918. }
  18919. }
  18920. func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, canChange bool,
  18921. d *Decoder) (_ map[float32]int8, changed bool) {
  18922. dd, esep := d.d, d.hh.hasElemSeparators()
  18923. containerLen := dd.ReadMapStart()
  18924. if canChange && v == nil {
  18925. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  18926. v = make(map[float32]int8, xlen)
  18927. changed = true
  18928. }
  18929. if containerLen == 0 {
  18930. dd.ReadMapEnd()
  18931. return v, changed
  18932. }
  18933. var mk float32
  18934. var mv int8
  18935. hasLen := containerLen > 0
  18936. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18937. if esep {
  18938. dd.ReadMapElemKey()
  18939. }
  18940. mk = float32(dd.DecodeFloat(true))
  18941. if esep {
  18942. dd.ReadMapElemValue()
  18943. }
  18944. if dd.TryDecodeAsNil() {
  18945. if d.h.DeleteOnNilMapValue {
  18946. delete(v, mk)
  18947. } else {
  18948. v[mk] = 0
  18949. }
  18950. continue
  18951. }
  18952. mv = int8(dd.DecodeInt(8))
  18953. if v != nil {
  18954. v[mk] = mv
  18955. }
  18956. }
  18957. dd.ReadMapEnd()
  18958. return v, changed
  18959. }
  18960. func (d *Decoder) fastpathDecMapFloat32Int16R(f *codecFnInfo, rv reflect.Value) {
  18961. if rv.Kind() == reflect.Ptr {
  18962. vp := rv2i(rv).(*map[float32]int16)
  18963. if v, changed := fastpathTV.DecMapFloat32Int16V(*vp, true, d); changed {
  18964. *vp = v
  18965. }
  18966. return
  18967. }
  18968. fastpathTV.DecMapFloat32Int16V(rv2i(rv).(map[float32]int16), false, d)
  18969. }
  18970. func (f fastpathT) DecMapFloat32Int16X(vp *map[float32]int16, d *Decoder) {
  18971. if v, changed := f.DecMapFloat32Int16V(*vp, true, d); changed {
  18972. *vp = v
  18973. }
  18974. }
  18975. func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, canChange bool,
  18976. d *Decoder) (_ map[float32]int16, changed bool) {
  18977. dd, esep := d.d, d.hh.hasElemSeparators()
  18978. containerLen := dd.ReadMapStart()
  18979. if canChange && v == nil {
  18980. xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
  18981. v = make(map[float32]int16, xlen)
  18982. changed = true
  18983. }
  18984. if containerLen == 0 {
  18985. dd.ReadMapEnd()
  18986. return v, changed
  18987. }
  18988. var mk float32
  18989. var mv int16
  18990. hasLen := containerLen > 0
  18991. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  18992. if esep {
  18993. dd.ReadMapElemKey()
  18994. }
  18995. mk = float32(dd.DecodeFloat(true))
  18996. if esep {
  18997. dd.ReadMapElemValue()
  18998. }
  18999. if dd.TryDecodeAsNil() {
  19000. if d.h.DeleteOnNilMapValue {
  19001. delete(v, mk)
  19002. } else {
  19003. v[mk] = 0
  19004. }
  19005. continue
  19006. }
  19007. mv = int16(dd.DecodeInt(16))
  19008. if v != nil {
  19009. v[mk] = mv
  19010. }
  19011. }
  19012. dd.ReadMapEnd()
  19013. return v, changed
  19014. }
  19015. func (d *Decoder) fastpathDecMapFloat32Int32R(f *codecFnInfo, rv reflect.Value) {
  19016. if rv.Kind() == reflect.Ptr {
  19017. vp := rv2i(rv).(*map[float32]int32)
  19018. if v, changed := fastpathTV.DecMapFloat32Int32V(*vp, true, d); changed {
  19019. *vp = v
  19020. }
  19021. return
  19022. }
  19023. fastpathTV.DecMapFloat32Int32V(rv2i(rv).(map[float32]int32), false, d)
  19024. }
  19025. func (f fastpathT) DecMapFloat32Int32X(vp *map[float32]int32, d *Decoder) {
  19026. if v, changed := f.DecMapFloat32Int32V(*vp, true, d); changed {
  19027. *vp = v
  19028. }
  19029. }
  19030. func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, canChange bool,
  19031. d *Decoder) (_ map[float32]int32, changed bool) {
  19032. dd, esep := d.d, d.hh.hasElemSeparators()
  19033. containerLen := dd.ReadMapStart()
  19034. if canChange && v == nil {
  19035. xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
  19036. v = make(map[float32]int32, xlen)
  19037. changed = true
  19038. }
  19039. if containerLen == 0 {
  19040. dd.ReadMapEnd()
  19041. return v, changed
  19042. }
  19043. var mk float32
  19044. var mv int32
  19045. hasLen := containerLen > 0
  19046. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19047. if esep {
  19048. dd.ReadMapElemKey()
  19049. }
  19050. mk = float32(dd.DecodeFloat(true))
  19051. if esep {
  19052. dd.ReadMapElemValue()
  19053. }
  19054. if dd.TryDecodeAsNil() {
  19055. if d.h.DeleteOnNilMapValue {
  19056. delete(v, mk)
  19057. } else {
  19058. v[mk] = 0
  19059. }
  19060. continue
  19061. }
  19062. mv = int32(dd.DecodeInt(32))
  19063. if v != nil {
  19064. v[mk] = mv
  19065. }
  19066. }
  19067. dd.ReadMapEnd()
  19068. return v, changed
  19069. }
  19070. func (d *Decoder) fastpathDecMapFloat32Int64R(f *codecFnInfo, rv reflect.Value) {
  19071. if rv.Kind() == reflect.Ptr {
  19072. vp := rv2i(rv).(*map[float32]int64)
  19073. if v, changed := fastpathTV.DecMapFloat32Int64V(*vp, true, d); changed {
  19074. *vp = v
  19075. }
  19076. return
  19077. }
  19078. fastpathTV.DecMapFloat32Int64V(rv2i(rv).(map[float32]int64), false, d)
  19079. }
  19080. func (f fastpathT) DecMapFloat32Int64X(vp *map[float32]int64, d *Decoder) {
  19081. if v, changed := f.DecMapFloat32Int64V(*vp, true, d); changed {
  19082. *vp = v
  19083. }
  19084. }
  19085. func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, canChange bool,
  19086. d *Decoder) (_ map[float32]int64, changed bool) {
  19087. dd, esep := d.d, d.hh.hasElemSeparators()
  19088. containerLen := dd.ReadMapStart()
  19089. if canChange && v == nil {
  19090. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  19091. v = make(map[float32]int64, xlen)
  19092. changed = true
  19093. }
  19094. if containerLen == 0 {
  19095. dd.ReadMapEnd()
  19096. return v, changed
  19097. }
  19098. var mk float32
  19099. var mv int64
  19100. hasLen := containerLen > 0
  19101. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19102. if esep {
  19103. dd.ReadMapElemKey()
  19104. }
  19105. mk = float32(dd.DecodeFloat(true))
  19106. if esep {
  19107. dd.ReadMapElemValue()
  19108. }
  19109. if dd.TryDecodeAsNil() {
  19110. if d.h.DeleteOnNilMapValue {
  19111. delete(v, mk)
  19112. } else {
  19113. v[mk] = 0
  19114. }
  19115. continue
  19116. }
  19117. mv = dd.DecodeInt(64)
  19118. if v != nil {
  19119. v[mk] = mv
  19120. }
  19121. }
  19122. dd.ReadMapEnd()
  19123. return v, changed
  19124. }
  19125. func (d *Decoder) fastpathDecMapFloat32Float32R(f *codecFnInfo, rv reflect.Value) {
  19126. if rv.Kind() == reflect.Ptr {
  19127. vp := rv2i(rv).(*map[float32]float32)
  19128. if v, changed := fastpathTV.DecMapFloat32Float32V(*vp, true, d); changed {
  19129. *vp = v
  19130. }
  19131. return
  19132. }
  19133. fastpathTV.DecMapFloat32Float32V(rv2i(rv).(map[float32]float32), false, d)
  19134. }
  19135. func (f fastpathT) DecMapFloat32Float32X(vp *map[float32]float32, d *Decoder) {
  19136. if v, changed := f.DecMapFloat32Float32V(*vp, true, d); changed {
  19137. *vp = v
  19138. }
  19139. }
  19140. func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, canChange bool,
  19141. d *Decoder) (_ map[float32]float32, changed bool) {
  19142. dd, esep := d.d, d.hh.hasElemSeparators()
  19143. containerLen := dd.ReadMapStart()
  19144. if canChange && v == nil {
  19145. xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
  19146. v = make(map[float32]float32, xlen)
  19147. changed = true
  19148. }
  19149. if containerLen == 0 {
  19150. dd.ReadMapEnd()
  19151. return v, changed
  19152. }
  19153. var mk float32
  19154. var mv float32
  19155. hasLen := containerLen > 0
  19156. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19157. if esep {
  19158. dd.ReadMapElemKey()
  19159. }
  19160. mk = float32(dd.DecodeFloat(true))
  19161. if esep {
  19162. dd.ReadMapElemValue()
  19163. }
  19164. if dd.TryDecodeAsNil() {
  19165. if d.h.DeleteOnNilMapValue {
  19166. delete(v, mk)
  19167. } else {
  19168. v[mk] = 0
  19169. }
  19170. continue
  19171. }
  19172. mv = float32(dd.DecodeFloat(true))
  19173. if v != nil {
  19174. v[mk] = mv
  19175. }
  19176. }
  19177. dd.ReadMapEnd()
  19178. return v, changed
  19179. }
  19180. func (d *Decoder) fastpathDecMapFloat32Float64R(f *codecFnInfo, rv reflect.Value) {
  19181. if rv.Kind() == reflect.Ptr {
  19182. vp := rv2i(rv).(*map[float32]float64)
  19183. if v, changed := fastpathTV.DecMapFloat32Float64V(*vp, true, d); changed {
  19184. *vp = v
  19185. }
  19186. return
  19187. }
  19188. fastpathTV.DecMapFloat32Float64V(rv2i(rv).(map[float32]float64), false, d)
  19189. }
  19190. func (f fastpathT) DecMapFloat32Float64X(vp *map[float32]float64, d *Decoder) {
  19191. if v, changed := f.DecMapFloat32Float64V(*vp, true, d); changed {
  19192. *vp = v
  19193. }
  19194. }
  19195. func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, canChange bool,
  19196. d *Decoder) (_ map[float32]float64, changed bool) {
  19197. dd, esep := d.d, d.hh.hasElemSeparators()
  19198. containerLen := dd.ReadMapStart()
  19199. if canChange && v == nil {
  19200. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  19201. v = make(map[float32]float64, xlen)
  19202. changed = true
  19203. }
  19204. if containerLen == 0 {
  19205. dd.ReadMapEnd()
  19206. return v, changed
  19207. }
  19208. var mk float32
  19209. var mv float64
  19210. hasLen := containerLen > 0
  19211. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19212. if esep {
  19213. dd.ReadMapElemKey()
  19214. }
  19215. mk = float32(dd.DecodeFloat(true))
  19216. if esep {
  19217. dd.ReadMapElemValue()
  19218. }
  19219. if dd.TryDecodeAsNil() {
  19220. if d.h.DeleteOnNilMapValue {
  19221. delete(v, mk)
  19222. } else {
  19223. v[mk] = 0
  19224. }
  19225. continue
  19226. }
  19227. mv = dd.DecodeFloat(false)
  19228. if v != nil {
  19229. v[mk] = mv
  19230. }
  19231. }
  19232. dd.ReadMapEnd()
  19233. return v, changed
  19234. }
  19235. func (d *Decoder) fastpathDecMapFloat32BoolR(f *codecFnInfo, rv reflect.Value) {
  19236. if rv.Kind() == reflect.Ptr {
  19237. vp := rv2i(rv).(*map[float32]bool)
  19238. if v, changed := fastpathTV.DecMapFloat32BoolV(*vp, true, d); changed {
  19239. *vp = v
  19240. }
  19241. return
  19242. }
  19243. fastpathTV.DecMapFloat32BoolV(rv2i(rv).(map[float32]bool), false, d)
  19244. }
  19245. func (f fastpathT) DecMapFloat32BoolX(vp *map[float32]bool, d *Decoder) {
  19246. if v, changed := f.DecMapFloat32BoolV(*vp, true, d); changed {
  19247. *vp = v
  19248. }
  19249. }
  19250. func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, canChange bool,
  19251. d *Decoder) (_ map[float32]bool, changed bool) {
  19252. dd, esep := d.d, d.hh.hasElemSeparators()
  19253. containerLen := dd.ReadMapStart()
  19254. if canChange && v == nil {
  19255. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  19256. v = make(map[float32]bool, xlen)
  19257. changed = true
  19258. }
  19259. if containerLen == 0 {
  19260. dd.ReadMapEnd()
  19261. return v, changed
  19262. }
  19263. var mk float32
  19264. var mv bool
  19265. hasLen := containerLen > 0
  19266. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19267. if esep {
  19268. dd.ReadMapElemKey()
  19269. }
  19270. mk = float32(dd.DecodeFloat(true))
  19271. if esep {
  19272. dd.ReadMapElemValue()
  19273. }
  19274. if dd.TryDecodeAsNil() {
  19275. if d.h.DeleteOnNilMapValue {
  19276. delete(v, mk)
  19277. } else {
  19278. v[mk] = false
  19279. }
  19280. continue
  19281. }
  19282. mv = dd.DecodeBool()
  19283. if v != nil {
  19284. v[mk] = mv
  19285. }
  19286. }
  19287. dd.ReadMapEnd()
  19288. return v, changed
  19289. }
  19290. func (d *Decoder) fastpathDecMapFloat64IntfR(f *codecFnInfo, rv reflect.Value) {
  19291. if rv.Kind() == reflect.Ptr {
  19292. vp := rv2i(rv).(*map[float64]interface{})
  19293. if v, changed := fastpathTV.DecMapFloat64IntfV(*vp, true, d); changed {
  19294. *vp = v
  19295. }
  19296. return
  19297. }
  19298. fastpathTV.DecMapFloat64IntfV(rv2i(rv).(map[float64]interface{}), false, d)
  19299. }
  19300. func (f fastpathT) DecMapFloat64IntfX(vp *map[float64]interface{}, d *Decoder) {
  19301. if v, changed := f.DecMapFloat64IntfV(*vp, true, d); changed {
  19302. *vp = v
  19303. }
  19304. }
  19305. func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, canChange bool,
  19306. d *Decoder) (_ map[float64]interface{}, changed bool) {
  19307. dd, esep := d.d, d.hh.hasElemSeparators()
  19308. containerLen := dd.ReadMapStart()
  19309. if canChange && v == nil {
  19310. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  19311. v = make(map[float64]interface{}, xlen)
  19312. changed = true
  19313. }
  19314. if containerLen == 0 {
  19315. dd.ReadMapEnd()
  19316. return v, changed
  19317. }
  19318. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  19319. var mk float64
  19320. var mv interface{}
  19321. hasLen := containerLen > 0
  19322. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19323. if esep {
  19324. dd.ReadMapElemKey()
  19325. }
  19326. mk = dd.DecodeFloat(false)
  19327. if esep {
  19328. dd.ReadMapElemValue()
  19329. }
  19330. if dd.TryDecodeAsNil() {
  19331. if d.h.DeleteOnNilMapValue {
  19332. delete(v, mk)
  19333. } else {
  19334. v[mk] = nil
  19335. }
  19336. continue
  19337. }
  19338. if mapGet {
  19339. mv = v[mk]
  19340. } else {
  19341. mv = nil
  19342. }
  19343. d.decode(&mv)
  19344. if v != nil {
  19345. v[mk] = mv
  19346. }
  19347. }
  19348. dd.ReadMapEnd()
  19349. return v, changed
  19350. }
  19351. func (d *Decoder) fastpathDecMapFloat64StringR(f *codecFnInfo, rv reflect.Value) {
  19352. if rv.Kind() == reflect.Ptr {
  19353. vp := rv2i(rv).(*map[float64]string)
  19354. if v, changed := fastpathTV.DecMapFloat64StringV(*vp, true, d); changed {
  19355. *vp = v
  19356. }
  19357. return
  19358. }
  19359. fastpathTV.DecMapFloat64StringV(rv2i(rv).(map[float64]string), false, d)
  19360. }
  19361. func (f fastpathT) DecMapFloat64StringX(vp *map[float64]string, d *Decoder) {
  19362. if v, changed := f.DecMapFloat64StringV(*vp, true, d); changed {
  19363. *vp = v
  19364. }
  19365. }
  19366. func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, canChange bool,
  19367. d *Decoder) (_ map[float64]string, changed bool) {
  19368. dd, esep := d.d, d.hh.hasElemSeparators()
  19369. containerLen := dd.ReadMapStart()
  19370. if canChange && v == nil {
  19371. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  19372. v = make(map[float64]string, xlen)
  19373. changed = true
  19374. }
  19375. if containerLen == 0 {
  19376. dd.ReadMapEnd()
  19377. return v, changed
  19378. }
  19379. var mk float64
  19380. var mv string
  19381. hasLen := containerLen > 0
  19382. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19383. if esep {
  19384. dd.ReadMapElemKey()
  19385. }
  19386. mk = dd.DecodeFloat(false)
  19387. if esep {
  19388. dd.ReadMapElemValue()
  19389. }
  19390. if dd.TryDecodeAsNil() {
  19391. if d.h.DeleteOnNilMapValue {
  19392. delete(v, mk)
  19393. } else {
  19394. v[mk] = ""
  19395. }
  19396. continue
  19397. }
  19398. mv = dd.DecodeString()
  19399. if v != nil {
  19400. v[mk] = mv
  19401. }
  19402. }
  19403. dd.ReadMapEnd()
  19404. return v, changed
  19405. }
  19406. func (d *Decoder) fastpathDecMapFloat64UintR(f *codecFnInfo, rv reflect.Value) {
  19407. if rv.Kind() == reflect.Ptr {
  19408. vp := rv2i(rv).(*map[float64]uint)
  19409. if v, changed := fastpathTV.DecMapFloat64UintV(*vp, true, d); changed {
  19410. *vp = v
  19411. }
  19412. return
  19413. }
  19414. fastpathTV.DecMapFloat64UintV(rv2i(rv).(map[float64]uint), false, d)
  19415. }
  19416. func (f fastpathT) DecMapFloat64UintX(vp *map[float64]uint, d *Decoder) {
  19417. if v, changed := f.DecMapFloat64UintV(*vp, true, d); changed {
  19418. *vp = v
  19419. }
  19420. }
  19421. func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, canChange bool,
  19422. d *Decoder) (_ map[float64]uint, changed bool) {
  19423. dd, esep := d.d, d.hh.hasElemSeparators()
  19424. containerLen := dd.ReadMapStart()
  19425. if canChange && v == nil {
  19426. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  19427. v = make(map[float64]uint, xlen)
  19428. changed = true
  19429. }
  19430. if containerLen == 0 {
  19431. dd.ReadMapEnd()
  19432. return v, changed
  19433. }
  19434. var mk float64
  19435. var mv uint
  19436. hasLen := containerLen > 0
  19437. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19438. if esep {
  19439. dd.ReadMapElemKey()
  19440. }
  19441. mk = dd.DecodeFloat(false)
  19442. if esep {
  19443. dd.ReadMapElemValue()
  19444. }
  19445. if dd.TryDecodeAsNil() {
  19446. if d.h.DeleteOnNilMapValue {
  19447. delete(v, mk)
  19448. } else {
  19449. v[mk] = 0
  19450. }
  19451. continue
  19452. }
  19453. mv = uint(dd.DecodeUint(uintBitsize))
  19454. if v != nil {
  19455. v[mk] = mv
  19456. }
  19457. }
  19458. dd.ReadMapEnd()
  19459. return v, changed
  19460. }
  19461. func (d *Decoder) fastpathDecMapFloat64Uint8R(f *codecFnInfo, rv reflect.Value) {
  19462. if rv.Kind() == reflect.Ptr {
  19463. vp := rv2i(rv).(*map[float64]uint8)
  19464. if v, changed := fastpathTV.DecMapFloat64Uint8V(*vp, true, d); changed {
  19465. *vp = v
  19466. }
  19467. return
  19468. }
  19469. fastpathTV.DecMapFloat64Uint8V(rv2i(rv).(map[float64]uint8), false, d)
  19470. }
  19471. func (f fastpathT) DecMapFloat64Uint8X(vp *map[float64]uint8, d *Decoder) {
  19472. if v, changed := f.DecMapFloat64Uint8V(*vp, true, d); changed {
  19473. *vp = v
  19474. }
  19475. }
  19476. func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, canChange bool,
  19477. d *Decoder) (_ map[float64]uint8, changed bool) {
  19478. dd, esep := d.d, d.hh.hasElemSeparators()
  19479. containerLen := dd.ReadMapStart()
  19480. if canChange && v == nil {
  19481. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  19482. v = make(map[float64]uint8, xlen)
  19483. changed = true
  19484. }
  19485. if containerLen == 0 {
  19486. dd.ReadMapEnd()
  19487. return v, changed
  19488. }
  19489. var mk float64
  19490. var mv uint8
  19491. hasLen := containerLen > 0
  19492. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19493. if esep {
  19494. dd.ReadMapElemKey()
  19495. }
  19496. mk = dd.DecodeFloat(false)
  19497. if esep {
  19498. dd.ReadMapElemValue()
  19499. }
  19500. if dd.TryDecodeAsNil() {
  19501. if d.h.DeleteOnNilMapValue {
  19502. delete(v, mk)
  19503. } else {
  19504. v[mk] = 0
  19505. }
  19506. continue
  19507. }
  19508. mv = uint8(dd.DecodeUint(8))
  19509. if v != nil {
  19510. v[mk] = mv
  19511. }
  19512. }
  19513. dd.ReadMapEnd()
  19514. return v, changed
  19515. }
  19516. func (d *Decoder) fastpathDecMapFloat64Uint16R(f *codecFnInfo, rv reflect.Value) {
  19517. if rv.Kind() == reflect.Ptr {
  19518. vp := rv2i(rv).(*map[float64]uint16)
  19519. if v, changed := fastpathTV.DecMapFloat64Uint16V(*vp, true, d); changed {
  19520. *vp = v
  19521. }
  19522. return
  19523. }
  19524. fastpathTV.DecMapFloat64Uint16V(rv2i(rv).(map[float64]uint16), false, d)
  19525. }
  19526. func (f fastpathT) DecMapFloat64Uint16X(vp *map[float64]uint16, d *Decoder) {
  19527. if v, changed := f.DecMapFloat64Uint16V(*vp, true, d); changed {
  19528. *vp = v
  19529. }
  19530. }
  19531. func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, canChange bool,
  19532. d *Decoder) (_ map[float64]uint16, changed bool) {
  19533. dd, esep := d.d, d.hh.hasElemSeparators()
  19534. containerLen := dd.ReadMapStart()
  19535. if canChange && v == nil {
  19536. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  19537. v = make(map[float64]uint16, xlen)
  19538. changed = true
  19539. }
  19540. if containerLen == 0 {
  19541. dd.ReadMapEnd()
  19542. return v, changed
  19543. }
  19544. var mk float64
  19545. var mv uint16
  19546. hasLen := containerLen > 0
  19547. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19548. if esep {
  19549. dd.ReadMapElemKey()
  19550. }
  19551. mk = dd.DecodeFloat(false)
  19552. if esep {
  19553. dd.ReadMapElemValue()
  19554. }
  19555. if dd.TryDecodeAsNil() {
  19556. if d.h.DeleteOnNilMapValue {
  19557. delete(v, mk)
  19558. } else {
  19559. v[mk] = 0
  19560. }
  19561. continue
  19562. }
  19563. mv = uint16(dd.DecodeUint(16))
  19564. if v != nil {
  19565. v[mk] = mv
  19566. }
  19567. }
  19568. dd.ReadMapEnd()
  19569. return v, changed
  19570. }
  19571. func (d *Decoder) fastpathDecMapFloat64Uint32R(f *codecFnInfo, rv reflect.Value) {
  19572. if rv.Kind() == reflect.Ptr {
  19573. vp := rv2i(rv).(*map[float64]uint32)
  19574. if v, changed := fastpathTV.DecMapFloat64Uint32V(*vp, true, d); changed {
  19575. *vp = v
  19576. }
  19577. return
  19578. }
  19579. fastpathTV.DecMapFloat64Uint32V(rv2i(rv).(map[float64]uint32), false, d)
  19580. }
  19581. func (f fastpathT) DecMapFloat64Uint32X(vp *map[float64]uint32, d *Decoder) {
  19582. if v, changed := f.DecMapFloat64Uint32V(*vp, true, d); changed {
  19583. *vp = v
  19584. }
  19585. }
  19586. func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, canChange bool,
  19587. d *Decoder) (_ map[float64]uint32, changed bool) {
  19588. dd, esep := d.d, d.hh.hasElemSeparators()
  19589. containerLen := dd.ReadMapStart()
  19590. if canChange && v == nil {
  19591. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  19592. v = make(map[float64]uint32, xlen)
  19593. changed = true
  19594. }
  19595. if containerLen == 0 {
  19596. dd.ReadMapEnd()
  19597. return v, changed
  19598. }
  19599. var mk float64
  19600. var mv uint32
  19601. hasLen := containerLen > 0
  19602. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19603. if esep {
  19604. dd.ReadMapElemKey()
  19605. }
  19606. mk = dd.DecodeFloat(false)
  19607. if esep {
  19608. dd.ReadMapElemValue()
  19609. }
  19610. if dd.TryDecodeAsNil() {
  19611. if d.h.DeleteOnNilMapValue {
  19612. delete(v, mk)
  19613. } else {
  19614. v[mk] = 0
  19615. }
  19616. continue
  19617. }
  19618. mv = uint32(dd.DecodeUint(32))
  19619. if v != nil {
  19620. v[mk] = mv
  19621. }
  19622. }
  19623. dd.ReadMapEnd()
  19624. return v, changed
  19625. }
  19626. func (d *Decoder) fastpathDecMapFloat64Uint64R(f *codecFnInfo, rv reflect.Value) {
  19627. if rv.Kind() == reflect.Ptr {
  19628. vp := rv2i(rv).(*map[float64]uint64)
  19629. if v, changed := fastpathTV.DecMapFloat64Uint64V(*vp, true, d); changed {
  19630. *vp = v
  19631. }
  19632. return
  19633. }
  19634. fastpathTV.DecMapFloat64Uint64V(rv2i(rv).(map[float64]uint64), false, d)
  19635. }
  19636. func (f fastpathT) DecMapFloat64Uint64X(vp *map[float64]uint64, d *Decoder) {
  19637. if v, changed := f.DecMapFloat64Uint64V(*vp, true, d); changed {
  19638. *vp = v
  19639. }
  19640. }
  19641. func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, canChange bool,
  19642. d *Decoder) (_ map[float64]uint64, changed bool) {
  19643. dd, esep := d.d, d.hh.hasElemSeparators()
  19644. containerLen := dd.ReadMapStart()
  19645. if canChange && v == nil {
  19646. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  19647. v = make(map[float64]uint64, xlen)
  19648. changed = true
  19649. }
  19650. if containerLen == 0 {
  19651. dd.ReadMapEnd()
  19652. return v, changed
  19653. }
  19654. var mk float64
  19655. var mv uint64
  19656. hasLen := containerLen > 0
  19657. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19658. if esep {
  19659. dd.ReadMapElemKey()
  19660. }
  19661. mk = dd.DecodeFloat(false)
  19662. if esep {
  19663. dd.ReadMapElemValue()
  19664. }
  19665. if dd.TryDecodeAsNil() {
  19666. if d.h.DeleteOnNilMapValue {
  19667. delete(v, mk)
  19668. } else {
  19669. v[mk] = 0
  19670. }
  19671. continue
  19672. }
  19673. mv = dd.DecodeUint(64)
  19674. if v != nil {
  19675. v[mk] = mv
  19676. }
  19677. }
  19678. dd.ReadMapEnd()
  19679. return v, changed
  19680. }
  19681. func (d *Decoder) fastpathDecMapFloat64UintptrR(f *codecFnInfo, rv reflect.Value) {
  19682. if rv.Kind() == reflect.Ptr {
  19683. vp := rv2i(rv).(*map[float64]uintptr)
  19684. if v, changed := fastpathTV.DecMapFloat64UintptrV(*vp, true, d); changed {
  19685. *vp = v
  19686. }
  19687. return
  19688. }
  19689. fastpathTV.DecMapFloat64UintptrV(rv2i(rv).(map[float64]uintptr), false, d)
  19690. }
  19691. func (f fastpathT) DecMapFloat64UintptrX(vp *map[float64]uintptr, d *Decoder) {
  19692. if v, changed := f.DecMapFloat64UintptrV(*vp, true, d); changed {
  19693. *vp = v
  19694. }
  19695. }
  19696. func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, canChange bool,
  19697. d *Decoder) (_ map[float64]uintptr, changed bool) {
  19698. dd, esep := d.d, d.hh.hasElemSeparators()
  19699. containerLen := dd.ReadMapStart()
  19700. if canChange && v == nil {
  19701. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  19702. v = make(map[float64]uintptr, xlen)
  19703. changed = true
  19704. }
  19705. if containerLen == 0 {
  19706. dd.ReadMapEnd()
  19707. return v, changed
  19708. }
  19709. var mk float64
  19710. var mv uintptr
  19711. hasLen := containerLen > 0
  19712. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19713. if esep {
  19714. dd.ReadMapElemKey()
  19715. }
  19716. mk = dd.DecodeFloat(false)
  19717. if esep {
  19718. dd.ReadMapElemValue()
  19719. }
  19720. if dd.TryDecodeAsNil() {
  19721. if d.h.DeleteOnNilMapValue {
  19722. delete(v, mk)
  19723. } else {
  19724. v[mk] = 0
  19725. }
  19726. continue
  19727. }
  19728. mv = uintptr(dd.DecodeUint(uintBitsize))
  19729. if v != nil {
  19730. v[mk] = mv
  19731. }
  19732. }
  19733. dd.ReadMapEnd()
  19734. return v, changed
  19735. }
  19736. func (d *Decoder) fastpathDecMapFloat64IntR(f *codecFnInfo, rv reflect.Value) {
  19737. if rv.Kind() == reflect.Ptr {
  19738. vp := rv2i(rv).(*map[float64]int)
  19739. if v, changed := fastpathTV.DecMapFloat64IntV(*vp, true, d); changed {
  19740. *vp = v
  19741. }
  19742. return
  19743. }
  19744. fastpathTV.DecMapFloat64IntV(rv2i(rv).(map[float64]int), false, d)
  19745. }
  19746. func (f fastpathT) DecMapFloat64IntX(vp *map[float64]int, d *Decoder) {
  19747. if v, changed := f.DecMapFloat64IntV(*vp, true, d); changed {
  19748. *vp = v
  19749. }
  19750. }
  19751. func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, canChange bool,
  19752. d *Decoder) (_ map[float64]int, changed bool) {
  19753. dd, esep := d.d, d.hh.hasElemSeparators()
  19754. containerLen := dd.ReadMapStart()
  19755. if canChange && v == nil {
  19756. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  19757. v = make(map[float64]int, xlen)
  19758. changed = true
  19759. }
  19760. if containerLen == 0 {
  19761. dd.ReadMapEnd()
  19762. return v, changed
  19763. }
  19764. var mk float64
  19765. var mv int
  19766. hasLen := containerLen > 0
  19767. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19768. if esep {
  19769. dd.ReadMapElemKey()
  19770. }
  19771. mk = dd.DecodeFloat(false)
  19772. if esep {
  19773. dd.ReadMapElemValue()
  19774. }
  19775. if dd.TryDecodeAsNil() {
  19776. if d.h.DeleteOnNilMapValue {
  19777. delete(v, mk)
  19778. } else {
  19779. v[mk] = 0
  19780. }
  19781. continue
  19782. }
  19783. mv = int(dd.DecodeInt(intBitsize))
  19784. if v != nil {
  19785. v[mk] = mv
  19786. }
  19787. }
  19788. dd.ReadMapEnd()
  19789. return v, changed
  19790. }
  19791. func (d *Decoder) fastpathDecMapFloat64Int8R(f *codecFnInfo, rv reflect.Value) {
  19792. if rv.Kind() == reflect.Ptr {
  19793. vp := rv2i(rv).(*map[float64]int8)
  19794. if v, changed := fastpathTV.DecMapFloat64Int8V(*vp, true, d); changed {
  19795. *vp = v
  19796. }
  19797. return
  19798. }
  19799. fastpathTV.DecMapFloat64Int8V(rv2i(rv).(map[float64]int8), false, d)
  19800. }
  19801. func (f fastpathT) DecMapFloat64Int8X(vp *map[float64]int8, d *Decoder) {
  19802. if v, changed := f.DecMapFloat64Int8V(*vp, true, d); changed {
  19803. *vp = v
  19804. }
  19805. }
  19806. func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, canChange bool,
  19807. d *Decoder) (_ map[float64]int8, changed bool) {
  19808. dd, esep := d.d, d.hh.hasElemSeparators()
  19809. containerLen := dd.ReadMapStart()
  19810. if canChange && v == nil {
  19811. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  19812. v = make(map[float64]int8, xlen)
  19813. changed = true
  19814. }
  19815. if containerLen == 0 {
  19816. dd.ReadMapEnd()
  19817. return v, changed
  19818. }
  19819. var mk float64
  19820. var mv int8
  19821. hasLen := containerLen > 0
  19822. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19823. if esep {
  19824. dd.ReadMapElemKey()
  19825. }
  19826. mk = dd.DecodeFloat(false)
  19827. if esep {
  19828. dd.ReadMapElemValue()
  19829. }
  19830. if dd.TryDecodeAsNil() {
  19831. if d.h.DeleteOnNilMapValue {
  19832. delete(v, mk)
  19833. } else {
  19834. v[mk] = 0
  19835. }
  19836. continue
  19837. }
  19838. mv = int8(dd.DecodeInt(8))
  19839. if v != nil {
  19840. v[mk] = mv
  19841. }
  19842. }
  19843. dd.ReadMapEnd()
  19844. return v, changed
  19845. }
  19846. func (d *Decoder) fastpathDecMapFloat64Int16R(f *codecFnInfo, rv reflect.Value) {
  19847. if rv.Kind() == reflect.Ptr {
  19848. vp := rv2i(rv).(*map[float64]int16)
  19849. if v, changed := fastpathTV.DecMapFloat64Int16V(*vp, true, d); changed {
  19850. *vp = v
  19851. }
  19852. return
  19853. }
  19854. fastpathTV.DecMapFloat64Int16V(rv2i(rv).(map[float64]int16), false, d)
  19855. }
  19856. func (f fastpathT) DecMapFloat64Int16X(vp *map[float64]int16, d *Decoder) {
  19857. if v, changed := f.DecMapFloat64Int16V(*vp, true, d); changed {
  19858. *vp = v
  19859. }
  19860. }
  19861. func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, canChange bool,
  19862. d *Decoder) (_ map[float64]int16, changed bool) {
  19863. dd, esep := d.d, d.hh.hasElemSeparators()
  19864. containerLen := dd.ReadMapStart()
  19865. if canChange && v == nil {
  19866. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  19867. v = make(map[float64]int16, xlen)
  19868. changed = true
  19869. }
  19870. if containerLen == 0 {
  19871. dd.ReadMapEnd()
  19872. return v, changed
  19873. }
  19874. var mk float64
  19875. var mv int16
  19876. hasLen := containerLen > 0
  19877. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19878. if esep {
  19879. dd.ReadMapElemKey()
  19880. }
  19881. mk = dd.DecodeFloat(false)
  19882. if esep {
  19883. dd.ReadMapElemValue()
  19884. }
  19885. if dd.TryDecodeAsNil() {
  19886. if d.h.DeleteOnNilMapValue {
  19887. delete(v, mk)
  19888. } else {
  19889. v[mk] = 0
  19890. }
  19891. continue
  19892. }
  19893. mv = int16(dd.DecodeInt(16))
  19894. if v != nil {
  19895. v[mk] = mv
  19896. }
  19897. }
  19898. dd.ReadMapEnd()
  19899. return v, changed
  19900. }
  19901. func (d *Decoder) fastpathDecMapFloat64Int32R(f *codecFnInfo, rv reflect.Value) {
  19902. if rv.Kind() == reflect.Ptr {
  19903. vp := rv2i(rv).(*map[float64]int32)
  19904. if v, changed := fastpathTV.DecMapFloat64Int32V(*vp, true, d); changed {
  19905. *vp = v
  19906. }
  19907. return
  19908. }
  19909. fastpathTV.DecMapFloat64Int32V(rv2i(rv).(map[float64]int32), false, d)
  19910. }
  19911. func (f fastpathT) DecMapFloat64Int32X(vp *map[float64]int32, d *Decoder) {
  19912. if v, changed := f.DecMapFloat64Int32V(*vp, true, d); changed {
  19913. *vp = v
  19914. }
  19915. }
  19916. func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, canChange bool,
  19917. d *Decoder) (_ map[float64]int32, changed bool) {
  19918. dd, esep := d.d, d.hh.hasElemSeparators()
  19919. containerLen := dd.ReadMapStart()
  19920. if canChange && v == nil {
  19921. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  19922. v = make(map[float64]int32, xlen)
  19923. changed = true
  19924. }
  19925. if containerLen == 0 {
  19926. dd.ReadMapEnd()
  19927. return v, changed
  19928. }
  19929. var mk float64
  19930. var mv int32
  19931. hasLen := containerLen > 0
  19932. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19933. if esep {
  19934. dd.ReadMapElemKey()
  19935. }
  19936. mk = dd.DecodeFloat(false)
  19937. if esep {
  19938. dd.ReadMapElemValue()
  19939. }
  19940. if dd.TryDecodeAsNil() {
  19941. if d.h.DeleteOnNilMapValue {
  19942. delete(v, mk)
  19943. } else {
  19944. v[mk] = 0
  19945. }
  19946. continue
  19947. }
  19948. mv = int32(dd.DecodeInt(32))
  19949. if v != nil {
  19950. v[mk] = mv
  19951. }
  19952. }
  19953. dd.ReadMapEnd()
  19954. return v, changed
  19955. }
  19956. func (d *Decoder) fastpathDecMapFloat64Int64R(f *codecFnInfo, rv reflect.Value) {
  19957. if rv.Kind() == reflect.Ptr {
  19958. vp := rv2i(rv).(*map[float64]int64)
  19959. if v, changed := fastpathTV.DecMapFloat64Int64V(*vp, true, d); changed {
  19960. *vp = v
  19961. }
  19962. return
  19963. }
  19964. fastpathTV.DecMapFloat64Int64V(rv2i(rv).(map[float64]int64), false, d)
  19965. }
  19966. func (f fastpathT) DecMapFloat64Int64X(vp *map[float64]int64, d *Decoder) {
  19967. if v, changed := f.DecMapFloat64Int64V(*vp, true, d); changed {
  19968. *vp = v
  19969. }
  19970. }
  19971. func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, canChange bool,
  19972. d *Decoder) (_ map[float64]int64, changed bool) {
  19973. dd, esep := d.d, d.hh.hasElemSeparators()
  19974. containerLen := dd.ReadMapStart()
  19975. if canChange && v == nil {
  19976. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  19977. v = make(map[float64]int64, xlen)
  19978. changed = true
  19979. }
  19980. if containerLen == 0 {
  19981. dd.ReadMapEnd()
  19982. return v, changed
  19983. }
  19984. var mk float64
  19985. var mv int64
  19986. hasLen := containerLen > 0
  19987. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  19988. if esep {
  19989. dd.ReadMapElemKey()
  19990. }
  19991. mk = dd.DecodeFloat(false)
  19992. if esep {
  19993. dd.ReadMapElemValue()
  19994. }
  19995. if dd.TryDecodeAsNil() {
  19996. if d.h.DeleteOnNilMapValue {
  19997. delete(v, mk)
  19998. } else {
  19999. v[mk] = 0
  20000. }
  20001. continue
  20002. }
  20003. mv = dd.DecodeInt(64)
  20004. if v != nil {
  20005. v[mk] = mv
  20006. }
  20007. }
  20008. dd.ReadMapEnd()
  20009. return v, changed
  20010. }
  20011. func (d *Decoder) fastpathDecMapFloat64Float32R(f *codecFnInfo, rv reflect.Value) {
  20012. if rv.Kind() == reflect.Ptr {
  20013. vp := rv2i(rv).(*map[float64]float32)
  20014. if v, changed := fastpathTV.DecMapFloat64Float32V(*vp, true, d); changed {
  20015. *vp = v
  20016. }
  20017. return
  20018. }
  20019. fastpathTV.DecMapFloat64Float32V(rv2i(rv).(map[float64]float32), false, d)
  20020. }
  20021. func (f fastpathT) DecMapFloat64Float32X(vp *map[float64]float32, d *Decoder) {
  20022. if v, changed := f.DecMapFloat64Float32V(*vp, true, d); changed {
  20023. *vp = v
  20024. }
  20025. }
  20026. func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, canChange bool,
  20027. d *Decoder) (_ map[float64]float32, changed bool) {
  20028. dd, esep := d.d, d.hh.hasElemSeparators()
  20029. containerLen := dd.ReadMapStart()
  20030. if canChange && v == nil {
  20031. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  20032. v = make(map[float64]float32, xlen)
  20033. changed = true
  20034. }
  20035. if containerLen == 0 {
  20036. dd.ReadMapEnd()
  20037. return v, changed
  20038. }
  20039. var mk float64
  20040. var mv float32
  20041. hasLen := containerLen > 0
  20042. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20043. if esep {
  20044. dd.ReadMapElemKey()
  20045. }
  20046. mk = dd.DecodeFloat(false)
  20047. if esep {
  20048. dd.ReadMapElemValue()
  20049. }
  20050. if dd.TryDecodeAsNil() {
  20051. if d.h.DeleteOnNilMapValue {
  20052. delete(v, mk)
  20053. } else {
  20054. v[mk] = 0
  20055. }
  20056. continue
  20057. }
  20058. mv = float32(dd.DecodeFloat(true))
  20059. if v != nil {
  20060. v[mk] = mv
  20061. }
  20062. }
  20063. dd.ReadMapEnd()
  20064. return v, changed
  20065. }
  20066. func (d *Decoder) fastpathDecMapFloat64Float64R(f *codecFnInfo, rv reflect.Value) {
  20067. if rv.Kind() == reflect.Ptr {
  20068. vp := rv2i(rv).(*map[float64]float64)
  20069. if v, changed := fastpathTV.DecMapFloat64Float64V(*vp, true, d); changed {
  20070. *vp = v
  20071. }
  20072. return
  20073. }
  20074. fastpathTV.DecMapFloat64Float64V(rv2i(rv).(map[float64]float64), false, d)
  20075. }
  20076. func (f fastpathT) DecMapFloat64Float64X(vp *map[float64]float64, d *Decoder) {
  20077. if v, changed := f.DecMapFloat64Float64V(*vp, true, d); changed {
  20078. *vp = v
  20079. }
  20080. }
  20081. func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, canChange bool,
  20082. d *Decoder) (_ map[float64]float64, changed bool) {
  20083. dd, esep := d.d, d.hh.hasElemSeparators()
  20084. containerLen := dd.ReadMapStart()
  20085. if canChange && v == nil {
  20086. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  20087. v = make(map[float64]float64, xlen)
  20088. changed = true
  20089. }
  20090. if containerLen == 0 {
  20091. dd.ReadMapEnd()
  20092. return v, changed
  20093. }
  20094. var mk float64
  20095. var mv float64
  20096. hasLen := containerLen > 0
  20097. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20098. if esep {
  20099. dd.ReadMapElemKey()
  20100. }
  20101. mk = dd.DecodeFloat(false)
  20102. if esep {
  20103. dd.ReadMapElemValue()
  20104. }
  20105. if dd.TryDecodeAsNil() {
  20106. if d.h.DeleteOnNilMapValue {
  20107. delete(v, mk)
  20108. } else {
  20109. v[mk] = 0
  20110. }
  20111. continue
  20112. }
  20113. mv = dd.DecodeFloat(false)
  20114. if v != nil {
  20115. v[mk] = mv
  20116. }
  20117. }
  20118. dd.ReadMapEnd()
  20119. return v, changed
  20120. }
  20121. func (d *Decoder) fastpathDecMapFloat64BoolR(f *codecFnInfo, rv reflect.Value) {
  20122. if rv.Kind() == reflect.Ptr {
  20123. vp := rv2i(rv).(*map[float64]bool)
  20124. if v, changed := fastpathTV.DecMapFloat64BoolV(*vp, true, d); changed {
  20125. *vp = v
  20126. }
  20127. return
  20128. }
  20129. fastpathTV.DecMapFloat64BoolV(rv2i(rv).(map[float64]bool), false, d)
  20130. }
  20131. func (f fastpathT) DecMapFloat64BoolX(vp *map[float64]bool, d *Decoder) {
  20132. if v, changed := f.DecMapFloat64BoolV(*vp, true, d); changed {
  20133. *vp = v
  20134. }
  20135. }
  20136. func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, canChange bool,
  20137. d *Decoder) (_ map[float64]bool, changed bool) {
  20138. dd, esep := d.d, d.hh.hasElemSeparators()
  20139. containerLen := dd.ReadMapStart()
  20140. if canChange && v == nil {
  20141. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  20142. v = make(map[float64]bool, xlen)
  20143. changed = true
  20144. }
  20145. if containerLen == 0 {
  20146. dd.ReadMapEnd()
  20147. return v, changed
  20148. }
  20149. var mk float64
  20150. var mv bool
  20151. hasLen := containerLen > 0
  20152. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20153. if esep {
  20154. dd.ReadMapElemKey()
  20155. }
  20156. mk = dd.DecodeFloat(false)
  20157. if esep {
  20158. dd.ReadMapElemValue()
  20159. }
  20160. if dd.TryDecodeAsNil() {
  20161. if d.h.DeleteOnNilMapValue {
  20162. delete(v, mk)
  20163. } else {
  20164. v[mk] = false
  20165. }
  20166. continue
  20167. }
  20168. mv = dd.DecodeBool()
  20169. if v != nil {
  20170. v[mk] = mv
  20171. }
  20172. }
  20173. dd.ReadMapEnd()
  20174. return v, changed
  20175. }
  20176. func (d *Decoder) fastpathDecMapUintIntfR(f *codecFnInfo, rv reflect.Value) {
  20177. if rv.Kind() == reflect.Ptr {
  20178. vp := rv2i(rv).(*map[uint]interface{})
  20179. if v, changed := fastpathTV.DecMapUintIntfV(*vp, true, d); changed {
  20180. *vp = v
  20181. }
  20182. return
  20183. }
  20184. fastpathTV.DecMapUintIntfV(rv2i(rv).(map[uint]interface{}), false, d)
  20185. }
  20186. func (f fastpathT) DecMapUintIntfX(vp *map[uint]interface{}, d *Decoder) {
  20187. if v, changed := f.DecMapUintIntfV(*vp, true, d); changed {
  20188. *vp = v
  20189. }
  20190. }
  20191. func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, canChange bool,
  20192. d *Decoder) (_ map[uint]interface{}, changed bool) {
  20193. dd, esep := d.d, d.hh.hasElemSeparators()
  20194. containerLen := dd.ReadMapStart()
  20195. if canChange && v == nil {
  20196. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  20197. v = make(map[uint]interface{}, xlen)
  20198. changed = true
  20199. }
  20200. if containerLen == 0 {
  20201. dd.ReadMapEnd()
  20202. return v, changed
  20203. }
  20204. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  20205. var mk uint
  20206. var mv interface{}
  20207. hasLen := containerLen > 0
  20208. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20209. if esep {
  20210. dd.ReadMapElemKey()
  20211. }
  20212. mk = uint(dd.DecodeUint(uintBitsize))
  20213. if esep {
  20214. dd.ReadMapElemValue()
  20215. }
  20216. if dd.TryDecodeAsNil() {
  20217. if d.h.DeleteOnNilMapValue {
  20218. delete(v, mk)
  20219. } else {
  20220. v[mk] = nil
  20221. }
  20222. continue
  20223. }
  20224. if mapGet {
  20225. mv = v[mk]
  20226. } else {
  20227. mv = nil
  20228. }
  20229. d.decode(&mv)
  20230. if v != nil {
  20231. v[mk] = mv
  20232. }
  20233. }
  20234. dd.ReadMapEnd()
  20235. return v, changed
  20236. }
  20237. func (d *Decoder) fastpathDecMapUintStringR(f *codecFnInfo, rv reflect.Value) {
  20238. if rv.Kind() == reflect.Ptr {
  20239. vp := rv2i(rv).(*map[uint]string)
  20240. if v, changed := fastpathTV.DecMapUintStringV(*vp, true, d); changed {
  20241. *vp = v
  20242. }
  20243. return
  20244. }
  20245. fastpathTV.DecMapUintStringV(rv2i(rv).(map[uint]string), false, d)
  20246. }
  20247. func (f fastpathT) DecMapUintStringX(vp *map[uint]string, d *Decoder) {
  20248. if v, changed := f.DecMapUintStringV(*vp, true, d); changed {
  20249. *vp = v
  20250. }
  20251. }
  20252. func (_ fastpathT) DecMapUintStringV(v map[uint]string, canChange bool,
  20253. d *Decoder) (_ map[uint]string, changed bool) {
  20254. dd, esep := d.d, d.hh.hasElemSeparators()
  20255. containerLen := dd.ReadMapStart()
  20256. if canChange && v == nil {
  20257. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  20258. v = make(map[uint]string, xlen)
  20259. changed = true
  20260. }
  20261. if containerLen == 0 {
  20262. dd.ReadMapEnd()
  20263. return v, changed
  20264. }
  20265. var mk uint
  20266. var mv string
  20267. hasLen := containerLen > 0
  20268. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20269. if esep {
  20270. dd.ReadMapElemKey()
  20271. }
  20272. mk = uint(dd.DecodeUint(uintBitsize))
  20273. if esep {
  20274. dd.ReadMapElemValue()
  20275. }
  20276. if dd.TryDecodeAsNil() {
  20277. if d.h.DeleteOnNilMapValue {
  20278. delete(v, mk)
  20279. } else {
  20280. v[mk] = ""
  20281. }
  20282. continue
  20283. }
  20284. mv = dd.DecodeString()
  20285. if v != nil {
  20286. v[mk] = mv
  20287. }
  20288. }
  20289. dd.ReadMapEnd()
  20290. return v, changed
  20291. }
  20292. func (d *Decoder) fastpathDecMapUintUintR(f *codecFnInfo, rv reflect.Value) {
  20293. if rv.Kind() == reflect.Ptr {
  20294. vp := rv2i(rv).(*map[uint]uint)
  20295. if v, changed := fastpathTV.DecMapUintUintV(*vp, true, d); changed {
  20296. *vp = v
  20297. }
  20298. return
  20299. }
  20300. fastpathTV.DecMapUintUintV(rv2i(rv).(map[uint]uint), false, d)
  20301. }
  20302. func (f fastpathT) DecMapUintUintX(vp *map[uint]uint, d *Decoder) {
  20303. if v, changed := f.DecMapUintUintV(*vp, true, d); changed {
  20304. *vp = v
  20305. }
  20306. }
  20307. func (_ fastpathT) DecMapUintUintV(v map[uint]uint, canChange bool,
  20308. d *Decoder) (_ map[uint]uint, changed bool) {
  20309. dd, esep := d.d, d.hh.hasElemSeparators()
  20310. containerLen := dd.ReadMapStart()
  20311. if canChange && v == nil {
  20312. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  20313. v = make(map[uint]uint, xlen)
  20314. changed = true
  20315. }
  20316. if containerLen == 0 {
  20317. dd.ReadMapEnd()
  20318. return v, changed
  20319. }
  20320. var mk uint
  20321. var mv uint
  20322. hasLen := containerLen > 0
  20323. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20324. if esep {
  20325. dd.ReadMapElemKey()
  20326. }
  20327. mk = uint(dd.DecodeUint(uintBitsize))
  20328. if esep {
  20329. dd.ReadMapElemValue()
  20330. }
  20331. if dd.TryDecodeAsNil() {
  20332. if d.h.DeleteOnNilMapValue {
  20333. delete(v, mk)
  20334. } else {
  20335. v[mk] = 0
  20336. }
  20337. continue
  20338. }
  20339. mv = uint(dd.DecodeUint(uintBitsize))
  20340. if v != nil {
  20341. v[mk] = mv
  20342. }
  20343. }
  20344. dd.ReadMapEnd()
  20345. return v, changed
  20346. }
  20347. func (d *Decoder) fastpathDecMapUintUint8R(f *codecFnInfo, rv reflect.Value) {
  20348. if rv.Kind() == reflect.Ptr {
  20349. vp := rv2i(rv).(*map[uint]uint8)
  20350. if v, changed := fastpathTV.DecMapUintUint8V(*vp, true, d); changed {
  20351. *vp = v
  20352. }
  20353. return
  20354. }
  20355. fastpathTV.DecMapUintUint8V(rv2i(rv).(map[uint]uint8), false, d)
  20356. }
  20357. func (f fastpathT) DecMapUintUint8X(vp *map[uint]uint8, d *Decoder) {
  20358. if v, changed := f.DecMapUintUint8V(*vp, true, d); changed {
  20359. *vp = v
  20360. }
  20361. }
  20362. func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, canChange bool,
  20363. d *Decoder) (_ map[uint]uint8, changed bool) {
  20364. dd, esep := d.d, d.hh.hasElemSeparators()
  20365. containerLen := dd.ReadMapStart()
  20366. if canChange && v == nil {
  20367. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  20368. v = make(map[uint]uint8, xlen)
  20369. changed = true
  20370. }
  20371. if containerLen == 0 {
  20372. dd.ReadMapEnd()
  20373. return v, changed
  20374. }
  20375. var mk uint
  20376. var mv uint8
  20377. hasLen := containerLen > 0
  20378. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20379. if esep {
  20380. dd.ReadMapElemKey()
  20381. }
  20382. mk = uint(dd.DecodeUint(uintBitsize))
  20383. if esep {
  20384. dd.ReadMapElemValue()
  20385. }
  20386. if dd.TryDecodeAsNil() {
  20387. if d.h.DeleteOnNilMapValue {
  20388. delete(v, mk)
  20389. } else {
  20390. v[mk] = 0
  20391. }
  20392. continue
  20393. }
  20394. mv = uint8(dd.DecodeUint(8))
  20395. if v != nil {
  20396. v[mk] = mv
  20397. }
  20398. }
  20399. dd.ReadMapEnd()
  20400. return v, changed
  20401. }
  20402. func (d *Decoder) fastpathDecMapUintUint16R(f *codecFnInfo, rv reflect.Value) {
  20403. if rv.Kind() == reflect.Ptr {
  20404. vp := rv2i(rv).(*map[uint]uint16)
  20405. if v, changed := fastpathTV.DecMapUintUint16V(*vp, true, d); changed {
  20406. *vp = v
  20407. }
  20408. return
  20409. }
  20410. fastpathTV.DecMapUintUint16V(rv2i(rv).(map[uint]uint16), false, d)
  20411. }
  20412. func (f fastpathT) DecMapUintUint16X(vp *map[uint]uint16, d *Decoder) {
  20413. if v, changed := f.DecMapUintUint16V(*vp, true, d); changed {
  20414. *vp = v
  20415. }
  20416. }
  20417. func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, canChange bool,
  20418. d *Decoder) (_ map[uint]uint16, changed bool) {
  20419. dd, esep := d.d, d.hh.hasElemSeparators()
  20420. containerLen := dd.ReadMapStart()
  20421. if canChange && v == nil {
  20422. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  20423. v = make(map[uint]uint16, xlen)
  20424. changed = true
  20425. }
  20426. if containerLen == 0 {
  20427. dd.ReadMapEnd()
  20428. return v, changed
  20429. }
  20430. var mk uint
  20431. var mv uint16
  20432. hasLen := containerLen > 0
  20433. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20434. if esep {
  20435. dd.ReadMapElemKey()
  20436. }
  20437. mk = uint(dd.DecodeUint(uintBitsize))
  20438. if esep {
  20439. dd.ReadMapElemValue()
  20440. }
  20441. if dd.TryDecodeAsNil() {
  20442. if d.h.DeleteOnNilMapValue {
  20443. delete(v, mk)
  20444. } else {
  20445. v[mk] = 0
  20446. }
  20447. continue
  20448. }
  20449. mv = uint16(dd.DecodeUint(16))
  20450. if v != nil {
  20451. v[mk] = mv
  20452. }
  20453. }
  20454. dd.ReadMapEnd()
  20455. return v, changed
  20456. }
  20457. func (d *Decoder) fastpathDecMapUintUint32R(f *codecFnInfo, rv reflect.Value) {
  20458. if rv.Kind() == reflect.Ptr {
  20459. vp := rv2i(rv).(*map[uint]uint32)
  20460. if v, changed := fastpathTV.DecMapUintUint32V(*vp, true, d); changed {
  20461. *vp = v
  20462. }
  20463. return
  20464. }
  20465. fastpathTV.DecMapUintUint32V(rv2i(rv).(map[uint]uint32), false, d)
  20466. }
  20467. func (f fastpathT) DecMapUintUint32X(vp *map[uint]uint32, d *Decoder) {
  20468. if v, changed := f.DecMapUintUint32V(*vp, true, d); changed {
  20469. *vp = v
  20470. }
  20471. }
  20472. func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, canChange bool,
  20473. d *Decoder) (_ map[uint]uint32, changed bool) {
  20474. dd, esep := d.d, d.hh.hasElemSeparators()
  20475. containerLen := dd.ReadMapStart()
  20476. if canChange && v == nil {
  20477. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  20478. v = make(map[uint]uint32, xlen)
  20479. changed = true
  20480. }
  20481. if containerLen == 0 {
  20482. dd.ReadMapEnd()
  20483. return v, changed
  20484. }
  20485. var mk uint
  20486. var mv uint32
  20487. hasLen := containerLen > 0
  20488. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20489. if esep {
  20490. dd.ReadMapElemKey()
  20491. }
  20492. mk = uint(dd.DecodeUint(uintBitsize))
  20493. if esep {
  20494. dd.ReadMapElemValue()
  20495. }
  20496. if dd.TryDecodeAsNil() {
  20497. if d.h.DeleteOnNilMapValue {
  20498. delete(v, mk)
  20499. } else {
  20500. v[mk] = 0
  20501. }
  20502. continue
  20503. }
  20504. mv = uint32(dd.DecodeUint(32))
  20505. if v != nil {
  20506. v[mk] = mv
  20507. }
  20508. }
  20509. dd.ReadMapEnd()
  20510. return v, changed
  20511. }
  20512. func (d *Decoder) fastpathDecMapUintUint64R(f *codecFnInfo, rv reflect.Value) {
  20513. if rv.Kind() == reflect.Ptr {
  20514. vp := rv2i(rv).(*map[uint]uint64)
  20515. if v, changed := fastpathTV.DecMapUintUint64V(*vp, true, d); changed {
  20516. *vp = v
  20517. }
  20518. return
  20519. }
  20520. fastpathTV.DecMapUintUint64V(rv2i(rv).(map[uint]uint64), false, d)
  20521. }
  20522. func (f fastpathT) DecMapUintUint64X(vp *map[uint]uint64, d *Decoder) {
  20523. if v, changed := f.DecMapUintUint64V(*vp, true, d); changed {
  20524. *vp = v
  20525. }
  20526. }
  20527. func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, canChange bool,
  20528. d *Decoder) (_ map[uint]uint64, changed bool) {
  20529. dd, esep := d.d, d.hh.hasElemSeparators()
  20530. containerLen := dd.ReadMapStart()
  20531. if canChange && v == nil {
  20532. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  20533. v = make(map[uint]uint64, xlen)
  20534. changed = true
  20535. }
  20536. if containerLen == 0 {
  20537. dd.ReadMapEnd()
  20538. return v, changed
  20539. }
  20540. var mk uint
  20541. var mv uint64
  20542. hasLen := containerLen > 0
  20543. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20544. if esep {
  20545. dd.ReadMapElemKey()
  20546. }
  20547. mk = uint(dd.DecodeUint(uintBitsize))
  20548. if esep {
  20549. dd.ReadMapElemValue()
  20550. }
  20551. if dd.TryDecodeAsNil() {
  20552. if d.h.DeleteOnNilMapValue {
  20553. delete(v, mk)
  20554. } else {
  20555. v[mk] = 0
  20556. }
  20557. continue
  20558. }
  20559. mv = dd.DecodeUint(64)
  20560. if v != nil {
  20561. v[mk] = mv
  20562. }
  20563. }
  20564. dd.ReadMapEnd()
  20565. return v, changed
  20566. }
  20567. func (d *Decoder) fastpathDecMapUintUintptrR(f *codecFnInfo, rv reflect.Value) {
  20568. if rv.Kind() == reflect.Ptr {
  20569. vp := rv2i(rv).(*map[uint]uintptr)
  20570. if v, changed := fastpathTV.DecMapUintUintptrV(*vp, true, d); changed {
  20571. *vp = v
  20572. }
  20573. return
  20574. }
  20575. fastpathTV.DecMapUintUintptrV(rv2i(rv).(map[uint]uintptr), false, d)
  20576. }
  20577. func (f fastpathT) DecMapUintUintptrX(vp *map[uint]uintptr, d *Decoder) {
  20578. if v, changed := f.DecMapUintUintptrV(*vp, true, d); changed {
  20579. *vp = v
  20580. }
  20581. }
  20582. func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, canChange bool,
  20583. d *Decoder) (_ map[uint]uintptr, changed bool) {
  20584. dd, esep := d.d, d.hh.hasElemSeparators()
  20585. containerLen := dd.ReadMapStart()
  20586. if canChange && v == nil {
  20587. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  20588. v = make(map[uint]uintptr, xlen)
  20589. changed = true
  20590. }
  20591. if containerLen == 0 {
  20592. dd.ReadMapEnd()
  20593. return v, changed
  20594. }
  20595. var mk uint
  20596. var mv uintptr
  20597. hasLen := containerLen > 0
  20598. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20599. if esep {
  20600. dd.ReadMapElemKey()
  20601. }
  20602. mk = uint(dd.DecodeUint(uintBitsize))
  20603. if esep {
  20604. dd.ReadMapElemValue()
  20605. }
  20606. if dd.TryDecodeAsNil() {
  20607. if d.h.DeleteOnNilMapValue {
  20608. delete(v, mk)
  20609. } else {
  20610. v[mk] = 0
  20611. }
  20612. continue
  20613. }
  20614. mv = uintptr(dd.DecodeUint(uintBitsize))
  20615. if v != nil {
  20616. v[mk] = mv
  20617. }
  20618. }
  20619. dd.ReadMapEnd()
  20620. return v, changed
  20621. }
  20622. func (d *Decoder) fastpathDecMapUintIntR(f *codecFnInfo, rv reflect.Value) {
  20623. if rv.Kind() == reflect.Ptr {
  20624. vp := rv2i(rv).(*map[uint]int)
  20625. if v, changed := fastpathTV.DecMapUintIntV(*vp, true, d); changed {
  20626. *vp = v
  20627. }
  20628. return
  20629. }
  20630. fastpathTV.DecMapUintIntV(rv2i(rv).(map[uint]int), false, d)
  20631. }
  20632. func (f fastpathT) DecMapUintIntX(vp *map[uint]int, d *Decoder) {
  20633. if v, changed := f.DecMapUintIntV(*vp, true, d); changed {
  20634. *vp = v
  20635. }
  20636. }
  20637. func (_ fastpathT) DecMapUintIntV(v map[uint]int, canChange bool,
  20638. d *Decoder) (_ map[uint]int, changed bool) {
  20639. dd, esep := d.d, d.hh.hasElemSeparators()
  20640. containerLen := dd.ReadMapStart()
  20641. if canChange && v == nil {
  20642. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  20643. v = make(map[uint]int, xlen)
  20644. changed = true
  20645. }
  20646. if containerLen == 0 {
  20647. dd.ReadMapEnd()
  20648. return v, changed
  20649. }
  20650. var mk uint
  20651. var mv int
  20652. hasLen := containerLen > 0
  20653. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20654. if esep {
  20655. dd.ReadMapElemKey()
  20656. }
  20657. mk = uint(dd.DecodeUint(uintBitsize))
  20658. if esep {
  20659. dd.ReadMapElemValue()
  20660. }
  20661. if dd.TryDecodeAsNil() {
  20662. if d.h.DeleteOnNilMapValue {
  20663. delete(v, mk)
  20664. } else {
  20665. v[mk] = 0
  20666. }
  20667. continue
  20668. }
  20669. mv = int(dd.DecodeInt(intBitsize))
  20670. if v != nil {
  20671. v[mk] = mv
  20672. }
  20673. }
  20674. dd.ReadMapEnd()
  20675. return v, changed
  20676. }
  20677. func (d *Decoder) fastpathDecMapUintInt8R(f *codecFnInfo, rv reflect.Value) {
  20678. if rv.Kind() == reflect.Ptr {
  20679. vp := rv2i(rv).(*map[uint]int8)
  20680. if v, changed := fastpathTV.DecMapUintInt8V(*vp, true, d); changed {
  20681. *vp = v
  20682. }
  20683. return
  20684. }
  20685. fastpathTV.DecMapUintInt8V(rv2i(rv).(map[uint]int8), false, d)
  20686. }
  20687. func (f fastpathT) DecMapUintInt8X(vp *map[uint]int8, d *Decoder) {
  20688. if v, changed := f.DecMapUintInt8V(*vp, true, d); changed {
  20689. *vp = v
  20690. }
  20691. }
  20692. func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, canChange bool,
  20693. d *Decoder) (_ map[uint]int8, changed bool) {
  20694. dd, esep := d.d, d.hh.hasElemSeparators()
  20695. containerLen := dd.ReadMapStart()
  20696. if canChange && v == nil {
  20697. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  20698. v = make(map[uint]int8, xlen)
  20699. changed = true
  20700. }
  20701. if containerLen == 0 {
  20702. dd.ReadMapEnd()
  20703. return v, changed
  20704. }
  20705. var mk uint
  20706. var mv int8
  20707. hasLen := containerLen > 0
  20708. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20709. if esep {
  20710. dd.ReadMapElemKey()
  20711. }
  20712. mk = uint(dd.DecodeUint(uintBitsize))
  20713. if esep {
  20714. dd.ReadMapElemValue()
  20715. }
  20716. if dd.TryDecodeAsNil() {
  20717. if d.h.DeleteOnNilMapValue {
  20718. delete(v, mk)
  20719. } else {
  20720. v[mk] = 0
  20721. }
  20722. continue
  20723. }
  20724. mv = int8(dd.DecodeInt(8))
  20725. if v != nil {
  20726. v[mk] = mv
  20727. }
  20728. }
  20729. dd.ReadMapEnd()
  20730. return v, changed
  20731. }
  20732. func (d *Decoder) fastpathDecMapUintInt16R(f *codecFnInfo, rv reflect.Value) {
  20733. if rv.Kind() == reflect.Ptr {
  20734. vp := rv2i(rv).(*map[uint]int16)
  20735. if v, changed := fastpathTV.DecMapUintInt16V(*vp, true, d); changed {
  20736. *vp = v
  20737. }
  20738. return
  20739. }
  20740. fastpathTV.DecMapUintInt16V(rv2i(rv).(map[uint]int16), false, d)
  20741. }
  20742. func (f fastpathT) DecMapUintInt16X(vp *map[uint]int16, d *Decoder) {
  20743. if v, changed := f.DecMapUintInt16V(*vp, true, d); changed {
  20744. *vp = v
  20745. }
  20746. }
  20747. func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, canChange bool,
  20748. d *Decoder) (_ map[uint]int16, changed bool) {
  20749. dd, esep := d.d, d.hh.hasElemSeparators()
  20750. containerLen := dd.ReadMapStart()
  20751. if canChange && v == nil {
  20752. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  20753. v = make(map[uint]int16, xlen)
  20754. changed = true
  20755. }
  20756. if containerLen == 0 {
  20757. dd.ReadMapEnd()
  20758. return v, changed
  20759. }
  20760. var mk uint
  20761. var mv int16
  20762. hasLen := containerLen > 0
  20763. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20764. if esep {
  20765. dd.ReadMapElemKey()
  20766. }
  20767. mk = uint(dd.DecodeUint(uintBitsize))
  20768. if esep {
  20769. dd.ReadMapElemValue()
  20770. }
  20771. if dd.TryDecodeAsNil() {
  20772. if d.h.DeleteOnNilMapValue {
  20773. delete(v, mk)
  20774. } else {
  20775. v[mk] = 0
  20776. }
  20777. continue
  20778. }
  20779. mv = int16(dd.DecodeInt(16))
  20780. if v != nil {
  20781. v[mk] = mv
  20782. }
  20783. }
  20784. dd.ReadMapEnd()
  20785. return v, changed
  20786. }
  20787. func (d *Decoder) fastpathDecMapUintInt32R(f *codecFnInfo, rv reflect.Value) {
  20788. if rv.Kind() == reflect.Ptr {
  20789. vp := rv2i(rv).(*map[uint]int32)
  20790. if v, changed := fastpathTV.DecMapUintInt32V(*vp, true, d); changed {
  20791. *vp = v
  20792. }
  20793. return
  20794. }
  20795. fastpathTV.DecMapUintInt32V(rv2i(rv).(map[uint]int32), false, d)
  20796. }
  20797. func (f fastpathT) DecMapUintInt32X(vp *map[uint]int32, d *Decoder) {
  20798. if v, changed := f.DecMapUintInt32V(*vp, true, d); changed {
  20799. *vp = v
  20800. }
  20801. }
  20802. func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, canChange bool,
  20803. d *Decoder) (_ map[uint]int32, changed bool) {
  20804. dd, esep := d.d, d.hh.hasElemSeparators()
  20805. containerLen := dd.ReadMapStart()
  20806. if canChange && v == nil {
  20807. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  20808. v = make(map[uint]int32, xlen)
  20809. changed = true
  20810. }
  20811. if containerLen == 0 {
  20812. dd.ReadMapEnd()
  20813. return v, changed
  20814. }
  20815. var mk uint
  20816. var mv int32
  20817. hasLen := containerLen > 0
  20818. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20819. if esep {
  20820. dd.ReadMapElemKey()
  20821. }
  20822. mk = uint(dd.DecodeUint(uintBitsize))
  20823. if esep {
  20824. dd.ReadMapElemValue()
  20825. }
  20826. if dd.TryDecodeAsNil() {
  20827. if d.h.DeleteOnNilMapValue {
  20828. delete(v, mk)
  20829. } else {
  20830. v[mk] = 0
  20831. }
  20832. continue
  20833. }
  20834. mv = int32(dd.DecodeInt(32))
  20835. if v != nil {
  20836. v[mk] = mv
  20837. }
  20838. }
  20839. dd.ReadMapEnd()
  20840. return v, changed
  20841. }
  20842. func (d *Decoder) fastpathDecMapUintInt64R(f *codecFnInfo, rv reflect.Value) {
  20843. if rv.Kind() == reflect.Ptr {
  20844. vp := rv2i(rv).(*map[uint]int64)
  20845. if v, changed := fastpathTV.DecMapUintInt64V(*vp, true, d); changed {
  20846. *vp = v
  20847. }
  20848. return
  20849. }
  20850. fastpathTV.DecMapUintInt64V(rv2i(rv).(map[uint]int64), false, d)
  20851. }
  20852. func (f fastpathT) DecMapUintInt64X(vp *map[uint]int64, d *Decoder) {
  20853. if v, changed := f.DecMapUintInt64V(*vp, true, d); changed {
  20854. *vp = v
  20855. }
  20856. }
  20857. func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, canChange bool,
  20858. d *Decoder) (_ map[uint]int64, changed bool) {
  20859. dd, esep := d.d, d.hh.hasElemSeparators()
  20860. containerLen := dd.ReadMapStart()
  20861. if canChange && v == nil {
  20862. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  20863. v = make(map[uint]int64, xlen)
  20864. changed = true
  20865. }
  20866. if containerLen == 0 {
  20867. dd.ReadMapEnd()
  20868. return v, changed
  20869. }
  20870. var mk uint
  20871. var mv int64
  20872. hasLen := containerLen > 0
  20873. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20874. if esep {
  20875. dd.ReadMapElemKey()
  20876. }
  20877. mk = uint(dd.DecodeUint(uintBitsize))
  20878. if esep {
  20879. dd.ReadMapElemValue()
  20880. }
  20881. if dd.TryDecodeAsNil() {
  20882. if d.h.DeleteOnNilMapValue {
  20883. delete(v, mk)
  20884. } else {
  20885. v[mk] = 0
  20886. }
  20887. continue
  20888. }
  20889. mv = dd.DecodeInt(64)
  20890. if v != nil {
  20891. v[mk] = mv
  20892. }
  20893. }
  20894. dd.ReadMapEnd()
  20895. return v, changed
  20896. }
  20897. func (d *Decoder) fastpathDecMapUintFloat32R(f *codecFnInfo, rv reflect.Value) {
  20898. if rv.Kind() == reflect.Ptr {
  20899. vp := rv2i(rv).(*map[uint]float32)
  20900. if v, changed := fastpathTV.DecMapUintFloat32V(*vp, true, d); changed {
  20901. *vp = v
  20902. }
  20903. return
  20904. }
  20905. fastpathTV.DecMapUintFloat32V(rv2i(rv).(map[uint]float32), false, d)
  20906. }
  20907. func (f fastpathT) DecMapUintFloat32X(vp *map[uint]float32, d *Decoder) {
  20908. if v, changed := f.DecMapUintFloat32V(*vp, true, d); changed {
  20909. *vp = v
  20910. }
  20911. }
  20912. func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, canChange bool,
  20913. d *Decoder) (_ map[uint]float32, changed bool) {
  20914. dd, esep := d.d, d.hh.hasElemSeparators()
  20915. containerLen := dd.ReadMapStart()
  20916. if canChange && v == nil {
  20917. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  20918. v = make(map[uint]float32, xlen)
  20919. changed = true
  20920. }
  20921. if containerLen == 0 {
  20922. dd.ReadMapEnd()
  20923. return v, changed
  20924. }
  20925. var mk uint
  20926. var mv float32
  20927. hasLen := containerLen > 0
  20928. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20929. if esep {
  20930. dd.ReadMapElemKey()
  20931. }
  20932. mk = uint(dd.DecodeUint(uintBitsize))
  20933. if esep {
  20934. dd.ReadMapElemValue()
  20935. }
  20936. if dd.TryDecodeAsNil() {
  20937. if d.h.DeleteOnNilMapValue {
  20938. delete(v, mk)
  20939. } else {
  20940. v[mk] = 0
  20941. }
  20942. continue
  20943. }
  20944. mv = float32(dd.DecodeFloat(true))
  20945. if v != nil {
  20946. v[mk] = mv
  20947. }
  20948. }
  20949. dd.ReadMapEnd()
  20950. return v, changed
  20951. }
  20952. func (d *Decoder) fastpathDecMapUintFloat64R(f *codecFnInfo, rv reflect.Value) {
  20953. if rv.Kind() == reflect.Ptr {
  20954. vp := rv2i(rv).(*map[uint]float64)
  20955. if v, changed := fastpathTV.DecMapUintFloat64V(*vp, true, d); changed {
  20956. *vp = v
  20957. }
  20958. return
  20959. }
  20960. fastpathTV.DecMapUintFloat64V(rv2i(rv).(map[uint]float64), false, d)
  20961. }
  20962. func (f fastpathT) DecMapUintFloat64X(vp *map[uint]float64, d *Decoder) {
  20963. if v, changed := f.DecMapUintFloat64V(*vp, true, d); changed {
  20964. *vp = v
  20965. }
  20966. }
  20967. func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, canChange bool,
  20968. d *Decoder) (_ map[uint]float64, changed bool) {
  20969. dd, esep := d.d, d.hh.hasElemSeparators()
  20970. containerLen := dd.ReadMapStart()
  20971. if canChange && v == nil {
  20972. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  20973. v = make(map[uint]float64, xlen)
  20974. changed = true
  20975. }
  20976. if containerLen == 0 {
  20977. dd.ReadMapEnd()
  20978. return v, changed
  20979. }
  20980. var mk uint
  20981. var mv float64
  20982. hasLen := containerLen > 0
  20983. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  20984. if esep {
  20985. dd.ReadMapElemKey()
  20986. }
  20987. mk = uint(dd.DecodeUint(uintBitsize))
  20988. if esep {
  20989. dd.ReadMapElemValue()
  20990. }
  20991. if dd.TryDecodeAsNil() {
  20992. if d.h.DeleteOnNilMapValue {
  20993. delete(v, mk)
  20994. } else {
  20995. v[mk] = 0
  20996. }
  20997. continue
  20998. }
  20999. mv = dd.DecodeFloat(false)
  21000. if v != nil {
  21001. v[mk] = mv
  21002. }
  21003. }
  21004. dd.ReadMapEnd()
  21005. return v, changed
  21006. }
  21007. func (d *Decoder) fastpathDecMapUintBoolR(f *codecFnInfo, rv reflect.Value) {
  21008. if rv.Kind() == reflect.Ptr {
  21009. vp := rv2i(rv).(*map[uint]bool)
  21010. if v, changed := fastpathTV.DecMapUintBoolV(*vp, true, d); changed {
  21011. *vp = v
  21012. }
  21013. return
  21014. }
  21015. fastpathTV.DecMapUintBoolV(rv2i(rv).(map[uint]bool), false, d)
  21016. }
  21017. func (f fastpathT) DecMapUintBoolX(vp *map[uint]bool, d *Decoder) {
  21018. if v, changed := f.DecMapUintBoolV(*vp, true, d); changed {
  21019. *vp = v
  21020. }
  21021. }
  21022. func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, canChange bool,
  21023. d *Decoder) (_ map[uint]bool, changed bool) {
  21024. dd, esep := d.d, d.hh.hasElemSeparators()
  21025. containerLen := dd.ReadMapStart()
  21026. if canChange && v == nil {
  21027. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  21028. v = make(map[uint]bool, xlen)
  21029. changed = true
  21030. }
  21031. if containerLen == 0 {
  21032. dd.ReadMapEnd()
  21033. return v, changed
  21034. }
  21035. var mk uint
  21036. var mv bool
  21037. hasLen := containerLen > 0
  21038. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21039. if esep {
  21040. dd.ReadMapElemKey()
  21041. }
  21042. mk = uint(dd.DecodeUint(uintBitsize))
  21043. if esep {
  21044. dd.ReadMapElemValue()
  21045. }
  21046. if dd.TryDecodeAsNil() {
  21047. if d.h.DeleteOnNilMapValue {
  21048. delete(v, mk)
  21049. } else {
  21050. v[mk] = false
  21051. }
  21052. continue
  21053. }
  21054. mv = dd.DecodeBool()
  21055. if v != nil {
  21056. v[mk] = mv
  21057. }
  21058. }
  21059. dd.ReadMapEnd()
  21060. return v, changed
  21061. }
  21062. func (d *Decoder) fastpathDecMapUint8IntfR(f *codecFnInfo, rv reflect.Value) {
  21063. if rv.Kind() == reflect.Ptr {
  21064. vp := rv2i(rv).(*map[uint8]interface{})
  21065. if v, changed := fastpathTV.DecMapUint8IntfV(*vp, true, d); changed {
  21066. *vp = v
  21067. }
  21068. return
  21069. }
  21070. fastpathTV.DecMapUint8IntfV(rv2i(rv).(map[uint8]interface{}), false, d)
  21071. }
  21072. func (f fastpathT) DecMapUint8IntfX(vp *map[uint8]interface{}, d *Decoder) {
  21073. if v, changed := f.DecMapUint8IntfV(*vp, true, d); changed {
  21074. *vp = v
  21075. }
  21076. }
  21077. func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, canChange bool,
  21078. d *Decoder) (_ map[uint8]interface{}, changed bool) {
  21079. dd, esep := d.d, d.hh.hasElemSeparators()
  21080. containerLen := dd.ReadMapStart()
  21081. if canChange && v == nil {
  21082. xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
  21083. v = make(map[uint8]interface{}, xlen)
  21084. changed = true
  21085. }
  21086. if containerLen == 0 {
  21087. dd.ReadMapEnd()
  21088. return v, changed
  21089. }
  21090. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  21091. var mk uint8
  21092. var mv interface{}
  21093. hasLen := containerLen > 0
  21094. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21095. if esep {
  21096. dd.ReadMapElemKey()
  21097. }
  21098. mk = uint8(dd.DecodeUint(8))
  21099. if esep {
  21100. dd.ReadMapElemValue()
  21101. }
  21102. if dd.TryDecodeAsNil() {
  21103. if d.h.DeleteOnNilMapValue {
  21104. delete(v, mk)
  21105. } else {
  21106. v[mk] = nil
  21107. }
  21108. continue
  21109. }
  21110. if mapGet {
  21111. mv = v[mk]
  21112. } else {
  21113. mv = nil
  21114. }
  21115. d.decode(&mv)
  21116. if v != nil {
  21117. v[mk] = mv
  21118. }
  21119. }
  21120. dd.ReadMapEnd()
  21121. return v, changed
  21122. }
  21123. func (d *Decoder) fastpathDecMapUint8StringR(f *codecFnInfo, rv reflect.Value) {
  21124. if rv.Kind() == reflect.Ptr {
  21125. vp := rv2i(rv).(*map[uint8]string)
  21126. if v, changed := fastpathTV.DecMapUint8StringV(*vp, true, d); changed {
  21127. *vp = v
  21128. }
  21129. return
  21130. }
  21131. fastpathTV.DecMapUint8StringV(rv2i(rv).(map[uint8]string), false, d)
  21132. }
  21133. func (f fastpathT) DecMapUint8StringX(vp *map[uint8]string, d *Decoder) {
  21134. if v, changed := f.DecMapUint8StringV(*vp, true, d); changed {
  21135. *vp = v
  21136. }
  21137. }
  21138. func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, canChange bool,
  21139. d *Decoder) (_ map[uint8]string, changed bool) {
  21140. dd, esep := d.d, d.hh.hasElemSeparators()
  21141. containerLen := dd.ReadMapStart()
  21142. if canChange && v == nil {
  21143. xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
  21144. v = make(map[uint8]string, xlen)
  21145. changed = true
  21146. }
  21147. if containerLen == 0 {
  21148. dd.ReadMapEnd()
  21149. return v, changed
  21150. }
  21151. var mk uint8
  21152. var mv string
  21153. hasLen := containerLen > 0
  21154. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21155. if esep {
  21156. dd.ReadMapElemKey()
  21157. }
  21158. mk = uint8(dd.DecodeUint(8))
  21159. if esep {
  21160. dd.ReadMapElemValue()
  21161. }
  21162. if dd.TryDecodeAsNil() {
  21163. if d.h.DeleteOnNilMapValue {
  21164. delete(v, mk)
  21165. } else {
  21166. v[mk] = ""
  21167. }
  21168. continue
  21169. }
  21170. mv = dd.DecodeString()
  21171. if v != nil {
  21172. v[mk] = mv
  21173. }
  21174. }
  21175. dd.ReadMapEnd()
  21176. return v, changed
  21177. }
  21178. func (d *Decoder) fastpathDecMapUint8UintR(f *codecFnInfo, rv reflect.Value) {
  21179. if rv.Kind() == reflect.Ptr {
  21180. vp := rv2i(rv).(*map[uint8]uint)
  21181. if v, changed := fastpathTV.DecMapUint8UintV(*vp, true, d); changed {
  21182. *vp = v
  21183. }
  21184. return
  21185. }
  21186. fastpathTV.DecMapUint8UintV(rv2i(rv).(map[uint8]uint), false, d)
  21187. }
  21188. func (f fastpathT) DecMapUint8UintX(vp *map[uint8]uint, d *Decoder) {
  21189. if v, changed := f.DecMapUint8UintV(*vp, true, d); changed {
  21190. *vp = v
  21191. }
  21192. }
  21193. func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, canChange bool,
  21194. d *Decoder) (_ map[uint8]uint, changed bool) {
  21195. dd, esep := d.d, d.hh.hasElemSeparators()
  21196. containerLen := dd.ReadMapStart()
  21197. if canChange && v == nil {
  21198. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  21199. v = make(map[uint8]uint, xlen)
  21200. changed = true
  21201. }
  21202. if containerLen == 0 {
  21203. dd.ReadMapEnd()
  21204. return v, changed
  21205. }
  21206. var mk uint8
  21207. var mv uint
  21208. hasLen := containerLen > 0
  21209. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21210. if esep {
  21211. dd.ReadMapElemKey()
  21212. }
  21213. mk = uint8(dd.DecodeUint(8))
  21214. if esep {
  21215. dd.ReadMapElemValue()
  21216. }
  21217. if dd.TryDecodeAsNil() {
  21218. if d.h.DeleteOnNilMapValue {
  21219. delete(v, mk)
  21220. } else {
  21221. v[mk] = 0
  21222. }
  21223. continue
  21224. }
  21225. mv = uint(dd.DecodeUint(uintBitsize))
  21226. if v != nil {
  21227. v[mk] = mv
  21228. }
  21229. }
  21230. dd.ReadMapEnd()
  21231. return v, changed
  21232. }
  21233. func (d *Decoder) fastpathDecMapUint8Uint8R(f *codecFnInfo, rv reflect.Value) {
  21234. if rv.Kind() == reflect.Ptr {
  21235. vp := rv2i(rv).(*map[uint8]uint8)
  21236. if v, changed := fastpathTV.DecMapUint8Uint8V(*vp, true, d); changed {
  21237. *vp = v
  21238. }
  21239. return
  21240. }
  21241. fastpathTV.DecMapUint8Uint8V(rv2i(rv).(map[uint8]uint8), false, d)
  21242. }
  21243. func (f fastpathT) DecMapUint8Uint8X(vp *map[uint8]uint8, d *Decoder) {
  21244. if v, changed := f.DecMapUint8Uint8V(*vp, true, d); changed {
  21245. *vp = v
  21246. }
  21247. }
  21248. func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, canChange bool,
  21249. d *Decoder) (_ map[uint8]uint8, changed bool) {
  21250. dd, esep := d.d, d.hh.hasElemSeparators()
  21251. containerLen := dd.ReadMapStart()
  21252. if canChange && v == nil {
  21253. xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
  21254. v = make(map[uint8]uint8, xlen)
  21255. changed = true
  21256. }
  21257. if containerLen == 0 {
  21258. dd.ReadMapEnd()
  21259. return v, changed
  21260. }
  21261. var mk uint8
  21262. var mv uint8
  21263. hasLen := containerLen > 0
  21264. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21265. if esep {
  21266. dd.ReadMapElemKey()
  21267. }
  21268. mk = uint8(dd.DecodeUint(8))
  21269. if esep {
  21270. dd.ReadMapElemValue()
  21271. }
  21272. if dd.TryDecodeAsNil() {
  21273. if d.h.DeleteOnNilMapValue {
  21274. delete(v, mk)
  21275. } else {
  21276. v[mk] = 0
  21277. }
  21278. continue
  21279. }
  21280. mv = uint8(dd.DecodeUint(8))
  21281. if v != nil {
  21282. v[mk] = mv
  21283. }
  21284. }
  21285. dd.ReadMapEnd()
  21286. return v, changed
  21287. }
  21288. func (d *Decoder) fastpathDecMapUint8Uint16R(f *codecFnInfo, rv reflect.Value) {
  21289. if rv.Kind() == reflect.Ptr {
  21290. vp := rv2i(rv).(*map[uint8]uint16)
  21291. if v, changed := fastpathTV.DecMapUint8Uint16V(*vp, true, d); changed {
  21292. *vp = v
  21293. }
  21294. return
  21295. }
  21296. fastpathTV.DecMapUint8Uint16V(rv2i(rv).(map[uint8]uint16), false, d)
  21297. }
  21298. func (f fastpathT) DecMapUint8Uint16X(vp *map[uint8]uint16, d *Decoder) {
  21299. if v, changed := f.DecMapUint8Uint16V(*vp, true, d); changed {
  21300. *vp = v
  21301. }
  21302. }
  21303. func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, canChange bool,
  21304. d *Decoder) (_ map[uint8]uint16, changed bool) {
  21305. dd, esep := d.d, d.hh.hasElemSeparators()
  21306. containerLen := dd.ReadMapStart()
  21307. if canChange && v == nil {
  21308. xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
  21309. v = make(map[uint8]uint16, xlen)
  21310. changed = true
  21311. }
  21312. if containerLen == 0 {
  21313. dd.ReadMapEnd()
  21314. return v, changed
  21315. }
  21316. var mk uint8
  21317. var mv uint16
  21318. hasLen := containerLen > 0
  21319. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21320. if esep {
  21321. dd.ReadMapElemKey()
  21322. }
  21323. mk = uint8(dd.DecodeUint(8))
  21324. if esep {
  21325. dd.ReadMapElemValue()
  21326. }
  21327. if dd.TryDecodeAsNil() {
  21328. if d.h.DeleteOnNilMapValue {
  21329. delete(v, mk)
  21330. } else {
  21331. v[mk] = 0
  21332. }
  21333. continue
  21334. }
  21335. mv = uint16(dd.DecodeUint(16))
  21336. if v != nil {
  21337. v[mk] = mv
  21338. }
  21339. }
  21340. dd.ReadMapEnd()
  21341. return v, changed
  21342. }
  21343. func (d *Decoder) fastpathDecMapUint8Uint32R(f *codecFnInfo, rv reflect.Value) {
  21344. if rv.Kind() == reflect.Ptr {
  21345. vp := rv2i(rv).(*map[uint8]uint32)
  21346. if v, changed := fastpathTV.DecMapUint8Uint32V(*vp, true, d); changed {
  21347. *vp = v
  21348. }
  21349. return
  21350. }
  21351. fastpathTV.DecMapUint8Uint32V(rv2i(rv).(map[uint8]uint32), false, d)
  21352. }
  21353. func (f fastpathT) DecMapUint8Uint32X(vp *map[uint8]uint32, d *Decoder) {
  21354. if v, changed := f.DecMapUint8Uint32V(*vp, true, d); changed {
  21355. *vp = v
  21356. }
  21357. }
  21358. func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, canChange bool,
  21359. d *Decoder) (_ map[uint8]uint32, changed bool) {
  21360. dd, esep := d.d, d.hh.hasElemSeparators()
  21361. containerLen := dd.ReadMapStart()
  21362. if canChange && v == nil {
  21363. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  21364. v = make(map[uint8]uint32, xlen)
  21365. changed = true
  21366. }
  21367. if containerLen == 0 {
  21368. dd.ReadMapEnd()
  21369. return v, changed
  21370. }
  21371. var mk uint8
  21372. var mv uint32
  21373. hasLen := containerLen > 0
  21374. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21375. if esep {
  21376. dd.ReadMapElemKey()
  21377. }
  21378. mk = uint8(dd.DecodeUint(8))
  21379. if esep {
  21380. dd.ReadMapElemValue()
  21381. }
  21382. if dd.TryDecodeAsNil() {
  21383. if d.h.DeleteOnNilMapValue {
  21384. delete(v, mk)
  21385. } else {
  21386. v[mk] = 0
  21387. }
  21388. continue
  21389. }
  21390. mv = uint32(dd.DecodeUint(32))
  21391. if v != nil {
  21392. v[mk] = mv
  21393. }
  21394. }
  21395. dd.ReadMapEnd()
  21396. return v, changed
  21397. }
  21398. func (d *Decoder) fastpathDecMapUint8Uint64R(f *codecFnInfo, rv reflect.Value) {
  21399. if rv.Kind() == reflect.Ptr {
  21400. vp := rv2i(rv).(*map[uint8]uint64)
  21401. if v, changed := fastpathTV.DecMapUint8Uint64V(*vp, true, d); changed {
  21402. *vp = v
  21403. }
  21404. return
  21405. }
  21406. fastpathTV.DecMapUint8Uint64V(rv2i(rv).(map[uint8]uint64), false, d)
  21407. }
  21408. func (f fastpathT) DecMapUint8Uint64X(vp *map[uint8]uint64, d *Decoder) {
  21409. if v, changed := f.DecMapUint8Uint64V(*vp, true, d); changed {
  21410. *vp = v
  21411. }
  21412. }
  21413. func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, canChange bool,
  21414. d *Decoder) (_ map[uint8]uint64, changed bool) {
  21415. dd, esep := d.d, d.hh.hasElemSeparators()
  21416. containerLen := dd.ReadMapStart()
  21417. if canChange && v == nil {
  21418. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  21419. v = make(map[uint8]uint64, xlen)
  21420. changed = true
  21421. }
  21422. if containerLen == 0 {
  21423. dd.ReadMapEnd()
  21424. return v, changed
  21425. }
  21426. var mk uint8
  21427. var mv uint64
  21428. hasLen := containerLen > 0
  21429. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21430. if esep {
  21431. dd.ReadMapElemKey()
  21432. }
  21433. mk = uint8(dd.DecodeUint(8))
  21434. if esep {
  21435. dd.ReadMapElemValue()
  21436. }
  21437. if dd.TryDecodeAsNil() {
  21438. if d.h.DeleteOnNilMapValue {
  21439. delete(v, mk)
  21440. } else {
  21441. v[mk] = 0
  21442. }
  21443. continue
  21444. }
  21445. mv = dd.DecodeUint(64)
  21446. if v != nil {
  21447. v[mk] = mv
  21448. }
  21449. }
  21450. dd.ReadMapEnd()
  21451. return v, changed
  21452. }
  21453. func (d *Decoder) fastpathDecMapUint8UintptrR(f *codecFnInfo, rv reflect.Value) {
  21454. if rv.Kind() == reflect.Ptr {
  21455. vp := rv2i(rv).(*map[uint8]uintptr)
  21456. if v, changed := fastpathTV.DecMapUint8UintptrV(*vp, true, d); changed {
  21457. *vp = v
  21458. }
  21459. return
  21460. }
  21461. fastpathTV.DecMapUint8UintptrV(rv2i(rv).(map[uint8]uintptr), false, d)
  21462. }
  21463. func (f fastpathT) DecMapUint8UintptrX(vp *map[uint8]uintptr, d *Decoder) {
  21464. if v, changed := f.DecMapUint8UintptrV(*vp, true, d); changed {
  21465. *vp = v
  21466. }
  21467. }
  21468. func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, canChange bool,
  21469. d *Decoder) (_ map[uint8]uintptr, changed bool) {
  21470. dd, esep := d.d, d.hh.hasElemSeparators()
  21471. containerLen := dd.ReadMapStart()
  21472. if canChange && v == nil {
  21473. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  21474. v = make(map[uint8]uintptr, xlen)
  21475. changed = true
  21476. }
  21477. if containerLen == 0 {
  21478. dd.ReadMapEnd()
  21479. return v, changed
  21480. }
  21481. var mk uint8
  21482. var mv uintptr
  21483. hasLen := containerLen > 0
  21484. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21485. if esep {
  21486. dd.ReadMapElemKey()
  21487. }
  21488. mk = uint8(dd.DecodeUint(8))
  21489. if esep {
  21490. dd.ReadMapElemValue()
  21491. }
  21492. if dd.TryDecodeAsNil() {
  21493. if d.h.DeleteOnNilMapValue {
  21494. delete(v, mk)
  21495. } else {
  21496. v[mk] = 0
  21497. }
  21498. continue
  21499. }
  21500. mv = uintptr(dd.DecodeUint(uintBitsize))
  21501. if v != nil {
  21502. v[mk] = mv
  21503. }
  21504. }
  21505. dd.ReadMapEnd()
  21506. return v, changed
  21507. }
  21508. func (d *Decoder) fastpathDecMapUint8IntR(f *codecFnInfo, rv reflect.Value) {
  21509. if rv.Kind() == reflect.Ptr {
  21510. vp := rv2i(rv).(*map[uint8]int)
  21511. if v, changed := fastpathTV.DecMapUint8IntV(*vp, true, d); changed {
  21512. *vp = v
  21513. }
  21514. return
  21515. }
  21516. fastpathTV.DecMapUint8IntV(rv2i(rv).(map[uint8]int), false, d)
  21517. }
  21518. func (f fastpathT) DecMapUint8IntX(vp *map[uint8]int, d *Decoder) {
  21519. if v, changed := f.DecMapUint8IntV(*vp, true, d); changed {
  21520. *vp = v
  21521. }
  21522. }
  21523. func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, canChange bool,
  21524. d *Decoder) (_ map[uint8]int, changed bool) {
  21525. dd, esep := d.d, d.hh.hasElemSeparators()
  21526. containerLen := dd.ReadMapStart()
  21527. if canChange && v == nil {
  21528. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  21529. v = make(map[uint8]int, xlen)
  21530. changed = true
  21531. }
  21532. if containerLen == 0 {
  21533. dd.ReadMapEnd()
  21534. return v, changed
  21535. }
  21536. var mk uint8
  21537. var mv int
  21538. hasLen := containerLen > 0
  21539. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21540. if esep {
  21541. dd.ReadMapElemKey()
  21542. }
  21543. mk = uint8(dd.DecodeUint(8))
  21544. if esep {
  21545. dd.ReadMapElemValue()
  21546. }
  21547. if dd.TryDecodeAsNil() {
  21548. if d.h.DeleteOnNilMapValue {
  21549. delete(v, mk)
  21550. } else {
  21551. v[mk] = 0
  21552. }
  21553. continue
  21554. }
  21555. mv = int(dd.DecodeInt(intBitsize))
  21556. if v != nil {
  21557. v[mk] = mv
  21558. }
  21559. }
  21560. dd.ReadMapEnd()
  21561. return v, changed
  21562. }
  21563. func (d *Decoder) fastpathDecMapUint8Int8R(f *codecFnInfo, rv reflect.Value) {
  21564. if rv.Kind() == reflect.Ptr {
  21565. vp := rv2i(rv).(*map[uint8]int8)
  21566. if v, changed := fastpathTV.DecMapUint8Int8V(*vp, true, d); changed {
  21567. *vp = v
  21568. }
  21569. return
  21570. }
  21571. fastpathTV.DecMapUint8Int8V(rv2i(rv).(map[uint8]int8), false, d)
  21572. }
  21573. func (f fastpathT) DecMapUint8Int8X(vp *map[uint8]int8, d *Decoder) {
  21574. if v, changed := f.DecMapUint8Int8V(*vp, true, d); changed {
  21575. *vp = v
  21576. }
  21577. }
  21578. func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, canChange bool,
  21579. d *Decoder) (_ map[uint8]int8, changed bool) {
  21580. dd, esep := d.d, d.hh.hasElemSeparators()
  21581. containerLen := dd.ReadMapStart()
  21582. if canChange && v == nil {
  21583. xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
  21584. v = make(map[uint8]int8, xlen)
  21585. changed = true
  21586. }
  21587. if containerLen == 0 {
  21588. dd.ReadMapEnd()
  21589. return v, changed
  21590. }
  21591. var mk uint8
  21592. var mv int8
  21593. hasLen := containerLen > 0
  21594. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21595. if esep {
  21596. dd.ReadMapElemKey()
  21597. }
  21598. mk = uint8(dd.DecodeUint(8))
  21599. if esep {
  21600. dd.ReadMapElemValue()
  21601. }
  21602. if dd.TryDecodeAsNil() {
  21603. if d.h.DeleteOnNilMapValue {
  21604. delete(v, mk)
  21605. } else {
  21606. v[mk] = 0
  21607. }
  21608. continue
  21609. }
  21610. mv = int8(dd.DecodeInt(8))
  21611. if v != nil {
  21612. v[mk] = mv
  21613. }
  21614. }
  21615. dd.ReadMapEnd()
  21616. return v, changed
  21617. }
  21618. func (d *Decoder) fastpathDecMapUint8Int16R(f *codecFnInfo, rv reflect.Value) {
  21619. if rv.Kind() == reflect.Ptr {
  21620. vp := rv2i(rv).(*map[uint8]int16)
  21621. if v, changed := fastpathTV.DecMapUint8Int16V(*vp, true, d); changed {
  21622. *vp = v
  21623. }
  21624. return
  21625. }
  21626. fastpathTV.DecMapUint8Int16V(rv2i(rv).(map[uint8]int16), false, d)
  21627. }
  21628. func (f fastpathT) DecMapUint8Int16X(vp *map[uint8]int16, d *Decoder) {
  21629. if v, changed := f.DecMapUint8Int16V(*vp, true, d); changed {
  21630. *vp = v
  21631. }
  21632. }
  21633. func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, canChange bool,
  21634. d *Decoder) (_ map[uint8]int16, changed bool) {
  21635. dd, esep := d.d, d.hh.hasElemSeparators()
  21636. containerLen := dd.ReadMapStart()
  21637. if canChange && v == nil {
  21638. xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
  21639. v = make(map[uint8]int16, xlen)
  21640. changed = true
  21641. }
  21642. if containerLen == 0 {
  21643. dd.ReadMapEnd()
  21644. return v, changed
  21645. }
  21646. var mk uint8
  21647. var mv int16
  21648. hasLen := containerLen > 0
  21649. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21650. if esep {
  21651. dd.ReadMapElemKey()
  21652. }
  21653. mk = uint8(dd.DecodeUint(8))
  21654. if esep {
  21655. dd.ReadMapElemValue()
  21656. }
  21657. if dd.TryDecodeAsNil() {
  21658. if d.h.DeleteOnNilMapValue {
  21659. delete(v, mk)
  21660. } else {
  21661. v[mk] = 0
  21662. }
  21663. continue
  21664. }
  21665. mv = int16(dd.DecodeInt(16))
  21666. if v != nil {
  21667. v[mk] = mv
  21668. }
  21669. }
  21670. dd.ReadMapEnd()
  21671. return v, changed
  21672. }
  21673. func (d *Decoder) fastpathDecMapUint8Int32R(f *codecFnInfo, rv reflect.Value) {
  21674. if rv.Kind() == reflect.Ptr {
  21675. vp := rv2i(rv).(*map[uint8]int32)
  21676. if v, changed := fastpathTV.DecMapUint8Int32V(*vp, true, d); changed {
  21677. *vp = v
  21678. }
  21679. return
  21680. }
  21681. fastpathTV.DecMapUint8Int32V(rv2i(rv).(map[uint8]int32), false, d)
  21682. }
  21683. func (f fastpathT) DecMapUint8Int32X(vp *map[uint8]int32, d *Decoder) {
  21684. if v, changed := f.DecMapUint8Int32V(*vp, true, d); changed {
  21685. *vp = v
  21686. }
  21687. }
  21688. func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, canChange bool,
  21689. d *Decoder) (_ map[uint8]int32, changed bool) {
  21690. dd, esep := d.d, d.hh.hasElemSeparators()
  21691. containerLen := dd.ReadMapStart()
  21692. if canChange && v == nil {
  21693. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  21694. v = make(map[uint8]int32, xlen)
  21695. changed = true
  21696. }
  21697. if containerLen == 0 {
  21698. dd.ReadMapEnd()
  21699. return v, changed
  21700. }
  21701. var mk uint8
  21702. var mv int32
  21703. hasLen := containerLen > 0
  21704. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21705. if esep {
  21706. dd.ReadMapElemKey()
  21707. }
  21708. mk = uint8(dd.DecodeUint(8))
  21709. if esep {
  21710. dd.ReadMapElemValue()
  21711. }
  21712. if dd.TryDecodeAsNil() {
  21713. if d.h.DeleteOnNilMapValue {
  21714. delete(v, mk)
  21715. } else {
  21716. v[mk] = 0
  21717. }
  21718. continue
  21719. }
  21720. mv = int32(dd.DecodeInt(32))
  21721. if v != nil {
  21722. v[mk] = mv
  21723. }
  21724. }
  21725. dd.ReadMapEnd()
  21726. return v, changed
  21727. }
  21728. func (d *Decoder) fastpathDecMapUint8Int64R(f *codecFnInfo, rv reflect.Value) {
  21729. if rv.Kind() == reflect.Ptr {
  21730. vp := rv2i(rv).(*map[uint8]int64)
  21731. if v, changed := fastpathTV.DecMapUint8Int64V(*vp, true, d); changed {
  21732. *vp = v
  21733. }
  21734. return
  21735. }
  21736. fastpathTV.DecMapUint8Int64V(rv2i(rv).(map[uint8]int64), false, d)
  21737. }
  21738. func (f fastpathT) DecMapUint8Int64X(vp *map[uint8]int64, d *Decoder) {
  21739. if v, changed := f.DecMapUint8Int64V(*vp, true, d); changed {
  21740. *vp = v
  21741. }
  21742. }
  21743. func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, canChange bool,
  21744. d *Decoder) (_ map[uint8]int64, changed bool) {
  21745. dd, esep := d.d, d.hh.hasElemSeparators()
  21746. containerLen := dd.ReadMapStart()
  21747. if canChange && v == nil {
  21748. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  21749. v = make(map[uint8]int64, xlen)
  21750. changed = true
  21751. }
  21752. if containerLen == 0 {
  21753. dd.ReadMapEnd()
  21754. return v, changed
  21755. }
  21756. var mk uint8
  21757. var mv int64
  21758. hasLen := containerLen > 0
  21759. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21760. if esep {
  21761. dd.ReadMapElemKey()
  21762. }
  21763. mk = uint8(dd.DecodeUint(8))
  21764. if esep {
  21765. dd.ReadMapElemValue()
  21766. }
  21767. if dd.TryDecodeAsNil() {
  21768. if d.h.DeleteOnNilMapValue {
  21769. delete(v, mk)
  21770. } else {
  21771. v[mk] = 0
  21772. }
  21773. continue
  21774. }
  21775. mv = dd.DecodeInt(64)
  21776. if v != nil {
  21777. v[mk] = mv
  21778. }
  21779. }
  21780. dd.ReadMapEnd()
  21781. return v, changed
  21782. }
  21783. func (d *Decoder) fastpathDecMapUint8Float32R(f *codecFnInfo, rv reflect.Value) {
  21784. if rv.Kind() == reflect.Ptr {
  21785. vp := rv2i(rv).(*map[uint8]float32)
  21786. if v, changed := fastpathTV.DecMapUint8Float32V(*vp, true, d); changed {
  21787. *vp = v
  21788. }
  21789. return
  21790. }
  21791. fastpathTV.DecMapUint8Float32V(rv2i(rv).(map[uint8]float32), false, d)
  21792. }
  21793. func (f fastpathT) DecMapUint8Float32X(vp *map[uint8]float32, d *Decoder) {
  21794. if v, changed := f.DecMapUint8Float32V(*vp, true, d); changed {
  21795. *vp = v
  21796. }
  21797. }
  21798. func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, canChange bool,
  21799. d *Decoder) (_ map[uint8]float32, changed bool) {
  21800. dd, esep := d.d, d.hh.hasElemSeparators()
  21801. containerLen := dd.ReadMapStart()
  21802. if canChange && v == nil {
  21803. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  21804. v = make(map[uint8]float32, xlen)
  21805. changed = true
  21806. }
  21807. if containerLen == 0 {
  21808. dd.ReadMapEnd()
  21809. return v, changed
  21810. }
  21811. var mk uint8
  21812. var mv float32
  21813. hasLen := containerLen > 0
  21814. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21815. if esep {
  21816. dd.ReadMapElemKey()
  21817. }
  21818. mk = uint8(dd.DecodeUint(8))
  21819. if esep {
  21820. dd.ReadMapElemValue()
  21821. }
  21822. if dd.TryDecodeAsNil() {
  21823. if d.h.DeleteOnNilMapValue {
  21824. delete(v, mk)
  21825. } else {
  21826. v[mk] = 0
  21827. }
  21828. continue
  21829. }
  21830. mv = float32(dd.DecodeFloat(true))
  21831. if v != nil {
  21832. v[mk] = mv
  21833. }
  21834. }
  21835. dd.ReadMapEnd()
  21836. return v, changed
  21837. }
  21838. func (d *Decoder) fastpathDecMapUint8Float64R(f *codecFnInfo, rv reflect.Value) {
  21839. if rv.Kind() == reflect.Ptr {
  21840. vp := rv2i(rv).(*map[uint8]float64)
  21841. if v, changed := fastpathTV.DecMapUint8Float64V(*vp, true, d); changed {
  21842. *vp = v
  21843. }
  21844. return
  21845. }
  21846. fastpathTV.DecMapUint8Float64V(rv2i(rv).(map[uint8]float64), false, d)
  21847. }
  21848. func (f fastpathT) DecMapUint8Float64X(vp *map[uint8]float64, d *Decoder) {
  21849. if v, changed := f.DecMapUint8Float64V(*vp, true, d); changed {
  21850. *vp = v
  21851. }
  21852. }
  21853. func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, canChange bool,
  21854. d *Decoder) (_ map[uint8]float64, changed bool) {
  21855. dd, esep := d.d, d.hh.hasElemSeparators()
  21856. containerLen := dd.ReadMapStart()
  21857. if canChange && v == nil {
  21858. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  21859. v = make(map[uint8]float64, xlen)
  21860. changed = true
  21861. }
  21862. if containerLen == 0 {
  21863. dd.ReadMapEnd()
  21864. return v, changed
  21865. }
  21866. var mk uint8
  21867. var mv float64
  21868. hasLen := containerLen > 0
  21869. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21870. if esep {
  21871. dd.ReadMapElemKey()
  21872. }
  21873. mk = uint8(dd.DecodeUint(8))
  21874. if esep {
  21875. dd.ReadMapElemValue()
  21876. }
  21877. if dd.TryDecodeAsNil() {
  21878. if d.h.DeleteOnNilMapValue {
  21879. delete(v, mk)
  21880. } else {
  21881. v[mk] = 0
  21882. }
  21883. continue
  21884. }
  21885. mv = dd.DecodeFloat(false)
  21886. if v != nil {
  21887. v[mk] = mv
  21888. }
  21889. }
  21890. dd.ReadMapEnd()
  21891. return v, changed
  21892. }
  21893. func (d *Decoder) fastpathDecMapUint8BoolR(f *codecFnInfo, rv reflect.Value) {
  21894. if rv.Kind() == reflect.Ptr {
  21895. vp := rv2i(rv).(*map[uint8]bool)
  21896. if v, changed := fastpathTV.DecMapUint8BoolV(*vp, true, d); changed {
  21897. *vp = v
  21898. }
  21899. return
  21900. }
  21901. fastpathTV.DecMapUint8BoolV(rv2i(rv).(map[uint8]bool), false, d)
  21902. }
  21903. func (f fastpathT) DecMapUint8BoolX(vp *map[uint8]bool, d *Decoder) {
  21904. if v, changed := f.DecMapUint8BoolV(*vp, true, d); changed {
  21905. *vp = v
  21906. }
  21907. }
  21908. func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, canChange bool,
  21909. d *Decoder) (_ map[uint8]bool, changed bool) {
  21910. dd, esep := d.d, d.hh.hasElemSeparators()
  21911. containerLen := dd.ReadMapStart()
  21912. if canChange && v == nil {
  21913. xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
  21914. v = make(map[uint8]bool, xlen)
  21915. changed = true
  21916. }
  21917. if containerLen == 0 {
  21918. dd.ReadMapEnd()
  21919. return v, changed
  21920. }
  21921. var mk uint8
  21922. var mv bool
  21923. hasLen := containerLen > 0
  21924. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21925. if esep {
  21926. dd.ReadMapElemKey()
  21927. }
  21928. mk = uint8(dd.DecodeUint(8))
  21929. if esep {
  21930. dd.ReadMapElemValue()
  21931. }
  21932. if dd.TryDecodeAsNil() {
  21933. if d.h.DeleteOnNilMapValue {
  21934. delete(v, mk)
  21935. } else {
  21936. v[mk] = false
  21937. }
  21938. continue
  21939. }
  21940. mv = dd.DecodeBool()
  21941. if v != nil {
  21942. v[mk] = mv
  21943. }
  21944. }
  21945. dd.ReadMapEnd()
  21946. return v, changed
  21947. }
  21948. func (d *Decoder) fastpathDecMapUint16IntfR(f *codecFnInfo, rv reflect.Value) {
  21949. if rv.Kind() == reflect.Ptr {
  21950. vp := rv2i(rv).(*map[uint16]interface{})
  21951. if v, changed := fastpathTV.DecMapUint16IntfV(*vp, true, d); changed {
  21952. *vp = v
  21953. }
  21954. return
  21955. }
  21956. fastpathTV.DecMapUint16IntfV(rv2i(rv).(map[uint16]interface{}), false, d)
  21957. }
  21958. func (f fastpathT) DecMapUint16IntfX(vp *map[uint16]interface{}, d *Decoder) {
  21959. if v, changed := f.DecMapUint16IntfV(*vp, true, d); changed {
  21960. *vp = v
  21961. }
  21962. }
  21963. func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, canChange bool,
  21964. d *Decoder) (_ map[uint16]interface{}, changed bool) {
  21965. dd, esep := d.d, d.hh.hasElemSeparators()
  21966. containerLen := dd.ReadMapStart()
  21967. if canChange && v == nil {
  21968. xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
  21969. v = make(map[uint16]interface{}, xlen)
  21970. changed = true
  21971. }
  21972. if containerLen == 0 {
  21973. dd.ReadMapEnd()
  21974. return v, changed
  21975. }
  21976. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  21977. var mk uint16
  21978. var mv interface{}
  21979. hasLen := containerLen > 0
  21980. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  21981. if esep {
  21982. dd.ReadMapElemKey()
  21983. }
  21984. mk = uint16(dd.DecodeUint(16))
  21985. if esep {
  21986. dd.ReadMapElemValue()
  21987. }
  21988. if dd.TryDecodeAsNil() {
  21989. if d.h.DeleteOnNilMapValue {
  21990. delete(v, mk)
  21991. } else {
  21992. v[mk] = nil
  21993. }
  21994. continue
  21995. }
  21996. if mapGet {
  21997. mv = v[mk]
  21998. } else {
  21999. mv = nil
  22000. }
  22001. d.decode(&mv)
  22002. if v != nil {
  22003. v[mk] = mv
  22004. }
  22005. }
  22006. dd.ReadMapEnd()
  22007. return v, changed
  22008. }
  22009. func (d *Decoder) fastpathDecMapUint16StringR(f *codecFnInfo, rv reflect.Value) {
  22010. if rv.Kind() == reflect.Ptr {
  22011. vp := rv2i(rv).(*map[uint16]string)
  22012. if v, changed := fastpathTV.DecMapUint16StringV(*vp, true, d); changed {
  22013. *vp = v
  22014. }
  22015. return
  22016. }
  22017. fastpathTV.DecMapUint16StringV(rv2i(rv).(map[uint16]string), false, d)
  22018. }
  22019. func (f fastpathT) DecMapUint16StringX(vp *map[uint16]string, d *Decoder) {
  22020. if v, changed := f.DecMapUint16StringV(*vp, true, d); changed {
  22021. *vp = v
  22022. }
  22023. }
  22024. func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, canChange bool,
  22025. d *Decoder) (_ map[uint16]string, changed bool) {
  22026. dd, esep := d.d, d.hh.hasElemSeparators()
  22027. containerLen := dd.ReadMapStart()
  22028. if canChange && v == nil {
  22029. xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
  22030. v = make(map[uint16]string, xlen)
  22031. changed = true
  22032. }
  22033. if containerLen == 0 {
  22034. dd.ReadMapEnd()
  22035. return v, changed
  22036. }
  22037. var mk uint16
  22038. var mv string
  22039. hasLen := containerLen > 0
  22040. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22041. if esep {
  22042. dd.ReadMapElemKey()
  22043. }
  22044. mk = uint16(dd.DecodeUint(16))
  22045. if esep {
  22046. dd.ReadMapElemValue()
  22047. }
  22048. if dd.TryDecodeAsNil() {
  22049. if d.h.DeleteOnNilMapValue {
  22050. delete(v, mk)
  22051. } else {
  22052. v[mk] = ""
  22053. }
  22054. continue
  22055. }
  22056. mv = dd.DecodeString()
  22057. if v != nil {
  22058. v[mk] = mv
  22059. }
  22060. }
  22061. dd.ReadMapEnd()
  22062. return v, changed
  22063. }
  22064. func (d *Decoder) fastpathDecMapUint16UintR(f *codecFnInfo, rv reflect.Value) {
  22065. if rv.Kind() == reflect.Ptr {
  22066. vp := rv2i(rv).(*map[uint16]uint)
  22067. if v, changed := fastpathTV.DecMapUint16UintV(*vp, true, d); changed {
  22068. *vp = v
  22069. }
  22070. return
  22071. }
  22072. fastpathTV.DecMapUint16UintV(rv2i(rv).(map[uint16]uint), false, d)
  22073. }
  22074. func (f fastpathT) DecMapUint16UintX(vp *map[uint16]uint, d *Decoder) {
  22075. if v, changed := f.DecMapUint16UintV(*vp, true, d); changed {
  22076. *vp = v
  22077. }
  22078. }
  22079. func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, canChange bool,
  22080. d *Decoder) (_ map[uint16]uint, changed bool) {
  22081. dd, esep := d.d, d.hh.hasElemSeparators()
  22082. containerLen := dd.ReadMapStart()
  22083. if canChange && v == nil {
  22084. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  22085. v = make(map[uint16]uint, xlen)
  22086. changed = true
  22087. }
  22088. if containerLen == 0 {
  22089. dd.ReadMapEnd()
  22090. return v, changed
  22091. }
  22092. var mk uint16
  22093. var mv uint
  22094. hasLen := containerLen > 0
  22095. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22096. if esep {
  22097. dd.ReadMapElemKey()
  22098. }
  22099. mk = uint16(dd.DecodeUint(16))
  22100. if esep {
  22101. dd.ReadMapElemValue()
  22102. }
  22103. if dd.TryDecodeAsNil() {
  22104. if d.h.DeleteOnNilMapValue {
  22105. delete(v, mk)
  22106. } else {
  22107. v[mk] = 0
  22108. }
  22109. continue
  22110. }
  22111. mv = uint(dd.DecodeUint(uintBitsize))
  22112. if v != nil {
  22113. v[mk] = mv
  22114. }
  22115. }
  22116. dd.ReadMapEnd()
  22117. return v, changed
  22118. }
  22119. func (d *Decoder) fastpathDecMapUint16Uint8R(f *codecFnInfo, rv reflect.Value) {
  22120. if rv.Kind() == reflect.Ptr {
  22121. vp := rv2i(rv).(*map[uint16]uint8)
  22122. if v, changed := fastpathTV.DecMapUint16Uint8V(*vp, true, d); changed {
  22123. *vp = v
  22124. }
  22125. return
  22126. }
  22127. fastpathTV.DecMapUint16Uint8V(rv2i(rv).(map[uint16]uint8), false, d)
  22128. }
  22129. func (f fastpathT) DecMapUint16Uint8X(vp *map[uint16]uint8, d *Decoder) {
  22130. if v, changed := f.DecMapUint16Uint8V(*vp, true, d); changed {
  22131. *vp = v
  22132. }
  22133. }
  22134. func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, canChange bool,
  22135. d *Decoder) (_ map[uint16]uint8, changed bool) {
  22136. dd, esep := d.d, d.hh.hasElemSeparators()
  22137. containerLen := dd.ReadMapStart()
  22138. if canChange && v == nil {
  22139. xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
  22140. v = make(map[uint16]uint8, xlen)
  22141. changed = true
  22142. }
  22143. if containerLen == 0 {
  22144. dd.ReadMapEnd()
  22145. return v, changed
  22146. }
  22147. var mk uint16
  22148. var mv uint8
  22149. hasLen := containerLen > 0
  22150. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22151. if esep {
  22152. dd.ReadMapElemKey()
  22153. }
  22154. mk = uint16(dd.DecodeUint(16))
  22155. if esep {
  22156. dd.ReadMapElemValue()
  22157. }
  22158. if dd.TryDecodeAsNil() {
  22159. if d.h.DeleteOnNilMapValue {
  22160. delete(v, mk)
  22161. } else {
  22162. v[mk] = 0
  22163. }
  22164. continue
  22165. }
  22166. mv = uint8(dd.DecodeUint(8))
  22167. if v != nil {
  22168. v[mk] = mv
  22169. }
  22170. }
  22171. dd.ReadMapEnd()
  22172. return v, changed
  22173. }
  22174. func (d *Decoder) fastpathDecMapUint16Uint16R(f *codecFnInfo, rv reflect.Value) {
  22175. if rv.Kind() == reflect.Ptr {
  22176. vp := rv2i(rv).(*map[uint16]uint16)
  22177. if v, changed := fastpathTV.DecMapUint16Uint16V(*vp, true, d); changed {
  22178. *vp = v
  22179. }
  22180. return
  22181. }
  22182. fastpathTV.DecMapUint16Uint16V(rv2i(rv).(map[uint16]uint16), false, d)
  22183. }
  22184. func (f fastpathT) DecMapUint16Uint16X(vp *map[uint16]uint16, d *Decoder) {
  22185. if v, changed := f.DecMapUint16Uint16V(*vp, true, d); changed {
  22186. *vp = v
  22187. }
  22188. }
  22189. func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, canChange bool,
  22190. d *Decoder) (_ map[uint16]uint16, changed bool) {
  22191. dd, esep := d.d, d.hh.hasElemSeparators()
  22192. containerLen := dd.ReadMapStart()
  22193. if canChange && v == nil {
  22194. xlen := decInferLen(containerLen, d.h.MaxInitLen, 4)
  22195. v = make(map[uint16]uint16, xlen)
  22196. changed = true
  22197. }
  22198. if containerLen == 0 {
  22199. dd.ReadMapEnd()
  22200. return v, changed
  22201. }
  22202. var mk uint16
  22203. var mv uint16
  22204. hasLen := containerLen > 0
  22205. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22206. if esep {
  22207. dd.ReadMapElemKey()
  22208. }
  22209. mk = uint16(dd.DecodeUint(16))
  22210. if esep {
  22211. dd.ReadMapElemValue()
  22212. }
  22213. if dd.TryDecodeAsNil() {
  22214. if d.h.DeleteOnNilMapValue {
  22215. delete(v, mk)
  22216. } else {
  22217. v[mk] = 0
  22218. }
  22219. continue
  22220. }
  22221. mv = uint16(dd.DecodeUint(16))
  22222. if v != nil {
  22223. v[mk] = mv
  22224. }
  22225. }
  22226. dd.ReadMapEnd()
  22227. return v, changed
  22228. }
  22229. func (d *Decoder) fastpathDecMapUint16Uint32R(f *codecFnInfo, rv reflect.Value) {
  22230. if rv.Kind() == reflect.Ptr {
  22231. vp := rv2i(rv).(*map[uint16]uint32)
  22232. if v, changed := fastpathTV.DecMapUint16Uint32V(*vp, true, d); changed {
  22233. *vp = v
  22234. }
  22235. return
  22236. }
  22237. fastpathTV.DecMapUint16Uint32V(rv2i(rv).(map[uint16]uint32), false, d)
  22238. }
  22239. func (f fastpathT) DecMapUint16Uint32X(vp *map[uint16]uint32, d *Decoder) {
  22240. if v, changed := f.DecMapUint16Uint32V(*vp, true, d); changed {
  22241. *vp = v
  22242. }
  22243. }
  22244. func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, canChange bool,
  22245. d *Decoder) (_ map[uint16]uint32, changed bool) {
  22246. dd, esep := d.d, d.hh.hasElemSeparators()
  22247. containerLen := dd.ReadMapStart()
  22248. if canChange && v == nil {
  22249. xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
  22250. v = make(map[uint16]uint32, xlen)
  22251. changed = true
  22252. }
  22253. if containerLen == 0 {
  22254. dd.ReadMapEnd()
  22255. return v, changed
  22256. }
  22257. var mk uint16
  22258. var mv uint32
  22259. hasLen := containerLen > 0
  22260. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22261. if esep {
  22262. dd.ReadMapElemKey()
  22263. }
  22264. mk = uint16(dd.DecodeUint(16))
  22265. if esep {
  22266. dd.ReadMapElemValue()
  22267. }
  22268. if dd.TryDecodeAsNil() {
  22269. if d.h.DeleteOnNilMapValue {
  22270. delete(v, mk)
  22271. } else {
  22272. v[mk] = 0
  22273. }
  22274. continue
  22275. }
  22276. mv = uint32(dd.DecodeUint(32))
  22277. if v != nil {
  22278. v[mk] = mv
  22279. }
  22280. }
  22281. dd.ReadMapEnd()
  22282. return v, changed
  22283. }
  22284. func (d *Decoder) fastpathDecMapUint16Uint64R(f *codecFnInfo, rv reflect.Value) {
  22285. if rv.Kind() == reflect.Ptr {
  22286. vp := rv2i(rv).(*map[uint16]uint64)
  22287. if v, changed := fastpathTV.DecMapUint16Uint64V(*vp, true, d); changed {
  22288. *vp = v
  22289. }
  22290. return
  22291. }
  22292. fastpathTV.DecMapUint16Uint64V(rv2i(rv).(map[uint16]uint64), false, d)
  22293. }
  22294. func (f fastpathT) DecMapUint16Uint64X(vp *map[uint16]uint64, d *Decoder) {
  22295. if v, changed := f.DecMapUint16Uint64V(*vp, true, d); changed {
  22296. *vp = v
  22297. }
  22298. }
  22299. func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, canChange bool,
  22300. d *Decoder) (_ map[uint16]uint64, changed bool) {
  22301. dd, esep := d.d, d.hh.hasElemSeparators()
  22302. containerLen := dd.ReadMapStart()
  22303. if canChange && v == nil {
  22304. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  22305. v = make(map[uint16]uint64, xlen)
  22306. changed = true
  22307. }
  22308. if containerLen == 0 {
  22309. dd.ReadMapEnd()
  22310. return v, changed
  22311. }
  22312. var mk uint16
  22313. var mv uint64
  22314. hasLen := containerLen > 0
  22315. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22316. if esep {
  22317. dd.ReadMapElemKey()
  22318. }
  22319. mk = uint16(dd.DecodeUint(16))
  22320. if esep {
  22321. dd.ReadMapElemValue()
  22322. }
  22323. if dd.TryDecodeAsNil() {
  22324. if d.h.DeleteOnNilMapValue {
  22325. delete(v, mk)
  22326. } else {
  22327. v[mk] = 0
  22328. }
  22329. continue
  22330. }
  22331. mv = dd.DecodeUint(64)
  22332. if v != nil {
  22333. v[mk] = mv
  22334. }
  22335. }
  22336. dd.ReadMapEnd()
  22337. return v, changed
  22338. }
  22339. func (d *Decoder) fastpathDecMapUint16UintptrR(f *codecFnInfo, rv reflect.Value) {
  22340. if rv.Kind() == reflect.Ptr {
  22341. vp := rv2i(rv).(*map[uint16]uintptr)
  22342. if v, changed := fastpathTV.DecMapUint16UintptrV(*vp, true, d); changed {
  22343. *vp = v
  22344. }
  22345. return
  22346. }
  22347. fastpathTV.DecMapUint16UintptrV(rv2i(rv).(map[uint16]uintptr), false, d)
  22348. }
  22349. func (f fastpathT) DecMapUint16UintptrX(vp *map[uint16]uintptr, d *Decoder) {
  22350. if v, changed := f.DecMapUint16UintptrV(*vp, true, d); changed {
  22351. *vp = v
  22352. }
  22353. }
  22354. func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, canChange bool,
  22355. d *Decoder) (_ map[uint16]uintptr, changed bool) {
  22356. dd, esep := d.d, d.hh.hasElemSeparators()
  22357. containerLen := dd.ReadMapStart()
  22358. if canChange && v == nil {
  22359. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  22360. v = make(map[uint16]uintptr, xlen)
  22361. changed = true
  22362. }
  22363. if containerLen == 0 {
  22364. dd.ReadMapEnd()
  22365. return v, changed
  22366. }
  22367. var mk uint16
  22368. var mv uintptr
  22369. hasLen := containerLen > 0
  22370. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22371. if esep {
  22372. dd.ReadMapElemKey()
  22373. }
  22374. mk = uint16(dd.DecodeUint(16))
  22375. if esep {
  22376. dd.ReadMapElemValue()
  22377. }
  22378. if dd.TryDecodeAsNil() {
  22379. if d.h.DeleteOnNilMapValue {
  22380. delete(v, mk)
  22381. } else {
  22382. v[mk] = 0
  22383. }
  22384. continue
  22385. }
  22386. mv = uintptr(dd.DecodeUint(uintBitsize))
  22387. if v != nil {
  22388. v[mk] = mv
  22389. }
  22390. }
  22391. dd.ReadMapEnd()
  22392. return v, changed
  22393. }
  22394. func (d *Decoder) fastpathDecMapUint16IntR(f *codecFnInfo, rv reflect.Value) {
  22395. if rv.Kind() == reflect.Ptr {
  22396. vp := rv2i(rv).(*map[uint16]int)
  22397. if v, changed := fastpathTV.DecMapUint16IntV(*vp, true, d); changed {
  22398. *vp = v
  22399. }
  22400. return
  22401. }
  22402. fastpathTV.DecMapUint16IntV(rv2i(rv).(map[uint16]int), false, d)
  22403. }
  22404. func (f fastpathT) DecMapUint16IntX(vp *map[uint16]int, d *Decoder) {
  22405. if v, changed := f.DecMapUint16IntV(*vp, true, d); changed {
  22406. *vp = v
  22407. }
  22408. }
  22409. func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, canChange bool,
  22410. d *Decoder) (_ map[uint16]int, changed bool) {
  22411. dd, esep := d.d, d.hh.hasElemSeparators()
  22412. containerLen := dd.ReadMapStart()
  22413. if canChange && v == nil {
  22414. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  22415. v = make(map[uint16]int, xlen)
  22416. changed = true
  22417. }
  22418. if containerLen == 0 {
  22419. dd.ReadMapEnd()
  22420. return v, changed
  22421. }
  22422. var mk uint16
  22423. var mv int
  22424. hasLen := containerLen > 0
  22425. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22426. if esep {
  22427. dd.ReadMapElemKey()
  22428. }
  22429. mk = uint16(dd.DecodeUint(16))
  22430. if esep {
  22431. dd.ReadMapElemValue()
  22432. }
  22433. if dd.TryDecodeAsNil() {
  22434. if d.h.DeleteOnNilMapValue {
  22435. delete(v, mk)
  22436. } else {
  22437. v[mk] = 0
  22438. }
  22439. continue
  22440. }
  22441. mv = int(dd.DecodeInt(intBitsize))
  22442. if v != nil {
  22443. v[mk] = mv
  22444. }
  22445. }
  22446. dd.ReadMapEnd()
  22447. return v, changed
  22448. }
  22449. func (d *Decoder) fastpathDecMapUint16Int8R(f *codecFnInfo, rv reflect.Value) {
  22450. if rv.Kind() == reflect.Ptr {
  22451. vp := rv2i(rv).(*map[uint16]int8)
  22452. if v, changed := fastpathTV.DecMapUint16Int8V(*vp, true, d); changed {
  22453. *vp = v
  22454. }
  22455. return
  22456. }
  22457. fastpathTV.DecMapUint16Int8V(rv2i(rv).(map[uint16]int8), false, d)
  22458. }
  22459. func (f fastpathT) DecMapUint16Int8X(vp *map[uint16]int8, d *Decoder) {
  22460. if v, changed := f.DecMapUint16Int8V(*vp, true, d); changed {
  22461. *vp = v
  22462. }
  22463. }
  22464. func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, canChange bool,
  22465. d *Decoder) (_ map[uint16]int8, changed bool) {
  22466. dd, esep := d.d, d.hh.hasElemSeparators()
  22467. containerLen := dd.ReadMapStart()
  22468. if canChange && v == nil {
  22469. xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
  22470. v = make(map[uint16]int8, xlen)
  22471. changed = true
  22472. }
  22473. if containerLen == 0 {
  22474. dd.ReadMapEnd()
  22475. return v, changed
  22476. }
  22477. var mk uint16
  22478. var mv int8
  22479. hasLen := containerLen > 0
  22480. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22481. if esep {
  22482. dd.ReadMapElemKey()
  22483. }
  22484. mk = uint16(dd.DecodeUint(16))
  22485. if esep {
  22486. dd.ReadMapElemValue()
  22487. }
  22488. if dd.TryDecodeAsNil() {
  22489. if d.h.DeleteOnNilMapValue {
  22490. delete(v, mk)
  22491. } else {
  22492. v[mk] = 0
  22493. }
  22494. continue
  22495. }
  22496. mv = int8(dd.DecodeInt(8))
  22497. if v != nil {
  22498. v[mk] = mv
  22499. }
  22500. }
  22501. dd.ReadMapEnd()
  22502. return v, changed
  22503. }
  22504. func (d *Decoder) fastpathDecMapUint16Int16R(f *codecFnInfo, rv reflect.Value) {
  22505. if rv.Kind() == reflect.Ptr {
  22506. vp := rv2i(rv).(*map[uint16]int16)
  22507. if v, changed := fastpathTV.DecMapUint16Int16V(*vp, true, d); changed {
  22508. *vp = v
  22509. }
  22510. return
  22511. }
  22512. fastpathTV.DecMapUint16Int16V(rv2i(rv).(map[uint16]int16), false, d)
  22513. }
  22514. func (f fastpathT) DecMapUint16Int16X(vp *map[uint16]int16, d *Decoder) {
  22515. if v, changed := f.DecMapUint16Int16V(*vp, true, d); changed {
  22516. *vp = v
  22517. }
  22518. }
  22519. func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, canChange bool,
  22520. d *Decoder) (_ map[uint16]int16, changed bool) {
  22521. dd, esep := d.d, d.hh.hasElemSeparators()
  22522. containerLen := dd.ReadMapStart()
  22523. if canChange && v == nil {
  22524. xlen := decInferLen(containerLen, d.h.MaxInitLen, 4)
  22525. v = make(map[uint16]int16, xlen)
  22526. changed = true
  22527. }
  22528. if containerLen == 0 {
  22529. dd.ReadMapEnd()
  22530. return v, changed
  22531. }
  22532. var mk uint16
  22533. var mv int16
  22534. hasLen := containerLen > 0
  22535. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22536. if esep {
  22537. dd.ReadMapElemKey()
  22538. }
  22539. mk = uint16(dd.DecodeUint(16))
  22540. if esep {
  22541. dd.ReadMapElemValue()
  22542. }
  22543. if dd.TryDecodeAsNil() {
  22544. if d.h.DeleteOnNilMapValue {
  22545. delete(v, mk)
  22546. } else {
  22547. v[mk] = 0
  22548. }
  22549. continue
  22550. }
  22551. mv = int16(dd.DecodeInt(16))
  22552. if v != nil {
  22553. v[mk] = mv
  22554. }
  22555. }
  22556. dd.ReadMapEnd()
  22557. return v, changed
  22558. }
  22559. func (d *Decoder) fastpathDecMapUint16Int32R(f *codecFnInfo, rv reflect.Value) {
  22560. if rv.Kind() == reflect.Ptr {
  22561. vp := rv2i(rv).(*map[uint16]int32)
  22562. if v, changed := fastpathTV.DecMapUint16Int32V(*vp, true, d); changed {
  22563. *vp = v
  22564. }
  22565. return
  22566. }
  22567. fastpathTV.DecMapUint16Int32V(rv2i(rv).(map[uint16]int32), false, d)
  22568. }
  22569. func (f fastpathT) DecMapUint16Int32X(vp *map[uint16]int32, d *Decoder) {
  22570. if v, changed := f.DecMapUint16Int32V(*vp, true, d); changed {
  22571. *vp = v
  22572. }
  22573. }
  22574. func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, canChange bool,
  22575. d *Decoder) (_ map[uint16]int32, changed bool) {
  22576. dd, esep := d.d, d.hh.hasElemSeparators()
  22577. containerLen := dd.ReadMapStart()
  22578. if canChange && v == nil {
  22579. xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
  22580. v = make(map[uint16]int32, xlen)
  22581. changed = true
  22582. }
  22583. if containerLen == 0 {
  22584. dd.ReadMapEnd()
  22585. return v, changed
  22586. }
  22587. var mk uint16
  22588. var mv int32
  22589. hasLen := containerLen > 0
  22590. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22591. if esep {
  22592. dd.ReadMapElemKey()
  22593. }
  22594. mk = uint16(dd.DecodeUint(16))
  22595. if esep {
  22596. dd.ReadMapElemValue()
  22597. }
  22598. if dd.TryDecodeAsNil() {
  22599. if d.h.DeleteOnNilMapValue {
  22600. delete(v, mk)
  22601. } else {
  22602. v[mk] = 0
  22603. }
  22604. continue
  22605. }
  22606. mv = int32(dd.DecodeInt(32))
  22607. if v != nil {
  22608. v[mk] = mv
  22609. }
  22610. }
  22611. dd.ReadMapEnd()
  22612. return v, changed
  22613. }
  22614. func (d *Decoder) fastpathDecMapUint16Int64R(f *codecFnInfo, rv reflect.Value) {
  22615. if rv.Kind() == reflect.Ptr {
  22616. vp := rv2i(rv).(*map[uint16]int64)
  22617. if v, changed := fastpathTV.DecMapUint16Int64V(*vp, true, d); changed {
  22618. *vp = v
  22619. }
  22620. return
  22621. }
  22622. fastpathTV.DecMapUint16Int64V(rv2i(rv).(map[uint16]int64), false, d)
  22623. }
  22624. func (f fastpathT) DecMapUint16Int64X(vp *map[uint16]int64, d *Decoder) {
  22625. if v, changed := f.DecMapUint16Int64V(*vp, true, d); changed {
  22626. *vp = v
  22627. }
  22628. }
  22629. func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, canChange bool,
  22630. d *Decoder) (_ map[uint16]int64, changed bool) {
  22631. dd, esep := d.d, d.hh.hasElemSeparators()
  22632. containerLen := dd.ReadMapStart()
  22633. if canChange && v == nil {
  22634. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  22635. v = make(map[uint16]int64, xlen)
  22636. changed = true
  22637. }
  22638. if containerLen == 0 {
  22639. dd.ReadMapEnd()
  22640. return v, changed
  22641. }
  22642. var mk uint16
  22643. var mv int64
  22644. hasLen := containerLen > 0
  22645. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22646. if esep {
  22647. dd.ReadMapElemKey()
  22648. }
  22649. mk = uint16(dd.DecodeUint(16))
  22650. if esep {
  22651. dd.ReadMapElemValue()
  22652. }
  22653. if dd.TryDecodeAsNil() {
  22654. if d.h.DeleteOnNilMapValue {
  22655. delete(v, mk)
  22656. } else {
  22657. v[mk] = 0
  22658. }
  22659. continue
  22660. }
  22661. mv = dd.DecodeInt(64)
  22662. if v != nil {
  22663. v[mk] = mv
  22664. }
  22665. }
  22666. dd.ReadMapEnd()
  22667. return v, changed
  22668. }
  22669. func (d *Decoder) fastpathDecMapUint16Float32R(f *codecFnInfo, rv reflect.Value) {
  22670. if rv.Kind() == reflect.Ptr {
  22671. vp := rv2i(rv).(*map[uint16]float32)
  22672. if v, changed := fastpathTV.DecMapUint16Float32V(*vp, true, d); changed {
  22673. *vp = v
  22674. }
  22675. return
  22676. }
  22677. fastpathTV.DecMapUint16Float32V(rv2i(rv).(map[uint16]float32), false, d)
  22678. }
  22679. func (f fastpathT) DecMapUint16Float32X(vp *map[uint16]float32, d *Decoder) {
  22680. if v, changed := f.DecMapUint16Float32V(*vp, true, d); changed {
  22681. *vp = v
  22682. }
  22683. }
  22684. func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, canChange bool,
  22685. d *Decoder) (_ map[uint16]float32, changed bool) {
  22686. dd, esep := d.d, d.hh.hasElemSeparators()
  22687. containerLen := dd.ReadMapStart()
  22688. if canChange && v == nil {
  22689. xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
  22690. v = make(map[uint16]float32, xlen)
  22691. changed = true
  22692. }
  22693. if containerLen == 0 {
  22694. dd.ReadMapEnd()
  22695. return v, changed
  22696. }
  22697. var mk uint16
  22698. var mv float32
  22699. hasLen := containerLen > 0
  22700. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22701. if esep {
  22702. dd.ReadMapElemKey()
  22703. }
  22704. mk = uint16(dd.DecodeUint(16))
  22705. if esep {
  22706. dd.ReadMapElemValue()
  22707. }
  22708. if dd.TryDecodeAsNil() {
  22709. if d.h.DeleteOnNilMapValue {
  22710. delete(v, mk)
  22711. } else {
  22712. v[mk] = 0
  22713. }
  22714. continue
  22715. }
  22716. mv = float32(dd.DecodeFloat(true))
  22717. if v != nil {
  22718. v[mk] = mv
  22719. }
  22720. }
  22721. dd.ReadMapEnd()
  22722. return v, changed
  22723. }
  22724. func (d *Decoder) fastpathDecMapUint16Float64R(f *codecFnInfo, rv reflect.Value) {
  22725. if rv.Kind() == reflect.Ptr {
  22726. vp := rv2i(rv).(*map[uint16]float64)
  22727. if v, changed := fastpathTV.DecMapUint16Float64V(*vp, true, d); changed {
  22728. *vp = v
  22729. }
  22730. return
  22731. }
  22732. fastpathTV.DecMapUint16Float64V(rv2i(rv).(map[uint16]float64), false, d)
  22733. }
  22734. func (f fastpathT) DecMapUint16Float64X(vp *map[uint16]float64, d *Decoder) {
  22735. if v, changed := f.DecMapUint16Float64V(*vp, true, d); changed {
  22736. *vp = v
  22737. }
  22738. }
  22739. func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, canChange bool,
  22740. d *Decoder) (_ map[uint16]float64, changed bool) {
  22741. dd, esep := d.d, d.hh.hasElemSeparators()
  22742. containerLen := dd.ReadMapStart()
  22743. if canChange && v == nil {
  22744. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  22745. v = make(map[uint16]float64, xlen)
  22746. changed = true
  22747. }
  22748. if containerLen == 0 {
  22749. dd.ReadMapEnd()
  22750. return v, changed
  22751. }
  22752. var mk uint16
  22753. var mv float64
  22754. hasLen := containerLen > 0
  22755. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22756. if esep {
  22757. dd.ReadMapElemKey()
  22758. }
  22759. mk = uint16(dd.DecodeUint(16))
  22760. if esep {
  22761. dd.ReadMapElemValue()
  22762. }
  22763. if dd.TryDecodeAsNil() {
  22764. if d.h.DeleteOnNilMapValue {
  22765. delete(v, mk)
  22766. } else {
  22767. v[mk] = 0
  22768. }
  22769. continue
  22770. }
  22771. mv = dd.DecodeFloat(false)
  22772. if v != nil {
  22773. v[mk] = mv
  22774. }
  22775. }
  22776. dd.ReadMapEnd()
  22777. return v, changed
  22778. }
  22779. func (d *Decoder) fastpathDecMapUint16BoolR(f *codecFnInfo, rv reflect.Value) {
  22780. if rv.Kind() == reflect.Ptr {
  22781. vp := rv2i(rv).(*map[uint16]bool)
  22782. if v, changed := fastpathTV.DecMapUint16BoolV(*vp, true, d); changed {
  22783. *vp = v
  22784. }
  22785. return
  22786. }
  22787. fastpathTV.DecMapUint16BoolV(rv2i(rv).(map[uint16]bool), false, d)
  22788. }
  22789. func (f fastpathT) DecMapUint16BoolX(vp *map[uint16]bool, d *Decoder) {
  22790. if v, changed := f.DecMapUint16BoolV(*vp, true, d); changed {
  22791. *vp = v
  22792. }
  22793. }
  22794. func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, canChange bool,
  22795. d *Decoder) (_ map[uint16]bool, changed bool) {
  22796. dd, esep := d.d, d.hh.hasElemSeparators()
  22797. containerLen := dd.ReadMapStart()
  22798. if canChange && v == nil {
  22799. xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
  22800. v = make(map[uint16]bool, xlen)
  22801. changed = true
  22802. }
  22803. if containerLen == 0 {
  22804. dd.ReadMapEnd()
  22805. return v, changed
  22806. }
  22807. var mk uint16
  22808. var mv bool
  22809. hasLen := containerLen > 0
  22810. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22811. if esep {
  22812. dd.ReadMapElemKey()
  22813. }
  22814. mk = uint16(dd.DecodeUint(16))
  22815. if esep {
  22816. dd.ReadMapElemValue()
  22817. }
  22818. if dd.TryDecodeAsNil() {
  22819. if d.h.DeleteOnNilMapValue {
  22820. delete(v, mk)
  22821. } else {
  22822. v[mk] = false
  22823. }
  22824. continue
  22825. }
  22826. mv = dd.DecodeBool()
  22827. if v != nil {
  22828. v[mk] = mv
  22829. }
  22830. }
  22831. dd.ReadMapEnd()
  22832. return v, changed
  22833. }
  22834. func (d *Decoder) fastpathDecMapUint32IntfR(f *codecFnInfo, rv reflect.Value) {
  22835. if rv.Kind() == reflect.Ptr {
  22836. vp := rv2i(rv).(*map[uint32]interface{})
  22837. if v, changed := fastpathTV.DecMapUint32IntfV(*vp, true, d); changed {
  22838. *vp = v
  22839. }
  22840. return
  22841. }
  22842. fastpathTV.DecMapUint32IntfV(rv2i(rv).(map[uint32]interface{}), false, d)
  22843. }
  22844. func (f fastpathT) DecMapUint32IntfX(vp *map[uint32]interface{}, d *Decoder) {
  22845. if v, changed := f.DecMapUint32IntfV(*vp, true, d); changed {
  22846. *vp = v
  22847. }
  22848. }
  22849. func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, canChange bool,
  22850. d *Decoder) (_ map[uint32]interface{}, changed bool) {
  22851. dd, esep := d.d, d.hh.hasElemSeparators()
  22852. containerLen := dd.ReadMapStart()
  22853. if canChange && v == nil {
  22854. xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
  22855. v = make(map[uint32]interface{}, xlen)
  22856. changed = true
  22857. }
  22858. if containerLen == 0 {
  22859. dd.ReadMapEnd()
  22860. return v, changed
  22861. }
  22862. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  22863. var mk uint32
  22864. var mv interface{}
  22865. hasLen := containerLen > 0
  22866. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22867. if esep {
  22868. dd.ReadMapElemKey()
  22869. }
  22870. mk = uint32(dd.DecodeUint(32))
  22871. if esep {
  22872. dd.ReadMapElemValue()
  22873. }
  22874. if dd.TryDecodeAsNil() {
  22875. if d.h.DeleteOnNilMapValue {
  22876. delete(v, mk)
  22877. } else {
  22878. v[mk] = nil
  22879. }
  22880. continue
  22881. }
  22882. if mapGet {
  22883. mv = v[mk]
  22884. } else {
  22885. mv = nil
  22886. }
  22887. d.decode(&mv)
  22888. if v != nil {
  22889. v[mk] = mv
  22890. }
  22891. }
  22892. dd.ReadMapEnd()
  22893. return v, changed
  22894. }
  22895. func (d *Decoder) fastpathDecMapUint32StringR(f *codecFnInfo, rv reflect.Value) {
  22896. if rv.Kind() == reflect.Ptr {
  22897. vp := rv2i(rv).(*map[uint32]string)
  22898. if v, changed := fastpathTV.DecMapUint32StringV(*vp, true, d); changed {
  22899. *vp = v
  22900. }
  22901. return
  22902. }
  22903. fastpathTV.DecMapUint32StringV(rv2i(rv).(map[uint32]string), false, d)
  22904. }
  22905. func (f fastpathT) DecMapUint32StringX(vp *map[uint32]string, d *Decoder) {
  22906. if v, changed := f.DecMapUint32StringV(*vp, true, d); changed {
  22907. *vp = v
  22908. }
  22909. }
  22910. func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, canChange bool,
  22911. d *Decoder) (_ map[uint32]string, changed bool) {
  22912. dd, esep := d.d, d.hh.hasElemSeparators()
  22913. containerLen := dd.ReadMapStart()
  22914. if canChange && v == nil {
  22915. xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
  22916. v = make(map[uint32]string, xlen)
  22917. changed = true
  22918. }
  22919. if containerLen == 0 {
  22920. dd.ReadMapEnd()
  22921. return v, changed
  22922. }
  22923. var mk uint32
  22924. var mv string
  22925. hasLen := containerLen > 0
  22926. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22927. if esep {
  22928. dd.ReadMapElemKey()
  22929. }
  22930. mk = uint32(dd.DecodeUint(32))
  22931. if esep {
  22932. dd.ReadMapElemValue()
  22933. }
  22934. if dd.TryDecodeAsNil() {
  22935. if d.h.DeleteOnNilMapValue {
  22936. delete(v, mk)
  22937. } else {
  22938. v[mk] = ""
  22939. }
  22940. continue
  22941. }
  22942. mv = dd.DecodeString()
  22943. if v != nil {
  22944. v[mk] = mv
  22945. }
  22946. }
  22947. dd.ReadMapEnd()
  22948. return v, changed
  22949. }
  22950. func (d *Decoder) fastpathDecMapUint32UintR(f *codecFnInfo, rv reflect.Value) {
  22951. if rv.Kind() == reflect.Ptr {
  22952. vp := rv2i(rv).(*map[uint32]uint)
  22953. if v, changed := fastpathTV.DecMapUint32UintV(*vp, true, d); changed {
  22954. *vp = v
  22955. }
  22956. return
  22957. }
  22958. fastpathTV.DecMapUint32UintV(rv2i(rv).(map[uint32]uint), false, d)
  22959. }
  22960. func (f fastpathT) DecMapUint32UintX(vp *map[uint32]uint, d *Decoder) {
  22961. if v, changed := f.DecMapUint32UintV(*vp, true, d); changed {
  22962. *vp = v
  22963. }
  22964. }
  22965. func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, canChange bool,
  22966. d *Decoder) (_ map[uint32]uint, changed bool) {
  22967. dd, esep := d.d, d.hh.hasElemSeparators()
  22968. containerLen := dd.ReadMapStart()
  22969. if canChange && v == nil {
  22970. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  22971. v = make(map[uint32]uint, xlen)
  22972. changed = true
  22973. }
  22974. if containerLen == 0 {
  22975. dd.ReadMapEnd()
  22976. return v, changed
  22977. }
  22978. var mk uint32
  22979. var mv uint
  22980. hasLen := containerLen > 0
  22981. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  22982. if esep {
  22983. dd.ReadMapElemKey()
  22984. }
  22985. mk = uint32(dd.DecodeUint(32))
  22986. if esep {
  22987. dd.ReadMapElemValue()
  22988. }
  22989. if dd.TryDecodeAsNil() {
  22990. if d.h.DeleteOnNilMapValue {
  22991. delete(v, mk)
  22992. } else {
  22993. v[mk] = 0
  22994. }
  22995. continue
  22996. }
  22997. mv = uint(dd.DecodeUint(uintBitsize))
  22998. if v != nil {
  22999. v[mk] = mv
  23000. }
  23001. }
  23002. dd.ReadMapEnd()
  23003. return v, changed
  23004. }
  23005. func (d *Decoder) fastpathDecMapUint32Uint8R(f *codecFnInfo, rv reflect.Value) {
  23006. if rv.Kind() == reflect.Ptr {
  23007. vp := rv2i(rv).(*map[uint32]uint8)
  23008. if v, changed := fastpathTV.DecMapUint32Uint8V(*vp, true, d); changed {
  23009. *vp = v
  23010. }
  23011. return
  23012. }
  23013. fastpathTV.DecMapUint32Uint8V(rv2i(rv).(map[uint32]uint8), false, d)
  23014. }
  23015. func (f fastpathT) DecMapUint32Uint8X(vp *map[uint32]uint8, d *Decoder) {
  23016. if v, changed := f.DecMapUint32Uint8V(*vp, true, d); changed {
  23017. *vp = v
  23018. }
  23019. }
  23020. func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, canChange bool,
  23021. d *Decoder) (_ map[uint32]uint8, changed bool) {
  23022. dd, esep := d.d, d.hh.hasElemSeparators()
  23023. containerLen := dd.ReadMapStart()
  23024. if canChange && v == nil {
  23025. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  23026. v = make(map[uint32]uint8, xlen)
  23027. changed = true
  23028. }
  23029. if containerLen == 0 {
  23030. dd.ReadMapEnd()
  23031. return v, changed
  23032. }
  23033. var mk uint32
  23034. var mv uint8
  23035. hasLen := containerLen > 0
  23036. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23037. if esep {
  23038. dd.ReadMapElemKey()
  23039. }
  23040. mk = uint32(dd.DecodeUint(32))
  23041. if esep {
  23042. dd.ReadMapElemValue()
  23043. }
  23044. if dd.TryDecodeAsNil() {
  23045. if d.h.DeleteOnNilMapValue {
  23046. delete(v, mk)
  23047. } else {
  23048. v[mk] = 0
  23049. }
  23050. continue
  23051. }
  23052. mv = uint8(dd.DecodeUint(8))
  23053. if v != nil {
  23054. v[mk] = mv
  23055. }
  23056. }
  23057. dd.ReadMapEnd()
  23058. return v, changed
  23059. }
  23060. func (d *Decoder) fastpathDecMapUint32Uint16R(f *codecFnInfo, rv reflect.Value) {
  23061. if rv.Kind() == reflect.Ptr {
  23062. vp := rv2i(rv).(*map[uint32]uint16)
  23063. if v, changed := fastpathTV.DecMapUint32Uint16V(*vp, true, d); changed {
  23064. *vp = v
  23065. }
  23066. return
  23067. }
  23068. fastpathTV.DecMapUint32Uint16V(rv2i(rv).(map[uint32]uint16), false, d)
  23069. }
  23070. func (f fastpathT) DecMapUint32Uint16X(vp *map[uint32]uint16, d *Decoder) {
  23071. if v, changed := f.DecMapUint32Uint16V(*vp, true, d); changed {
  23072. *vp = v
  23073. }
  23074. }
  23075. func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, canChange bool,
  23076. d *Decoder) (_ map[uint32]uint16, changed bool) {
  23077. dd, esep := d.d, d.hh.hasElemSeparators()
  23078. containerLen := dd.ReadMapStart()
  23079. if canChange && v == nil {
  23080. xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
  23081. v = make(map[uint32]uint16, xlen)
  23082. changed = true
  23083. }
  23084. if containerLen == 0 {
  23085. dd.ReadMapEnd()
  23086. return v, changed
  23087. }
  23088. var mk uint32
  23089. var mv uint16
  23090. hasLen := containerLen > 0
  23091. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23092. if esep {
  23093. dd.ReadMapElemKey()
  23094. }
  23095. mk = uint32(dd.DecodeUint(32))
  23096. if esep {
  23097. dd.ReadMapElemValue()
  23098. }
  23099. if dd.TryDecodeAsNil() {
  23100. if d.h.DeleteOnNilMapValue {
  23101. delete(v, mk)
  23102. } else {
  23103. v[mk] = 0
  23104. }
  23105. continue
  23106. }
  23107. mv = uint16(dd.DecodeUint(16))
  23108. if v != nil {
  23109. v[mk] = mv
  23110. }
  23111. }
  23112. dd.ReadMapEnd()
  23113. return v, changed
  23114. }
  23115. func (d *Decoder) fastpathDecMapUint32Uint32R(f *codecFnInfo, rv reflect.Value) {
  23116. if rv.Kind() == reflect.Ptr {
  23117. vp := rv2i(rv).(*map[uint32]uint32)
  23118. if v, changed := fastpathTV.DecMapUint32Uint32V(*vp, true, d); changed {
  23119. *vp = v
  23120. }
  23121. return
  23122. }
  23123. fastpathTV.DecMapUint32Uint32V(rv2i(rv).(map[uint32]uint32), false, d)
  23124. }
  23125. func (f fastpathT) DecMapUint32Uint32X(vp *map[uint32]uint32, d *Decoder) {
  23126. if v, changed := f.DecMapUint32Uint32V(*vp, true, d); changed {
  23127. *vp = v
  23128. }
  23129. }
  23130. func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, canChange bool,
  23131. d *Decoder) (_ map[uint32]uint32, changed bool) {
  23132. dd, esep := d.d, d.hh.hasElemSeparators()
  23133. containerLen := dd.ReadMapStart()
  23134. if canChange && v == nil {
  23135. xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
  23136. v = make(map[uint32]uint32, xlen)
  23137. changed = true
  23138. }
  23139. if containerLen == 0 {
  23140. dd.ReadMapEnd()
  23141. return v, changed
  23142. }
  23143. var mk uint32
  23144. var mv uint32
  23145. hasLen := containerLen > 0
  23146. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23147. if esep {
  23148. dd.ReadMapElemKey()
  23149. }
  23150. mk = uint32(dd.DecodeUint(32))
  23151. if esep {
  23152. dd.ReadMapElemValue()
  23153. }
  23154. if dd.TryDecodeAsNil() {
  23155. if d.h.DeleteOnNilMapValue {
  23156. delete(v, mk)
  23157. } else {
  23158. v[mk] = 0
  23159. }
  23160. continue
  23161. }
  23162. mv = uint32(dd.DecodeUint(32))
  23163. if v != nil {
  23164. v[mk] = mv
  23165. }
  23166. }
  23167. dd.ReadMapEnd()
  23168. return v, changed
  23169. }
  23170. func (d *Decoder) fastpathDecMapUint32Uint64R(f *codecFnInfo, rv reflect.Value) {
  23171. if rv.Kind() == reflect.Ptr {
  23172. vp := rv2i(rv).(*map[uint32]uint64)
  23173. if v, changed := fastpathTV.DecMapUint32Uint64V(*vp, true, d); changed {
  23174. *vp = v
  23175. }
  23176. return
  23177. }
  23178. fastpathTV.DecMapUint32Uint64V(rv2i(rv).(map[uint32]uint64), false, d)
  23179. }
  23180. func (f fastpathT) DecMapUint32Uint64X(vp *map[uint32]uint64, d *Decoder) {
  23181. if v, changed := f.DecMapUint32Uint64V(*vp, true, d); changed {
  23182. *vp = v
  23183. }
  23184. }
  23185. func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, canChange bool,
  23186. d *Decoder) (_ map[uint32]uint64, changed bool) {
  23187. dd, esep := d.d, d.hh.hasElemSeparators()
  23188. containerLen := dd.ReadMapStart()
  23189. if canChange && v == nil {
  23190. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  23191. v = make(map[uint32]uint64, xlen)
  23192. changed = true
  23193. }
  23194. if containerLen == 0 {
  23195. dd.ReadMapEnd()
  23196. return v, changed
  23197. }
  23198. var mk uint32
  23199. var mv uint64
  23200. hasLen := containerLen > 0
  23201. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23202. if esep {
  23203. dd.ReadMapElemKey()
  23204. }
  23205. mk = uint32(dd.DecodeUint(32))
  23206. if esep {
  23207. dd.ReadMapElemValue()
  23208. }
  23209. if dd.TryDecodeAsNil() {
  23210. if d.h.DeleteOnNilMapValue {
  23211. delete(v, mk)
  23212. } else {
  23213. v[mk] = 0
  23214. }
  23215. continue
  23216. }
  23217. mv = dd.DecodeUint(64)
  23218. if v != nil {
  23219. v[mk] = mv
  23220. }
  23221. }
  23222. dd.ReadMapEnd()
  23223. return v, changed
  23224. }
  23225. func (d *Decoder) fastpathDecMapUint32UintptrR(f *codecFnInfo, rv reflect.Value) {
  23226. if rv.Kind() == reflect.Ptr {
  23227. vp := rv2i(rv).(*map[uint32]uintptr)
  23228. if v, changed := fastpathTV.DecMapUint32UintptrV(*vp, true, d); changed {
  23229. *vp = v
  23230. }
  23231. return
  23232. }
  23233. fastpathTV.DecMapUint32UintptrV(rv2i(rv).(map[uint32]uintptr), false, d)
  23234. }
  23235. func (f fastpathT) DecMapUint32UintptrX(vp *map[uint32]uintptr, d *Decoder) {
  23236. if v, changed := f.DecMapUint32UintptrV(*vp, true, d); changed {
  23237. *vp = v
  23238. }
  23239. }
  23240. func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, canChange bool,
  23241. d *Decoder) (_ map[uint32]uintptr, changed bool) {
  23242. dd, esep := d.d, d.hh.hasElemSeparators()
  23243. containerLen := dd.ReadMapStart()
  23244. if canChange && v == nil {
  23245. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  23246. v = make(map[uint32]uintptr, xlen)
  23247. changed = true
  23248. }
  23249. if containerLen == 0 {
  23250. dd.ReadMapEnd()
  23251. return v, changed
  23252. }
  23253. var mk uint32
  23254. var mv uintptr
  23255. hasLen := containerLen > 0
  23256. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23257. if esep {
  23258. dd.ReadMapElemKey()
  23259. }
  23260. mk = uint32(dd.DecodeUint(32))
  23261. if esep {
  23262. dd.ReadMapElemValue()
  23263. }
  23264. if dd.TryDecodeAsNil() {
  23265. if d.h.DeleteOnNilMapValue {
  23266. delete(v, mk)
  23267. } else {
  23268. v[mk] = 0
  23269. }
  23270. continue
  23271. }
  23272. mv = uintptr(dd.DecodeUint(uintBitsize))
  23273. if v != nil {
  23274. v[mk] = mv
  23275. }
  23276. }
  23277. dd.ReadMapEnd()
  23278. return v, changed
  23279. }
  23280. func (d *Decoder) fastpathDecMapUint32IntR(f *codecFnInfo, rv reflect.Value) {
  23281. if rv.Kind() == reflect.Ptr {
  23282. vp := rv2i(rv).(*map[uint32]int)
  23283. if v, changed := fastpathTV.DecMapUint32IntV(*vp, true, d); changed {
  23284. *vp = v
  23285. }
  23286. return
  23287. }
  23288. fastpathTV.DecMapUint32IntV(rv2i(rv).(map[uint32]int), false, d)
  23289. }
  23290. func (f fastpathT) DecMapUint32IntX(vp *map[uint32]int, d *Decoder) {
  23291. if v, changed := f.DecMapUint32IntV(*vp, true, d); changed {
  23292. *vp = v
  23293. }
  23294. }
  23295. func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, canChange bool,
  23296. d *Decoder) (_ map[uint32]int, changed bool) {
  23297. dd, esep := d.d, d.hh.hasElemSeparators()
  23298. containerLen := dd.ReadMapStart()
  23299. if canChange && v == nil {
  23300. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  23301. v = make(map[uint32]int, xlen)
  23302. changed = true
  23303. }
  23304. if containerLen == 0 {
  23305. dd.ReadMapEnd()
  23306. return v, changed
  23307. }
  23308. var mk uint32
  23309. var mv int
  23310. hasLen := containerLen > 0
  23311. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23312. if esep {
  23313. dd.ReadMapElemKey()
  23314. }
  23315. mk = uint32(dd.DecodeUint(32))
  23316. if esep {
  23317. dd.ReadMapElemValue()
  23318. }
  23319. if dd.TryDecodeAsNil() {
  23320. if d.h.DeleteOnNilMapValue {
  23321. delete(v, mk)
  23322. } else {
  23323. v[mk] = 0
  23324. }
  23325. continue
  23326. }
  23327. mv = int(dd.DecodeInt(intBitsize))
  23328. if v != nil {
  23329. v[mk] = mv
  23330. }
  23331. }
  23332. dd.ReadMapEnd()
  23333. return v, changed
  23334. }
  23335. func (d *Decoder) fastpathDecMapUint32Int8R(f *codecFnInfo, rv reflect.Value) {
  23336. if rv.Kind() == reflect.Ptr {
  23337. vp := rv2i(rv).(*map[uint32]int8)
  23338. if v, changed := fastpathTV.DecMapUint32Int8V(*vp, true, d); changed {
  23339. *vp = v
  23340. }
  23341. return
  23342. }
  23343. fastpathTV.DecMapUint32Int8V(rv2i(rv).(map[uint32]int8), false, d)
  23344. }
  23345. func (f fastpathT) DecMapUint32Int8X(vp *map[uint32]int8, d *Decoder) {
  23346. if v, changed := f.DecMapUint32Int8V(*vp, true, d); changed {
  23347. *vp = v
  23348. }
  23349. }
  23350. func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, canChange bool,
  23351. d *Decoder) (_ map[uint32]int8, changed bool) {
  23352. dd, esep := d.d, d.hh.hasElemSeparators()
  23353. containerLen := dd.ReadMapStart()
  23354. if canChange && v == nil {
  23355. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  23356. v = make(map[uint32]int8, xlen)
  23357. changed = true
  23358. }
  23359. if containerLen == 0 {
  23360. dd.ReadMapEnd()
  23361. return v, changed
  23362. }
  23363. var mk uint32
  23364. var mv int8
  23365. hasLen := containerLen > 0
  23366. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23367. if esep {
  23368. dd.ReadMapElemKey()
  23369. }
  23370. mk = uint32(dd.DecodeUint(32))
  23371. if esep {
  23372. dd.ReadMapElemValue()
  23373. }
  23374. if dd.TryDecodeAsNil() {
  23375. if d.h.DeleteOnNilMapValue {
  23376. delete(v, mk)
  23377. } else {
  23378. v[mk] = 0
  23379. }
  23380. continue
  23381. }
  23382. mv = int8(dd.DecodeInt(8))
  23383. if v != nil {
  23384. v[mk] = mv
  23385. }
  23386. }
  23387. dd.ReadMapEnd()
  23388. return v, changed
  23389. }
  23390. func (d *Decoder) fastpathDecMapUint32Int16R(f *codecFnInfo, rv reflect.Value) {
  23391. if rv.Kind() == reflect.Ptr {
  23392. vp := rv2i(rv).(*map[uint32]int16)
  23393. if v, changed := fastpathTV.DecMapUint32Int16V(*vp, true, d); changed {
  23394. *vp = v
  23395. }
  23396. return
  23397. }
  23398. fastpathTV.DecMapUint32Int16V(rv2i(rv).(map[uint32]int16), false, d)
  23399. }
  23400. func (f fastpathT) DecMapUint32Int16X(vp *map[uint32]int16, d *Decoder) {
  23401. if v, changed := f.DecMapUint32Int16V(*vp, true, d); changed {
  23402. *vp = v
  23403. }
  23404. }
  23405. func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, canChange bool,
  23406. d *Decoder) (_ map[uint32]int16, changed bool) {
  23407. dd, esep := d.d, d.hh.hasElemSeparators()
  23408. containerLen := dd.ReadMapStart()
  23409. if canChange && v == nil {
  23410. xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
  23411. v = make(map[uint32]int16, xlen)
  23412. changed = true
  23413. }
  23414. if containerLen == 0 {
  23415. dd.ReadMapEnd()
  23416. return v, changed
  23417. }
  23418. var mk uint32
  23419. var mv int16
  23420. hasLen := containerLen > 0
  23421. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23422. if esep {
  23423. dd.ReadMapElemKey()
  23424. }
  23425. mk = uint32(dd.DecodeUint(32))
  23426. if esep {
  23427. dd.ReadMapElemValue()
  23428. }
  23429. if dd.TryDecodeAsNil() {
  23430. if d.h.DeleteOnNilMapValue {
  23431. delete(v, mk)
  23432. } else {
  23433. v[mk] = 0
  23434. }
  23435. continue
  23436. }
  23437. mv = int16(dd.DecodeInt(16))
  23438. if v != nil {
  23439. v[mk] = mv
  23440. }
  23441. }
  23442. dd.ReadMapEnd()
  23443. return v, changed
  23444. }
  23445. func (d *Decoder) fastpathDecMapUint32Int32R(f *codecFnInfo, rv reflect.Value) {
  23446. if rv.Kind() == reflect.Ptr {
  23447. vp := rv2i(rv).(*map[uint32]int32)
  23448. if v, changed := fastpathTV.DecMapUint32Int32V(*vp, true, d); changed {
  23449. *vp = v
  23450. }
  23451. return
  23452. }
  23453. fastpathTV.DecMapUint32Int32V(rv2i(rv).(map[uint32]int32), false, d)
  23454. }
  23455. func (f fastpathT) DecMapUint32Int32X(vp *map[uint32]int32, d *Decoder) {
  23456. if v, changed := f.DecMapUint32Int32V(*vp, true, d); changed {
  23457. *vp = v
  23458. }
  23459. }
  23460. func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, canChange bool,
  23461. d *Decoder) (_ map[uint32]int32, changed bool) {
  23462. dd, esep := d.d, d.hh.hasElemSeparators()
  23463. containerLen := dd.ReadMapStart()
  23464. if canChange && v == nil {
  23465. xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
  23466. v = make(map[uint32]int32, xlen)
  23467. changed = true
  23468. }
  23469. if containerLen == 0 {
  23470. dd.ReadMapEnd()
  23471. return v, changed
  23472. }
  23473. var mk uint32
  23474. var mv int32
  23475. hasLen := containerLen > 0
  23476. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23477. if esep {
  23478. dd.ReadMapElemKey()
  23479. }
  23480. mk = uint32(dd.DecodeUint(32))
  23481. if esep {
  23482. dd.ReadMapElemValue()
  23483. }
  23484. if dd.TryDecodeAsNil() {
  23485. if d.h.DeleteOnNilMapValue {
  23486. delete(v, mk)
  23487. } else {
  23488. v[mk] = 0
  23489. }
  23490. continue
  23491. }
  23492. mv = int32(dd.DecodeInt(32))
  23493. if v != nil {
  23494. v[mk] = mv
  23495. }
  23496. }
  23497. dd.ReadMapEnd()
  23498. return v, changed
  23499. }
  23500. func (d *Decoder) fastpathDecMapUint32Int64R(f *codecFnInfo, rv reflect.Value) {
  23501. if rv.Kind() == reflect.Ptr {
  23502. vp := rv2i(rv).(*map[uint32]int64)
  23503. if v, changed := fastpathTV.DecMapUint32Int64V(*vp, true, d); changed {
  23504. *vp = v
  23505. }
  23506. return
  23507. }
  23508. fastpathTV.DecMapUint32Int64V(rv2i(rv).(map[uint32]int64), false, d)
  23509. }
  23510. func (f fastpathT) DecMapUint32Int64X(vp *map[uint32]int64, d *Decoder) {
  23511. if v, changed := f.DecMapUint32Int64V(*vp, true, d); changed {
  23512. *vp = v
  23513. }
  23514. }
  23515. func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, canChange bool,
  23516. d *Decoder) (_ map[uint32]int64, changed bool) {
  23517. dd, esep := d.d, d.hh.hasElemSeparators()
  23518. containerLen := dd.ReadMapStart()
  23519. if canChange && v == nil {
  23520. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  23521. v = make(map[uint32]int64, xlen)
  23522. changed = true
  23523. }
  23524. if containerLen == 0 {
  23525. dd.ReadMapEnd()
  23526. return v, changed
  23527. }
  23528. var mk uint32
  23529. var mv int64
  23530. hasLen := containerLen > 0
  23531. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23532. if esep {
  23533. dd.ReadMapElemKey()
  23534. }
  23535. mk = uint32(dd.DecodeUint(32))
  23536. if esep {
  23537. dd.ReadMapElemValue()
  23538. }
  23539. if dd.TryDecodeAsNil() {
  23540. if d.h.DeleteOnNilMapValue {
  23541. delete(v, mk)
  23542. } else {
  23543. v[mk] = 0
  23544. }
  23545. continue
  23546. }
  23547. mv = dd.DecodeInt(64)
  23548. if v != nil {
  23549. v[mk] = mv
  23550. }
  23551. }
  23552. dd.ReadMapEnd()
  23553. return v, changed
  23554. }
  23555. func (d *Decoder) fastpathDecMapUint32Float32R(f *codecFnInfo, rv reflect.Value) {
  23556. if rv.Kind() == reflect.Ptr {
  23557. vp := rv2i(rv).(*map[uint32]float32)
  23558. if v, changed := fastpathTV.DecMapUint32Float32V(*vp, true, d); changed {
  23559. *vp = v
  23560. }
  23561. return
  23562. }
  23563. fastpathTV.DecMapUint32Float32V(rv2i(rv).(map[uint32]float32), false, d)
  23564. }
  23565. func (f fastpathT) DecMapUint32Float32X(vp *map[uint32]float32, d *Decoder) {
  23566. if v, changed := f.DecMapUint32Float32V(*vp, true, d); changed {
  23567. *vp = v
  23568. }
  23569. }
  23570. func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, canChange bool,
  23571. d *Decoder) (_ map[uint32]float32, changed bool) {
  23572. dd, esep := d.d, d.hh.hasElemSeparators()
  23573. containerLen := dd.ReadMapStart()
  23574. if canChange && v == nil {
  23575. xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
  23576. v = make(map[uint32]float32, xlen)
  23577. changed = true
  23578. }
  23579. if containerLen == 0 {
  23580. dd.ReadMapEnd()
  23581. return v, changed
  23582. }
  23583. var mk uint32
  23584. var mv float32
  23585. hasLen := containerLen > 0
  23586. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23587. if esep {
  23588. dd.ReadMapElemKey()
  23589. }
  23590. mk = uint32(dd.DecodeUint(32))
  23591. if esep {
  23592. dd.ReadMapElemValue()
  23593. }
  23594. if dd.TryDecodeAsNil() {
  23595. if d.h.DeleteOnNilMapValue {
  23596. delete(v, mk)
  23597. } else {
  23598. v[mk] = 0
  23599. }
  23600. continue
  23601. }
  23602. mv = float32(dd.DecodeFloat(true))
  23603. if v != nil {
  23604. v[mk] = mv
  23605. }
  23606. }
  23607. dd.ReadMapEnd()
  23608. return v, changed
  23609. }
  23610. func (d *Decoder) fastpathDecMapUint32Float64R(f *codecFnInfo, rv reflect.Value) {
  23611. if rv.Kind() == reflect.Ptr {
  23612. vp := rv2i(rv).(*map[uint32]float64)
  23613. if v, changed := fastpathTV.DecMapUint32Float64V(*vp, true, d); changed {
  23614. *vp = v
  23615. }
  23616. return
  23617. }
  23618. fastpathTV.DecMapUint32Float64V(rv2i(rv).(map[uint32]float64), false, d)
  23619. }
  23620. func (f fastpathT) DecMapUint32Float64X(vp *map[uint32]float64, d *Decoder) {
  23621. if v, changed := f.DecMapUint32Float64V(*vp, true, d); changed {
  23622. *vp = v
  23623. }
  23624. }
  23625. func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, canChange bool,
  23626. d *Decoder) (_ map[uint32]float64, changed bool) {
  23627. dd, esep := d.d, d.hh.hasElemSeparators()
  23628. containerLen := dd.ReadMapStart()
  23629. if canChange && v == nil {
  23630. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  23631. v = make(map[uint32]float64, xlen)
  23632. changed = true
  23633. }
  23634. if containerLen == 0 {
  23635. dd.ReadMapEnd()
  23636. return v, changed
  23637. }
  23638. var mk uint32
  23639. var mv float64
  23640. hasLen := containerLen > 0
  23641. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23642. if esep {
  23643. dd.ReadMapElemKey()
  23644. }
  23645. mk = uint32(dd.DecodeUint(32))
  23646. if esep {
  23647. dd.ReadMapElemValue()
  23648. }
  23649. if dd.TryDecodeAsNil() {
  23650. if d.h.DeleteOnNilMapValue {
  23651. delete(v, mk)
  23652. } else {
  23653. v[mk] = 0
  23654. }
  23655. continue
  23656. }
  23657. mv = dd.DecodeFloat(false)
  23658. if v != nil {
  23659. v[mk] = mv
  23660. }
  23661. }
  23662. dd.ReadMapEnd()
  23663. return v, changed
  23664. }
  23665. func (d *Decoder) fastpathDecMapUint32BoolR(f *codecFnInfo, rv reflect.Value) {
  23666. if rv.Kind() == reflect.Ptr {
  23667. vp := rv2i(rv).(*map[uint32]bool)
  23668. if v, changed := fastpathTV.DecMapUint32BoolV(*vp, true, d); changed {
  23669. *vp = v
  23670. }
  23671. return
  23672. }
  23673. fastpathTV.DecMapUint32BoolV(rv2i(rv).(map[uint32]bool), false, d)
  23674. }
  23675. func (f fastpathT) DecMapUint32BoolX(vp *map[uint32]bool, d *Decoder) {
  23676. if v, changed := f.DecMapUint32BoolV(*vp, true, d); changed {
  23677. *vp = v
  23678. }
  23679. }
  23680. func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, canChange bool,
  23681. d *Decoder) (_ map[uint32]bool, changed bool) {
  23682. dd, esep := d.d, d.hh.hasElemSeparators()
  23683. containerLen := dd.ReadMapStart()
  23684. if canChange && v == nil {
  23685. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  23686. v = make(map[uint32]bool, xlen)
  23687. changed = true
  23688. }
  23689. if containerLen == 0 {
  23690. dd.ReadMapEnd()
  23691. return v, changed
  23692. }
  23693. var mk uint32
  23694. var mv bool
  23695. hasLen := containerLen > 0
  23696. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23697. if esep {
  23698. dd.ReadMapElemKey()
  23699. }
  23700. mk = uint32(dd.DecodeUint(32))
  23701. if esep {
  23702. dd.ReadMapElemValue()
  23703. }
  23704. if dd.TryDecodeAsNil() {
  23705. if d.h.DeleteOnNilMapValue {
  23706. delete(v, mk)
  23707. } else {
  23708. v[mk] = false
  23709. }
  23710. continue
  23711. }
  23712. mv = dd.DecodeBool()
  23713. if v != nil {
  23714. v[mk] = mv
  23715. }
  23716. }
  23717. dd.ReadMapEnd()
  23718. return v, changed
  23719. }
  23720. func (d *Decoder) fastpathDecMapUint64IntfR(f *codecFnInfo, rv reflect.Value) {
  23721. if rv.Kind() == reflect.Ptr {
  23722. vp := rv2i(rv).(*map[uint64]interface{})
  23723. if v, changed := fastpathTV.DecMapUint64IntfV(*vp, true, d); changed {
  23724. *vp = v
  23725. }
  23726. return
  23727. }
  23728. fastpathTV.DecMapUint64IntfV(rv2i(rv).(map[uint64]interface{}), false, d)
  23729. }
  23730. func (f fastpathT) DecMapUint64IntfX(vp *map[uint64]interface{}, d *Decoder) {
  23731. if v, changed := f.DecMapUint64IntfV(*vp, true, d); changed {
  23732. *vp = v
  23733. }
  23734. }
  23735. func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, canChange bool,
  23736. d *Decoder) (_ map[uint64]interface{}, changed bool) {
  23737. dd, esep := d.d, d.hh.hasElemSeparators()
  23738. containerLen := dd.ReadMapStart()
  23739. if canChange && v == nil {
  23740. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  23741. v = make(map[uint64]interface{}, xlen)
  23742. changed = true
  23743. }
  23744. if containerLen == 0 {
  23745. dd.ReadMapEnd()
  23746. return v, changed
  23747. }
  23748. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  23749. var mk uint64
  23750. var mv interface{}
  23751. hasLen := containerLen > 0
  23752. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23753. if esep {
  23754. dd.ReadMapElemKey()
  23755. }
  23756. mk = dd.DecodeUint(64)
  23757. if esep {
  23758. dd.ReadMapElemValue()
  23759. }
  23760. if dd.TryDecodeAsNil() {
  23761. if d.h.DeleteOnNilMapValue {
  23762. delete(v, mk)
  23763. } else {
  23764. v[mk] = nil
  23765. }
  23766. continue
  23767. }
  23768. if mapGet {
  23769. mv = v[mk]
  23770. } else {
  23771. mv = nil
  23772. }
  23773. d.decode(&mv)
  23774. if v != nil {
  23775. v[mk] = mv
  23776. }
  23777. }
  23778. dd.ReadMapEnd()
  23779. return v, changed
  23780. }
  23781. func (d *Decoder) fastpathDecMapUint64StringR(f *codecFnInfo, rv reflect.Value) {
  23782. if rv.Kind() == reflect.Ptr {
  23783. vp := rv2i(rv).(*map[uint64]string)
  23784. if v, changed := fastpathTV.DecMapUint64StringV(*vp, true, d); changed {
  23785. *vp = v
  23786. }
  23787. return
  23788. }
  23789. fastpathTV.DecMapUint64StringV(rv2i(rv).(map[uint64]string), false, d)
  23790. }
  23791. func (f fastpathT) DecMapUint64StringX(vp *map[uint64]string, d *Decoder) {
  23792. if v, changed := f.DecMapUint64StringV(*vp, true, d); changed {
  23793. *vp = v
  23794. }
  23795. }
  23796. func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, canChange bool,
  23797. d *Decoder) (_ map[uint64]string, changed bool) {
  23798. dd, esep := d.d, d.hh.hasElemSeparators()
  23799. containerLen := dd.ReadMapStart()
  23800. if canChange && v == nil {
  23801. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  23802. v = make(map[uint64]string, xlen)
  23803. changed = true
  23804. }
  23805. if containerLen == 0 {
  23806. dd.ReadMapEnd()
  23807. return v, changed
  23808. }
  23809. var mk uint64
  23810. var mv string
  23811. hasLen := containerLen > 0
  23812. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23813. if esep {
  23814. dd.ReadMapElemKey()
  23815. }
  23816. mk = dd.DecodeUint(64)
  23817. if esep {
  23818. dd.ReadMapElemValue()
  23819. }
  23820. if dd.TryDecodeAsNil() {
  23821. if d.h.DeleteOnNilMapValue {
  23822. delete(v, mk)
  23823. } else {
  23824. v[mk] = ""
  23825. }
  23826. continue
  23827. }
  23828. mv = dd.DecodeString()
  23829. if v != nil {
  23830. v[mk] = mv
  23831. }
  23832. }
  23833. dd.ReadMapEnd()
  23834. return v, changed
  23835. }
  23836. func (d *Decoder) fastpathDecMapUint64UintR(f *codecFnInfo, rv reflect.Value) {
  23837. if rv.Kind() == reflect.Ptr {
  23838. vp := rv2i(rv).(*map[uint64]uint)
  23839. if v, changed := fastpathTV.DecMapUint64UintV(*vp, true, d); changed {
  23840. *vp = v
  23841. }
  23842. return
  23843. }
  23844. fastpathTV.DecMapUint64UintV(rv2i(rv).(map[uint64]uint), false, d)
  23845. }
  23846. func (f fastpathT) DecMapUint64UintX(vp *map[uint64]uint, d *Decoder) {
  23847. if v, changed := f.DecMapUint64UintV(*vp, true, d); changed {
  23848. *vp = v
  23849. }
  23850. }
  23851. func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, canChange bool,
  23852. d *Decoder) (_ map[uint64]uint, changed bool) {
  23853. dd, esep := d.d, d.hh.hasElemSeparators()
  23854. containerLen := dd.ReadMapStart()
  23855. if canChange && v == nil {
  23856. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  23857. v = make(map[uint64]uint, xlen)
  23858. changed = true
  23859. }
  23860. if containerLen == 0 {
  23861. dd.ReadMapEnd()
  23862. return v, changed
  23863. }
  23864. var mk uint64
  23865. var mv uint
  23866. hasLen := containerLen > 0
  23867. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23868. if esep {
  23869. dd.ReadMapElemKey()
  23870. }
  23871. mk = dd.DecodeUint(64)
  23872. if esep {
  23873. dd.ReadMapElemValue()
  23874. }
  23875. if dd.TryDecodeAsNil() {
  23876. if d.h.DeleteOnNilMapValue {
  23877. delete(v, mk)
  23878. } else {
  23879. v[mk] = 0
  23880. }
  23881. continue
  23882. }
  23883. mv = uint(dd.DecodeUint(uintBitsize))
  23884. if v != nil {
  23885. v[mk] = mv
  23886. }
  23887. }
  23888. dd.ReadMapEnd()
  23889. return v, changed
  23890. }
  23891. func (d *Decoder) fastpathDecMapUint64Uint8R(f *codecFnInfo, rv reflect.Value) {
  23892. if rv.Kind() == reflect.Ptr {
  23893. vp := rv2i(rv).(*map[uint64]uint8)
  23894. if v, changed := fastpathTV.DecMapUint64Uint8V(*vp, true, d); changed {
  23895. *vp = v
  23896. }
  23897. return
  23898. }
  23899. fastpathTV.DecMapUint64Uint8V(rv2i(rv).(map[uint64]uint8), false, d)
  23900. }
  23901. func (f fastpathT) DecMapUint64Uint8X(vp *map[uint64]uint8, d *Decoder) {
  23902. if v, changed := f.DecMapUint64Uint8V(*vp, true, d); changed {
  23903. *vp = v
  23904. }
  23905. }
  23906. func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, canChange bool,
  23907. d *Decoder) (_ map[uint64]uint8, changed bool) {
  23908. dd, esep := d.d, d.hh.hasElemSeparators()
  23909. containerLen := dd.ReadMapStart()
  23910. if canChange && v == nil {
  23911. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  23912. v = make(map[uint64]uint8, xlen)
  23913. changed = true
  23914. }
  23915. if containerLen == 0 {
  23916. dd.ReadMapEnd()
  23917. return v, changed
  23918. }
  23919. var mk uint64
  23920. var mv uint8
  23921. hasLen := containerLen > 0
  23922. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23923. if esep {
  23924. dd.ReadMapElemKey()
  23925. }
  23926. mk = dd.DecodeUint(64)
  23927. if esep {
  23928. dd.ReadMapElemValue()
  23929. }
  23930. if dd.TryDecodeAsNil() {
  23931. if d.h.DeleteOnNilMapValue {
  23932. delete(v, mk)
  23933. } else {
  23934. v[mk] = 0
  23935. }
  23936. continue
  23937. }
  23938. mv = uint8(dd.DecodeUint(8))
  23939. if v != nil {
  23940. v[mk] = mv
  23941. }
  23942. }
  23943. dd.ReadMapEnd()
  23944. return v, changed
  23945. }
  23946. func (d *Decoder) fastpathDecMapUint64Uint16R(f *codecFnInfo, rv reflect.Value) {
  23947. if rv.Kind() == reflect.Ptr {
  23948. vp := rv2i(rv).(*map[uint64]uint16)
  23949. if v, changed := fastpathTV.DecMapUint64Uint16V(*vp, true, d); changed {
  23950. *vp = v
  23951. }
  23952. return
  23953. }
  23954. fastpathTV.DecMapUint64Uint16V(rv2i(rv).(map[uint64]uint16), false, d)
  23955. }
  23956. func (f fastpathT) DecMapUint64Uint16X(vp *map[uint64]uint16, d *Decoder) {
  23957. if v, changed := f.DecMapUint64Uint16V(*vp, true, d); changed {
  23958. *vp = v
  23959. }
  23960. }
  23961. func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, canChange bool,
  23962. d *Decoder) (_ map[uint64]uint16, changed bool) {
  23963. dd, esep := d.d, d.hh.hasElemSeparators()
  23964. containerLen := dd.ReadMapStart()
  23965. if canChange && v == nil {
  23966. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  23967. v = make(map[uint64]uint16, xlen)
  23968. changed = true
  23969. }
  23970. if containerLen == 0 {
  23971. dd.ReadMapEnd()
  23972. return v, changed
  23973. }
  23974. var mk uint64
  23975. var mv uint16
  23976. hasLen := containerLen > 0
  23977. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  23978. if esep {
  23979. dd.ReadMapElemKey()
  23980. }
  23981. mk = dd.DecodeUint(64)
  23982. if esep {
  23983. dd.ReadMapElemValue()
  23984. }
  23985. if dd.TryDecodeAsNil() {
  23986. if d.h.DeleteOnNilMapValue {
  23987. delete(v, mk)
  23988. } else {
  23989. v[mk] = 0
  23990. }
  23991. continue
  23992. }
  23993. mv = uint16(dd.DecodeUint(16))
  23994. if v != nil {
  23995. v[mk] = mv
  23996. }
  23997. }
  23998. dd.ReadMapEnd()
  23999. return v, changed
  24000. }
  24001. func (d *Decoder) fastpathDecMapUint64Uint32R(f *codecFnInfo, rv reflect.Value) {
  24002. if rv.Kind() == reflect.Ptr {
  24003. vp := rv2i(rv).(*map[uint64]uint32)
  24004. if v, changed := fastpathTV.DecMapUint64Uint32V(*vp, true, d); changed {
  24005. *vp = v
  24006. }
  24007. return
  24008. }
  24009. fastpathTV.DecMapUint64Uint32V(rv2i(rv).(map[uint64]uint32), false, d)
  24010. }
  24011. func (f fastpathT) DecMapUint64Uint32X(vp *map[uint64]uint32, d *Decoder) {
  24012. if v, changed := f.DecMapUint64Uint32V(*vp, true, d); changed {
  24013. *vp = v
  24014. }
  24015. }
  24016. func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, canChange bool,
  24017. d *Decoder) (_ map[uint64]uint32, changed bool) {
  24018. dd, esep := d.d, d.hh.hasElemSeparators()
  24019. containerLen := dd.ReadMapStart()
  24020. if canChange && v == nil {
  24021. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  24022. v = make(map[uint64]uint32, xlen)
  24023. changed = true
  24024. }
  24025. if containerLen == 0 {
  24026. dd.ReadMapEnd()
  24027. return v, changed
  24028. }
  24029. var mk uint64
  24030. var mv uint32
  24031. hasLen := containerLen > 0
  24032. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24033. if esep {
  24034. dd.ReadMapElemKey()
  24035. }
  24036. mk = dd.DecodeUint(64)
  24037. if esep {
  24038. dd.ReadMapElemValue()
  24039. }
  24040. if dd.TryDecodeAsNil() {
  24041. if d.h.DeleteOnNilMapValue {
  24042. delete(v, mk)
  24043. } else {
  24044. v[mk] = 0
  24045. }
  24046. continue
  24047. }
  24048. mv = uint32(dd.DecodeUint(32))
  24049. if v != nil {
  24050. v[mk] = mv
  24051. }
  24052. }
  24053. dd.ReadMapEnd()
  24054. return v, changed
  24055. }
  24056. func (d *Decoder) fastpathDecMapUint64Uint64R(f *codecFnInfo, rv reflect.Value) {
  24057. if rv.Kind() == reflect.Ptr {
  24058. vp := rv2i(rv).(*map[uint64]uint64)
  24059. if v, changed := fastpathTV.DecMapUint64Uint64V(*vp, true, d); changed {
  24060. *vp = v
  24061. }
  24062. return
  24063. }
  24064. fastpathTV.DecMapUint64Uint64V(rv2i(rv).(map[uint64]uint64), false, d)
  24065. }
  24066. func (f fastpathT) DecMapUint64Uint64X(vp *map[uint64]uint64, d *Decoder) {
  24067. if v, changed := f.DecMapUint64Uint64V(*vp, true, d); changed {
  24068. *vp = v
  24069. }
  24070. }
  24071. func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, canChange bool,
  24072. d *Decoder) (_ map[uint64]uint64, changed bool) {
  24073. dd, esep := d.d, d.hh.hasElemSeparators()
  24074. containerLen := dd.ReadMapStart()
  24075. if canChange && v == nil {
  24076. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  24077. v = make(map[uint64]uint64, xlen)
  24078. changed = true
  24079. }
  24080. if containerLen == 0 {
  24081. dd.ReadMapEnd()
  24082. return v, changed
  24083. }
  24084. var mk uint64
  24085. var mv uint64
  24086. hasLen := containerLen > 0
  24087. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24088. if esep {
  24089. dd.ReadMapElemKey()
  24090. }
  24091. mk = dd.DecodeUint(64)
  24092. if esep {
  24093. dd.ReadMapElemValue()
  24094. }
  24095. if dd.TryDecodeAsNil() {
  24096. if d.h.DeleteOnNilMapValue {
  24097. delete(v, mk)
  24098. } else {
  24099. v[mk] = 0
  24100. }
  24101. continue
  24102. }
  24103. mv = dd.DecodeUint(64)
  24104. if v != nil {
  24105. v[mk] = mv
  24106. }
  24107. }
  24108. dd.ReadMapEnd()
  24109. return v, changed
  24110. }
  24111. func (d *Decoder) fastpathDecMapUint64UintptrR(f *codecFnInfo, rv reflect.Value) {
  24112. if rv.Kind() == reflect.Ptr {
  24113. vp := rv2i(rv).(*map[uint64]uintptr)
  24114. if v, changed := fastpathTV.DecMapUint64UintptrV(*vp, true, d); changed {
  24115. *vp = v
  24116. }
  24117. return
  24118. }
  24119. fastpathTV.DecMapUint64UintptrV(rv2i(rv).(map[uint64]uintptr), false, d)
  24120. }
  24121. func (f fastpathT) DecMapUint64UintptrX(vp *map[uint64]uintptr, d *Decoder) {
  24122. if v, changed := f.DecMapUint64UintptrV(*vp, true, d); changed {
  24123. *vp = v
  24124. }
  24125. }
  24126. func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, canChange bool,
  24127. d *Decoder) (_ map[uint64]uintptr, changed bool) {
  24128. dd, esep := d.d, d.hh.hasElemSeparators()
  24129. containerLen := dd.ReadMapStart()
  24130. if canChange && v == nil {
  24131. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  24132. v = make(map[uint64]uintptr, xlen)
  24133. changed = true
  24134. }
  24135. if containerLen == 0 {
  24136. dd.ReadMapEnd()
  24137. return v, changed
  24138. }
  24139. var mk uint64
  24140. var mv uintptr
  24141. hasLen := containerLen > 0
  24142. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24143. if esep {
  24144. dd.ReadMapElemKey()
  24145. }
  24146. mk = dd.DecodeUint(64)
  24147. if esep {
  24148. dd.ReadMapElemValue()
  24149. }
  24150. if dd.TryDecodeAsNil() {
  24151. if d.h.DeleteOnNilMapValue {
  24152. delete(v, mk)
  24153. } else {
  24154. v[mk] = 0
  24155. }
  24156. continue
  24157. }
  24158. mv = uintptr(dd.DecodeUint(uintBitsize))
  24159. if v != nil {
  24160. v[mk] = mv
  24161. }
  24162. }
  24163. dd.ReadMapEnd()
  24164. return v, changed
  24165. }
  24166. func (d *Decoder) fastpathDecMapUint64IntR(f *codecFnInfo, rv reflect.Value) {
  24167. if rv.Kind() == reflect.Ptr {
  24168. vp := rv2i(rv).(*map[uint64]int)
  24169. if v, changed := fastpathTV.DecMapUint64IntV(*vp, true, d); changed {
  24170. *vp = v
  24171. }
  24172. return
  24173. }
  24174. fastpathTV.DecMapUint64IntV(rv2i(rv).(map[uint64]int), false, d)
  24175. }
  24176. func (f fastpathT) DecMapUint64IntX(vp *map[uint64]int, d *Decoder) {
  24177. if v, changed := f.DecMapUint64IntV(*vp, true, d); changed {
  24178. *vp = v
  24179. }
  24180. }
  24181. func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, canChange bool,
  24182. d *Decoder) (_ map[uint64]int, changed bool) {
  24183. dd, esep := d.d, d.hh.hasElemSeparators()
  24184. containerLen := dd.ReadMapStart()
  24185. if canChange && v == nil {
  24186. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  24187. v = make(map[uint64]int, xlen)
  24188. changed = true
  24189. }
  24190. if containerLen == 0 {
  24191. dd.ReadMapEnd()
  24192. return v, changed
  24193. }
  24194. var mk uint64
  24195. var mv int
  24196. hasLen := containerLen > 0
  24197. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24198. if esep {
  24199. dd.ReadMapElemKey()
  24200. }
  24201. mk = dd.DecodeUint(64)
  24202. if esep {
  24203. dd.ReadMapElemValue()
  24204. }
  24205. if dd.TryDecodeAsNil() {
  24206. if d.h.DeleteOnNilMapValue {
  24207. delete(v, mk)
  24208. } else {
  24209. v[mk] = 0
  24210. }
  24211. continue
  24212. }
  24213. mv = int(dd.DecodeInt(intBitsize))
  24214. if v != nil {
  24215. v[mk] = mv
  24216. }
  24217. }
  24218. dd.ReadMapEnd()
  24219. return v, changed
  24220. }
  24221. func (d *Decoder) fastpathDecMapUint64Int8R(f *codecFnInfo, rv reflect.Value) {
  24222. if rv.Kind() == reflect.Ptr {
  24223. vp := rv2i(rv).(*map[uint64]int8)
  24224. if v, changed := fastpathTV.DecMapUint64Int8V(*vp, true, d); changed {
  24225. *vp = v
  24226. }
  24227. return
  24228. }
  24229. fastpathTV.DecMapUint64Int8V(rv2i(rv).(map[uint64]int8), false, d)
  24230. }
  24231. func (f fastpathT) DecMapUint64Int8X(vp *map[uint64]int8, d *Decoder) {
  24232. if v, changed := f.DecMapUint64Int8V(*vp, true, d); changed {
  24233. *vp = v
  24234. }
  24235. }
  24236. func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, canChange bool,
  24237. d *Decoder) (_ map[uint64]int8, changed bool) {
  24238. dd, esep := d.d, d.hh.hasElemSeparators()
  24239. containerLen := dd.ReadMapStart()
  24240. if canChange && v == nil {
  24241. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  24242. v = make(map[uint64]int8, xlen)
  24243. changed = true
  24244. }
  24245. if containerLen == 0 {
  24246. dd.ReadMapEnd()
  24247. return v, changed
  24248. }
  24249. var mk uint64
  24250. var mv int8
  24251. hasLen := containerLen > 0
  24252. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24253. if esep {
  24254. dd.ReadMapElemKey()
  24255. }
  24256. mk = dd.DecodeUint(64)
  24257. if esep {
  24258. dd.ReadMapElemValue()
  24259. }
  24260. if dd.TryDecodeAsNil() {
  24261. if d.h.DeleteOnNilMapValue {
  24262. delete(v, mk)
  24263. } else {
  24264. v[mk] = 0
  24265. }
  24266. continue
  24267. }
  24268. mv = int8(dd.DecodeInt(8))
  24269. if v != nil {
  24270. v[mk] = mv
  24271. }
  24272. }
  24273. dd.ReadMapEnd()
  24274. return v, changed
  24275. }
  24276. func (d *Decoder) fastpathDecMapUint64Int16R(f *codecFnInfo, rv reflect.Value) {
  24277. if rv.Kind() == reflect.Ptr {
  24278. vp := rv2i(rv).(*map[uint64]int16)
  24279. if v, changed := fastpathTV.DecMapUint64Int16V(*vp, true, d); changed {
  24280. *vp = v
  24281. }
  24282. return
  24283. }
  24284. fastpathTV.DecMapUint64Int16V(rv2i(rv).(map[uint64]int16), false, d)
  24285. }
  24286. func (f fastpathT) DecMapUint64Int16X(vp *map[uint64]int16, d *Decoder) {
  24287. if v, changed := f.DecMapUint64Int16V(*vp, true, d); changed {
  24288. *vp = v
  24289. }
  24290. }
  24291. func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, canChange bool,
  24292. d *Decoder) (_ map[uint64]int16, changed bool) {
  24293. dd, esep := d.d, d.hh.hasElemSeparators()
  24294. containerLen := dd.ReadMapStart()
  24295. if canChange && v == nil {
  24296. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  24297. v = make(map[uint64]int16, xlen)
  24298. changed = true
  24299. }
  24300. if containerLen == 0 {
  24301. dd.ReadMapEnd()
  24302. return v, changed
  24303. }
  24304. var mk uint64
  24305. var mv int16
  24306. hasLen := containerLen > 0
  24307. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24308. if esep {
  24309. dd.ReadMapElemKey()
  24310. }
  24311. mk = dd.DecodeUint(64)
  24312. if esep {
  24313. dd.ReadMapElemValue()
  24314. }
  24315. if dd.TryDecodeAsNil() {
  24316. if d.h.DeleteOnNilMapValue {
  24317. delete(v, mk)
  24318. } else {
  24319. v[mk] = 0
  24320. }
  24321. continue
  24322. }
  24323. mv = int16(dd.DecodeInt(16))
  24324. if v != nil {
  24325. v[mk] = mv
  24326. }
  24327. }
  24328. dd.ReadMapEnd()
  24329. return v, changed
  24330. }
  24331. func (d *Decoder) fastpathDecMapUint64Int32R(f *codecFnInfo, rv reflect.Value) {
  24332. if rv.Kind() == reflect.Ptr {
  24333. vp := rv2i(rv).(*map[uint64]int32)
  24334. if v, changed := fastpathTV.DecMapUint64Int32V(*vp, true, d); changed {
  24335. *vp = v
  24336. }
  24337. return
  24338. }
  24339. fastpathTV.DecMapUint64Int32V(rv2i(rv).(map[uint64]int32), false, d)
  24340. }
  24341. func (f fastpathT) DecMapUint64Int32X(vp *map[uint64]int32, d *Decoder) {
  24342. if v, changed := f.DecMapUint64Int32V(*vp, true, d); changed {
  24343. *vp = v
  24344. }
  24345. }
  24346. func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, canChange bool,
  24347. d *Decoder) (_ map[uint64]int32, changed bool) {
  24348. dd, esep := d.d, d.hh.hasElemSeparators()
  24349. containerLen := dd.ReadMapStart()
  24350. if canChange && v == nil {
  24351. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  24352. v = make(map[uint64]int32, xlen)
  24353. changed = true
  24354. }
  24355. if containerLen == 0 {
  24356. dd.ReadMapEnd()
  24357. return v, changed
  24358. }
  24359. var mk uint64
  24360. var mv int32
  24361. hasLen := containerLen > 0
  24362. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24363. if esep {
  24364. dd.ReadMapElemKey()
  24365. }
  24366. mk = dd.DecodeUint(64)
  24367. if esep {
  24368. dd.ReadMapElemValue()
  24369. }
  24370. if dd.TryDecodeAsNil() {
  24371. if d.h.DeleteOnNilMapValue {
  24372. delete(v, mk)
  24373. } else {
  24374. v[mk] = 0
  24375. }
  24376. continue
  24377. }
  24378. mv = int32(dd.DecodeInt(32))
  24379. if v != nil {
  24380. v[mk] = mv
  24381. }
  24382. }
  24383. dd.ReadMapEnd()
  24384. return v, changed
  24385. }
  24386. func (d *Decoder) fastpathDecMapUint64Int64R(f *codecFnInfo, rv reflect.Value) {
  24387. if rv.Kind() == reflect.Ptr {
  24388. vp := rv2i(rv).(*map[uint64]int64)
  24389. if v, changed := fastpathTV.DecMapUint64Int64V(*vp, true, d); changed {
  24390. *vp = v
  24391. }
  24392. return
  24393. }
  24394. fastpathTV.DecMapUint64Int64V(rv2i(rv).(map[uint64]int64), false, d)
  24395. }
  24396. func (f fastpathT) DecMapUint64Int64X(vp *map[uint64]int64, d *Decoder) {
  24397. if v, changed := f.DecMapUint64Int64V(*vp, true, d); changed {
  24398. *vp = v
  24399. }
  24400. }
  24401. func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, canChange bool,
  24402. d *Decoder) (_ map[uint64]int64, changed bool) {
  24403. dd, esep := d.d, d.hh.hasElemSeparators()
  24404. containerLen := dd.ReadMapStart()
  24405. if canChange && v == nil {
  24406. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  24407. v = make(map[uint64]int64, xlen)
  24408. changed = true
  24409. }
  24410. if containerLen == 0 {
  24411. dd.ReadMapEnd()
  24412. return v, changed
  24413. }
  24414. var mk uint64
  24415. var mv int64
  24416. hasLen := containerLen > 0
  24417. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24418. if esep {
  24419. dd.ReadMapElemKey()
  24420. }
  24421. mk = dd.DecodeUint(64)
  24422. if esep {
  24423. dd.ReadMapElemValue()
  24424. }
  24425. if dd.TryDecodeAsNil() {
  24426. if d.h.DeleteOnNilMapValue {
  24427. delete(v, mk)
  24428. } else {
  24429. v[mk] = 0
  24430. }
  24431. continue
  24432. }
  24433. mv = dd.DecodeInt(64)
  24434. if v != nil {
  24435. v[mk] = mv
  24436. }
  24437. }
  24438. dd.ReadMapEnd()
  24439. return v, changed
  24440. }
  24441. func (d *Decoder) fastpathDecMapUint64Float32R(f *codecFnInfo, rv reflect.Value) {
  24442. if rv.Kind() == reflect.Ptr {
  24443. vp := rv2i(rv).(*map[uint64]float32)
  24444. if v, changed := fastpathTV.DecMapUint64Float32V(*vp, true, d); changed {
  24445. *vp = v
  24446. }
  24447. return
  24448. }
  24449. fastpathTV.DecMapUint64Float32V(rv2i(rv).(map[uint64]float32), false, d)
  24450. }
  24451. func (f fastpathT) DecMapUint64Float32X(vp *map[uint64]float32, d *Decoder) {
  24452. if v, changed := f.DecMapUint64Float32V(*vp, true, d); changed {
  24453. *vp = v
  24454. }
  24455. }
  24456. func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, canChange bool,
  24457. d *Decoder) (_ map[uint64]float32, changed bool) {
  24458. dd, esep := d.d, d.hh.hasElemSeparators()
  24459. containerLen := dd.ReadMapStart()
  24460. if canChange && v == nil {
  24461. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  24462. v = make(map[uint64]float32, xlen)
  24463. changed = true
  24464. }
  24465. if containerLen == 0 {
  24466. dd.ReadMapEnd()
  24467. return v, changed
  24468. }
  24469. var mk uint64
  24470. var mv float32
  24471. hasLen := containerLen > 0
  24472. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24473. if esep {
  24474. dd.ReadMapElemKey()
  24475. }
  24476. mk = dd.DecodeUint(64)
  24477. if esep {
  24478. dd.ReadMapElemValue()
  24479. }
  24480. if dd.TryDecodeAsNil() {
  24481. if d.h.DeleteOnNilMapValue {
  24482. delete(v, mk)
  24483. } else {
  24484. v[mk] = 0
  24485. }
  24486. continue
  24487. }
  24488. mv = float32(dd.DecodeFloat(true))
  24489. if v != nil {
  24490. v[mk] = mv
  24491. }
  24492. }
  24493. dd.ReadMapEnd()
  24494. return v, changed
  24495. }
  24496. func (d *Decoder) fastpathDecMapUint64Float64R(f *codecFnInfo, rv reflect.Value) {
  24497. if rv.Kind() == reflect.Ptr {
  24498. vp := rv2i(rv).(*map[uint64]float64)
  24499. if v, changed := fastpathTV.DecMapUint64Float64V(*vp, true, d); changed {
  24500. *vp = v
  24501. }
  24502. return
  24503. }
  24504. fastpathTV.DecMapUint64Float64V(rv2i(rv).(map[uint64]float64), false, d)
  24505. }
  24506. func (f fastpathT) DecMapUint64Float64X(vp *map[uint64]float64, d *Decoder) {
  24507. if v, changed := f.DecMapUint64Float64V(*vp, true, d); changed {
  24508. *vp = v
  24509. }
  24510. }
  24511. func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, canChange bool,
  24512. d *Decoder) (_ map[uint64]float64, changed bool) {
  24513. dd, esep := d.d, d.hh.hasElemSeparators()
  24514. containerLen := dd.ReadMapStart()
  24515. if canChange && v == nil {
  24516. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  24517. v = make(map[uint64]float64, xlen)
  24518. changed = true
  24519. }
  24520. if containerLen == 0 {
  24521. dd.ReadMapEnd()
  24522. return v, changed
  24523. }
  24524. var mk uint64
  24525. var mv float64
  24526. hasLen := containerLen > 0
  24527. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24528. if esep {
  24529. dd.ReadMapElemKey()
  24530. }
  24531. mk = dd.DecodeUint(64)
  24532. if esep {
  24533. dd.ReadMapElemValue()
  24534. }
  24535. if dd.TryDecodeAsNil() {
  24536. if d.h.DeleteOnNilMapValue {
  24537. delete(v, mk)
  24538. } else {
  24539. v[mk] = 0
  24540. }
  24541. continue
  24542. }
  24543. mv = dd.DecodeFloat(false)
  24544. if v != nil {
  24545. v[mk] = mv
  24546. }
  24547. }
  24548. dd.ReadMapEnd()
  24549. return v, changed
  24550. }
  24551. func (d *Decoder) fastpathDecMapUint64BoolR(f *codecFnInfo, rv reflect.Value) {
  24552. if rv.Kind() == reflect.Ptr {
  24553. vp := rv2i(rv).(*map[uint64]bool)
  24554. if v, changed := fastpathTV.DecMapUint64BoolV(*vp, true, d); changed {
  24555. *vp = v
  24556. }
  24557. return
  24558. }
  24559. fastpathTV.DecMapUint64BoolV(rv2i(rv).(map[uint64]bool), false, d)
  24560. }
  24561. func (f fastpathT) DecMapUint64BoolX(vp *map[uint64]bool, d *Decoder) {
  24562. if v, changed := f.DecMapUint64BoolV(*vp, true, d); changed {
  24563. *vp = v
  24564. }
  24565. }
  24566. func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, canChange bool,
  24567. d *Decoder) (_ map[uint64]bool, changed bool) {
  24568. dd, esep := d.d, d.hh.hasElemSeparators()
  24569. containerLen := dd.ReadMapStart()
  24570. if canChange && v == nil {
  24571. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  24572. v = make(map[uint64]bool, xlen)
  24573. changed = true
  24574. }
  24575. if containerLen == 0 {
  24576. dd.ReadMapEnd()
  24577. return v, changed
  24578. }
  24579. var mk uint64
  24580. var mv bool
  24581. hasLen := containerLen > 0
  24582. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24583. if esep {
  24584. dd.ReadMapElemKey()
  24585. }
  24586. mk = dd.DecodeUint(64)
  24587. if esep {
  24588. dd.ReadMapElemValue()
  24589. }
  24590. if dd.TryDecodeAsNil() {
  24591. if d.h.DeleteOnNilMapValue {
  24592. delete(v, mk)
  24593. } else {
  24594. v[mk] = false
  24595. }
  24596. continue
  24597. }
  24598. mv = dd.DecodeBool()
  24599. if v != nil {
  24600. v[mk] = mv
  24601. }
  24602. }
  24603. dd.ReadMapEnd()
  24604. return v, changed
  24605. }
  24606. func (d *Decoder) fastpathDecMapUintptrIntfR(f *codecFnInfo, rv reflect.Value) {
  24607. if rv.Kind() == reflect.Ptr {
  24608. vp := rv2i(rv).(*map[uintptr]interface{})
  24609. if v, changed := fastpathTV.DecMapUintptrIntfV(*vp, true, d); changed {
  24610. *vp = v
  24611. }
  24612. return
  24613. }
  24614. fastpathTV.DecMapUintptrIntfV(rv2i(rv).(map[uintptr]interface{}), false, d)
  24615. }
  24616. func (f fastpathT) DecMapUintptrIntfX(vp *map[uintptr]interface{}, d *Decoder) {
  24617. if v, changed := f.DecMapUintptrIntfV(*vp, true, d); changed {
  24618. *vp = v
  24619. }
  24620. }
  24621. func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, canChange bool,
  24622. d *Decoder) (_ map[uintptr]interface{}, changed bool) {
  24623. dd, esep := d.d, d.hh.hasElemSeparators()
  24624. containerLen := dd.ReadMapStart()
  24625. if canChange && v == nil {
  24626. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  24627. v = make(map[uintptr]interface{}, xlen)
  24628. changed = true
  24629. }
  24630. if containerLen == 0 {
  24631. dd.ReadMapEnd()
  24632. return v, changed
  24633. }
  24634. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  24635. var mk uintptr
  24636. var mv interface{}
  24637. hasLen := containerLen > 0
  24638. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24639. if esep {
  24640. dd.ReadMapElemKey()
  24641. }
  24642. mk = uintptr(dd.DecodeUint(uintBitsize))
  24643. if esep {
  24644. dd.ReadMapElemValue()
  24645. }
  24646. if dd.TryDecodeAsNil() {
  24647. if d.h.DeleteOnNilMapValue {
  24648. delete(v, mk)
  24649. } else {
  24650. v[mk] = nil
  24651. }
  24652. continue
  24653. }
  24654. if mapGet {
  24655. mv = v[mk]
  24656. } else {
  24657. mv = nil
  24658. }
  24659. d.decode(&mv)
  24660. if v != nil {
  24661. v[mk] = mv
  24662. }
  24663. }
  24664. dd.ReadMapEnd()
  24665. return v, changed
  24666. }
  24667. func (d *Decoder) fastpathDecMapUintptrStringR(f *codecFnInfo, rv reflect.Value) {
  24668. if rv.Kind() == reflect.Ptr {
  24669. vp := rv2i(rv).(*map[uintptr]string)
  24670. if v, changed := fastpathTV.DecMapUintptrStringV(*vp, true, d); changed {
  24671. *vp = v
  24672. }
  24673. return
  24674. }
  24675. fastpathTV.DecMapUintptrStringV(rv2i(rv).(map[uintptr]string), false, d)
  24676. }
  24677. func (f fastpathT) DecMapUintptrStringX(vp *map[uintptr]string, d *Decoder) {
  24678. if v, changed := f.DecMapUintptrStringV(*vp, true, d); changed {
  24679. *vp = v
  24680. }
  24681. }
  24682. func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, canChange bool,
  24683. d *Decoder) (_ map[uintptr]string, changed bool) {
  24684. dd, esep := d.d, d.hh.hasElemSeparators()
  24685. containerLen := dd.ReadMapStart()
  24686. if canChange && v == nil {
  24687. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  24688. v = make(map[uintptr]string, xlen)
  24689. changed = true
  24690. }
  24691. if containerLen == 0 {
  24692. dd.ReadMapEnd()
  24693. return v, changed
  24694. }
  24695. var mk uintptr
  24696. var mv string
  24697. hasLen := containerLen > 0
  24698. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24699. if esep {
  24700. dd.ReadMapElemKey()
  24701. }
  24702. mk = uintptr(dd.DecodeUint(uintBitsize))
  24703. if esep {
  24704. dd.ReadMapElemValue()
  24705. }
  24706. if dd.TryDecodeAsNil() {
  24707. if d.h.DeleteOnNilMapValue {
  24708. delete(v, mk)
  24709. } else {
  24710. v[mk] = ""
  24711. }
  24712. continue
  24713. }
  24714. mv = dd.DecodeString()
  24715. if v != nil {
  24716. v[mk] = mv
  24717. }
  24718. }
  24719. dd.ReadMapEnd()
  24720. return v, changed
  24721. }
  24722. func (d *Decoder) fastpathDecMapUintptrUintR(f *codecFnInfo, rv reflect.Value) {
  24723. if rv.Kind() == reflect.Ptr {
  24724. vp := rv2i(rv).(*map[uintptr]uint)
  24725. if v, changed := fastpathTV.DecMapUintptrUintV(*vp, true, d); changed {
  24726. *vp = v
  24727. }
  24728. return
  24729. }
  24730. fastpathTV.DecMapUintptrUintV(rv2i(rv).(map[uintptr]uint), false, d)
  24731. }
  24732. func (f fastpathT) DecMapUintptrUintX(vp *map[uintptr]uint, d *Decoder) {
  24733. if v, changed := f.DecMapUintptrUintV(*vp, true, d); changed {
  24734. *vp = v
  24735. }
  24736. }
  24737. func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, canChange bool,
  24738. d *Decoder) (_ map[uintptr]uint, changed bool) {
  24739. dd, esep := d.d, d.hh.hasElemSeparators()
  24740. containerLen := dd.ReadMapStart()
  24741. if canChange && v == nil {
  24742. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  24743. v = make(map[uintptr]uint, xlen)
  24744. changed = true
  24745. }
  24746. if containerLen == 0 {
  24747. dd.ReadMapEnd()
  24748. return v, changed
  24749. }
  24750. var mk uintptr
  24751. var mv uint
  24752. hasLen := containerLen > 0
  24753. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24754. if esep {
  24755. dd.ReadMapElemKey()
  24756. }
  24757. mk = uintptr(dd.DecodeUint(uintBitsize))
  24758. if esep {
  24759. dd.ReadMapElemValue()
  24760. }
  24761. if dd.TryDecodeAsNil() {
  24762. if d.h.DeleteOnNilMapValue {
  24763. delete(v, mk)
  24764. } else {
  24765. v[mk] = 0
  24766. }
  24767. continue
  24768. }
  24769. mv = uint(dd.DecodeUint(uintBitsize))
  24770. if v != nil {
  24771. v[mk] = mv
  24772. }
  24773. }
  24774. dd.ReadMapEnd()
  24775. return v, changed
  24776. }
  24777. func (d *Decoder) fastpathDecMapUintptrUint8R(f *codecFnInfo, rv reflect.Value) {
  24778. if rv.Kind() == reflect.Ptr {
  24779. vp := rv2i(rv).(*map[uintptr]uint8)
  24780. if v, changed := fastpathTV.DecMapUintptrUint8V(*vp, true, d); changed {
  24781. *vp = v
  24782. }
  24783. return
  24784. }
  24785. fastpathTV.DecMapUintptrUint8V(rv2i(rv).(map[uintptr]uint8), false, d)
  24786. }
  24787. func (f fastpathT) DecMapUintptrUint8X(vp *map[uintptr]uint8, d *Decoder) {
  24788. if v, changed := f.DecMapUintptrUint8V(*vp, true, d); changed {
  24789. *vp = v
  24790. }
  24791. }
  24792. func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, canChange bool,
  24793. d *Decoder) (_ map[uintptr]uint8, changed bool) {
  24794. dd, esep := d.d, d.hh.hasElemSeparators()
  24795. containerLen := dd.ReadMapStart()
  24796. if canChange && v == nil {
  24797. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  24798. v = make(map[uintptr]uint8, xlen)
  24799. changed = true
  24800. }
  24801. if containerLen == 0 {
  24802. dd.ReadMapEnd()
  24803. return v, changed
  24804. }
  24805. var mk uintptr
  24806. var mv uint8
  24807. hasLen := containerLen > 0
  24808. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24809. if esep {
  24810. dd.ReadMapElemKey()
  24811. }
  24812. mk = uintptr(dd.DecodeUint(uintBitsize))
  24813. if esep {
  24814. dd.ReadMapElemValue()
  24815. }
  24816. if dd.TryDecodeAsNil() {
  24817. if d.h.DeleteOnNilMapValue {
  24818. delete(v, mk)
  24819. } else {
  24820. v[mk] = 0
  24821. }
  24822. continue
  24823. }
  24824. mv = uint8(dd.DecodeUint(8))
  24825. if v != nil {
  24826. v[mk] = mv
  24827. }
  24828. }
  24829. dd.ReadMapEnd()
  24830. return v, changed
  24831. }
  24832. func (d *Decoder) fastpathDecMapUintptrUint16R(f *codecFnInfo, rv reflect.Value) {
  24833. if rv.Kind() == reflect.Ptr {
  24834. vp := rv2i(rv).(*map[uintptr]uint16)
  24835. if v, changed := fastpathTV.DecMapUintptrUint16V(*vp, true, d); changed {
  24836. *vp = v
  24837. }
  24838. return
  24839. }
  24840. fastpathTV.DecMapUintptrUint16V(rv2i(rv).(map[uintptr]uint16), false, d)
  24841. }
  24842. func (f fastpathT) DecMapUintptrUint16X(vp *map[uintptr]uint16, d *Decoder) {
  24843. if v, changed := f.DecMapUintptrUint16V(*vp, true, d); changed {
  24844. *vp = v
  24845. }
  24846. }
  24847. func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, canChange bool,
  24848. d *Decoder) (_ map[uintptr]uint16, changed bool) {
  24849. dd, esep := d.d, d.hh.hasElemSeparators()
  24850. containerLen := dd.ReadMapStart()
  24851. if canChange && v == nil {
  24852. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  24853. v = make(map[uintptr]uint16, xlen)
  24854. changed = true
  24855. }
  24856. if containerLen == 0 {
  24857. dd.ReadMapEnd()
  24858. return v, changed
  24859. }
  24860. var mk uintptr
  24861. var mv uint16
  24862. hasLen := containerLen > 0
  24863. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24864. if esep {
  24865. dd.ReadMapElemKey()
  24866. }
  24867. mk = uintptr(dd.DecodeUint(uintBitsize))
  24868. if esep {
  24869. dd.ReadMapElemValue()
  24870. }
  24871. if dd.TryDecodeAsNil() {
  24872. if d.h.DeleteOnNilMapValue {
  24873. delete(v, mk)
  24874. } else {
  24875. v[mk] = 0
  24876. }
  24877. continue
  24878. }
  24879. mv = uint16(dd.DecodeUint(16))
  24880. if v != nil {
  24881. v[mk] = mv
  24882. }
  24883. }
  24884. dd.ReadMapEnd()
  24885. return v, changed
  24886. }
  24887. func (d *Decoder) fastpathDecMapUintptrUint32R(f *codecFnInfo, rv reflect.Value) {
  24888. if rv.Kind() == reflect.Ptr {
  24889. vp := rv2i(rv).(*map[uintptr]uint32)
  24890. if v, changed := fastpathTV.DecMapUintptrUint32V(*vp, true, d); changed {
  24891. *vp = v
  24892. }
  24893. return
  24894. }
  24895. fastpathTV.DecMapUintptrUint32V(rv2i(rv).(map[uintptr]uint32), false, d)
  24896. }
  24897. func (f fastpathT) DecMapUintptrUint32X(vp *map[uintptr]uint32, d *Decoder) {
  24898. if v, changed := f.DecMapUintptrUint32V(*vp, true, d); changed {
  24899. *vp = v
  24900. }
  24901. }
  24902. func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, canChange bool,
  24903. d *Decoder) (_ map[uintptr]uint32, changed bool) {
  24904. dd, esep := d.d, d.hh.hasElemSeparators()
  24905. containerLen := dd.ReadMapStart()
  24906. if canChange && v == nil {
  24907. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  24908. v = make(map[uintptr]uint32, xlen)
  24909. changed = true
  24910. }
  24911. if containerLen == 0 {
  24912. dd.ReadMapEnd()
  24913. return v, changed
  24914. }
  24915. var mk uintptr
  24916. var mv uint32
  24917. hasLen := containerLen > 0
  24918. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24919. if esep {
  24920. dd.ReadMapElemKey()
  24921. }
  24922. mk = uintptr(dd.DecodeUint(uintBitsize))
  24923. if esep {
  24924. dd.ReadMapElemValue()
  24925. }
  24926. if dd.TryDecodeAsNil() {
  24927. if d.h.DeleteOnNilMapValue {
  24928. delete(v, mk)
  24929. } else {
  24930. v[mk] = 0
  24931. }
  24932. continue
  24933. }
  24934. mv = uint32(dd.DecodeUint(32))
  24935. if v != nil {
  24936. v[mk] = mv
  24937. }
  24938. }
  24939. dd.ReadMapEnd()
  24940. return v, changed
  24941. }
  24942. func (d *Decoder) fastpathDecMapUintptrUint64R(f *codecFnInfo, rv reflect.Value) {
  24943. if rv.Kind() == reflect.Ptr {
  24944. vp := rv2i(rv).(*map[uintptr]uint64)
  24945. if v, changed := fastpathTV.DecMapUintptrUint64V(*vp, true, d); changed {
  24946. *vp = v
  24947. }
  24948. return
  24949. }
  24950. fastpathTV.DecMapUintptrUint64V(rv2i(rv).(map[uintptr]uint64), false, d)
  24951. }
  24952. func (f fastpathT) DecMapUintptrUint64X(vp *map[uintptr]uint64, d *Decoder) {
  24953. if v, changed := f.DecMapUintptrUint64V(*vp, true, d); changed {
  24954. *vp = v
  24955. }
  24956. }
  24957. func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, canChange bool,
  24958. d *Decoder) (_ map[uintptr]uint64, changed bool) {
  24959. dd, esep := d.d, d.hh.hasElemSeparators()
  24960. containerLen := dd.ReadMapStart()
  24961. if canChange && v == nil {
  24962. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  24963. v = make(map[uintptr]uint64, xlen)
  24964. changed = true
  24965. }
  24966. if containerLen == 0 {
  24967. dd.ReadMapEnd()
  24968. return v, changed
  24969. }
  24970. var mk uintptr
  24971. var mv uint64
  24972. hasLen := containerLen > 0
  24973. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  24974. if esep {
  24975. dd.ReadMapElemKey()
  24976. }
  24977. mk = uintptr(dd.DecodeUint(uintBitsize))
  24978. if esep {
  24979. dd.ReadMapElemValue()
  24980. }
  24981. if dd.TryDecodeAsNil() {
  24982. if d.h.DeleteOnNilMapValue {
  24983. delete(v, mk)
  24984. } else {
  24985. v[mk] = 0
  24986. }
  24987. continue
  24988. }
  24989. mv = dd.DecodeUint(64)
  24990. if v != nil {
  24991. v[mk] = mv
  24992. }
  24993. }
  24994. dd.ReadMapEnd()
  24995. return v, changed
  24996. }
  24997. func (d *Decoder) fastpathDecMapUintptrUintptrR(f *codecFnInfo, rv reflect.Value) {
  24998. if rv.Kind() == reflect.Ptr {
  24999. vp := rv2i(rv).(*map[uintptr]uintptr)
  25000. if v, changed := fastpathTV.DecMapUintptrUintptrV(*vp, true, d); changed {
  25001. *vp = v
  25002. }
  25003. return
  25004. }
  25005. fastpathTV.DecMapUintptrUintptrV(rv2i(rv).(map[uintptr]uintptr), false, d)
  25006. }
  25007. func (f fastpathT) DecMapUintptrUintptrX(vp *map[uintptr]uintptr, d *Decoder) {
  25008. if v, changed := f.DecMapUintptrUintptrV(*vp, true, d); changed {
  25009. *vp = v
  25010. }
  25011. }
  25012. func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, canChange bool,
  25013. d *Decoder) (_ map[uintptr]uintptr, changed bool) {
  25014. dd, esep := d.d, d.hh.hasElemSeparators()
  25015. containerLen := dd.ReadMapStart()
  25016. if canChange && v == nil {
  25017. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  25018. v = make(map[uintptr]uintptr, xlen)
  25019. changed = true
  25020. }
  25021. if containerLen == 0 {
  25022. dd.ReadMapEnd()
  25023. return v, changed
  25024. }
  25025. var mk uintptr
  25026. var mv uintptr
  25027. hasLen := containerLen > 0
  25028. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25029. if esep {
  25030. dd.ReadMapElemKey()
  25031. }
  25032. mk = uintptr(dd.DecodeUint(uintBitsize))
  25033. if esep {
  25034. dd.ReadMapElemValue()
  25035. }
  25036. if dd.TryDecodeAsNil() {
  25037. if d.h.DeleteOnNilMapValue {
  25038. delete(v, mk)
  25039. } else {
  25040. v[mk] = 0
  25041. }
  25042. continue
  25043. }
  25044. mv = uintptr(dd.DecodeUint(uintBitsize))
  25045. if v != nil {
  25046. v[mk] = mv
  25047. }
  25048. }
  25049. dd.ReadMapEnd()
  25050. return v, changed
  25051. }
  25052. func (d *Decoder) fastpathDecMapUintptrIntR(f *codecFnInfo, rv reflect.Value) {
  25053. if rv.Kind() == reflect.Ptr {
  25054. vp := rv2i(rv).(*map[uintptr]int)
  25055. if v, changed := fastpathTV.DecMapUintptrIntV(*vp, true, d); changed {
  25056. *vp = v
  25057. }
  25058. return
  25059. }
  25060. fastpathTV.DecMapUintptrIntV(rv2i(rv).(map[uintptr]int), false, d)
  25061. }
  25062. func (f fastpathT) DecMapUintptrIntX(vp *map[uintptr]int, d *Decoder) {
  25063. if v, changed := f.DecMapUintptrIntV(*vp, true, d); changed {
  25064. *vp = v
  25065. }
  25066. }
  25067. func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, canChange bool,
  25068. d *Decoder) (_ map[uintptr]int, changed bool) {
  25069. dd, esep := d.d, d.hh.hasElemSeparators()
  25070. containerLen := dd.ReadMapStart()
  25071. if canChange && v == nil {
  25072. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  25073. v = make(map[uintptr]int, xlen)
  25074. changed = true
  25075. }
  25076. if containerLen == 0 {
  25077. dd.ReadMapEnd()
  25078. return v, changed
  25079. }
  25080. var mk uintptr
  25081. var mv int
  25082. hasLen := containerLen > 0
  25083. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25084. if esep {
  25085. dd.ReadMapElemKey()
  25086. }
  25087. mk = uintptr(dd.DecodeUint(uintBitsize))
  25088. if esep {
  25089. dd.ReadMapElemValue()
  25090. }
  25091. if dd.TryDecodeAsNil() {
  25092. if d.h.DeleteOnNilMapValue {
  25093. delete(v, mk)
  25094. } else {
  25095. v[mk] = 0
  25096. }
  25097. continue
  25098. }
  25099. mv = int(dd.DecodeInt(intBitsize))
  25100. if v != nil {
  25101. v[mk] = mv
  25102. }
  25103. }
  25104. dd.ReadMapEnd()
  25105. return v, changed
  25106. }
  25107. func (d *Decoder) fastpathDecMapUintptrInt8R(f *codecFnInfo, rv reflect.Value) {
  25108. if rv.Kind() == reflect.Ptr {
  25109. vp := rv2i(rv).(*map[uintptr]int8)
  25110. if v, changed := fastpathTV.DecMapUintptrInt8V(*vp, true, d); changed {
  25111. *vp = v
  25112. }
  25113. return
  25114. }
  25115. fastpathTV.DecMapUintptrInt8V(rv2i(rv).(map[uintptr]int8), false, d)
  25116. }
  25117. func (f fastpathT) DecMapUintptrInt8X(vp *map[uintptr]int8, d *Decoder) {
  25118. if v, changed := f.DecMapUintptrInt8V(*vp, true, d); changed {
  25119. *vp = v
  25120. }
  25121. }
  25122. func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, canChange bool,
  25123. d *Decoder) (_ map[uintptr]int8, changed bool) {
  25124. dd, esep := d.d, d.hh.hasElemSeparators()
  25125. containerLen := dd.ReadMapStart()
  25126. if canChange && v == nil {
  25127. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  25128. v = make(map[uintptr]int8, xlen)
  25129. changed = true
  25130. }
  25131. if containerLen == 0 {
  25132. dd.ReadMapEnd()
  25133. return v, changed
  25134. }
  25135. var mk uintptr
  25136. var mv int8
  25137. hasLen := containerLen > 0
  25138. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25139. if esep {
  25140. dd.ReadMapElemKey()
  25141. }
  25142. mk = uintptr(dd.DecodeUint(uintBitsize))
  25143. if esep {
  25144. dd.ReadMapElemValue()
  25145. }
  25146. if dd.TryDecodeAsNil() {
  25147. if d.h.DeleteOnNilMapValue {
  25148. delete(v, mk)
  25149. } else {
  25150. v[mk] = 0
  25151. }
  25152. continue
  25153. }
  25154. mv = int8(dd.DecodeInt(8))
  25155. if v != nil {
  25156. v[mk] = mv
  25157. }
  25158. }
  25159. dd.ReadMapEnd()
  25160. return v, changed
  25161. }
  25162. func (d *Decoder) fastpathDecMapUintptrInt16R(f *codecFnInfo, rv reflect.Value) {
  25163. if rv.Kind() == reflect.Ptr {
  25164. vp := rv2i(rv).(*map[uintptr]int16)
  25165. if v, changed := fastpathTV.DecMapUintptrInt16V(*vp, true, d); changed {
  25166. *vp = v
  25167. }
  25168. return
  25169. }
  25170. fastpathTV.DecMapUintptrInt16V(rv2i(rv).(map[uintptr]int16), false, d)
  25171. }
  25172. func (f fastpathT) DecMapUintptrInt16X(vp *map[uintptr]int16, d *Decoder) {
  25173. if v, changed := f.DecMapUintptrInt16V(*vp, true, d); changed {
  25174. *vp = v
  25175. }
  25176. }
  25177. func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, canChange bool,
  25178. d *Decoder) (_ map[uintptr]int16, changed bool) {
  25179. dd, esep := d.d, d.hh.hasElemSeparators()
  25180. containerLen := dd.ReadMapStart()
  25181. if canChange && v == nil {
  25182. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  25183. v = make(map[uintptr]int16, xlen)
  25184. changed = true
  25185. }
  25186. if containerLen == 0 {
  25187. dd.ReadMapEnd()
  25188. return v, changed
  25189. }
  25190. var mk uintptr
  25191. var mv int16
  25192. hasLen := containerLen > 0
  25193. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25194. if esep {
  25195. dd.ReadMapElemKey()
  25196. }
  25197. mk = uintptr(dd.DecodeUint(uintBitsize))
  25198. if esep {
  25199. dd.ReadMapElemValue()
  25200. }
  25201. if dd.TryDecodeAsNil() {
  25202. if d.h.DeleteOnNilMapValue {
  25203. delete(v, mk)
  25204. } else {
  25205. v[mk] = 0
  25206. }
  25207. continue
  25208. }
  25209. mv = int16(dd.DecodeInt(16))
  25210. if v != nil {
  25211. v[mk] = mv
  25212. }
  25213. }
  25214. dd.ReadMapEnd()
  25215. return v, changed
  25216. }
  25217. func (d *Decoder) fastpathDecMapUintptrInt32R(f *codecFnInfo, rv reflect.Value) {
  25218. if rv.Kind() == reflect.Ptr {
  25219. vp := rv2i(rv).(*map[uintptr]int32)
  25220. if v, changed := fastpathTV.DecMapUintptrInt32V(*vp, true, d); changed {
  25221. *vp = v
  25222. }
  25223. return
  25224. }
  25225. fastpathTV.DecMapUintptrInt32V(rv2i(rv).(map[uintptr]int32), false, d)
  25226. }
  25227. func (f fastpathT) DecMapUintptrInt32X(vp *map[uintptr]int32, d *Decoder) {
  25228. if v, changed := f.DecMapUintptrInt32V(*vp, true, d); changed {
  25229. *vp = v
  25230. }
  25231. }
  25232. func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, canChange bool,
  25233. d *Decoder) (_ map[uintptr]int32, changed bool) {
  25234. dd, esep := d.d, d.hh.hasElemSeparators()
  25235. containerLen := dd.ReadMapStart()
  25236. if canChange && v == nil {
  25237. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  25238. v = make(map[uintptr]int32, xlen)
  25239. changed = true
  25240. }
  25241. if containerLen == 0 {
  25242. dd.ReadMapEnd()
  25243. return v, changed
  25244. }
  25245. var mk uintptr
  25246. var mv int32
  25247. hasLen := containerLen > 0
  25248. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25249. if esep {
  25250. dd.ReadMapElemKey()
  25251. }
  25252. mk = uintptr(dd.DecodeUint(uintBitsize))
  25253. if esep {
  25254. dd.ReadMapElemValue()
  25255. }
  25256. if dd.TryDecodeAsNil() {
  25257. if d.h.DeleteOnNilMapValue {
  25258. delete(v, mk)
  25259. } else {
  25260. v[mk] = 0
  25261. }
  25262. continue
  25263. }
  25264. mv = int32(dd.DecodeInt(32))
  25265. if v != nil {
  25266. v[mk] = mv
  25267. }
  25268. }
  25269. dd.ReadMapEnd()
  25270. return v, changed
  25271. }
  25272. func (d *Decoder) fastpathDecMapUintptrInt64R(f *codecFnInfo, rv reflect.Value) {
  25273. if rv.Kind() == reflect.Ptr {
  25274. vp := rv2i(rv).(*map[uintptr]int64)
  25275. if v, changed := fastpathTV.DecMapUintptrInt64V(*vp, true, d); changed {
  25276. *vp = v
  25277. }
  25278. return
  25279. }
  25280. fastpathTV.DecMapUintptrInt64V(rv2i(rv).(map[uintptr]int64), false, d)
  25281. }
  25282. func (f fastpathT) DecMapUintptrInt64X(vp *map[uintptr]int64, d *Decoder) {
  25283. if v, changed := f.DecMapUintptrInt64V(*vp, true, d); changed {
  25284. *vp = v
  25285. }
  25286. }
  25287. func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, canChange bool,
  25288. d *Decoder) (_ map[uintptr]int64, changed bool) {
  25289. dd, esep := d.d, d.hh.hasElemSeparators()
  25290. containerLen := dd.ReadMapStart()
  25291. if canChange && v == nil {
  25292. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  25293. v = make(map[uintptr]int64, xlen)
  25294. changed = true
  25295. }
  25296. if containerLen == 0 {
  25297. dd.ReadMapEnd()
  25298. return v, changed
  25299. }
  25300. var mk uintptr
  25301. var mv int64
  25302. hasLen := containerLen > 0
  25303. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25304. if esep {
  25305. dd.ReadMapElemKey()
  25306. }
  25307. mk = uintptr(dd.DecodeUint(uintBitsize))
  25308. if esep {
  25309. dd.ReadMapElemValue()
  25310. }
  25311. if dd.TryDecodeAsNil() {
  25312. if d.h.DeleteOnNilMapValue {
  25313. delete(v, mk)
  25314. } else {
  25315. v[mk] = 0
  25316. }
  25317. continue
  25318. }
  25319. mv = dd.DecodeInt(64)
  25320. if v != nil {
  25321. v[mk] = mv
  25322. }
  25323. }
  25324. dd.ReadMapEnd()
  25325. return v, changed
  25326. }
  25327. func (d *Decoder) fastpathDecMapUintptrFloat32R(f *codecFnInfo, rv reflect.Value) {
  25328. if rv.Kind() == reflect.Ptr {
  25329. vp := rv2i(rv).(*map[uintptr]float32)
  25330. if v, changed := fastpathTV.DecMapUintptrFloat32V(*vp, true, d); changed {
  25331. *vp = v
  25332. }
  25333. return
  25334. }
  25335. fastpathTV.DecMapUintptrFloat32V(rv2i(rv).(map[uintptr]float32), false, d)
  25336. }
  25337. func (f fastpathT) DecMapUintptrFloat32X(vp *map[uintptr]float32, d *Decoder) {
  25338. if v, changed := f.DecMapUintptrFloat32V(*vp, true, d); changed {
  25339. *vp = v
  25340. }
  25341. }
  25342. func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, canChange bool,
  25343. d *Decoder) (_ map[uintptr]float32, changed bool) {
  25344. dd, esep := d.d, d.hh.hasElemSeparators()
  25345. containerLen := dd.ReadMapStart()
  25346. if canChange && v == nil {
  25347. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  25348. v = make(map[uintptr]float32, xlen)
  25349. changed = true
  25350. }
  25351. if containerLen == 0 {
  25352. dd.ReadMapEnd()
  25353. return v, changed
  25354. }
  25355. var mk uintptr
  25356. var mv float32
  25357. hasLen := containerLen > 0
  25358. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25359. if esep {
  25360. dd.ReadMapElemKey()
  25361. }
  25362. mk = uintptr(dd.DecodeUint(uintBitsize))
  25363. if esep {
  25364. dd.ReadMapElemValue()
  25365. }
  25366. if dd.TryDecodeAsNil() {
  25367. if d.h.DeleteOnNilMapValue {
  25368. delete(v, mk)
  25369. } else {
  25370. v[mk] = 0
  25371. }
  25372. continue
  25373. }
  25374. mv = float32(dd.DecodeFloat(true))
  25375. if v != nil {
  25376. v[mk] = mv
  25377. }
  25378. }
  25379. dd.ReadMapEnd()
  25380. return v, changed
  25381. }
  25382. func (d *Decoder) fastpathDecMapUintptrFloat64R(f *codecFnInfo, rv reflect.Value) {
  25383. if rv.Kind() == reflect.Ptr {
  25384. vp := rv2i(rv).(*map[uintptr]float64)
  25385. if v, changed := fastpathTV.DecMapUintptrFloat64V(*vp, true, d); changed {
  25386. *vp = v
  25387. }
  25388. return
  25389. }
  25390. fastpathTV.DecMapUintptrFloat64V(rv2i(rv).(map[uintptr]float64), false, d)
  25391. }
  25392. func (f fastpathT) DecMapUintptrFloat64X(vp *map[uintptr]float64, d *Decoder) {
  25393. if v, changed := f.DecMapUintptrFloat64V(*vp, true, d); changed {
  25394. *vp = v
  25395. }
  25396. }
  25397. func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, canChange bool,
  25398. d *Decoder) (_ map[uintptr]float64, changed bool) {
  25399. dd, esep := d.d, d.hh.hasElemSeparators()
  25400. containerLen := dd.ReadMapStart()
  25401. if canChange && v == nil {
  25402. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  25403. v = make(map[uintptr]float64, xlen)
  25404. changed = true
  25405. }
  25406. if containerLen == 0 {
  25407. dd.ReadMapEnd()
  25408. return v, changed
  25409. }
  25410. var mk uintptr
  25411. var mv float64
  25412. hasLen := containerLen > 0
  25413. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25414. if esep {
  25415. dd.ReadMapElemKey()
  25416. }
  25417. mk = uintptr(dd.DecodeUint(uintBitsize))
  25418. if esep {
  25419. dd.ReadMapElemValue()
  25420. }
  25421. if dd.TryDecodeAsNil() {
  25422. if d.h.DeleteOnNilMapValue {
  25423. delete(v, mk)
  25424. } else {
  25425. v[mk] = 0
  25426. }
  25427. continue
  25428. }
  25429. mv = dd.DecodeFloat(false)
  25430. if v != nil {
  25431. v[mk] = mv
  25432. }
  25433. }
  25434. dd.ReadMapEnd()
  25435. return v, changed
  25436. }
  25437. func (d *Decoder) fastpathDecMapUintptrBoolR(f *codecFnInfo, rv reflect.Value) {
  25438. if rv.Kind() == reflect.Ptr {
  25439. vp := rv2i(rv).(*map[uintptr]bool)
  25440. if v, changed := fastpathTV.DecMapUintptrBoolV(*vp, true, d); changed {
  25441. *vp = v
  25442. }
  25443. return
  25444. }
  25445. fastpathTV.DecMapUintptrBoolV(rv2i(rv).(map[uintptr]bool), false, d)
  25446. }
  25447. func (f fastpathT) DecMapUintptrBoolX(vp *map[uintptr]bool, d *Decoder) {
  25448. if v, changed := f.DecMapUintptrBoolV(*vp, true, d); changed {
  25449. *vp = v
  25450. }
  25451. }
  25452. func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, canChange bool,
  25453. d *Decoder) (_ map[uintptr]bool, changed bool) {
  25454. dd, esep := d.d, d.hh.hasElemSeparators()
  25455. containerLen := dd.ReadMapStart()
  25456. if canChange && v == nil {
  25457. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  25458. v = make(map[uintptr]bool, xlen)
  25459. changed = true
  25460. }
  25461. if containerLen == 0 {
  25462. dd.ReadMapEnd()
  25463. return v, changed
  25464. }
  25465. var mk uintptr
  25466. var mv bool
  25467. hasLen := containerLen > 0
  25468. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25469. if esep {
  25470. dd.ReadMapElemKey()
  25471. }
  25472. mk = uintptr(dd.DecodeUint(uintBitsize))
  25473. if esep {
  25474. dd.ReadMapElemValue()
  25475. }
  25476. if dd.TryDecodeAsNil() {
  25477. if d.h.DeleteOnNilMapValue {
  25478. delete(v, mk)
  25479. } else {
  25480. v[mk] = false
  25481. }
  25482. continue
  25483. }
  25484. mv = dd.DecodeBool()
  25485. if v != nil {
  25486. v[mk] = mv
  25487. }
  25488. }
  25489. dd.ReadMapEnd()
  25490. return v, changed
  25491. }
  25492. func (d *Decoder) fastpathDecMapIntIntfR(f *codecFnInfo, rv reflect.Value) {
  25493. if rv.Kind() == reflect.Ptr {
  25494. vp := rv2i(rv).(*map[int]interface{})
  25495. if v, changed := fastpathTV.DecMapIntIntfV(*vp, true, d); changed {
  25496. *vp = v
  25497. }
  25498. return
  25499. }
  25500. fastpathTV.DecMapIntIntfV(rv2i(rv).(map[int]interface{}), false, d)
  25501. }
  25502. func (f fastpathT) DecMapIntIntfX(vp *map[int]interface{}, d *Decoder) {
  25503. if v, changed := f.DecMapIntIntfV(*vp, true, d); changed {
  25504. *vp = v
  25505. }
  25506. }
  25507. func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, canChange bool,
  25508. d *Decoder) (_ map[int]interface{}, changed bool) {
  25509. dd, esep := d.d, d.hh.hasElemSeparators()
  25510. containerLen := dd.ReadMapStart()
  25511. if canChange && v == nil {
  25512. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  25513. v = make(map[int]interface{}, xlen)
  25514. changed = true
  25515. }
  25516. if containerLen == 0 {
  25517. dd.ReadMapEnd()
  25518. return v, changed
  25519. }
  25520. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  25521. var mk int
  25522. var mv interface{}
  25523. hasLen := containerLen > 0
  25524. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25525. if esep {
  25526. dd.ReadMapElemKey()
  25527. }
  25528. mk = int(dd.DecodeInt(intBitsize))
  25529. if esep {
  25530. dd.ReadMapElemValue()
  25531. }
  25532. if dd.TryDecodeAsNil() {
  25533. if d.h.DeleteOnNilMapValue {
  25534. delete(v, mk)
  25535. } else {
  25536. v[mk] = nil
  25537. }
  25538. continue
  25539. }
  25540. if mapGet {
  25541. mv = v[mk]
  25542. } else {
  25543. mv = nil
  25544. }
  25545. d.decode(&mv)
  25546. if v != nil {
  25547. v[mk] = mv
  25548. }
  25549. }
  25550. dd.ReadMapEnd()
  25551. return v, changed
  25552. }
  25553. func (d *Decoder) fastpathDecMapIntStringR(f *codecFnInfo, rv reflect.Value) {
  25554. if rv.Kind() == reflect.Ptr {
  25555. vp := rv2i(rv).(*map[int]string)
  25556. if v, changed := fastpathTV.DecMapIntStringV(*vp, true, d); changed {
  25557. *vp = v
  25558. }
  25559. return
  25560. }
  25561. fastpathTV.DecMapIntStringV(rv2i(rv).(map[int]string), false, d)
  25562. }
  25563. func (f fastpathT) DecMapIntStringX(vp *map[int]string, d *Decoder) {
  25564. if v, changed := f.DecMapIntStringV(*vp, true, d); changed {
  25565. *vp = v
  25566. }
  25567. }
  25568. func (_ fastpathT) DecMapIntStringV(v map[int]string, canChange bool,
  25569. d *Decoder) (_ map[int]string, changed bool) {
  25570. dd, esep := d.d, d.hh.hasElemSeparators()
  25571. containerLen := dd.ReadMapStart()
  25572. if canChange && v == nil {
  25573. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  25574. v = make(map[int]string, xlen)
  25575. changed = true
  25576. }
  25577. if containerLen == 0 {
  25578. dd.ReadMapEnd()
  25579. return v, changed
  25580. }
  25581. var mk int
  25582. var mv string
  25583. hasLen := containerLen > 0
  25584. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25585. if esep {
  25586. dd.ReadMapElemKey()
  25587. }
  25588. mk = int(dd.DecodeInt(intBitsize))
  25589. if esep {
  25590. dd.ReadMapElemValue()
  25591. }
  25592. if dd.TryDecodeAsNil() {
  25593. if d.h.DeleteOnNilMapValue {
  25594. delete(v, mk)
  25595. } else {
  25596. v[mk] = ""
  25597. }
  25598. continue
  25599. }
  25600. mv = dd.DecodeString()
  25601. if v != nil {
  25602. v[mk] = mv
  25603. }
  25604. }
  25605. dd.ReadMapEnd()
  25606. return v, changed
  25607. }
  25608. func (d *Decoder) fastpathDecMapIntUintR(f *codecFnInfo, rv reflect.Value) {
  25609. if rv.Kind() == reflect.Ptr {
  25610. vp := rv2i(rv).(*map[int]uint)
  25611. if v, changed := fastpathTV.DecMapIntUintV(*vp, true, d); changed {
  25612. *vp = v
  25613. }
  25614. return
  25615. }
  25616. fastpathTV.DecMapIntUintV(rv2i(rv).(map[int]uint), false, d)
  25617. }
  25618. func (f fastpathT) DecMapIntUintX(vp *map[int]uint, d *Decoder) {
  25619. if v, changed := f.DecMapIntUintV(*vp, true, d); changed {
  25620. *vp = v
  25621. }
  25622. }
  25623. func (_ fastpathT) DecMapIntUintV(v map[int]uint, canChange bool,
  25624. d *Decoder) (_ map[int]uint, changed bool) {
  25625. dd, esep := d.d, d.hh.hasElemSeparators()
  25626. containerLen := dd.ReadMapStart()
  25627. if canChange && v == nil {
  25628. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  25629. v = make(map[int]uint, xlen)
  25630. changed = true
  25631. }
  25632. if containerLen == 0 {
  25633. dd.ReadMapEnd()
  25634. return v, changed
  25635. }
  25636. var mk int
  25637. var mv uint
  25638. hasLen := containerLen > 0
  25639. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25640. if esep {
  25641. dd.ReadMapElemKey()
  25642. }
  25643. mk = int(dd.DecodeInt(intBitsize))
  25644. if esep {
  25645. dd.ReadMapElemValue()
  25646. }
  25647. if dd.TryDecodeAsNil() {
  25648. if d.h.DeleteOnNilMapValue {
  25649. delete(v, mk)
  25650. } else {
  25651. v[mk] = 0
  25652. }
  25653. continue
  25654. }
  25655. mv = uint(dd.DecodeUint(uintBitsize))
  25656. if v != nil {
  25657. v[mk] = mv
  25658. }
  25659. }
  25660. dd.ReadMapEnd()
  25661. return v, changed
  25662. }
  25663. func (d *Decoder) fastpathDecMapIntUint8R(f *codecFnInfo, rv reflect.Value) {
  25664. if rv.Kind() == reflect.Ptr {
  25665. vp := rv2i(rv).(*map[int]uint8)
  25666. if v, changed := fastpathTV.DecMapIntUint8V(*vp, true, d); changed {
  25667. *vp = v
  25668. }
  25669. return
  25670. }
  25671. fastpathTV.DecMapIntUint8V(rv2i(rv).(map[int]uint8), false, d)
  25672. }
  25673. func (f fastpathT) DecMapIntUint8X(vp *map[int]uint8, d *Decoder) {
  25674. if v, changed := f.DecMapIntUint8V(*vp, true, d); changed {
  25675. *vp = v
  25676. }
  25677. }
  25678. func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, canChange bool,
  25679. d *Decoder) (_ map[int]uint8, changed bool) {
  25680. dd, esep := d.d, d.hh.hasElemSeparators()
  25681. containerLen := dd.ReadMapStart()
  25682. if canChange && v == nil {
  25683. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  25684. v = make(map[int]uint8, xlen)
  25685. changed = true
  25686. }
  25687. if containerLen == 0 {
  25688. dd.ReadMapEnd()
  25689. return v, changed
  25690. }
  25691. var mk int
  25692. var mv uint8
  25693. hasLen := containerLen > 0
  25694. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25695. if esep {
  25696. dd.ReadMapElemKey()
  25697. }
  25698. mk = int(dd.DecodeInt(intBitsize))
  25699. if esep {
  25700. dd.ReadMapElemValue()
  25701. }
  25702. if dd.TryDecodeAsNil() {
  25703. if d.h.DeleteOnNilMapValue {
  25704. delete(v, mk)
  25705. } else {
  25706. v[mk] = 0
  25707. }
  25708. continue
  25709. }
  25710. mv = uint8(dd.DecodeUint(8))
  25711. if v != nil {
  25712. v[mk] = mv
  25713. }
  25714. }
  25715. dd.ReadMapEnd()
  25716. return v, changed
  25717. }
  25718. func (d *Decoder) fastpathDecMapIntUint16R(f *codecFnInfo, rv reflect.Value) {
  25719. if rv.Kind() == reflect.Ptr {
  25720. vp := rv2i(rv).(*map[int]uint16)
  25721. if v, changed := fastpathTV.DecMapIntUint16V(*vp, true, d); changed {
  25722. *vp = v
  25723. }
  25724. return
  25725. }
  25726. fastpathTV.DecMapIntUint16V(rv2i(rv).(map[int]uint16), false, d)
  25727. }
  25728. func (f fastpathT) DecMapIntUint16X(vp *map[int]uint16, d *Decoder) {
  25729. if v, changed := f.DecMapIntUint16V(*vp, true, d); changed {
  25730. *vp = v
  25731. }
  25732. }
  25733. func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, canChange bool,
  25734. d *Decoder) (_ map[int]uint16, changed bool) {
  25735. dd, esep := d.d, d.hh.hasElemSeparators()
  25736. containerLen := dd.ReadMapStart()
  25737. if canChange && v == nil {
  25738. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  25739. v = make(map[int]uint16, xlen)
  25740. changed = true
  25741. }
  25742. if containerLen == 0 {
  25743. dd.ReadMapEnd()
  25744. return v, changed
  25745. }
  25746. var mk int
  25747. var mv uint16
  25748. hasLen := containerLen > 0
  25749. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25750. if esep {
  25751. dd.ReadMapElemKey()
  25752. }
  25753. mk = int(dd.DecodeInt(intBitsize))
  25754. if esep {
  25755. dd.ReadMapElemValue()
  25756. }
  25757. if dd.TryDecodeAsNil() {
  25758. if d.h.DeleteOnNilMapValue {
  25759. delete(v, mk)
  25760. } else {
  25761. v[mk] = 0
  25762. }
  25763. continue
  25764. }
  25765. mv = uint16(dd.DecodeUint(16))
  25766. if v != nil {
  25767. v[mk] = mv
  25768. }
  25769. }
  25770. dd.ReadMapEnd()
  25771. return v, changed
  25772. }
  25773. func (d *Decoder) fastpathDecMapIntUint32R(f *codecFnInfo, rv reflect.Value) {
  25774. if rv.Kind() == reflect.Ptr {
  25775. vp := rv2i(rv).(*map[int]uint32)
  25776. if v, changed := fastpathTV.DecMapIntUint32V(*vp, true, d); changed {
  25777. *vp = v
  25778. }
  25779. return
  25780. }
  25781. fastpathTV.DecMapIntUint32V(rv2i(rv).(map[int]uint32), false, d)
  25782. }
  25783. func (f fastpathT) DecMapIntUint32X(vp *map[int]uint32, d *Decoder) {
  25784. if v, changed := f.DecMapIntUint32V(*vp, true, d); changed {
  25785. *vp = v
  25786. }
  25787. }
  25788. func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, canChange bool,
  25789. d *Decoder) (_ map[int]uint32, changed bool) {
  25790. dd, esep := d.d, d.hh.hasElemSeparators()
  25791. containerLen := dd.ReadMapStart()
  25792. if canChange && v == nil {
  25793. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  25794. v = make(map[int]uint32, xlen)
  25795. changed = true
  25796. }
  25797. if containerLen == 0 {
  25798. dd.ReadMapEnd()
  25799. return v, changed
  25800. }
  25801. var mk int
  25802. var mv uint32
  25803. hasLen := containerLen > 0
  25804. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25805. if esep {
  25806. dd.ReadMapElemKey()
  25807. }
  25808. mk = int(dd.DecodeInt(intBitsize))
  25809. if esep {
  25810. dd.ReadMapElemValue()
  25811. }
  25812. if dd.TryDecodeAsNil() {
  25813. if d.h.DeleteOnNilMapValue {
  25814. delete(v, mk)
  25815. } else {
  25816. v[mk] = 0
  25817. }
  25818. continue
  25819. }
  25820. mv = uint32(dd.DecodeUint(32))
  25821. if v != nil {
  25822. v[mk] = mv
  25823. }
  25824. }
  25825. dd.ReadMapEnd()
  25826. return v, changed
  25827. }
  25828. func (d *Decoder) fastpathDecMapIntUint64R(f *codecFnInfo, rv reflect.Value) {
  25829. if rv.Kind() == reflect.Ptr {
  25830. vp := rv2i(rv).(*map[int]uint64)
  25831. if v, changed := fastpathTV.DecMapIntUint64V(*vp, true, d); changed {
  25832. *vp = v
  25833. }
  25834. return
  25835. }
  25836. fastpathTV.DecMapIntUint64V(rv2i(rv).(map[int]uint64), false, d)
  25837. }
  25838. func (f fastpathT) DecMapIntUint64X(vp *map[int]uint64, d *Decoder) {
  25839. if v, changed := f.DecMapIntUint64V(*vp, true, d); changed {
  25840. *vp = v
  25841. }
  25842. }
  25843. func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, canChange bool,
  25844. d *Decoder) (_ map[int]uint64, changed bool) {
  25845. dd, esep := d.d, d.hh.hasElemSeparators()
  25846. containerLen := dd.ReadMapStart()
  25847. if canChange && v == nil {
  25848. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  25849. v = make(map[int]uint64, xlen)
  25850. changed = true
  25851. }
  25852. if containerLen == 0 {
  25853. dd.ReadMapEnd()
  25854. return v, changed
  25855. }
  25856. var mk int
  25857. var mv uint64
  25858. hasLen := containerLen > 0
  25859. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25860. if esep {
  25861. dd.ReadMapElemKey()
  25862. }
  25863. mk = int(dd.DecodeInt(intBitsize))
  25864. if esep {
  25865. dd.ReadMapElemValue()
  25866. }
  25867. if dd.TryDecodeAsNil() {
  25868. if d.h.DeleteOnNilMapValue {
  25869. delete(v, mk)
  25870. } else {
  25871. v[mk] = 0
  25872. }
  25873. continue
  25874. }
  25875. mv = dd.DecodeUint(64)
  25876. if v != nil {
  25877. v[mk] = mv
  25878. }
  25879. }
  25880. dd.ReadMapEnd()
  25881. return v, changed
  25882. }
  25883. func (d *Decoder) fastpathDecMapIntUintptrR(f *codecFnInfo, rv reflect.Value) {
  25884. if rv.Kind() == reflect.Ptr {
  25885. vp := rv2i(rv).(*map[int]uintptr)
  25886. if v, changed := fastpathTV.DecMapIntUintptrV(*vp, true, d); changed {
  25887. *vp = v
  25888. }
  25889. return
  25890. }
  25891. fastpathTV.DecMapIntUintptrV(rv2i(rv).(map[int]uintptr), false, d)
  25892. }
  25893. func (f fastpathT) DecMapIntUintptrX(vp *map[int]uintptr, d *Decoder) {
  25894. if v, changed := f.DecMapIntUintptrV(*vp, true, d); changed {
  25895. *vp = v
  25896. }
  25897. }
  25898. func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, canChange bool,
  25899. d *Decoder) (_ map[int]uintptr, changed bool) {
  25900. dd, esep := d.d, d.hh.hasElemSeparators()
  25901. containerLen := dd.ReadMapStart()
  25902. if canChange && v == nil {
  25903. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  25904. v = make(map[int]uintptr, xlen)
  25905. changed = true
  25906. }
  25907. if containerLen == 0 {
  25908. dd.ReadMapEnd()
  25909. return v, changed
  25910. }
  25911. var mk int
  25912. var mv uintptr
  25913. hasLen := containerLen > 0
  25914. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25915. if esep {
  25916. dd.ReadMapElemKey()
  25917. }
  25918. mk = int(dd.DecodeInt(intBitsize))
  25919. if esep {
  25920. dd.ReadMapElemValue()
  25921. }
  25922. if dd.TryDecodeAsNil() {
  25923. if d.h.DeleteOnNilMapValue {
  25924. delete(v, mk)
  25925. } else {
  25926. v[mk] = 0
  25927. }
  25928. continue
  25929. }
  25930. mv = uintptr(dd.DecodeUint(uintBitsize))
  25931. if v != nil {
  25932. v[mk] = mv
  25933. }
  25934. }
  25935. dd.ReadMapEnd()
  25936. return v, changed
  25937. }
  25938. func (d *Decoder) fastpathDecMapIntIntR(f *codecFnInfo, rv reflect.Value) {
  25939. if rv.Kind() == reflect.Ptr {
  25940. vp := rv2i(rv).(*map[int]int)
  25941. if v, changed := fastpathTV.DecMapIntIntV(*vp, true, d); changed {
  25942. *vp = v
  25943. }
  25944. return
  25945. }
  25946. fastpathTV.DecMapIntIntV(rv2i(rv).(map[int]int), false, d)
  25947. }
  25948. func (f fastpathT) DecMapIntIntX(vp *map[int]int, d *Decoder) {
  25949. if v, changed := f.DecMapIntIntV(*vp, true, d); changed {
  25950. *vp = v
  25951. }
  25952. }
  25953. func (_ fastpathT) DecMapIntIntV(v map[int]int, canChange bool,
  25954. d *Decoder) (_ map[int]int, changed bool) {
  25955. dd, esep := d.d, d.hh.hasElemSeparators()
  25956. containerLen := dd.ReadMapStart()
  25957. if canChange && v == nil {
  25958. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  25959. v = make(map[int]int, xlen)
  25960. changed = true
  25961. }
  25962. if containerLen == 0 {
  25963. dd.ReadMapEnd()
  25964. return v, changed
  25965. }
  25966. var mk int
  25967. var mv int
  25968. hasLen := containerLen > 0
  25969. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  25970. if esep {
  25971. dd.ReadMapElemKey()
  25972. }
  25973. mk = int(dd.DecodeInt(intBitsize))
  25974. if esep {
  25975. dd.ReadMapElemValue()
  25976. }
  25977. if dd.TryDecodeAsNil() {
  25978. if d.h.DeleteOnNilMapValue {
  25979. delete(v, mk)
  25980. } else {
  25981. v[mk] = 0
  25982. }
  25983. continue
  25984. }
  25985. mv = int(dd.DecodeInt(intBitsize))
  25986. if v != nil {
  25987. v[mk] = mv
  25988. }
  25989. }
  25990. dd.ReadMapEnd()
  25991. return v, changed
  25992. }
  25993. func (d *Decoder) fastpathDecMapIntInt8R(f *codecFnInfo, rv reflect.Value) {
  25994. if rv.Kind() == reflect.Ptr {
  25995. vp := rv2i(rv).(*map[int]int8)
  25996. if v, changed := fastpathTV.DecMapIntInt8V(*vp, true, d); changed {
  25997. *vp = v
  25998. }
  25999. return
  26000. }
  26001. fastpathTV.DecMapIntInt8V(rv2i(rv).(map[int]int8), false, d)
  26002. }
  26003. func (f fastpathT) DecMapIntInt8X(vp *map[int]int8, d *Decoder) {
  26004. if v, changed := f.DecMapIntInt8V(*vp, true, d); changed {
  26005. *vp = v
  26006. }
  26007. }
  26008. func (_ fastpathT) DecMapIntInt8V(v map[int]int8, canChange bool,
  26009. d *Decoder) (_ map[int]int8, changed bool) {
  26010. dd, esep := d.d, d.hh.hasElemSeparators()
  26011. containerLen := dd.ReadMapStart()
  26012. if canChange && v == nil {
  26013. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  26014. v = make(map[int]int8, xlen)
  26015. changed = true
  26016. }
  26017. if containerLen == 0 {
  26018. dd.ReadMapEnd()
  26019. return v, changed
  26020. }
  26021. var mk int
  26022. var mv int8
  26023. hasLen := containerLen > 0
  26024. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26025. if esep {
  26026. dd.ReadMapElemKey()
  26027. }
  26028. mk = int(dd.DecodeInt(intBitsize))
  26029. if esep {
  26030. dd.ReadMapElemValue()
  26031. }
  26032. if dd.TryDecodeAsNil() {
  26033. if d.h.DeleteOnNilMapValue {
  26034. delete(v, mk)
  26035. } else {
  26036. v[mk] = 0
  26037. }
  26038. continue
  26039. }
  26040. mv = int8(dd.DecodeInt(8))
  26041. if v != nil {
  26042. v[mk] = mv
  26043. }
  26044. }
  26045. dd.ReadMapEnd()
  26046. return v, changed
  26047. }
  26048. func (d *Decoder) fastpathDecMapIntInt16R(f *codecFnInfo, rv reflect.Value) {
  26049. if rv.Kind() == reflect.Ptr {
  26050. vp := rv2i(rv).(*map[int]int16)
  26051. if v, changed := fastpathTV.DecMapIntInt16V(*vp, true, d); changed {
  26052. *vp = v
  26053. }
  26054. return
  26055. }
  26056. fastpathTV.DecMapIntInt16V(rv2i(rv).(map[int]int16), false, d)
  26057. }
  26058. func (f fastpathT) DecMapIntInt16X(vp *map[int]int16, d *Decoder) {
  26059. if v, changed := f.DecMapIntInt16V(*vp, true, d); changed {
  26060. *vp = v
  26061. }
  26062. }
  26063. func (_ fastpathT) DecMapIntInt16V(v map[int]int16, canChange bool,
  26064. d *Decoder) (_ map[int]int16, changed bool) {
  26065. dd, esep := d.d, d.hh.hasElemSeparators()
  26066. containerLen := dd.ReadMapStart()
  26067. if canChange && v == nil {
  26068. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  26069. v = make(map[int]int16, xlen)
  26070. changed = true
  26071. }
  26072. if containerLen == 0 {
  26073. dd.ReadMapEnd()
  26074. return v, changed
  26075. }
  26076. var mk int
  26077. var mv int16
  26078. hasLen := containerLen > 0
  26079. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26080. if esep {
  26081. dd.ReadMapElemKey()
  26082. }
  26083. mk = int(dd.DecodeInt(intBitsize))
  26084. if esep {
  26085. dd.ReadMapElemValue()
  26086. }
  26087. if dd.TryDecodeAsNil() {
  26088. if d.h.DeleteOnNilMapValue {
  26089. delete(v, mk)
  26090. } else {
  26091. v[mk] = 0
  26092. }
  26093. continue
  26094. }
  26095. mv = int16(dd.DecodeInt(16))
  26096. if v != nil {
  26097. v[mk] = mv
  26098. }
  26099. }
  26100. dd.ReadMapEnd()
  26101. return v, changed
  26102. }
  26103. func (d *Decoder) fastpathDecMapIntInt32R(f *codecFnInfo, rv reflect.Value) {
  26104. if rv.Kind() == reflect.Ptr {
  26105. vp := rv2i(rv).(*map[int]int32)
  26106. if v, changed := fastpathTV.DecMapIntInt32V(*vp, true, d); changed {
  26107. *vp = v
  26108. }
  26109. return
  26110. }
  26111. fastpathTV.DecMapIntInt32V(rv2i(rv).(map[int]int32), false, d)
  26112. }
  26113. func (f fastpathT) DecMapIntInt32X(vp *map[int]int32, d *Decoder) {
  26114. if v, changed := f.DecMapIntInt32V(*vp, true, d); changed {
  26115. *vp = v
  26116. }
  26117. }
  26118. func (_ fastpathT) DecMapIntInt32V(v map[int]int32, canChange bool,
  26119. d *Decoder) (_ map[int]int32, changed bool) {
  26120. dd, esep := d.d, d.hh.hasElemSeparators()
  26121. containerLen := dd.ReadMapStart()
  26122. if canChange && v == nil {
  26123. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  26124. v = make(map[int]int32, xlen)
  26125. changed = true
  26126. }
  26127. if containerLen == 0 {
  26128. dd.ReadMapEnd()
  26129. return v, changed
  26130. }
  26131. var mk int
  26132. var mv int32
  26133. hasLen := containerLen > 0
  26134. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26135. if esep {
  26136. dd.ReadMapElemKey()
  26137. }
  26138. mk = int(dd.DecodeInt(intBitsize))
  26139. if esep {
  26140. dd.ReadMapElemValue()
  26141. }
  26142. if dd.TryDecodeAsNil() {
  26143. if d.h.DeleteOnNilMapValue {
  26144. delete(v, mk)
  26145. } else {
  26146. v[mk] = 0
  26147. }
  26148. continue
  26149. }
  26150. mv = int32(dd.DecodeInt(32))
  26151. if v != nil {
  26152. v[mk] = mv
  26153. }
  26154. }
  26155. dd.ReadMapEnd()
  26156. return v, changed
  26157. }
  26158. func (d *Decoder) fastpathDecMapIntInt64R(f *codecFnInfo, rv reflect.Value) {
  26159. if rv.Kind() == reflect.Ptr {
  26160. vp := rv2i(rv).(*map[int]int64)
  26161. if v, changed := fastpathTV.DecMapIntInt64V(*vp, true, d); changed {
  26162. *vp = v
  26163. }
  26164. return
  26165. }
  26166. fastpathTV.DecMapIntInt64V(rv2i(rv).(map[int]int64), false, d)
  26167. }
  26168. func (f fastpathT) DecMapIntInt64X(vp *map[int]int64, d *Decoder) {
  26169. if v, changed := f.DecMapIntInt64V(*vp, true, d); changed {
  26170. *vp = v
  26171. }
  26172. }
  26173. func (_ fastpathT) DecMapIntInt64V(v map[int]int64, canChange bool,
  26174. d *Decoder) (_ map[int]int64, changed bool) {
  26175. dd, esep := d.d, d.hh.hasElemSeparators()
  26176. containerLen := dd.ReadMapStart()
  26177. if canChange && v == nil {
  26178. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  26179. v = make(map[int]int64, xlen)
  26180. changed = true
  26181. }
  26182. if containerLen == 0 {
  26183. dd.ReadMapEnd()
  26184. return v, changed
  26185. }
  26186. var mk int
  26187. var mv int64
  26188. hasLen := containerLen > 0
  26189. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26190. if esep {
  26191. dd.ReadMapElemKey()
  26192. }
  26193. mk = int(dd.DecodeInt(intBitsize))
  26194. if esep {
  26195. dd.ReadMapElemValue()
  26196. }
  26197. if dd.TryDecodeAsNil() {
  26198. if d.h.DeleteOnNilMapValue {
  26199. delete(v, mk)
  26200. } else {
  26201. v[mk] = 0
  26202. }
  26203. continue
  26204. }
  26205. mv = dd.DecodeInt(64)
  26206. if v != nil {
  26207. v[mk] = mv
  26208. }
  26209. }
  26210. dd.ReadMapEnd()
  26211. return v, changed
  26212. }
  26213. func (d *Decoder) fastpathDecMapIntFloat32R(f *codecFnInfo, rv reflect.Value) {
  26214. if rv.Kind() == reflect.Ptr {
  26215. vp := rv2i(rv).(*map[int]float32)
  26216. if v, changed := fastpathTV.DecMapIntFloat32V(*vp, true, d); changed {
  26217. *vp = v
  26218. }
  26219. return
  26220. }
  26221. fastpathTV.DecMapIntFloat32V(rv2i(rv).(map[int]float32), false, d)
  26222. }
  26223. func (f fastpathT) DecMapIntFloat32X(vp *map[int]float32, d *Decoder) {
  26224. if v, changed := f.DecMapIntFloat32V(*vp, true, d); changed {
  26225. *vp = v
  26226. }
  26227. }
  26228. func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, canChange bool,
  26229. d *Decoder) (_ map[int]float32, changed bool) {
  26230. dd, esep := d.d, d.hh.hasElemSeparators()
  26231. containerLen := dd.ReadMapStart()
  26232. if canChange && v == nil {
  26233. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  26234. v = make(map[int]float32, xlen)
  26235. changed = true
  26236. }
  26237. if containerLen == 0 {
  26238. dd.ReadMapEnd()
  26239. return v, changed
  26240. }
  26241. var mk int
  26242. var mv float32
  26243. hasLen := containerLen > 0
  26244. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26245. if esep {
  26246. dd.ReadMapElemKey()
  26247. }
  26248. mk = int(dd.DecodeInt(intBitsize))
  26249. if esep {
  26250. dd.ReadMapElemValue()
  26251. }
  26252. if dd.TryDecodeAsNil() {
  26253. if d.h.DeleteOnNilMapValue {
  26254. delete(v, mk)
  26255. } else {
  26256. v[mk] = 0
  26257. }
  26258. continue
  26259. }
  26260. mv = float32(dd.DecodeFloat(true))
  26261. if v != nil {
  26262. v[mk] = mv
  26263. }
  26264. }
  26265. dd.ReadMapEnd()
  26266. return v, changed
  26267. }
  26268. func (d *Decoder) fastpathDecMapIntFloat64R(f *codecFnInfo, rv reflect.Value) {
  26269. if rv.Kind() == reflect.Ptr {
  26270. vp := rv2i(rv).(*map[int]float64)
  26271. if v, changed := fastpathTV.DecMapIntFloat64V(*vp, true, d); changed {
  26272. *vp = v
  26273. }
  26274. return
  26275. }
  26276. fastpathTV.DecMapIntFloat64V(rv2i(rv).(map[int]float64), false, d)
  26277. }
  26278. func (f fastpathT) DecMapIntFloat64X(vp *map[int]float64, d *Decoder) {
  26279. if v, changed := f.DecMapIntFloat64V(*vp, true, d); changed {
  26280. *vp = v
  26281. }
  26282. }
  26283. func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, canChange bool,
  26284. d *Decoder) (_ map[int]float64, changed bool) {
  26285. dd, esep := d.d, d.hh.hasElemSeparators()
  26286. containerLen := dd.ReadMapStart()
  26287. if canChange && v == nil {
  26288. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  26289. v = make(map[int]float64, xlen)
  26290. changed = true
  26291. }
  26292. if containerLen == 0 {
  26293. dd.ReadMapEnd()
  26294. return v, changed
  26295. }
  26296. var mk int
  26297. var mv float64
  26298. hasLen := containerLen > 0
  26299. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26300. if esep {
  26301. dd.ReadMapElemKey()
  26302. }
  26303. mk = int(dd.DecodeInt(intBitsize))
  26304. if esep {
  26305. dd.ReadMapElemValue()
  26306. }
  26307. if dd.TryDecodeAsNil() {
  26308. if d.h.DeleteOnNilMapValue {
  26309. delete(v, mk)
  26310. } else {
  26311. v[mk] = 0
  26312. }
  26313. continue
  26314. }
  26315. mv = dd.DecodeFloat(false)
  26316. if v != nil {
  26317. v[mk] = mv
  26318. }
  26319. }
  26320. dd.ReadMapEnd()
  26321. return v, changed
  26322. }
  26323. func (d *Decoder) fastpathDecMapIntBoolR(f *codecFnInfo, rv reflect.Value) {
  26324. if rv.Kind() == reflect.Ptr {
  26325. vp := rv2i(rv).(*map[int]bool)
  26326. if v, changed := fastpathTV.DecMapIntBoolV(*vp, true, d); changed {
  26327. *vp = v
  26328. }
  26329. return
  26330. }
  26331. fastpathTV.DecMapIntBoolV(rv2i(rv).(map[int]bool), false, d)
  26332. }
  26333. func (f fastpathT) DecMapIntBoolX(vp *map[int]bool, d *Decoder) {
  26334. if v, changed := f.DecMapIntBoolV(*vp, true, d); changed {
  26335. *vp = v
  26336. }
  26337. }
  26338. func (_ fastpathT) DecMapIntBoolV(v map[int]bool, canChange bool,
  26339. d *Decoder) (_ map[int]bool, changed bool) {
  26340. dd, esep := d.d, d.hh.hasElemSeparators()
  26341. containerLen := dd.ReadMapStart()
  26342. if canChange && v == nil {
  26343. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  26344. v = make(map[int]bool, xlen)
  26345. changed = true
  26346. }
  26347. if containerLen == 0 {
  26348. dd.ReadMapEnd()
  26349. return v, changed
  26350. }
  26351. var mk int
  26352. var mv bool
  26353. hasLen := containerLen > 0
  26354. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26355. if esep {
  26356. dd.ReadMapElemKey()
  26357. }
  26358. mk = int(dd.DecodeInt(intBitsize))
  26359. if esep {
  26360. dd.ReadMapElemValue()
  26361. }
  26362. if dd.TryDecodeAsNil() {
  26363. if d.h.DeleteOnNilMapValue {
  26364. delete(v, mk)
  26365. } else {
  26366. v[mk] = false
  26367. }
  26368. continue
  26369. }
  26370. mv = dd.DecodeBool()
  26371. if v != nil {
  26372. v[mk] = mv
  26373. }
  26374. }
  26375. dd.ReadMapEnd()
  26376. return v, changed
  26377. }
  26378. func (d *Decoder) fastpathDecMapInt8IntfR(f *codecFnInfo, rv reflect.Value) {
  26379. if rv.Kind() == reflect.Ptr {
  26380. vp := rv2i(rv).(*map[int8]interface{})
  26381. if v, changed := fastpathTV.DecMapInt8IntfV(*vp, true, d); changed {
  26382. *vp = v
  26383. }
  26384. return
  26385. }
  26386. fastpathTV.DecMapInt8IntfV(rv2i(rv).(map[int8]interface{}), false, d)
  26387. }
  26388. func (f fastpathT) DecMapInt8IntfX(vp *map[int8]interface{}, d *Decoder) {
  26389. if v, changed := f.DecMapInt8IntfV(*vp, true, d); changed {
  26390. *vp = v
  26391. }
  26392. }
  26393. func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, canChange bool,
  26394. d *Decoder) (_ map[int8]interface{}, changed bool) {
  26395. dd, esep := d.d, d.hh.hasElemSeparators()
  26396. containerLen := dd.ReadMapStart()
  26397. if canChange && v == nil {
  26398. xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
  26399. v = make(map[int8]interface{}, xlen)
  26400. changed = true
  26401. }
  26402. if containerLen == 0 {
  26403. dd.ReadMapEnd()
  26404. return v, changed
  26405. }
  26406. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  26407. var mk int8
  26408. var mv interface{}
  26409. hasLen := containerLen > 0
  26410. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26411. if esep {
  26412. dd.ReadMapElemKey()
  26413. }
  26414. mk = int8(dd.DecodeInt(8))
  26415. if esep {
  26416. dd.ReadMapElemValue()
  26417. }
  26418. if dd.TryDecodeAsNil() {
  26419. if d.h.DeleteOnNilMapValue {
  26420. delete(v, mk)
  26421. } else {
  26422. v[mk] = nil
  26423. }
  26424. continue
  26425. }
  26426. if mapGet {
  26427. mv = v[mk]
  26428. } else {
  26429. mv = nil
  26430. }
  26431. d.decode(&mv)
  26432. if v != nil {
  26433. v[mk] = mv
  26434. }
  26435. }
  26436. dd.ReadMapEnd()
  26437. return v, changed
  26438. }
  26439. func (d *Decoder) fastpathDecMapInt8StringR(f *codecFnInfo, rv reflect.Value) {
  26440. if rv.Kind() == reflect.Ptr {
  26441. vp := rv2i(rv).(*map[int8]string)
  26442. if v, changed := fastpathTV.DecMapInt8StringV(*vp, true, d); changed {
  26443. *vp = v
  26444. }
  26445. return
  26446. }
  26447. fastpathTV.DecMapInt8StringV(rv2i(rv).(map[int8]string), false, d)
  26448. }
  26449. func (f fastpathT) DecMapInt8StringX(vp *map[int8]string, d *Decoder) {
  26450. if v, changed := f.DecMapInt8StringV(*vp, true, d); changed {
  26451. *vp = v
  26452. }
  26453. }
  26454. func (_ fastpathT) DecMapInt8StringV(v map[int8]string, canChange bool,
  26455. d *Decoder) (_ map[int8]string, changed bool) {
  26456. dd, esep := d.d, d.hh.hasElemSeparators()
  26457. containerLen := dd.ReadMapStart()
  26458. if canChange && v == nil {
  26459. xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
  26460. v = make(map[int8]string, xlen)
  26461. changed = true
  26462. }
  26463. if containerLen == 0 {
  26464. dd.ReadMapEnd()
  26465. return v, changed
  26466. }
  26467. var mk int8
  26468. var mv string
  26469. hasLen := containerLen > 0
  26470. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26471. if esep {
  26472. dd.ReadMapElemKey()
  26473. }
  26474. mk = int8(dd.DecodeInt(8))
  26475. if esep {
  26476. dd.ReadMapElemValue()
  26477. }
  26478. if dd.TryDecodeAsNil() {
  26479. if d.h.DeleteOnNilMapValue {
  26480. delete(v, mk)
  26481. } else {
  26482. v[mk] = ""
  26483. }
  26484. continue
  26485. }
  26486. mv = dd.DecodeString()
  26487. if v != nil {
  26488. v[mk] = mv
  26489. }
  26490. }
  26491. dd.ReadMapEnd()
  26492. return v, changed
  26493. }
  26494. func (d *Decoder) fastpathDecMapInt8UintR(f *codecFnInfo, rv reflect.Value) {
  26495. if rv.Kind() == reflect.Ptr {
  26496. vp := rv2i(rv).(*map[int8]uint)
  26497. if v, changed := fastpathTV.DecMapInt8UintV(*vp, true, d); changed {
  26498. *vp = v
  26499. }
  26500. return
  26501. }
  26502. fastpathTV.DecMapInt8UintV(rv2i(rv).(map[int8]uint), false, d)
  26503. }
  26504. func (f fastpathT) DecMapInt8UintX(vp *map[int8]uint, d *Decoder) {
  26505. if v, changed := f.DecMapInt8UintV(*vp, true, d); changed {
  26506. *vp = v
  26507. }
  26508. }
  26509. func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, canChange bool,
  26510. d *Decoder) (_ map[int8]uint, changed bool) {
  26511. dd, esep := d.d, d.hh.hasElemSeparators()
  26512. containerLen := dd.ReadMapStart()
  26513. if canChange && v == nil {
  26514. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  26515. v = make(map[int8]uint, xlen)
  26516. changed = true
  26517. }
  26518. if containerLen == 0 {
  26519. dd.ReadMapEnd()
  26520. return v, changed
  26521. }
  26522. var mk int8
  26523. var mv uint
  26524. hasLen := containerLen > 0
  26525. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26526. if esep {
  26527. dd.ReadMapElemKey()
  26528. }
  26529. mk = int8(dd.DecodeInt(8))
  26530. if esep {
  26531. dd.ReadMapElemValue()
  26532. }
  26533. if dd.TryDecodeAsNil() {
  26534. if d.h.DeleteOnNilMapValue {
  26535. delete(v, mk)
  26536. } else {
  26537. v[mk] = 0
  26538. }
  26539. continue
  26540. }
  26541. mv = uint(dd.DecodeUint(uintBitsize))
  26542. if v != nil {
  26543. v[mk] = mv
  26544. }
  26545. }
  26546. dd.ReadMapEnd()
  26547. return v, changed
  26548. }
  26549. func (d *Decoder) fastpathDecMapInt8Uint8R(f *codecFnInfo, rv reflect.Value) {
  26550. if rv.Kind() == reflect.Ptr {
  26551. vp := rv2i(rv).(*map[int8]uint8)
  26552. if v, changed := fastpathTV.DecMapInt8Uint8V(*vp, true, d); changed {
  26553. *vp = v
  26554. }
  26555. return
  26556. }
  26557. fastpathTV.DecMapInt8Uint8V(rv2i(rv).(map[int8]uint8), false, d)
  26558. }
  26559. func (f fastpathT) DecMapInt8Uint8X(vp *map[int8]uint8, d *Decoder) {
  26560. if v, changed := f.DecMapInt8Uint8V(*vp, true, d); changed {
  26561. *vp = v
  26562. }
  26563. }
  26564. func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, canChange bool,
  26565. d *Decoder) (_ map[int8]uint8, changed bool) {
  26566. dd, esep := d.d, d.hh.hasElemSeparators()
  26567. containerLen := dd.ReadMapStart()
  26568. if canChange && v == nil {
  26569. xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
  26570. v = make(map[int8]uint8, xlen)
  26571. changed = true
  26572. }
  26573. if containerLen == 0 {
  26574. dd.ReadMapEnd()
  26575. return v, changed
  26576. }
  26577. var mk int8
  26578. var mv uint8
  26579. hasLen := containerLen > 0
  26580. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26581. if esep {
  26582. dd.ReadMapElemKey()
  26583. }
  26584. mk = int8(dd.DecodeInt(8))
  26585. if esep {
  26586. dd.ReadMapElemValue()
  26587. }
  26588. if dd.TryDecodeAsNil() {
  26589. if d.h.DeleteOnNilMapValue {
  26590. delete(v, mk)
  26591. } else {
  26592. v[mk] = 0
  26593. }
  26594. continue
  26595. }
  26596. mv = uint8(dd.DecodeUint(8))
  26597. if v != nil {
  26598. v[mk] = mv
  26599. }
  26600. }
  26601. dd.ReadMapEnd()
  26602. return v, changed
  26603. }
  26604. func (d *Decoder) fastpathDecMapInt8Uint16R(f *codecFnInfo, rv reflect.Value) {
  26605. if rv.Kind() == reflect.Ptr {
  26606. vp := rv2i(rv).(*map[int8]uint16)
  26607. if v, changed := fastpathTV.DecMapInt8Uint16V(*vp, true, d); changed {
  26608. *vp = v
  26609. }
  26610. return
  26611. }
  26612. fastpathTV.DecMapInt8Uint16V(rv2i(rv).(map[int8]uint16), false, d)
  26613. }
  26614. func (f fastpathT) DecMapInt8Uint16X(vp *map[int8]uint16, d *Decoder) {
  26615. if v, changed := f.DecMapInt8Uint16V(*vp, true, d); changed {
  26616. *vp = v
  26617. }
  26618. }
  26619. func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, canChange bool,
  26620. d *Decoder) (_ map[int8]uint16, changed bool) {
  26621. dd, esep := d.d, d.hh.hasElemSeparators()
  26622. containerLen := dd.ReadMapStart()
  26623. if canChange && v == nil {
  26624. xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
  26625. v = make(map[int8]uint16, xlen)
  26626. changed = true
  26627. }
  26628. if containerLen == 0 {
  26629. dd.ReadMapEnd()
  26630. return v, changed
  26631. }
  26632. var mk int8
  26633. var mv uint16
  26634. hasLen := containerLen > 0
  26635. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26636. if esep {
  26637. dd.ReadMapElemKey()
  26638. }
  26639. mk = int8(dd.DecodeInt(8))
  26640. if esep {
  26641. dd.ReadMapElemValue()
  26642. }
  26643. if dd.TryDecodeAsNil() {
  26644. if d.h.DeleteOnNilMapValue {
  26645. delete(v, mk)
  26646. } else {
  26647. v[mk] = 0
  26648. }
  26649. continue
  26650. }
  26651. mv = uint16(dd.DecodeUint(16))
  26652. if v != nil {
  26653. v[mk] = mv
  26654. }
  26655. }
  26656. dd.ReadMapEnd()
  26657. return v, changed
  26658. }
  26659. func (d *Decoder) fastpathDecMapInt8Uint32R(f *codecFnInfo, rv reflect.Value) {
  26660. if rv.Kind() == reflect.Ptr {
  26661. vp := rv2i(rv).(*map[int8]uint32)
  26662. if v, changed := fastpathTV.DecMapInt8Uint32V(*vp, true, d); changed {
  26663. *vp = v
  26664. }
  26665. return
  26666. }
  26667. fastpathTV.DecMapInt8Uint32V(rv2i(rv).(map[int8]uint32), false, d)
  26668. }
  26669. func (f fastpathT) DecMapInt8Uint32X(vp *map[int8]uint32, d *Decoder) {
  26670. if v, changed := f.DecMapInt8Uint32V(*vp, true, d); changed {
  26671. *vp = v
  26672. }
  26673. }
  26674. func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, canChange bool,
  26675. d *Decoder) (_ map[int8]uint32, changed bool) {
  26676. dd, esep := d.d, d.hh.hasElemSeparators()
  26677. containerLen := dd.ReadMapStart()
  26678. if canChange && v == nil {
  26679. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  26680. v = make(map[int8]uint32, xlen)
  26681. changed = true
  26682. }
  26683. if containerLen == 0 {
  26684. dd.ReadMapEnd()
  26685. return v, changed
  26686. }
  26687. var mk int8
  26688. var mv uint32
  26689. hasLen := containerLen > 0
  26690. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26691. if esep {
  26692. dd.ReadMapElemKey()
  26693. }
  26694. mk = int8(dd.DecodeInt(8))
  26695. if esep {
  26696. dd.ReadMapElemValue()
  26697. }
  26698. if dd.TryDecodeAsNil() {
  26699. if d.h.DeleteOnNilMapValue {
  26700. delete(v, mk)
  26701. } else {
  26702. v[mk] = 0
  26703. }
  26704. continue
  26705. }
  26706. mv = uint32(dd.DecodeUint(32))
  26707. if v != nil {
  26708. v[mk] = mv
  26709. }
  26710. }
  26711. dd.ReadMapEnd()
  26712. return v, changed
  26713. }
  26714. func (d *Decoder) fastpathDecMapInt8Uint64R(f *codecFnInfo, rv reflect.Value) {
  26715. if rv.Kind() == reflect.Ptr {
  26716. vp := rv2i(rv).(*map[int8]uint64)
  26717. if v, changed := fastpathTV.DecMapInt8Uint64V(*vp, true, d); changed {
  26718. *vp = v
  26719. }
  26720. return
  26721. }
  26722. fastpathTV.DecMapInt8Uint64V(rv2i(rv).(map[int8]uint64), false, d)
  26723. }
  26724. func (f fastpathT) DecMapInt8Uint64X(vp *map[int8]uint64, d *Decoder) {
  26725. if v, changed := f.DecMapInt8Uint64V(*vp, true, d); changed {
  26726. *vp = v
  26727. }
  26728. }
  26729. func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, canChange bool,
  26730. d *Decoder) (_ map[int8]uint64, changed bool) {
  26731. dd, esep := d.d, d.hh.hasElemSeparators()
  26732. containerLen := dd.ReadMapStart()
  26733. if canChange && v == nil {
  26734. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  26735. v = make(map[int8]uint64, xlen)
  26736. changed = true
  26737. }
  26738. if containerLen == 0 {
  26739. dd.ReadMapEnd()
  26740. return v, changed
  26741. }
  26742. var mk int8
  26743. var mv uint64
  26744. hasLen := containerLen > 0
  26745. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26746. if esep {
  26747. dd.ReadMapElemKey()
  26748. }
  26749. mk = int8(dd.DecodeInt(8))
  26750. if esep {
  26751. dd.ReadMapElemValue()
  26752. }
  26753. if dd.TryDecodeAsNil() {
  26754. if d.h.DeleteOnNilMapValue {
  26755. delete(v, mk)
  26756. } else {
  26757. v[mk] = 0
  26758. }
  26759. continue
  26760. }
  26761. mv = dd.DecodeUint(64)
  26762. if v != nil {
  26763. v[mk] = mv
  26764. }
  26765. }
  26766. dd.ReadMapEnd()
  26767. return v, changed
  26768. }
  26769. func (d *Decoder) fastpathDecMapInt8UintptrR(f *codecFnInfo, rv reflect.Value) {
  26770. if rv.Kind() == reflect.Ptr {
  26771. vp := rv2i(rv).(*map[int8]uintptr)
  26772. if v, changed := fastpathTV.DecMapInt8UintptrV(*vp, true, d); changed {
  26773. *vp = v
  26774. }
  26775. return
  26776. }
  26777. fastpathTV.DecMapInt8UintptrV(rv2i(rv).(map[int8]uintptr), false, d)
  26778. }
  26779. func (f fastpathT) DecMapInt8UintptrX(vp *map[int8]uintptr, d *Decoder) {
  26780. if v, changed := f.DecMapInt8UintptrV(*vp, true, d); changed {
  26781. *vp = v
  26782. }
  26783. }
  26784. func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, canChange bool,
  26785. d *Decoder) (_ map[int8]uintptr, changed bool) {
  26786. dd, esep := d.d, d.hh.hasElemSeparators()
  26787. containerLen := dd.ReadMapStart()
  26788. if canChange && v == nil {
  26789. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  26790. v = make(map[int8]uintptr, xlen)
  26791. changed = true
  26792. }
  26793. if containerLen == 0 {
  26794. dd.ReadMapEnd()
  26795. return v, changed
  26796. }
  26797. var mk int8
  26798. var mv uintptr
  26799. hasLen := containerLen > 0
  26800. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26801. if esep {
  26802. dd.ReadMapElemKey()
  26803. }
  26804. mk = int8(dd.DecodeInt(8))
  26805. if esep {
  26806. dd.ReadMapElemValue()
  26807. }
  26808. if dd.TryDecodeAsNil() {
  26809. if d.h.DeleteOnNilMapValue {
  26810. delete(v, mk)
  26811. } else {
  26812. v[mk] = 0
  26813. }
  26814. continue
  26815. }
  26816. mv = uintptr(dd.DecodeUint(uintBitsize))
  26817. if v != nil {
  26818. v[mk] = mv
  26819. }
  26820. }
  26821. dd.ReadMapEnd()
  26822. return v, changed
  26823. }
  26824. func (d *Decoder) fastpathDecMapInt8IntR(f *codecFnInfo, rv reflect.Value) {
  26825. if rv.Kind() == reflect.Ptr {
  26826. vp := rv2i(rv).(*map[int8]int)
  26827. if v, changed := fastpathTV.DecMapInt8IntV(*vp, true, d); changed {
  26828. *vp = v
  26829. }
  26830. return
  26831. }
  26832. fastpathTV.DecMapInt8IntV(rv2i(rv).(map[int8]int), false, d)
  26833. }
  26834. func (f fastpathT) DecMapInt8IntX(vp *map[int8]int, d *Decoder) {
  26835. if v, changed := f.DecMapInt8IntV(*vp, true, d); changed {
  26836. *vp = v
  26837. }
  26838. }
  26839. func (_ fastpathT) DecMapInt8IntV(v map[int8]int, canChange bool,
  26840. d *Decoder) (_ map[int8]int, changed bool) {
  26841. dd, esep := d.d, d.hh.hasElemSeparators()
  26842. containerLen := dd.ReadMapStart()
  26843. if canChange && v == nil {
  26844. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  26845. v = make(map[int8]int, xlen)
  26846. changed = true
  26847. }
  26848. if containerLen == 0 {
  26849. dd.ReadMapEnd()
  26850. return v, changed
  26851. }
  26852. var mk int8
  26853. var mv int
  26854. hasLen := containerLen > 0
  26855. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26856. if esep {
  26857. dd.ReadMapElemKey()
  26858. }
  26859. mk = int8(dd.DecodeInt(8))
  26860. if esep {
  26861. dd.ReadMapElemValue()
  26862. }
  26863. if dd.TryDecodeAsNil() {
  26864. if d.h.DeleteOnNilMapValue {
  26865. delete(v, mk)
  26866. } else {
  26867. v[mk] = 0
  26868. }
  26869. continue
  26870. }
  26871. mv = int(dd.DecodeInt(intBitsize))
  26872. if v != nil {
  26873. v[mk] = mv
  26874. }
  26875. }
  26876. dd.ReadMapEnd()
  26877. return v, changed
  26878. }
  26879. func (d *Decoder) fastpathDecMapInt8Int8R(f *codecFnInfo, rv reflect.Value) {
  26880. if rv.Kind() == reflect.Ptr {
  26881. vp := rv2i(rv).(*map[int8]int8)
  26882. if v, changed := fastpathTV.DecMapInt8Int8V(*vp, true, d); changed {
  26883. *vp = v
  26884. }
  26885. return
  26886. }
  26887. fastpathTV.DecMapInt8Int8V(rv2i(rv).(map[int8]int8), false, d)
  26888. }
  26889. func (f fastpathT) DecMapInt8Int8X(vp *map[int8]int8, d *Decoder) {
  26890. if v, changed := f.DecMapInt8Int8V(*vp, true, d); changed {
  26891. *vp = v
  26892. }
  26893. }
  26894. func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, canChange bool,
  26895. d *Decoder) (_ map[int8]int8, changed bool) {
  26896. dd, esep := d.d, d.hh.hasElemSeparators()
  26897. containerLen := dd.ReadMapStart()
  26898. if canChange && v == nil {
  26899. xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
  26900. v = make(map[int8]int8, xlen)
  26901. changed = true
  26902. }
  26903. if containerLen == 0 {
  26904. dd.ReadMapEnd()
  26905. return v, changed
  26906. }
  26907. var mk int8
  26908. var mv int8
  26909. hasLen := containerLen > 0
  26910. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26911. if esep {
  26912. dd.ReadMapElemKey()
  26913. }
  26914. mk = int8(dd.DecodeInt(8))
  26915. if esep {
  26916. dd.ReadMapElemValue()
  26917. }
  26918. if dd.TryDecodeAsNil() {
  26919. if d.h.DeleteOnNilMapValue {
  26920. delete(v, mk)
  26921. } else {
  26922. v[mk] = 0
  26923. }
  26924. continue
  26925. }
  26926. mv = int8(dd.DecodeInt(8))
  26927. if v != nil {
  26928. v[mk] = mv
  26929. }
  26930. }
  26931. dd.ReadMapEnd()
  26932. return v, changed
  26933. }
  26934. func (d *Decoder) fastpathDecMapInt8Int16R(f *codecFnInfo, rv reflect.Value) {
  26935. if rv.Kind() == reflect.Ptr {
  26936. vp := rv2i(rv).(*map[int8]int16)
  26937. if v, changed := fastpathTV.DecMapInt8Int16V(*vp, true, d); changed {
  26938. *vp = v
  26939. }
  26940. return
  26941. }
  26942. fastpathTV.DecMapInt8Int16V(rv2i(rv).(map[int8]int16), false, d)
  26943. }
  26944. func (f fastpathT) DecMapInt8Int16X(vp *map[int8]int16, d *Decoder) {
  26945. if v, changed := f.DecMapInt8Int16V(*vp, true, d); changed {
  26946. *vp = v
  26947. }
  26948. }
  26949. func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, canChange bool,
  26950. d *Decoder) (_ map[int8]int16, changed bool) {
  26951. dd, esep := d.d, d.hh.hasElemSeparators()
  26952. containerLen := dd.ReadMapStart()
  26953. if canChange && v == nil {
  26954. xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
  26955. v = make(map[int8]int16, xlen)
  26956. changed = true
  26957. }
  26958. if containerLen == 0 {
  26959. dd.ReadMapEnd()
  26960. return v, changed
  26961. }
  26962. var mk int8
  26963. var mv int16
  26964. hasLen := containerLen > 0
  26965. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  26966. if esep {
  26967. dd.ReadMapElemKey()
  26968. }
  26969. mk = int8(dd.DecodeInt(8))
  26970. if esep {
  26971. dd.ReadMapElemValue()
  26972. }
  26973. if dd.TryDecodeAsNil() {
  26974. if d.h.DeleteOnNilMapValue {
  26975. delete(v, mk)
  26976. } else {
  26977. v[mk] = 0
  26978. }
  26979. continue
  26980. }
  26981. mv = int16(dd.DecodeInt(16))
  26982. if v != nil {
  26983. v[mk] = mv
  26984. }
  26985. }
  26986. dd.ReadMapEnd()
  26987. return v, changed
  26988. }
  26989. func (d *Decoder) fastpathDecMapInt8Int32R(f *codecFnInfo, rv reflect.Value) {
  26990. if rv.Kind() == reflect.Ptr {
  26991. vp := rv2i(rv).(*map[int8]int32)
  26992. if v, changed := fastpathTV.DecMapInt8Int32V(*vp, true, d); changed {
  26993. *vp = v
  26994. }
  26995. return
  26996. }
  26997. fastpathTV.DecMapInt8Int32V(rv2i(rv).(map[int8]int32), false, d)
  26998. }
  26999. func (f fastpathT) DecMapInt8Int32X(vp *map[int8]int32, d *Decoder) {
  27000. if v, changed := f.DecMapInt8Int32V(*vp, true, d); changed {
  27001. *vp = v
  27002. }
  27003. }
  27004. func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, canChange bool,
  27005. d *Decoder) (_ map[int8]int32, changed bool) {
  27006. dd, esep := d.d, d.hh.hasElemSeparators()
  27007. containerLen := dd.ReadMapStart()
  27008. if canChange && v == nil {
  27009. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  27010. v = make(map[int8]int32, xlen)
  27011. changed = true
  27012. }
  27013. if containerLen == 0 {
  27014. dd.ReadMapEnd()
  27015. return v, changed
  27016. }
  27017. var mk int8
  27018. var mv int32
  27019. hasLen := containerLen > 0
  27020. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27021. if esep {
  27022. dd.ReadMapElemKey()
  27023. }
  27024. mk = int8(dd.DecodeInt(8))
  27025. if esep {
  27026. dd.ReadMapElemValue()
  27027. }
  27028. if dd.TryDecodeAsNil() {
  27029. if d.h.DeleteOnNilMapValue {
  27030. delete(v, mk)
  27031. } else {
  27032. v[mk] = 0
  27033. }
  27034. continue
  27035. }
  27036. mv = int32(dd.DecodeInt(32))
  27037. if v != nil {
  27038. v[mk] = mv
  27039. }
  27040. }
  27041. dd.ReadMapEnd()
  27042. return v, changed
  27043. }
  27044. func (d *Decoder) fastpathDecMapInt8Int64R(f *codecFnInfo, rv reflect.Value) {
  27045. if rv.Kind() == reflect.Ptr {
  27046. vp := rv2i(rv).(*map[int8]int64)
  27047. if v, changed := fastpathTV.DecMapInt8Int64V(*vp, true, d); changed {
  27048. *vp = v
  27049. }
  27050. return
  27051. }
  27052. fastpathTV.DecMapInt8Int64V(rv2i(rv).(map[int8]int64), false, d)
  27053. }
  27054. func (f fastpathT) DecMapInt8Int64X(vp *map[int8]int64, d *Decoder) {
  27055. if v, changed := f.DecMapInt8Int64V(*vp, true, d); changed {
  27056. *vp = v
  27057. }
  27058. }
  27059. func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, canChange bool,
  27060. d *Decoder) (_ map[int8]int64, changed bool) {
  27061. dd, esep := d.d, d.hh.hasElemSeparators()
  27062. containerLen := dd.ReadMapStart()
  27063. if canChange && v == nil {
  27064. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  27065. v = make(map[int8]int64, xlen)
  27066. changed = true
  27067. }
  27068. if containerLen == 0 {
  27069. dd.ReadMapEnd()
  27070. return v, changed
  27071. }
  27072. var mk int8
  27073. var mv int64
  27074. hasLen := containerLen > 0
  27075. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27076. if esep {
  27077. dd.ReadMapElemKey()
  27078. }
  27079. mk = int8(dd.DecodeInt(8))
  27080. if esep {
  27081. dd.ReadMapElemValue()
  27082. }
  27083. if dd.TryDecodeAsNil() {
  27084. if d.h.DeleteOnNilMapValue {
  27085. delete(v, mk)
  27086. } else {
  27087. v[mk] = 0
  27088. }
  27089. continue
  27090. }
  27091. mv = dd.DecodeInt(64)
  27092. if v != nil {
  27093. v[mk] = mv
  27094. }
  27095. }
  27096. dd.ReadMapEnd()
  27097. return v, changed
  27098. }
  27099. func (d *Decoder) fastpathDecMapInt8Float32R(f *codecFnInfo, rv reflect.Value) {
  27100. if rv.Kind() == reflect.Ptr {
  27101. vp := rv2i(rv).(*map[int8]float32)
  27102. if v, changed := fastpathTV.DecMapInt8Float32V(*vp, true, d); changed {
  27103. *vp = v
  27104. }
  27105. return
  27106. }
  27107. fastpathTV.DecMapInt8Float32V(rv2i(rv).(map[int8]float32), false, d)
  27108. }
  27109. func (f fastpathT) DecMapInt8Float32X(vp *map[int8]float32, d *Decoder) {
  27110. if v, changed := f.DecMapInt8Float32V(*vp, true, d); changed {
  27111. *vp = v
  27112. }
  27113. }
  27114. func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, canChange bool,
  27115. d *Decoder) (_ map[int8]float32, changed bool) {
  27116. dd, esep := d.d, d.hh.hasElemSeparators()
  27117. containerLen := dd.ReadMapStart()
  27118. if canChange && v == nil {
  27119. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  27120. v = make(map[int8]float32, xlen)
  27121. changed = true
  27122. }
  27123. if containerLen == 0 {
  27124. dd.ReadMapEnd()
  27125. return v, changed
  27126. }
  27127. var mk int8
  27128. var mv float32
  27129. hasLen := containerLen > 0
  27130. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27131. if esep {
  27132. dd.ReadMapElemKey()
  27133. }
  27134. mk = int8(dd.DecodeInt(8))
  27135. if esep {
  27136. dd.ReadMapElemValue()
  27137. }
  27138. if dd.TryDecodeAsNil() {
  27139. if d.h.DeleteOnNilMapValue {
  27140. delete(v, mk)
  27141. } else {
  27142. v[mk] = 0
  27143. }
  27144. continue
  27145. }
  27146. mv = float32(dd.DecodeFloat(true))
  27147. if v != nil {
  27148. v[mk] = mv
  27149. }
  27150. }
  27151. dd.ReadMapEnd()
  27152. return v, changed
  27153. }
  27154. func (d *Decoder) fastpathDecMapInt8Float64R(f *codecFnInfo, rv reflect.Value) {
  27155. if rv.Kind() == reflect.Ptr {
  27156. vp := rv2i(rv).(*map[int8]float64)
  27157. if v, changed := fastpathTV.DecMapInt8Float64V(*vp, true, d); changed {
  27158. *vp = v
  27159. }
  27160. return
  27161. }
  27162. fastpathTV.DecMapInt8Float64V(rv2i(rv).(map[int8]float64), false, d)
  27163. }
  27164. func (f fastpathT) DecMapInt8Float64X(vp *map[int8]float64, d *Decoder) {
  27165. if v, changed := f.DecMapInt8Float64V(*vp, true, d); changed {
  27166. *vp = v
  27167. }
  27168. }
  27169. func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, canChange bool,
  27170. d *Decoder) (_ map[int8]float64, changed bool) {
  27171. dd, esep := d.d, d.hh.hasElemSeparators()
  27172. containerLen := dd.ReadMapStart()
  27173. if canChange && v == nil {
  27174. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  27175. v = make(map[int8]float64, xlen)
  27176. changed = true
  27177. }
  27178. if containerLen == 0 {
  27179. dd.ReadMapEnd()
  27180. return v, changed
  27181. }
  27182. var mk int8
  27183. var mv float64
  27184. hasLen := containerLen > 0
  27185. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27186. if esep {
  27187. dd.ReadMapElemKey()
  27188. }
  27189. mk = int8(dd.DecodeInt(8))
  27190. if esep {
  27191. dd.ReadMapElemValue()
  27192. }
  27193. if dd.TryDecodeAsNil() {
  27194. if d.h.DeleteOnNilMapValue {
  27195. delete(v, mk)
  27196. } else {
  27197. v[mk] = 0
  27198. }
  27199. continue
  27200. }
  27201. mv = dd.DecodeFloat(false)
  27202. if v != nil {
  27203. v[mk] = mv
  27204. }
  27205. }
  27206. dd.ReadMapEnd()
  27207. return v, changed
  27208. }
  27209. func (d *Decoder) fastpathDecMapInt8BoolR(f *codecFnInfo, rv reflect.Value) {
  27210. if rv.Kind() == reflect.Ptr {
  27211. vp := rv2i(rv).(*map[int8]bool)
  27212. if v, changed := fastpathTV.DecMapInt8BoolV(*vp, true, d); changed {
  27213. *vp = v
  27214. }
  27215. return
  27216. }
  27217. fastpathTV.DecMapInt8BoolV(rv2i(rv).(map[int8]bool), false, d)
  27218. }
  27219. func (f fastpathT) DecMapInt8BoolX(vp *map[int8]bool, d *Decoder) {
  27220. if v, changed := f.DecMapInt8BoolV(*vp, true, d); changed {
  27221. *vp = v
  27222. }
  27223. }
  27224. func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, canChange bool,
  27225. d *Decoder) (_ map[int8]bool, changed bool) {
  27226. dd, esep := d.d, d.hh.hasElemSeparators()
  27227. containerLen := dd.ReadMapStart()
  27228. if canChange && v == nil {
  27229. xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
  27230. v = make(map[int8]bool, xlen)
  27231. changed = true
  27232. }
  27233. if containerLen == 0 {
  27234. dd.ReadMapEnd()
  27235. return v, changed
  27236. }
  27237. var mk int8
  27238. var mv bool
  27239. hasLen := containerLen > 0
  27240. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27241. if esep {
  27242. dd.ReadMapElemKey()
  27243. }
  27244. mk = int8(dd.DecodeInt(8))
  27245. if esep {
  27246. dd.ReadMapElemValue()
  27247. }
  27248. if dd.TryDecodeAsNil() {
  27249. if d.h.DeleteOnNilMapValue {
  27250. delete(v, mk)
  27251. } else {
  27252. v[mk] = false
  27253. }
  27254. continue
  27255. }
  27256. mv = dd.DecodeBool()
  27257. if v != nil {
  27258. v[mk] = mv
  27259. }
  27260. }
  27261. dd.ReadMapEnd()
  27262. return v, changed
  27263. }
  27264. func (d *Decoder) fastpathDecMapInt16IntfR(f *codecFnInfo, rv reflect.Value) {
  27265. if rv.Kind() == reflect.Ptr {
  27266. vp := rv2i(rv).(*map[int16]interface{})
  27267. if v, changed := fastpathTV.DecMapInt16IntfV(*vp, true, d); changed {
  27268. *vp = v
  27269. }
  27270. return
  27271. }
  27272. fastpathTV.DecMapInt16IntfV(rv2i(rv).(map[int16]interface{}), false, d)
  27273. }
  27274. func (f fastpathT) DecMapInt16IntfX(vp *map[int16]interface{}, d *Decoder) {
  27275. if v, changed := f.DecMapInt16IntfV(*vp, true, d); changed {
  27276. *vp = v
  27277. }
  27278. }
  27279. func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, canChange bool,
  27280. d *Decoder) (_ map[int16]interface{}, changed bool) {
  27281. dd, esep := d.d, d.hh.hasElemSeparators()
  27282. containerLen := dd.ReadMapStart()
  27283. if canChange && v == nil {
  27284. xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
  27285. v = make(map[int16]interface{}, xlen)
  27286. changed = true
  27287. }
  27288. if containerLen == 0 {
  27289. dd.ReadMapEnd()
  27290. return v, changed
  27291. }
  27292. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  27293. var mk int16
  27294. var mv interface{}
  27295. hasLen := containerLen > 0
  27296. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27297. if esep {
  27298. dd.ReadMapElemKey()
  27299. }
  27300. mk = int16(dd.DecodeInt(16))
  27301. if esep {
  27302. dd.ReadMapElemValue()
  27303. }
  27304. if dd.TryDecodeAsNil() {
  27305. if d.h.DeleteOnNilMapValue {
  27306. delete(v, mk)
  27307. } else {
  27308. v[mk] = nil
  27309. }
  27310. continue
  27311. }
  27312. if mapGet {
  27313. mv = v[mk]
  27314. } else {
  27315. mv = nil
  27316. }
  27317. d.decode(&mv)
  27318. if v != nil {
  27319. v[mk] = mv
  27320. }
  27321. }
  27322. dd.ReadMapEnd()
  27323. return v, changed
  27324. }
  27325. func (d *Decoder) fastpathDecMapInt16StringR(f *codecFnInfo, rv reflect.Value) {
  27326. if rv.Kind() == reflect.Ptr {
  27327. vp := rv2i(rv).(*map[int16]string)
  27328. if v, changed := fastpathTV.DecMapInt16StringV(*vp, true, d); changed {
  27329. *vp = v
  27330. }
  27331. return
  27332. }
  27333. fastpathTV.DecMapInt16StringV(rv2i(rv).(map[int16]string), false, d)
  27334. }
  27335. func (f fastpathT) DecMapInt16StringX(vp *map[int16]string, d *Decoder) {
  27336. if v, changed := f.DecMapInt16StringV(*vp, true, d); changed {
  27337. *vp = v
  27338. }
  27339. }
  27340. func (_ fastpathT) DecMapInt16StringV(v map[int16]string, canChange bool,
  27341. d *Decoder) (_ map[int16]string, changed bool) {
  27342. dd, esep := d.d, d.hh.hasElemSeparators()
  27343. containerLen := dd.ReadMapStart()
  27344. if canChange && v == nil {
  27345. xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
  27346. v = make(map[int16]string, xlen)
  27347. changed = true
  27348. }
  27349. if containerLen == 0 {
  27350. dd.ReadMapEnd()
  27351. return v, changed
  27352. }
  27353. var mk int16
  27354. var mv string
  27355. hasLen := containerLen > 0
  27356. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27357. if esep {
  27358. dd.ReadMapElemKey()
  27359. }
  27360. mk = int16(dd.DecodeInt(16))
  27361. if esep {
  27362. dd.ReadMapElemValue()
  27363. }
  27364. if dd.TryDecodeAsNil() {
  27365. if d.h.DeleteOnNilMapValue {
  27366. delete(v, mk)
  27367. } else {
  27368. v[mk] = ""
  27369. }
  27370. continue
  27371. }
  27372. mv = dd.DecodeString()
  27373. if v != nil {
  27374. v[mk] = mv
  27375. }
  27376. }
  27377. dd.ReadMapEnd()
  27378. return v, changed
  27379. }
  27380. func (d *Decoder) fastpathDecMapInt16UintR(f *codecFnInfo, rv reflect.Value) {
  27381. if rv.Kind() == reflect.Ptr {
  27382. vp := rv2i(rv).(*map[int16]uint)
  27383. if v, changed := fastpathTV.DecMapInt16UintV(*vp, true, d); changed {
  27384. *vp = v
  27385. }
  27386. return
  27387. }
  27388. fastpathTV.DecMapInt16UintV(rv2i(rv).(map[int16]uint), false, d)
  27389. }
  27390. func (f fastpathT) DecMapInt16UintX(vp *map[int16]uint, d *Decoder) {
  27391. if v, changed := f.DecMapInt16UintV(*vp, true, d); changed {
  27392. *vp = v
  27393. }
  27394. }
  27395. func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, canChange bool,
  27396. d *Decoder) (_ map[int16]uint, changed bool) {
  27397. dd, esep := d.d, d.hh.hasElemSeparators()
  27398. containerLen := dd.ReadMapStart()
  27399. if canChange && v == nil {
  27400. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  27401. v = make(map[int16]uint, xlen)
  27402. changed = true
  27403. }
  27404. if containerLen == 0 {
  27405. dd.ReadMapEnd()
  27406. return v, changed
  27407. }
  27408. var mk int16
  27409. var mv uint
  27410. hasLen := containerLen > 0
  27411. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27412. if esep {
  27413. dd.ReadMapElemKey()
  27414. }
  27415. mk = int16(dd.DecodeInt(16))
  27416. if esep {
  27417. dd.ReadMapElemValue()
  27418. }
  27419. if dd.TryDecodeAsNil() {
  27420. if d.h.DeleteOnNilMapValue {
  27421. delete(v, mk)
  27422. } else {
  27423. v[mk] = 0
  27424. }
  27425. continue
  27426. }
  27427. mv = uint(dd.DecodeUint(uintBitsize))
  27428. if v != nil {
  27429. v[mk] = mv
  27430. }
  27431. }
  27432. dd.ReadMapEnd()
  27433. return v, changed
  27434. }
  27435. func (d *Decoder) fastpathDecMapInt16Uint8R(f *codecFnInfo, rv reflect.Value) {
  27436. if rv.Kind() == reflect.Ptr {
  27437. vp := rv2i(rv).(*map[int16]uint8)
  27438. if v, changed := fastpathTV.DecMapInt16Uint8V(*vp, true, d); changed {
  27439. *vp = v
  27440. }
  27441. return
  27442. }
  27443. fastpathTV.DecMapInt16Uint8V(rv2i(rv).(map[int16]uint8), false, d)
  27444. }
  27445. func (f fastpathT) DecMapInt16Uint8X(vp *map[int16]uint8, d *Decoder) {
  27446. if v, changed := f.DecMapInt16Uint8V(*vp, true, d); changed {
  27447. *vp = v
  27448. }
  27449. }
  27450. func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, canChange bool,
  27451. d *Decoder) (_ map[int16]uint8, changed bool) {
  27452. dd, esep := d.d, d.hh.hasElemSeparators()
  27453. containerLen := dd.ReadMapStart()
  27454. if canChange && v == nil {
  27455. xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
  27456. v = make(map[int16]uint8, xlen)
  27457. changed = true
  27458. }
  27459. if containerLen == 0 {
  27460. dd.ReadMapEnd()
  27461. return v, changed
  27462. }
  27463. var mk int16
  27464. var mv uint8
  27465. hasLen := containerLen > 0
  27466. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27467. if esep {
  27468. dd.ReadMapElemKey()
  27469. }
  27470. mk = int16(dd.DecodeInt(16))
  27471. if esep {
  27472. dd.ReadMapElemValue()
  27473. }
  27474. if dd.TryDecodeAsNil() {
  27475. if d.h.DeleteOnNilMapValue {
  27476. delete(v, mk)
  27477. } else {
  27478. v[mk] = 0
  27479. }
  27480. continue
  27481. }
  27482. mv = uint8(dd.DecodeUint(8))
  27483. if v != nil {
  27484. v[mk] = mv
  27485. }
  27486. }
  27487. dd.ReadMapEnd()
  27488. return v, changed
  27489. }
  27490. func (d *Decoder) fastpathDecMapInt16Uint16R(f *codecFnInfo, rv reflect.Value) {
  27491. if rv.Kind() == reflect.Ptr {
  27492. vp := rv2i(rv).(*map[int16]uint16)
  27493. if v, changed := fastpathTV.DecMapInt16Uint16V(*vp, true, d); changed {
  27494. *vp = v
  27495. }
  27496. return
  27497. }
  27498. fastpathTV.DecMapInt16Uint16V(rv2i(rv).(map[int16]uint16), false, d)
  27499. }
  27500. func (f fastpathT) DecMapInt16Uint16X(vp *map[int16]uint16, d *Decoder) {
  27501. if v, changed := f.DecMapInt16Uint16V(*vp, true, d); changed {
  27502. *vp = v
  27503. }
  27504. }
  27505. func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, canChange bool,
  27506. d *Decoder) (_ map[int16]uint16, changed bool) {
  27507. dd, esep := d.d, d.hh.hasElemSeparators()
  27508. containerLen := dd.ReadMapStart()
  27509. if canChange && v == nil {
  27510. xlen := decInferLen(containerLen, d.h.MaxInitLen, 4)
  27511. v = make(map[int16]uint16, xlen)
  27512. changed = true
  27513. }
  27514. if containerLen == 0 {
  27515. dd.ReadMapEnd()
  27516. return v, changed
  27517. }
  27518. var mk int16
  27519. var mv uint16
  27520. hasLen := containerLen > 0
  27521. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27522. if esep {
  27523. dd.ReadMapElemKey()
  27524. }
  27525. mk = int16(dd.DecodeInt(16))
  27526. if esep {
  27527. dd.ReadMapElemValue()
  27528. }
  27529. if dd.TryDecodeAsNil() {
  27530. if d.h.DeleteOnNilMapValue {
  27531. delete(v, mk)
  27532. } else {
  27533. v[mk] = 0
  27534. }
  27535. continue
  27536. }
  27537. mv = uint16(dd.DecodeUint(16))
  27538. if v != nil {
  27539. v[mk] = mv
  27540. }
  27541. }
  27542. dd.ReadMapEnd()
  27543. return v, changed
  27544. }
  27545. func (d *Decoder) fastpathDecMapInt16Uint32R(f *codecFnInfo, rv reflect.Value) {
  27546. if rv.Kind() == reflect.Ptr {
  27547. vp := rv2i(rv).(*map[int16]uint32)
  27548. if v, changed := fastpathTV.DecMapInt16Uint32V(*vp, true, d); changed {
  27549. *vp = v
  27550. }
  27551. return
  27552. }
  27553. fastpathTV.DecMapInt16Uint32V(rv2i(rv).(map[int16]uint32), false, d)
  27554. }
  27555. func (f fastpathT) DecMapInt16Uint32X(vp *map[int16]uint32, d *Decoder) {
  27556. if v, changed := f.DecMapInt16Uint32V(*vp, true, d); changed {
  27557. *vp = v
  27558. }
  27559. }
  27560. func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, canChange bool,
  27561. d *Decoder) (_ map[int16]uint32, changed bool) {
  27562. dd, esep := d.d, d.hh.hasElemSeparators()
  27563. containerLen := dd.ReadMapStart()
  27564. if canChange && v == nil {
  27565. xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
  27566. v = make(map[int16]uint32, xlen)
  27567. changed = true
  27568. }
  27569. if containerLen == 0 {
  27570. dd.ReadMapEnd()
  27571. return v, changed
  27572. }
  27573. var mk int16
  27574. var mv uint32
  27575. hasLen := containerLen > 0
  27576. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27577. if esep {
  27578. dd.ReadMapElemKey()
  27579. }
  27580. mk = int16(dd.DecodeInt(16))
  27581. if esep {
  27582. dd.ReadMapElemValue()
  27583. }
  27584. if dd.TryDecodeAsNil() {
  27585. if d.h.DeleteOnNilMapValue {
  27586. delete(v, mk)
  27587. } else {
  27588. v[mk] = 0
  27589. }
  27590. continue
  27591. }
  27592. mv = uint32(dd.DecodeUint(32))
  27593. if v != nil {
  27594. v[mk] = mv
  27595. }
  27596. }
  27597. dd.ReadMapEnd()
  27598. return v, changed
  27599. }
  27600. func (d *Decoder) fastpathDecMapInt16Uint64R(f *codecFnInfo, rv reflect.Value) {
  27601. if rv.Kind() == reflect.Ptr {
  27602. vp := rv2i(rv).(*map[int16]uint64)
  27603. if v, changed := fastpathTV.DecMapInt16Uint64V(*vp, true, d); changed {
  27604. *vp = v
  27605. }
  27606. return
  27607. }
  27608. fastpathTV.DecMapInt16Uint64V(rv2i(rv).(map[int16]uint64), false, d)
  27609. }
  27610. func (f fastpathT) DecMapInt16Uint64X(vp *map[int16]uint64, d *Decoder) {
  27611. if v, changed := f.DecMapInt16Uint64V(*vp, true, d); changed {
  27612. *vp = v
  27613. }
  27614. }
  27615. func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, canChange bool,
  27616. d *Decoder) (_ map[int16]uint64, changed bool) {
  27617. dd, esep := d.d, d.hh.hasElemSeparators()
  27618. containerLen := dd.ReadMapStart()
  27619. if canChange && v == nil {
  27620. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  27621. v = make(map[int16]uint64, xlen)
  27622. changed = true
  27623. }
  27624. if containerLen == 0 {
  27625. dd.ReadMapEnd()
  27626. return v, changed
  27627. }
  27628. var mk int16
  27629. var mv uint64
  27630. hasLen := containerLen > 0
  27631. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27632. if esep {
  27633. dd.ReadMapElemKey()
  27634. }
  27635. mk = int16(dd.DecodeInt(16))
  27636. if esep {
  27637. dd.ReadMapElemValue()
  27638. }
  27639. if dd.TryDecodeAsNil() {
  27640. if d.h.DeleteOnNilMapValue {
  27641. delete(v, mk)
  27642. } else {
  27643. v[mk] = 0
  27644. }
  27645. continue
  27646. }
  27647. mv = dd.DecodeUint(64)
  27648. if v != nil {
  27649. v[mk] = mv
  27650. }
  27651. }
  27652. dd.ReadMapEnd()
  27653. return v, changed
  27654. }
  27655. func (d *Decoder) fastpathDecMapInt16UintptrR(f *codecFnInfo, rv reflect.Value) {
  27656. if rv.Kind() == reflect.Ptr {
  27657. vp := rv2i(rv).(*map[int16]uintptr)
  27658. if v, changed := fastpathTV.DecMapInt16UintptrV(*vp, true, d); changed {
  27659. *vp = v
  27660. }
  27661. return
  27662. }
  27663. fastpathTV.DecMapInt16UintptrV(rv2i(rv).(map[int16]uintptr), false, d)
  27664. }
  27665. func (f fastpathT) DecMapInt16UintptrX(vp *map[int16]uintptr, d *Decoder) {
  27666. if v, changed := f.DecMapInt16UintptrV(*vp, true, d); changed {
  27667. *vp = v
  27668. }
  27669. }
  27670. func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, canChange bool,
  27671. d *Decoder) (_ map[int16]uintptr, changed bool) {
  27672. dd, esep := d.d, d.hh.hasElemSeparators()
  27673. containerLen := dd.ReadMapStart()
  27674. if canChange && v == nil {
  27675. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  27676. v = make(map[int16]uintptr, xlen)
  27677. changed = true
  27678. }
  27679. if containerLen == 0 {
  27680. dd.ReadMapEnd()
  27681. return v, changed
  27682. }
  27683. var mk int16
  27684. var mv uintptr
  27685. hasLen := containerLen > 0
  27686. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27687. if esep {
  27688. dd.ReadMapElemKey()
  27689. }
  27690. mk = int16(dd.DecodeInt(16))
  27691. if esep {
  27692. dd.ReadMapElemValue()
  27693. }
  27694. if dd.TryDecodeAsNil() {
  27695. if d.h.DeleteOnNilMapValue {
  27696. delete(v, mk)
  27697. } else {
  27698. v[mk] = 0
  27699. }
  27700. continue
  27701. }
  27702. mv = uintptr(dd.DecodeUint(uintBitsize))
  27703. if v != nil {
  27704. v[mk] = mv
  27705. }
  27706. }
  27707. dd.ReadMapEnd()
  27708. return v, changed
  27709. }
  27710. func (d *Decoder) fastpathDecMapInt16IntR(f *codecFnInfo, rv reflect.Value) {
  27711. if rv.Kind() == reflect.Ptr {
  27712. vp := rv2i(rv).(*map[int16]int)
  27713. if v, changed := fastpathTV.DecMapInt16IntV(*vp, true, d); changed {
  27714. *vp = v
  27715. }
  27716. return
  27717. }
  27718. fastpathTV.DecMapInt16IntV(rv2i(rv).(map[int16]int), false, d)
  27719. }
  27720. func (f fastpathT) DecMapInt16IntX(vp *map[int16]int, d *Decoder) {
  27721. if v, changed := f.DecMapInt16IntV(*vp, true, d); changed {
  27722. *vp = v
  27723. }
  27724. }
  27725. func (_ fastpathT) DecMapInt16IntV(v map[int16]int, canChange bool,
  27726. d *Decoder) (_ map[int16]int, changed bool) {
  27727. dd, esep := d.d, d.hh.hasElemSeparators()
  27728. containerLen := dd.ReadMapStart()
  27729. if canChange && v == nil {
  27730. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  27731. v = make(map[int16]int, xlen)
  27732. changed = true
  27733. }
  27734. if containerLen == 0 {
  27735. dd.ReadMapEnd()
  27736. return v, changed
  27737. }
  27738. var mk int16
  27739. var mv int
  27740. hasLen := containerLen > 0
  27741. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27742. if esep {
  27743. dd.ReadMapElemKey()
  27744. }
  27745. mk = int16(dd.DecodeInt(16))
  27746. if esep {
  27747. dd.ReadMapElemValue()
  27748. }
  27749. if dd.TryDecodeAsNil() {
  27750. if d.h.DeleteOnNilMapValue {
  27751. delete(v, mk)
  27752. } else {
  27753. v[mk] = 0
  27754. }
  27755. continue
  27756. }
  27757. mv = int(dd.DecodeInt(intBitsize))
  27758. if v != nil {
  27759. v[mk] = mv
  27760. }
  27761. }
  27762. dd.ReadMapEnd()
  27763. return v, changed
  27764. }
  27765. func (d *Decoder) fastpathDecMapInt16Int8R(f *codecFnInfo, rv reflect.Value) {
  27766. if rv.Kind() == reflect.Ptr {
  27767. vp := rv2i(rv).(*map[int16]int8)
  27768. if v, changed := fastpathTV.DecMapInt16Int8V(*vp, true, d); changed {
  27769. *vp = v
  27770. }
  27771. return
  27772. }
  27773. fastpathTV.DecMapInt16Int8V(rv2i(rv).(map[int16]int8), false, d)
  27774. }
  27775. func (f fastpathT) DecMapInt16Int8X(vp *map[int16]int8, d *Decoder) {
  27776. if v, changed := f.DecMapInt16Int8V(*vp, true, d); changed {
  27777. *vp = v
  27778. }
  27779. }
  27780. func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, canChange bool,
  27781. d *Decoder) (_ map[int16]int8, changed bool) {
  27782. dd, esep := d.d, d.hh.hasElemSeparators()
  27783. containerLen := dd.ReadMapStart()
  27784. if canChange && v == nil {
  27785. xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
  27786. v = make(map[int16]int8, xlen)
  27787. changed = true
  27788. }
  27789. if containerLen == 0 {
  27790. dd.ReadMapEnd()
  27791. return v, changed
  27792. }
  27793. var mk int16
  27794. var mv int8
  27795. hasLen := containerLen > 0
  27796. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27797. if esep {
  27798. dd.ReadMapElemKey()
  27799. }
  27800. mk = int16(dd.DecodeInt(16))
  27801. if esep {
  27802. dd.ReadMapElemValue()
  27803. }
  27804. if dd.TryDecodeAsNil() {
  27805. if d.h.DeleteOnNilMapValue {
  27806. delete(v, mk)
  27807. } else {
  27808. v[mk] = 0
  27809. }
  27810. continue
  27811. }
  27812. mv = int8(dd.DecodeInt(8))
  27813. if v != nil {
  27814. v[mk] = mv
  27815. }
  27816. }
  27817. dd.ReadMapEnd()
  27818. return v, changed
  27819. }
  27820. func (d *Decoder) fastpathDecMapInt16Int16R(f *codecFnInfo, rv reflect.Value) {
  27821. if rv.Kind() == reflect.Ptr {
  27822. vp := rv2i(rv).(*map[int16]int16)
  27823. if v, changed := fastpathTV.DecMapInt16Int16V(*vp, true, d); changed {
  27824. *vp = v
  27825. }
  27826. return
  27827. }
  27828. fastpathTV.DecMapInt16Int16V(rv2i(rv).(map[int16]int16), false, d)
  27829. }
  27830. func (f fastpathT) DecMapInt16Int16X(vp *map[int16]int16, d *Decoder) {
  27831. if v, changed := f.DecMapInt16Int16V(*vp, true, d); changed {
  27832. *vp = v
  27833. }
  27834. }
  27835. func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, canChange bool,
  27836. d *Decoder) (_ map[int16]int16, changed bool) {
  27837. dd, esep := d.d, d.hh.hasElemSeparators()
  27838. containerLen := dd.ReadMapStart()
  27839. if canChange && v == nil {
  27840. xlen := decInferLen(containerLen, d.h.MaxInitLen, 4)
  27841. v = make(map[int16]int16, xlen)
  27842. changed = true
  27843. }
  27844. if containerLen == 0 {
  27845. dd.ReadMapEnd()
  27846. return v, changed
  27847. }
  27848. var mk int16
  27849. var mv int16
  27850. hasLen := containerLen > 0
  27851. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27852. if esep {
  27853. dd.ReadMapElemKey()
  27854. }
  27855. mk = int16(dd.DecodeInt(16))
  27856. if esep {
  27857. dd.ReadMapElemValue()
  27858. }
  27859. if dd.TryDecodeAsNil() {
  27860. if d.h.DeleteOnNilMapValue {
  27861. delete(v, mk)
  27862. } else {
  27863. v[mk] = 0
  27864. }
  27865. continue
  27866. }
  27867. mv = int16(dd.DecodeInt(16))
  27868. if v != nil {
  27869. v[mk] = mv
  27870. }
  27871. }
  27872. dd.ReadMapEnd()
  27873. return v, changed
  27874. }
  27875. func (d *Decoder) fastpathDecMapInt16Int32R(f *codecFnInfo, rv reflect.Value) {
  27876. if rv.Kind() == reflect.Ptr {
  27877. vp := rv2i(rv).(*map[int16]int32)
  27878. if v, changed := fastpathTV.DecMapInt16Int32V(*vp, true, d); changed {
  27879. *vp = v
  27880. }
  27881. return
  27882. }
  27883. fastpathTV.DecMapInt16Int32V(rv2i(rv).(map[int16]int32), false, d)
  27884. }
  27885. func (f fastpathT) DecMapInt16Int32X(vp *map[int16]int32, d *Decoder) {
  27886. if v, changed := f.DecMapInt16Int32V(*vp, true, d); changed {
  27887. *vp = v
  27888. }
  27889. }
  27890. func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, canChange bool,
  27891. d *Decoder) (_ map[int16]int32, changed bool) {
  27892. dd, esep := d.d, d.hh.hasElemSeparators()
  27893. containerLen := dd.ReadMapStart()
  27894. if canChange && v == nil {
  27895. xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
  27896. v = make(map[int16]int32, xlen)
  27897. changed = true
  27898. }
  27899. if containerLen == 0 {
  27900. dd.ReadMapEnd()
  27901. return v, changed
  27902. }
  27903. var mk int16
  27904. var mv int32
  27905. hasLen := containerLen > 0
  27906. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27907. if esep {
  27908. dd.ReadMapElemKey()
  27909. }
  27910. mk = int16(dd.DecodeInt(16))
  27911. if esep {
  27912. dd.ReadMapElemValue()
  27913. }
  27914. if dd.TryDecodeAsNil() {
  27915. if d.h.DeleteOnNilMapValue {
  27916. delete(v, mk)
  27917. } else {
  27918. v[mk] = 0
  27919. }
  27920. continue
  27921. }
  27922. mv = int32(dd.DecodeInt(32))
  27923. if v != nil {
  27924. v[mk] = mv
  27925. }
  27926. }
  27927. dd.ReadMapEnd()
  27928. return v, changed
  27929. }
  27930. func (d *Decoder) fastpathDecMapInt16Int64R(f *codecFnInfo, rv reflect.Value) {
  27931. if rv.Kind() == reflect.Ptr {
  27932. vp := rv2i(rv).(*map[int16]int64)
  27933. if v, changed := fastpathTV.DecMapInt16Int64V(*vp, true, d); changed {
  27934. *vp = v
  27935. }
  27936. return
  27937. }
  27938. fastpathTV.DecMapInt16Int64V(rv2i(rv).(map[int16]int64), false, d)
  27939. }
  27940. func (f fastpathT) DecMapInt16Int64X(vp *map[int16]int64, d *Decoder) {
  27941. if v, changed := f.DecMapInt16Int64V(*vp, true, d); changed {
  27942. *vp = v
  27943. }
  27944. }
  27945. func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, canChange bool,
  27946. d *Decoder) (_ map[int16]int64, changed bool) {
  27947. dd, esep := d.d, d.hh.hasElemSeparators()
  27948. containerLen := dd.ReadMapStart()
  27949. if canChange && v == nil {
  27950. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  27951. v = make(map[int16]int64, xlen)
  27952. changed = true
  27953. }
  27954. if containerLen == 0 {
  27955. dd.ReadMapEnd()
  27956. return v, changed
  27957. }
  27958. var mk int16
  27959. var mv int64
  27960. hasLen := containerLen > 0
  27961. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  27962. if esep {
  27963. dd.ReadMapElemKey()
  27964. }
  27965. mk = int16(dd.DecodeInt(16))
  27966. if esep {
  27967. dd.ReadMapElemValue()
  27968. }
  27969. if dd.TryDecodeAsNil() {
  27970. if d.h.DeleteOnNilMapValue {
  27971. delete(v, mk)
  27972. } else {
  27973. v[mk] = 0
  27974. }
  27975. continue
  27976. }
  27977. mv = dd.DecodeInt(64)
  27978. if v != nil {
  27979. v[mk] = mv
  27980. }
  27981. }
  27982. dd.ReadMapEnd()
  27983. return v, changed
  27984. }
  27985. func (d *Decoder) fastpathDecMapInt16Float32R(f *codecFnInfo, rv reflect.Value) {
  27986. if rv.Kind() == reflect.Ptr {
  27987. vp := rv2i(rv).(*map[int16]float32)
  27988. if v, changed := fastpathTV.DecMapInt16Float32V(*vp, true, d); changed {
  27989. *vp = v
  27990. }
  27991. return
  27992. }
  27993. fastpathTV.DecMapInt16Float32V(rv2i(rv).(map[int16]float32), false, d)
  27994. }
  27995. func (f fastpathT) DecMapInt16Float32X(vp *map[int16]float32, d *Decoder) {
  27996. if v, changed := f.DecMapInt16Float32V(*vp, true, d); changed {
  27997. *vp = v
  27998. }
  27999. }
  28000. func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, canChange bool,
  28001. d *Decoder) (_ map[int16]float32, changed bool) {
  28002. dd, esep := d.d, d.hh.hasElemSeparators()
  28003. containerLen := dd.ReadMapStart()
  28004. if canChange && v == nil {
  28005. xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
  28006. v = make(map[int16]float32, xlen)
  28007. changed = true
  28008. }
  28009. if containerLen == 0 {
  28010. dd.ReadMapEnd()
  28011. return v, changed
  28012. }
  28013. var mk int16
  28014. var mv float32
  28015. hasLen := containerLen > 0
  28016. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28017. if esep {
  28018. dd.ReadMapElemKey()
  28019. }
  28020. mk = int16(dd.DecodeInt(16))
  28021. if esep {
  28022. dd.ReadMapElemValue()
  28023. }
  28024. if dd.TryDecodeAsNil() {
  28025. if d.h.DeleteOnNilMapValue {
  28026. delete(v, mk)
  28027. } else {
  28028. v[mk] = 0
  28029. }
  28030. continue
  28031. }
  28032. mv = float32(dd.DecodeFloat(true))
  28033. if v != nil {
  28034. v[mk] = mv
  28035. }
  28036. }
  28037. dd.ReadMapEnd()
  28038. return v, changed
  28039. }
  28040. func (d *Decoder) fastpathDecMapInt16Float64R(f *codecFnInfo, rv reflect.Value) {
  28041. if rv.Kind() == reflect.Ptr {
  28042. vp := rv2i(rv).(*map[int16]float64)
  28043. if v, changed := fastpathTV.DecMapInt16Float64V(*vp, true, d); changed {
  28044. *vp = v
  28045. }
  28046. return
  28047. }
  28048. fastpathTV.DecMapInt16Float64V(rv2i(rv).(map[int16]float64), false, d)
  28049. }
  28050. func (f fastpathT) DecMapInt16Float64X(vp *map[int16]float64, d *Decoder) {
  28051. if v, changed := f.DecMapInt16Float64V(*vp, true, d); changed {
  28052. *vp = v
  28053. }
  28054. }
  28055. func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, canChange bool,
  28056. d *Decoder) (_ map[int16]float64, changed bool) {
  28057. dd, esep := d.d, d.hh.hasElemSeparators()
  28058. containerLen := dd.ReadMapStart()
  28059. if canChange && v == nil {
  28060. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  28061. v = make(map[int16]float64, xlen)
  28062. changed = true
  28063. }
  28064. if containerLen == 0 {
  28065. dd.ReadMapEnd()
  28066. return v, changed
  28067. }
  28068. var mk int16
  28069. var mv float64
  28070. hasLen := containerLen > 0
  28071. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28072. if esep {
  28073. dd.ReadMapElemKey()
  28074. }
  28075. mk = int16(dd.DecodeInt(16))
  28076. if esep {
  28077. dd.ReadMapElemValue()
  28078. }
  28079. if dd.TryDecodeAsNil() {
  28080. if d.h.DeleteOnNilMapValue {
  28081. delete(v, mk)
  28082. } else {
  28083. v[mk] = 0
  28084. }
  28085. continue
  28086. }
  28087. mv = dd.DecodeFloat(false)
  28088. if v != nil {
  28089. v[mk] = mv
  28090. }
  28091. }
  28092. dd.ReadMapEnd()
  28093. return v, changed
  28094. }
  28095. func (d *Decoder) fastpathDecMapInt16BoolR(f *codecFnInfo, rv reflect.Value) {
  28096. if rv.Kind() == reflect.Ptr {
  28097. vp := rv2i(rv).(*map[int16]bool)
  28098. if v, changed := fastpathTV.DecMapInt16BoolV(*vp, true, d); changed {
  28099. *vp = v
  28100. }
  28101. return
  28102. }
  28103. fastpathTV.DecMapInt16BoolV(rv2i(rv).(map[int16]bool), false, d)
  28104. }
  28105. func (f fastpathT) DecMapInt16BoolX(vp *map[int16]bool, d *Decoder) {
  28106. if v, changed := f.DecMapInt16BoolV(*vp, true, d); changed {
  28107. *vp = v
  28108. }
  28109. }
  28110. func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, canChange bool,
  28111. d *Decoder) (_ map[int16]bool, changed bool) {
  28112. dd, esep := d.d, d.hh.hasElemSeparators()
  28113. containerLen := dd.ReadMapStart()
  28114. if canChange && v == nil {
  28115. xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
  28116. v = make(map[int16]bool, xlen)
  28117. changed = true
  28118. }
  28119. if containerLen == 0 {
  28120. dd.ReadMapEnd()
  28121. return v, changed
  28122. }
  28123. var mk int16
  28124. var mv bool
  28125. hasLen := containerLen > 0
  28126. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28127. if esep {
  28128. dd.ReadMapElemKey()
  28129. }
  28130. mk = int16(dd.DecodeInt(16))
  28131. if esep {
  28132. dd.ReadMapElemValue()
  28133. }
  28134. if dd.TryDecodeAsNil() {
  28135. if d.h.DeleteOnNilMapValue {
  28136. delete(v, mk)
  28137. } else {
  28138. v[mk] = false
  28139. }
  28140. continue
  28141. }
  28142. mv = dd.DecodeBool()
  28143. if v != nil {
  28144. v[mk] = mv
  28145. }
  28146. }
  28147. dd.ReadMapEnd()
  28148. return v, changed
  28149. }
  28150. func (d *Decoder) fastpathDecMapInt32IntfR(f *codecFnInfo, rv reflect.Value) {
  28151. if rv.Kind() == reflect.Ptr {
  28152. vp := rv2i(rv).(*map[int32]interface{})
  28153. if v, changed := fastpathTV.DecMapInt32IntfV(*vp, true, d); changed {
  28154. *vp = v
  28155. }
  28156. return
  28157. }
  28158. fastpathTV.DecMapInt32IntfV(rv2i(rv).(map[int32]interface{}), false, d)
  28159. }
  28160. func (f fastpathT) DecMapInt32IntfX(vp *map[int32]interface{}, d *Decoder) {
  28161. if v, changed := f.DecMapInt32IntfV(*vp, true, d); changed {
  28162. *vp = v
  28163. }
  28164. }
  28165. func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, canChange bool,
  28166. d *Decoder) (_ map[int32]interface{}, changed bool) {
  28167. dd, esep := d.d, d.hh.hasElemSeparators()
  28168. containerLen := dd.ReadMapStart()
  28169. if canChange && v == nil {
  28170. xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
  28171. v = make(map[int32]interface{}, xlen)
  28172. changed = true
  28173. }
  28174. if containerLen == 0 {
  28175. dd.ReadMapEnd()
  28176. return v, changed
  28177. }
  28178. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  28179. var mk int32
  28180. var mv interface{}
  28181. hasLen := containerLen > 0
  28182. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28183. if esep {
  28184. dd.ReadMapElemKey()
  28185. }
  28186. mk = int32(dd.DecodeInt(32))
  28187. if esep {
  28188. dd.ReadMapElemValue()
  28189. }
  28190. if dd.TryDecodeAsNil() {
  28191. if d.h.DeleteOnNilMapValue {
  28192. delete(v, mk)
  28193. } else {
  28194. v[mk] = nil
  28195. }
  28196. continue
  28197. }
  28198. if mapGet {
  28199. mv = v[mk]
  28200. } else {
  28201. mv = nil
  28202. }
  28203. d.decode(&mv)
  28204. if v != nil {
  28205. v[mk] = mv
  28206. }
  28207. }
  28208. dd.ReadMapEnd()
  28209. return v, changed
  28210. }
  28211. func (d *Decoder) fastpathDecMapInt32StringR(f *codecFnInfo, rv reflect.Value) {
  28212. if rv.Kind() == reflect.Ptr {
  28213. vp := rv2i(rv).(*map[int32]string)
  28214. if v, changed := fastpathTV.DecMapInt32StringV(*vp, true, d); changed {
  28215. *vp = v
  28216. }
  28217. return
  28218. }
  28219. fastpathTV.DecMapInt32StringV(rv2i(rv).(map[int32]string), false, d)
  28220. }
  28221. func (f fastpathT) DecMapInt32StringX(vp *map[int32]string, d *Decoder) {
  28222. if v, changed := f.DecMapInt32StringV(*vp, true, d); changed {
  28223. *vp = v
  28224. }
  28225. }
  28226. func (_ fastpathT) DecMapInt32StringV(v map[int32]string, canChange bool,
  28227. d *Decoder) (_ map[int32]string, changed bool) {
  28228. dd, esep := d.d, d.hh.hasElemSeparators()
  28229. containerLen := dd.ReadMapStart()
  28230. if canChange && v == nil {
  28231. xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
  28232. v = make(map[int32]string, xlen)
  28233. changed = true
  28234. }
  28235. if containerLen == 0 {
  28236. dd.ReadMapEnd()
  28237. return v, changed
  28238. }
  28239. var mk int32
  28240. var mv string
  28241. hasLen := containerLen > 0
  28242. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28243. if esep {
  28244. dd.ReadMapElemKey()
  28245. }
  28246. mk = int32(dd.DecodeInt(32))
  28247. if esep {
  28248. dd.ReadMapElemValue()
  28249. }
  28250. if dd.TryDecodeAsNil() {
  28251. if d.h.DeleteOnNilMapValue {
  28252. delete(v, mk)
  28253. } else {
  28254. v[mk] = ""
  28255. }
  28256. continue
  28257. }
  28258. mv = dd.DecodeString()
  28259. if v != nil {
  28260. v[mk] = mv
  28261. }
  28262. }
  28263. dd.ReadMapEnd()
  28264. return v, changed
  28265. }
  28266. func (d *Decoder) fastpathDecMapInt32UintR(f *codecFnInfo, rv reflect.Value) {
  28267. if rv.Kind() == reflect.Ptr {
  28268. vp := rv2i(rv).(*map[int32]uint)
  28269. if v, changed := fastpathTV.DecMapInt32UintV(*vp, true, d); changed {
  28270. *vp = v
  28271. }
  28272. return
  28273. }
  28274. fastpathTV.DecMapInt32UintV(rv2i(rv).(map[int32]uint), false, d)
  28275. }
  28276. func (f fastpathT) DecMapInt32UintX(vp *map[int32]uint, d *Decoder) {
  28277. if v, changed := f.DecMapInt32UintV(*vp, true, d); changed {
  28278. *vp = v
  28279. }
  28280. }
  28281. func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, canChange bool,
  28282. d *Decoder) (_ map[int32]uint, changed bool) {
  28283. dd, esep := d.d, d.hh.hasElemSeparators()
  28284. containerLen := dd.ReadMapStart()
  28285. if canChange && v == nil {
  28286. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  28287. v = make(map[int32]uint, xlen)
  28288. changed = true
  28289. }
  28290. if containerLen == 0 {
  28291. dd.ReadMapEnd()
  28292. return v, changed
  28293. }
  28294. var mk int32
  28295. var mv uint
  28296. hasLen := containerLen > 0
  28297. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28298. if esep {
  28299. dd.ReadMapElemKey()
  28300. }
  28301. mk = int32(dd.DecodeInt(32))
  28302. if esep {
  28303. dd.ReadMapElemValue()
  28304. }
  28305. if dd.TryDecodeAsNil() {
  28306. if d.h.DeleteOnNilMapValue {
  28307. delete(v, mk)
  28308. } else {
  28309. v[mk] = 0
  28310. }
  28311. continue
  28312. }
  28313. mv = uint(dd.DecodeUint(uintBitsize))
  28314. if v != nil {
  28315. v[mk] = mv
  28316. }
  28317. }
  28318. dd.ReadMapEnd()
  28319. return v, changed
  28320. }
  28321. func (d *Decoder) fastpathDecMapInt32Uint8R(f *codecFnInfo, rv reflect.Value) {
  28322. if rv.Kind() == reflect.Ptr {
  28323. vp := rv2i(rv).(*map[int32]uint8)
  28324. if v, changed := fastpathTV.DecMapInt32Uint8V(*vp, true, d); changed {
  28325. *vp = v
  28326. }
  28327. return
  28328. }
  28329. fastpathTV.DecMapInt32Uint8V(rv2i(rv).(map[int32]uint8), false, d)
  28330. }
  28331. func (f fastpathT) DecMapInt32Uint8X(vp *map[int32]uint8, d *Decoder) {
  28332. if v, changed := f.DecMapInt32Uint8V(*vp, true, d); changed {
  28333. *vp = v
  28334. }
  28335. }
  28336. func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, canChange bool,
  28337. d *Decoder) (_ map[int32]uint8, changed bool) {
  28338. dd, esep := d.d, d.hh.hasElemSeparators()
  28339. containerLen := dd.ReadMapStart()
  28340. if canChange && v == nil {
  28341. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  28342. v = make(map[int32]uint8, xlen)
  28343. changed = true
  28344. }
  28345. if containerLen == 0 {
  28346. dd.ReadMapEnd()
  28347. return v, changed
  28348. }
  28349. var mk int32
  28350. var mv uint8
  28351. hasLen := containerLen > 0
  28352. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28353. if esep {
  28354. dd.ReadMapElemKey()
  28355. }
  28356. mk = int32(dd.DecodeInt(32))
  28357. if esep {
  28358. dd.ReadMapElemValue()
  28359. }
  28360. if dd.TryDecodeAsNil() {
  28361. if d.h.DeleteOnNilMapValue {
  28362. delete(v, mk)
  28363. } else {
  28364. v[mk] = 0
  28365. }
  28366. continue
  28367. }
  28368. mv = uint8(dd.DecodeUint(8))
  28369. if v != nil {
  28370. v[mk] = mv
  28371. }
  28372. }
  28373. dd.ReadMapEnd()
  28374. return v, changed
  28375. }
  28376. func (d *Decoder) fastpathDecMapInt32Uint16R(f *codecFnInfo, rv reflect.Value) {
  28377. if rv.Kind() == reflect.Ptr {
  28378. vp := rv2i(rv).(*map[int32]uint16)
  28379. if v, changed := fastpathTV.DecMapInt32Uint16V(*vp, true, d); changed {
  28380. *vp = v
  28381. }
  28382. return
  28383. }
  28384. fastpathTV.DecMapInt32Uint16V(rv2i(rv).(map[int32]uint16), false, d)
  28385. }
  28386. func (f fastpathT) DecMapInt32Uint16X(vp *map[int32]uint16, d *Decoder) {
  28387. if v, changed := f.DecMapInt32Uint16V(*vp, true, d); changed {
  28388. *vp = v
  28389. }
  28390. }
  28391. func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, canChange bool,
  28392. d *Decoder) (_ map[int32]uint16, changed bool) {
  28393. dd, esep := d.d, d.hh.hasElemSeparators()
  28394. containerLen := dd.ReadMapStart()
  28395. if canChange && v == nil {
  28396. xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
  28397. v = make(map[int32]uint16, xlen)
  28398. changed = true
  28399. }
  28400. if containerLen == 0 {
  28401. dd.ReadMapEnd()
  28402. return v, changed
  28403. }
  28404. var mk int32
  28405. var mv uint16
  28406. hasLen := containerLen > 0
  28407. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28408. if esep {
  28409. dd.ReadMapElemKey()
  28410. }
  28411. mk = int32(dd.DecodeInt(32))
  28412. if esep {
  28413. dd.ReadMapElemValue()
  28414. }
  28415. if dd.TryDecodeAsNil() {
  28416. if d.h.DeleteOnNilMapValue {
  28417. delete(v, mk)
  28418. } else {
  28419. v[mk] = 0
  28420. }
  28421. continue
  28422. }
  28423. mv = uint16(dd.DecodeUint(16))
  28424. if v != nil {
  28425. v[mk] = mv
  28426. }
  28427. }
  28428. dd.ReadMapEnd()
  28429. return v, changed
  28430. }
  28431. func (d *Decoder) fastpathDecMapInt32Uint32R(f *codecFnInfo, rv reflect.Value) {
  28432. if rv.Kind() == reflect.Ptr {
  28433. vp := rv2i(rv).(*map[int32]uint32)
  28434. if v, changed := fastpathTV.DecMapInt32Uint32V(*vp, true, d); changed {
  28435. *vp = v
  28436. }
  28437. return
  28438. }
  28439. fastpathTV.DecMapInt32Uint32V(rv2i(rv).(map[int32]uint32), false, d)
  28440. }
  28441. func (f fastpathT) DecMapInt32Uint32X(vp *map[int32]uint32, d *Decoder) {
  28442. if v, changed := f.DecMapInt32Uint32V(*vp, true, d); changed {
  28443. *vp = v
  28444. }
  28445. }
  28446. func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, canChange bool,
  28447. d *Decoder) (_ map[int32]uint32, changed bool) {
  28448. dd, esep := d.d, d.hh.hasElemSeparators()
  28449. containerLen := dd.ReadMapStart()
  28450. if canChange && v == nil {
  28451. xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
  28452. v = make(map[int32]uint32, xlen)
  28453. changed = true
  28454. }
  28455. if containerLen == 0 {
  28456. dd.ReadMapEnd()
  28457. return v, changed
  28458. }
  28459. var mk int32
  28460. var mv uint32
  28461. hasLen := containerLen > 0
  28462. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28463. if esep {
  28464. dd.ReadMapElemKey()
  28465. }
  28466. mk = int32(dd.DecodeInt(32))
  28467. if esep {
  28468. dd.ReadMapElemValue()
  28469. }
  28470. if dd.TryDecodeAsNil() {
  28471. if d.h.DeleteOnNilMapValue {
  28472. delete(v, mk)
  28473. } else {
  28474. v[mk] = 0
  28475. }
  28476. continue
  28477. }
  28478. mv = uint32(dd.DecodeUint(32))
  28479. if v != nil {
  28480. v[mk] = mv
  28481. }
  28482. }
  28483. dd.ReadMapEnd()
  28484. return v, changed
  28485. }
  28486. func (d *Decoder) fastpathDecMapInt32Uint64R(f *codecFnInfo, rv reflect.Value) {
  28487. if rv.Kind() == reflect.Ptr {
  28488. vp := rv2i(rv).(*map[int32]uint64)
  28489. if v, changed := fastpathTV.DecMapInt32Uint64V(*vp, true, d); changed {
  28490. *vp = v
  28491. }
  28492. return
  28493. }
  28494. fastpathTV.DecMapInt32Uint64V(rv2i(rv).(map[int32]uint64), false, d)
  28495. }
  28496. func (f fastpathT) DecMapInt32Uint64X(vp *map[int32]uint64, d *Decoder) {
  28497. if v, changed := f.DecMapInt32Uint64V(*vp, true, d); changed {
  28498. *vp = v
  28499. }
  28500. }
  28501. func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, canChange bool,
  28502. d *Decoder) (_ map[int32]uint64, changed bool) {
  28503. dd, esep := d.d, d.hh.hasElemSeparators()
  28504. containerLen := dd.ReadMapStart()
  28505. if canChange && v == nil {
  28506. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  28507. v = make(map[int32]uint64, xlen)
  28508. changed = true
  28509. }
  28510. if containerLen == 0 {
  28511. dd.ReadMapEnd()
  28512. return v, changed
  28513. }
  28514. var mk int32
  28515. var mv uint64
  28516. hasLen := containerLen > 0
  28517. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28518. if esep {
  28519. dd.ReadMapElemKey()
  28520. }
  28521. mk = int32(dd.DecodeInt(32))
  28522. if esep {
  28523. dd.ReadMapElemValue()
  28524. }
  28525. if dd.TryDecodeAsNil() {
  28526. if d.h.DeleteOnNilMapValue {
  28527. delete(v, mk)
  28528. } else {
  28529. v[mk] = 0
  28530. }
  28531. continue
  28532. }
  28533. mv = dd.DecodeUint(64)
  28534. if v != nil {
  28535. v[mk] = mv
  28536. }
  28537. }
  28538. dd.ReadMapEnd()
  28539. return v, changed
  28540. }
  28541. func (d *Decoder) fastpathDecMapInt32UintptrR(f *codecFnInfo, rv reflect.Value) {
  28542. if rv.Kind() == reflect.Ptr {
  28543. vp := rv2i(rv).(*map[int32]uintptr)
  28544. if v, changed := fastpathTV.DecMapInt32UintptrV(*vp, true, d); changed {
  28545. *vp = v
  28546. }
  28547. return
  28548. }
  28549. fastpathTV.DecMapInt32UintptrV(rv2i(rv).(map[int32]uintptr), false, d)
  28550. }
  28551. func (f fastpathT) DecMapInt32UintptrX(vp *map[int32]uintptr, d *Decoder) {
  28552. if v, changed := f.DecMapInt32UintptrV(*vp, true, d); changed {
  28553. *vp = v
  28554. }
  28555. }
  28556. func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, canChange bool,
  28557. d *Decoder) (_ map[int32]uintptr, changed bool) {
  28558. dd, esep := d.d, d.hh.hasElemSeparators()
  28559. containerLen := dd.ReadMapStart()
  28560. if canChange && v == nil {
  28561. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  28562. v = make(map[int32]uintptr, xlen)
  28563. changed = true
  28564. }
  28565. if containerLen == 0 {
  28566. dd.ReadMapEnd()
  28567. return v, changed
  28568. }
  28569. var mk int32
  28570. var mv uintptr
  28571. hasLen := containerLen > 0
  28572. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28573. if esep {
  28574. dd.ReadMapElemKey()
  28575. }
  28576. mk = int32(dd.DecodeInt(32))
  28577. if esep {
  28578. dd.ReadMapElemValue()
  28579. }
  28580. if dd.TryDecodeAsNil() {
  28581. if d.h.DeleteOnNilMapValue {
  28582. delete(v, mk)
  28583. } else {
  28584. v[mk] = 0
  28585. }
  28586. continue
  28587. }
  28588. mv = uintptr(dd.DecodeUint(uintBitsize))
  28589. if v != nil {
  28590. v[mk] = mv
  28591. }
  28592. }
  28593. dd.ReadMapEnd()
  28594. return v, changed
  28595. }
  28596. func (d *Decoder) fastpathDecMapInt32IntR(f *codecFnInfo, rv reflect.Value) {
  28597. if rv.Kind() == reflect.Ptr {
  28598. vp := rv2i(rv).(*map[int32]int)
  28599. if v, changed := fastpathTV.DecMapInt32IntV(*vp, true, d); changed {
  28600. *vp = v
  28601. }
  28602. return
  28603. }
  28604. fastpathTV.DecMapInt32IntV(rv2i(rv).(map[int32]int), false, d)
  28605. }
  28606. func (f fastpathT) DecMapInt32IntX(vp *map[int32]int, d *Decoder) {
  28607. if v, changed := f.DecMapInt32IntV(*vp, true, d); changed {
  28608. *vp = v
  28609. }
  28610. }
  28611. func (_ fastpathT) DecMapInt32IntV(v map[int32]int, canChange bool,
  28612. d *Decoder) (_ map[int32]int, changed bool) {
  28613. dd, esep := d.d, d.hh.hasElemSeparators()
  28614. containerLen := dd.ReadMapStart()
  28615. if canChange && v == nil {
  28616. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  28617. v = make(map[int32]int, xlen)
  28618. changed = true
  28619. }
  28620. if containerLen == 0 {
  28621. dd.ReadMapEnd()
  28622. return v, changed
  28623. }
  28624. var mk int32
  28625. var mv int
  28626. hasLen := containerLen > 0
  28627. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28628. if esep {
  28629. dd.ReadMapElemKey()
  28630. }
  28631. mk = int32(dd.DecodeInt(32))
  28632. if esep {
  28633. dd.ReadMapElemValue()
  28634. }
  28635. if dd.TryDecodeAsNil() {
  28636. if d.h.DeleteOnNilMapValue {
  28637. delete(v, mk)
  28638. } else {
  28639. v[mk] = 0
  28640. }
  28641. continue
  28642. }
  28643. mv = int(dd.DecodeInt(intBitsize))
  28644. if v != nil {
  28645. v[mk] = mv
  28646. }
  28647. }
  28648. dd.ReadMapEnd()
  28649. return v, changed
  28650. }
  28651. func (d *Decoder) fastpathDecMapInt32Int8R(f *codecFnInfo, rv reflect.Value) {
  28652. if rv.Kind() == reflect.Ptr {
  28653. vp := rv2i(rv).(*map[int32]int8)
  28654. if v, changed := fastpathTV.DecMapInt32Int8V(*vp, true, d); changed {
  28655. *vp = v
  28656. }
  28657. return
  28658. }
  28659. fastpathTV.DecMapInt32Int8V(rv2i(rv).(map[int32]int8), false, d)
  28660. }
  28661. func (f fastpathT) DecMapInt32Int8X(vp *map[int32]int8, d *Decoder) {
  28662. if v, changed := f.DecMapInt32Int8V(*vp, true, d); changed {
  28663. *vp = v
  28664. }
  28665. }
  28666. func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, canChange bool,
  28667. d *Decoder) (_ map[int32]int8, changed bool) {
  28668. dd, esep := d.d, d.hh.hasElemSeparators()
  28669. containerLen := dd.ReadMapStart()
  28670. if canChange && v == nil {
  28671. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  28672. v = make(map[int32]int8, xlen)
  28673. changed = true
  28674. }
  28675. if containerLen == 0 {
  28676. dd.ReadMapEnd()
  28677. return v, changed
  28678. }
  28679. var mk int32
  28680. var mv int8
  28681. hasLen := containerLen > 0
  28682. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28683. if esep {
  28684. dd.ReadMapElemKey()
  28685. }
  28686. mk = int32(dd.DecodeInt(32))
  28687. if esep {
  28688. dd.ReadMapElemValue()
  28689. }
  28690. if dd.TryDecodeAsNil() {
  28691. if d.h.DeleteOnNilMapValue {
  28692. delete(v, mk)
  28693. } else {
  28694. v[mk] = 0
  28695. }
  28696. continue
  28697. }
  28698. mv = int8(dd.DecodeInt(8))
  28699. if v != nil {
  28700. v[mk] = mv
  28701. }
  28702. }
  28703. dd.ReadMapEnd()
  28704. return v, changed
  28705. }
  28706. func (d *Decoder) fastpathDecMapInt32Int16R(f *codecFnInfo, rv reflect.Value) {
  28707. if rv.Kind() == reflect.Ptr {
  28708. vp := rv2i(rv).(*map[int32]int16)
  28709. if v, changed := fastpathTV.DecMapInt32Int16V(*vp, true, d); changed {
  28710. *vp = v
  28711. }
  28712. return
  28713. }
  28714. fastpathTV.DecMapInt32Int16V(rv2i(rv).(map[int32]int16), false, d)
  28715. }
  28716. func (f fastpathT) DecMapInt32Int16X(vp *map[int32]int16, d *Decoder) {
  28717. if v, changed := f.DecMapInt32Int16V(*vp, true, d); changed {
  28718. *vp = v
  28719. }
  28720. }
  28721. func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, canChange bool,
  28722. d *Decoder) (_ map[int32]int16, changed bool) {
  28723. dd, esep := d.d, d.hh.hasElemSeparators()
  28724. containerLen := dd.ReadMapStart()
  28725. if canChange && v == nil {
  28726. xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
  28727. v = make(map[int32]int16, xlen)
  28728. changed = true
  28729. }
  28730. if containerLen == 0 {
  28731. dd.ReadMapEnd()
  28732. return v, changed
  28733. }
  28734. var mk int32
  28735. var mv int16
  28736. hasLen := containerLen > 0
  28737. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28738. if esep {
  28739. dd.ReadMapElemKey()
  28740. }
  28741. mk = int32(dd.DecodeInt(32))
  28742. if esep {
  28743. dd.ReadMapElemValue()
  28744. }
  28745. if dd.TryDecodeAsNil() {
  28746. if d.h.DeleteOnNilMapValue {
  28747. delete(v, mk)
  28748. } else {
  28749. v[mk] = 0
  28750. }
  28751. continue
  28752. }
  28753. mv = int16(dd.DecodeInt(16))
  28754. if v != nil {
  28755. v[mk] = mv
  28756. }
  28757. }
  28758. dd.ReadMapEnd()
  28759. return v, changed
  28760. }
  28761. func (d *Decoder) fastpathDecMapInt32Int32R(f *codecFnInfo, rv reflect.Value) {
  28762. if rv.Kind() == reflect.Ptr {
  28763. vp := rv2i(rv).(*map[int32]int32)
  28764. if v, changed := fastpathTV.DecMapInt32Int32V(*vp, true, d); changed {
  28765. *vp = v
  28766. }
  28767. return
  28768. }
  28769. fastpathTV.DecMapInt32Int32V(rv2i(rv).(map[int32]int32), false, d)
  28770. }
  28771. func (f fastpathT) DecMapInt32Int32X(vp *map[int32]int32, d *Decoder) {
  28772. if v, changed := f.DecMapInt32Int32V(*vp, true, d); changed {
  28773. *vp = v
  28774. }
  28775. }
  28776. func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, canChange bool,
  28777. d *Decoder) (_ map[int32]int32, changed bool) {
  28778. dd, esep := d.d, d.hh.hasElemSeparators()
  28779. containerLen := dd.ReadMapStart()
  28780. if canChange && v == nil {
  28781. xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
  28782. v = make(map[int32]int32, xlen)
  28783. changed = true
  28784. }
  28785. if containerLen == 0 {
  28786. dd.ReadMapEnd()
  28787. return v, changed
  28788. }
  28789. var mk int32
  28790. var mv int32
  28791. hasLen := containerLen > 0
  28792. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28793. if esep {
  28794. dd.ReadMapElemKey()
  28795. }
  28796. mk = int32(dd.DecodeInt(32))
  28797. if esep {
  28798. dd.ReadMapElemValue()
  28799. }
  28800. if dd.TryDecodeAsNil() {
  28801. if d.h.DeleteOnNilMapValue {
  28802. delete(v, mk)
  28803. } else {
  28804. v[mk] = 0
  28805. }
  28806. continue
  28807. }
  28808. mv = int32(dd.DecodeInt(32))
  28809. if v != nil {
  28810. v[mk] = mv
  28811. }
  28812. }
  28813. dd.ReadMapEnd()
  28814. return v, changed
  28815. }
  28816. func (d *Decoder) fastpathDecMapInt32Int64R(f *codecFnInfo, rv reflect.Value) {
  28817. if rv.Kind() == reflect.Ptr {
  28818. vp := rv2i(rv).(*map[int32]int64)
  28819. if v, changed := fastpathTV.DecMapInt32Int64V(*vp, true, d); changed {
  28820. *vp = v
  28821. }
  28822. return
  28823. }
  28824. fastpathTV.DecMapInt32Int64V(rv2i(rv).(map[int32]int64), false, d)
  28825. }
  28826. func (f fastpathT) DecMapInt32Int64X(vp *map[int32]int64, d *Decoder) {
  28827. if v, changed := f.DecMapInt32Int64V(*vp, true, d); changed {
  28828. *vp = v
  28829. }
  28830. }
  28831. func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, canChange bool,
  28832. d *Decoder) (_ map[int32]int64, changed bool) {
  28833. dd, esep := d.d, d.hh.hasElemSeparators()
  28834. containerLen := dd.ReadMapStart()
  28835. if canChange && v == nil {
  28836. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  28837. v = make(map[int32]int64, xlen)
  28838. changed = true
  28839. }
  28840. if containerLen == 0 {
  28841. dd.ReadMapEnd()
  28842. return v, changed
  28843. }
  28844. var mk int32
  28845. var mv int64
  28846. hasLen := containerLen > 0
  28847. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28848. if esep {
  28849. dd.ReadMapElemKey()
  28850. }
  28851. mk = int32(dd.DecodeInt(32))
  28852. if esep {
  28853. dd.ReadMapElemValue()
  28854. }
  28855. if dd.TryDecodeAsNil() {
  28856. if d.h.DeleteOnNilMapValue {
  28857. delete(v, mk)
  28858. } else {
  28859. v[mk] = 0
  28860. }
  28861. continue
  28862. }
  28863. mv = dd.DecodeInt(64)
  28864. if v != nil {
  28865. v[mk] = mv
  28866. }
  28867. }
  28868. dd.ReadMapEnd()
  28869. return v, changed
  28870. }
  28871. func (d *Decoder) fastpathDecMapInt32Float32R(f *codecFnInfo, rv reflect.Value) {
  28872. if rv.Kind() == reflect.Ptr {
  28873. vp := rv2i(rv).(*map[int32]float32)
  28874. if v, changed := fastpathTV.DecMapInt32Float32V(*vp, true, d); changed {
  28875. *vp = v
  28876. }
  28877. return
  28878. }
  28879. fastpathTV.DecMapInt32Float32V(rv2i(rv).(map[int32]float32), false, d)
  28880. }
  28881. func (f fastpathT) DecMapInt32Float32X(vp *map[int32]float32, d *Decoder) {
  28882. if v, changed := f.DecMapInt32Float32V(*vp, true, d); changed {
  28883. *vp = v
  28884. }
  28885. }
  28886. func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, canChange bool,
  28887. d *Decoder) (_ map[int32]float32, changed bool) {
  28888. dd, esep := d.d, d.hh.hasElemSeparators()
  28889. containerLen := dd.ReadMapStart()
  28890. if canChange && v == nil {
  28891. xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
  28892. v = make(map[int32]float32, xlen)
  28893. changed = true
  28894. }
  28895. if containerLen == 0 {
  28896. dd.ReadMapEnd()
  28897. return v, changed
  28898. }
  28899. var mk int32
  28900. var mv float32
  28901. hasLen := containerLen > 0
  28902. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28903. if esep {
  28904. dd.ReadMapElemKey()
  28905. }
  28906. mk = int32(dd.DecodeInt(32))
  28907. if esep {
  28908. dd.ReadMapElemValue()
  28909. }
  28910. if dd.TryDecodeAsNil() {
  28911. if d.h.DeleteOnNilMapValue {
  28912. delete(v, mk)
  28913. } else {
  28914. v[mk] = 0
  28915. }
  28916. continue
  28917. }
  28918. mv = float32(dd.DecodeFloat(true))
  28919. if v != nil {
  28920. v[mk] = mv
  28921. }
  28922. }
  28923. dd.ReadMapEnd()
  28924. return v, changed
  28925. }
  28926. func (d *Decoder) fastpathDecMapInt32Float64R(f *codecFnInfo, rv reflect.Value) {
  28927. if rv.Kind() == reflect.Ptr {
  28928. vp := rv2i(rv).(*map[int32]float64)
  28929. if v, changed := fastpathTV.DecMapInt32Float64V(*vp, true, d); changed {
  28930. *vp = v
  28931. }
  28932. return
  28933. }
  28934. fastpathTV.DecMapInt32Float64V(rv2i(rv).(map[int32]float64), false, d)
  28935. }
  28936. func (f fastpathT) DecMapInt32Float64X(vp *map[int32]float64, d *Decoder) {
  28937. if v, changed := f.DecMapInt32Float64V(*vp, true, d); changed {
  28938. *vp = v
  28939. }
  28940. }
  28941. func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, canChange bool,
  28942. d *Decoder) (_ map[int32]float64, changed bool) {
  28943. dd, esep := d.d, d.hh.hasElemSeparators()
  28944. containerLen := dd.ReadMapStart()
  28945. if canChange && v == nil {
  28946. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  28947. v = make(map[int32]float64, xlen)
  28948. changed = true
  28949. }
  28950. if containerLen == 0 {
  28951. dd.ReadMapEnd()
  28952. return v, changed
  28953. }
  28954. var mk int32
  28955. var mv float64
  28956. hasLen := containerLen > 0
  28957. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  28958. if esep {
  28959. dd.ReadMapElemKey()
  28960. }
  28961. mk = int32(dd.DecodeInt(32))
  28962. if esep {
  28963. dd.ReadMapElemValue()
  28964. }
  28965. if dd.TryDecodeAsNil() {
  28966. if d.h.DeleteOnNilMapValue {
  28967. delete(v, mk)
  28968. } else {
  28969. v[mk] = 0
  28970. }
  28971. continue
  28972. }
  28973. mv = dd.DecodeFloat(false)
  28974. if v != nil {
  28975. v[mk] = mv
  28976. }
  28977. }
  28978. dd.ReadMapEnd()
  28979. return v, changed
  28980. }
  28981. func (d *Decoder) fastpathDecMapInt32BoolR(f *codecFnInfo, rv reflect.Value) {
  28982. if rv.Kind() == reflect.Ptr {
  28983. vp := rv2i(rv).(*map[int32]bool)
  28984. if v, changed := fastpathTV.DecMapInt32BoolV(*vp, true, d); changed {
  28985. *vp = v
  28986. }
  28987. return
  28988. }
  28989. fastpathTV.DecMapInt32BoolV(rv2i(rv).(map[int32]bool), false, d)
  28990. }
  28991. func (f fastpathT) DecMapInt32BoolX(vp *map[int32]bool, d *Decoder) {
  28992. if v, changed := f.DecMapInt32BoolV(*vp, true, d); changed {
  28993. *vp = v
  28994. }
  28995. }
  28996. func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, canChange bool,
  28997. d *Decoder) (_ map[int32]bool, changed bool) {
  28998. dd, esep := d.d, d.hh.hasElemSeparators()
  28999. containerLen := dd.ReadMapStart()
  29000. if canChange && v == nil {
  29001. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  29002. v = make(map[int32]bool, xlen)
  29003. changed = true
  29004. }
  29005. if containerLen == 0 {
  29006. dd.ReadMapEnd()
  29007. return v, changed
  29008. }
  29009. var mk int32
  29010. var mv bool
  29011. hasLen := containerLen > 0
  29012. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29013. if esep {
  29014. dd.ReadMapElemKey()
  29015. }
  29016. mk = int32(dd.DecodeInt(32))
  29017. if esep {
  29018. dd.ReadMapElemValue()
  29019. }
  29020. if dd.TryDecodeAsNil() {
  29021. if d.h.DeleteOnNilMapValue {
  29022. delete(v, mk)
  29023. } else {
  29024. v[mk] = false
  29025. }
  29026. continue
  29027. }
  29028. mv = dd.DecodeBool()
  29029. if v != nil {
  29030. v[mk] = mv
  29031. }
  29032. }
  29033. dd.ReadMapEnd()
  29034. return v, changed
  29035. }
  29036. func (d *Decoder) fastpathDecMapInt64IntfR(f *codecFnInfo, rv reflect.Value) {
  29037. if rv.Kind() == reflect.Ptr {
  29038. vp := rv2i(rv).(*map[int64]interface{})
  29039. if v, changed := fastpathTV.DecMapInt64IntfV(*vp, true, d); changed {
  29040. *vp = v
  29041. }
  29042. return
  29043. }
  29044. fastpathTV.DecMapInt64IntfV(rv2i(rv).(map[int64]interface{}), false, d)
  29045. }
  29046. func (f fastpathT) DecMapInt64IntfX(vp *map[int64]interface{}, d *Decoder) {
  29047. if v, changed := f.DecMapInt64IntfV(*vp, true, d); changed {
  29048. *vp = v
  29049. }
  29050. }
  29051. func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, canChange bool,
  29052. d *Decoder) (_ map[int64]interface{}, changed bool) {
  29053. dd, esep := d.d, d.hh.hasElemSeparators()
  29054. containerLen := dd.ReadMapStart()
  29055. if canChange && v == nil {
  29056. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  29057. v = make(map[int64]interface{}, xlen)
  29058. changed = true
  29059. }
  29060. if containerLen == 0 {
  29061. dd.ReadMapEnd()
  29062. return v, changed
  29063. }
  29064. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  29065. var mk int64
  29066. var mv interface{}
  29067. hasLen := containerLen > 0
  29068. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29069. if esep {
  29070. dd.ReadMapElemKey()
  29071. }
  29072. mk = dd.DecodeInt(64)
  29073. if esep {
  29074. dd.ReadMapElemValue()
  29075. }
  29076. if dd.TryDecodeAsNil() {
  29077. if d.h.DeleteOnNilMapValue {
  29078. delete(v, mk)
  29079. } else {
  29080. v[mk] = nil
  29081. }
  29082. continue
  29083. }
  29084. if mapGet {
  29085. mv = v[mk]
  29086. } else {
  29087. mv = nil
  29088. }
  29089. d.decode(&mv)
  29090. if v != nil {
  29091. v[mk] = mv
  29092. }
  29093. }
  29094. dd.ReadMapEnd()
  29095. return v, changed
  29096. }
  29097. func (d *Decoder) fastpathDecMapInt64StringR(f *codecFnInfo, rv reflect.Value) {
  29098. if rv.Kind() == reflect.Ptr {
  29099. vp := rv2i(rv).(*map[int64]string)
  29100. if v, changed := fastpathTV.DecMapInt64StringV(*vp, true, d); changed {
  29101. *vp = v
  29102. }
  29103. return
  29104. }
  29105. fastpathTV.DecMapInt64StringV(rv2i(rv).(map[int64]string), false, d)
  29106. }
  29107. func (f fastpathT) DecMapInt64StringX(vp *map[int64]string, d *Decoder) {
  29108. if v, changed := f.DecMapInt64StringV(*vp, true, d); changed {
  29109. *vp = v
  29110. }
  29111. }
  29112. func (_ fastpathT) DecMapInt64StringV(v map[int64]string, canChange bool,
  29113. d *Decoder) (_ map[int64]string, changed bool) {
  29114. dd, esep := d.d, d.hh.hasElemSeparators()
  29115. containerLen := dd.ReadMapStart()
  29116. if canChange && v == nil {
  29117. xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
  29118. v = make(map[int64]string, xlen)
  29119. changed = true
  29120. }
  29121. if containerLen == 0 {
  29122. dd.ReadMapEnd()
  29123. return v, changed
  29124. }
  29125. var mk int64
  29126. var mv string
  29127. hasLen := containerLen > 0
  29128. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29129. if esep {
  29130. dd.ReadMapElemKey()
  29131. }
  29132. mk = dd.DecodeInt(64)
  29133. if esep {
  29134. dd.ReadMapElemValue()
  29135. }
  29136. if dd.TryDecodeAsNil() {
  29137. if d.h.DeleteOnNilMapValue {
  29138. delete(v, mk)
  29139. } else {
  29140. v[mk] = ""
  29141. }
  29142. continue
  29143. }
  29144. mv = dd.DecodeString()
  29145. if v != nil {
  29146. v[mk] = mv
  29147. }
  29148. }
  29149. dd.ReadMapEnd()
  29150. return v, changed
  29151. }
  29152. func (d *Decoder) fastpathDecMapInt64UintR(f *codecFnInfo, rv reflect.Value) {
  29153. if rv.Kind() == reflect.Ptr {
  29154. vp := rv2i(rv).(*map[int64]uint)
  29155. if v, changed := fastpathTV.DecMapInt64UintV(*vp, true, d); changed {
  29156. *vp = v
  29157. }
  29158. return
  29159. }
  29160. fastpathTV.DecMapInt64UintV(rv2i(rv).(map[int64]uint), false, d)
  29161. }
  29162. func (f fastpathT) DecMapInt64UintX(vp *map[int64]uint, d *Decoder) {
  29163. if v, changed := f.DecMapInt64UintV(*vp, true, d); changed {
  29164. *vp = v
  29165. }
  29166. }
  29167. func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, canChange bool,
  29168. d *Decoder) (_ map[int64]uint, changed bool) {
  29169. dd, esep := d.d, d.hh.hasElemSeparators()
  29170. containerLen := dd.ReadMapStart()
  29171. if canChange && v == nil {
  29172. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  29173. v = make(map[int64]uint, xlen)
  29174. changed = true
  29175. }
  29176. if containerLen == 0 {
  29177. dd.ReadMapEnd()
  29178. return v, changed
  29179. }
  29180. var mk int64
  29181. var mv uint
  29182. hasLen := containerLen > 0
  29183. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29184. if esep {
  29185. dd.ReadMapElemKey()
  29186. }
  29187. mk = dd.DecodeInt(64)
  29188. if esep {
  29189. dd.ReadMapElemValue()
  29190. }
  29191. if dd.TryDecodeAsNil() {
  29192. if d.h.DeleteOnNilMapValue {
  29193. delete(v, mk)
  29194. } else {
  29195. v[mk] = 0
  29196. }
  29197. continue
  29198. }
  29199. mv = uint(dd.DecodeUint(uintBitsize))
  29200. if v != nil {
  29201. v[mk] = mv
  29202. }
  29203. }
  29204. dd.ReadMapEnd()
  29205. return v, changed
  29206. }
  29207. func (d *Decoder) fastpathDecMapInt64Uint8R(f *codecFnInfo, rv reflect.Value) {
  29208. if rv.Kind() == reflect.Ptr {
  29209. vp := rv2i(rv).(*map[int64]uint8)
  29210. if v, changed := fastpathTV.DecMapInt64Uint8V(*vp, true, d); changed {
  29211. *vp = v
  29212. }
  29213. return
  29214. }
  29215. fastpathTV.DecMapInt64Uint8V(rv2i(rv).(map[int64]uint8), false, d)
  29216. }
  29217. func (f fastpathT) DecMapInt64Uint8X(vp *map[int64]uint8, d *Decoder) {
  29218. if v, changed := f.DecMapInt64Uint8V(*vp, true, d); changed {
  29219. *vp = v
  29220. }
  29221. }
  29222. func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, canChange bool,
  29223. d *Decoder) (_ map[int64]uint8, changed bool) {
  29224. dd, esep := d.d, d.hh.hasElemSeparators()
  29225. containerLen := dd.ReadMapStart()
  29226. if canChange && v == nil {
  29227. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  29228. v = make(map[int64]uint8, xlen)
  29229. changed = true
  29230. }
  29231. if containerLen == 0 {
  29232. dd.ReadMapEnd()
  29233. return v, changed
  29234. }
  29235. var mk int64
  29236. var mv uint8
  29237. hasLen := containerLen > 0
  29238. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29239. if esep {
  29240. dd.ReadMapElemKey()
  29241. }
  29242. mk = dd.DecodeInt(64)
  29243. if esep {
  29244. dd.ReadMapElemValue()
  29245. }
  29246. if dd.TryDecodeAsNil() {
  29247. if d.h.DeleteOnNilMapValue {
  29248. delete(v, mk)
  29249. } else {
  29250. v[mk] = 0
  29251. }
  29252. continue
  29253. }
  29254. mv = uint8(dd.DecodeUint(8))
  29255. if v != nil {
  29256. v[mk] = mv
  29257. }
  29258. }
  29259. dd.ReadMapEnd()
  29260. return v, changed
  29261. }
  29262. func (d *Decoder) fastpathDecMapInt64Uint16R(f *codecFnInfo, rv reflect.Value) {
  29263. if rv.Kind() == reflect.Ptr {
  29264. vp := rv2i(rv).(*map[int64]uint16)
  29265. if v, changed := fastpathTV.DecMapInt64Uint16V(*vp, true, d); changed {
  29266. *vp = v
  29267. }
  29268. return
  29269. }
  29270. fastpathTV.DecMapInt64Uint16V(rv2i(rv).(map[int64]uint16), false, d)
  29271. }
  29272. func (f fastpathT) DecMapInt64Uint16X(vp *map[int64]uint16, d *Decoder) {
  29273. if v, changed := f.DecMapInt64Uint16V(*vp, true, d); changed {
  29274. *vp = v
  29275. }
  29276. }
  29277. func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, canChange bool,
  29278. d *Decoder) (_ map[int64]uint16, changed bool) {
  29279. dd, esep := d.d, d.hh.hasElemSeparators()
  29280. containerLen := dd.ReadMapStart()
  29281. if canChange && v == nil {
  29282. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  29283. v = make(map[int64]uint16, xlen)
  29284. changed = true
  29285. }
  29286. if containerLen == 0 {
  29287. dd.ReadMapEnd()
  29288. return v, changed
  29289. }
  29290. var mk int64
  29291. var mv uint16
  29292. hasLen := containerLen > 0
  29293. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29294. if esep {
  29295. dd.ReadMapElemKey()
  29296. }
  29297. mk = dd.DecodeInt(64)
  29298. if esep {
  29299. dd.ReadMapElemValue()
  29300. }
  29301. if dd.TryDecodeAsNil() {
  29302. if d.h.DeleteOnNilMapValue {
  29303. delete(v, mk)
  29304. } else {
  29305. v[mk] = 0
  29306. }
  29307. continue
  29308. }
  29309. mv = uint16(dd.DecodeUint(16))
  29310. if v != nil {
  29311. v[mk] = mv
  29312. }
  29313. }
  29314. dd.ReadMapEnd()
  29315. return v, changed
  29316. }
  29317. func (d *Decoder) fastpathDecMapInt64Uint32R(f *codecFnInfo, rv reflect.Value) {
  29318. if rv.Kind() == reflect.Ptr {
  29319. vp := rv2i(rv).(*map[int64]uint32)
  29320. if v, changed := fastpathTV.DecMapInt64Uint32V(*vp, true, d); changed {
  29321. *vp = v
  29322. }
  29323. return
  29324. }
  29325. fastpathTV.DecMapInt64Uint32V(rv2i(rv).(map[int64]uint32), false, d)
  29326. }
  29327. func (f fastpathT) DecMapInt64Uint32X(vp *map[int64]uint32, d *Decoder) {
  29328. if v, changed := f.DecMapInt64Uint32V(*vp, true, d); changed {
  29329. *vp = v
  29330. }
  29331. }
  29332. func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, canChange bool,
  29333. d *Decoder) (_ map[int64]uint32, changed bool) {
  29334. dd, esep := d.d, d.hh.hasElemSeparators()
  29335. containerLen := dd.ReadMapStart()
  29336. if canChange && v == nil {
  29337. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  29338. v = make(map[int64]uint32, xlen)
  29339. changed = true
  29340. }
  29341. if containerLen == 0 {
  29342. dd.ReadMapEnd()
  29343. return v, changed
  29344. }
  29345. var mk int64
  29346. var mv uint32
  29347. hasLen := containerLen > 0
  29348. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29349. if esep {
  29350. dd.ReadMapElemKey()
  29351. }
  29352. mk = dd.DecodeInt(64)
  29353. if esep {
  29354. dd.ReadMapElemValue()
  29355. }
  29356. if dd.TryDecodeAsNil() {
  29357. if d.h.DeleteOnNilMapValue {
  29358. delete(v, mk)
  29359. } else {
  29360. v[mk] = 0
  29361. }
  29362. continue
  29363. }
  29364. mv = uint32(dd.DecodeUint(32))
  29365. if v != nil {
  29366. v[mk] = mv
  29367. }
  29368. }
  29369. dd.ReadMapEnd()
  29370. return v, changed
  29371. }
  29372. func (d *Decoder) fastpathDecMapInt64Uint64R(f *codecFnInfo, rv reflect.Value) {
  29373. if rv.Kind() == reflect.Ptr {
  29374. vp := rv2i(rv).(*map[int64]uint64)
  29375. if v, changed := fastpathTV.DecMapInt64Uint64V(*vp, true, d); changed {
  29376. *vp = v
  29377. }
  29378. return
  29379. }
  29380. fastpathTV.DecMapInt64Uint64V(rv2i(rv).(map[int64]uint64), false, d)
  29381. }
  29382. func (f fastpathT) DecMapInt64Uint64X(vp *map[int64]uint64, d *Decoder) {
  29383. if v, changed := f.DecMapInt64Uint64V(*vp, true, d); changed {
  29384. *vp = v
  29385. }
  29386. }
  29387. func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, canChange bool,
  29388. d *Decoder) (_ map[int64]uint64, changed bool) {
  29389. dd, esep := d.d, d.hh.hasElemSeparators()
  29390. containerLen := dd.ReadMapStart()
  29391. if canChange && v == nil {
  29392. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  29393. v = make(map[int64]uint64, xlen)
  29394. changed = true
  29395. }
  29396. if containerLen == 0 {
  29397. dd.ReadMapEnd()
  29398. return v, changed
  29399. }
  29400. var mk int64
  29401. var mv uint64
  29402. hasLen := containerLen > 0
  29403. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29404. if esep {
  29405. dd.ReadMapElemKey()
  29406. }
  29407. mk = dd.DecodeInt(64)
  29408. if esep {
  29409. dd.ReadMapElemValue()
  29410. }
  29411. if dd.TryDecodeAsNil() {
  29412. if d.h.DeleteOnNilMapValue {
  29413. delete(v, mk)
  29414. } else {
  29415. v[mk] = 0
  29416. }
  29417. continue
  29418. }
  29419. mv = dd.DecodeUint(64)
  29420. if v != nil {
  29421. v[mk] = mv
  29422. }
  29423. }
  29424. dd.ReadMapEnd()
  29425. return v, changed
  29426. }
  29427. func (d *Decoder) fastpathDecMapInt64UintptrR(f *codecFnInfo, rv reflect.Value) {
  29428. if rv.Kind() == reflect.Ptr {
  29429. vp := rv2i(rv).(*map[int64]uintptr)
  29430. if v, changed := fastpathTV.DecMapInt64UintptrV(*vp, true, d); changed {
  29431. *vp = v
  29432. }
  29433. return
  29434. }
  29435. fastpathTV.DecMapInt64UintptrV(rv2i(rv).(map[int64]uintptr), false, d)
  29436. }
  29437. func (f fastpathT) DecMapInt64UintptrX(vp *map[int64]uintptr, d *Decoder) {
  29438. if v, changed := f.DecMapInt64UintptrV(*vp, true, d); changed {
  29439. *vp = v
  29440. }
  29441. }
  29442. func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, canChange bool,
  29443. d *Decoder) (_ map[int64]uintptr, changed bool) {
  29444. dd, esep := d.d, d.hh.hasElemSeparators()
  29445. containerLen := dd.ReadMapStart()
  29446. if canChange && v == nil {
  29447. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  29448. v = make(map[int64]uintptr, xlen)
  29449. changed = true
  29450. }
  29451. if containerLen == 0 {
  29452. dd.ReadMapEnd()
  29453. return v, changed
  29454. }
  29455. var mk int64
  29456. var mv uintptr
  29457. hasLen := containerLen > 0
  29458. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29459. if esep {
  29460. dd.ReadMapElemKey()
  29461. }
  29462. mk = dd.DecodeInt(64)
  29463. if esep {
  29464. dd.ReadMapElemValue()
  29465. }
  29466. if dd.TryDecodeAsNil() {
  29467. if d.h.DeleteOnNilMapValue {
  29468. delete(v, mk)
  29469. } else {
  29470. v[mk] = 0
  29471. }
  29472. continue
  29473. }
  29474. mv = uintptr(dd.DecodeUint(uintBitsize))
  29475. if v != nil {
  29476. v[mk] = mv
  29477. }
  29478. }
  29479. dd.ReadMapEnd()
  29480. return v, changed
  29481. }
  29482. func (d *Decoder) fastpathDecMapInt64IntR(f *codecFnInfo, rv reflect.Value) {
  29483. if rv.Kind() == reflect.Ptr {
  29484. vp := rv2i(rv).(*map[int64]int)
  29485. if v, changed := fastpathTV.DecMapInt64IntV(*vp, true, d); changed {
  29486. *vp = v
  29487. }
  29488. return
  29489. }
  29490. fastpathTV.DecMapInt64IntV(rv2i(rv).(map[int64]int), false, d)
  29491. }
  29492. func (f fastpathT) DecMapInt64IntX(vp *map[int64]int, d *Decoder) {
  29493. if v, changed := f.DecMapInt64IntV(*vp, true, d); changed {
  29494. *vp = v
  29495. }
  29496. }
  29497. func (_ fastpathT) DecMapInt64IntV(v map[int64]int, canChange bool,
  29498. d *Decoder) (_ map[int64]int, changed bool) {
  29499. dd, esep := d.d, d.hh.hasElemSeparators()
  29500. containerLen := dd.ReadMapStart()
  29501. if canChange && v == nil {
  29502. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  29503. v = make(map[int64]int, xlen)
  29504. changed = true
  29505. }
  29506. if containerLen == 0 {
  29507. dd.ReadMapEnd()
  29508. return v, changed
  29509. }
  29510. var mk int64
  29511. var mv int
  29512. hasLen := containerLen > 0
  29513. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29514. if esep {
  29515. dd.ReadMapElemKey()
  29516. }
  29517. mk = dd.DecodeInt(64)
  29518. if esep {
  29519. dd.ReadMapElemValue()
  29520. }
  29521. if dd.TryDecodeAsNil() {
  29522. if d.h.DeleteOnNilMapValue {
  29523. delete(v, mk)
  29524. } else {
  29525. v[mk] = 0
  29526. }
  29527. continue
  29528. }
  29529. mv = int(dd.DecodeInt(intBitsize))
  29530. if v != nil {
  29531. v[mk] = mv
  29532. }
  29533. }
  29534. dd.ReadMapEnd()
  29535. return v, changed
  29536. }
  29537. func (d *Decoder) fastpathDecMapInt64Int8R(f *codecFnInfo, rv reflect.Value) {
  29538. if rv.Kind() == reflect.Ptr {
  29539. vp := rv2i(rv).(*map[int64]int8)
  29540. if v, changed := fastpathTV.DecMapInt64Int8V(*vp, true, d); changed {
  29541. *vp = v
  29542. }
  29543. return
  29544. }
  29545. fastpathTV.DecMapInt64Int8V(rv2i(rv).(map[int64]int8), false, d)
  29546. }
  29547. func (f fastpathT) DecMapInt64Int8X(vp *map[int64]int8, d *Decoder) {
  29548. if v, changed := f.DecMapInt64Int8V(*vp, true, d); changed {
  29549. *vp = v
  29550. }
  29551. }
  29552. func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, canChange bool,
  29553. d *Decoder) (_ map[int64]int8, changed bool) {
  29554. dd, esep := d.d, d.hh.hasElemSeparators()
  29555. containerLen := dd.ReadMapStart()
  29556. if canChange && v == nil {
  29557. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  29558. v = make(map[int64]int8, xlen)
  29559. changed = true
  29560. }
  29561. if containerLen == 0 {
  29562. dd.ReadMapEnd()
  29563. return v, changed
  29564. }
  29565. var mk int64
  29566. var mv int8
  29567. hasLen := containerLen > 0
  29568. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29569. if esep {
  29570. dd.ReadMapElemKey()
  29571. }
  29572. mk = dd.DecodeInt(64)
  29573. if esep {
  29574. dd.ReadMapElemValue()
  29575. }
  29576. if dd.TryDecodeAsNil() {
  29577. if d.h.DeleteOnNilMapValue {
  29578. delete(v, mk)
  29579. } else {
  29580. v[mk] = 0
  29581. }
  29582. continue
  29583. }
  29584. mv = int8(dd.DecodeInt(8))
  29585. if v != nil {
  29586. v[mk] = mv
  29587. }
  29588. }
  29589. dd.ReadMapEnd()
  29590. return v, changed
  29591. }
  29592. func (d *Decoder) fastpathDecMapInt64Int16R(f *codecFnInfo, rv reflect.Value) {
  29593. if rv.Kind() == reflect.Ptr {
  29594. vp := rv2i(rv).(*map[int64]int16)
  29595. if v, changed := fastpathTV.DecMapInt64Int16V(*vp, true, d); changed {
  29596. *vp = v
  29597. }
  29598. return
  29599. }
  29600. fastpathTV.DecMapInt64Int16V(rv2i(rv).(map[int64]int16), false, d)
  29601. }
  29602. func (f fastpathT) DecMapInt64Int16X(vp *map[int64]int16, d *Decoder) {
  29603. if v, changed := f.DecMapInt64Int16V(*vp, true, d); changed {
  29604. *vp = v
  29605. }
  29606. }
  29607. func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, canChange bool,
  29608. d *Decoder) (_ map[int64]int16, changed bool) {
  29609. dd, esep := d.d, d.hh.hasElemSeparators()
  29610. containerLen := dd.ReadMapStart()
  29611. if canChange && v == nil {
  29612. xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
  29613. v = make(map[int64]int16, xlen)
  29614. changed = true
  29615. }
  29616. if containerLen == 0 {
  29617. dd.ReadMapEnd()
  29618. return v, changed
  29619. }
  29620. var mk int64
  29621. var mv int16
  29622. hasLen := containerLen > 0
  29623. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29624. if esep {
  29625. dd.ReadMapElemKey()
  29626. }
  29627. mk = dd.DecodeInt(64)
  29628. if esep {
  29629. dd.ReadMapElemValue()
  29630. }
  29631. if dd.TryDecodeAsNil() {
  29632. if d.h.DeleteOnNilMapValue {
  29633. delete(v, mk)
  29634. } else {
  29635. v[mk] = 0
  29636. }
  29637. continue
  29638. }
  29639. mv = int16(dd.DecodeInt(16))
  29640. if v != nil {
  29641. v[mk] = mv
  29642. }
  29643. }
  29644. dd.ReadMapEnd()
  29645. return v, changed
  29646. }
  29647. func (d *Decoder) fastpathDecMapInt64Int32R(f *codecFnInfo, rv reflect.Value) {
  29648. if rv.Kind() == reflect.Ptr {
  29649. vp := rv2i(rv).(*map[int64]int32)
  29650. if v, changed := fastpathTV.DecMapInt64Int32V(*vp, true, d); changed {
  29651. *vp = v
  29652. }
  29653. return
  29654. }
  29655. fastpathTV.DecMapInt64Int32V(rv2i(rv).(map[int64]int32), false, d)
  29656. }
  29657. func (f fastpathT) DecMapInt64Int32X(vp *map[int64]int32, d *Decoder) {
  29658. if v, changed := f.DecMapInt64Int32V(*vp, true, d); changed {
  29659. *vp = v
  29660. }
  29661. }
  29662. func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, canChange bool,
  29663. d *Decoder) (_ map[int64]int32, changed bool) {
  29664. dd, esep := d.d, d.hh.hasElemSeparators()
  29665. containerLen := dd.ReadMapStart()
  29666. if canChange && v == nil {
  29667. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  29668. v = make(map[int64]int32, xlen)
  29669. changed = true
  29670. }
  29671. if containerLen == 0 {
  29672. dd.ReadMapEnd()
  29673. return v, changed
  29674. }
  29675. var mk int64
  29676. var mv int32
  29677. hasLen := containerLen > 0
  29678. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29679. if esep {
  29680. dd.ReadMapElemKey()
  29681. }
  29682. mk = dd.DecodeInt(64)
  29683. if esep {
  29684. dd.ReadMapElemValue()
  29685. }
  29686. if dd.TryDecodeAsNil() {
  29687. if d.h.DeleteOnNilMapValue {
  29688. delete(v, mk)
  29689. } else {
  29690. v[mk] = 0
  29691. }
  29692. continue
  29693. }
  29694. mv = int32(dd.DecodeInt(32))
  29695. if v != nil {
  29696. v[mk] = mv
  29697. }
  29698. }
  29699. dd.ReadMapEnd()
  29700. return v, changed
  29701. }
  29702. func (d *Decoder) fastpathDecMapInt64Int64R(f *codecFnInfo, rv reflect.Value) {
  29703. if rv.Kind() == reflect.Ptr {
  29704. vp := rv2i(rv).(*map[int64]int64)
  29705. if v, changed := fastpathTV.DecMapInt64Int64V(*vp, true, d); changed {
  29706. *vp = v
  29707. }
  29708. return
  29709. }
  29710. fastpathTV.DecMapInt64Int64V(rv2i(rv).(map[int64]int64), false, d)
  29711. }
  29712. func (f fastpathT) DecMapInt64Int64X(vp *map[int64]int64, d *Decoder) {
  29713. if v, changed := f.DecMapInt64Int64V(*vp, true, d); changed {
  29714. *vp = v
  29715. }
  29716. }
  29717. func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, canChange bool,
  29718. d *Decoder) (_ map[int64]int64, changed bool) {
  29719. dd, esep := d.d, d.hh.hasElemSeparators()
  29720. containerLen := dd.ReadMapStart()
  29721. if canChange && v == nil {
  29722. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  29723. v = make(map[int64]int64, xlen)
  29724. changed = true
  29725. }
  29726. if containerLen == 0 {
  29727. dd.ReadMapEnd()
  29728. return v, changed
  29729. }
  29730. var mk int64
  29731. var mv int64
  29732. hasLen := containerLen > 0
  29733. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29734. if esep {
  29735. dd.ReadMapElemKey()
  29736. }
  29737. mk = dd.DecodeInt(64)
  29738. if esep {
  29739. dd.ReadMapElemValue()
  29740. }
  29741. if dd.TryDecodeAsNil() {
  29742. if d.h.DeleteOnNilMapValue {
  29743. delete(v, mk)
  29744. } else {
  29745. v[mk] = 0
  29746. }
  29747. continue
  29748. }
  29749. mv = dd.DecodeInt(64)
  29750. if v != nil {
  29751. v[mk] = mv
  29752. }
  29753. }
  29754. dd.ReadMapEnd()
  29755. return v, changed
  29756. }
  29757. func (d *Decoder) fastpathDecMapInt64Float32R(f *codecFnInfo, rv reflect.Value) {
  29758. if rv.Kind() == reflect.Ptr {
  29759. vp := rv2i(rv).(*map[int64]float32)
  29760. if v, changed := fastpathTV.DecMapInt64Float32V(*vp, true, d); changed {
  29761. *vp = v
  29762. }
  29763. return
  29764. }
  29765. fastpathTV.DecMapInt64Float32V(rv2i(rv).(map[int64]float32), false, d)
  29766. }
  29767. func (f fastpathT) DecMapInt64Float32X(vp *map[int64]float32, d *Decoder) {
  29768. if v, changed := f.DecMapInt64Float32V(*vp, true, d); changed {
  29769. *vp = v
  29770. }
  29771. }
  29772. func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, canChange bool,
  29773. d *Decoder) (_ map[int64]float32, changed bool) {
  29774. dd, esep := d.d, d.hh.hasElemSeparators()
  29775. containerLen := dd.ReadMapStart()
  29776. if canChange && v == nil {
  29777. xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
  29778. v = make(map[int64]float32, xlen)
  29779. changed = true
  29780. }
  29781. if containerLen == 0 {
  29782. dd.ReadMapEnd()
  29783. return v, changed
  29784. }
  29785. var mk int64
  29786. var mv float32
  29787. hasLen := containerLen > 0
  29788. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29789. if esep {
  29790. dd.ReadMapElemKey()
  29791. }
  29792. mk = dd.DecodeInt(64)
  29793. if esep {
  29794. dd.ReadMapElemValue()
  29795. }
  29796. if dd.TryDecodeAsNil() {
  29797. if d.h.DeleteOnNilMapValue {
  29798. delete(v, mk)
  29799. } else {
  29800. v[mk] = 0
  29801. }
  29802. continue
  29803. }
  29804. mv = float32(dd.DecodeFloat(true))
  29805. if v != nil {
  29806. v[mk] = mv
  29807. }
  29808. }
  29809. dd.ReadMapEnd()
  29810. return v, changed
  29811. }
  29812. func (d *Decoder) fastpathDecMapInt64Float64R(f *codecFnInfo, rv reflect.Value) {
  29813. if rv.Kind() == reflect.Ptr {
  29814. vp := rv2i(rv).(*map[int64]float64)
  29815. if v, changed := fastpathTV.DecMapInt64Float64V(*vp, true, d); changed {
  29816. *vp = v
  29817. }
  29818. return
  29819. }
  29820. fastpathTV.DecMapInt64Float64V(rv2i(rv).(map[int64]float64), false, d)
  29821. }
  29822. func (f fastpathT) DecMapInt64Float64X(vp *map[int64]float64, d *Decoder) {
  29823. if v, changed := f.DecMapInt64Float64V(*vp, true, d); changed {
  29824. *vp = v
  29825. }
  29826. }
  29827. func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, canChange bool,
  29828. d *Decoder) (_ map[int64]float64, changed bool) {
  29829. dd, esep := d.d, d.hh.hasElemSeparators()
  29830. containerLen := dd.ReadMapStart()
  29831. if canChange && v == nil {
  29832. xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
  29833. v = make(map[int64]float64, xlen)
  29834. changed = true
  29835. }
  29836. if containerLen == 0 {
  29837. dd.ReadMapEnd()
  29838. return v, changed
  29839. }
  29840. var mk int64
  29841. var mv float64
  29842. hasLen := containerLen > 0
  29843. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29844. if esep {
  29845. dd.ReadMapElemKey()
  29846. }
  29847. mk = dd.DecodeInt(64)
  29848. if esep {
  29849. dd.ReadMapElemValue()
  29850. }
  29851. if dd.TryDecodeAsNil() {
  29852. if d.h.DeleteOnNilMapValue {
  29853. delete(v, mk)
  29854. } else {
  29855. v[mk] = 0
  29856. }
  29857. continue
  29858. }
  29859. mv = dd.DecodeFloat(false)
  29860. if v != nil {
  29861. v[mk] = mv
  29862. }
  29863. }
  29864. dd.ReadMapEnd()
  29865. return v, changed
  29866. }
  29867. func (d *Decoder) fastpathDecMapInt64BoolR(f *codecFnInfo, rv reflect.Value) {
  29868. if rv.Kind() == reflect.Ptr {
  29869. vp := rv2i(rv).(*map[int64]bool)
  29870. if v, changed := fastpathTV.DecMapInt64BoolV(*vp, true, d); changed {
  29871. *vp = v
  29872. }
  29873. return
  29874. }
  29875. fastpathTV.DecMapInt64BoolV(rv2i(rv).(map[int64]bool), false, d)
  29876. }
  29877. func (f fastpathT) DecMapInt64BoolX(vp *map[int64]bool, d *Decoder) {
  29878. if v, changed := f.DecMapInt64BoolV(*vp, true, d); changed {
  29879. *vp = v
  29880. }
  29881. }
  29882. func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, canChange bool,
  29883. d *Decoder) (_ map[int64]bool, changed bool) {
  29884. dd, esep := d.d, d.hh.hasElemSeparators()
  29885. containerLen := dd.ReadMapStart()
  29886. if canChange && v == nil {
  29887. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  29888. v = make(map[int64]bool, xlen)
  29889. changed = true
  29890. }
  29891. if containerLen == 0 {
  29892. dd.ReadMapEnd()
  29893. return v, changed
  29894. }
  29895. var mk int64
  29896. var mv bool
  29897. hasLen := containerLen > 0
  29898. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29899. if esep {
  29900. dd.ReadMapElemKey()
  29901. }
  29902. mk = dd.DecodeInt(64)
  29903. if esep {
  29904. dd.ReadMapElemValue()
  29905. }
  29906. if dd.TryDecodeAsNil() {
  29907. if d.h.DeleteOnNilMapValue {
  29908. delete(v, mk)
  29909. } else {
  29910. v[mk] = false
  29911. }
  29912. continue
  29913. }
  29914. mv = dd.DecodeBool()
  29915. if v != nil {
  29916. v[mk] = mv
  29917. }
  29918. }
  29919. dd.ReadMapEnd()
  29920. return v, changed
  29921. }
  29922. func (d *Decoder) fastpathDecMapBoolIntfR(f *codecFnInfo, rv reflect.Value) {
  29923. if rv.Kind() == reflect.Ptr {
  29924. vp := rv2i(rv).(*map[bool]interface{})
  29925. if v, changed := fastpathTV.DecMapBoolIntfV(*vp, true, d); changed {
  29926. *vp = v
  29927. }
  29928. return
  29929. }
  29930. fastpathTV.DecMapBoolIntfV(rv2i(rv).(map[bool]interface{}), false, d)
  29931. }
  29932. func (f fastpathT) DecMapBoolIntfX(vp *map[bool]interface{}, d *Decoder) {
  29933. if v, changed := f.DecMapBoolIntfV(*vp, true, d); changed {
  29934. *vp = v
  29935. }
  29936. }
  29937. func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, canChange bool,
  29938. d *Decoder) (_ map[bool]interface{}, changed bool) {
  29939. dd, esep := d.d, d.hh.hasElemSeparators()
  29940. containerLen := dd.ReadMapStart()
  29941. if canChange && v == nil {
  29942. xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
  29943. v = make(map[bool]interface{}, xlen)
  29944. changed = true
  29945. }
  29946. if containerLen == 0 {
  29947. dd.ReadMapEnd()
  29948. return v, changed
  29949. }
  29950. mapGet := !d.h.MapValueReset && !d.h.InterfaceReset
  29951. var mk bool
  29952. var mv interface{}
  29953. hasLen := containerLen > 0
  29954. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  29955. if esep {
  29956. dd.ReadMapElemKey()
  29957. }
  29958. mk = dd.DecodeBool()
  29959. if esep {
  29960. dd.ReadMapElemValue()
  29961. }
  29962. if dd.TryDecodeAsNil() {
  29963. if d.h.DeleteOnNilMapValue {
  29964. delete(v, mk)
  29965. } else {
  29966. v[mk] = nil
  29967. }
  29968. continue
  29969. }
  29970. if mapGet {
  29971. mv = v[mk]
  29972. } else {
  29973. mv = nil
  29974. }
  29975. d.decode(&mv)
  29976. if v != nil {
  29977. v[mk] = mv
  29978. }
  29979. }
  29980. dd.ReadMapEnd()
  29981. return v, changed
  29982. }
  29983. func (d *Decoder) fastpathDecMapBoolStringR(f *codecFnInfo, rv reflect.Value) {
  29984. if rv.Kind() == reflect.Ptr {
  29985. vp := rv2i(rv).(*map[bool]string)
  29986. if v, changed := fastpathTV.DecMapBoolStringV(*vp, true, d); changed {
  29987. *vp = v
  29988. }
  29989. return
  29990. }
  29991. fastpathTV.DecMapBoolStringV(rv2i(rv).(map[bool]string), false, d)
  29992. }
  29993. func (f fastpathT) DecMapBoolStringX(vp *map[bool]string, d *Decoder) {
  29994. if v, changed := f.DecMapBoolStringV(*vp, true, d); changed {
  29995. *vp = v
  29996. }
  29997. }
  29998. func (_ fastpathT) DecMapBoolStringV(v map[bool]string, canChange bool,
  29999. d *Decoder) (_ map[bool]string, changed bool) {
  30000. dd, esep := d.d, d.hh.hasElemSeparators()
  30001. containerLen := dd.ReadMapStart()
  30002. if canChange && v == nil {
  30003. xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
  30004. v = make(map[bool]string, xlen)
  30005. changed = true
  30006. }
  30007. if containerLen == 0 {
  30008. dd.ReadMapEnd()
  30009. return v, changed
  30010. }
  30011. var mk bool
  30012. var mv string
  30013. hasLen := containerLen > 0
  30014. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30015. if esep {
  30016. dd.ReadMapElemKey()
  30017. }
  30018. mk = dd.DecodeBool()
  30019. if esep {
  30020. dd.ReadMapElemValue()
  30021. }
  30022. if dd.TryDecodeAsNil() {
  30023. if d.h.DeleteOnNilMapValue {
  30024. delete(v, mk)
  30025. } else {
  30026. v[mk] = ""
  30027. }
  30028. continue
  30029. }
  30030. mv = dd.DecodeString()
  30031. if v != nil {
  30032. v[mk] = mv
  30033. }
  30034. }
  30035. dd.ReadMapEnd()
  30036. return v, changed
  30037. }
  30038. func (d *Decoder) fastpathDecMapBoolUintR(f *codecFnInfo, rv reflect.Value) {
  30039. if rv.Kind() == reflect.Ptr {
  30040. vp := rv2i(rv).(*map[bool]uint)
  30041. if v, changed := fastpathTV.DecMapBoolUintV(*vp, true, d); changed {
  30042. *vp = v
  30043. }
  30044. return
  30045. }
  30046. fastpathTV.DecMapBoolUintV(rv2i(rv).(map[bool]uint), false, d)
  30047. }
  30048. func (f fastpathT) DecMapBoolUintX(vp *map[bool]uint, d *Decoder) {
  30049. if v, changed := f.DecMapBoolUintV(*vp, true, d); changed {
  30050. *vp = v
  30051. }
  30052. }
  30053. func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, canChange bool,
  30054. d *Decoder) (_ map[bool]uint, changed bool) {
  30055. dd, esep := d.d, d.hh.hasElemSeparators()
  30056. containerLen := dd.ReadMapStart()
  30057. if canChange && v == nil {
  30058. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  30059. v = make(map[bool]uint, xlen)
  30060. changed = true
  30061. }
  30062. if containerLen == 0 {
  30063. dd.ReadMapEnd()
  30064. return v, changed
  30065. }
  30066. var mk bool
  30067. var mv uint
  30068. hasLen := containerLen > 0
  30069. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30070. if esep {
  30071. dd.ReadMapElemKey()
  30072. }
  30073. mk = dd.DecodeBool()
  30074. if esep {
  30075. dd.ReadMapElemValue()
  30076. }
  30077. if dd.TryDecodeAsNil() {
  30078. if d.h.DeleteOnNilMapValue {
  30079. delete(v, mk)
  30080. } else {
  30081. v[mk] = 0
  30082. }
  30083. continue
  30084. }
  30085. mv = uint(dd.DecodeUint(uintBitsize))
  30086. if v != nil {
  30087. v[mk] = mv
  30088. }
  30089. }
  30090. dd.ReadMapEnd()
  30091. return v, changed
  30092. }
  30093. func (d *Decoder) fastpathDecMapBoolUint8R(f *codecFnInfo, rv reflect.Value) {
  30094. if rv.Kind() == reflect.Ptr {
  30095. vp := rv2i(rv).(*map[bool]uint8)
  30096. if v, changed := fastpathTV.DecMapBoolUint8V(*vp, true, d); changed {
  30097. *vp = v
  30098. }
  30099. return
  30100. }
  30101. fastpathTV.DecMapBoolUint8V(rv2i(rv).(map[bool]uint8), false, d)
  30102. }
  30103. func (f fastpathT) DecMapBoolUint8X(vp *map[bool]uint8, d *Decoder) {
  30104. if v, changed := f.DecMapBoolUint8V(*vp, true, d); changed {
  30105. *vp = v
  30106. }
  30107. }
  30108. func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, canChange bool,
  30109. d *Decoder) (_ map[bool]uint8, changed bool) {
  30110. dd, esep := d.d, d.hh.hasElemSeparators()
  30111. containerLen := dd.ReadMapStart()
  30112. if canChange && v == nil {
  30113. xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
  30114. v = make(map[bool]uint8, xlen)
  30115. changed = true
  30116. }
  30117. if containerLen == 0 {
  30118. dd.ReadMapEnd()
  30119. return v, changed
  30120. }
  30121. var mk bool
  30122. var mv uint8
  30123. hasLen := containerLen > 0
  30124. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30125. if esep {
  30126. dd.ReadMapElemKey()
  30127. }
  30128. mk = dd.DecodeBool()
  30129. if esep {
  30130. dd.ReadMapElemValue()
  30131. }
  30132. if dd.TryDecodeAsNil() {
  30133. if d.h.DeleteOnNilMapValue {
  30134. delete(v, mk)
  30135. } else {
  30136. v[mk] = 0
  30137. }
  30138. continue
  30139. }
  30140. mv = uint8(dd.DecodeUint(8))
  30141. if v != nil {
  30142. v[mk] = mv
  30143. }
  30144. }
  30145. dd.ReadMapEnd()
  30146. return v, changed
  30147. }
  30148. func (d *Decoder) fastpathDecMapBoolUint16R(f *codecFnInfo, rv reflect.Value) {
  30149. if rv.Kind() == reflect.Ptr {
  30150. vp := rv2i(rv).(*map[bool]uint16)
  30151. if v, changed := fastpathTV.DecMapBoolUint16V(*vp, true, d); changed {
  30152. *vp = v
  30153. }
  30154. return
  30155. }
  30156. fastpathTV.DecMapBoolUint16V(rv2i(rv).(map[bool]uint16), false, d)
  30157. }
  30158. func (f fastpathT) DecMapBoolUint16X(vp *map[bool]uint16, d *Decoder) {
  30159. if v, changed := f.DecMapBoolUint16V(*vp, true, d); changed {
  30160. *vp = v
  30161. }
  30162. }
  30163. func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, canChange bool,
  30164. d *Decoder) (_ map[bool]uint16, changed bool) {
  30165. dd, esep := d.d, d.hh.hasElemSeparators()
  30166. containerLen := dd.ReadMapStart()
  30167. if canChange && v == nil {
  30168. xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
  30169. v = make(map[bool]uint16, xlen)
  30170. changed = true
  30171. }
  30172. if containerLen == 0 {
  30173. dd.ReadMapEnd()
  30174. return v, changed
  30175. }
  30176. var mk bool
  30177. var mv uint16
  30178. hasLen := containerLen > 0
  30179. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30180. if esep {
  30181. dd.ReadMapElemKey()
  30182. }
  30183. mk = dd.DecodeBool()
  30184. if esep {
  30185. dd.ReadMapElemValue()
  30186. }
  30187. if dd.TryDecodeAsNil() {
  30188. if d.h.DeleteOnNilMapValue {
  30189. delete(v, mk)
  30190. } else {
  30191. v[mk] = 0
  30192. }
  30193. continue
  30194. }
  30195. mv = uint16(dd.DecodeUint(16))
  30196. if v != nil {
  30197. v[mk] = mv
  30198. }
  30199. }
  30200. dd.ReadMapEnd()
  30201. return v, changed
  30202. }
  30203. func (d *Decoder) fastpathDecMapBoolUint32R(f *codecFnInfo, rv reflect.Value) {
  30204. if rv.Kind() == reflect.Ptr {
  30205. vp := rv2i(rv).(*map[bool]uint32)
  30206. if v, changed := fastpathTV.DecMapBoolUint32V(*vp, true, d); changed {
  30207. *vp = v
  30208. }
  30209. return
  30210. }
  30211. fastpathTV.DecMapBoolUint32V(rv2i(rv).(map[bool]uint32), false, d)
  30212. }
  30213. func (f fastpathT) DecMapBoolUint32X(vp *map[bool]uint32, d *Decoder) {
  30214. if v, changed := f.DecMapBoolUint32V(*vp, true, d); changed {
  30215. *vp = v
  30216. }
  30217. }
  30218. func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, canChange bool,
  30219. d *Decoder) (_ map[bool]uint32, changed bool) {
  30220. dd, esep := d.d, d.hh.hasElemSeparators()
  30221. containerLen := dd.ReadMapStart()
  30222. if canChange && v == nil {
  30223. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  30224. v = make(map[bool]uint32, xlen)
  30225. changed = true
  30226. }
  30227. if containerLen == 0 {
  30228. dd.ReadMapEnd()
  30229. return v, changed
  30230. }
  30231. var mk bool
  30232. var mv uint32
  30233. hasLen := containerLen > 0
  30234. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30235. if esep {
  30236. dd.ReadMapElemKey()
  30237. }
  30238. mk = dd.DecodeBool()
  30239. if esep {
  30240. dd.ReadMapElemValue()
  30241. }
  30242. if dd.TryDecodeAsNil() {
  30243. if d.h.DeleteOnNilMapValue {
  30244. delete(v, mk)
  30245. } else {
  30246. v[mk] = 0
  30247. }
  30248. continue
  30249. }
  30250. mv = uint32(dd.DecodeUint(32))
  30251. if v != nil {
  30252. v[mk] = mv
  30253. }
  30254. }
  30255. dd.ReadMapEnd()
  30256. return v, changed
  30257. }
  30258. func (d *Decoder) fastpathDecMapBoolUint64R(f *codecFnInfo, rv reflect.Value) {
  30259. if rv.Kind() == reflect.Ptr {
  30260. vp := rv2i(rv).(*map[bool]uint64)
  30261. if v, changed := fastpathTV.DecMapBoolUint64V(*vp, true, d); changed {
  30262. *vp = v
  30263. }
  30264. return
  30265. }
  30266. fastpathTV.DecMapBoolUint64V(rv2i(rv).(map[bool]uint64), false, d)
  30267. }
  30268. func (f fastpathT) DecMapBoolUint64X(vp *map[bool]uint64, d *Decoder) {
  30269. if v, changed := f.DecMapBoolUint64V(*vp, true, d); changed {
  30270. *vp = v
  30271. }
  30272. }
  30273. func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, canChange bool,
  30274. d *Decoder) (_ map[bool]uint64, changed bool) {
  30275. dd, esep := d.d, d.hh.hasElemSeparators()
  30276. containerLen := dd.ReadMapStart()
  30277. if canChange && v == nil {
  30278. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  30279. v = make(map[bool]uint64, xlen)
  30280. changed = true
  30281. }
  30282. if containerLen == 0 {
  30283. dd.ReadMapEnd()
  30284. return v, changed
  30285. }
  30286. var mk bool
  30287. var mv uint64
  30288. hasLen := containerLen > 0
  30289. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30290. if esep {
  30291. dd.ReadMapElemKey()
  30292. }
  30293. mk = dd.DecodeBool()
  30294. if esep {
  30295. dd.ReadMapElemValue()
  30296. }
  30297. if dd.TryDecodeAsNil() {
  30298. if d.h.DeleteOnNilMapValue {
  30299. delete(v, mk)
  30300. } else {
  30301. v[mk] = 0
  30302. }
  30303. continue
  30304. }
  30305. mv = dd.DecodeUint(64)
  30306. if v != nil {
  30307. v[mk] = mv
  30308. }
  30309. }
  30310. dd.ReadMapEnd()
  30311. return v, changed
  30312. }
  30313. func (d *Decoder) fastpathDecMapBoolUintptrR(f *codecFnInfo, rv reflect.Value) {
  30314. if rv.Kind() == reflect.Ptr {
  30315. vp := rv2i(rv).(*map[bool]uintptr)
  30316. if v, changed := fastpathTV.DecMapBoolUintptrV(*vp, true, d); changed {
  30317. *vp = v
  30318. }
  30319. return
  30320. }
  30321. fastpathTV.DecMapBoolUintptrV(rv2i(rv).(map[bool]uintptr), false, d)
  30322. }
  30323. func (f fastpathT) DecMapBoolUintptrX(vp *map[bool]uintptr, d *Decoder) {
  30324. if v, changed := f.DecMapBoolUintptrV(*vp, true, d); changed {
  30325. *vp = v
  30326. }
  30327. }
  30328. func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, canChange bool,
  30329. d *Decoder) (_ map[bool]uintptr, changed bool) {
  30330. dd, esep := d.d, d.hh.hasElemSeparators()
  30331. containerLen := dd.ReadMapStart()
  30332. if canChange && v == nil {
  30333. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  30334. v = make(map[bool]uintptr, xlen)
  30335. changed = true
  30336. }
  30337. if containerLen == 0 {
  30338. dd.ReadMapEnd()
  30339. return v, changed
  30340. }
  30341. var mk bool
  30342. var mv uintptr
  30343. hasLen := containerLen > 0
  30344. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30345. if esep {
  30346. dd.ReadMapElemKey()
  30347. }
  30348. mk = dd.DecodeBool()
  30349. if esep {
  30350. dd.ReadMapElemValue()
  30351. }
  30352. if dd.TryDecodeAsNil() {
  30353. if d.h.DeleteOnNilMapValue {
  30354. delete(v, mk)
  30355. } else {
  30356. v[mk] = 0
  30357. }
  30358. continue
  30359. }
  30360. mv = uintptr(dd.DecodeUint(uintBitsize))
  30361. if v != nil {
  30362. v[mk] = mv
  30363. }
  30364. }
  30365. dd.ReadMapEnd()
  30366. return v, changed
  30367. }
  30368. func (d *Decoder) fastpathDecMapBoolIntR(f *codecFnInfo, rv reflect.Value) {
  30369. if rv.Kind() == reflect.Ptr {
  30370. vp := rv2i(rv).(*map[bool]int)
  30371. if v, changed := fastpathTV.DecMapBoolIntV(*vp, true, d); changed {
  30372. *vp = v
  30373. }
  30374. return
  30375. }
  30376. fastpathTV.DecMapBoolIntV(rv2i(rv).(map[bool]int), false, d)
  30377. }
  30378. func (f fastpathT) DecMapBoolIntX(vp *map[bool]int, d *Decoder) {
  30379. if v, changed := f.DecMapBoolIntV(*vp, true, d); changed {
  30380. *vp = v
  30381. }
  30382. }
  30383. func (_ fastpathT) DecMapBoolIntV(v map[bool]int, canChange bool,
  30384. d *Decoder) (_ map[bool]int, changed bool) {
  30385. dd, esep := d.d, d.hh.hasElemSeparators()
  30386. containerLen := dd.ReadMapStart()
  30387. if canChange && v == nil {
  30388. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  30389. v = make(map[bool]int, xlen)
  30390. changed = true
  30391. }
  30392. if containerLen == 0 {
  30393. dd.ReadMapEnd()
  30394. return v, changed
  30395. }
  30396. var mk bool
  30397. var mv int
  30398. hasLen := containerLen > 0
  30399. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30400. if esep {
  30401. dd.ReadMapElemKey()
  30402. }
  30403. mk = dd.DecodeBool()
  30404. if esep {
  30405. dd.ReadMapElemValue()
  30406. }
  30407. if dd.TryDecodeAsNil() {
  30408. if d.h.DeleteOnNilMapValue {
  30409. delete(v, mk)
  30410. } else {
  30411. v[mk] = 0
  30412. }
  30413. continue
  30414. }
  30415. mv = int(dd.DecodeInt(intBitsize))
  30416. if v != nil {
  30417. v[mk] = mv
  30418. }
  30419. }
  30420. dd.ReadMapEnd()
  30421. return v, changed
  30422. }
  30423. func (d *Decoder) fastpathDecMapBoolInt8R(f *codecFnInfo, rv reflect.Value) {
  30424. if rv.Kind() == reflect.Ptr {
  30425. vp := rv2i(rv).(*map[bool]int8)
  30426. if v, changed := fastpathTV.DecMapBoolInt8V(*vp, true, d); changed {
  30427. *vp = v
  30428. }
  30429. return
  30430. }
  30431. fastpathTV.DecMapBoolInt8V(rv2i(rv).(map[bool]int8), false, d)
  30432. }
  30433. func (f fastpathT) DecMapBoolInt8X(vp *map[bool]int8, d *Decoder) {
  30434. if v, changed := f.DecMapBoolInt8V(*vp, true, d); changed {
  30435. *vp = v
  30436. }
  30437. }
  30438. func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, canChange bool,
  30439. d *Decoder) (_ map[bool]int8, changed bool) {
  30440. dd, esep := d.d, d.hh.hasElemSeparators()
  30441. containerLen := dd.ReadMapStart()
  30442. if canChange && v == nil {
  30443. xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
  30444. v = make(map[bool]int8, xlen)
  30445. changed = true
  30446. }
  30447. if containerLen == 0 {
  30448. dd.ReadMapEnd()
  30449. return v, changed
  30450. }
  30451. var mk bool
  30452. var mv int8
  30453. hasLen := containerLen > 0
  30454. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30455. if esep {
  30456. dd.ReadMapElemKey()
  30457. }
  30458. mk = dd.DecodeBool()
  30459. if esep {
  30460. dd.ReadMapElemValue()
  30461. }
  30462. if dd.TryDecodeAsNil() {
  30463. if d.h.DeleteOnNilMapValue {
  30464. delete(v, mk)
  30465. } else {
  30466. v[mk] = 0
  30467. }
  30468. continue
  30469. }
  30470. mv = int8(dd.DecodeInt(8))
  30471. if v != nil {
  30472. v[mk] = mv
  30473. }
  30474. }
  30475. dd.ReadMapEnd()
  30476. return v, changed
  30477. }
  30478. func (d *Decoder) fastpathDecMapBoolInt16R(f *codecFnInfo, rv reflect.Value) {
  30479. if rv.Kind() == reflect.Ptr {
  30480. vp := rv2i(rv).(*map[bool]int16)
  30481. if v, changed := fastpathTV.DecMapBoolInt16V(*vp, true, d); changed {
  30482. *vp = v
  30483. }
  30484. return
  30485. }
  30486. fastpathTV.DecMapBoolInt16V(rv2i(rv).(map[bool]int16), false, d)
  30487. }
  30488. func (f fastpathT) DecMapBoolInt16X(vp *map[bool]int16, d *Decoder) {
  30489. if v, changed := f.DecMapBoolInt16V(*vp, true, d); changed {
  30490. *vp = v
  30491. }
  30492. }
  30493. func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, canChange bool,
  30494. d *Decoder) (_ map[bool]int16, changed bool) {
  30495. dd, esep := d.d, d.hh.hasElemSeparators()
  30496. containerLen := dd.ReadMapStart()
  30497. if canChange && v == nil {
  30498. xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
  30499. v = make(map[bool]int16, xlen)
  30500. changed = true
  30501. }
  30502. if containerLen == 0 {
  30503. dd.ReadMapEnd()
  30504. return v, changed
  30505. }
  30506. var mk bool
  30507. var mv int16
  30508. hasLen := containerLen > 0
  30509. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30510. if esep {
  30511. dd.ReadMapElemKey()
  30512. }
  30513. mk = dd.DecodeBool()
  30514. if esep {
  30515. dd.ReadMapElemValue()
  30516. }
  30517. if dd.TryDecodeAsNil() {
  30518. if d.h.DeleteOnNilMapValue {
  30519. delete(v, mk)
  30520. } else {
  30521. v[mk] = 0
  30522. }
  30523. continue
  30524. }
  30525. mv = int16(dd.DecodeInt(16))
  30526. if v != nil {
  30527. v[mk] = mv
  30528. }
  30529. }
  30530. dd.ReadMapEnd()
  30531. return v, changed
  30532. }
  30533. func (d *Decoder) fastpathDecMapBoolInt32R(f *codecFnInfo, rv reflect.Value) {
  30534. if rv.Kind() == reflect.Ptr {
  30535. vp := rv2i(rv).(*map[bool]int32)
  30536. if v, changed := fastpathTV.DecMapBoolInt32V(*vp, true, d); changed {
  30537. *vp = v
  30538. }
  30539. return
  30540. }
  30541. fastpathTV.DecMapBoolInt32V(rv2i(rv).(map[bool]int32), false, d)
  30542. }
  30543. func (f fastpathT) DecMapBoolInt32X(vp *map[bool]int32, d *Decoder) {
  30544. if v, changed := f.DecMapBoolInt32V(*vp, true, d); changed {
  30545. *vp = v
  30546. }
  30547. }
  30548. func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, canChange bool,
  30549. d *Decoder) (_ map[bool]int32, changed bool) {
  30550. dd, esep := d.d, d.hh.hasElemSeparators()
  30551. containerLen := dd.ReadMapStart()
  30552. if canChange && v == nil {
  30553. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  30554. v = make(map[bool]int32, xlen)
  30555. changed = true
  30556. }
  30557. if containerLen == 0 {
  30558. dd.ReadMapEnd()
  30559. return v, changed
  30560. }
  30561. var mk bool
  30562. var mv int32
  30563. hasLen := containerLen > 0
  30564. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30565. if esep {
  30566. dd.ReadMapElemKey()
  30567. }
  30568. mk = dd.DecodeBool()
  30569. if esep {
  30570. dd.ReadMapElemValue()
  30571. }
  30572. if dd.TryDecodeAsNil() {
  30573. if d.h.DeleteOnNilMapValue {
  30574. delete(v, mk)
  30575. } else {
  30576. v[mk] = 0
  30577. }
  30578. continue
  30579. }
  30580. mv = int32(dd.DecodeInt(32))
  30581. if v != nil {
  30582. v[mk] = mv
  30583. }
  30584. }
  30585. dd.ReadMapEnd()
  30586. return v, changed
  30587. }
  30588. func (d *Decoder) fastpathDecMapBoolInt64R(f *codecFnInfo, rv reflect.Value) {
  30589. if rv.Kind() == reflect.Ptr {
  30590. vp := rv2i(rv).(*map[bool]int64)
  30591. if v, changed := fastpathTV.DecMapBoolInt64V(*vp, true, d); changed {
  30592. *vp = v
  30593. }
  30594. return
  30595. }
  30596. fastpathTV.DecMapBoolInt64V(rv2i(rv).(map[bool]int64), false, d)
  30597. }
  30598. func (f fastpathT) DecMapBoolInt64X(vp *map[bool]int64, d *Decoder) {
  30599. if v, changed := f.DecMapBoolInt64V(*vp, true, d); changed {
  30600. *vp = v
  30601. }
  30602. }
  30603. func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, canChange bool,
  30604. d *Decoder) (_ map[bool]int64, changed bool) {
  30605. dd, esep := d.d, d.hh.hasElemSeparators()
  30606. containerLen := dd.ReadMapStart()
  30607. if canChange && v == nil {
  30608. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  30609. v = make(map[bool]int64, xlen)
  30610. changed = true
  30611. }
  30612. if containerLen == 0 {
  30613. dd.ReadMapEnd()
  30614. return v, changed
  30615. }
  30616. var mk bool
  30617. var mv int64
  30618. hasLen := containerLen > 0
  30619. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30620. if esep {
  30621. dd.ReadMapElemKey()
  30622. }
  30623. mk = dd.DecodeBool()
  30624. if esep {
  30625. dd.ReadMapElemValue()
  30626. }
  30627. if dd.TryDecodeAsNil() {
  30628. if d.h.DeleteOnNilMapValue {
  30629. delete(v, mk)
  30630. } else {
  30631. v[mk] = 0
  30632. }
  30633. continue
  30634. }
  30635. mv = dd.DecodeInt(64)
  30636. if v != nil {
  30637. v[mk] = mv
  30638. }
  30639. }
  30640. dd.ReadMapEnd()
  30641. return v, changed
  30642. }
  30643. func (d *Decoder) fastpathDecMapBoolFloat32R(f *codecFnInfo, rv reflect.Value) {
  30644. if rv.Kind() == reflect.Ptr {
  30645. vp := rv2i(rv).(*map[bool]float32)
  30646. if v, changed := fastpathTV.DecMapBoolFloat32V(*vp, true, d); changed {
  30647. *vp = v
  30648. }
  30649. return
  30650. }
  30651. fastpathTV.DecMapBoolFloat32V(rv2i(rv).(map[bool]float32), false, d)
  30652. }
  30653. func (f fastpathT) DecMapBoolFloat32X(vp *map[bool]float32, d *Decoder) {
  30654. if v, changed := f.DecMapBoolFloat32V(*vp, true, d); changed {
  30655. *vp = v
  30656. }
  30657. }
  30658. func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, canChange bool,
  30659. d *Decoder) (_ map[bool]float32, changed bool) {
  30660. dd, esep := d.d, d.hh.hasElemSeparators()
  30661. containerLen := dd.ReadMapStart()
  30662. if canChange && v == nil {
  30663. xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
  30664. v = make(map[bool]float32, xlen)
  30665. changed = true
  30666. }
  30667. if containerLen == 0 {
  30668. dd.ReadMapEnd()
  30669. return v, changed
  30670. }
  30671. var mk bool
  30672. var mv float32
  30673. hasLen := containerLen > 0
  30674. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30675. if esep {
  30676. dd.ReadMapElemKey()
  30677. }
  30678. mk = dd.DecodeBool()
  30679. if esep {
  30680. dd.ReadMapElemValue()
  30681. }
  30682. if dd.TryDecodeAsNil() {
  30683. if d.h.DeleteOnNilMapValue {
  30684. delete(v, mk)
  30685. } else {
  30686. v[mk] = 0
  30687. }
  30688. continue
  30689. }
  30690. mv = float32(dd.DecodeFloat(true))
  30691. if v != nil {
  30692. v[mk] = mv
  30693. }
  30694. }
  30695. dd.ReadMapEnd()
  30696. return v, changed
  30697. }
  30698. func (d *Decoder) fastpathDecMapBoolFloat64R(f *codecFnInfo, rv reflect.Value) {
  30699. if rv.Kind() == reflect.Ptr {
  30700. vp := rv2i(rv).(*map[bool]float64)
  30701. if v, changed := fastpathTV.DecMapBoolFloat64V(*vp, true, d); changed {
  30702. *vp = v
  30703. }
  30704. return
  30705. }
  30706. fastpathTV.DecMapBoolFloat64V(rv2i(rv).(map[bool]float64), false, d)
  30707. }
  30708. func (f fastpathT) DecMapBoolFloat64X(vp *map[bool]float64, d *Decoder) {
  30709. if v, changed := f.DecMapBoolFloat64V(*vp, true, d); changed {
  30710. *vp = v
  30711. }
  30712. }
  30713. func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, canChange bool,
  30714. d *Decoder) (_ map[bool]float64, changed bool) {
  30715. dd, esep := d.d, d.hh.hasElemSeparators()
  30716. containerLen := dd.ReadMapStart()
  30717. if canChange && v == nil {
  30718. xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
  30719. v = make(map[bool]float64, xlen)
  30720. changed = true
  30721. }
  30722. if containerLen == 0 {
  30723. dd.ReadMapEnd()
  30724. return v, changed
  30725. }
  30726. var mk bool
  30727. var mv float64
  30728. hasLen := containerLen > 0
  30729. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30730. if esep {
  30731. dd.ReadMapElemKey()
  30732. }
  30733. mk = dd.DecodeBool()
  30734. if esep {
  30735. dd.ReadMapElemValue()
  30736. }
  30737. if dd.TryDecodeAsNil() {
  30738. if d.h.DeleteOnNilMapValue {
  30739. delete(v, mk)
  30740. } else {
  30741. v[mk] = 0
  30742. }
  30743. continue
  30744. }
  30745. mv = dd.DecodeFloat(false)
  30746. if v != nil {
  30747. v[mk] = mv
  30748. }
  30749. }
  30750. dd.ReadMapEnd()
  30751. return v, changed
  30752. }
  30753. func (d *Decoder) fastpathDecMapBoolBoolR(f *codecFnInfo, rv reflect.Value) {
  30754. if rv.Kind() == reflect.Ptr {
  30755. vp := rv2i(rv).(*map[bool]bool)
  30756. if v, changed := fastpathTV.DecMapBoolBoolV(*vp, true, d); changed {
  30757. *vp = v
  30758. }
  30759. return
  30760. }
  30761. fastpathTV.DecMapBoolBoolV(rv2i(rv).(map[bool]bool), false, d)
  30762. }
  30763. func (f fastpathT) DecMapBoolBoolX(vp *map[bool]bool, d *Decoder) {
  30764. if v, changed := f.DecMapBoolBoolV(*vp, true, d); changed {
  30765. *vp = v
  30766. }
  30767. }
  30768. func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, canChange bool,
  30769. d *Decoder) (_ map[bool]bool, changed bool) {
  30770. dd, esep := d.d, d.hh.hasElemSeparators()
  30771. containerLen := dd.ReadMapStart()
  30772. if canChange && v == nil {
  30773. xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
  30774. v = make(map[bool]bool, xlen)
  30775. changed = true
  30776. }
  30777. if containerLen == 0 {
  30778. dd.ReadMapEnd()
  30779. return v, changed
  30780. }
  30781. var mk bool
  30782. var mv bool
  30783. hasLen := containerLen > 0
  30784. for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
  30785. if esep {
  30786. dd.ReadMapElemKey()
  30787. }
  30788. mk = dd.DecodeBool()
  30789. if esep {
  30790. dd.ReadMapElemValue()
  30791. }
  30792. if dd.TryDecodeAsNil() {
  30793. if d.h.DeleteOnNilMapValue {
  30794. delete(v, mk)
  30795. } else {
  30796. v[mk] = false
  30797. }
  30798. continue
  30799. }
  30800. mv = dd.DecodeBool()
  30801. if v != nil {
  30802. v[mk] = mv
  30803. }
  30804. }
  30805. dd.ReadMapEnd()
  30806. return v, changed
  30807. }