ChangeLog-2013-04-24 1.2 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045
  1. 2013-04-23 Filip Pizlo <fpizlo@apple.com>
  2. DFG CFA filters CheckFunction in a really weird way, and assumes that the function's structure won't change
  3. https://bugs.webkit.org/show_bug.cgi?id=115077
  4. Reviewed by Oliver Hunt.
  5. The filtering did three things that are unusual:
  6. 1) AbstractValue::filterByValue() assumed that the passed value's structure wouldn't change, in
  7. the sense that at it assumed it could use that value's *current* structure to do structure
  8. filtering. Filtering by structure only makes sense if you can prove that the given value will
  9. always have that structure (for example by either using a watchpoing or emitting code that
  10. checks that structure at run-time).
  11. 2) AbstractValue::filterByValue() and the CheckFunction case in AbstractState::executeEffects()
  12. tried to invalidate the CFA based on whether the filtration led to an empty value. This is
  13. well-intentioned, but it's not how the CFA currently works. It's inconsistent with other
  14. parts of the CFA. We shouldn't introduce this feature into just one kind of filtration and
  15. not have it elsewhere.
  16. 3) The attempt to detect when the value was empty was actually implemented incorrectly. It
  17. relied on AbstractValue::validate(). That method says that a concrete value does not belong
  18. to the abstract value if it has a different structure. This makes sense for the other place
  19. where AbstractValue::validate() is called: during OSR entry, where we are talking about a
  20. JSValue that we see *right now*. It doesn't make sense in the CFA, since in the CFA any
  21. value we observe in the code is a value whose structure may change when the code starts
  22. running, and so we cannot use the value's current structure to infer things about the code
  23. when it starts running.
  24. I fixed the above problems by (1) changing filterByValue() to not filter the structure, (2)
  25. changing filterByValue() and the CheckFunction case to not invalidate the CFA, and (3)
  26. making sure that nobody else was misusing AbstractValue::validate() (they weren't).
  27. * dfg/DFGAbstractState.cpp:
  28. (JSC::DFG::AbstractState::executeEffects):
  29. * dfg/DFGAbstractValue.h:
  30. (JSC::DFG::AbstractValue::filterByValue):
  31. 2013-04-23 Oliver Hunt <oliver@apple.com>
  32. Default ParserError() initialiser doesn't initialise all fields
  33. https://bugs.webkit.org/show_bug.cgi?id=115074
  34. Reviewed by Joseph Pecoraro.
  35. Only the jsc command prompt depended on this, but we'll fix it to
  36. be on the safe side.
  37. * parser/ParserError.h:
  38. (JSC::ParserError::ParserError):
  39. 2013-04-23 Christophe Dumez <ch.dumez@sisa.samsung.com>
  40. Global constructors should be configurable and not enumerable
  41. https://bugs.webkit.org/show_bug.cgi?id=110573
  42. Reviewed by Geoffrey Garen.
  43. Update JSObject::deleteProperty() so that mark to set the property
  44. value to undefined if it is in static hashtable of properties. The
  45. previous code was not doing anything in this case and this meant
  46. we could not remove builtin DOMWindow properties such as
  47. "ProgressEvent" even if marked as Deletable.
  48. * runtime/JSObject.cpp:
  49. (JSC::JSObject::deleteProperty):
  50. * runtime/Lookup.h:
  51. (JSC):
  52. (JSC::putEntry):
  53. (JSC::lookupPut):
  54. 2013-04-23 Geoffrey Garen <ggaren@apple.com>
  55. Filled out more cases of branch folding in bytecode when emitting
  56. expressions into a branching context
  57. https://bugs.webkit.org/show_bug.cgi?id=115057
  58. Reviewed by Filip Pizlo.
  59. This covers a few cases like:
  60. - while (true) { }
  61. - while (1) { }
  62. - if (x) break;
  63. - if (x) continue;
  64. - if (boolean_expr == boolean_const) { }
  65. - if (boolean_expr == 1_or_0) { }
  66. - if (bitop == 1_or_0) { }
  67. This also works, but will bring shame on your family:
  68. - while ("hello world") { }
  69. No change on the benchmarks we track, but a 2.5X speedup on a microbenchmark
  70. that uses these techniques.
  71. * JavaScriptCore.order: Order!
  72. * bytecompiler/BytecodeGenerator.cpp:
  73. (JSC::BytecodeGenerator::emitNewArray):
  74. (JSC::BytecodeGenerator::emitThrowReferenceError):
  75. (JSC::BytecodeGenerator::emitReadOnlyExceptionIfNeeded):
  76. * bytecompiler/BytecodeGenerator.h:
  77. (JSC::BytecodeGenerator::shouldEmitDebugHooks): Updated ancillary code
  78. for interface simplifications.
  79. * bytecompiler/NodesCodegen.cpp:
  80. (JSC::ConstantNode::emitBytecodeInConditionContext): Constants can
  81. jump unconditionally when used within a condition context.
  82. (JSC::ConstantNode::emitBytecode):
  83. (JSC::StringNode::jsValue): Gave constants a common base class so I
  84. could implement their codegen just once.
  85. (JSC::BinaryOpNode::emitBytecodeInConditionContext):
  86. (JSC::canFoldToBranch):
  87. (JSC::BinaryOpNode::tryFoldToBranch): Fold (!/=)= and (!/=)== where
  88. appropriate. A lot of cases are not appropriate because of the surprising
  89. type conversion semantics of ==. For example, if (number == true) { } is
  90. not the same as if (number) { } because the former will up-convert true
  91. to number and then do numeric comparison.
  92. (JSC::singleStatement):
  93. (JSC::IfElseNode::tryFoldBreakAndContinue):
  94. (JSC::IfElseNode::emitBytecode):
  95. (JSC::ContinueNode::trivialTarget):
  96. (JSC::BreakNode::trivialTarget): Fold "if (expression) break" and
  97. "if (expression) continue" into direct jumps from expression.
  98. * parser/ASTBuilder.h:
  99. (ASTBuilder):
  100. (JSC::ASTBuilder::createIfStatement):
  101. * parser/NodeConstructors.h:
  102. (JSC::ConstantNode::ConstantNode):
  103. (JSC):
  104. (JSC::NullNode::NullNode):
  105. (JSC::BooleanNode::BooleanNode):
  106. (JSC::NumberNode::NumberNode):
  107. (JSC::StringNode::StringNode):
  108. (JSC::IfElseNode::IfElseNode):
  109. * parser/Nodes.h:
  110. (JSC::ExpressionNode::isConstant):
  111. (JSC::ExpressionNode::isBoolean):
  112. (JSC::StatementNode::isBreak):
  113. (JSC::StatementNode::isContinue):
  114. (ConstantNode):
  115. (JSC::ConstantNode::isPure):
  116. (JSC::ConstantNode::isConstant):
  117. (NullNode):
  118. (JSC::NullNode::jsValue):
  119. (JSC::BooleanNode::value):
  120. (JSC::BooleanNode::isBoolean):
  121. (JSC::BooleanNode::jsValue):
  122. (JSC::NumberNode::value):
  123. (NumberNode):
  124. (JSC::NumberNode::jsValue):
  125. (StringNode):
  126. (BinaryOpNode):
  127. (IfElseNode):
  128. (ContinueNode):
  129. (JSC::ContinueNode::isContinue):
  130. (BreakNode):
  131. (JSC::BreakNode::isBreak):
  132. * parser/Parser.cpp:
  133. (JSC::::parseIfStatement):
  134. * parser/ResultType.h:
  135. (JSC::ResultType::definitelyIsBoolean):
  136. (ResultType):
  137. * runtime/JSCJSValueInlines.h:
  138. (JSC::JSValue::pureToBoolean):
  139. * runtime/JSCell.h:
  140. * runtime/JSCellInlines.h:
  141. (JSC::JSCell::pureToBoolean): Updated for interface changes above.
  142. 2013-04-23 Mark Lam <mark.lam@apple.com>
  143. Simplify the baseline JIT loop hint call site.
  144. https://bugs.webkit.org/show_bug.cgi?id=115052.
  145. Reviewed by Geoffrey Garen.
  146. Moved the watchdog timer check after the JIT optimization check. This
  147. ensures that the JIT opimization counter is incremented on every loop
  148. hint even if the watchdog timer fires.
  149. Removed the code that allows the JIT OSR to happen if the watchdog
  150. timer fires but does not result in a termination. It is extremely rare
  151. that the JIT optimization counter would trigger an OSR on the same pass
  152. as when the watchdog timer fire. If it does happen, we'll simply hold
  153. off on servicing the watchdog timer until the next pass (because it's
  154. not time critical).
  155. * jit/JITOpcodes.cpp:
  156. (JSC::JIT::emit_op_loop_hint):
  157. (JSC::JIT::emitSlow_op_loop_hint):
  158. 2013-04-23 Roger Fong <roger_fong@apple.com>
  159. AppleWin build fix.
  160. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  161. 2013-04-18 Mark Hahnenberg <mhahnenberg@apple.com>
  162. Objective-C API: Update public header documentation
  163. https://bugs.webkit.org/show_bug.cgi?id=114841
  164. Reviewed by Geoffrey Garen.
  165. Added documentation for the newly added object lifetime-related stuff.
  166. * API/JSManagedValue.h:
  167. * API/JSVirtualMachine.h:
  168. 2013-04-22 Mark Lam <mark.lam@apple.com>
  169. Fix a typo in MacroAssemblerARMv7.h.
  170. https://bugs.webkit.org/show_bug.cgi?id=115011.
  171. Reviewed by Geoffrey Garen.
  172. * assembler/ARMAssembler.h: Fix a comment.
  173. * assembler/ARMv7Assembler.h: Added some comments.
  174. * assembler/MacroAssemblerARMv7.h:
  175. - ARMAssembler::PL should be ARMv7Assembler::ConditionPL.
  176. 2013-04-22 Julien Brianceau <jbrianceau@nds.com>
  177. Add branchAdd32 missing implementation in SH4 base JIT.
  178. This should fix SH4 build, broken since r148893.
  179. https://bugs.webkit.org/show_bug.cgi?id=114993.
  180. Reviewed by Oliver Hunt.
  181. * assembler/MacroAssemblerSH4.h:
  182. (JSC::MacroAssemblerSH4::branchAdd32):
  183. (MacroAssemblerSH4):
  184. 2013-04-22 Benjamin Poulain <bpoulain@apple.com>
  185. Windows build fix after r148921
  186. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  187. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  188. 2013-04-22 Benjamin Poulain <benjamin@webkit.org>
  189. Remove the memory instrumentation code
  190. https://bugs.webkit.org/show_bug.cgi?id=114931
  191. Reviewed by Andreas Kling.
  192. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  193. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  194. 2013-04-22 Mark Lam <mark.lam@apple.com>
  195. Fix broken 32-bit build to green the bots.
  196. https://bugs.webkit.org/show_bug.cgi?id=114968.
  197. Unreviewed.
  198. Basically, I moved a JIT::emit_op_loop_hint() and JIT::emitSlow_op_loop_hint()
  199. into common code where they belong, instead of the 64-bit specific section.
  200. Also fixed some SH4 assertions failures which were also caused by
  201. https://bugs.webkit.org/show_bug.cgi?id=114963. Thanks to Julien Brianceau
  202. for pointing this out.
  203. * assembler/MacroAssemblerSH4.h:
  204. (JSC::MacroAssemblerSH4::branchAdd32):
  205. * jit/JITOpcodes.cpp:
  206. (JSC):
  207. (JSC::JIT::emit_op_loop_hint):
  208. (JSC::JIT::emitSlow_op_loop_hint):
  209. 2013-04-22 Oliver Hunt <oliver@apple.com>
  210. Perform null check before trying to use the result of readline()
  211. RS=Gavin
  212. * jsc.cpp:
  213. (runInteractive):
  214. 2013-04-22 Oliver Hunt <oliver@apple.com>
  215. Fix assertions to account for new Vector layout
  216. RS=Gavin
  217. * llint/LLIntData.cpp:
  218. (JSC::LLInt::Data::performAssertions):
  219. 2013-04-22 Mark Lam <mark.lam@apple.com>
  220. Change baseline JIT watchdog timer check to use the proper fast slow path
  221. infrastructure.
  222. https://bugs.webkit.org/show_bug.cgi?id=114963.
  223. Reviewed by Oliver Hunt.
  224. Edit: The PositiveOrZero condition is added because it is needed for
  225. the JIT optimization check. Previously, the JIT check branches around
  226. the slow path if the test result is 'Signed' i.e. negative. Since we
  227. now need to test for a condition that branches to the slow path (not
  228. around it), we need the complement of 'Signed / Negative' i.e. Positive
  229. or zero.
  230. SH4 parts contributed by Julien Brianceau.
  231. * assembler/ARMAssembler.h:
  232. * assembler/MacroAssemblerARM.h:
  233. * assembler/MacroAssemblerARMv7.h:
  234. * assembler/MacroAssemblerMIPS.h:
  235. (JSC::MacroAssemblerMIPS::branchAdd32):
  236. * assembler/MacroAssemblerSH4.h:
  237. (JSC::MacroAssemblerSH4::branchAdd32):
  238. * assembler/MacroAssemblerX86Common.h:
  239. * assembler/SH4Assembler.h:
  240. * jit/JIT.cpp:
  241. (JSC::JIT::emitEnterOptimizationCheck):
  242. (JSC::JIT::privateCompileSlowCases):
  243. * jit/JIT.h:
  244. (JSC::JIT::emitEnterOptimizationCheck):
  245. * jit/JITOpcodes.cpp:
  246. (JSC::JIT::emit_op_loop_hint):
  247. (JSC::JIT::emitSlow_op_loop_hint):
  248. (JSC::JIT::emit_op_enter):
  249. * jit/JITOpcodes32_64.cpp:
  250. (JSC::JIT::emit_op_enter):
  251. 2013-04-22 Andreas Kling <akling@apple.com>
  252. Shrink baseline size of WTF::Vector on 64-bit by switching to unsigned capacity and size.
  253. <http://webkit.org/b/97268>
  254. <rdar://problem/12376519>
  255. Reviewed by Sam Weinig.
  256. Update LLInt WTF::Vector offset constants to match the new memory layout.
  257. * llint/LowLevelInterpreter.asm:
  258. 2013-04-21 Oliver Hunt <oliver@apple.com>
  259. JS Lexer and Parser should be more informative when they encounter errors
  260. https://bugs.webkit.org/show_bug.cgi?id=114924
  261. Reviewed by Filip Pizlo.
  262. Add new tokens to represent the various ways that parsing and lexing have failed.
  263. This gives us the ability to produce better error messages in some cases,
  264. and to indicate whether or not the failure was due to invalid source, or simply
  265. early termination.
  266. The jsc prompt now makes use of this so that you can write functions that
  267. are more than one line long.
  268. * bytecompiler/BytecodeGenerator.cpp:
  269. (JSC::BytecodeGenerator::generate):
  270. * jsc.cpp:
  271. (stringFromUTF):
  272. (jscSource):
  273. (runInteractive):
  274. * parser/Lexer.cpp:
  275. (JSC::::parseFourDigitUnicodeHex):
  276. (JSC::::parseIdentifierSlowCase):
  277. (JSC::::parseString):
  278. (JSC::::parseStringSlowCase):
  279. (JSC::::lex):
  280. * parser/Lexer.h:
  281. (UnicodeHexValue):
  282. (JSC::Lexer::UnicodeHexValue::UnicodeHexValue):
  283. (JSC::Lexer::UnicodeHexValue::valueType):
  284. (JSC::Lexer::UnicodeHexValue::isValid):
  285. (JSC::Lexer::UnicodeHexValue::value):
  286. (Lexer):
  287. * parser/Parser.h:
  288. (JSC::Parser::getTokenName):
  289. (JSC::Parser::updateErrorMessageSpecialCase):
  290. (JSC::::parse):
  291. * parser/ParserError.h:
  292. (ParserError):
  293. (JSC::ParserError::ParserError):
  294. * parser/ParserTokens.h:
  295. * runtime/Completion.cpp:
  296. (JSC):
  297. (JSC::checkSyntax):
  298. * runtime/Completion.h:
  299. (JSC):
  300. 2013-04-21 Mark Lam <mark.lam@apple.com>
  301. Refactor identical inline functions in JSVALUE64 and JSVALUE32_64 sections
  302. out into the common section.
  303. https://bugs.webkit.org/show_bug.cgi?id=114910.
  304. Reviewed by Filip Pizlo.
  305. * dfg/DFGSpeculativeJIT.h:
  306. (SpeculativeJIT):
  307. (JSC::DFG::SpeculativeJIT::callOperation):
  308. 2013-04-20 Allan Sandfeld Jensen <allan.jensen@digia.com>
  309. LLint should be able to use x87 instead of SSE for floating pointer
  310. https://bugs.webkit.org/show_bug.cgi?id=112239
  311. Reviewed by Filip Pizlo.
  312. Implements LLInt floating point operations in x87, to ensure we support
  313. x86 without SSE2.
  314. X86 (except 64bit) now defaults to using x87 instructions in order to
  315. support all 32bit x86 back to i686. The implementation uses the fucomi
  316. instruction from i686 which sets the new minimum.
  317. The FPU registers must always be empty on entering or exiting a function.
  318. We make sure to only use two X87 registers, and they are always emptied
  319. before calling deeper functions or returning from the LLInt.
  320. * jit/JITStubs.cpp:
  321. (JSC): Empty FPU registers before exiting.
  322. * llint/LowLevelInterpreter32_64.asm:
  323. * llint/LowLevelInterpreter64.asm:
  324. * offlineasm/instructions.rb:
  325. * offlineasm/x86.rb:
  326. 2013-04-19 Roger Fong <roger_fong@apple.com>
  327. Remove uses of WebKit_Source from AppleWin build in JavaScriptCore.
  328. * JavaScriptCore.vcxproj/JavaScriptCore.make:
  329. * JavaScriptCore.vcxproj/build-generated-files.sh:
  330. * JavaScriptCore.vcxproj/copy-files.cmd:
  331. * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj:
  332. 2013-04-19 Benjamin Poulain <bpoulain@apple.com>
  333. Rename JSStringJoiner::build() to join()
  334. https://bugs.webkit.org/show_bug.cgi?id=114845
  335. Reviewed by Geoffrey Garen.
  336. The method name build() came from StringBuilder history. It does not make much
  337. sense on the StringJoiner.
  338. * runtime/ArrayPrototype.cpp:
  339. (JSC::arrayProtoFuncToString):
  340. (JSC::arrayProtoFuncToLocaleString):
  341. (JSC::arrayProtoFuncJoin):
  342. * runtime/JSStringJoiner.cpp:
  343. (JSC::JSStringJoiner::join):
  344. * runtime/JSStringJoiner.h:
  345. (JSStringJoiner):
  346. 2013-04-19 Roger Fong <roger_fong@apple.com>
  347. Unreviewed. WebKit_Source is incorrectly set.
  348. * JavaScriptCore.vcxproj/JavaScriptCore.make:
  349. 2013-04-19 Martin Robinson <mrobinson@igalia.com>
  350. [GTK] JSCore.gir.in has a few problems
  351. https://bugs.webkit.org/show_bug.cgi?id=114710
  352. Reviewed by Philippe Normand.
  353. * GNUmakefile.am: Add the gobject introspection steps for JavaScriptCore here,
  354. because they are shared between WebKit1 and WebKit2.
  355. * JavaScriptCore.gir.in: Added. Moved from the WebKit1 directory. Now written
  356. as foreign interfaces and referencing the javascriptcoregtk library.
  357. 2013-04-18 Benjamin Poulain <bpoulain@apple.com>
  358. Use StringJoiner to create the JSString of arrayProtoFuncToString
  359. https://bugs.webkit.org/show_bug.cgi?id=114779
  360. Reviewed by Geoffrey Garen.
  361. The function arrayProtoFuncToString was just a glorified JSStringJoiner.
  362. This patch replaces it by JSStringJoiner to simplify the code and enjoy any optimization
  363. made on JSStringJoiner.
  364. For some reason, this makes the execution 3.4% faster, despite having almost identical code.
  365. * runtime/ArrayPrototype.cpp:
  366. (JSC::arrayProtoFuncToString):
  367. 2013-04-18 Oliver Hunt <oliver@apple.com>
  368. StackFrame::column() returning bogus value
  369. https://bugs.webkit.org/show_bug.cgi?id=114840
  370. Reviewed by Gavin Barraclough.
  371. Don't add one part of the expression offset to the other part of the expression.
  372. Make StackFrame::toString() include the column info.
  373. * interpreter/Interpreter.cpp:
  374. (JSC::StackFrame::expressionInfo):
  375. (JSC::StackFrame::toString):
  376. 2013-04-18 Mark Hahnenberg <mhahnenberg@apple.com>
  377. Crash beneath JSC::JIT::privateCompileSlowCases @ stephenrdonaldson.com
  378. https://bugs.webkit.org/show_bug.cgi?id=114774
  379. Reviewed by Geoffrey Garen.
  380. We're not linking up all of the slow cases in the baseline JIT when compiling put_to_base.
  381. * jit/JITOpcodes.cpp:
  382. (JSC::JIT::emitSlow_op_put_to_base):
  383. 2013-04-18 Mark Lam <mark.lam@apple.com>
  384. Interpreter entry points should throw the TerminatedExecutionException from the caller frame.
  385. https://bugs.webkit.org/show_bug.cgi?id=114816.
  386. Reviewed by Oliver Hunt.
  387. * interpreter/Interpreter.cpp:
  388. (JSC::Interpreter::execute):
  389. (JSC::Interpreter::executeCall):
  390. (JSC::Interpreter::executeConstruct):
  391. 2013-04-18 Gabor Rapcsanyi <rgabor@webkit.org>
  392. LLInt ARM backend should not use the d8 register as scratch register
  393. https://bugs.webkit.org/show_bug.cgi?id=114811
  394. Reviewed by Filip Pizlo.
  395. The d8 register must preserved across function calls and should
  396. not used as scratch register. Changing it to d6.
  397. * offlineasm/arm.rb:
  398. 2013-04-18 Geoffrey Garen <ggaren@apple.com>
  399. Removed HeapTimer::synchronize
  400. https://bugs.webkit.org/show_bug.cgi?id=114832
  401. Reviewed by Mark Hahnenberg.
  402. HeapTimer::synchronize was a flawed attempt to make HeapTimer thread-safe.
  403. Instead, we use proper locking now.
  404. This is a slight API change, since the GC timer will now only fire in the
  405. run loop that created the JS VM, even if another run loop later executes
  406. some JS.
  407. * API/APIShims.h:
  408. (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
  409. * heap/HeapTimer.cpp:
  410. (JSC):
  411. * heap/HeapTimer.h:
  412. (HeapTimer):
  413. 2013-04-17 Geoffrey Garen <ggaren@apple.com>
  414. Renamed JSGlobalData to VM
  415. https://bugs.webkit.org/show_bug.cgi?id=114777
  416. Reviewed by Phil Pizlo.
  417. * API/APICast.h:
  418. (JSC):
  419. (toJS):
  420. (toRef):
  421. * API/APIShims.h:
  422. (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
  423. (APIEntryShimWithoutLock):
  424. (JSC::APIEntryShim::APIEntryShim):
  425. (APIEntryShim):
  426. (JSC::APIEntryShim::~APIEntryShim):
  427. (JSC::APICallbackShim::APICallbackShim):
  428. (JSC::APICallbackShim::~APICallbackShim):
  429. (APICallbackShim):
  430. * API/JSAPIWrapperObject.h:
  431. (JSAPIWrapperObject):
  432. * API/JSAPIWrapperObject.mm:
  433. (JSC::::createStructure):
  434. (JSC::JSAPIWrapperObject::JSAPIWrapperObject):
  435. (JSC::JSAPIWrapperObject::finishCreation):
  436. (JSC::JSAPIWrapperObject::visitChildren):
  437. * API/JSBase.cpp:
  438. (JSGarbageCollect):
  439. (JSReportExtraMemoryCost):
  440. (JSSynchronousGarbageCollectForDebugging):
  441. * API/JSCallbackConstructor.cpp:
  442. (JSC::JSCallbackConstructor::JSCallbackConstructor):
  443. (JSC::JSCallbackConstructor::finishCreation):
  444. * API/JSCallbackConstructor.h:
  445. (JSC::JSCallbackConstructor::createStructure):
  446. * API/JSCallbackFunction.cpp:
  447. (JSC::JSCallbackFunction::finishCreation):
  448. (JSC::JSCallbackFunction::create):
  449. * API/JSCallbackFunction.h:
  450. (JSCallbackFunction):
  451. (JSC::JSCallbackFunction::createStructure):
  452. * API/JSCallbackObject.cpp:
  453. (JSC::::create):
  454. (JSC::::createStructure):
  455. * API/JSCallbackObject.h:
  456. (JSC::JSCallbackObjectData::setPrivateProperty):
  457. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
  458. (JSCallbackObject):
  459. (JSC::JSCallbackObject::setPrivateProperty):
  460. * API/JSCallbackObjectFunctions.h:
  461. (JSC::::JSCallbackObject):
  462. (JSC::::finishCreation):
  463. (JSC::::put):
  464. (JSC::::staticFunctionGetter):
  465. * API/JSClassRef.cpp:
  466. (OpaqueJSClassContextData::OpaqueJSClassContextData):
  467. (OpaqueJSClass::contextData):
  468. (OpaqueJSClass::prototype):
  469. * API/JSClassRef.h:
  470. (OpaqueJSClassContextData):
  471. * API/JSContext.mm:
  472. (-[JSContext setException:]):
  473. (-[JSContext initWithGlobalContextRef:]):
  474. (+[JSContext contextWithGlobalContextRef:]):
  475. * API/JSContextRef.cpp:
  476. (JSContextGroupCreate):
  477. (JSContextGroupRelease):
  478. (JSGlobalContextCreate):
  479. (JSGlobalContextCreateInGroup):
  480. (JSGlobalContextRetain):
  481. (JSGlobalContextRelease):
  482. (JSContextGetGroup):
  483. (JSContextCreateBacktrace):
  484. * API/JSObjectRef.cpp:
  485. (JSObjectMake):
  486. (JSObjectMakeConstructor):
  487. (JSObjectMakeFunction):
  488. (JSObjectSetPrototype):
  489. (JSObjectHasProperty):
  490. (JSObjectGetProperty):
  491. (JSObjectSetProperty):
  492. (JSObjectDeleteProperty):
  493. (JSObjectGetPrivateProperty):
  494. (JSObjectSetPrivateProperty):
  495. (JSObjectDeletePrivateProperty):
  496. (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
  497. (OpaqueJSPropertyNameArray):
  498. (JSObjectCopyPropertyNames):
  499. (JSPropertyNameArrayRelease):
  500. (JSPropertyNameAccumulatorAddName):
  501. * API/JSScriptRef.cpp:
  502. (OpaqueJSScript::create):
  503. (OpaqueJSScript::vm):
  504. (OpaqueJSScript::OpaqueJSScript):
  505. (OpaqueJSScript):
  506. (parseScript):
  507. * API/JSVirtualMachine.mm:
  508. (scanExternalObjectGraph):
  509. * API/JSVirtualMachineInternal.h:
  510. (JSC):
  511. * API/JSWrapperMap.mm:
  512. (makeWrapper):
  513. * API/ObjCCallbackFunction.h:
  514. (JSC::ObjCCallbackFunction::createStructure):
  515. * API/ObjCCallbackFunction.mm:
  516. (JSC::ObjCCallbackFunction::create):
  517. * API/OpaqueJSString.cpp:
  518. (OpaqueJSString::identifier):
  519. * API/OpaqueJSString.h:
  520. (JSC):
  521. (OpaqueJSString):
  522. * GNUmakefile.list.am:
  523. * JSCTypedArrayStubs.h:
  524. (JSC):
  525. * JavaScriptCore.order:
  526. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  527. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  528. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  529. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
  530. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  531. * JavaScriptCore.xcodeproj/project.pbxproj:
  532. * KeywordLookupGenerator.py:
  533. (Trie.printSubTreeAsC):
  534. * Target.pri:
  535. * assembler/ARMAssembler.cpp:
  536. (JSC::ARMAssembler::executableCopy):
  537. * assembler/ARMAssembler.h:
  538. (ARMAssembler):
  539. * assembler/AssemblerBuffer.h:
  540. (JSC::AssemblerBuffer::executableCopy):
  541. * assembler/AssemblerBufferWithConstantPool.h:
  542. (JSC::AssemblerBufferWithConstantPool::executableCopy):
  543. * assembler/LinkBuffer.cpp:
  544. (JSC::LinkBuffer::linkCode):
  545. * assembler/LinkBuffer.h:
  546. (JSC):
  547. (JSC::LinkBuffer::LinkBuffer):
  548. (LinkBuffer):
  549. * assembler/MIPSAssembler.h:
  550. (JSC::MIPSAssembler::executableCopy):
  551. * assembler/SH4Assembler.h:
  552. (JSC::SH4Assembler::executableCopy):
  553. * assembler/X86Assembler.h:
  554. (JSC::X86Assembler::executableCopy):
  555. (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
  556. * bytecode/CallLinkInfo.cpp:
  557. (JSC::CallLinkInfo::unlink):
  558. * bytecode/CallLinkInfo.h:
  559. (CallLinkInfo):
  560. * bytecode/CodeBlock.cpp:
  561. (JSC::dumpStructure):
  562. (JSC::CodeBlock::printStructures):
  563. (JSC::CodeBlock::CodeBlock):
  564. (JSC::CodeBlock::~CodeBlock):
  565. (JSC::CodeBlock::visitStructures):
  566. (JSC::CodeBlock::finalizeUnconditionally):
  567. (JSC::CodeBlock::createActivation):
  568. (JSC::CodeBlock::unlinkCalls):
  569. (JSC::CodeBlock::unlinkIncomingCalls):
  570. (JSC::CodeBlock::findClosureCallForReturnPC):
  571. (JSC::ProgramCodeBlock::jettisonImpl):
  572. (JSC::EvalCodeBlock::jettisonImpl):
  573. (JSC::FunctionCodeBlock::jettisonImpl):
  574. (JSC::CodeBlock::predictedMachineCodeSize):
  575. (JSC::CodeBlock::usesOpcode):
  576. * bytecode/CodeBlock.h:
  577. (JSC::CodeBlock::appendWeakReference):
  578. (JSC::CodeBlock::appendWeakReferenceTransition):
  579. (JSC::CodeBlock::setJITCode):
  580. (JSC::CodeBlock::setGlobalData):
  581. (JSC::CodeBlock::vm):
  582. (JSC::CodeBlock::valueProfileForBytecodeOffset):
  583. (JSC::CodeBlock::addConstant):
  584. (JSC::CodeBlock::setConstantRegisters):
  585. (CodeBlock):
  586. (JSC::CodeBlock::WeakReferenceTransition::WeakReferenceTransition):
  587. * bytecode/EvalCodeCache.h:
  588. (JSC::EvalCodeCache::getSlow):
  589. * bytecode/GetByIdStatus.cpp:
  590. (JSC::GetByIdStatus::computeFromLLInt):
  591. (JSC::GetByIdStatus::computeForChain):
  592. (JSC::GetByIdStatus::computeFor):
  593. * bytecode/GetByIdStatus.h:
  594. (GetByIdStatus):
  595. * bytecode/Instruction.h:
  596. (JSC::Instruction::Instruction):
  597. * bytecode/ObjectAllocationProfile.h:
  598. (JSC::ObjectAllocationProfile::initialize):
  599. (JSC::ObjectAllocationProfile::possibleDefaultPropertyCount):
  600. * bytecode/PolymorphicAccessStructureList.h:
  601. (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
  602. (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
  603. * bytecode/PolymorphicPutByIdList.h:
  604. (JSC::PutByIdAccess::transition):
  605. (JSC::PutByIdAccess::replace):
  606. * bytecode/PreciseJumpTargets.cpp:
  607. (JSC::computePreciseJumpTargets):
  608. * bytecode/PutByIdStatus.cpp:
  609. (JSC::PutByIdStatus::computeFromLLInt):
  610. (JSC::PutByIdStatus::computeFor):
  611. * bytecode/PutByIdStatus.h:
  612. (JSC):
  613. (PutByIdStatus):
  614. * bytecode/ResolveGlobalStatus.cpp:
  615. (JSC::computeForStructure):
  616. * bytecode/SamplingTool.cpp:
  617. (JSC::SamplingTool::notifyOfScope):
  618. * bytecode/SamplingTool.h:
  619. (JSC::ScriptSampleRecord::ScriptSampleRecord):
  620. (SamplingTool):
  621. * bytecode/StructureStubInfo.h:
  622. (JSC::StructureStubInfo::initGetByIdSelf):
  623. (JSC::StructureStubInfo::initGetByIdProto):
  624. (JSC::StructureStubInfo::initGetByIdChain):
  625. (JSC::StructureStubInfo::initPutByIdTransition):
  626. (JSC::StructureStubInfo::initPutByIdReplace):
  627. * bytecode/UnlinkedCodeBlock.cpp:
  628. (JSC::generateFunctionCodeBlock):
  629. (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
  630. (JSC::UnlinkedFunctionExecutable::link):
  631. (JSC::UnlinkedFunctionExecutable::fromGlobalCode):
  632. (JSC::UnlinkedFunctionExecutable::codeBlockFor):
  633. (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
  634. * bytecode/UnlinkedCodeBlock.h:
  635. (JSC::UnlinkedFunctionExecutable::create):
  636. (UnlinkedFunctionExecutable):
  637. (JSC::UnlinkedFunctionExecutable::finishCreation):
  638. (JSC::UnlinkedFunctionExecutable::createStructure):
  639. (JSC::UnlinkedCodeBlock::addRegExp):
  640. (JSC::UnlinkedCodeBlock::addConstant):
  641. (JSC::UnlinkedCodeBlock::addFunctionDecl):
  642. (JSC::UnlinkedCodeBlock::addFunctionExpr):
  643. (JSC::UnlinkedCodeBlock::vm):
  644. (UnlinkedCodeBlock):
  645. (JSC::UnlinkedCodeBlock::finishCreation):
  646. (JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock):
  647. (JSC::UnlinkedProgramCodeBlock::create):
  648. (JSC::UnlinkedProgramCodeBlock::addFunctionDeclaration):
  649. (JSC::UnlinkedProgramCodeBlock::UnlinkedProgramCodeBlock):
  650. (JSC::UnlinkedProgramCodeBlock::createStructure):
  651. (JSC::UnlinkedEvalCodeBlock::create):
  652. (JSC::UnlinkedEvalCodeBlock::UnlinkedEvalCodeBlock):
  653. (JSC::UnlinkedEvalCodeBlock::createStructure):
  654. (JSC::UnlinkedFunctionCodeBlock::create):
  655. (JSC::UnlinkedFunctionCodeBlock::UnlinkedFunctionCodeBlock):
  656. (JSC::UnlinkedFunctionCodeBlock::createStructure):
  657. * bytecompiler/BytecodeGenerator.cpp:
  658. (JSC::BytecodeGenerator::BytecodeGenerator):
  659. (JSC::BytecodeGenerator::addConstant):
  660. (JSC::BytecodeGenerator::emitLoad):
  661. (JSC::BytecodeGenerator::emitDirectPutById):
  662. (JSC::BytecodeGenerator::addStringConstant):
  663. (JSC::BytecodeGenerator::expectedFunctionForIdentifier):
  664. (JSC::BytecodeGenerator::emitThrowReferenceError):
  665. (JSC::BytecodeGenerator::emitReadOnlyExceptionIfNeeded):
  666. * bytecompiler/BytecodeGenerator.h:
  667. (BytecodeGenerator):
  668. (JSC::BytecodeGenerator::vm):
  669. (JSC::BytecodeGenerator::propertyNames):
  670. (JSC::BytecodeGenerator::makeFunction):
  671. * bytecompiler/NodesCodegen.cpp:
  672. (JSC::RegExpNode::emitBytecode):
  673. (JSC::ArrayNode::toArgumentList):
  674. (JSC::ApplyFunctionCallDotNode::emitBytecode):
  675. (JSC::InstanceOfNode::emitBytecode):
  676. * debugger/Debugger.cpp:
  677. (JSC::Debugger::recompileAllJSFunctions):
  678. (JSC::evaluateInGlobalCallFrame):
  679. * debugger/Debugger.h:
  680. (JSC):
  681. * debugger/DebuggerActivation.cpp:
  682. (JSC::DebuggerActivation::DebuggerActivation):
  683. (JSC::DebuggerActivation::finishCreation):
  684. * debugger/DebuggerActivation.h:
  685. (JSC::DebuggerActivation::create):
  686. (JSC::DebuggerActivation::createStructure):
  687. (DebuggerActivation):
  688. * debugger/DebuggerCallFrame.cpp:
  689. (JSC::DebuggerCallFrame::evaluate):
  690. * dfg/DFGAbstractState.cpp:
  691. (JSC::DFG::AbstractState::executeEffects):
  692. * dfg/DFGAssemblyHelpers.h:
  693. (JSC::DFG::AssemblyHelpers::AssemblyHelpers):
  694. (JSC::DFG::AssemblyHelpers::vm):
  695. (JSC::DFG::AssemblyHelpers::debugCall):
  696. (JSC::DFG::AssemblyHelpers::emitExceptionCheck):
  697. (AssemblyHelpers):
  698. * dfg/DFGByteCodeParser.cpp:
  699. (JSC::DFG::ByteCodeParser::ByteCodeParser):
  700. (ByteCodeParser):
  701. (JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
  702. (JSC::DFG::ByteCodeParser::parseBlock):
  703. (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
  704. (JSC::DFG::ByteCodeParser::parseCodeBlock):
  705. * dfg/DFGByteCodeParser.h:
  706. (JSC):
  707. * dfg/DFGCCallHelpers.h:
  708. (JSC::DFG::CCallHelpers::CCallHelpers):
  709. * dfg/DFGCapabilities.cpp:
  710. (JSC::DFG::canHandleOpcodes):
  711. * dfg/DFGConstantFoldingPhase.cpp:
  712. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  713. * dfg/DFGDisassembler.cpp:
  714. (JSC::DFG::Disassembler::reportToProfiler):
  715. * dfg/DFGDriver.cpp:
  716. (JSC::DFG::compile):
  717. * dfg/DFGDriver.h:
  718. (JSC):
  719. * dfg/DFGFixupPhase.cpp:
  720. (JSC::DFG::FixupPhase::fixupNode):
  721. (JSC::DFG::FixupPhase::isStringPrototypeMethodSane):
  722. (JSC::DFG::FixupPhase::canOptimizeStringObjectAccess):
  723. * dfg/DFGGraph.cpp:
  724. (JSC::DFG::Graph::Graph):
  725. * dfg/DFGGraph.h:
  726. (Graph):
  727. * dfg/DFGJITCompiler.cpp:
  728. (JSC::DFG::JITCompiler::JITCompiler):
  729. (JSC::DFG::JITCompiler::linkOSRExits):
  730. (JSC::DFG::JITCompiler::link):
  731. (JSC::DFG::JITCompiler::compile):
  732. (JSC::DFG::JITCompiler::compileFunction):
  733. * dfg/DFGJITCompiler.h:
  734. (JSC):
  735. * dfg/DFGOSREntry.cpp:
  736. (JSC::DFG::prepareOSREntry):
  737. * dfg/DFGOSRExitCompiler.cpp:
  738. * dfg/DFGOSRExitCompiler32_64.cpp:
  739. (JSC::DFG::OSRExitCompiler::compileExit):
  740. * dfg/DFGOSRExitCompiler64.cpp:
  741. (JSC::DFG::OSRExitCompiler::compileExit):
  742. * dfg/DFGOperations.cpp:
  743. (JSC::DFG::putByVal):
  744. (JSC::DFG::operationPutByValInternal):
  745. (JSC::getHostCallReturnValueWithExecState):
  746. * dfg/DFGPhase.h:
  747. (JSC::DFG::Phase::vm):
  748. * dfg/DFGRepatch.cpp:
  749. (JSC::DFG::generateProtoChainAccessStub):
  750. (JSC::DFG::tryCacheGetByID):
  751. (JSC::DFG::tryBuildGetByIDList):
  752. (JSC::DFG::tryBuildGetByIDProtoList):
  753. (JSC::DFG::emitPutReplaceStub):
  754. (JSC::DFG::emitPutTransitionStub):
  755. (JSC::DFG::tryCachePutByID):
  756. (JSC::DFG::tryBuildPutByIdList):
  757. (JSC::DFG::linkSlowFor):
  758. (JSC::DFG::dfgLinkFor):
  759. (JSC::DFG::dfgLinkSlowFor):
  760. (JSC::DFG::dfgLinkClosureCall):
  761. * dfg/DFGSpeculativeJIT.cpp:
  762. (JSC::DFG::SpeculativeJIT::typedArrayDescriptor):
  763. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
  764. (JSC::DFG::SpeculativeJIT::compileGetByValOnString):
  765. (JSC::DFG::SpeculativeJIT::compileFromCharCode):
  766. (JSC::DFG::SpeculativeJIT::compileMakeRope):
  767. (JSC::DFG::SpeculativeJIT::compileStringEquality):
  768. (JSC::DFG::SpeculativeJIT::compileToStringOnCell):
  769. (JSC::DFG::SpeculativeJIT::speculateObject):
  770. (JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
  771. (JSC::DFG::SpeculativeJIT::speculateString):
  772. (JSC::DFG::SpeculativeJIT::speculateStringOrStringObject):
  773. * dfg/DFGSpeculativeJIT.h:
  774. (JSC::DFG::SpeculativeJIT::prepareForExternalCall):
  775. (JSC::DFG::SpeculativeJIT::emitAllocateBasicStorage):
  776. (JSC::DFG::SpeculativeJIT::emitAllocateJSObject):
  777. * dfg/DFGSpeculativeJIT32_64.cpp:
  778. (JSC::DFG::SpeculativeJIT::compileObjectEquality):
  779. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  780. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  781. (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
  782. (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
  783. (JSC::DFG::SpeculativeJIT::compile):
  784. * dfg/DFGSpeculativeJIT64.cpp:
  785. (JSC::DFG::SpeculativeJIT::compileObjectEquality):
  786. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  787. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  788. (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
  789. (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
  790. (JSC::DFG::SpeculativeJIT::compile):
  791. * dfg/DFGThunks.cpp:
  792. (JSC::DFG::osrExitGenerationThunkGenerator):
  793. (JSC::DFG::throwExceptionFromCallSlowPathGenerator):
  794. (JSC::DFG::slowPathFor):
  795. (JSC::DFG::linkForThunkGenerator):
  796. (JSC::DFG::linkCallThunkGenerator):
  797. (JSC::DFG::linkConstructThunkGenerator):
  798. (JSC::DFG::linkClosureCallThunkGenerator):
  799. (JSC::DFG::virtualForThunkGenerator):
  800. (JSC::DFG::virtualCallThunkGenerator):
  801. (JSC::DFG::virtualConstructThunkGenerator):
  802. * dfg/DFGThunks.h:
  803. (JSC):
  804. (DFG):
  805. * heap/BlockAllocator.h:
  806. (JSC):
  807. * heap/CopiedSpace.cpp:
  808. (JSC::CopiedSpace::tryAllocateSlowCase):
  809. (JSC::CopiedSpace::tryReallocate):
  810. * heap/CopiedSpaceInlines.h:
  811. (JSC::CopiedSpace::tryAllocate):
  812. * heap/GCThreadSharedData.cpp:
  813. (JSC::GCThreadSharedData::GCThreadSharedData):
  814. (JSC::GCThreadSharedData::reset):
  815. * heap/GCThreadSharedData.h:
  816. (JSC):
  817. (GCThreadSharedData):
  818. * heap/HandleSet.cpp:
  819. (JSC::HandleSet::HandleSet):
  820. (JSC::HandleSet::~HandleSet):
  821. (JSC::HandleSet::grow):
  822. * heap/HandleSet.h:
  823. (JSC):
  824. (HandleSet):
  825. (JSC::HandleSet::vm):
  826. * heap/Heap.cpp:
  827. (JSC::Heap::Heap):
  828. (JSC):
  829. (JSC::Heap::lastChanceToFinalize):
  830. (JSC::Heap::protect):
  831. (JSC::Heap::unprotect):
  832. (JSC::Heap::stack):
  833. (JSC::Heap::getConservativeRegisterRoots):
  834. (JSC::Heap::markRoots):
  835. (JSC::Heap::deleteAllCompiledCode):
  836. (JSC::Heap::collect):
  837. (JSC::Heap::isValidAllocation):
  838. * heap/Heap.h:
  839. (JSC):
  840. (Heap):
  841. (JSC::Heap::vm):
  842. * heap/HeapTimer.cpp:
  843. (JSC::HeapTimer::HeapTimer):
  844. (JSC::HeapTimer::timerDidFire):
  845. (JSC::HeapTimer::timerEvent):
  846. * heap/HeapTimer.h:
  847. (JSC):
  848. (HeapTimer):
  849. * heap/IncrementalSweeper.cpp:
  850. (JSC::IncrementalSweeper::IncrementalSweeper):
  851. (JSC::IncrementalSweeper::sweepNextBlock):
  852. (JSC::IncrementalSweeper::willFinishSweeping):
  853. (JSC::IncrementalSweeper::create):
  854. * heap/IncrementalSweeper.h:
  855. (IncrementalSweeper):
  856. * heap/Local.h:
  857. (Local):
  858. (JSC::::Local):
  859. (JSC::LocalStack::LocalStack):
  860. (JSC::LocalStack::push):
  861. (LocalStack):
  862. * heap/LocalScope.h:
  863. (JSC):
  864. (LocalScope):
  865. (JSC::LocalScope::LocalScope):
  866. * heap/MachineStackMarker.cpp:
  867. (JSC::MachineThreads::addCurrentThread):
  868. * heap/MarkedAllocator.cpp:
  869. (JSC::MarkedAllocator::allocateSlowCase):
  870. * heap/MarkedBlock.cpp:
  871. (JSC::MarkedBlock::MarkedBlock):
  872. * heap/MarkedBlock.h:
  873. (JSC::MarkedBlock::vm):
  874. * heap/SlotVisitor.cpp:
  875. (JSC::SlotVisitor::SlotVisitor):
  876. (JSC::SlotVisitor::setup):
  877. * heap/Strong.h:
  878. (JSC):
  879. (Strong):
  880. (JSC::Strong::operator=):
  881. * heap/StrongInlines.h:
  882. (JSC::::Strong):
  883. (JSC::::set):
  884. * heap/SuperRegion.h:
  885. (JSC):
  886. * heap/WeakSet.cpp:
  887. * heap/WeakSet.h:
  888. (WeakSet):
  889. (JSC::WeakSet::WeakSet):
  890. (JSC::WeakSet::vm):
  891. * interpreter/AbstractPC.cpp:
  892. (JSC::AbstractPC::AbstractPC):
  893. * interpreter/AbstractPC.h:
  894. (JSC):
  895. (AbstractPC):
  896. * interpreter/CachedCall.h:
  897. (JSC::CachedCall::CachedCall):
  898. * interpreter/CallFrame.h:
  899. (ExecState):
  900. (JSC::ExecState::clearException):
  901. (JSC::ExecState::clearSupplementaryExceptionInfo):
  902. (JSC::ExecState::exception):
  903. (JSC::ExecState::hadException):
  904. (JSC::ExecState::propertyNames):
  905. (JSC::ExecState::emptyList):
  906. (JSC::ExecState::interpreter):
  907. (JSC::ExecState::heap):
  908. (JSC::ExecState::arrayConstructorTable):
  909. (JSC::ExecState::arrayPrototypeTable):
  910. (JSC::ExecState::booleanPrototypeTable):
  911. (JSC::ExecState::dateTable):
  912. (JSC::ExecState::dateConstructorTable):
  913. (JSC::ExecState::errorPrototypeTable):
  914. (JSC::ExecState::globalObjectTable):
  915. (JSC::ExecState::jsonTable):
  916. (JSC::ExecState::mathTable):
  917. (JSC::ExecState::numberConstructorTable):
  918. (JSC::ExecState::numberPrototypeTable):
  919. (JSC::ExecState::objectConstructorTable):
  920. (JSC::ExecState::privateNamePrototypeTable):
  921. (JSC::ExecState::regExpTable):
  922. (JSC::ExecState::regExpConstructorTable):
  923. (JSC::ExecState::regExpPrototypeTable):
  924. (JSC::ExecState::stringConstructorTable):
  925. (JSC::ExecState::abstractReturnPC):
  926. * interpreter/CallFrameClosure.h:
  927. (CallFrameClosure):
  928. * interpreter/Interpreter.cpp:
  929. (JSC):
  930. (JSC::eval):
  931. (JSC::loadVarargs):
  932. (JSC::Interpreter::Interpreter):
  933. (JSC::Interpreter::dumpRegisters):
  934. (JSC::Interpreter::unwindCallFrame):
  935. (JSC::appendSourceToError):
  936. (JSC::getCallerInfo):
  937. (JSC::Interpreter::getStackTrace):
  938. (JSC::Interpreter::addStackTraceIfNecessary):
  939. (JSC::Interpreter::throwException):
  940. (JSC::Interpreter::execute):
  941. (JSC::Interpreter::executeCall):
  942. (JSC::Interpreter::executeConstruct):
  943. (JSC::Interpreter::prepareForRepeatCall):
  944. (JSC::Interpreter::retrieveArgumentsFromVMCode):
  945. (JSC::Interpreter::retrieveCallerFromVMCode):
  946. * interpreter/Interpreter.h:
  947. (JSC):
  948. (JSC::TopCallFrameSetter::TopCallFrameSetter):
  949. (JSC::TopCallFrameSetter::~TopCallFrameSetter):
  950. (TopCallFrameSetter):
  951. (JSC::NativeCallFrameTracer::NativeCallFrameTracer):
  952. (Interpreter):
  953. * interpreter/JSStack.cpp:
  954. (JSC::JSStack::JSStack):
  955. * interpreter/JSStack.h:
  956. (JSC):
  957. * jit/ClosureCallStubRoutine.cpp:
  958. (JSC::ClosureCallStubRoutine::ClosureCallStubRoutine):
  959. * jit/ClosureCallStubRoutine.h:
  960. (ClosureCallStubRoutine):
  961. * jit/ExecutableAllocator.cpp:
  962. (JSC::ExecutableAllocator::ExecutableAllocator):
  963. (JSC::ExecutableAllocator::allocate):
  964. * jit/ExecutableAllocator.h:
  965. (JSC):
  966. (ExecutableAllocator):
  967. * jit/ExecutableAllocatorFixedVMPool.cpp:
  968. (JSC::ExecutableAllocator::ExecutableAllocator):
  969. (JSC::ExecutableAllocator::allocate):
  970. * jit/GCAwareJITStubRoutine.cpp:
  971. (JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine):
  972. (JSC::MarkingGCAwareJITStubRoutineWithOneObject::MarkingGCAwareJITStubRoutineWithOneObject):
  973. (JSC::createJITStubRoutine):
  974. * jit/GCAwareJITStubRoutine.h:
  975. (GCAwareJITStubRoutine):
  976. (MarkingGCAwareJITStubRoutineWithOneObject):
  977. (JSC):
  978. * jit/JIT.cpp:
  979. (JSC::JIT::JIT):
  980. (JSC::JIT::privateCompile):
  981. (JSC::JIT::linkFor):
  982. (JSC::JIT::linkSlowCall):
  983. * jit/JIT.h:
  984. (JSC::JIT::compile):
  985. (JSC::JIT::compileClosureCall):
  986. (JSC::JIT::compileGetByIdProto):
  987. (JSC::JIT::compileGetByIdSelfList):
  988. (JSC::JIT::compileGetByIdProtoList):
  989. (JSC::JIT::compileGetByIdChainList):
  990. (JSC::JIT::compileGetByIdChain):
  991. (JSC::JIT::compilePutByIdTransition):
  992. (JSC::JIT::compileGetByVal):
  993. (JSC::JIT::compilePutByVal):
  994. (JSC::JIT::compileCTINativeCall):
  995. (JSC::JIT::compilePatchGetArrayLength):
  996. (JIT):
  997. * jit/JITCall.cpp:
  998. (JSC::JIT::compileLoadVarargs):
  999. (JSC::JIT::compileCallEvalSlowCase):
  1000. (JSC::JIT::compileOpCallSlowCase):
  1001. (JSC::JIT::privateCompileClosureCall):
  1002. * jit/JITCall32_64.cpp:
  1003. (JSC::JIT::compileLoadVarargs):
  1004. (JSC::JIT::compileCallEvalSlowCase):
  1005. (JSC::JIT::compileOpCallSlowCase):
  1006. (JSC::JIT::privateCompileClosureCall):
  1007. * jit/JITCode.h:
  1008. (JSC):
  1009. (JSC::JITCode::execute):
  1010. * jit/JITDriver.h:
  1011. (JSC::jitCompileIfAppropriate):
  1012. (JSC::jitCompileFunctionIfAppropriate):
  1013. * jit/JITExceptions.cpp:
  1014. (JSC::genericThrow):
  1015. (JSC::jitThrow):
  1016. * jit/JITExceptions.h:
  1017. (JSC):
  1018. * jit/JITInlines.h:
  1019. (JSC::JIT::emitLoadCharacterString):
  1020. (JSC::JIT::updateTopCallFrame):
  1021. * jit/JITOpcodes.cpp:
  1022. (JSC::JIT::privateCompileCTINativeCall):
  1023. (JSC::JIT::emit_op_new_object):
  1024. (JSC::JIT::emit_op_to_primitive):
  1025. (JSC::JIT::emit_op_catch):
  1026. (JSC::JIT::emit_op_convert_this):
  1027. (JSC::JIT::emitSlow_op_convert_this):
  1028. * jit/JITOpcodes32_64.cpp:
  1029. (JSC::JIT::privateCompileCTINativeCall):
  1030. (JSC::JIT::emit_op_new_object):
  1031. (JSC::JIT::emit_op_to_primitive):
  1032. (JSC::JIT::emitSlow_op_eq):
  1033. (JSC::JIT::emitSlow_op_neq):
  1034. (JSC::JIT::compileOpStrictEq):
  1035. (JSC::JIT::emit_op_catch):
  1036. (JSC::JIT::emit_op_convert_this):
  1037. (JSC::JIT::emitSlow_op_convert_this):
  1038. * jit/JITPropertyAccess.cpp:
  1039. (JSC::JIT::stringGetByValStubGenerator):
  1040. (JSC::JIT::emitSlow_op_get_by_val):
  1041. (JSC::JIT::compileGetByIdHotPath):
  1042. (JSC::JIT::privateCompilePutByIdTransition):
  1043. (JSC::JIT::privateCompilePatchGetArrayLength):
  1044. (JSC::JIT::privateCompileGetByIdProto):
  1045. (JSC::JIT::privateCompileGetByIdSelfList):
  1046. (JSC::JIT::privateCompileGetByIdProtoList):
  1047. (JSC::JIT::privateCompileGetByIdChainList):
  1048. (JSC::JIT::privateCompileGetByIdChain):
  1049. (JSC::JIT::privateCompileGetByVal):
  1050. (JSC::JIT::privateCompilePutByVal):
  1051. * jit/JITPropertyAccess32_64.cpp:
  1052. (JSC::JIT::stringGetByValStubGenerator):
  1053. (JSC::JIT::emitSlow_op_get_by_val):
  1054. (JSC::JIT::compileGetByIdHotPath):
  1055. (JSC::JIT::privateCompilePutByIdTransition):
  1056. (JSC::JIT::privateCompilePatchGetArrayLength):
  1057. (JSC::JIT::privateCompileGetByIdProto):
  1058. (JSC::JIT::privateCompileGetByIdSelfList):
  1059. (JSC::JIT::privateCompileGetByIdProtoList):
  1060. (JSC::JIT::privateCompileGetByIdChainList):
  1061. (JSC::JIT::privateCompileGetByIdChain):
  1062. * jit/JITStubs.cpp:
  1063. (JSC::ctiTrampoline):
  1064. (JSC):
  1065. (JSC::performPlatformSpecificJITAssertions):
  1066. (JSC::tryCachePutByID):
  1067. (JSC::tryCacheGetByID):
  1068. (JSC::returnToThrowTrampoline):
  1069. (JSC::throwExceptionFromOpCall):
  1070. (JSC::DEFINE_STUB_FUNCTION):
  1071. (JSC::getPolymorphicAccessStructureListSlot):
  1072. (JSC::jitCompileFor):
  1073. (JSC::lazyLinkFor):
  1074. (JSC::putByVal):
  1075. * jit/JITStubs.h:
  1076. (JSC):
  1077. (JITStackFrame):
  1078. * jit/JITThunks.cpp:
  1079. (JSC::JITThunks::ctiNativeCall):
  1080. (JSC::JITThunks::ctiNativeConstruct):
  1081. (JSC::JITThunks::ctiStub):
  1082. (JSC::JITThunks::hostFunctionStub):
  1083. * jit/JITThunks.h:
  1084. (JSC):
  1085. (JITThunks):
  1086. * jit/JITWriteBarrier.h:
  1087. (JSC):
  1088. (JSC::JITWriteBarrierBase::set):
  1089. (JSC::JITWriteBarrier::set):
  1090. * jit/SpecializedThunkJIT.h:
  1091. (JSC::SpecializedThunkJIT::loadJSStringArgument):
  1092. (JSC::SpecializedThunkJIT::finalize):
  1093. * jit/ThunkGenerator.h:
  1094. (JSC):
  1095. * jit/ThunkGenerators.cpp:
  1096. (JSC::generateSlowCaseFor):
  1097. (JSC::linkForGenerator):
  1098. (JSC::linkCallGenerator):
  1099. (JSC::linkConstructGenerator):
  1100. (JSC::linkClosureCallGenerator):
  1101. (JSC::virtualForGenerator):
  1102. (JSC::virtualCallGenerator):
  1103. (JSC::virtualConstructGenerator):
  1104. (JSC::stringLengthTrampolineGenerator):
  1105. (JSC::nativeForGenerator):
  1106. (JSC::nativeCallGenerator):
  1107. (JSC::nativeConstructGenerator):
  1108. (JSC::stringCharLoad):
  1109. (JSC::charToString):
  1110. (JSC::charCodeAtThunkGenerator):
  1111. (JSC::charAtThunkGenerator):
  1112. (JSC::fromCharCodeThunkGenerator):
  1113. (JSC::sqrtThunkGenerator):
  1114. (JSC::floorThunkGenerator):
  1115. (JSC::ceilThunkGenerator):
  1116. (JSC::roundThunkGenerator):
  1117. (JSC::expThunkGenerator):
  1118. (JSC::logThunkGenerator):
  1119. (JSC::absThunkGenerator):
  1120. (JSC::powThunkGenerator):
  1121. * jit/ThunkGenerators.h:
  1122. (JSC):
  1123. * jsc.cpp:
  1124. (GlobalObject):
  1125. (GlobalObject::create):
  1126. (GlobalObject::createStructure):
  1127. (GlobalObject::finishCreation):
  1128. (GlobalObject::addFunction):
  1129. (GlobalObject::addConstructableFunction):
  1130. (functionDumpCallFrame):
  1131. (functionJSCStack):
  1132. (functionReleaseExecutableMemory):
  1133. (functionRun):
  1134. (main):
  1135. (runWithScripts):
  1136. (jscmain):
  1137. * llint/LLIntData.cpp:
  1138. (JSC::LLInt::Data::performAssertions):
  1139. * llint/LLIntData.h:
  1140. (JSC):
  1141. (Data):
  1142. (JSC::LLInt::Data::performAssertions):
  1143. * llint/LLIntEntrypoints.cpp:
  1144. (JSC::LLInt::getFunctionEntrypoint):
  1145. (JSC::LLInt::getEvalEntrypoint):
  1146. (JSC::LLInt::getProgramEntrypoint):
  1147. * llint/LLIntEntrypoints.h:
  1148. (JSC):
  1149. (LLInt):
  1150. (JSC::LLInt::getEntrypoint):
  1151. * llint/LLIntExceptions.cpp:
  1152. (JSC::LLInt::interpreterThrowInCaller):
  1153. (JSC::LLInt::returnToThrow):
  1154. (JSC::LLInt::callToThrow):
  1155. * llint/LLIntOffsetsExtractor.cpp:
  1156. * llint/LLIntSlowPaths.cpp:
  1157. (LLInt):
  1158. (JSC::LLInt::llint_trace_operand):
  1159. (JSC::LLInt::llint_trace_value):
  1160. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  1161. (JSC::LLInt::shouldJIT):
  1162. (JSC::LLInt::handleHostCall):
  1163. (JSC::LLInt::setUpCall):
  1164. * llint/LLIntThunks.cpp:
  1165. (JSC::LLInt::generateThunkWithJumpTo):
  1166. (JSC::LLInt::functionForCallEntryThunkGenerator):
  1167. (JSC::LLInt::functionForConstructEntryThunkGenerator):
  1168. (JSC::LLInt::functionForCallArityCheckThunkGenerator):
  1169. (JSC::LLInt::functionForConstructArityCheckThunkGenerator):
  1170. (JSC::LLInt::evalEntryThunkGenerator):
  1171. (JSC::LLInt::programEntryThunkGenerator):
  1172. * llint/LLIntThunks.h:
  1173. (JSC):
  1174. (LLInt):
  1175. * llint/LowLevelInterpreter.asm:
  1176. * llint/LowLevelInterpreter.cpp:
  1177. (JSC::CLoop::execute):
  1178. * llint/LowLevelInterpreter32_64.asm:
  1179. * llint/LowLevelInterpreter64.asm:
  1180. * offlineasm/cloop.rb:
  1181. * parser/ASTBuilder.h:
  1182. (JSC::ASTBuilder::ASTBuilder):
  1183. (JSC::ASTBuilder::createSourceElements):
  1184. (JSC::ASTBuilder::createCommaExpr):
  1185. (JSC::ASTBuilder::createLogicalNot):
  1186. (JSC::ASTBuilder::createUnaryPlus):
  1187. (JSC::ASTBuilder::createVoid):
  1188. (JSC::ASTBuilder::thisExpr):
  1189. (JSC::ASTBuilder::createResolve):
  1190. (JSC::ASTBuilder::createObjectLiteral):
  1191. (JSC::ASTBuilder::createArray):
  1192. (JSC::ASTBuilder::createNumberExpr):
  1193. (JSC::ASTBuilder::createString):
  1194. (JSC::ASTBuilder::createBoolean):
  1195. (JSC::ASTBuilder::createNull):
  1196. (JSC::ASTBuilder::createBracketAccess):
  1197. (JSC::ASTBuilder::createDotAccess):
  1198. (JSC::ASTBuilder::createRegExp):
  1199. (JSC::ASTBuilder::createNewExpr):
  1200. (JSC::ASTBuilder::createConditionalExpr):
  1201. (JSC::ASTBuilder::createAssignResolve):
  1202. (JSC::ASTBuilder::createFunctionExpr):
  1203. (JSC::ASTBuilder::createFunctionBody):
  1204. (JSC::ASTBuilder::createGetterOrSetterProperty):
  1205. (JSC::ASTBuilder::createArguments):
  1206. (JSC::ASTBuilder::createArgumentsList):
  1207. (JSC::ASTBuilder::createProperty):
  1208. (JSC::ASTBuilder::createPropertyList):
  1209. (JSC::ASTBuilder::createElementList):
  1210. (JSC::ASTBuilder::createFormalParameterList):
  1211. (JSC::ASTBuilder::createClause):
  1212. (JSC::ASTBuilder::createClauseList):
  1213. (JSC::ASTBuilder::createFuncDeclStatement):
  1214. (JSC::ASTBuilder::createBlockStatement):
  1215. (JSC::ASTBuilder::createExprStatement):
  1216. (JSC::ASTBuilder::createIfStatement):
  1217. (JSC::ASTBuilder::createForLoop):
  1218. (JSC::ASTBuilder::createForInLoop):
  1219. (JSC::ASTBuilder::createEmptyStatement):
  1220. (JSC::ASTBuilder::createVarStatement):
  1221. (JSC::ASTBuilder::createReturnStatement):
  1222. (JSC::ASTBuilder::createBreakStatement):
  1223. (JSC::ASTBuilder::createContinueStatement):
  1224. (JSC::ASTBuilder::createTryStatement):
  1225. (JSC::ASTBuilder::createSwitchStatement):
  1226. (JSC::ASTBuilder::createWhileStatement):
  1227. (JSC::ASTBuilder::createDoWhileStatement):
  1228. (JSC::ASTBuilder::createLabelStatement):
  1229. (JSC::ASTBuilder::createWithStatement):
  1230. (JSC::ASTBuilder::createThrowStatement):
  1231. (JSC::ASTBuilder::createDebugger):
  1232. (JSC::ASTBuilder::createConstStatement):
  1233. (JSC::ASTBuilder::appendConstDecl):
  1234. (JSC::ASTBuilder::addVar):
  1235. (JSC::ASTBuilder::combineCommaNodes):
  1236. (JSC::ASTBuilder::Scope::Scope):
  1237. (JSC::ASTBuilder::createNumber):
  1238. (ASTBuilder):
  1239. (JSC::ASTBuilder::makeTypeOfNode):
  1240. (JSC::ASTBuilder::makeDeleteNode):
  1241. (JSC::ASTBuilder::makeNegateNode):
  1242. (JSC::ASTBuilder::makeBitwiseNotNode):
  1243. (JSC::ASTBuilder::makeMultNode):
  1244. (JSC::ASTBuilder::makeDivNode):
  1245. (JSC::ASTBuilder::makeModNode):
  1246. (JSC::ASTBuilder::makeAddNode):
  1247. (JSC::ASTBuilder::makeSubNode):
  1248. (JSC::ASTBuilder::makeLeftShiftNode):
  1249. (JSC::ASTBuilder::makeRightShiftNode):
  1250. (JSC::ASTBuilder::makeURightShiftNode):
  1251. (JSC::ASTBuilder::makeBitOrNode):
  1252. (JSC::ASTBuilder::makeBitAndNode):
  1253. (JSC::ASTBuilder::makeBitXOrNode):
  1254. (JSC::ASTBuilder::makeFunctionCallNode):
  1255. (JSC::ASTBuilder::makeBinaryNode):
  1256. (JSC::ASTBuilder::makeAssignNode):
  1257. (JSC::ASTBuilder::makePrefixNode):
  1258. (JSC::ASTBuilder::makePostfixNode):
  1259. * parser/Lexer.cpp:
  1260. (JSC::Keywords::Keywords):
  1261. (JSC::::Lexer):
  1262. (JSC::::parseIdentifier):
  1263. (JSC::::parseIdentifierSlowCase):
  1264. * parser/Lexer.h:
  1265. (JSC::Keywords::isKeyword):
  1266. (JSC::Keywords::getKeyword):
  1267. (Keywords):
  1268. (Lexer):
  1269. (JSC::::makeIdentifier):
  1270. (JSC::::makeRightSizedIdentifier):
  1271. (JSC::::makeIdentifierLCharFromUChar):
  1272. (JSC::::makeLCharIdentifier):
  1273. * parser/NodeConstructors.h:
  1274. (JSC::ParserArenaFreeable::operator new):
  1275. (JSC::ParserArenaDeletable::operator new):
  1276. (JSC::ParserArenaRefCounted::ParserArenaRefCounted):
  1277. (JSC::PropertyNode::PropertyNode):
  1278. (JSC::ContinueNode::ContinueNode):
  1279. (JSC::BreakNode::BreakNode):
  1280. (JSC::ForInNode::ForInNode):
  1281. * parser/Nodes.cpp:
  1282. (JSC::ScopeNode::ScopeNode):
  1283. (JSC::ProgramNode::ProgramNode):
  1284. (JSC::ProgramNode::create):
  1285. (JSC::EvalNode::EvalNode):
  1286. (JSC::EvalNode::create):
  1287. (JSC::FunctionBodyNode::FunctionBodyNode):
  1288. (JSC::FunctionBodyNode::create):
  1289. * parser/Nodes.h:
  1290. (ParserArenaFreeable):
  1291. (ParserArenaDeletable):
  1292. (ParserArenaRefCounted):
  1293. (ArrayNode):
  1294. (ForInNode):
  1295. (ContinueNode):
  1296. (BreakNode):
  1297. (ScopeNode):
  1298. (ProgramNode):
  1299. (EvalNode):
  1300. (FunctionBodyNode):
  1301. * parser/Parser.cpp:
  1302. (JSC::::Parser):
  1303. (JSC::::parseInner):
  1304. (JSC::::parseSourceElements):
  1305. (JSC::::parseTryStatement):
  1306. (JSC::::parseFunctionBody):
  1307. (JSC::::parseFunctionInfo):
  1308. (JSC::::parseAssignmentExpression):
  1309. (JSC::::parseProperty):
  1310. (JSC::::parsePrimaryExpression):
  1311. (JSC::::parseMemberExpression):
  1312. (JSC::::parseUnaryExpression):
  1313. * parser/Parser.h:
  1314. (JSC):
  1315. (JSC::Scope::Scope):
  1316. (JSC::Scope::declareVariable):
  1317. (JSC::Scope::declareParameter):
  1318. (Scope):
  1319. (Parser):
  1320. (JSC::Parser::pushScope):
  1321. (JSC::::parse):
  1322. (JSC::parse):
  1323. * parser/ParserArena.h:
  1324. (IdentifierArena):
  1325. (JSC::IdentifierArena::makeIdentifier):
  1326. (JSC::IdentifierArena::makeIdentifierLCharFromUChar):
  1327. (JSC::IdentifierArena::makeNumericIdentifier):
  1328. * parser/SyntaxChecker.h:
  1329. (JSC::SyntaxChecker::SyntaxChecker):
  1330. (JSC::SyntaxChecker::createProperty):
  1331. (JSC::SyntaxChecker::createGetterOrSetterProperty):
  1332. * profiler/LegacyProfiler.cpp:
  1333. (JSC::LegacyProfiler::startProfiling):
  1334. (JSC::LegacyProfiler::stopProfiling):
  1335. * profiler/LegacyProfiler.h:
  1336. (JSC):
  1337. * profiler/ProfilerBytecode.cpp:
  1338. (JSC::Profiler::Bytecode::toJS):
  1339. * profiler/ProfilerBytecodeSequence.cpp:
  1340. (JSC::Profiler::BytecodeSequence::BytecodeSequence):
  1341. (JSC::Profiler::BytecodeSequence::addSequenceProperties):
  1342. * profiler/ProfilerBytecodes.cpp:
  1343. (JSC::Profiler::Bytecodes::toJS):
  1344. * profiler/ProfilerCompilation.cpp:
  1345. (JSC::Profiler::Compilation::toJS):
  1346. * profiler/ProfilerCompiledBytecode.cpp:
  1347. (JSC::Profiler::CompiledBytecode::toJS):
  1348. * profiler/ProfilerDatabase.cpp:
  1349. (JSC::Profiler::Database::Database):
  1350. (JSC::Profiler::Database::toJS):
  1351. (JSC::Profiler::Database::toJSON):
  1352. * profiler/ProfilerDatabase.h:
  1353. (Database):
  1354. * profiler/ProfilerOSRExit.cpp:
  1355. (JSC::Profiler::OSRExit::toJS):
  1356. * profiler/ProfilerOrigin.cpp:
  1357. (JSC::Profiler::Origin::toJS):
  1358. * profiler/ProfilerProfiledBytecodes.cpp:
  1359. (JSC::Profiler::ProfiledBytecodes::toJS):
  1360. * runtime/ArgList.h:
  1361. (MarkedArgumentBuffer):
  1362. * runtime/Arguments.cpp:
  1363. (JSC::Arguments::putByIndex):
  1364. (JSC::Arguments::put):
  1365. (JSC::Arguments::deleteProperty):
  1366. (JSC::Arguments::defineOwnProperty):
  1367. (JSC::Arguments::tearOff):
  1368. (JSC::Arguments::didTearOffActivation):
  1369. (JSC::Arguments::tearOffForInlineCallFrame):
  1370. * runtime/Arguments.h:
  1371. (JSC::Arguments::create):
  1372. (JSC::Arguments::createStructure):
  1373. (Arguments):
  1374. (JSC::Arguments::Arguments):
  1375. (JSC::Arguments::trySetArgument):
  1376. (JSC::Arguments::finishCreation):
  1377. * runtime/ArrayConstructor.cpp:
  1378. (JSC::ArrayConstructor::finishCreation):
  1379. * runtime/ArrayConstructor.h:
  1380. (JSC::ArrayConstructor::createStructure):
  1381. * runtime/ArrayPrototype.cpp:
  1382. (JSC::ArrayPrototype::ArrayPrototype):
  1383. (JSC::ArrayPrototype::finishCreation):
  1384. (JSC::arrayProtoFuncSort):
  1385. (JSC::arrayProtoFuncSplice):
  1386. * runtime/ArrayPrototype.h:
  1387. (JSC::ArrayPrototype::createStructure):
  1388. * runtime/BatchedTransitionOptimizer.h:
  1389. (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
  1390. (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
  1391. (BatchedTransitionOptimizer):
  1392. * runtime/BooleanConstructor.cpp:
  1393. (JSC::BooleanConstructor::finishCreation):
  1394. (JSC::constructBoolean):
  1395. (JSC::constructBooleanFromImmediateBoolean):
  1396. * runtime/BooleanConstructor.h:
  1397. (JSC::BooleanConstructor::createStructure):
  1398. * runtime/BooleanObject.cpp:
  1399. (JSC::BooleanObject::BooleanObject):
  1400. (JSC::BooleanObject::finishCreation):
  1401. * runtime/BooleanObject.h:
  1402. (BooleanObject):
  1403. (JSC::BooleanObject::create):
  1404. (JSC::BooleanObject::createStructure):
  1405. * runtime/BooleanPrototype.cpp:
  1406. (JSC::BooleanPrototype::BooleanPrototype):
  1407. (JSC::BooleanPrototype::finishCreation):
  1408. (JSC::booleanProtoFuncToString):
  1409. * runtime/BooleanPrototype.h:
  1410. (JSC::BooleanPrototype::createStructure):
  1411. * runtime/Butterfly.h:
  1412. (JSC):
  1413. (Butterfly):
  1414. * runtime/ButterflyInlines.h:
  1415. (JSC::Butterfly::createUninitialized):
  1416. (JSC::Butterfly::create):
  1417. (JSC::Butterfly::growPropertyStorage):
  1418. (JSC::Butterfly::createOrGrowArrayRight):
  1419. (JSC::Butterfly::growArrayRight):
  1420. (JSC::Butterfly::resizeArray):
  1421. * runtime/CodeCache.cpp:
  1422. (JSC::CodeCache::getCodeBlock):
  1423. (JSC::CodeCache::getProgramCodeBlock):
  1424. (JSC::CodeCache::getEvalCodeBlock):
  1425. (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
  1426. * runtime/CodeCache.h:
  1427. (JSC):
  1428. (JSC::SourceCodeValue::SourceCodeValue):
  1429. (CodeCache):
  1430. * runtime/CommonIdentifiers.cpp:
  1431. (JSC):
  1432. (JSC::CommonIdentifiers::CommonIdentifiers):
  1433. * runtime/CommonIdentifiers.h:
  1434. (CommonIdentifiers):
  1435. * runtime/CommonSlowPaths.h:
  1436. (JSC::CommonSlowPaths::opIn):
  1437. * runtime/Completion.cpp:
  1438. (JSC::checkSyntax):
  1439. (JSC::evaluate):
  1440. * runtime/DateConstructor.cpp:
  1441. (JSC::DateConstructor::finishCreation):
  1442. * runtime/DateConstructor.h:
  1443. (JSC::DateConstructor::createStructure):
  1444. * runtime/DateInstance.cpp:
  1445. (JSC::DateInstance::DateInstance):
  1446. (JSC::DateInstance::finishCreation):
  1447. (JSC::DateInstance::calculateGregorianDateTime):
  1448. (JSC::DateInstance::calculateGregorianDateTimeUTC):
  1449. * runtime/DateInstance.h:
  1450. (DateInstance):
  1451. (JSC::DateInstance::create):
  1452. (JSC::DateInstance::createStructure):
  1453. * runtime/DatePrototype.cpp:
  1454. (JSC::DatePrototype::finishCreation):
  1455. (JSC::dateProtoFuncSetTime):
  1456. (JSC::setNewValueFromTimeArgs):
  1457. (JSC::setNewValueFromDateArgs):
  1458. (JSC::dateProtoFuncSetYear):
  1459. (JSC::dateProtoFuncToJSON):
  1460. * runtime/DatePrototype.h:
  1461. (JSC::DatePrototype::createStructure):
  1462. * runtime/Error.cpp:
  1463. (JSC::createError):
  1464. (JSC::createEvalError):
  1465. (JSC::createRangeError):
  1466. (JSC::createReferenceError):
  1467. (JSC::createSyntaxError):
  1468. (JSC::createTypeError):
  1469. (JSC::createURIError):
  1470. (JSC::addErrorInfo):
  1471. (JSC::throwError):
  1472. * runtime/Error.h:
  1473. (JSC):
  1474. (JSC::StrictModeTypeErrorFunction::create):
  1475. (JSC::StrictModeTypeErrorFunction::createStructure):
  1476. * runtime/ErrorConstructor.cpp:
  1477. (JSC::ErrorConstructor::finishCreation):
  1478. * runtime/ErrorConstructor.h:
  1479. (JSC::ErrorConstructor::createStructure):
  1480. * runtime/ErrorInstance.cpp:
  1481. (JSC::ErrorInstance::ErrorInstance):
  1482. * runtime/ErrorInstance.h:
  1483. (JSC::ErrorInstance::createStructure):
  1484. (JSC::ErrorInstance::create):
  1485. (ErrorInstance):
  1486. (JSC::ErrorInstance::finishCreation):
  1487. * runtime/ErrorPrototype.cpp:
  1488. (JSC::ErrorPrototype::ErrorPrototype):
  1489. (JSC::ErrorPrototype::finishCreation):
  1490. * runtime/ErrorPrototype.h:
  1491. (JSC::ErrorPrototype::createStructure):
  1492. * runtime/ExceptionHelpers.cpp:
  1493. (JSC::createInterruptedExecutionException):
  1494. (JSC::createTerminatedExecutionException):
  1495. * runtime/ExceptionHelpers.h:
  1496. (JSC):
  1497. (JSC::InterruptedExecutionError::InterruptedExecutionError):
  1498. (JSC::InterruptedExecutionError::create):
  1499. (JSC::InterruptedExecutionError::createStructure):
  1500. (JSC::TerminatedExecutionError::TerminatedExecutionError):
  1501. (JSC::TerminatedExecutionError::create):
  1502. (JSC::TerminatedExecutionError::createStructure):
  1503. * runtime/Executable.cpp:
  1504. (JSC::jettisonCodeBlock):
  1505. (JSC::EvalExecutable::EvalExecutable):
  1506. (JSC::ProgramExecutable::ProgramExecutable):
  1507. (JSC::FunctionExecutable::FunctionExecutable):
  1508. (JSC::EvalExecutable::compileOptimized):
  1509. (JSC::EvalExecutable::compileInternal):
  1510. (JSC::EvalExecutable::jettisonOptimizedCode):
  1511. (JSC::ProgramExecutable::checkSyntax):
  1512. (JSC::ProgramExecutable::compileOptimized):
  1513. (JSC::ProgramExecutable::jettisonOptimizedCode):
  1514. (JSC::ProgramExecutable::initializeGlobalProperties):
  1515. (JSC::FunctionExecutable::compileOptimizedForCall):
  1516. (JSC::FunctionExecutable::compileOptimizedForConstruct):
  1517. (JSC::FunctionExecutable::produceCodeBlockFor):
  1518. (JSC::FunctionExecutable::jettisonOptimizedCodeForCall):
  1519. (JSC::FunctionExecutable::jettisonOptimizedCodeForConstruct):
  1520. (JSC::FunctionExecutable::fromGlobalCode):
  1521. * runtime/Executable.h:
  1522. (JSC::ExecutableBase::ExecutableBase):
  1523. (JSC::ExecutableBase::finishCreation):
  1524. (JSC::ExecutableBase::createStructure):
  1525. (JSC::NativeExecutable::create):
  1526. (JSC::NativeExecutable::createStructure):
  1527. (JSC::NativeExecutable::finishCreation):
  1528. (JSC::NativeExecutable::NativeExecutable):
  1529. (JSC::ScriptExecutable::ScriptExecutable):
  1530. (JSC::ScriptExecutable::finishCreation):
  1531. (JSC::EvalExecutable::compile):
  1532. (EvalExecutable):
  1533. (JSC::EvalExecutable::create):
  1534. (JSC::EvalExecutable::createStructure):
  1535. (JSC::ProgramExecutable::create):
  1536. (ProgramExecutable):
  1537. (JSC::ProgramExecutable::compile):
  1538. (JSC::ProgramExecutable::createStructure):
  1539. (JSC::FunctionExecutable::create):
  1540. (JSC::FunctionExecutable::compileForCall):
  1541. (FunctionExecutable):
  1542. (JSC::FunctionExecutable::compileForConstruct):
  1543. (JSC::FunctionExecutable::jettisonOptimizedCodeFor):
  1544. (JSC::FunctionExecutable::createStructure):
  1545. (JSC::JSFunction::JSFunction):
  1546. * runtime/ExecutionHarness.h:
  1547. (JSC::prepareForExecution):
  1548. (JSC::prepareFunctionForExecution):
  1549. * runtime/FunctionConstructor.cpp:
  1550. (JSC::FunctionConstructor::finishCreation):
  1551. * runtime/FunctionConstructor.h:
  1552. (JSC::FunctionConstructor::createStructure):
  1553. * runtime/FunctionPrototype.cpp:
  1554. (JSC::FunctionPrototype::finishCreation):
  1555. (JSC::FunctionPrototype::addFunctionProperties):
  1556. (JSC::functionProtoFuncBind):
  1557. * runtime/FunctionPrototype.h:
  1558. (JSC::FunctionPrototype::createStructure):
  1559. * runtime/GCActivityCallback.cpp:
  1560. (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
  1561. (JSC::DefaultGCActivityCallback::doWork):
  1562. (JSC::DefaultGCActivityCallback::didAllocate):
  1563. * runtime/GCActivityCallback.h:
  1564. (JSC::GCActivityCallback::GCActivityCallback):
  1565. * runtime/GCActivityCallbackBlackBerry.cpp:
  1566. (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
  1567. (JSC::DefaultGCActivityCallback::doWork):
  1568. (JSC::DefaultGCActivityCallback::didAllocate):
  1569. * runtime/GetterSetter.h:
  1570. (JSC::GetterSetter::GetterSetter):
  1571. (JSC::GetterSetter::create):
  1572. (JSC::GetterSetter::setGetter):
  1573. (JSC::GetterSetter::setSetter):
  1574. (JSC::GetterSetter::createStructure):
  1575. * runtime/Identifier.cpp:
  1576. (JSC::Identifier::add):
  1577. (JSC::Identifier::add8):
  1578. (JSC::Identifier::addSlowCase):
  1579. (JSC::Identifier::from):
  1580. (JSC::Identifier::checkCurrentIdentifierTable):
  1581. * runtime/Identifier.h:
  1582. (JSC::Identifier::Identifier):
  1583. (JSC::Identifier::createLCharFromUChar):
  1584. (Identifier):
  1585. (JSC::Identifier::add):
  1586. * runtime/InternalFunction.cpp:
  1587. (JSC::InternalFunction::InternalFunction):
  1588. (JSC::InternalFunction::finishCreation):
  1589. (JSC::InternalFunction::name):
  1590. (JSC::InternalFunction::displayName):
  1591. * runtime/InternalFunction.h:
  1592. (JSC::InternalFunction::createStructure):
  1593. (InternalFunction):
  1594. * runtime/JSAPIValueWrapper.h:
  1595. (JSC::JSAPIValueWrapper::createStructure):
  1596. (JSC::JSAPIValueWrapper::finishCreation):
  1597. (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
  1598. * runtime/JSActivation.cpp:
  1599. (JSC::JSActivation::symbolTablePut):
  1600. (JSC::JSActivation::symbolTablePutWithAttributes):
  1601. (JSC::JSActivation::getOwnPropertySlot):
  1602. (JSC::JSActivation::put):
  1603. (JSC::JSActivation::putDirectVirtual):
  1604. (JSC::JSActivation::argumentsGetter):
  1605. * runtime/JSActivation.h:
  1606. (JSActivation):
  1607. (JSC::JSActivation::create):
  1608. (JSC::JSActivation::createStructure):
  1609. (JSC::JSActivation::JSActivation):
  1610. (JSC::JSActivation::tearOff):
  1611. * runtime/JSArray.cpp:
  1612. (JSC::createArrayButterflyInDictionaryIndexingMode):
  1613. (JSC::JSArray::setLengthWritable):
  1614. (JSC::JSArray::unshiftCountSlowCase):
  1615. (JSC::JSArray::setLength):
  1616. (JSC::JSArray::push):
  1617. (JSC::JSArray::shiftCountWithAnyIndexingType):
  1618. (JSC::JSArray::unshiftCountWithArrayStorage):
  1619. (JSC::JSArray::unshiftCountWithAnyIndexingType):
  1620. (JSC::ContiguousTypeAccessor::setWithValue):
  1621. (JSC::JSArray::sortCompactedVector):
  1622. (JSC::JSArray::sortVector):
  1623. * runtime/JSArray.h:
  1624. (JSC::JSArray::JSArray):
  1625. (JSArray):
  1626. (JSC::JSArray::shiftCountForShift):
  1627. (JSC::JSArray::unshiftCountForShift):
  1628. (JSC::JSArray::createStructure):
  1629. (JSC::createContiguousArrayButterfly):
  1630. (JSC::createArrayButterfly):
  1631. (JSC):
  1632. (JSC::JSArray::create):
  1633. (JSC::JSArray::tryCreateUninitialized):
  1634. (JSC::constructArray):
  1635. * runtime/JSBoundFunction.cpp:
  1636. (JSC::JSBoundFunction::create):
  1637. (JSC::JSBoundFunction::JSBoundFunction):
  1638. * runtime/JSBoundFunction.h:
  1639. (JSC::JSBoundFunction::createStructure):
  1640. * runtime/JSCJSValue.cpp:
  1641. (JSC::JSValue::putToPrimitive):
  1642. (JSC::JSValue::toStringSlowCase):
  1643. * runtime/JSCJSValue.h:
  1644. (JSC):
  1645. * runtime/JSCell.h:
  1646. (JSCell):
  1647. * runtime/JSCellInlines.h:
  1648. (JSC::JSCell::JSCell):
  1649. (JSC::JSCell::finishCreation):
  1650. (JSC::allocateCell):
  1651. (JSC::JSCell::setStructure):
  1652. (JSC::JSCell::fastGetOwnProperty):
  1653. * runtime/JSDateMath.cpp:
  1654. (JSC::getDSTOffset):
  1655. (JSC::getUTCOffset):
  1656. (JSC::parseDate):
  1657. * runtime/JSDestructibleObject.h:
  1658. (JSC::JSDestructibleObject::JSDestructibleObject):
  1659. * runtime/JSFunction.cpp:
  1660. (JSC::JSFunction::create):
  1661. (JSC::JSFunction::JSFunction):
  1662. (JSC::JSFunction::finishCreation):
  1663. (JSC::JSFunction::createAllocationProfile):
  1664. (JSC::JSFunction::name):
  1665. (JSC::JSFunction::displayName):
  1666. (JSC::JSFunction::getOwnPropertySlot):
  1667. (JSC::JSFunction::deleteProperty):
  1668. * runtime/JSFunction.h:
  1669. (JSFunction):
  1670. (JSC::JSFunction::create):
  1671. (JSC::JSFunction::setScope):
  1672. (JSC::JSFunction::createStructure):
  1673. * runtime/JSGlobalData.cpp: Removed.
  1674. * runtime/JSGlobalData.h: Removed.
  1675. * runtime/JSGlobalObject.cpp:
  1676. (JSC::JSGlobalObject::JSGlobalObject):
  1677. (JSC::JSGlobalObject::~JSGlobalObject):
  1678. (JSC::JSGlobalObject::setGlobalThis):
  1679. (JSC::JSGlobalObject::init):
  1680. (JSC::JSGlobalObject::putDirectVirtual):
  1681. (JSC::JSGlobalObject::reset):
  1682. (JSC):
  1683. (JSC::JSGlobalObject::haveABadTime):
  1684. (JSC::JSGlobalObject::createThrowTypeError):
  1685. (JSC::JSGlobalObject::resetPrototype):
  1686. (JSC::JSGlobalObject::addStaticGlobals):
  1687. (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope):
  1688. (JSC::JSGlobalObject::createProgramCodeBlock):
  1689. (JSC::JSGlobalObject::createEvalCodeBlock):
  1690. * runtime/JSGlobalObject.h:
  1691. (JSC::JSGlobalObject::create):
  1692. (JSGlobalObject):
  1693. (JSC::JSGlobalObject::finishCreation):
  1694. (JSC::JSGlobalObject::vm):
  1695. (JSC::JSGlobalObject::createStructure):
  1696. (JSC::ExecState::dynamicGlobalObject):
  1697. (JSC::constructEmptyArray):
  1698. (DynamicGlobalObjectScope):
  1699. * runtime/JSGlobalObjectFunctions.cpp:
  1700. (JSC::globalFuncProtoSetter):
  1701. * runtime/JSLock.cpp:
  1702. (JSC::JSLockHolder::JSLockHolder):
  1703. (JSC::JSLockHolder::init):
  1704. (JSC::JSLockHolder::~JSLockHolder):
  1705. (JSC::JSLock::JSLock):
  1706. (JSC::JSLock::willDestroyGlobalData):
  1707. (JSC::JSLock::lock):
  1708. (JSC::JSLock::unlock):
  1709. (JSC::JSLock::DropAllLocks::DropAllLocks):
  1710. (JSC::JSLock::DropAllLocks::~DropAllLocks):
  1711. * runtime/JSLock.h:
  1712. (JSC):
  1713. (JSLockHolder):
  1714. (JSLock):
  1715. (JSC::JSLock::vm):
  1716. (DropAllLocks):
  1717. * runtime/JSNameScope.h:
  1718. (JSC::JSNameScope::createStructure):
  1719. (JSC::JSNameScope::finishCreation):
  1720. (JSC::JSNameScope::JSNameScope):
  1721. * runtime/JSNotAnObject.h:
  1722. (JSC::JSNotAnObject::JSNotAnObject):
  1723. (JSC::JSNotAnObject::create):
  1724. (JSC::JSNotAnObject::createStructure):
  1725. * runtime/JSONObject.cpp:
  1726. (JSC::JSONObject::JSONObject):
  1727. (JSC::JSONObject::finishCreation):
  1728. (Holder):
  1729. (JSC::Stringifier::Stringifier):
  1730. (JSC::Stringifier::stringify):
  1731. (JSC::Stringifier::toJSON):
  1732. (JSC::Stringifier::appendStringifiedValue):
  1733. (JSC::Stringifier::Holder::Holder):
  1734. (JSC::Stringifier::Holder::appendNextProperty):
  1735. (JSC::Walker::Walker):
  1736. (JSC::Walker::walk):
  1737. (JSC::JSONProtoFuncParse):
  1738. (JSC::JSONProtoFuncStringify):
  1739. (JSC::JSONStringify):
  1740. * runtime/JSONObject.h:
  1741. (JSC::JSONObject::createStructure):
  1742. * runtime/JSObject.cpp:
  1743. (JSC::JSObject::put):
  1744. (JSC::JSObject::putByIndex):
  1745. (JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists):
  1746. (JSC::JSObject::enterDictionaryIndexingMode):
  1747. (JSC::JSObject::notifyPresenceOfIndexedAccessors):
  1748. (JSC::JSObject::createInitialIndexedStorage):
  1749. (JSC::JSObject::createInitialUndecided):
  1750. (JSC::JSObject::createInitialInt32):
  1751. (JSC::JSObject::createInitialDouble):
  1752. (JSC::JSObject::createInitialContiguous):
  1753. (JSC::JSObject::createArrayStorage):
  1754. (JSC::JSObject::createInitialArrayStorage):
  1755. (JSC::JSObject::convertUndecidedToInt32):
  1756. (JSC::JSObject::convertUndecidedToDouble):
  1757. (JSC::JSObject::convertUndecidedToContiguous):
  1758. (JSC::JSObject::constructConvertedArrayStorageWithoutCopyingElements):
  1759. (JSC::JSObject::convertUndecidedToArrayStorage):
  1760. (JSC::JSObject::convertInt32ToDouble):
  1761. (JSC::JSObject::convertInt32ToContiguous):
  1762. (JSC::JSObject::convertInt32ToArrayStorage):
  1763. (JSC::JSObject::genericConvertDoubleToContiguous):
  1764. (JSC::JSObject::convertDoubleToContiguous):
  1765. (JSC::JSObject::rageConvertDoubleToContiguous):
  1766. (JSC::JSObject::convertDoubleToArrayStorage):
  1767. (JSC::JSObject::convertContiguousToArrayStorage):
  1768. (JSC::JSObject::convertUndecidedForValue):
  1769. (JSC::JSObject::convertInt32ForValue):
  1770. (JSC::JSObject::setIndexQuicklyToUndecided):
  1771. (JSC::JSObject::convertInt32ToDoubleOrContiguousWhilePerformingSetIndex):
  1772. (JSC::JSObject::convertDoubleToContiguousWhilePerformingSetIndex):
  1773. (JSC::JSObject::ensureInt32Slow):
  1774. (JSC::JSObject::ensureDoubleSlow):
  1775. (JSC::JSObject::ensureContiguousSlow):
  1776. (JSC::JSObject::rageEnsureContiguousSlow):
  1777. (JSC::JSObject::ensureArrayStorageSlow):
  1778. (JSC::JSObject::ensureArrayStorageExistsAndEnterDictionaryIndexingMode):
  1779. (JSC::JSObject::switchToSlowPutArrayStorage):
  1780. (JSC::JSObject::putDirectVirtual):
  1781. (JSC::JSObject::setPrototype):
  1782. (JSC::JSObject::setPrototypeWithCycleCheck):
  1783. (JSC::JSObject::putDirectAccessor):
  1784. (JSC::JSObject::deleteProperty):
  1785. (JSC::JSObject::getPropertySpecificValue):
  1786. (JSC::JSObject::getOwnNonIndexPropertyNames):
  1787. (JSC::JSObject::seal):
  1788. (JSC::JSObject::freeze):
  1789. (JSC::JSObject::preventExtensions):
  1790. (JSC::JSObject::reifyStaticFunctionsForDelete):
  1791. (JSC::JSObject::removeDirect):
  1792. (JSC::JSObject::putIndexedDescriptor):
  1793. (JSC::JSObject::defineOwnIndexedProperty):
  1794. (JSC::JSObject::allocateSparseIndexMap):
  1795. (JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes):
  1796. (JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage):
  1797. (JSC::JSObject::putByIndexBeyondVectorLength):
  1798. (JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):
  1799. (JSC::JSObject::putDirectIndexBeyondVectorLength):
  1800. (JSC::JSObject::putDirectNativeFunction):
  1801. (JSC::JSObject::increaseVectorLength):
  1802. (JSC::JSObject::ensureLengthSlow):
  1803. (JSC::JSObject::growOutOfLineStorage):
  1804. (JSC::JSObject::getOwnPropertyDescriptor):
  1805. (JSC::putDescriptor):
  1806. (JSC::JSObject::putDirectMayBeIndex):
  1807. (JSC::DefineOwnPropertyScope::DefineOwnPropertyScope):
  1808. (JSC::DefineOwnPropertyScope::~DefineOwnPropertyScope):
  1809. (DefineOwnPropertyScope):
  1810. (JSC::JSObject::defineOwnNonIndexProperty):
  1811. * runtime/JSObject.h:
  1812. (JSObject):
  1813. (JSC::JSObject::putByIndexInline):
  1814. (JSC::JSObject::putDirectIndex):
  1815. (JSC::JSObject::setIndexQuickly):
  1816. (JSC::JSObject::initializeIndex):
  1817. (JSC::JSObject::getDirect):
  1818. (JSC::JSObject::getDirectOffset):
  1819. (JSC::JSObject::putDirect):
  1820. (JSC::JSObject::isSealed):
  1821. (JSC::JSObject::isFrozen):
  1822. (JSC::JSObject::flattenDictionaryObject):
  1823. (JSC::JSObject::ensureInt32):
  1824. (JSC::JSObject::ensureDouble):
  1825. (JSC::JSObject::ensureContiguous):
  1826. (JSC::JSObject::rageEnsureContiguous):
  1827. (JSC::JSObject::ensureArrayStorage):
  1828. (JSC::JSObject::finishCreation):
  1829. (JSC::JSObject::createStructure):
  1830. (JSC::JSObject::ensureLength):
  1831. (JSC::JSNonFinalObject::createStructure):
  1832. (JSC::JSNonFinalObject::JSNonFinalObject):
  1833. (JSC::JSNonFinalObject::finishCreation):
  1834. (JSC::JSFinalObject::createStructure):
  1835. (JSC::JSFinalObject::finishCreation):
  1836. (JSC::JSFinalObject::JSFinalObject):
  1837. (JSC::JSFinalObject::create):
  1838. (JSC::JSObject::setButterfly):
  1839. (JSC::JSObject::JSObject):
  1840. (JSC::JSObject::inlineGetOwnPropertySlot):
  1841. (JSC::JSObject::putDirectInternal):
  1842. (JSC::JSObject::setStructureAndReallocateStorageIfNecessary):
  1843. (JSC::JSObject::putOwnDataProperty):
  1844. (JSC::JSObject::putDirectWithoutTransition):
  1845. (JSC):
  1846. * runtime/JSPropertyNameIterator.cpp:
  1847. (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
  1848. (JSC::JSPropertyNameIterator::create):
  1849. * runtime/JSPropertyNameIterator.h:
  1850. (JSC::JSPropertyNameIterator::createStructure):
  1851. (JSC::JSPropertyNameIterator::setCachedStructure):
  1852. (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
  1853. (JSC::JSPropertyNameIterator::finishCreation):
  1854. (JSC::StructureRareData::setEnumerationCache):
  1855. * runtime/JSProxy.cpp:
  1856. (JSC::JSProxy::setTarget):
  1857. * runtime/JSProxy.h:
  1858. (JSC::JSProxy::create):
  1859. (JSC::JSProxy::createStructure):
  1860. (JSC::JSProxy::JSProxy):
  1861. (JSC::JSProxy::finishCreation):
  1862. (JSProxy):
  1863. * runtime/JSScope.cpp:
  1864. (JSC::executeResolveOperations):
  1865. (JSC::JSScope::resolveContainingScopeInternal):
  1866. (JSC::JSScope::resolveWithBase):
  1867. (JSC::JSScope::resolveWithThis):
  1868. (JSC::JSScope::resolvePut):
  1869. * runtime/JSScope.h:
  1870. (JSScope):
  1871. (JSC::JSScope::JSScope):
  1872. (JSC::JSScope::vm):
  1873. (JSC::ExecState::vm):
  1874. * runtime/JSSegmentedVariableObject.h:
  1875. (JSC::JSSegmentedVariableObject::JSSegmentedVariableObject):
  1876. (JSC::JSSegmentedVariableObject::finishCreation):
  1877. * runtime/JSString.cpp:
  1878. (JSC::JSRopeString::RopeBuilder::expand):
  1879. (JSC::StringObject::create):
  1880. * runtime/JSString.h:
  1881. (JSC):
  1882. (JSString):
  1883. (JSC::JSString::JSString):
  1884. (JSC::JSString::finishCreation):
  1885. (JSC::JSString::create):
  1886. (JSC::JSString::createHasOtherOwner):
  1887. (JSC::JSString::createStructure):
  1888. (JSRopeString):
  1889. (JSC::JSRopeString::RopeBuilder::RopeBuilder):
  1890. (JSC::JSRopeString::RopeBuilder::append):
  1891. (RopeBuilder):
  1892. (JSC::JSRopeString::JSRopeString):
  1893. (JSC::JSRopeString::finishCreation):
  1894. (JSC::JSRopeString::append):
  1895. (JSC::JSRopeString::createNull):
  1896. (JSC::JSRopeString::create):
  1897. (JSC::jsEmptyString):
  1898. (JSC::jsSingleCharacterString):
  1899. (JSC::jsSingleCharacterSubstring):
  1900. (JSC::jsNontrivialString):
  1901. (JSC::jsString):
  1902. (JSC::jsSubstring):
  1903. (JSC::jsSubstring8):
  1904. (JSC::jsOwnedString):
  1905. (JSC::jsStringBuilder):
  1906. (JSC::inlineJSValueNotStringtoString):
  1907. * runtime/JSStringJoiner.cpp:
  1908. (JSC::JSStringJoiner::build):
  1909. * runtime/JSSymbolTableObject.h:
  1910. (JSC::JSSymbolTableObject::JSSymbolTableObject):
  1911. (JSC::JSSymbolTableObject::finishCreation):
  1912. (JSC::symbolTablePut):
  1913. (JSC::symbolTablePutWithAttributes):
  1914. * runtime/JSVariableObject.h:
  1915. (JSC::JSVariableObject::JSVariableObject):
  1916. * runtime/JSWithScope.h:
  1917. (JSC::JSWithScope::create):
  1918. (JSC::JSWithScope::createStructure):
  1919. (JSC::JSWithScope::JSWithScope):
  1920. * runtime/JSWrapperObject.h:
  1921. (JSWrapperObject):
  1922. (JSC::JSWrapperObject::createStructure):
  1923. (JSC::JSWrapperObject::JSWrapperObject):
  1924. (JSC::JSWrapperObject::setInternalValue):
  1925. * runtime/LiteralParser.cpp:
  1926. (JSC::::tryJSONPParse):
  1927. (JSC::::makeIdentifier):
  1928. (JSC::::parse):
  1929. * runtime/Lookup.cpp:
  1930. (JSC::HashTable::createTable):
  1931. (JSC::setUpStaticFunctionSlot):
  1932. * runtime/Lookup.h:
  1933. (JSC::HashTable::initializeIfNeeded):
  1934. (JSC::HashTable::entry):
  1935. (JSC::HashTable::begin):
  1936. (JSC::HashTable::end):
  1937. (HashTable):
  1938. (JSC::lookupPut):
  1939. * runtime/MathObject.cpp:
  1940. (JSC::MathObject::MathObject):
  1941. (JSC::MathObject::finishCreation):
  1942. (JSC::mathProtoFuncSin):
  1943. * runtime/MathObject.h:
  1944. (JSC::MathObject::createStructure):
  1945. * runtime/MemoryStatistics.cpp:
  1946. * runtime/MemoryStatistics.h:
  1947. * runtime/NameConstructor.cpp:
  1948. (JSC::NameConstructor::finishCreation):
  1949. (JSC::constructPrivateName):
  1950. * runtime/NameConstructor.h:
  1951. (JSC::NameConstructor::createStructure):
  1952. * runtime/NameInstance.cpp:
  1953. (JSC::NameInstance::NameInstance):
  1954. * runtime/NameInstance.h:
  1955. (JSC::NameInstance::createStructure):
  1956. (JSC::NameInstance::create):
  1957. (NameInstance):
  1958. (JSC::NameInstance::finishCreation):
  1959. * runtime/NamePrototype.cpp:
  1960. (JSC::NamePrototype::NamePrototype):
  1961. (JSC::NamePrototype::finishCreation):
  1962. * runtime/NamePrototype.h:
  1963. (JSC::NamePrototype::createStructure):
  1964. * runtime/NativeErrorConstructor.h:
  1965. (JSC::NativeErrorConstructor::createStructure):
  1966. (JSC::NativeErrorConstructor::finishCreation):
  1967. * runtime/NativeErrorPrototype.cpp:
  1968. (JSC::NativeErrorPrototype::finishCreation):
  1969. * runtime/NumberConstructor.cpp:
  1970. (JSC::NumberConstructor::finishCreation):
  1971. (JSC::constructWithNumberConstructor):
  1972. * runtime/NumberConstructor.h:
  1973. (JSC::NumberConstructor::createStructure):
  1974. * runtime/NumberObject.cpp:
  1975. (JSC::NumberObject::NumberObject):
  1976. (JSC::NumberObject::finishCreation):
  1977. (JSC::constructNumber):
  1978. * runtime/NumberObject.h:
  1979. (NumberObject):
  1980. (JSC::NumberObject::create):
  1981. (JSC::NumberObject::createStructure):
  1982. * runtime/NumberPrototype.cpp:
  1983. (JSC::NumberPrototype::NumberPrototype):
  1984. (JSC::NumberPrototype::finishCreation):
  1985. (JSC::integerValueToString):
  1986. (JSC::numberProtoFuncToString):
  1987. * runtime/NumberPrototype.h:
  1988. (JSC::NumberPrototype::createStructure):
  1989. * runtime/ObjectConstructor.cpp:
  1990. (JSC::ObjectConstructor::finishCreation):
  1991. (JSC::objectConstructorGetOwnPropertyDescriptor):
  1992. (JSC::objectConstructorSeal):
  1993. (JSC::objectConstructorFreeze):
  1994. (JSC::objectConstructorPreventExtensions):
  1995. (JSC::objectConstructorIsSealed):
  1996. (JSC::objectConstructorIsFrozen):
  1997. * runtime/ObjectConstructor.h:
  1998. (JSC::ObjectConstructor::createStructure):
  1999. (JSC::constructEmptyObject):
  2000. * runtime/ObjectPrototype.cpp:
  2001. (JSC::ObjectPrototype::ObjectPrototype):
  2002. (JSC::ObjectPrototype::finishCreation):
  2003. (JSC::objectProtoFuncToString):
  2004. * runtime/ObjectPrototype.h:
  2005. (JSC::ObjectPrototype::createStructure):
  2006. * runtime/Operations.cpp:
  2007. (JSC::jsTypeStringForValue):
  2008. * runtime/Operations.h:
  2009. (JSC):
  2010. (JSC::jsString):
  2011. (JSC::jsStringFromArguments):
  2012. (JSC::normalizePrototypeChainForChainAccess):
  2013. (JSC::normalizePrototypeChain):
  2014. * runtime/PropertyMapHashTable.h:
  2015. (JSC::PropertyMapEntry::PropertyMapEntry):
  2016. (JSC::PropertyTable::createStructure):
  2017. (PropertyTable):
  2018. (JSC::PropertyTable::copy):
  2019. * runtime/PropertyNameArray.h:
  2020. (JSC::PropertyNameArray::PropertyNameArray):
  2021. (JSC::PropertyNameArray::vm):
  2022. (JSC::PropertyNameArray::addKnownUnique):
  2023. (PropertyNameArray):
  2024. * runtime/PropertyTable.cpp:
  2025. (JSC::PropertyTable::create):
  2026. (JSC::PropertyTable::clone):
  2027. (JSC::PropertyTable::PropertyTable):
  2028. * runtime/PrototypeMap.cpp:
  2029. (JSC::PrototypeMap::emptyObjectStructureForPrototype):
  2030. * runtime/RegExp.cpp:
  2031. (JSC::RegExp::RegExp):
  2032. (JSC::RegExp::finishCreation):
  2033. (JSC::RegExp::createWithoutCaching):
  2034. (JSC::RegExp::create):
  2035. (JSC::RegExp::compile):
  2036. (JSC::RegExp::compileIfNecessary):
  2037. (JSC::RegExp::match):
  2038. (JSC::RegExp::compileMatchOnly):
  2039. (JSC::RegExp::compileIfNecessaryMatchOnly):
  2040. * runtime/RegExp.h:
  2041. (JSC):
  2042. (RegExp):
  2043. (JSC::RegExp::createStructure):
  2044. * runtime/RegExpCache.cpp:
  2045. (JSC::RegExpCache::lookupOrCreate):
  2046. (JSC::RegExpCache::RegExpCache):
  2047. (JSC::RegExpCache::addToStrongCache):
  2048. * runtime/RegExpCache.h:
  2049. (RegExpCache):
  2050. * runtime/RegExpCachedResult.cpp:
  2051. (JSC::RegExpCachedResult::lastResult):
  2052. (JSC::RegExpCachedResult::setInput):
  2053. * runtime/RegExpCachedResult.h:
  2054. (JSC::RegExpCachedResult::RegExpCachedResult):
  2055. (JSC::RegExpCachedResult::record):
  2056. * runtime/RegExpConstructor.cpp:
  2057. (JSC::RegExpConstructor::RegExpConstructor):
  2058. (JSC::RegExpConstructor::finishCreation):
  2059. (JSC::constructRegExp):
  2060. * runtime/RegExpConstructor.h:
  2061. (JSC::RegExpConstructor::createStructure):
  2062. (RegExpConstructor):
  2063. (JSC::RegExpConstructor::performMatch):
  2064. * runtime/RegExpMatchesArray.cpp:
  2065. (JSC::RegExpMatchesArray::RegExpMatchesArray):
  2066. (JSC::RegExpMatchesArray::create):
  2067. (JSC::RegExpMatchesArray::finishCreation):
  2068. (JSC::RegExpMatchesArray::reifyAllProperties):
  2069. * runtime/RegExpMatchesArray.h:
  2070. (RegExpMatchesArray):
  2071. (JSC::RegExpMatchesArray::createStructure):
  2072. * runtime/RegExpObject.cpp:
  2073. (JSC::RegExpObject::RegExpObject):
  2074. (JSC::RegExpObject::finishCreation):
  2075. (JSC::RegExpObject::match):
  2076. * runtime/RegExpObject.h:
  2077. (JSC::RegExpObject::create):
  2078. (JSC::RegExpObject::setRegExp):
  2079. (JSC::RegExpObject::setLastIndex):
  2080. (JSC::RegExpObject::createStructure):
  2081. * runtime/RegExpPrototype.cpp:
  2082. (JSC::regExpProtoFuncCompile):
  2083. * runtime/RegExpPrototype.h:
  2084. (JSC::RegExpPrototype::createStructure):
  2085. * runtime/SmallStrings.cpp:
  2086. (JSC::SmallStrings::initializeCommonStrings):
  2087. (JSC::SmallStrings::createEmptyString):
  2088. (JSC::SmallStrings::createSingleCharacterString):
  2089. (JSC::SmallStrings::initialize):
  2090. * runtime/SmallStrings.h:
  2091. (JSC):
  2092. (JSC::SmallStrings::singleCharacterString):
  2093. (SmallStrings):
  2094. * runtime/SparseArrayValueMap.cpp:
  2095. (JSC::SparseArrayValueMap::SparseArrayValueMap):
  2096. (JSC::SparseArrayValueMap::finishCreation):
  2097. (JSC::SparseArrayValueMap::create):
  2098. (JSC::SparseArrayValueMap::createStructure):
  2099. (JSC::SparseArrayValueMap::putDirect):
  2100. (JSC::SparseArrayEntry::put):
  2101. * runtime/SparseArrayValueMap.h:
  2102. * runtime/StrictEvalActivation.cpp:
  2103. (JSC::StrictEvalActivation::StrictEvalActivation):
  2104. * runtime/StrictEvalActivation.h:
  2105. (JSC::StrictEvalActivation::create):
  2106. (JSC::StrictEvalActivation::createStructure):
  2107. * runtime/StringConstructor.cpp:
  2108. (JSC::StringConstructor::finishCreation):
  2109. * runtime/StringConstructor.h:
  2110. (JSC::StringConstructor::createStructure):
  2111. * runtime/StringObject.cpp:
  2112. (JSC::StringObject::StringObject):
  2113. (JSC::StringObject::finishCreation):
  2114. (JSC::constructString):
  2115. * runtime/StringObject.h:
  2116. (JSC::StringObject::create):
  2117. (JSC::StringObject::createStructure):
  2118. (StringObject):
  2119. * runtime/StringPrototype.cpp:
  2120. (JSC::StringPrototype::StringPrototype):
  2121. (JSC::StringPrototype::finishCreation):
  2122. (JSC::removeUsingRegExpSearch):
  2123. (JSC::replaceUsingRegExpSearch):
  2124. (JSC::stringProtoFuncMatch):
  2125. (JSC::stringProtoFuncSearch):
  2126. (JSC::stringProtoFuncSplit):
  2127. * runtime/StringPrototype.h:
  2128. (JSC::StringPrototype::createStructure):
  2129. * runtime/StringRecursionChecker.h:
  2130. (JSC::StringRecursionChecker::performCheck):
  2131. (JSC::StringRecursionChecker::~StringRecursionChecker):
  2132. * runtime/Structure.cpp:
  2133. (JSC::StructureTransitionTable::add):
  2134. (JSC::Structure::Structure):
  2135. (JSC::Structure::materializePropertyMap):
  2136. (JSC::Structure::despecifyDictionaryFunction):
  2137. (JSC::Structure::addPropertyTransition):
  2138. (JSC::Structure::removePropertyTransition):
  2139. (JSC::Structure::changePrototypeTransition):
  2140. (JSC::Structure::despecifyFunctionTransition):
  2141. (JSC::Structure::attributeChangeTransition):
  2142. (JSC::Structure::toDictionaryTransition):
  2143. (JSC::Structure::toCacheableDictionaryTransition):
  2144. (JSC::Structure::toUncacheableDictionaryTransition):
  2145. (JSC::Structure::sealTransition):
  2146. (JSC::Structure::freezeTransition):
  2147. (JSC::Structure::preventExtensionsTransition):
  2148. (JSC::Structure::takePropertyTableOrCloneIfPinned):
  2149. (JSC::Structure::nonPropertyTransition):
  2150. (JSC::Structure::isSealed):
  2151. (JSC::Structure::isFrozen):
  2152. (JSC::Structure::flattenDictionaryStructure):
  2153. (JSC::Structure::addPropertyWithoutTransition):
  2154. (JSC::Structure::removePropertyWithoutTransition):
  2155. (JSC::Structure::allocateRareData):
  2156. (JSC::Structure::cloneRareDataFrom):
  2157. (JSC::Structure::copyPropertyTable):
  2158. (JSC::Structure::copyPropertyTableForPinning):
  2159. (JSC::Structure::get):
  2160. (JSC::Structure::despecifyFunction):
  2161. (JSC::Structure::despecifyAllFunctions):
  2162. (JSC::Structure::putSpecificValue):
  2163. (JSC::Structure::createPropertyMap):
  2164. (JSC::Structure::getPropertyNamesFromStructure):
  2165. (JSC::Structure::prototypeChainMayInterceptStoreTo):
  2166. * runtime/Structure.h:
  2167. (Structure):
  2168. (JSC::Structure::finishCreation):
  2169. (JSC::Structure::setPrototypeWithoutTransition):
  2170. (JSC::Structure::setGlobalObject):
  2171. (JSC::Structure::setObjectToStringValue):
  2172. (JSC::Structure::materializePropertyMapIfNecessary):
  2173. (JSC::Structure::materializePropertyMapIfNecessaryForPinning):
  2174. (JSC::Structure::setPreviousID):
  2175. * runtime/StructureChain.cpp:
  2176. (JSC::StructureChain::StructureChain):
  2177. * runtime/StructureChain.h:
  2178. (JSC::StructureChain::create):
  2179. (JSC::StructureChain::createStructure):
  2180. (JSC::StructureChain::finishCreation):
  2181. (StructureChain):
  2182. * runtime/StructureInlines.h:
  2183. (JSC::Structure::create):
  2184. (JSC::Structure::createStructure):
  2185. (JSC::Structure::get):
  2186. (JSC::Structure::setEnumerationCache):
  2187. (JSC::Structure::prototypeChain):
  2188. (JSC::Structure::propertyTable):
  2189. * runtime/StructureRareData.cpp:
  2190. (JSC::StructureRareData::createStructure):
  2191. (JSC::StructureRareData::create):
  2192. (JSC::StructureRareData::clone):
  2193. (JSC::StructureRareData::StructureRareData):
  2194. * runtime/StructureRareData.h:
  2195. (StructureRareData):
  2196. * runtime/StructureRareDataInlines.h:
  2197. (JSC::StructureRareData::setPreviousID):
  2198. (JSC::StructureRareData::setObjectToStringValue):
  2199. * runtime/StructureTransitionTable.h:
  2200. (StructureTransitionTable):
  2201. (JSC::StructureTransitionTable::setSingleTransition):
  2202. * runtime/SymbolTable.h:
  2203. (JSC::SharedSymbolTable::create):
  2204. (JSC::SharedSymbolTable::createStructure):
  2205. (JSC::SharedSymbolTable::SharedSymbolTable):
  2206. * runtime/VM.cpp: Copied from Source/JavaScriptCore/runtime/JSGlobalData.cpp.
  2207. (JSC::VM::VM):
  2208. (JSC::VM::~VM):
  2209. (JSC::VM::createContextGroup):
  2210. (JSC::VM::create):
  2211. (JSC::VM::createLeaked):
  2212. (JSC::VM::sharedInstanceExists):
  2213. (JSC::VM::sharedInstance):
  2214. (JSC::VM::sharedInstanceInternal):
  2215. (JSC::VM::getHostFunction):
  2216. (JSC::VM::ClientData::~ClientData):
  2217. (JSC::VM::resetDateCache):
  2218. (JSC::VM::startSampling):
  2219. (JSC::VM::stopSampling):
  2220. (JSC::VM::discardAllCode):
  2221. (JSC::VM::dumpSampleData):
  2222. (JSC::VM::addSourceProviderCache):
  2223. (JSC::VM::clearSourceProviderCaches):
  2224. (JSC::VM::releaseExecutableMemory):
  2225. (JSC::releaseExecutableMemory):
  2226. (JSC::VM::gatherConservativeRoots):
  2227. (JSC::VM::addRegExpToTrace):
  2228. (JSC::VM::dumpRegExpTrace):
  2229. * runtime/VM.h: Copied from Source/JavaScriptCore/runtime/JSGlobalData.h.
  2230. (VM):
  2231. (JSC::VM::isSharedInstance):
  2232. (JSC::VM::usingAPI):
  2233. (JSC::VM::isInitializingObject):
  2234. (JSC::VM::setInitializingObjectClass):
  2235. (JSC::WeakSet::heap):
  2236. * runtime/WriteBarrier.h:
  2237. (JSC):
  2238. (JSC::WriteBarrierBase::set):
  2239. (JSC::WriteBarrierBase::setMayBeNull):
  2240. (JSC::WriteBarrierBase::setEarlyValue):
  2241. (JSC::WriteBarrier::WriteBarrier):
  2242. * testRegExp.cpp:
  2243. (GlobalObject):
  2244. (GlobalObject::create):
  2245. (GlobalObject::createStructure):
  2246. (GlobalObject::finishCreation):
  2247. (main):
  2248. (testOneRegExp):
  2249. (parseRegExpLine):
  2250. (runFromFiles):
  2251. (realMain):
  2252. * yarr/YarrInterpreter.h:
  2253. (BytecodePattern):
  2254. * yarr/YarrJIT.cpp:
  2255. (YarrGenerator):
  2256. (JSC::Yarr::YarrGenerator::compile):
  2257. (JSC::Yarr::jitCompile):
  2258. * yarr/YarrJIT.h:
  2259. (JSC):
  2260. 2013-04-18 Xuefei Ren <xren@blackberry.com>
  2261. remove build warning(unused parameter)
  2262. https://bugs.webkit.org/show_bug.cgi?id=114670
  2263. Reviewed by Rob Buis.
  2264. remove warning in Source/JavaScriptCore/runtime/GCActivityCallbackBlackBerry.cpp
  2265. * runtime/GCActivityCallbackBlackBerry.cpp:
  2266. (JSC::DefaultGCActivityCallback::didAllocate):
  2267. 2013-04-18 Jonathan Liu <net147@gmail.com>
  2268. Implement JIT for MinGW-w64 64-bit
  2269. https://bugs.webkit.org/show_bug.cgi?id=114580
  2270. Reviewed by Jocelyn Turcotte.
  2271. * jit/JITStubs.cpp:
  2272. (JSC):
  2273. 2013-04-17 Mark Lam <mark.lam@apple.com>
  2274. Avoid using a branch range that is too far for some CPU architectures.
  2275. https://bugs.webkit.org/show_bug.cgi?id=114782.
  2276. Reviewed by David Kilzer.
  2277. * llint/LowLevelInterpreter.asm:
  2278. * llint/LowLevelInterpreter32_64.asm:
  2279. * llint/LowLevelInterpreter64.asm:
  2280. 2013-04-17 Julien Brianceau <jbrianceau@nds.com>
  2281. Fix SH4 build (broken since r148639).
  2282. https://bugs.webkit.org/show_bug.cgi?id=114773.
  2283. Allow longer displacements for specific branches in SH4 LLINT.
  2284. Reviewed by Oliver Hunt.
  2285. * offlineasm/sh4.rb:
  2286. 2013-04-14 Roger Fong <roger_fong@apple.com>
  2287. Unreviewed. More Windows build fix.
  2288. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  2289. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  2290. 2013-04-14 Roger Fong <roger_fong@apple.com>
  2291. Unreviewed. Windows build fix.
  2292. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  2293. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  2294. 2013-04-17 Mark Lam <mark.lam@apple.com>
  2295. Fix broken build. Replaced a static const with a #define.
  2296. https://bugs.webkit.org/show_bug.cgi?id=114577.
  2297. Unreviewed.
  2298. * runtime/Watchdog.cpp:
  2299. (JSC::Watchdog::Watchdog):
  2300. (JSC::Watchdog::isEnabled):
  2301. 2013-04-17 Mark Lam <mark.lam@apple.com>
  2302. Add LLINT and baseline JIT support for timing out scripts.
  2303. https://bugs.webkit.org/show_bug.cgi?id=114577.
  2304. Reviewed by Geoffrey Garen.
  2305. Introduces the new Watchdog class which is used to track script
  2306. execution time, and initiate script termination if needed.
  2307. * API/JSContextRef.cpp:
  2308. (internalScriptTimeoutCallback):
  2309. (JSContextGroupSetExecutionTimeLimit):
  2310. (JSContextGroupClearExecutionTimeLimit):
  2311. * API/JSContextRefPrivate.h:
  2312. - Added new script execution time limit APIs.
  2313. * API/tests/testapi.c:
  2314. (currentCPUTime):
  2315. (shouldTerminateCallback):
  2316. (cancelTerminateCallback):
  2317. (extendTerminateCallback):
  2318. (main):
  2319. - Added new API tests for script execution time limit.
  2320. * CMakeLists.txt:
  2321. * GNUmakefile.list.am:
  2322. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  2323. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  2324. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
  2325. * JavaScriptCore.xcodeproj/project.pbxproj:
  2326. * Target.pri:
  2327. * bytecompiler/BytecodeGenerator.cpp:
  2328. (JSC::BytecodeGenerator::emitLoopHint):
  2329. - loop hints are needed for the llint as well. Hence, it will be
  2330. emitted unconditionally.
  2331. * interpreter/Interpreter.cpp:
  2332. (JSC::Interpreter::addStackTraceIfNecessary):
  2333. (JSC::Interpreter::throwException):
  2334. (JSC::Interpreter::execute):
  2335. (JSC::Interpreter::executeCall):
  2336. (JSC::Interpreter::executeConstruct):
  2337. - Added checks for script termination before entering script code.
  2338. * jit/JIT.cpp:
  2339. (JSC::JIT::emitWatchdogTimerCheck):
  2340. * jit/JIT.h:
  2341. (JSC::JIT::emit_op_loop_hint):
  2342. * jit/JITStubs.cpp:
  2343. (JSC::DEFINE_STUB_FUNCTION(void, handle_watchdog_timer)):
  2344. * jit/JITStubs.h:
  2345. * llint/LLIntExceptions.cpp:
  2346. (JSC::LLInt::doThrow):
  2347. - Factored out some common code from returnToThrow() and callToThrow().
  2348. (JSC::LLInt::returnToThrow):
  2349. (JSC::LLInt::callToThrow):
  2350. * llint/LLIntSlowPaths.cpp:
  2351. (JSC::LLInt::LLINT_SLOW_PATH_DECL(slow_path_handle_watchdog_timer)):
  2352. * llint/LLIntSlowPaths.h:
  2353. * llint/LowLevelInterpreter.asm:
  2354. * llint/LowLevelInterpreter32_64.asm:
  2355. * llint/LowLevelInterpreter64.asm:
  2356. * runtime/ExceptionHelpers.cpp:
  2357. (JSC::throwTerminatedExecutionException):
  2358. - Also removed the now unused InterruptedExecutionException.
  2359. * runtime/ExceptionHelpers.h:
  2360. * runtime/JSGlobalData.cpp:
  2361. (JSC::JSGlobalData::JSGlobalData):
  2362. * runtime/JSGlobalData.h:
  2363. - Added watchdog, and removed the now obsolete Terminator.
  2364. * runtime/Terminator.h: Removed.
  2365. * runtime/Watchdog.cpp: Added.
  2366. (JSC::Watchdog::Watchdog):
  2367. (JSC::Watchdog::~Watchdog):
  2368. (JSC::Watchdog::setTimeLimit):
  2369. (JSC::Watchdog::didFire):
  2370. (JSC::Watchdog::isEnabled):
  2371. (JSC::Watchdog::fire):
  2372. (JSC::Watchdog::arm):
  2373. (JSC::Watchdog::disarm):
  2374. (JSC::Watchdog::startCountdownIfNeeded):
  2375. (JSC::Watchdog::startCountdown):
  2376. (JSC::Watchdog::stopCountdown):
  2377. (JSC::Watchdog::Scope::Scope):
  2378. (JSC::Watchdog::Scope::~Scope):
  2379. * runtime/Watchdog.h: Added.
  2380. (Watchdog):
  2381. (JSC::Watchdog::didFire):
  2382. (JSC::Watchdog::timerDidFireAddress):
  2383. (JSC::Watchdog::isArmed):
  2384. (Watchdog::Scope):
  2385. * runtime/WatchdogMac.cpp: Added.
  2386. (JSC::Watchdog::initTimer):
  2387. (JSC::Watchdog::destroyTimer):
  2388. (JSC::Watchdog::startTimer):
  2389. (JSC::Watchdog::stopTimer):
  2390. * runtime/WatchdogNone.cpp: Added.
  2391. (JSC::Watchdog::initTimer):
  2392. (JSC::Watchdog::destroyTimer):
  2393. (JSC::Watchdog::startTimer):
  2394. (JSC::Watchdog::stopTimer):
  2395. 2013-04-14 Roger Fong <roger_fong@apple.com>
  2396. Unreviewed. VS2010 Windows build fix.
  2397. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPostBuild.cmd:
  2398. 2013-04-14 Roger Fong <roger_fong@apple.com>
  2399. Copy make-file-export-generator script to the the Source folders of the projects that use it.
  2400. <rdar://problem/13675604>
  2401. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj:
  2402. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj.filters:
  2403. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorBuildCmd.cmd:
  2404. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/make-export-file-generator: Copied from Source/WebCore/make-export-file-generator.
  2405. 2013-04-17 Brent Fulgham <bfulgham@webkit.org>
  2406. [Windows, WinCairo] Stop individually building WTF files in JSC.
  2407. https://bugs.webkit.org/show_bug.cgi?id=114705
  2408. Reviewed by Anders Carlsson.
  2409. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  2410. Export additional String/fastMalloc symbols needed by JSC program.
  2411. * JavaScriptCore.vcproj/jsc/jsc.vcproj: Don't manually build
  2412. WTF implementation files (a second time!) in this project.
  2413. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  2414. Export additional String/fastMalloc symbols needed by JSC program.
  2415. * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Don't manually
  2416. build WTF implementation files (a second time!) in this project.
  2417. * JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters: Ditto.
  2418. 2013-04-17 Mark Lam <mark.lam@apple.com>
  2419. releaseExecutableMemory() should canonicalize cell liveness data before
  2420. it scans the GC roots.
  2421. https://bugs.webkit.org/show_bug.cgi?id=114733.
  2422. Reviewed by Mark Hahnenberg.
  2423. * heap/Heap.cpp:
  2424. (JSC::Heap::canonicalizeCellLivenessData):
  2425. * heap/Heap.h:
  2426. * runtime/JSGlobalData.cpp:
  2427. (JSC::JSGlobalData::releaseExecutableMemory):
  2428. 2013-04-16 Commit Queue <rniwa@webkit.org>
  2429. Unreviewed, rolling out r148576.
  2430. http://trac.webkit.org/changeset/148576
  2431. https://bugs.webkit.org/show_bug.cgi?id=114714
  2432. WebCore is building some of these same files (Requested by
  2433. bfulgham on #webkit).
  2434. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  2435. * JavaScriptCore.vcproj/jsc/jsc.vcproj:
  2436. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  2437. * JavaScriptCore.vcxproj/jsc/jsc.vcxproj:
  2438. * JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters:
  2439. 2013-04-16 Brent Fulgham <bfulgham@webkit.org>
  2440. [Windows, WinCairo] Stop individually building WTF files in JSC.
  2441. https://bugs.webkit.org/show_bug.cgi?id=114705
  2442. Reviewed by Anders Carlsson.
  2443. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  2444. Export additional String/fastMalloc symbols needed by JSC program.
  2445. * JavaScriptCore.vcproj/jsc/jsc.vcproj: Don't manually build
  2446. WTF implementation files (a second time!) in this project.
  2447. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  2448. Export additional String/fastMalloc symbols needed by JSC program.
  2449. * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Don't manually
  2450. build WTF implementation files (a second time!) in this project.
  2451. * JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters: Ditto.
  2452. 2013-04-16 Patrick Gansterer <paroga@webkit.org>
  2453. [CMake] Do not use JAVASCRIPTCORE_DIR in add_custom_command() of JavaScriptCore project
  2454. https://bugs.webkit.org/show_bug.cgi?id=114265
  2455. Reviewed by Brent Fulgham.
  2456. Use CMAKE_CURRENT_SOURCE_DIR instead, since it provides the same value and is more
  2457. understandable. Also move the GENERATE_HASH_LUT macro into the CMakeLists.txt
  2458. of JavaScriptCore to avoid the usage of JAVASCRIPTCORE_DIR there too.
  2459. * CMakeLists.txt:
  2460. 2013-04-16 Anders Carlsson <andersca@apple.com>
  2461. Another Windows build fix attempt.
  2462. * runtime/JSGlobalData.h:
  2463. (JSGlobalData):
  2464. 2013-04-16 Anders Carlsson <andersca@apple.com>
  2465. Try to fix the Windows build.
  2466. * runtime/JSGlobalData.h:
  2467. 2013-04-16 Brent Fulgham <bfulgham@webkit.org>
  2468. [Windows] Unreviewed VS2010 build correction.
  2469. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props:
  2470. Specify proper link library to avoid mixture of ICU 4.0 and 4.6
  2471. symbols during link.
  2472. 2013-04-15 Ryosuke Niwa <rniwa@webkit.org>
  2473. Windows clean build fix after r148479.
  2474. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  2475. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  2476. 2013-04-15 Anders Carlsson <andersca@apple.com>
  2477. ScriptWrappable subclasses shouldn't have to include WeakInlines.h
  2478. https://bugs.webkit.org/show_bug.cgi?id=114641
  2479. Reviewed by Alexey Proskuryakov.
  2480. Move back the Weak constructor, destructor and clear() to Weak.h. Add a new weakClearSlowCase function
  2481. and put it in Weak.cpp.
  2482. * CMakeLists.txt:
  2483. * GNUmakefile.list.am:
  2484. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  2485. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  2486. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
  2487. * JavaScriptCore.xcodeproj/project.pbxproj:
  2488. * Target.pri:
  2489. * heap/Weak.cpp: Added.
  2490. * heap/Weak.h:
  2491. * heap/WeakInlines.h:
  2492. * heap/WeakSetInlines.h:
  2493. 2013-04-15 Mark Hahnenberg <mhahnenberg@apple.com>
  2494. HeapTimer lifetime should be less complicated
  2495. https://bugs.webkit.org/show_bug.cgi?id=114529
  2496. Reviewed by Oliver Hunt.
  2497. Right now our HeapTimer lifetime is rather complicated. HeapTimers are "owned" by the JSGlobalData,
  2498. but there's an issue in that there can be races between a thread that is trying to tear down a JSGlobalData
  2499. and the HeapTimer's fire function. Our current code for tearing down HeapTimers is an intricate and delicate
  2500. dance which probably contains subtle bugs.
  2501. We can make our lives easier by changing things around a bit.
  2502. 1) We should free the API lock from being solely owned by the JSGlobalData so we don't have to worry about
  2503. grabbing the lock out of invalid memory when our HeapTimer callback fires.
  2504. 2) We should also make it so that we deref the JSGlobalData first, then unlock the API lock so that when we
  2505. have the lock, the JSGlobalData is in one of two states: fully valid or completely destroyed, and we know exactly which one.
  2506. 3) The JSLock can tell us this information by keeping a back pointer to the JSGlobalData. When the JSGlobalData's
  2507. destructor is called, it clears this pointer in the JSLock. Other clients of the API lock can then check
  2508. this pointer to determine whether or not the JSGlobalData is still around.
  2509. 4) The CFRunLoopTimer will use the API lock as its context rather than the HeapTimer itself. The only way
  2510. the HeapTimer's callback can get to the HeapTimer is through the API lock's JSGlobalData pointer.
  2511. 5) The CFRunLoopTimerContext struct has two fields for retain and release callbacks for the context's info field.
  2512. We'll provide these callbacks to ref() and deref() the JSLock as necessary. Thus, the timer becomes the other
  2513. owner of the JSLock apart from the JSGlobalData.
  2514. * API/APIShims.h: Remove the cruft that was required by the previous design, such as RefGlobalDataTag.
  2515. (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
  2516. (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
  2517. (APIEntryShimWithoutLock):
  2518. (JSC::APIEntryShim::APIEntryShim):
  2519. (JSC::APIEntryShim::~APIEntryShim): Protect the API lock with a RefPtr, deref the JSGlobalData, which could destroy it,
  2520. then unlock the API lock. This ordering prevents others from obtaining the API lock while the JSGlobalData is in the
  2521. middle of being torn down.
  2522. (JSC::APIEntryShim::init): We now take the lock, then ref the JSGlobalData, which is the opposite order of when we
  2523. tear down the shim.
  2524. * heap/Heap.cpp:
  2525. (JSC::Heap::setActivityCallback): Use PassOwnPtr now.
  2526. (JSC::Heap::activityCallback): Ditto.
  2527. (JSC::Heap::sweeper): Ditto.
  2528. (JSC):
  2529. * heap/Heap.h:
  2530. (Heap):
  2531. * heap/HeapTimer.cpp:
  2532. (JSC::retainAPILock): Retain callback for CFRunLoopTimerContext struct.
  2533. (JSC::releaseAPILock): Release callback for the CFRunLoopTimerContext struct.
  2534. (JSC::HeapTimer::HeapTimer): Use the API lock as the context's info field rather than the HeapTimer.
  2535. (JSC::HeapTimer::timerDidFire): Grab the API lock. Return early if the JSGlobalData has already been destroyed.
  2536. Otherwise, figure out which kind of HeapTimer we are based on the CFRunLoopTimerRef passed to the callback and
  2537. call the HeapTimer's callback.
  2538. * heap/HeapTimer.h:
  2539. (HeapTimer):
  2540. * heap/IncrementalSweeper.cpp:
  2541. (JSC::IncrementalSweeper::create): PassOwnPtr all the things.
  2542. * heap/IncrementalSweeper.h:
  2543. (IncrementalSweeper):
  2544. * jsc.cpp:
  2545. (jscmain): We use an APIEntryShim instead of a RefPtr for the JSGlobalData because we need to
  2546. tear down the JSGlobalData while we still hold the lock, which the APIEntryShim handles correctly.
  2547. * runtime/GCActivityCallback.h:
  2548. (DefaultGCActivityCallback):
  2549. (JSC::DefaultGCActivityCallback::create):
  2550. * runtime/JSGlobalData.cpp:
  2551. (JSC::JSGlobalData::JSGlobalData):
  2552. (JSC::JSGlobalData::~JSGlobalData): Notify the API lock that the JSGlobalData is being torn down.
  2553. * runtime/JSGlobalData.h:
  2554. (JSGlobalData):
  2555. (JSC::JSGlobalData::apiLock):
  2556. * runtime/JSLock.cpp:
  2557. (JSC::JSLockHolder::JSLockHolder): Ref, then lock (just like the API shim).
  2558. (JSC):
  2559. (JSC::JSLock::willDestroyGlobalData):
  2560. (JSC::JSLockHolder::init):
  2561. (JSC::JSLockHolder::~JSLockHolder): Protect, deref, then unlock (just like the API shim).
  2562. (JSC::JSLock::JSLock):
  2563. * runtime/JSLock.h: Add back pointer to the JSGlobalData and a callback for when the JSGlobalData is being
  2564. torn down that clears this pointer to notify other clients (i.e. timer callbacks) that the JSGlobalData is no
  2565. longer valid.
  2566. (JSLockHolder):
  2567. (JSLock):
  2568. (JSC::JSLock::globalData):
  2569. * testRegExp.cpp:
  2570. (realMain): We use an APIEntryShim instead of a RefPtr for the JSGlobalData because we need to
  2571. tear down the JSGlobalData while we still hold the lock, which the APIEntryShim handles correctly.
  2572. 2013-04-15 Julien Brianceau <jbrianceau@nds.com>
  2573. LLInt SH4 backend implementation
  2574. https://bugs.webkit.org/show_bug.cgi?id=112886
  2575. Reviewed by Oliver Hunt.
  2576. * dfg/DFGOperations.cpp:
  2577. (JSC):
  2578. * jit/JITStubs.cpp:
  2579. * llint/LLIntOfflineAsmConfig.h:
  2580. * llint/LowLevelInterpreter.asm:
  2581. * llint/LowLevelInterpreter32_64.asm:
  2582. * offlineasm/arm.rb:
  2583. * offlineasm/ast.rb:
  2584. * offlineasm/backends.rb:
  2585. * offlineasm/instructions.rb:
  2586. * offlineasm/mips.rb:
  2587. * offlineasm/risc.rb:
  2588. * offlineasm/sh4.rb: Added.
  2589. 2013-04-15 Patrick Gansterer <paroga@webkit.org>
  2590. [CMake] Add WTF_USE_*_UNICODE variables
  2591. https://bugs.webkit.org/show_bug.cgi?id=114556
  2592. Reviewed by Brent Fulgham.
  2593. WTF_USE_ICU_UNICODE and WTF_USE_WCHAR_UNICODE are used to
  2594. reduce duplication in the platform specific CMake files.
  2595. * CMakeLists.txt:
  2596. * PlatformEfl.cmake:
  2597. 2013-04-13 Patrick Gansterer <paroga@webkit.org>
  2598. Add missing export macro to SymbolTableEntry::freeFatEntrySlow()
  2599. * runtime/SymbolTable.h:
  2600. (SymbolTableEntry):
  2601. 2013-04-12 Mark Hahnenberg <mhahnenberg@apple.com>
  2602. Block freeing thread should call Region::destroy instead of delete
  2603. https://bugs.webkit.org/show_bug.cgi?id=114544
  2604. Reviewed by Oliver Hunt.
  2605. Since Region doesn't have a virtual destructor, calling delete will not properly clean up all of
  2606. the state of the Region. We should call destroy() instead.
  2607. * heap/BlockAllocator.cpp:
  2608. (JSC::BlockAllocator::releaseFreeRegions):
  2609. (JSC::BlockAllocator::blockFreeingThreadMain):
  2610. 2013-04-11 Benjamin Poulain <bpoulain@apple.com>
  2611. Merge CharacterClassTable into CharacterClass
  2612. https://bugs.webkit.org/show_bug.cgi?id=114409
  2613. Reviewed by Darin Adler.
  2614. CharacterClassTable is only a pointer and a boolean.
  2615. It is a little overkill to make a separate allocation
  2616. for that.
  2617. * create_regex_tables:
  2618. * yarr/YarrJIT.cpp:
  2619. (JSC::Yarr::YarrGenerator::matchCharacterClass):
  2620. * yarr/YarrPattern.cpp:
  2621. (JSC::Yarr::CharacterClassConstructor::charClass):
  2622. * yarr/YarrPattern.h:
  2623. (CharacterClass):
  2624. (JSC::Yarr::CharacterClass::CharacterClass):
  2625. 2013-04-11 Michael Saboff <msaboff@apple.com>
  2626. Added UNLIKELY() suggested in https://bugs.webkit.org/show_bug.cgi?id=114366
  2627. after checking in the original change.
  2628. Rubber-stamped by Jessie Berlin.
  2629. * dfg/DFGOperations.cpp:
  2630. 2013-04-10 Benjamin Poulain <benjamin@webkit.org>
  2631. Unify JSC Parser's error and error message
  2632. https://bugs.webkit.org/show_bug.cgi?id=114363
  2633. Reviewed by Geoffrey Garen.
  2634. The parser kept the error state over two attributes:
  2635. error and errorMessage. They were changed in sync,
  2636. but had some discrepancy (for example, the error message
  2637. was always defined to something).
  2638. This patch unifies the two. There is an error if
  2639. if the error message is non-null or if the parsing finished
  2640. before the end.
  2641. This also gets rid of the allocation of the error message
  2642. when instantiating a parser.
  2643. * parser/Parser.cpp:
  2644. (JSC::::Parser):
  2645. (JSC::::parseInner):
  2646. (JSC::::parseSourceElements):
  2647. (JSC::::parseVarDeclaration):
  2648. (JSC::::parseConstDeclaration):
  2649. (JSC::::parseForStatement):
  2650. (JSC::::parseSwitchStatement):
  2651. (JSC::::parsePrimaryExpression):
  2652. * parser/Parser.h:
  2653. (JSC::Parser::updateErrorMessage):
  2654. (JSC::Parser::updateErrorWithNameAndMessage):
  2655. (JSC::Parser::hasError):
  2656. (Parser):
  2657. 2013-04-10 Oliver Hunt <oliver@apple.com>
  2658. Set trap is not being called for API objects
  2659. https://bugs.webkit.org/show_bug.cgi?id=114403
  2660. Reviewed by Anders Carlsson.
  2661. Intercept putByIndex on the callback object and add tests
  2662. to make sure we don't regress in future.
  2663. * API/JSCallbackObject.h:
  2664. (JSCallbackObject):
  2665. * API/JSCallbackObjectFunctions.h:
  2666. (JSC::::putByIndex):
  2667. (JSC):
  2668. * API/tests/testapi.c:
  2669. (PropertyCatchalls_setProperty):
  2670. * API/tests/testapi.js:
  2671. 2013-04-10 Benjamin Poulain <bpoulain@apple.com>
  2672. Mass remove all the empty directories
  2673. Rubberstamped by Ryosuke Niwa.
  2674. * qt/api: Removed.
  2675. * qt/benchmarks/qscriptengine: Removed.
  2676. * qt/benchmarks/qscriptvalue: Removed.
  2677. * qt/tests/qscriptengine: Removed.
  2678. * qt/tests/qscriptstring: Removed.
  2679. * qt/tests/qscriptvalue: Removed.
  2680. * qt/tests/qscriptvalueiterator: Removed.
  2681. 2013-04-10 Mark Hahnenberg <mhahnenberg@apple.com>
  2682. JSObject::getOwnNonIndexPropertyNames calculates numCacheableSlots incorrectly
  2683. https://bugs.webkit.org/show_bug.cgi?id=114235
  2684. Reviewed by Filip Pizlo.
  2685. If the object doesn't have any properties but the prototype does, we'll assume those prototype properties are
  2686. accessible in the base object's backing store, which is bad.
  2687. * runtime/JSObject.cpp:
  2688. (JSC::JSObject::getPropertyNames):
  2689. (JSC::JSObject::getOwnNonIndexPropertyNames):
  2690. * runtime/PropertyNameArray.h:
  2691. (JSC::PropertyNameArray::PropertyNameArray):
  2692. (JSC::PropertyNameArray::setNumCacheableSlotsForObject):
  2693. (JSC::PropertyNameArray::setBaseObject):
  2694. (PropertyNameArray):
  2695. 2013-04-10 Patrick Gansterer <paroga@webkit.org>
  2696. Remove code duplicates from MacroAssemblerARM
  2697. https://bugs.webkit.org/show_bug.cgi?id=104457
  2698. Reviewed by Oliver Hunt.
  2699. Reuse some existing methods to avoid duplicated code.
  2700. * assembler/MacroAssemblerARM.h:
  2701. (JSC::MacroAssemblerARM::store8):
  2702. (JSC::MacroAssemblerARM::store32):
  2703. (JSC::MacroAssemblerARM::swap):
  2704. (JSC::MacroAssemblerARM::add32):
  2705. (JSC::MacroAssemblerARM::sub32):
  2706. 2013-04-10 Michael Saboff <msaboff@apple.com>
  2707. DFG: Negative size for new Array() interpreted as large unsigned int
  2708. https://bugs.webkit.org/show_bug.cgi?id=114366
  2709. Reviewed by Oliver Hunt.
  2710. Added new check in operationNewArrayWithSize() for a negative
  2711. size. If size is negative throw a "RangeError: Array size is not a
  2712. small enough positive integer" exception.
  2713. * dfg/DFGOperations.cpp:
  2714. 2013-04-10 peavo@outlook.com <peavo@outlook.com>
  2715. WinCairo build fails to link.
  2716. https://bugs.webkit.org/show_bug.cgi?id=114358
  2717. Reviewed by Brent Fulgham.
  2718. Export the symbol WTF::MD5::checksum().
  2719. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  2720. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  2721. 2013-04-08 Anders Carlsson <andersca@apple.com>
  2722. Remove unneeded headers from FrameLoader.h
  2723. https://bugs.webkit.org/show_bug.cgi?id=114223
  2724. Reviewed by Geoffrey Garen.
  2725. Update for WTF changes.
  2726. * bytecode/SpeculatedType.h:
  2727. * runtime/JSCJSValue.h:
  2728. 2013-04-09 Geoffrey Garen <ggaren@apple.com>
  2729. Removed bitrotted TimeoutChecker code
  2730. https://bugs.webkit.org/show_bug.cgi?id=114336
  2731. Reviewed by Alexey Proskuryakov.
  2732. This mechanism hasn't worked for a while.
  2733. MarkL is working on a new version of this feature with a distinct
  2734. implementation.
  2735. * API/APIShims.h:
  2736. (JSC::APIEntryShim::~APIEntryShim):
  2737. (JSC::APIEntryShim::init):
  2738. * GNUmakefile.list.am:
  2739. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  2740. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  2741. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  2742. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
  2743. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  2744. * JavaScriptCore.xcodeproj/project.pbxproj:
  2745. * Target.pri:
  2746. * dfg/DFGGPRInfo.h:
  2747. * jit/JIT.cpp:
  2748. * jit/JIT.h:
  2749. * jit/JITStubs.cpp:
  2750. * jit/JITStubs.h:
  2751. * jit/JSInterfaceJIT.h:
  2752. (JSInterfaceJIT):
  2753. * runtime/JSGlobalData.cpp:
  2754. (JSC::JSGlobalData::JSGlobalData):
  2755. * runtime/JSGlobalData.h:
  2756. * runtime/JSGlobalObject.cpp:
  2757. * runtime/JSONObject.cpp:
  2758. (JSC::Stringifier::appendStringifiedValue):
  2759. (JSC::Walker::walk):
  2760. * runtime/TimeoutChecker.cpp: Removed.
  2761. * runtime/TimeoutChecker.h: Removed.
  2762. 2013-04-10 Oliver Hunt <oliver@apple.com>
  2763. REGRESSION (r148073): WebKit Nightly r148082 crashes on launch in JSObjectSetPrivate
  2764. https://bugs.webkit.org/show_bug.cgi?id=114341
  2765. Reviewed by Alexey Proskuryakov.
  2766. Make JSObjectSetPrivate use uncheckedToJS as some clients
  2767. clear their private data during finalization for some reason.
  2768. * API/JSObjectRef.cpp:
  2769. (JSObjectSetPrivate):
  2770. 2013-04-09 Oliver Hunt <oliver@apple.com>
  2771. Add liveness tests to JSC API entry points
  2772. https://bugs.webkit.org/show_bug.cgi?id=114318
  2773. Reviewed by Geoffrey Garen.
  2774. Add simple checks for the existence of a method table on any
  2775. JSCells passed across the API. This in turn forces a structure
  2776. validity test.
  2777. * API/APICast.h:
  2778. (toJS):
  2779. (toJSForGC):
  2780. (unsafeToJS):
  2781. * API/JSObjectRef.cpp:
  2782. (JSObjectGetPrivate):
  2783. 2013-04-09 Oliver Hunt <oliver@apple.com>
  2784. Rollout last patch as it destroyed everything
  2785. * API/APICast.h:
  2786. (toJS):
  2787. (toJSForGC):
  2788. 2013-04-09 Oliver Hunt <oliver@apple.com>
  2789. Add liveness tests to JSC API entry points
  2790. https://bugs.webkit.org/show_bug.cgi?id=114318
  2791. Reviewed by Filip Pizlo.
  2792. Add simple checks for the existence of a method table on any
  2793. JSCells passed across the API. This in turn forces a structure
  2794. validity test.
  2795. * API/APICast.h:
  2796. (toJS):
  2797. (toJSForGC):
  2798. 2013-04-09 Balazs Kilvady <kilvadyb@homejinni.com>
  2799. LLInt conditional branch compilation fault on MIPS.
  2800. https://bugs.webkit.org/show_bug.cgi?id=114264
  2801. Reviewed by Filip Pizlo.
  2802. Fix conditional branch compilation in LLInt offlineasm.
  2803. * offlineasm/mips.rb:
  2804. 2013-04-08 Mark Hahnenberg <mhahnenberg@apple.com>
  2805. JSObject::getOwnNonIndexPropertyNames calculates numCacheableSlots incorrectly
  2806. https://bugs.webkit.org/show_bug.cgi?id=114235
  2807. Reviewed by Geoffrey Garen.
  2808. Due to the way that numCacheableSlots is currently calculated, checking an object's prototype for enumerable
  2809. properties causes us not to cache any properties at all. We should only cache properties on the object itself
  2810. since we currently don't take advantage of any sort of name caching for properties in the prototype chain.
  2811. This fix undoes a ~2% SunSpider regression caused by http://trac.webkit.org/changeset/147570.
  2812. * runtime/JSObject.cpp:
  2813. (JSC::JSObject::getOwnNonIndexPropertyNames):
  2814. 2013-04-09 Ryosuke Niwa <rniwa@webkit.org>
  2815. Remove yarr.gyp
  2816. https://bugs.webkit.org/show_bug.cgi?id=114247
  2817. Reviewed by Benjamin Poulain.
  2818. * yarr/yarr.gyp: Removed.
  2819. 2013-04-08 Ryosuke Niwa <rniwa@webkit.org>
  2820. Remove JavaScriptCore.gyp/gypi
  2821. https://bugs.webkit.org/show_bug.cgi?id=114238
  2822. Reviewed by Benjamin Poulain.
  2823. * JavaScriptCore.gyp: Removed.
  2824. * JavaScriptCore.gyp/.gitignore: Removed.
  2825. * JavaScriptCore.gypi: Removed.
  2826. 2013-04-08 Vahag Vardanyan <vaag@ispras.ru>
  2827. Adds fromCharCode intrinsic support.
  2828. https://bugs.webkit.org/show_bug.cgi?id=104807
  2829. Reviewed by Oliver Hunt.
  2830. Switch to using fromCharCode intrinsic instead of call operation in some cases.
  2831. * dfg/DFGAbstractState.cpp:
  2832. (JSC::DFG::AbstractState::executeEffects):
  2833. * dfg/DFGByteCodeParser.cpp:
  2834. (JSC::DFG::ByteCodeParser::handleIntrinsic):
  2835. * dfg/DFGFixupPhase.cpp:
  2836. (JSC::DFG::FixupPhase::fixupNode):
  2837. * dfg/DFGNodeType.h:
  2838. (DFG):
  2839. * dfg/DFGOperations.cpp:
  2840. * dfg/DFGOperations.h:
  2841. * dfg/DFGPredictionPropagationPhase.cpp:
  2842. (JSC::DFG::PredictionPropagationPhase::propagate):
  2843. * dfg/DFGSpeculativeJIT.cpp:
  2844. (JSC::DFG::SpeculativeJIT::compileFromCharCode):
  2845. (DFG):
  2846. * dfg/DFGSpeculativeJIT.h:
  2847. (JSC::DFG::SpeculativeJIT::callOperation):
  2848. (SpeculativeJIT):
  2849. * dfg/DFGSpeculativeJIT32_64.cpp:
  2850. (JSC::DFG::SpeculativeJIT::compile):
  2851. * dfg/DFGSpeculativeJIT64.cpp:
  2852. (JSC::DFG::SpeculativeJIT::compile):
  2853. * runtime/StringConstructor.cpp:
  2854. (JSC::stringFromCharCode):
  2855. (JSC):
  2856. * runtime/StringConstructor.h:
  2857. (JSC):
  2858. 2013-04-08 Benjamin Poulain <benjamin@webkit.org>
  2859. Remove HTML Notification
  2860. https://bugs.webkit.org/show_bug.cgi?id=114231
  2861. Reviewed by Ryosuke Niwa.
  2862. * Configurations/FeatureDefines.xcconfig:
  2863. 2013-04-05 Roger Fong <roger_fong@apple.com>
  2864. Build fix.
  2865. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  2866. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  2867. 2013-04-08 Filip Pizlo <fpizlo@apple.com>
  2868. DFG should be able to inline string equality comparisons
  2869. https://bugs.webkit.org/show_bug.cgi?id=114224
  2870. Reviewed by Oliver Hunt.
  2871. Inline 8-bit string equality, go to slow path for 16-bit strings. 2x speed-up for string equality
  2872. comparisons on 8-bit strings. 20-50% speed-up on JSRegress/HashMap tests. 30% speed-up on
  2873. string-fasta. 2% speed-up on SunSpider overall. Some small speed-ups elsewhere.
  2874. This is a gnarly change but we have loads of test coverage already between the HashMap tests and
  2875. preexisting DFG string equality tests (which appear to have been designed to test OSR exits, but
  2876. also give us good overall coverage on string equality behavior).
  2877. * dfg/DFGFixupPhase.cpp:
  2878. (JSC::DFG::FixupPhase::fixupNode):
  2879. * dfg/DFGOperations.cpp:
  2880. * dfg/DFGOperations.h:
  2881. * dfg/DFGSpeculativeJIT.cpp:
  2882. (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
  2883. (JSC::DFG::SpeculativeJIT::compare):
  2884. (JSC::DFG::SpeculativeJIT::compileStrictEq):
  2885. (JSC::DFG::SpeculativeJIT::compileStringEquality):
  2886. (DFG):
  2887. * dfg/DFGSpeculativeJIT.h:
  2888. (SpeculativeJIT):
  2889. 2013-04-08 Geoffrey Garen <ggaren@apple.com>
  2890. Stop #include-ing all of JavaScriptCore in every DOM-related file
  2891. https://bugs.webkit.org/show_bug.cgi?id=114220
  2892. Reviewed by Sam Weinig.
  2893. I separated WeakInlines.h from Weak.h so WebCore data types that need
  2894. to declare a Weak<T> data member don't have to #include all of the
  2895. infrastructure for accessing that data member.
  2896. This also required separating Weak<T> from PassWeak<T> by removing the
  2897. WeakImplAccessor class template and pushing code down into its subclasses.
  2898. * API/JSWeakObjectMapRefPrivate.cpp:
  2899. * JavaScriptCore.xcodeproj/project.pbxproj:
  2900. * bytecode/UnlinkedCodeBlock.h:
  2901. * heap/PassWeak.h:
  2902. (JSC):
  2903. (PassWeak):
  2904. (JSC::::PassWeak):
  2905. (JSC::::operator):
  2906. (JSC::::get):
  2907. * heap/SlotVisitorInlines.h:
  2908. * heap/Weak.h:
  2909. (JSC):
  2910. (Weak):
  2911. * heap/WeakInlines.h: Copied from Source/JavaScriptCore/heap/Weak.h.
  2912. (JSC):
  2913. (JSC::::Weak):
  2914. (JSC::::operator):
  2915. (JSC::::get):
  2916. (JSC::::was):
  2917. (JSC::weakClear):
  2918. * jit/JITThunks.h:
  2919. * runtime/RegExpCache.h:
  2920. * runtime/Structure.h:
  2921. * runtime/WeakGCMap.h:
  2922. 2013-04-05 Roger Fong <roger_fong@apple.com>
  2923. Windows build fix fix.
  2924. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  2925. 2013-04-05 Roger Fong <roger_fong@apple.com>
  2926. Windows build fix.
  2927. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  2928. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  2929. 2013-04-08 Oliver Hunt <oliver@apple.com>
  2930. Make resolve more robust in the face of lookup misses
  2931. https://bugs.webkit.org/show_bug.cgi?id=114211
  2932. Reviewed by Filip Pizlo.
  2933. This simply short circuits the resolve operations in the
  2934. event that we don't find a path to a property. There's no
  2935. repro case for this happening unfortunately.
  2936. * llint/LLIntSlowPaths.cpp:
  2937. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  2938. 2013-04-08 Oliver Hunt <oliver@apple.com>
  2939. Build fix.
  2940. * assembler/ARMv7Assembler.h:
  2941. (ARMv7Assembler):
  2942. 2013-04-08 Justin Haygood <jhaygood@reaktix.com>
  2943. Allow KeywordLookupGenerator.py to work on Windows with Windows style line endings
  2944. https://bugs.webkit.org/show_bug.cgi?id=63234
  2945. Reviewed by Oliver Hunt.
  2946. * KeywordLookupGenerator.py:
  2947. (parseKeywords):
  2948. 2013-04-08 Filip Pizlo <fpizlo@apple.com>
  2949. REGRESSION(r146669): Assertion hit in JSC::DFG::SpeculativeJIT::fillSpeculateCell() running webgl tests
  2950. https://bugs.webkit.org/show_bug.cgi?id=114129
  2951. <rdar://problem/13594898>
  2952. Reviewed by Darin Adler.
  2953. The check to see if we need a cell check when simplifying a GetById or PutById needs to be hoisted to
  2954. above where we abstractly execute the instruction, since after we abstracting execute it, it will
  2955. seem like it no longer needs the cell check.
  2956. * dfg/DFGConstantFoldingPhase.cpp:
  2957. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  2958. 2013-04-07 Oliver Hunt <oliver@apple.com>
  2959. Add bounds checking for WTF::Vector::operator[]
  2960. https://bugs.webkit.org/show_bug.cgi?id=89600
  2961. Reviewed by Filip Pizlo.
  2962. Make a few JSC classes opt-out of release mode bounds checking.
  2963. * assembler/AssemblerBuffer.h:
  2964. (AssemblerBuffer):
  2965. * assembler/AssemblerBufferWithConstantPool.h:
  2966. (AssemblerBufferWithConstantPool):
  2967. * bytecode/CodeBlock.cpp:
  2968. (JSC::CodeBlock::CodeBlock):
  2969. (JSC::CodeBlock::bytecodeOffset):
  2970. (JSC):
  2971. (JSC::replaceExistingEntries):
  2972. * bytecode/CodeBlock.h:
  2973. (JSC::CodeBlock::bytecodeOffsetForCallAtIndex):
  2974. (JSC::CodeBlock::callReturnIndexVector):
  2975. (JSC::CodeBlock::codeOrigins):
  2976. (RareData):
  2977. * bytecode/UnlinkedCodeBlock.h:
  2978. (JSC::UnlinkedEvalCodeBlock::adoptVariables):
  2979. (UnlinkedEvalCodeBlock):
  2980. * bytecompiler/BytecodeGenerator.cpp:
  2981. (JSC::BytecodeGenerator::BytecodeGenerator):
  2982. (JSC::BytecodeGenerator::emitNewArray):
  2983. (JSC::BytecodeGenerator::emitCall):
  2984. (JSC::BytecodeGenerator::emitConstruct):
  2985. * bytecompiler/BytecodeGenerator.h:
  2986. (CallArguments):
  2987. (JSC::BytecodeGenerator::instructions):
  2988. (BytecodeGenerator):
  2989. * bytecompiler/StaticPropertyAnalysis.h:
  2990. (JSC::StaticPropertyAnalysis::create):
  2991. (JSC::StaticPropertyAnalysis::StaticPropertyAnalysis):
  2992. (StaticPropertyAnalysis):
  2993. * bytecompiler/StaticPropertyAnalyzer.h:
  2994. (StaticPropertyAnalyzer):
  2995. (JSC::StaticPropertyAnalyzer::StaticPropertyAnalyzer):
  2996. * dfg/DFGJITCompiler.cpp:
  2997. (JSC::DFG::JITCompiler::link):
  2998. * parser/ASTBuilder.h:
  2999. (ASTBuilder):
  3000. * runtime/ArgList.h:
  3001. (MarkedArgumentBuffer):
  3002. * runtime/ArrayPrototype.cpp:
  3003. (JSC::arrayProtoFuncSort):
  3004. 2013-04-07 Benjamin Poulain <benjamin@webkit.org>
  3005. Use Vector::reserveInitialCapacity() when possible in JavaScriptCore runtime
  3006. https://bugs.webkit.org/show_bug.cgi?id=114111
  3007. Reviewed by Andreas Kling.
  3008. Almost all the code was already using Vector::reserveInitialCapacity()
  3009. and Vector::uncheckedAppend(). Fix the remaining parts.
  3010. * runtime/ArgList.h:
  3011. (MarkedArgumentBuffer): The type VectorType is unused.
  3012. * runtime/ArrayPrototype.cpp:
  3013. (JSC::arrayProtoFuncSort):
  3014. Move the variable closer to where it is needed.
  3015. * runtime/JSArray.cpp:
  3016. (JSC::JSArray::setLengthWithArrayStorage):
  3017. * runtime/JSObject.cpp:
  3018. (JSC::JSObject::getOwnPropertyNames):
  3019. 2013-04-07 Patrick Gansterer <paroga@webkit.org>
  3020. Remove references to Skia and V8 from CMake files
  3021. https://bugs.webkit.org/show_bug.cgi?id=114130
  3022. Reviewed by Geoffrey Garen.
  3023. * shell/PlatformBlackBerry.cmake:
  3024. 2013-04-07 David Kilzer <ddkilzer@apple.com>
  3025. Remove the rest of SVG_DOM_OBJC_BINDINGS
  3026. <http://webkit.org/b/114112>
  3027. Reviewed by Geoffrey Garen.
  3028. * Configurations/FeatureDefines.xcconfig:
  3029. - Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro.
  3030. 2013-04-07 Oliver Hunt <oliver@apple.com>
  3031. Inspector should display information about non-object exceptions
  3032. https://bugs.webkit.org/show_bug.cgi?id=114123
  3033. Reviewed by Adele Peterson.
  3034. Make sure we store the right stack information, even when throwing
  3035. a primitive.
  3036. * interpreter/CallFrame.h:
  3037. (JSC::ExecState::clearSupplementaryExceptionInfo):
  3038. (ExecState):
  3039. * interpreter/Interpreter.cpp:
  3040. (JSC::Interpreter::addStackTraceIfNecessary):
  3041. (JSC::Interpreter::throwException):
  3042. 2013-04-06 Oliver Hunt <oliver@apple.com>
  3043. Unify the many and varied stack trace mechanisms, and make the result sane.
  3044. https://bugs.webkit.org/show_bug.cgi?id=114072
  3045. Reviewed by Filip Pizlo.
  3046. Makes JSC::StackFrame record the bytecode offset and other necessary data
  3047. rather than requiring us to perform eager evaluation of the line number, etc.
  3048. Then remove most of the users of retrieveLastCaller, as most of them were
  3049. using it to create a stack trace in a fairly incomplete and inefficient way.
  3050. StackFrame now also has a couple of helpers to get the line and column info.
  3051. * API/JSContextRef.cpp:
  3052. (JSContextCreateBacktrace):
  3053. * bytecompiler/BytecodeGenerator.cpp:
  3054. (JSC::BytecodeGenerator::emitDebugHook):
  3055. * interpreter/Interpreter.cpp:
  3056. (JSC):
  3057. (JSC::Interpreter::dumpRegisters):
  3058. (JSC::Interpreter::unwindCallFrame):
  3059. (JSC::getBytecodeOffsetForCallFrame):
  3060. (JSC::getCallerInfo):
  3061. (JSC::StackFrame::line):
  3062. (JSC::StackFrame::column):
  3063. (JSC::StackFrame::expressionInfo):
  3064. (JSC::StackFrame::toString):
  3065. (JSC::Interpreter::getStackTrace):
  3066. (JSC::Interpreter::addStackTraceIfNecessary):
  3067. (JSC::Interpreter::retrieveCallerFromVMCode):
  3068. * interpreter/Interpreter.h:
  3069. (StackFrame):
  3070. (Interpreter):
  3071. * runtime/Error.cpp:
  3072. (JSC::throwError):
  3073. * runtime/JSGlobalData.h:
  3074. (JSC):
  3075. (JSGlobalData):
  3076. * runtime/JSGlobalObject.cpp:
  3077. (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope):
  3078. 2013-04-06 Geoffrey Garen <ggaren@apple.com>
  3079. Removed v8 bindings hooks from IDL files
  3080. https://bugs.webkit.org/show_bug.cgi?id=114091
  3081. Reviewed by Anders Carlsson and Sam Weinig.
  3082. * heap/HeapStatistics.h:
  3083. 2013-04-03 Roger Fong <roger_fong@apple.com>
  3084. Windows VS2010 build fix.
  3085. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  3086. 2013-04-06 Zan Dobersek <zdobersek@igalia.com>
  3087. Remove the remaining PLATFORM(CHROMIUM) guard in JavaScriptCore
  3088. https://bugs.webkit.org/show_bug.cgi?id=114082
  3089. Reviewed by Ryosuke Niwa.
  3090. * runtime/JSExportMacros.h: Remove the remaining PLATFORM(CHROMIUM) guard.
  3091. 2013-04-06 Ed Bartosh <bartosh@gmail.com>
  3092. --minimal build fails with error: control reaches end of non-void function
  3093. https://bugs.webkit.org/show_bug.cgi?id=114085
  3094. Reviewed by Oliver Hunt.
  3095. * interpreter/Interpreter.cpp: return 0 if JIT is not enabled
  3096. (JSC::getBytecodeOffsetForCallFrame):
  3097. 2013-04-06 Geoffrey Garen <ggaren@apple.com>
  3098. Try to fix the Windows build.
  3099. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  3100. Added back a symbol that is exported.
  3101. 2013-04-06 Geoffrey Garen <ggaren@apple.com>
  3102. Try to fix the Windows build.
  3103. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  3104. Removed symbols that aren't exported.
  3105. 2013-04-06 Geoffrey Garen <ggaren@apple.com>
  3106. Rolled out 147820 and 147818 because they caused plugins tests to ASSERT
  3107. https://bugs.webkit.org/show_bug.cgi?id=114094
  3108. Reviewed by Anders Carlsson.
  3109. * API/JSContextRef.cpp:
  3110. (JSContextCreateBacktrace):
  3111. * bytecompiler/BytecodeGenerator.cpp:
  3112. (JSC::BytecodeGenerator::emitDebugHook):
  3113. * interpreter/Interpreter.cpp:
  3114. (JSC):
  3115. (JSC::Interpreter::dumpRegisters):
  3116. (JSC::Interpreter::unwindCallFrame):
  3117. (JSC::getLineNumberForCallFrame):
  3118. (JSC::getCallerInfo):
  3119. (JSC::Interpreter::getStackTrace):
  3120. (JSC::Interpreter::addStackTraceIfNecessary):
  3121. (JSC::Interpreter::retrieveCallerFromVMCode):
  3122. * interpreter/Interpreter.h:
  3123. (StackFrame):
  3124. (JSC::StackFrame::toString):
  3125. (JSC::StackFrame::friendlyLineNumber):
  3126. (Interpreter):
  3127. * runtime/Error.cpp:
  3128. (JSC::throwError):
  3129. * runtime/JSGlobalData.h:
  3130. (JSC):
  3131. (JSGlobalData):
  3132. * runtime/JSGlobalObject.cpp:
  3133. (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope):
  3134. 2013-04-06 Patrick Gansterer <paroga@webkit.org>
  3135. Unreviewed build fix after r146932.
  3136. * profiler/ProfilerDatabase.cpp:
  3137. (Profiler):
  3138. 2013-04-06 Patrick Gansterer <paroga@webkit.org>
  3139. Do not call getenv() on Windows CE where it does not exist.
  3140. * runtime/JSGlobalData.cpp:
  3141. (JSC::JSGlobalData::JSGlobalData):
  3142. 2013-04-05 Benjamin Poulain <benjamin@webkit.org>
  3143. Second attempt to fix the Windows bot
  3144. Unreviewed.
  3145. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  3146. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  3147. 2013-04-05 Benjamin Poulain <bpoulain@apple.com>
  3148. Attempt to fix the Windows bot
  3149. Unreviewed.
  3150. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  3151. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  3152. r147825 removed the symbol for nullptr_t. Add it back.
  3153. 2013-04-02 Roger Fong <roger_fong@apple.com>
  3154. Build fix.
  3155. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  3156. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  3157. 2013-04-05 Oliver Hunt <oliver@apple.com>
  3158. Build fix.
  3159. * interpreter/Interpreter.cpp:
  3160. (JSC::getBytecodeOffsetForCallFrame):
  3161. 2013-04-05 Oliver Hunt <oliver@apple.com>
  3162. Unify the many and varied stack trace mechanisms, and make the result sane.
  3163. https://bugs.webkit.org/show_bug.cgi?id=114072
  3164. Reviewed by Filip Pizlo.
  3165. Makes JSC::StackFrame record the bytecode offset and other necessary data
  3166. rather than requiring us to perform eager evaluation of the line number, etc.
  3167. Then remove most of the users of retrieveLastCaller, as most of them were
  3168. using it to create a stack trace in a fairly incomplete and inefficient way.
  3169. StackFrame now also has a couple of helpers to get the line and column info.
  3170. * API/JSContextRef.cpp:
  3171. (JSContextCreateBacktrace):
  3172. * bytecompiler/BytecodeGenerator.cpp:
  3173. (JSC::BytecodeGenerator::emitDebugHook):
  3174. * interpreter/Interpreter.cpp:
  3175. (JSC):
  3176. (JSC::Interpreter::dumpRegisters):
  3177. (JSC::Interpreter::unwindCallFrame):
  3178. (JSC::getBytecodeOffsetForCallFrame):
  3179. (JSC::getCallerInfo):
  3180. (JSC::StackFrame::line):
  3181. (JSC::StackFrame::column):
  3182. (JSC::StackFrame::expressionInfo):
  3183. (JSC::StackFrame::toString):
  3184. (JSC::Interpreter::getStackTrace):
  3185. (JSC::Interpreter::addStackTraceIfNecessary):
  3186. (JSC::Interpreter::retrieveCallerFromVMCode):
  3187. * interpreter/Interpreter.h:
  3188. (StackFrame):
  3189. (Interpreter):
  3190. * runtime/Error.cpp:
  3191. (JSC::throwError):
  3192. * runtime/JSGlobalData.h:
  3193. (JSC):
  3194. (JSGlobalData):
  3195. * runtime/JSGlobalObject.cpp:
  3196. (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope):
  3197. 2013-04-05 Mark Hahnenberg <mhahnenberg@apple.com>
  3198. tryCacheGetByID sets StructureStubInfo accessType to an incorrect value
  3199. https://bugs.webkit.org/show_bug.cgi?id=114068
  3200. Reviewed by Geoffrey Garen.
  3201. In the case where we have a non-Value cacheable property, we set the StructureStubInfo accessType to
  3202. get_by_id_self, but then we don't patch self and instead patch in a get_by_id_self_fail. This leads to
  3203. incorrect profiling data so when the DFG compiles the function, it uses a GetByOffset rather than a GetById,
  3204. which leads to loading a GetterSetter directly out of an object.
  3205. * jit/JITStubs.cpp:
  3206. (JSC::tryCacheGetByID):
  3207. (JSC::DEFINE_STUB_FUNCTION):
  3208. 2013-04-05 Filip Pizlo <fpizlo@apple.com>
  3209. If CallFrame::trueCallFrame() knows that it's about to read garbage instead of a valid CodeOrigin/InlineCallFrame, then it should give up and return 0 and all callers should be robust against this
  3210. https://bugs.webkit.org/show_bug.cgi?id=114062
  3211. Reviewed by Oliver Hunt.
  3212. * bytecode/CodeBlock.h:
  3213. (JSC::CodeBlock::canGetCodeOrigin):
  3214. (CodeBlock):
  3215. * interpreter/CallFrame.cpp:
  3216. (JSC::CallFrame::trueCallFrame):
  3217. * interpreter/Interpreter.cpp:
  3218. (JSC::Interpreter::getStackTrace):
  3219. 2013-04-05 Geoffrey Garen <ggaren@apple.com>
  3220. Made USE(JSC) unconditional
  3221. https://bugs.webkit.org/show_bug.cgi?id=114058
  3222. Reviewed by Anders Carlsson.
  3223. * config.h:
  3224. 2013-04-05 Filip Pizlo <fpizlo@apple.com>
  3225. Unreviewed, rolling out http://trac.webkit.org/changeset/147729
  3226. It's causing a bunch of breakage on some more strict compilers:
  3227. <inline asm>:1267:2: error: ambiguous instructions require an explicit suffix (could be 'ficomps', or 'ficompl')
  3228. * offlineasm/x86.rb:
  3229. 2013-04-05 Roger Fong <roger_fong@apple.com>
  3230. More VS2010 solution makefile fixes.
  3231. <rdar://problem/13588964>
  3232. * JavaScriptCore.vcxproj/JavaScriptCore.make:
  3233. 2013-04-05 Allan Sandfeld Jensen <allan.jensen@digia.com>
  3234. LLint should be able to use x87 instead of SSE for floating pointer
  3235. https://bugs.webkit.org/show_bug.cgi?id=112239
  3236. Reviewed by Filip Pizlo.
  3237. Implements LLInt floating point operations in x87, to ensure we support
  3238. x86 without SSE2.
  3239. X86 (except 64bit) now defaults to using x87 instructions in order to
  3240. support all 32bit x86 back to i686. The implementation uses the fucomi
  3241. instruction from i686 which sets the new minimum.
  3242. * offlineasm/x86.rb:
  3243. 2013-04-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
  3244. Unreviewed EFL build fix.
  3245. We had undefined reference to `JSC::CodeOrigin::maximumBytecodeIndex'.
  3246. * bytecode/CodeBlock.cpp:
  3247. (JSC::CodeBlock::findClosureCallForReturnPC):
  3248. (JSC::CodeBlock::bytecodeOffset):
  3249. 2013-04-04 Geoffrey Garen <ggaren@apple.com>
  3250. Stop pretending that statements return a value
  3251. https://bugs.webkit.org/show_bug.cgi?id=113969
  3252. Reviewed by Oliver Hunt.
  3253. Expressions have an intrinsic value, which they return to their parent
  3254. in the AST.
  3255. Statements just execute for effect in sequence.
  3256. This patch moves emitBytecode into the ExpressionNode and StatementNode
  3257. subclasses, and changes the SatementNode subclass to return void. This
  3258. eliminates some cruft where we used to return 0, or try to save a bogus
  3259. register and return it, as if a statement had a consuming parent in the
  3260. AST.
  3261. * bytecompiler/BytecodeGenerator.h:
  3262. (JSC::BytecodeGenerator::emitNode):
  3263. (BytecodeGenerator):
  3264. (JSC::BytecodeGenerator::emitNodeInConditionContext):
  3265. * bytecompiler/NodesCodegen.cpp:
  3266. (JSC::ConstStatementNode::emitBytecode):
  3267. (JSC::BlockNode::emitBytecode):
  3268. (JSC::EmptyStatementNode::emitBytecode):
  3269. (JSC::DebuggerStatementNode::emitBytecode):
  3270. (JSC::ExprStatementNode::emitBytecode):
  3271. (JSC::VarStatementNode::emitBytecode):
  3272. (JSC::IfNode::emitBytecode):
  3273. (JSC::IfElseNode::emitBytecode):
  3274. (JSC::DoWhileNode::emitBytecode):
  3275. (JSC::WhileNode::emitBytecode):
  3276. (JSC::ForNode::emitBytecode):
  3277. (JSC::ForInNode::emitBytecode):
  3278. (JSC::ContinueNode::emitBytecode):
  3279. (JSC::BreakNode::emitBytecode):
  3280. (JSC::ReturnNode::emitBytecode):
  3281. (JSC::WithNode::emitBytecode):
  3282. (JSC::CaseClauseNode::emitBytecode):
  3283. (JSC::CaseBlockNode::emitBytecodeForBlock):
  3284. (JSC::SwitchNode::emitBytecode):
  3285. (JSC::LabelNode::emitBytecode):
  3286. (JSC::ThrowNode::emitBytecode):
  3287. (JSC::TryNode::emitBytecode):
  3288. (JSC::ScopeNode::emitStatementsBytecode):
  3289. (JSC::ProgramNode::emitBytecode):
  3290. (JSC::EvalNode::emitBytecode):
  3291. (JSC::FunctionBodyNode::emitBytecode):
  3292. (JSC::FuncDeclNode::emitBytecode):
  3293. * parser/NodeConstructors.h:
  3294. (JSC::PropertyListNode::PropertyListNode):
  3295. (JSC::ArgumentListNode::ArgumentListNode):
  3296. * parser/Nodes.h:
  3297. (Node):
  3298. (ExpressionNode):
  3299. (StatementNode):
  3300. (ConstStatementNode):
  3301. (BlockNode):
  3302. (EmptyStatementNode):
  3303. (DebuggerStatementNode):
  3304. (ExprStatementNode):
  3305. (VarStatementNode):
  3306. (IfNode):
  3307. (IfElseNode):
  3308. (DoWhileNode):
  3309. (WhileNode):
  3310. (ForNode):
  3311. (ForInNode):
  3312. (ContinueNode):
  3313. (BreakNode):
  3314. (ReturnNode):
  3315. (WithNode):
  3316. (LabelNode):
  3317. (ThrowNode):
  3318. (TryNode):
  3319. (ProgramNode):
  3320. (EvalNode):
  3321. (FunctionBodyNode):
  3322. (FuncDeclNode):
  3323. (CaseBlockNode):
  3324. (SwitchNode):
  3325. 2013-04-04 Oliver Hunt <oliver@apple.com>
  3326. Exception stack unwinding doesn't handle inline callframes correctly
  3327. https://bugs.webkit.org/show_bug.cgi?id=113952
  3328. Reviewed by Geoffrey Garen.
  3329. The basic problem here is that the exception stack unwinding was
  3330. attempting to be "clever" and avoid doing a correct stack walk
  3331. as it "knew" inline callframes couldn't have exception handlers.
  3332. This used to be safe as the exception handling machinery was
  3333. designed to fail gently and just claim that no handler existed.
  3334. This was "safe" and even "correct" inasmuch as we currently
  3335. don't run any code with exception handlers through the dfg.
  3336. This patch fixes the logic by simply making everything uniformly
  3337. use the safe stack walking machinery, and making the correct
  3338. boundary checks occur everywhere that they should.
  3339. * bytecode/CodeBlock.cpp:
  3340. (JSC::CodeBlock::findClosureCallForReturnPC):
  3341. (JSC::CodeBlock::bytecodeOffset):
  3342. * interpreter/Interpreter.cpp:
  3343. (JSC):
  3344. (JSC::Interpreter::dumpRegisters):
  3345. (JSC::Interpreter::unwindCallFrame):
  3346. (JSC::getCallerInfo):
  3347. (JSC::Interpreter::getStackTrace):
  3348. (JSC::Interpreter::retrieveCallerFromVMCode):
  3349. 2013-04-04 Geoffrey Garen <ggaren@apple.com>
  3350. Removed a defunct comment
  3351. https://bugs.webkit.org/show_bug.cgi?id=113948
  3352. Reviewed by Oliver Hunt.
  3353. This is also a convenient way to test the EWS.
  3354. * bytecompiler/BytecodeGenerator.cpp:
  3355. (JSC):
  3356. 2013-04-04 Martin Robinson <mrobinson@igalia.com>
  3357. [GTK] Remove the gyp build
  3358. https://bugs.webkit.org/show_bug.cgi?id=113942
  3359. Reviewed by Gustavo Noronha Silva.
  3360. * JavaScriptCore.gyp/JavaScriptCoreGTK.gyp: Removed.
  3361. * JavaScriptCore.gyp/redirect-stdout.sh: Removed.
  3362. 2013-04-04 Geoffrey Garen <ggaren@apple.com>
  3363. Simplified bytecode generation by merging prefix and postfix nodes
  3364. https://bugs.webkit.org/show_bug.cgi?id=113925
  3365. Reviewed by Filip Pizlo.
  3366. PostfixNode now inherits from PrefixNode, so when we detect that we're
  3367. in a context where postifx and prefix are equivalent, PostFixNode can
  3368. just call through to PrefixNode codegen, instead of duplicating the
  3369. logic.
  3370. * bytecompiler/NodesCodegen.cpp:
  3371. (JSC::PostfixNode::emitResolve):
  3372. (JSC::PostfixNode::emitBracket):
  3373. (JSC::PostfixNode::emitDot):
  3374. * parser/NodeConstructors.h:
  3375. (JSC::PostfixNode::PostfixNode):
  3376. * parser/Nodes.h:
  3377. (JSC):
  3378. (PrefixNode):
  3379. (PostfixNode):
  3380. 2013-04-04 Andras Becsi <andras.becsi@digia.com>
  3381. Fix the build with GCC 4.8
  3382. https://bugs.webkit.org/show_bug.cgi?id=113147
  3383. Reviewed by Allan Sandfeld Jensen.
  3384. Initialize JSObject* exception to suppress warnings that make
  3385. the build fail because of -Werror=maybe-uninitialized.
  3386. * runtime/Executable.cpp:
  3387. (JSC::FunctionExecutable::compileForCallInternal):
  3388. (JSC::FunctionExecutable::compileForConstructInternal):
  3389. 2013-04-02 Mark Hahnenberg <mhahnenberg@apple.com>
  3390. get_by_pname can become confused when iterating over objects with static properties
  3391. https://bugs.webkit.org/show_bug.cgi?id=113831
  3392. Reviewed by Geoffrey Garen.
  3393. get_by_pname doesn't take static properties into account when using a JSPropertyNameIterator to directly
  3394. access an object's backing store. One way to fix this is to not cache any properties when iterating over
  3395. objects with static properties. This patch fixes the bug that was originally reported on swisscom.ch.
  3396. * runtime/JSObject.cpp:
  3397. (JSC::JSObject::getOwnNonIndexPropertyNames):
  3398. * runtime/JSPropertyNameIterator.cpp:
  3399. (JSC::JSPropertyNameIterator::create):
  3400. * runtime/PropertyNameArray.h:
  3401. (JSC::PropertyNameArray::PropertyNameArray):
  3402. (JSC::PropertyNameArray::numCacheableSlots):
  3403. (JSC::PropertyNameArray::setNumCacheableSlots):
  3404. (PropertyNameArray):
  3405. 2013-04-02 Geoffrey Garen <ggaren@apple.com>
  3406. DFG should compile a little sooner
  3407. https://bugs.webkit.org/show_bug.cgi?id=113835
  3408. Unreviewed.
  3409. Rolled out r147511 because it was based on incorrect performance
  3410. measurement.
  3411. * bytecode/CodeBlock.cpp:
  3412. (JSC::CodeBlock::optimizationThresholdScalingFactor):
  3413. 2013-04-02 Geoffrey Garen <ggaren@apple.com>
  3414. DFG should compile a little sooner
  3415. https://bugs.webkit.org/show_bug.cgi?id=113835
  3416. Reviewed by Michael Saboff.
  3417. 2% speedup on SunSpider.
  3418. 2% speedup on JSRegress.
  3419. Neutral on Octane, v8, and Kraken.
  3420. The worst-hit single sub-test is kraken-stanford-crypto-ccm.js, which gets
  3421. 18% slower. Since Kraken is neutral overall in its preferred mean, I
  3422. think that's OK for now.
  3423. (Our array indexing speculation fails pathologically on
  3424. kraken-stanford-crypto-ccm.js. Compiling sooner is a regression because
  3425. it triggers those failures sooner. I'm going to file some follow-up bugs
  3426. explaining how to fix our speculations on this sub-test, at which point
  3427. compiling earlier should become a slight speedup on Kraken overall.)
  3428. * bytecode/CodeBlock.cpp:
  3429. (JSC::CodeBlock::optimizationThresholdScalingFactor): I experimented
  3430. with a few different options, including reducing the coefficient 'a'.
  3431. A simple linear reduction on instruction count worked best.
  3432. 2013-04-01 Benjamin Poulain <benjamin@webkit.org>
  3433. Use Vector::reserveInitialCapacity and Vector::uncheckedAppend for JSC's APIs
  3434. https://bugs.webkit.org/show_bug.cgi?id=113651
  3435. Reviewed by Andreas Kling.
  3436. This removes a bunch of branches on initialization and when
  3437. filling the vector.
  3438. * API/JSCallbackConstructor.cpp:
  3439. (JSC::constructJSCallback):
  3440. * API/JSCallbackFunction.cpp:
  3441. (JSC::JSCallbackFunction::call):
  3442. * API/JSCallbackObjectFunctions.h:
  3443. (JSC::::construct):
  3444. (JSC::::call):
  3445. * API/JSObjectRef.cpp:
  3446. (JSObjectCopyPropertyNames):
  3447. 2013-04-01 Mark Hahnenberg <mhahnenberg@apple.com>
  3448. Fixing borked VS 2010 project file
  3449. Unreviewed bot greening.
  3450. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  3451. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
  3452. 2013-04-01 Mark Hahnenberg <mhahnenberg@apple.com>
  3453. One more Windows build fix
  3454. Unreviewed.
  3455. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  3456. 2013-04-01 Mark Hahnenberg <mhahnenberg@apple.com>
  3457. More build fallout fixes.
  3458. Unreviewed build fix.
  3459. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: Add new export symbols.
  3460. * heap/SuperRegion.cpp: Windows didn't like "LLU".
  3461. 2013-04-01 Mark Hahnenberg <mhahnenberg@apple.com>
  3462. r147324 broke the world
  3463. https://bugs.webkit.org/show_bug.cgi?id=113704
  3464. Unreviewed build fix.
  3465. Remove a bunch of unused variables and use the correctly sized types for 32-bit platforms.
  3466. * heap/BlockAllocator.cpp:
  3467. (JSC::BlockAllocator::BlockAllocator):
  3468. * heap/BlockAllocator.h:
  3469. (BlockAllocator):
  3470. * heap/Heap.cpp:
  3471. (JSC::Heap::Heap):
  3472. * heap/SuperRegion.cpp:
  3473. (JSC::SuperRegion::SuperRegion):
  3474. * heap/SuperRegion.h:
  3475. (SuperRegion):
  3476. 2013-04-01 Mark Hahnenberg <mhahnenberg@apple.com>
  3477. 32-bit Windows build fix
  3478. Unreviewed build fix.
  3479. * heap/SuperRegion.cpp:
  3480. * heap/SuperRegion.h: Use uint64_t instead of size_t.
  3481. (SuperRegion):
  3482. 2013-04-01 Mark Hahnenberg <mhahnenberg@apple.com>
  3483. EFL build fix
  3484. Unreviewed build fix.
  3485. * CMakeLists.txt:
  3486. 2013-03-31 Mark Hahnenberg <mhahnenberg@apple.com>
  3487. Regions should be allocated from the same contiguous segment of virtual memory
  3488. https://bugs.webkit.org/show_bug.cgi?id=113662
  3489. Reviewed by Filip Pizlo.
  3490. Instead of letting the OS spread our Regions all over the place, we should allocate them all within
  3491. some range of each other. This change will open the door to some other optimizations, e.g. doing simple
  3492. range checks for our write barriers and compressing JSCell pointers to 32-bits.
  3493. Added new SuperRegion class that encapsulates allocating Regions from a contiguous reserved chunk of
  3494. virtual address space. It functions very similarly to the FixedVMPoolExecutableAllocator class used by the JIT.
  3495. Also added two new subclasses of Region, NormalRegion and ExcessRegion.
  3496. NormalRegion is the type of Region that is normally allocated when there is available space remaining
  3497. in the SuperRegion. If we ever run out of space in the SuperRegion, we fall back to allocating
  3498. ExcessRegions, which are identical to how Regions have behaved up until now, i.e. they contain a
  3499. PageAllocationAligned.
  3500. We only use the SuperRegion (and NormalRegions) on 64-bit systems, since it doesn't make sense to reserve the
  3501. entire 4 GB address space on 32-bit systems just for the JS heap.
  3502. * GNUmakefile.list.am:
  3503. * JavaScriptCore.gypi:
  3504. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  3505. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  3506. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
  3507. * JavaScriptCore.xcodeproj/project.pbxproj:
  3508. * Target.pri:
  3509. * heap/BlockAllocator.cpp:
  3510. (JSC::BlockAllocator::BlockAllocator):
  3511. * heap/BlockAllocator.h:
  3512. (JSC):
  3513. (BlockAllocator):
  3514. (JSC::BlockAllocator::allocate):
  3515. (JSC::BlockAllocator::allocateCustomSize):
  3516. (JSC::BlockAllocator::deallocateCustomSize):
  3517. * heap/Heap.cpp:
  3518. (JSC::Heap::Heap):
  3519. (JSC):
  3520. (JSC::Heap::didExceedFixedHeapSizeLimit):
  3521. * heap/Heap.h:
  3522. (Heap):
  3523. * heap/MarkedBlock.cpp:
  3524. (JSC::MarkedBlock::create):
  3525. * heap/Region.h:
  3526. (Region):
  3527. (JSC):
  3528. (NormalRegion):
  3529. (JSC::NormalRegion::base):
  3530. (JSC::NormalRegion::size):
  3531. (ExcessRegion):
  3532. (JSC::ExcessRegion::base):
  3533. (JSC::ExcessRegion::size):
  3534. (JSC::NormalRegion::NormalRegion):
  3535. (JSC::NormalRegion::tryCreate):
  3536. (JSC::NormalRegion::tryCreateCustomSize):
  3537. (JSC::NormalRegion::reset):
  3538. (JSC::ExcessRegion::ExcessRegion):
  3539. (JSC::ExcessRegion::~ExcessRegion):
  3540. (JSC::ExcessRegion::create):
  3541. (JSC::ExcessRegion::createCustomSize):
  3542. (JSC::ExcessRegion::reset):
  3543. (JSC::Region::Region):
  3544. (JSC::Region::initializeBlockList):
  3545. (JSC::Region::create):
  3546. (JSC::Region::createCustomSize):
  3547. (JSC::Region::~Region):
  3548. (JSC::Region::destroy):
  3549. (JSC::Region::reset):
  3550. (JSC::Region::deallocate):
  3551. (JSC::Region::base):
  3552. (JSC::Region::size):
  3553. * heap/SuperRegion.cpp: Added.
  3554. (JSC):
  3555. (JSC::SuperRegion::SuperRegion):
  3556. (JSC::SuperRegion::getAlignedBase):
  3557. (JSC::SuperRegion::allocateNewSpace):
  3558. (JSC::SuperRegion::notifyNeedPage):
  3559. (JSC::SuperRegion::notifyPageIsFree):
  3560. * heap/SuperRegion.h: Added.
  3561. (JSC):
  3562. (SuperRegion):
  3563. 2013-04-01 Benjamin Poulain <benjamin@webkit.org>
  3564. Remove an unused variable from the ARMv7 Assembler
  3565. https://bugs.webkit.org/show_bug.cgi?id=113653
  3566. Reviewed by Andreas Kling.
  3567. * assembler/ARMv7Assembler.h:
  3568. (ARMv7Assembler):
  3569. 2013-03-31 Adam Barth <abarth@webkit.org>
  3570. [Chromium] Yarr should build using a separate GYP file from JavaScriptCore
  3571. https://bugs.webkit.org/show_bug.cgi?id=113652
  3572. Reviewed by Nico Weber.
  3573. This patch moves JavaScriptCore.gyp to yarr.gyp because Chromium only
  3574. uses this GYP file to build yarr.
  3575. * JavaScriptCore.gyp/JavaScriptCoreGTK.gyp:
  3576. * JavaScriptCore.gypi:
  3577. * yarr/yarr.gyp: Renamed from Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp.
  3578. 2013-03-31 Filip Pizlo <fpizlo@apple.com>
  3579. Unreviewed, fix a comment. While thinking about TBAA for array accesses,
  3580. I realized that we have to be super careful about aliasing of typed arrays.
  3581. * dfg/DFGCSEPhase.cpp:
  3582. (JSC::DFG::CSEPhase::getByValLoadElimination):
  3583. 2013-03-30 Mark Hahnenberg <mhahnenberg@apple.com>
  3584. Move Region into its own header
  3585. https://bugs.webkit.org/show_bug.cgi?id=113617
  3586. Reviewed by Geoffrey Garen.
  3587. BlockAllocator.h is getting a little crowded. We should move the Region class into its own
  3588. header, since it's pretty independent from the BlockAllocator.
  3589. * GNUmakefile.list.am:
  3590. * JavaScriptCore.gypi:
  3591. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  3592. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  3593. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
  3594. * JavaScriptCore.xcodeproj/project.pbxproj:
  3595. * heap/BlockAllocator.h:
  3596. (JSC):
  3597. * heap/Region.h: Added.
  3598. (JSC):
  3599. (DeadBlock):
  3600. (JSC::DeadBlock::DeadBlock):
  3601. (Region):
  3602. (JSC::Region::blockSize):
  3603. (JSC::Region::isFull):
  3604. (JSC::Region::isEmpty):
  3605. (JSC::Region::isCustomSize):
  3606. (JSC::Region::create):
  3607. (JSC::Region::createCustomSize):
  3608. (JSC::Region::Region):
  3609. (JSC::Region::~Region):
  3610. (JSC::Region::reset):
  3611. (JSC::Region::allocate):
  3612. (JSC::Region::deallocate):
  3613. 2013-03-29 Mark Hahnenberg <mhahnenberg@apple.com>
  3614. Objective-C API: Remove -[JSManagedValue managedValueWithValue:owner:]
  3615. https://bugs.webkit.org/show_bug.cgi?id=113602
  3616. Reviewed by Geoffrey Garen.
  3617. Since we put the primary way of keeping track of external object graphs (i.e. "managed" references)
  3618. in JSVirtualMachine, there is some overlap in the functionality of that interface and JSManagedValue.
  3619. Specifically, we no longer need the methods that include an owner, since ownership is now tracked
  3620. by JSVirtualMachine. These JSManagedValues will become weak pointers unless they are used
  3621. with [JSVirtualMachine addManagedReference:withOwner:], in which case their lifetime is tied to that
  3622. of their owner.
  3623. * API/JSManagedValue.h:
  3624. * API/JSManagedValue.mm:
  3625. (-[JSManagedValue init]):
  3626. (-[JSManagedValue initWithValue:]):
  3627. (JSManagedValueHandleOwner::isReachableFromOpaqueRoots):
  3628. * API/JSVirtualMachine.mm:
  3629. (getInternalObjcObject):
  3630. * API/tests/testapi.mm:
  3631. (-[TextXYZ setOnclick:]):
  3632. (-[TextXYZ dealloc]):
  3633. 2013-03-29 Geoffrey Garen <ggaren@apple.com>
  3634. Simplified bytecode generation by unforking "condition context" codegen
  3635. https://bugs.webkit.org/show_bug.cgi?id=113554
  3636. Reviewed by Mark Hahnenberg.
  3637. Now, a node that establishes a condition context can always ask its child
  3638. nodes to generate into that context.
  3639. This has a few advantages:
  3640. (*) Removes a bunch of code;
  3641. (*) Optimizes a few missed cases like "if (!(x < 2))", "if (!!x)", and
  3642. "if (!x || !y)";
  3643. (*) Paves the way to removing more opcodes.
  3644. * bytecode/Opcode.h:
  3645. (JSC): Separated out the branching opcodes for clarity.
  3646. * bytecompiler/NodesCodegen.cpp:
  3647. (JSC::ExpressionNode::emitBytecodeInConditionContext): All expressions
  3648. can be emitted in a condition context now -- the default behavior is
  3649. to branch based on the expression's value.
  3650. (JSC::LogicalNotNode::emitBytecodeInConditionContext):
  3651. (JSC::LogicalOpNode::emitBytecodeInConditionContext):
  3652. (JSC::ConditionalNode::emitBytecode):
  3653. (JSC::IfNode::emitBytecode):
  3654. (JSC::IfElseNode::emitBytecode):
  3655. (JSC::DoWhileNode::emitBytecode):
  3656. (JSC::WhileNode::emitBytecode):
  3657. (JSC::ForNode::emitBytecode):
  3658. * parser/Nodes.h:
  3659. (JSC::ExpressionNode::isSubtract):
  3660. (ExpressionNode):
  3661. (LogicalNotNode):
  3662. (LogicalOpNode): Removed lots of code for handling expressions
  3663. that couldn't generate into a condition context because all expressions
  3664. can now.
  3665. 2013-03-28 Geoffrey Garen <ggaren@apple.com>
  3666. Simplified the bytecode by removing op_loop and op_loop_if_*
  3667. https://bugs.webkit.org/show_bug.cgi?id=113548
  3668. Reviewed by Filip Pizlo.
  3669. Regular jumps will suffice.
  3670. These opcodes are identical to branches, except they also do timeout
  3671. checking. That style of timeout checking has been broken for a long
  3672. time, and when we add back timeout checking, it won't use these opcodes.
  3673. * JavaScriptCore.order:
  3674. * bytecode/CodeBlock.cpp:
  3675. (JSC::CodeBlock::dumpBytecode):
  3676. * bytecode/Opcode.h:
  3677. (JSC):
  3678. (JSC::padOpcodeName):
  3679. * bytecode/PreciseJumpTargets.cpp:
  3680. (JSC::computePreciseJumpTargets):
  3681. * bytecompiler/BytecodeGenerator.cpp:
  3682. (JSC::BytecodeGenerator::emitJump):
  3683. (JSC::BytecodeGenerator::emitJumpIfTrue):
  3684. (JSC::BytecodeGenerator::emitJumpIfFalse):
  3685. * dfg/DFGByteCodeParser.cpp:
  3686. (JSC::DFG::ByteCodeParser::parseBlock):
  3687. * dfg/DFGCapabilities.h:
  3688. (JSC::DFG::canCompileOpcode):
  3689. * jit/JIT.cpp:
  3690. (JSC::JIT::privateCompileMainPass):
  3691. (JSC::JIT::privateCompileSlowCases):
  3692. * jit/JIT.h:
  3693. (JIT):
  3694. (JSC):
  3695. * llint/LowLevelInterpreter.asm:
  3696. * llint/LowLevelInterpreter32_64.asm:
  3697. * llint/LowLevelInterpreter64.asm:
  3698. 2013-03-28 Geoffrey Garen <ggaren@apple.com>
  3699. Simplified the bytecode by removing op_jmp_scopes
  3700. https://bugs.webkit.org/show_bug.cgi?id=113545
  3701. Reviewed by Filip Pizlo.
  3702. We already have op_pop_scope and op_jmp, so we don't need op_jmp_scopes.
  3703. Using op_jmp_scopes was also adding a "jump to self" to codegen for
  3704. return statements, which was pretty silly.
  3705. * JavaScriptCore.order:
  3706. * bytecode/CodeBlock.cpp:
  3707. (JSC::CodeBlock::dumpBytecode):
  3708. * bytecode/Opcode.h:
  3709. (JSC::padOpcodeName):
  3710. * bytecode/PreciseJumpTargets.cpp:
  3711. (JSC::computePreciseJumpTargets):
  3712. * bytecompiler/BytecodeGenerator.cpp:
  3713. (JSC::BytecodeGenerator::emitComplexPopScopes):
  3714. (JSC::BytecodeGenerator::emitPopScopes):
  3715. * bytecompiler/BytecodeGenerator.h:
  3716. (BytecodeGenerator):
  3717. * bytecompiler/NodesCodegen.cpp:
  3718. (JSC::ContinueNode::emitBytecode):
  3719. (JSC::BreakNode::emitBytecode):
  3720. (JSC::ReturnNode::emitBytecode):
  3721. * jit/JIT.cpp:
  3722. (JSC::JIT::privateCompileMainPass):
  3723. * jit/JIT.h:
  3724. * jit/JITOpcodes.cpp:
  3725. * jit/JITOpcodes32_64.cpp:
  3726. * jit/JITStubs.cpp:
  3727. * jit/JITStubs.h:
  3728. * llint/LLIntSlowPaths.cpp:
  3729. * llint/LLIntSlowPaths.h:
  3730. * llint/LowLevelInterpreter.asm:
  3731. 2013-03-28 Mark Hahnenberg <mhahnenberg@apple.com>
  3732. Safari hangs during test262 run in CodeCache::pruneSlowCase
  3733. https://bugs.webkit.org/show_bug.cgi?id=113469
  3734. Reviewed by Geoffrey Garen.
  3735. We can end up hanging for quite some time if we add a lot of small keys to the CodeCache.
  3736. By the time we get around to pruning the cache, we have a potentially tens or hundreds of
  3737. thousands of small entries, which can cause a noticeable hang when pruning them.
  3738. To fix this issue we added a hard cap to the number of entries in the cache because we
  3739. could potentially have to remove every element in the map.
  3740. * runtime/CodeCache.cpp:
  3741. (JSC::CodeCacheMap::pruneSlowCase): We need to prune until we're both under the hard cap and the
  3742. capacity in bytes.
  3743. * runtime/CodeCache.h:
  3744. (CodeCacheMap):
  3745. (JSC::CodeCacheMap::numberOfEntries): Convenience accessor function to the number of entries in
  3746. the map that does the cast to size_t of m_map.size() for us.
  3747. (JSC::CodeCacheMap::canPruneQuickly): Checks that the total number is under the hard cap. We put this
  3748. check inside a function to more accurately describe why we're doing the check and to abstract out
  3749. the actual calculation in case we want to coalesce calls to pruneSlowCase in the future.
  3750. (JSC::CodeCacheMap::prune): Check the number of entries against our hard cap. If it's greater than
  3751. the cap then we need to drop down to pruneSlowCase.
  3752. 2013-03-28 Zan Dobersek <zdobersek@igalia.com>
  3753. Unreviewed build fix for the EFL and GTK ports.
  3754. * runtime/CodeCache.cpp:
  3755. (JSC::CodeCacheMap::pruneSlowCase): Pass a 0 casted to the int64_t type instead of 0LL
  3756. to the std::max call so the arguments' types match.
  3757. 2013-03-27 Geoffrey Garen <ggaren@apple.com>
  3758. Unreviewed build fix: Removed a dead field.
  3759. Pointed out by Mark Lam.
  3760. * dfg/DFGByteCodeParser.cpp:
  3761. (JSC::DFG::ByteCodeParser::ByteCodeParser):
  3762. (ByteCodeParser):
  3763. 2013-03-27 Geoffrey Garen <ggaren@apple.com>
  3764. Unreviewed build fix: Removed a dead field.
  3765. * dfg/DFGByteCodeParser.cpp:
  3766. (JSC::DFG::ByteCodeParser::ByteCodeParser):
  3767. (ByteCodeParser):
  3768. 2013-03-27 Geoffrey Garen <ggaren@apple.com>
  3769. Removed some dead code in the DFG bytecode parser
  3770. https://bugs.webkit.org/show_bug.cgi?id=113472
  3771. Reviewed by Sam Weinig.
  3772. Now that Phi creation and liveness analysis are separate passes, we can
  3773. remove the vestiges of code that used to do that in the bytecode
  3774. parser.
  3775. * dfg/DFGByteCodeParser.cpp:
  3776. (ByteCodeParser):
  3777. (JSC::DFG::ByteCodeParser::addToGraph):
  3778. (JSC::DFG::ByteCodeParser::parse):
  3779. 2013-03-27 Filip Pizlo <fpizlo@apple.com>
  3780. JIT and DFG should NaN-check loads from Float32 arrays
  3781. https://bugs.webkit.org/show_bug.cgi?id=113462
  3782. <rdar://problem/13490804>
  3783. Reviewed by Mark Hahnenberg.
  3784. * dfg/DFGSpeculativeJIT.cpp:
  3785. (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
  3786. * jit/JITPropertyAccess.cpp:
  3787. (JSC::JIT::emitFloatTypedArrayGetByVal):
  3788. 2013-03-27 Mark Hahnenberg <mhahnenberg@apple.com>
  3789. CodeCache::m_capacity can becoming negative, producing undefined results in pruneSlowCase
  3790. https://bugs.webkit.org/show_bug.cgi?id=113453
  3791. Reviewed by Geoffrey Garen.
  3792. * runtime/CodeCache.cpp:
  3793. (JSC::CodeCacheMap::pruneSlowCase): We make sure that m_minCapacity doesn't drop below zero now.
  3794. This prevents m_capacity from doing the same.
  3795. 2013-03-27 Filip Pizlo <fpizlo@apple.com>
  3796. DFG should use CheckStructure for typed array checks whenever possible
  3797. https://bugs.webkit.org/show_bug.cgi?id=113374
  3798. Reviewed by Geoffrey Garen.
  3799. We used to do the right thing, but it appears that this regressed at some point. Since the
  3800. FixupPhase now has the ability to outright remove spurious CheckStructures on array
  3801. operations, it is profitable for the ByteCodeParser to insert CheckStructures whenver there
  3802. is a chance that it might be profitable, and when the profiling tells us what structure to
  3803. check.
  3804. Also added some code for doing ArrayProfile debugging.
  3805. This is a slightly speed-up. Maybe 3% on Mandreel.
  3806. * bytecode/ArrayProfile.cpp:
  3807. (JSC::ArrayProfile::computeUpdatedPrediction):
  3808. * dfg/DFGArrayMode.h:
  3809. (JSC::DFG::ArrayMode::benefitsFromStructureCheck):
  3810. 2013-03-27 Zeno Albisser <zeno@webkit.org>
  3811. [Qt] Remove Qt specific WorkQueueItem definitions.
  3812. https://bugs.webkit.org/show_bug.cgi?id=112891
  3813. This patch is preparation work for removing
  3814. WorkQueue related code from TestRunnerQt and
  3815. replacing it with generic TestRunner code.
  3816. Reviewed by Benjamin Poulain.
  3817. * API/JSStringRefQt.cpp:
  3818. (JSStringCreateWithQString):
  3819. Adding a convenience function to create a
  3820. JSStringRef from a QString.
  3821. * API/JSStringRefQt.h:
  3822. 2013-03-26 Filip Pizlo <fpizlo@apple.com>
  3823. REGRESSION: Sometimes, operations on proven strings ignore changes to the string prototype
  3824. https://bugs.webkit.org/show_bug.cgi?id=113353
  3825. <rdar://problem/13510778>
  3826. Reviewed by Mark Hahnenberg and Geoffrey Garen.
  3827. ToString should call speculateStringObject() even if you know that it's a string object, since
  3828. it calls it to also get the watchpoint. Note that even with this change, if you do
  3829. Phantom(Check:StringObject:@a), it might get eliminated just because we proved that @a is a
  3830. string object (thereby eliminating the prototype watchpoint); that's fine since ToString is
  3831. MustGenerate and never decays to Phantom.
  3832. * dfg/DFGSpeculativeJIT.cpp:
  3833. (JSC::DFG::SpeculativeJIT::compileToStringOnCell):
  3834. (JSC::DFG::SpeculativeJIT::speculateStringObject):
  3835. (JSC::DFG::SpeculativeJIT::speculateStringOrStringObject):
  3836. * dfg/DFGSpeculativeJIT.h:
  3837. (SpeculativeJIT):
  3838. (JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure):
  3839. 2013-03-26 Mark Hahnenberg <mhahnenberg@apple.com>
  3840. REGRESSION(r144131): It made fast/js/regress/string-repeat-arith.html assert on 32 bit
  3841. https://bugs.webkit.org/show_bug.cgi?id=112106
  3842. Rubber stamped by Filip Pizlo.
  3843. * dfg/DFGSpeculativeJIT.cpp:
  3844. (JSC::DFG::SpeculativeJIT::checkGeneratedTypeForToInt32): Get rid of the case for constants because
  3845. we would have done constant folding anyways on a ValueToInt32.
  3846. * dfg/DFGSpeculativeJIT32_64.cpp:
  3847. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): Fixed a random compile error with this flag enabled.
  3848. 2013-03-26 Filip Pizlo <fpizlo@apple.com>
  3849. JSC_enableProfiler=true should also cause JSGlobalData to save the profiler output somewhere
  3850. https://bugs.webkit.org/show_bug.cgi?id=113144
  3851. Reviewed by Geoffrey Garen.
  3852. Forgot to include Geoff's requested change in the original commit.
  3853. * profiler/ProfilerDatabase.cpp:
  3854. (Profiler):
  3855. 2013-03-25 Filip Pizlo <fpizlo@apple.com>
  3856. JSC_enableProfiler=true should also cause JSGlobalData to save the profiler output somewhere
  3857. https://bugs.webkit.org/show_bug.cgi?id=113144
  3858. Reviewed by Geoffrey Garen.
  3859. Added the ability to save profiler output with JSC_enableProfiler=true. It will save it
  3860. to the current directory, or JSC_PROFILER_PATH if the latter was specified.
  3861. This works by saving the Profiler::Database either when it is destroyed or atexit(),
  3862. whichever happens first.
  3863. This allows use of the profiler from any WebKit client.
  3864. * jsc.cpp:
  3865. (jscmain):
  3866. * profiler/ProfilerDatabase.cpp:
  3867. (Profiler):
  3868. (JSC::Profiler::Database::Database):
  3869. (JSC::Profiler::Database::~Database):
  3870. (JSC::Profiler::Database::registerToSaveAtExit):
  3871. (JSC::Profiler::Database::addDatabaseToAtExit):
  3872. (JSC::Profiler::Database::removeDatabaseFromAtExit):
  3873. (JSC::Profiler::Database::performAtExitSave):
  3874. (JSC::Profiler::Database::removeFirstAtExitDatabase):
  3875. (JSC::Profiler::Database::atExitCallback):
  3876. * profiler/ProfilerDatabase.h:
  3877. (JSC::Profiler::Database::databaseID):
  3878. (Database):
  3879. * runtime/JSGlobalData.cpp:
  3880. (JSC::JSGlobalData::JSGlobalData):
  3881. 2013-03-25 Filip Pizlo <fpizlo@apple.com>
  3882. ArrayMode should not consider SpecOther when refining the base
  3883. https://bugs.webkit.org/show_bug.cgi?id=113271
  3884. Reviewed by Geoffrey Garen.
  3885. 9% speed-up on Octane/pdfjs.
  3886. * dfg/DFGArrayMode.cpp:
  3887. (JSC::DFG::ArrayMode::refine):
  3888. 2013-03-26 Csaba Osztrogonác <ossy@webkit.org>
  3889. Fix unused parameter warnings in JITInlines.h
  3890. https://bugs.webkit.org/show_bug.cgi?id=112560
  3891. Reviewed by Zoltan Herczeg.
  3892. * jit/JITInlines.h:
  3893. (JSC::JIT::beginUninterruptedSequence):
  3894. (JSC::JIT::endUninterruptedSequence):
  3895. (JSC):
  3896. 2013-03-25 Kent Tamura <tkent@chromium.org>
  3897. Rename ENABLE_INPUT_TYPE_DATETIME
  3898. https://bugs.webkit.org/show_bug.cgi?id=113254
  3899. Reviewed by Kentaro Hara.
  3900. Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE.
  3901. Actually I'd like to remove the code, but we shouldn't remove it yet
  3902. because we shipped products with it on some platforms.
  3903. * Configurations/FeatureDefines.xcconfig:
  3904. 2013-03-25 Mark Lam <mark.lam@apple.com>
  3905. Offlineasm cloop backend compiles op+branch incorrectly.
  3906. https://bugs.webkit.org/show_bug.cgi?id=113146.
  3907. Reviewed by Geoffrey Garen.
  3908. * dfg/DFGRepatch.h:
  3909. (JSC::DFG::dfgResetGetByID):
  3910. (JSC::DFG::dfgResetPutByID):
  3911. - These functions never return when the DFG is dsiabled, not just when
  3912. asserts are enabled. Changing the attribute from NO_RETURN_DUE_TO_ASSERT
  3913. to NO_RETURN.
  3914. * llint/LLIntOfflineAsmConfig.h:
  3915. - Added some #defines needed to get the cloop building again.
  3916. * offlineasm/cloop.rb:
  3917. - Fix cloopEmitOpAndBranchIfOverflow() and cloopEmitOpAndBranch() to
  3918. emit code that unconditionally executes the specified operation before
  3919. doing the conditional branch.
  3920. 2013-03-25 Mark Hahnenberg <mhahnenberg@apple.com>
  3921. JSObject::enterDictionaryIndexingMode doesn't have a case for ALL_BLANK_INDEXING_TYPES
  3922. https://bugs.webkit.org/show_bug.cgi?id=113236
  3923. Reviewed by Geoffrey Garen.
  3924. * runtime/JSObject.cpp:
  3925. (JSC::JSObject::enterDictionaryIndexingMode): We forgot blank indexing types.
  3926. 2013-03-23 Mark Hahnenberg <mhahnenberg@apple.com>
  3927. HandleSet should use HeapBlocks for storing handles
  3928. https://bugs.webkit.org/show_bug.cgi?id=113145
  3929. Reviewed by Geoffrey Garen.
  3930. * GNUmakefile.list.am: Build project changes.
  3931. * JavaScriptCore.gypi: Ditto.
  3932. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
  3933. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Ditto.
  3934. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto.
  3935. * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
  3936. * heap/BlockAllocator.cpp: Rename the RegionSet to m_fourKBBlockRegionSet because there are
  3937. too many block types to include them all in the name now.
  3938. (JSC::BlockAllocator::BlockAllocator):
  3939. * heap/BlockAllocator.h:
  3940. (BlockAllocator): Add the appropriate override for regionSetFor.
  3941. (JSC::WeakBlock):
  3942. (JSC::MarkStackSegment):
  3943. (JSC::HandleBlock):
  3944. * heap/HandleBlock.h: Added.
  3945. (HandleBlock): New class for HandleBlocks.
  3946. (JSC::HandleBlock::blockFor): Static method to get the block of the given HandleNode pointer. Allows
  3947. us to quickly figure out which HandleSet the HandleNode belongs to without storing the pointer to it
  3948. in the HandleNode.
  3949. (JSC::HandleBlock::handleSet): Getter.
  3950. * heap/HandleBlockInlines.h: Added.
  3951. (JSC::HandleBlock::create):
  3952. (JSC::HandleBlock::HandleBlock):
  3953. (JSC::HandleBlock::payloadEnd):
  3954. (JSC::HandleBlock::payload):
  3955. (JSC::HandleBlock::nodes):
  3956. (JSC::HandleBlock::nodeAtIndex):
  3957. (JSC::HandleBlock::nodeCapacity):
  3958. * heap/HandleSet.cpp:
  3959. (JSC::HandleSet::~HandleSet):
  3960. (JSC::HandleSet::grow):
  3961. * heap/HandleSet.h:
  3962. (HandleNode): Move the internal Node class from HandleSet to be its own public class so it can be
  3963. used by HandleBlock.
  3964. (HandleSet): Add a typedef so that Node refers to the new HandleNode class.
  3965. (JSC::HandleSet::toHandle):
  3966. (JSC::HandleSet::toNode):
  3967. (JSC::HandleSet::allocate):
  3968. (JSC::HandleSet::deallocate):
  3969. (JSC::HandleNode::HandleNode):
  3970. (JSC::HandleNode::slot):
  3971. (JSC::HandleNode::handleSet): Use the new blockFor static function to get the right HandleBlock and lookup
  3972. the HandleSet.
  3973. (JSC::HandleNode::setPrev):
  3974. (JSC::HandleNode::prev):
  3975. (JSC::HandleNode::setNext):
  3976. (JSC::HandleNode::next):
  3977. (JSC::HandleSet::forEachStrongHandle):
  3978. * heap/Heap.h: Friend HandleSet so that it can access the BlockAllocator when allocating HandleBlocks.
  3979. 2013-03-22 David Kilzer <ddkilzer@apple.com>
  3980. BUILD FIX (r145119): Make JSValue* properties default to (assign)
  3981. <rdar://problem/13380794>
  3982. Reviewed by Mark Hahnenberg.
  3983. Fixes the following build failures:
  3984. Source/JavaScriptCore/API/tests/testapi.mm:106:1: error: no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed [-Werror,-Wobjc-property-no-attribute]
  3985. @property JSValue *onclick;
  3986. ^
  3987. Source/JavaScriptCore/API/tests/testapi.mm:106:1: error: default property attrib ute 'assign' not appropriate for non-GC object [-Werror,-Wobjc-property-no-attribute]
  3988. Source/JavaScriptCore/API/tests/testapi.mm:107:1: error: no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed [-Werror,-Wobjc-property-no-attribute]
  3989. @property JSValue *weakOnclick;
  3990. ^
  3991. Source/JavaScriptCore/API/tests/testapi.mm:107:1: error: default property attribute 'assign' not appropriate for non-GC object [-Werror,-Wobjc-property-no-attribute]
  3992. 4 errors generated.
  3993. * API/tests/testapi.mm: Default to (assign) for JSValue*
  3994. properties.
  3995. 2013-03-22 Ryosuke Niwa <rniwa@webkit.org>
  3996. testLeakingPrototypesAcrossContexts added in r146682 doesn't compile on Win and fails on Mac
  3997. https://bugs.webkit.org/show_bug.cgi?id=113125
  3998. Reviewed by Mark Hahnenberg
  3999. Remove the test added in r146682 as it's now failing on Mac.
  4000. This is the test that was causing a compilation failure on Windows.
  4001. * API/tests/testapi.c:
  4002. (main):
  4003. 2013-03-22 Ryosuke Niwa <rniwa@webkit.org>
  4004. Fix the typo: WIN -> WINDOWS.
  4005. * API/tests/testapi.c:
  4006. (main):
  4007. 2013-03-22 Ryosuke Niwa <rniwa@webkit.org>
  4008. I really can't figure out what's wrong with this one.
  4009. Temporarily disable the test added by r146682 on Windows since it doesn't compile.
  4010. * API/tests/testapi.c:
  4011. (main):
  4012. 2013-03-22 Ryosuke Niwa <rniwa@webkit.org>
  4013. Another build fix (after r146693) for r146682.
  4014. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  4015. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  4016. 2013-03-22 Roger Fong <roger_fong@apple.com>
  4017. Unreviewed. AppleWin build fix.
  4018. * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
  4019. * JavaScriptCore.vcxproj/copy-files.cmd:
  4020. 2013-03-22 Mark Hahnenberg <mhahnenberg@apple.com>
  4021. -[TinyDOMNode dealloc] should call [super dealloc] when ARC is not enabled
  4022. https://bugs.webkit.org/show_bug.cgi?id=113054
  4023. Reviewed by Geoffrey Garen.
  4024. * API/tests/testapi.mm:
  4025. (-[TinyDOMNode dealloc]):
  4026. 2013-03-22 Mark Hahnenberg <mhahnenberg@apple.com>
  4027. opaqueJSClassData should be cached on JSGlobalObject, not the JSGlobalData
  4028. https://bugs.webkit.org/show_bug.cgi?id=113086
  4029. Reviewed by Geoffrey Garen.
  4030. opaqueJSClassData stores cached prototypes for JSClassRefs in the C API. It doesn't make sense to
  4031. share these prototypes within a JSGlobalData across JSGlobalObjects, and in fact doing so will cause
  4032. a leak of the original JSGlobalObject that these prototypes were created in. Therefore we should move
  4033. this cache to JSGlobalObject where it belongs and where it won't cause memory leaks.
  4034. * API/JSBase.cpp: Needed to add an extern "C" so that testapi.c can use the super secret GC function.
  4035. * API/JSClassRef.cpp: We now grab the cached context data from the global object rather than the global data.
  4036. (OpaqueJSClass::contextData):
  4037. * API/JSClassRef.h: Remove this header because it's unnecessary and causes circular dependencies.
  4038. * API/tests/testapi.c: Added a new test that makes sure that using the same JSClassRef in two different contexts
  4039. doesn't cause leaks of the original global object.
  4040. (leakFinalize):
  4041. (nestedAllocateObject): This is a hack to bypass the conservative scan of the GC, which was unnecessarily marking
  4042. objects and keeping them alive, ruining the test result.
  4043. (testLeakingPrototypesAcrossContexts):
  4044. (main):
  4045. * API/tests/testapi.mm: extern "C" this so we can continue using it here.
  4046. * runtime/JSGlobalData.cpp: Remove JSClassRef related stuff.
  4047. (JSC::JSGlobalData::~JSGlobalData):
  4048. * runtime/JSGlobalData.h:
  4049. (JSGlobalData):
  4050. * runtime/JSGlobalObject.h: Add the stuff that JSGlobalData had. We add it to JSGlobalObjectRareData so that
  4051. clients who don't use the C API don't have to pay the memory cost of this extra HashMap.
  4052. (JSGlobalObject):
  4053. (JSGlobalObjectRareData):
  4054. (JSC::JSGlobalObject::opaqueJSClassData):
  4055. 2013-03-19 Martin Robinson <mrobinson@igalia.com>
  4056. [GTK] Add support for building the WebCore bindings to the gyp build
  4057. https://bugs.webkit.org/show_bug.cgi?id=112638
  4058. Reviewed by Nico Weber.
  4059. * JavaScriptCore.gyp/JavaScriptCoreGTK.gyp: Export all include directories to direct
  4060. dependents and fix the indentation of the libjavascriptcore target.
  4061. 2013-03-21 Filip Pizlo <fpizlo@apple.com>
  4062. Fix some minor issues in the DFG's profiling of heap accesses
  4063. https://bugs.webkit.org/show_bug.cgi?id=113010
  4064. Reviewed by Goeffrey Garen.
  4065. 1) If a CodeBlock gets jettisoned by GC, we should count the exit sites.
  4066. 2) If a CodeBlock clears a structure stub during GC, it should record this, and
  4067. the DFG should prefer to not inline that access (i.e. treat it as if it had an
  4068. exit site).
  4069. 3) If a PutById was seen by the baseline JIT, and the JIT attempted to cache it,
  4070. but it chose not to, then assume that it will take slow path.
  4071. 4) If we frequently exited because of a structure check on a weak constant,
  4072. don't try to inline that access in the future.
  4073. 5) Treat all exits that were counted as being frequent.
  4074. 81% speed-up on Octane/gbemu. Small speed-ups elsewhere, and no regressions.
  4075. * bytecode/CodeBlock.cpp:
  4076. (JSC::CodeBlock::finalizeUnconditionally):
  4077. (JSC):
  4078. (JSC::CodeBlock::resetStubDuringGCInternal):
  4079. (JSC::CodeBlock::reoptimize):
  4080. (JSC::CodeBlock::jettison):
  4081. (JSC::ProgramCodeBlock::jettisonImpl):
  4082. (JSC::EvalCodeBlock::jettisonImpl):
  4083. (JSC::FunctionCodeBlock::jettisonImpl):
  4084. (JSC::CodeBlock::tallyFrequentExitSites):
  4085. * bytecode/CodeBlock.h:
  4086. (CodeBlock):
  4087. (JSC::CodeBlock::tallyFrequentExitSites):
  4088. (ProgramCodeBlock):
  4089. (EvalCodeBlock):
  4090. (FunctionCodeBlock):
  4091. * bytecode/GetByIdStatus.cpp:
  4092. (JSC::GetByIdStatus::computeFor):
  4093. * bytecode/PutByIdStatus.cpp:
  4094. (JSC::PutByIdStatus::computeFor):
  4095. * bytecode/StructureStubInfo.h:
  4096. (JSC::StructureStubInfo::StructureStubInfo):
  4097. (StructureStubInfo):
  4098. * dfg/DFGByteCodeParser.cpp:
  4099. (JSC::DFG::ByteCodeParser::handleGetById):
  4100. (JSC::DFG::ByteCodeParser::parseBlock):
  4101. * dfg/DFGOSRExit.cpp:
  4102. (JSC::DFG::OSRExit::considerAddingAsFrequentExitSiteSlow):
  4103. * dfg/DFGOSRExit.h:
  4104. (JSC::DFG::OSRExit::considerAddingAsFrequentExitSite):
  4105. (OSRExit):
  4106. * jit/JITStubs.cpp:
  4107. (JSC::DEFINE_STUB_FUNCTION):
  4108. * runtime/Options.h:
  4109. (JSC):
  4110. 2013-03-22 Filip Pizlo <fpizlo@apple.com>
  4111. DFG folding of PutById to SimpleReplace should consider the specialized function case
  4112. https://bugs.webkit.org/show_bug.cgi?id=113093
  4113. Reviewed by Geoffrey Garen and Mark Hahnenberg.
  4114. * bytecode/PutByIdStatus.cpp:
  4115. (JSC::PutByIdStatus::computeFor):
  4116. 2013-03-22 David Kilzer <ddkilzer@apple.com>
  4117. BUILD FIX (r146558): Build testapi.mm with ARC enabled for armv7s
  4118. <http://webkit.org/b/112608>
  4119. Fixes the following build failure:
  4120. Source/JavaScriptCore/API/tests/testapi.mm:205:1: error: method possibly missing a [super dealloc] call [-Werror,-Wobjc-missing-super-calls]
  4121. }
  4122. ^
  4123. 1 error generated.
  4124. * Configurations/ToolExecutable.xcconfig: Enable ARC for armv7s
  4125. architecture.
  4126. 2013-03-22 David Kilzer <ddkilzer@apple.com>
  4127. Revert "BUILD FIX (r146558): Call [super dealloc] from -[TinyDOMNode dealloc]"
  4128. This fixes a build failure introduced by this change:
  4129. Source/JavaScriptCore/API/tests/testapi.mm:206:6: error: ARC forbids explicit message send of 'dealloc'
  4130. [super dealloc];
  4131. ^ ~~~~~~~
  4132. 1 error generated.
  4133. Not sure why this didn't fail locally on my Mac Pro.
  4134. * API/tests/testapi.mm:
  4135. (-[TinyDOMNode dealloc]): Remove call to [super dealloc].
  4136. 2013-03-22 David Kilzer <ddkilzer@apple.com>
  4137. BUILD FIX (r146558): Call [super dealloc] from -[TinyDOMNode dealloc]
  4138. <http://webkit.org/b/112608>
  4139. Fixes the following build failure:
  4140. Source/JavaScriptCore/API/tests/testapi.mm:205:1: error: method possibly missing a [super dealloc] call [-Werror,-Wobjc-missing-super-calls]
  4141. }
  4142. ^
  4143. 1 error generated.
  4144. * API/tests/testapi.mm:
  4145. (-[TinyDOMNode dealloc]): Call [super dealloc].
  4146. 2013-03-22 Ryosuke Niwa <rniwa@webkit.org>
  4147. Leak bots erroneously report JSC::WatchpointSet as leaking
  4148. https://bugs.webkit.org/show_bug.cgi?id=107781
  4149. Reviewed by Filip Pizlo.
  4150. Since leaks doesn't support tagged pointers, avoid using it by flipping the bit flag to indicate
  4151. the entry is "fat". We set the flag when the entry is NOT fat; i.e. slim.
  4152. Replaced FatFlag by SlimFlag and initialized m_bits with this flag to indicate that the entry is
  4153. initially "slim".
  4154. * runtime/SymbolTable.cpp:
  4155. (JSC::SymbolTableEntry::copySlow): Don't set FatFlag since it has been replaced by SlimFlag.
  4156. (JSC::SymbolTableEntry::inflateSlow): Ditto.
  4157. * runtime/SymbolTable.h:
  4158. (JSC::SymbolTableEntry::Fast::Fast): Set SlimFlag by default.
  4159. (JSC::SymbolTableEntry::Fast::isNull): Ignore SlimFlag.
  4160. (JSC::SymbolTableEntry::Fast::isFat): An entry is fat when m_bits is not entirely zero and SlimFlag
  4161. is not set.
  4162. (JSC::SymbolTableEntry::SymbolTableEntry): Set SlimFlag by default.
  4163. (JSC::SymbolTableEntry::SymbolTableEntry::getFast): Set SlimFlag when creating Fast from a fat entry.
  4164. (JSC::SymbolTableEntry::isNull): Ignore SlimFlag.
  4165. (JSC::SymbolTableEntry::FatEntry::FatEntry): Strip SlimFlag.
  4166. (JSC::SymbolTableEntry::isFat): An entry is fat when m_bits is not entirely zero and SlimFlag is unset.
  4167. (JSC::SymbolTableEntry::fatEntry): Don't strip FatFlag as this flag doesn't exist anymore.
  4168. (JSC::SymbolTableEntry::pack): Preserve SlimFlag.
  4169. (JSC::SymbolTableIndexHashTraits): empty value is no longer zero so don't set emptyValueIsZero true.
  4170. 2013-03-21 Mark Hahnenberg <mhahnenberg@apple.com>
  4171. Objective-C API: Need a good way to preserve custom properties on JS wrappers
  4172. https://bugs.webkit.org/show_bug.cgi?id=112608
  4173. Reviewed by Geoffrey Garen.
  4174. Currently, we just use a weak map, which means that garbage collection can cause a wrapper to
  4175. disappear if it isn't directly exported to JavaScript.
  4176. The most straightforward and safe way (with respect to garbage collection and concurrency) is to have
  4177. clients add and remove their external references along with their owners. Effectively, the client is
  4178. recording the structure of the external object graph so that the garbage collector can make sure to
  4179. mark any wrappers that are reachable through either the JS object graph of the external Obj-C object
  4180. graph. By keeping these wrappers alive, this has the effect that custom properties on these wrappers
  4181. will also remain alive.
  4182. The rule for if an object needs to be tracked by the runtime (and therefore whether the client should report it) is as follows:
  4183. For a particular object, its references to its children should be added if:
  4184. 1. The child is referenced from JavaScript.
  4185. 2. The child contains references to other objects for which (1) or (2) are true.
  4186. * API/JSAPIWrapperObject.mm:
  4187. (JSAPIWrapperObjectHandleOwner::finalize):
  4188. (JSAPIWrapperObjectHandleOwner::isReachableFromOpaqueRoots): A wrapper object is kept alive only if its JSGlobalObject
  4189. is marked and its corresponding Objective-C object was added to the set of opaque roots.
  4190. (JSC::JSAPIWrapperObject::visitChildren): We now call out to scanExternalObjectGraph, which handles adding all Objective-C
  4191. objects to the set of opaque roots.
  4192. * API/JSAPIWrapperObject.h:
  4193. (JSAPIWrapperObject):
  4194. * API/JSContext.mm: Moved dealloc to its proper place in the main implementation.
  4195. (-[JSContext dealloc]):
  4196. * API/JSVirtualMachine.h:
  4197. * API/JSVirtualMachine.mm:
  4198. (-[JSVirtualMachine initWithContextGroupRef:]):
  4199. (-[JSVirtualMachine dealloc]):
  4200. (getInternalObjcObject): Helper funciton to get the Objective-C object out of JSManagedValues or JSValues if there is one.
  4201. (-[JSVirtualMachine addManagedReference:withOwner:]): Adds the Objective-C object to the set of objects
  4202. owned by the owner object in that particular virtual machine.
  4203. (-[JSVirtualMachine removeManagedReference:withOwner:]): Removes the relationship between the two objects.
  4204. (-[JSVirtualMachine externalObjectGraph]):
  4205. (scanExternalObjectGraph): Does a depth-first search of the external object graph in a particular virtual machine starting at
  4206. the specified root. Each new object it encounters it adds to the set of opaque roots. These opaque roots will keep their
  4207. corresponding wrapper objects alive if they have them.
  4208. * API/JSManagedReferenceInternal.h: Added.
  4209. * API/JSVirtualMachine.mm: Added the per-JSVirtualMachine map between objects and the objects they own, which is more formally
  4210. known as that virtual machine's external object graph.
  4211. * API/JSWrapperMap.mm:
  4212. (-[JSWrapperMap dealloc]): We were leaking this before :-(
  4213. (-[JSVirtualMachine initWithContextGroupRef:]):
  4214. (-[JSVirtualMachine dealloc]):
  4215. (-[JSVirtualMachine externalObjectGraph]):
  4216. * API/JSVirtualMachineInternal.h:
  4217. * API/tests/testapi.mm: Added two new tests using the TinyDOMNode class. The first tests that a custom property added to a wrapper
  4218. doesn't vanish after GC, even though that wrapper isn't directly accessible to the JS garbage collector but is accessible through
  4219. the external Objective-C object graph. The second test makes sure that adding an object to the external object graph with the same
  4220. owner doesn't cause any sort of problems.
  4221. (+[TinyDOMNode sharedVirtualMachine]):
  4222. (-[TinyDOMNode init]):
  4223. (-[TinyDOMNode dealloc]):
  4224. (-[TinyDOMNode appendChild:]):
  4225. (-[TinyDOMNode numberOfChildren]):
  4226. (-[TinyDOMNode childAtIndex:]):
  4227. (-[TinyDOMNode removeChildAtIndex:]):
  4228. * JavaScriptCore.xcodeproj/project.pbxproj:
  4229. * heap/SlotVisitor.h:
  4230. (SlotVisitor):
  4231. * heap/SlotVisitorInlines.h:
  4232. (JSC::SlotVisitor::containsOpaqueRootTriState): Added a new method to SlotVisitor to allow scanExternalObjectGraph to have a
  4233. thread-safe view of opaque roots during parallel marking. The set of opaque roots available to any one SlotVisitor isn't guaranteed
  4234. to be 100% correct, but that just results in a small duplication of work in scanExternalObjectGraph. To indicate this change for
  4235. false negatives we return a TriState that's either true or mixed, but never false.
  4236. 2013-03-21 Mark Lam <mark.lam@apple.com>
  4237. Fix O(n^2) op_debug bytecode charPosition to column computation.
  4238. https://bugs.webkit.org/show_bug.cgi?id=112957.
  4239. Reviewed by Geoffrey Garen.
  4240. The previous algorithm does a linear reverse scan of the source string
  4241. to find the line start for any given char position. This results in a
  4242. O(n^2) algortithm when the source string has no line breaks.
  4243. The new algorithm computes a line start column table for a
  4244. SourceProvider on first use. This line start table is used to fix up
  4245. op_debug's charPosition operand into a column operand when an
  4246. UnlinkedCodeBlock is linked into a CodeBlock. The initialization of
  4247. the line start table is O(n), and the CodeBlock column fix up is
  4248. O(log(n)).
  4249. * bytecode/CodeBlock.cpp:
  4250. (JSC::CodeBlock::dumpBytecode):
  4251. (JSC::CodeBlock::CodeBlock): - do column fix up.
  4252. * interpreter/Interpreter.cpp:
  4253. (JSC::Interpreter::debug): - no need to do column fixup anymore.
  4254. * interpreter/Interpreter.h:
  4255. * jit/JITStubs.cpp:
  4256. (JSC::DEFINE_STUB_FUNCTION):
  4257. * llint/LLIntSlowPaths.cpp:
  4258. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  4259. * parser/SourceProvider.cpp:
  4260. (JSC::SourceProvider::lineStarts):
  4261. (JSC::charPositionExtractor):
  4262. (JSC::SourceProvider::charPositionToColumnNumber):
  4263. - initialize line start column table if needed.
  4264. - look up line start for the given char position.
  4265. * parser/SourceProvider.h:
  4266. 2013-03-21 Filip Pizlo <fpizlo@apple.com>
  4267. JSC profiler should have an at-a-glance report of the success of DFG optimization
  4268. https://bugs.webkit.org/show_bug.cgi?id=112988
  4269. Reviewed by Geoffrey Garen.
  4270. * dfg/DFGByteCodeParser.cpp:
  4271. (JSC::DFG::ByteCodeParser::handleCall):
  4272. (JSC::DFG::ByteCodeParser::handleGetById):
  4273. (JSC::DFG::ByteCodeParser::parseBlock):
  4274. * profiler/ProfilerCompilation.cpp:
  4275. (JSC::Profiler::Compilation::Compilation):
  4276. (JSC::Profiler::Compilation::toJS):
  4277. * profiler/ProfilerCompilation.h:
  4278. (JSC::Profiler::Compilation::noticeInlinedGetById):
  4279. (JSC::Profiler::Compilation::noticeInlinedPutById):
  4280. (JSC::Profiler::Compilation::noticeInlinedCall):
  4281. (Compilation):
  4282. * runtime/CommonIdentifiers.h:
  4283. 2013-03-21 Mark Lam <mark.lam@apple.com>
  4284. Fix lexer charPosition computation when "rewind"ing the lexer.
  4285. https://bugs.webkit.org/show_bug.cgi?id=112952.
  4286. Reviewed by Michael Saboff.
  4287. Changed the Lexer to no longer keep a m_charPosition. Instead, we compute
  4288. currentCharPosition() from m_code and m_codeStartPlusOffset, where
  4289. m_codeStartPlusOffset is the SourceProvider m_codeStart + the SourceCode
  4290. start offset. This ensures that the charPosition is always in sync with
  4291. m_code.
  4292. * parser/Lexer.cpp:
  4293. (JSC::::setCode):
  4294. (JSC::::internalShift):
  4295. (JSC::::shift):
  4296. (JSC::::lex):
  4297. * parser/Lexer.h:
  4298. (JSC::Lexer::currentCharPosition):
  4299. (JSC::::lexExpectIdentifier):
  4300. 2013-03-21 Alberto Garcia <agarcia@igalia.com>
  4301. [BlackBerry] GCActivityCallback: replace JSLock with JSLockHolder
  4302. https://bugs.webkit.org/show_bug.cgi?id=112448
  4303. Reviewed by Xan Lopez.
  4304. This changed in r121381.
  4305. * runtime/GCActivityCallbackBlackBerry.cpp:
  4306. (JSC::DefaultGCActivityCallback::doWork):
  4307. 2013-03-21 Mark Hahnenberg <mhahnenberg@apple.com>
  4308. Objective-C API: wrapperClass holds a static JSClassRef, which causes JSGlobalObjects to leak
  4309. https://bugs.webkit.org/show_bug.cgi?id=112856
  4310. Reviewed by Geoffrey Garen.
  4311. Through a very convoluted path that involves the caching of prototypes on the JSClassRef, we can leak
  4312. JSGlobalObjects when inserting an Objective-C object into multiple independent JSContexts.
  4313. * API/JSAPIWrapperObject.cpp: Removed.
  4314. * API/JSAPIWrapperObject.h:
  4315. (JSAPIWrapperObject):
  4316. * API/JSAPIWrapperObject.mm: Copied from Source/JavaScriptCore/API/JSAPIWrapperObject.cpp. Made this an
  4317. Objective-C++ file so that we can call release on the wrappedObject. Also added a WeakHandleOwner for
  4318. JSAPIWrapperObjects. This will also be used in a future patch for https://bugs.webkit.org/show_bug.cgi?id=112608.
  4319. (JSAPIWrapperObjectHandleOwner):
  4320. (jsAPIWrapperObjectHandleOwner):
  4321. (JSAPIWrapperObjectHandleOwner::finalize): This finalize replaces the old finalize that was done through
  4322. the C API.
  4323. (JSC::JSAPIWrapperObject::finishCreation): Allocate the WeakImpl. Balanced in finalize.
  4324. (JSC::JSAPIWrapperObject::setWrappedObject): We now do the retain of the wrappedObject here rather than in random
  4325. places scattered around JSWrapperMap.mm
  4326. * API/JSObjectRef.cpp: Added some ifdefs for platforms that don't support the Obj-C API.
  4327. (JSObjectGetPrivate): Ditto.
  4328. (JSObjectSetPrivate): Ditto.
  4329. (JSObjectGetPrivateProperty): Ditto.
  4330. (JSObjectSetPrivateProperty): Ditto.
  4331. (JSObjectDeletePrivateProperty): Ditto.
  4332. * API/JSValueRef.cpp: Ditto.
  4333. (JSValueIsObjectOfClass): Ditto.
  4334. * API/JSWrapperMap.mm: Remove wrapperClass().
  4335. (objectWithCustomBrand): Change to no longer use a parent class, which was only used to give the ability to
  4336. finalize wrapper objects.
  4337. (-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]): Change to no longer use wrapperClass().
  4338. (-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]): Ditto.
  4339. (tryUnwrapObjcObject): We now check if the object inherits from JSAPIWrapperObject.
  4340. * API/tests/testapi.mm: Added a test that exports an Objective-C object to two different JSContexts and makes
  4341. sure that the first one is collected properly by using a weak JSManagedValue for the wrapper in the first JSContext.
  4342. * CMakeLists.txt: Build file modifications.
  4343. * GNUmakefile.list.am: Ditto.
  4344. * JavaScriptCore.gypi: Ditto.
  4345. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
  4346. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Ditto.
  4347. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto.
  4348. * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
  4349. * runtime/JSGlobalObject.cpp: More ifdefs for unsupported platforms.
  4350. (JSC::JSGlobalObject::reset): Ditto.
  4351. (JSC::JSGlobalObject::visitChildren): Ditto.
  4352. * runtime/JSGlobalObject.h: Ditto.
  4353. (JSGlobalObject): Ditto.
  4354. (JSC::JSGlobalObject::objcCallbackFunctionStructure): Ditto.
  4355. 2013-03-21 Anton Muhin <antonm@chromium.org>
  4356. Unreviewed, rolling out r146483.
  4357. http://trac.webkit.org/changeset/146483
  4358. https://bugs.webkit.org/show_bug.cgi?id=111695
  4359. Breaks debug builds.
  4360. * bytecode/GlobalResolveInfo.h: Removed property svn:mergeinfo.
  4361. 2013-03-21 Gabor Rapcsanyi <rgabor@webkit.org>
  4362. Implement LLInt for CPU(ARM_TRADITIONAL)
  4363. https://bugs.webkit.org/show_bug.cgi?id=97589
  4364. Reviewed by Zoltan Herczeg.
  4365. Enable LLInt for ARMv5 and ARMv7 traditional as well.
  4366. * llint/LLIntOfflineAsmConfig.h:
  4367. * llint/LowLevelInterpreter.asm:
  4368. * llint/LowLevelInterpreter32_64.asm:
  4369. * offlineasm/arm.rb:
  4370. * offlineasm/backends.rb:
  4371. * offlineasm/instructions.rb:
  4372. 2013-03-20 Cosmin Truta <ctruta@blackberry.com>
  4373. [QNX][ARM] REGRESSION(r135330): Various failures in Octane
  4374. https://bugs.webkit.org/show_bug.cgi?id=112863
  4375. Reviewed by Yong Li.
  4376. This was fixed in http://trac.webkit.org/changeset/146396 on Linux only.
  4377. Enable this fix on QNX.
  4378. * assembler/ARMv7Assembler.h:
  4379. (ARMv7Assembler):
  4380. (JSC::ARMv7Assembler::replaceWithJump):
  4381. (JSC::ARMv7Assembler::maxJumpReplacementSize):
  4382. * assembler/MacroAssemblerARMv7.h:
  4383. (JSC::MacroAssemblerARMv7::revertJumpReplacementToBranchPtrWithPatch):
  4384. 2013-03-20 Filip Pizlo <fpizlo@apple.com>
  4385. Fix indentation of JSString.h
  4386. Rubber stamped by Mark Hahnenberg.
  4387. * runtime/JSString.h:
  4388. 2013-03-20 Filip Pizlo <fpizlo@apple.com>
  4389. "" + x where x is not a string should be optimized by the DFG to some manner of ToString conversion
  4390. https://bugs.webkit.org/show_bug.cgi?id=112845
  4391. Reviewed by Mark Hahnenberg.
  4392. I like to do "" + x. So I decided to make DFG recognize it, and related idioms.
  4393. * dfg/DFGFixupPhase.cpp:
  4394. (JSC::DFG::FixupPhase::fixupNode):
  4395. (JSC::DFG::FixupPhase::fixupToPrimitive):
  4396. (FixupPhase):
  4397. (JSC::DFG::FixupPhase::fixupToString):
  4398. (JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):
  4399. * dfg/DFGPredictionPropagationPhase.cpp:
  4400. (JSC::DFG::resultOfToPrimitive):
  4401. (DFG):
  4402. (JSC::DFG::PredictionPropagationPhase::propagate):
  4403. * dfg/DFGPredictionPropagationPhase.h:
  4404. (DFG):
  4405. 2013-03-20 Zoltan Herczeg <zherczeg@webkit.org>
  4406. ARMv7 replaceWithJump ASSERT failure after r135330.
  4407. https://bugs.webkit.org/show_bug.cgi?id=103146
  4408. Reviewed by Filip Pizlo.
  4409. On Linux, the 24 bit distance range of jumps sometimes does not
  4410. enough to cover all targets addresses. This patch supports jumps
  4411. outside of this range using a mov/movt/bx 10 byte long sequence.
  4412. * assembler/ARMv7Assembler.h:
  4413. (ARMv7Assembler):
  4414. (JSC::ARMv7Assembler::revertJumpTo_movT3movtcmpT2):
  4415. (JSC::ARMv7Assembler::nopw):
  4416. (JSC::ARMv7Assembler::label):
  4417. (JSC::ARMv7Assembler::replaceWithJump):
  4418. (JSC::ARMv7Assembler::maxJumpReplacementSize):
  4419. * assembler/MacroAssemblerARMv7.h:
  4420. (JSC::MacroAssemblerARMv7::revertJumpReplacementToBranchPtrWithPatch):
  4421. 2013-03-20 Mark Hahnenberg <mhahnenberg@apple.com>
  4422. Objective-C API: Fix over-releasing in allocateConstructorAndPrototypeWithSuperClassInfo:
  4423. https://bugs.webkit.org/show_bug.cgi?id=112832
  4424. Reviewed by Geoffrey Garen.
  4425. If either the m_constructor or m_prototype (but not both) is collected, we will call
  4426. allocateConstructorAndPrototypeWithSuperClassInfo, which will create a new object to replace the one
  4427. that was collected, but at the end of the method we call release on both of them.
  4428. This is incorrect since we autorelease the JSValue in the case that the object doesn't need to be
  4429. reallocated. Thus we'll end up overreleasing later during the drain of the autorelease pool.
  4430. * API/JSWrapperMap.mm:
  4431. (objectWithCustomBrand): We no longer alloc here. We instead call the JSValue valueWithValue class method,
  4432. which autoreleases for us.
  4433. (-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]): We no longer call release on the
  4434. constructor or prototype JSValues.
  4435. * API/tests/testapi.mm: Added a new test that crashes on ToT due to over-releasing.
  4436. 2013-03-19 Filip Pizlo <fpizlo@apple.com>
  4437. It's called "Hash Consing" not "Hash Consting"
  4438. https://bugs.webkit.org/show_bug.cgi?id=112768
  4439. Rubber stamped by Mark Hahnenberg.
  4440. See http://en.wikipedia.org/wiki/Hash_consing
  4441. * heap/GCThreadSharedData.cpp:
  4442. (JSC::GCThreadSharedData::GCThreadSharedData):
  4443. (JSC::GCThreadSharedData::reset):
  4444. * heap/GCThreadSharedData.h:
  4445. (GCThreadSharedData):
  4446. * heap/SlotVisitor.cpp:
  4447. (JSC::SlotVisitor::SlotVisitor):
  4448. (JSC::SlotVisitor::setup):
  4449. (JSC::SlotVisitor::reset):
  4450. (JSC::JSString::tryHashConsLock):
  4451. (JSC::JSString::releaseHashConsLock):
  4452. (JSC::JSString::shouldTryHashCons):
  4453. (JSC::SlotVisitor::internalAppend):
  4454. * heap/SlotVisitor.h:
  4455. (SlotVisitor):
  4456. * runtime/JSGlobalData.cpp:
  4457. (JSC::JSGlobalData::JSGlobalData):
  4458. * runtime/JSGlobalData.h:
  4459. (JSGlobalData):
  4460. (JSC::JSGlobalData::haveEnoughNewStringsToHashCons):
  4461. (JSC::JSGlobalData::resetNewStringsSinceLastHashCons):
  4462. * runtime/JSString.h:
  4463. (JSC::JSString::finishCreation):
  4464. (JSString):
  4465. (JSC::JSString::isHashConsSingleton):
  4466. (JSC::JSString::clearHashConsSingleton):
  4467. (JSC::JSString::setHashConsSingleton):
  4468. 2013-03-20 Filip Pizlo <fpizlo@apple.com>
  4469. DFG implementation of op_strcat should inline rope allocations
  4470. https://bugs.webkit.org/show_bug.cgi?id=112780
  4471. Reviewed by Oliver Hunt.
  4472. This gets rid of the StrCat node and adds a MakeRope node. The MakeRope node can
  4473. take either two or three operands, and allocates a rope string with either two or
  4474. three fibers. (The magic choice of three children for non-VarArg nodes happens to
  4475. match exactly with the magic choice of three fibers for rope strings.)
  4476. ValueAdd on KnownString is replaced with MakeRope with two children.
  4477. StrCat gets replaced by an appropriate sequence of MakeRope's.
  4478. MakeRope does not do the dynamic check to see if its children are empty strings.
  4479. This is replaced by a static check, instead. The downside is that we may use more
  4480. memory if the strings passed to MakeRope turn out to dynamically be empty. The
  4481. upside is that we do fewer checks in the cases where either the strings are not
  4482. empty, or where the strings are statically known to be empty. I suspect both of
  4483. those cases are more common, than the case where the string is dynamically empty.
  4484. This also results in some badness for X86. MakeRope needs six registers if it is
  4485. allocating a three-rope. We don't have six registers to spare on X86. Currently,
  4486. the code side-steps this problem by just never usign three-ropes in optimized
  4487. code on X86. All other architectures, including X86_64, don't have this problem.
  4488. This is a shocking speed-up. 9% progressions on both V8/splay and
  4489. SunSpider/date-format-xparb. 1% progression on V8v7 overall, and ~0.5% progression
  4490. on SunSpider. 2x speed-up on microbenchmarks that test op_strcat.
  4491. * dfg/DFGAbstractState.cpp:
  4492. (JSC::DFG::AbstractState::executeEffects):
  4493. * dfg/DFGAdjacencyList.h:
  4494. (AdjacencyList):
  4495. (JSC::DFG::AdjacencyList::removeEdge):
  4496. * dfg/DFGArgumentsSimplificationPhase.cpp:
  4497. (JSC::DFG::ArgumentsSimplificationPhase::removeArgumentsReferencingPhantomChild):
  4498. * dfg/DFGBackwardsPropagationPhase.cpp:
  4499. (JSC::DFG::BackwardsPropagationPhase::propagate):
  4500. * dfg/DFGByteCodeParser.cpp:
  4501. (JSC::DFG::ByteCodeParser::parseBlock):
  4502. * dfg/DFGCSEPhase.cpp:
  4503. (JSC::DFG::CSEPhase::putStructureStoreElimination):
  4504. (JSC::DFG::CSEPhase::eliminateIrrelevantPhantomChildren):
  4505. (JSC::DFG::CSEPhase::performNodeCSE):
  4506. * dfg/DFGDCEPhase.cpp:
  4507. (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren):
  4508. * dfg/DFGFixupPhase.cpp:
  4509. (JSC::DFG::FixupPhase::fixupNode):
  4510. (JSC::DFG::FixupPhase::createToString):
  4511. (JSC::DFG::FixupPhase::attemptToForceStringArrayModeByToStringConversion):
  4512. (JSC::DFG::FixupPhase::convertStringAddUse):
  4513. (FixupPhase):
  4514. (JSC::DFG::FixupPhase::convertToMakeRope):
  4515. (JSC::DFG::FixupPhase::fixupMakeRope):
  4516. (JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):
  4517. * dfg/DFGNodeType.h:
  4518. (DFG):
  4519. * dfg/DFGOperations.cpp:
  4520. * dfg/DFGOperations.h:
  4521. * dfg/DFGPredictionPropagationPhase.cpp:
  4522. (JSC::DFG::PredictionPropagationPhase::propagate):
  4523. * dfg/DFGSpeculativeJIT.cpp:
  4524. (JSC::DFG::SpeculativeJIT::compileAdd):
  4525. (JSC::DFG::SpeculativeJIT::compileMakeRope):
  4526. (DFG):
  4527. * dfg/DFGSpeculativeJIT.h:
  4528. (JSC::DFG::SpeculativeJIT::callOperation):
  4529. (SpeculativeJIT):
  4530. (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand):
  4531. (JSC::DFG::SpeculateCellOperand::~SpeculateCellOperand):
  4532. (JSC::DFG::SpeculateCellOperand::gpr):
  4533. (JSC::DFG::SpeculateCellOperand::use):
  4534. * dfg/DFGSpeculativeJIT32_64.cpp:
  4535. (JSC::DFG::SpeculativeJIT::compile):
  4536. * dfg/DFGSpeculativeJIT64.cpp:
  4537. (JSC::DFG::SpeculativeJIT::compile):
  4538. * runtime/JSString.h:
  4539. (JSRopeString):
  4540. 2013-03-20 Peter Gal <galpeter@inf.u-szeged.hu>
  4541. Implement and32 on MIPS platform
  4542. https://bugs.webkit.org/show_bug.cgi?id=112665
  4543. Reviewed by Zoltan Herczeg.
  4544. * assembler/MacroAssemblerMIPS.h:
  4545. (JSC::MacroAssemblerMIPS::and32): Added missing method.
  4546. (MacroAssemblerMIPS):
  4547. 2013-03-20 Mark Lam <mark.lam@apple.com>
  4548. Fix incorrect debugger column number value.
  4549. https://bugs.webkit.org/show_bug.cgi?id=112741.
  4550. Reviewed by Oliver Hunt.
  4551. 1. In lexer, parser, and debugger code, renamed column to charPosition.
  4552. 2. Convert the charPosition to the equivalent column number before
  4553. passing it to the debugger.
  4554. 3. Changed ScopeNodes to take both a startLocation and an endLocation.
  4555. This allows FunctionBodyNodes, ProgramNodes, and EvalNodess to emit
  4556. correct debug hooks with correct starting line and column numbers.
  4557. 4. Fixed the Lexer to not reset the charPosition (previously
  4558. columnNumber) in Lexer::lex().
  4559. * JavaScriptCore.order:
  4560. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  4561. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  4562. * bytecode/CodeBlock.cpp:
  4563. (JSC::CodeBlock::dumpBytecode):
  4564. * bytecompiler/BytecodeGenerator.cpp:
  4565. (JSC::BytecodeGenerator::emitDebugHook):
  4566. * bytecompiler/BytecodeGenerator.h:
  4567. (JSC::BytecodeGenerator::emitExpressionInfo):
  4568. * bytecompiler/NodesCodegen.cpp:
  4569. (JSC::ArrayNode::toArgumentList):
  4570. (JSC::ConstStatementNode::emitBytecode):
  4571. (JSC::EmptyStatementNode::emitBytecode):
  4572. (JSC::DebuggerStatementNode::emitBytecode):
  4573. (JSC::ExprStatementNode::emitBytecode):
  4574. (JSC::VarStatementNode::emitBytecode):
  4575. (JSC::IfNode::emitBytecode):
  4576. (JSC::IfElseNode::emitBytecode):
  4577. (JSC::DoWhileNode::emitBytecode):
  4578. (JSC::WhileNode::emitBytecode):
  4579. (JSC::ForNode::emitBytecode):
  4580. (JSC::ForInNode::emitBytecode):
  4581. (JSC::ContinueNode::emitBytecode):
  4582. (JSC::BreakNode::emitBytecode):
  4583. (JSC::ReturnNode::emitBytecode):
  4584. (JSC::WithNode::emitBytecode):
  4585. (JSC::SwitchNode::emitBytecode):
  4586. (JSC::LabelNode::emitBytecode):
  4587. (JSC::ThrowNode::emitBytecode):
  4588. (JSC::TryNode::emitBytecode):
  4589. (JSC::ProgramNode::emitBytecode):
  4590. (JSC::EvalNode::emitBytecode):
  4591. (JSC::FunctionBodyNode::emitBytecode):
  4592. * interpreter/Interpreter.cpp:
  4593. (JSC::Interpreter::debug):
  4594. - convert charPosition to column for the debugger.
  4595. * interpreter/Interpreter.h:
  4596. * jit/JITStubs.cpp:
  4597. (DEFINE_STUB_FUNCTION(void, op_debug)):
  4598. * llint/LLIntSlowPaths.cpp:
  4599. (LLINT_SLOW_PATH_DECL(slow_op_debug)):
  4600. * parser/ASTBuilder.h:
  4601. (JSC::ASTBuilder::createFunctionExpr):
  4602. (JSC::ASTBuilder::createFunctionBody):
  4603. (JSC::ASTBuilder::createGetterOrSetterProperty):
  4604. (JSC::ASTBuilder::createFuncDeclStatement):
  4605. (JSC::ASTBuilder::createBlockStatement):
  4606. (JSC::ASTBuilder::createExprStatement):
  4607. (JSC::ASTBuilder::createIfStatement):
  4608. (JSC::ASTBuilder::createForLoop):
  4609. (JSC::ASTBuilder::createForInLoop):
  4610. (JSC::ASTBuilder::createVarStatement):
  4611. (JSC::ASTBuilder::createReturnStatement):
  4612. (JSC::ASTBuilder::createBreakStatement):
  4613. (JSC::ASTBuilder::createContinueStatement):
  4614. (JSC::ASTBuilder::createTryStatement):
  4615. (JSC::ASTBuilder::createSwitchStatement):
  4616. (JSC::ASTBuilder::createWhileStatement):
  4617. (JSC::ASTBuilder::createDoWhileStatement):
  4618. (JSC::ASTBuilder::createWithStatement):
  4619. (JSC::ASTBuilder::createThrowStatement):
  4620. (JSC::ASTBuilder::createDebugger):
  4621. (JSC::ASTBuilder::createConstStatement):
  4622. * parser/Lexer.cpp:
  4623. (JSC::::setCode):
  4624. (JSC::::internalShift):
  4625. (JSC::::shift):
  4626. (JSC::::lex):
  4627. * parser/Lexer.h:
  4628. (JSC::Lexer::currentCharPosition):
  4629. (Lexer):
  4630. (JSC::::lexExpectIdentifier):
  4631. * parser/NodeConstructors.h:
  4632. (JSC::Node::Node):
  4633. * parser/Nodes.cpp:
  4634. (JSC::StatementNode::setLoc):
  4635. (JSC::ScopeNode::ScopeNode):
  4636. (JSC::ProgramNode::ProgramNode):
  4637. (JSC::ProgramNode::create):
  4638. (JSC::EvalNode::EvalNode):
  4639. (JSC::EvalNode::create):
  4640. (JSC::FunctionBodyNode::FunctionBodyNode):
  4641. (JSC::FunctionBodyNode::create):
  4642. * parser/Nodes.h:
  4643. (JSC::Node::charPosition):
  4644. (Node):
  4645. (StatementNode):
  4646. (JSC::StatementNode::lastLine):
  4647. (ScopeNode):
  4648. (JSC::ScopeNode::startLine):
  4649. (JSC::ScopeNode::startCharPosition):
  4650. (ProgramNode):
  4651. (EvalNode):
  4652. (FunctionBodyNode):
  4653. * parser/Parser.cpp:
  4654. (JSC::::Parser):
  4655. (JSC::::parseFunctionBody):
  4656. (JSC::::parseFunctionInfo):
  4657. * parser/Parser.h:
  4658. (JSC::::parse):
  4659. * parser/ParserTokens.h:
  4660. (JSC::JSTokenLocation::JSTokenLocation):
  4661. (JSTokenLocation):
  4662. * parser/SyntaxChecker.h:
  4663. (JSC::SyntaxChecker::createFunctionBody):
  4664. 2013-03-20 Csaba Osztrogonác <ossy@webkit.org>
  4665. REGRESSION(r146089): It broke 20 sputnik tests on ARM traditional and Thumb2
  4666. https://bugs.webkit.org/show_bug.cgi?id=112676
  4667. Rubber-stamped by Filip Pizlo.
  4668. Add one more EABI_32BIT_DUMMY_ARG to make DFG JIT ARM EABI compatible
  4669. again after r146089 similar to https://bugs.webkit.org/show_bug.cgi?id=84449
  4670. * dfg/DFGSpeculativeJIT.h:
  4671. (JSC::DFG::SpeculativeJIT::callOperation):
  4672. 2013-03-19 Michael Saboff <msaboff@apple.com>
  4673. Crash when loading http://www.jqchart.com/jquery/gauges/RadialGauge/LiveData
  4674. https://bugs.webkit.org/show_bug.cgi?id=112694
  4675. Reviewed by Filip Pizlo.
  4676. We were trying to convert an NewArray to a Phantom, but convertToPhantom doesn't handle
  4677. nodes with variable arguments. Added code to insert a Phantom node in front of all the
  4678. live children of a var args node. Added ASSERT not var args for convertToPhantom to
  4679. catch any other similar cases. Added a new convertToPhantomUnchecked() for converting
  4680. var arg nodes.
  4681. * dfg/DFGDCEPhase.cpp:
  4682. (JSC::DFG::DCEPhase::run):
  4683. * dfg/DFGNode.h:
  4684. (Node):
  4685. (JSC::DFG::Node::setOpAndDefaultNonExitFlags): Added ASSERT(!(m_flags & NodeHasVarArgs))
  4686. (JSC::DFG::Node::setOpAndDefaultNonExitFlagsUnchecked):
  4687. (JSC::DFG::Node::convertToPhantomUnchecked):
  4688. 2013-03-19 Mark Hahnenberg <mhahnenberg@apple.com>
  4689. Crash in SpeculativeJIT::fillSpeculateIntInternal<false> on http://bellard.org/jslinux
  4690. https://bugs.webkit.org/show_bug.cgi?id=112738
  4691. Reviewed by Filip Pizlo.
  4692. * dfg/DFGFixupPhase.cpp:
  4693. (JSC::DFG::FixupPhase::fixIntEdge): We shouldn't be killing this node because it could be
  4694. referenced by other people.
  4695. 2013-03-19 Oliver Hunt <oliver@apple.com>
  4696. RELEASE_ASSERT fires in exception handler lookup
  4697. RS=Geoff Garen.
  4698. Temporarily switch this RELEASE_ASSERT into a regular ASSERT
  4699. as currently this is producing fairly bad crashiness.
  4700. * bytecode/CodeBlock.cpp:
  4701. (JSC::CodeBlock::handlerForBytecodeOffset):
  4702. 2013-03-18 Filip Pizlo <fpizlo@apple.com>
  4703. DFG should optimize StringObject.length and StringOrStringObject.length
  4704. https://bugs.webkit.org/show_bug.cgi?id=112658
  4705. Reviewed by Mark Hahnenberg.
  4706. Implemented by injecting a ToString(StringObject:@a) or ToString(StringOrStringObject:@a) prior
  4707. to GetArrayLength with ArrayMode(Array::String) if @a is predicted StringObject or
  4708. StringOrStringObject.
  4709. * dfg/DFGFixupPhase.cpp:
  4710. (JSC::DFG::FixupPhase::fixupNode):
  4711. (JSC::DFG::FixupPhase::createToString):
  4712. (FixupPhase):
  4713. (JSC::DFG::FixupPhase::attemptToForceStringArrayModeByToStringConversion):
  4714. (JSC::DFG::FixupPhase::convertStringAddUse):
  4715. 2013-03-19 Gabor Rapcsanyi <rgabor@webkit.org>
  4716. Implement and32 on ARMv7 and ARM traditional platforms
  4717. https://bugs.webkit.org/show_bug.cgi?id=112663
  4718. Reviewed by Zoltan Herczeg.
  4719. * assembler/MacroAssemblerARM.h:
  4720. (JSC::MacroAssemblerARM::and32): Add missing method.
  4721. (MacroAssemblerARM):
  4722. * assembler/MacroAssemblerARMv7.h:
  4723. (JSC::MacroAssemblerARMv7::and32): Add missing method.
  4724. (MacroAssemblerARMv7):
  4725. 2013-03-18 Filip Pizlo <fpizlo@apple.com>
  4726. DFG ToString generic cases should work correctly
  4727. https://bugs.webkit.org/show_bug.cgi?id=112654
  4728. <rdar://problem/13447250>
  4729. Reviewed by Geoffrey Garen.
  4730. * dfg/DFGSpeculativeJIT.cpp:
  4731. (JSC::DFG::SpeculativeJIT::compileToStringOnCell):
  4732. * dfg/DFGSpeculativeJIT32_64.cpp:
  4733. (JSC::DFG::SpeculativeJIT::compile):
  4734. * dfg/DFGSpeculativeJIT64.cpp:
  4735. (JSC::DFG::SpeculativeJIT::compile):
  4736. 2013-03-18 Michael Saboff <msaboff@apple.com>
  4737. Unreviewed build fix for 32 bit builds.
  4738. * dfg/DFGSpeculativeJIT32_64.cpp:
  4739. (JSC::DFG::SpeculativeJIT::compile):
  4740. 2013-03-18 Michael Saboff <msaboff@apple.com>
  4741. EFL: Unsafe branch detected in compilePutByValForFloatTypedArray()
  4742. https://bugs.webkit.org/show_bug.cgi?id=112609
  4743. Reviewed by Geoffrey Garen.
  4744. Created local valueFPR and scratchFPR and filled them with valueOp.fpr() and scratch.fpr()
  4745. respectively so that if valueOp.fpr() causes a spill during allocation, it occurs before the
  4746. branch and also to follow convention. Added register allocation checks to FPRTemporary.
  4747. Cleaned up a couple of other places to follow the "AllocatVirtualRegType foo, get machine
  4748. reg from foo" pattern.
  4749. * dfg/DFGSpeculativeJIT.cpp:
  4750. (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
  4751. * dfg/DFGSpeculativeJIT.h:
  4752. (JSC::DFG::SpeculativeJIT::fprAllocate):
  4753. * dfg/DFGSpeculativeJIT32_64.cpp:
  4754. (JSC::DFG::SpeculativeJIT::convertToDouble):
  4755. (JSC::DFG::SpeculativeJIT::compile):
  4756. * dfg/DFGSpeculativeJIT64.cpp:
  4757. (JSC::DFG::SpeculativeJIT::compile):
  4758. 2013-03-18 Filip Pizlo <fpizlo@apple.com>
  4759. DFG should inline binary string concatenations (i.e. ValueAdd with string children)
  4760. https://bugs.webkit.org/show_bug.cgi?id=112599
  4761. Reviewed by Oliver Hunt.
  4762. This does as advertised: if you do x + y where x and y are strings, you'll get
  4763. a fast inlined JSRopeString allocation (along with whatever checks are necessary).
  4764. It also does good things if either x or y (or both) are StringObjects, or some
  4765. other thing like StringOrStringObject. It also lays the groundwork for making this
  4766. fast if either x or y are numbers, or some other reasonably-cheap-to-convert
  4767. value.
  4768. * dfg/DFGAbstractState.cpp:
  4769. (JSC::DFG::AbstractState::executeEffects):
  4770. * dfg/DFGFixupPhase.cpp:
  4771. (JSC::DFG::FixupPhase::fixupNode):
  4772. (FixupPhase):
  4773. (JSC::DFG::FixupPhase::isStringObjectUse):
  4774. (JSC::DFG::FixupPhase::convertStringAddUse):
  4775. (JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):
  4776. * dfg/DFGOperations.cpp:
  4777. * dfg/DFGOperations.h:
  4778. * dfg/DFGSpeculativeJIT.cpp:
  4779. (JSC::DFG::SpeculativeJIT::compileAdd):
  4780. * dfg/DFGSpeculativeJIT.h:
  4781. (JSC::DFG::SpeculativeJIT::callOperation):
  4782. (SpeculativeJIT):
  4783. (JSC::DFG::SpeculativeJIT::emitAllocateJSCell):
  4784. (JSC::DFG::SpeculativeJIT::emitAllocateJSObject):
  4785. * runtime/JSString.h:
  4786. (JSC::JSString::offsetOfFlags):
  4787. (JSString):
  4788. (JSRopeString):
  4789. (JSC::JSRopeString::offsetOfFibers):
  4790. 2013-03-18 Filip Pizlo <fpizlo@apple.com>
  4791. JSC_NATIVE_FUNCTION() takes an identifier for the name and then uses #name, which is unsafe if name was already #define'd to something else
  4792. https://bugs.webkit.org/show_bug.cgi?id=112639
  4793. Reviewed by Michael Saboff.
  4794. Change it to take a string instead.
  4795. * runtime/JSObject.h:
  4796. (JSC):
  4797. * runtime/ObjectPrototype.cpp:
  4798. (JSC::ObjectPrototype::finishCreation):
  4799. * runtime/StringPrototype.cpp:
  4800. (JSC::StringPrototype::finishCreation):
  4801. 2013-03-18 Brent Fulgham <bfulgham@webkit.org>
  4802. [WinCairo] Get build working under VS2010.
  4803. https://bugs.webkit.org/show_bug.cgi?id=112604
  4804. Reviewed by Tim Horton.
  4805. * JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Use CFLite-specific
  4806. build target (standard version links against CoreFoundation.lib
  4807. instead of CFLite.lib).
  4808. * JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props: Added.
  4809. * JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props: Added.
  4810. * JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props: Added.
  4811. 2013-03-18 Roger Fong <roger_fong@apple.com>
  4812. AppleWin VS2010 Debug configuration build fix..
  4813. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  4814. 2013-03-18 Brent Fulgham <bfulgham@webkit.org>
  4815. [WinCairo] Get build working under VS2010.
  4816. https://bugs.webkit.org/show_bug.cgi?id=112604
  4817. Reviewed by Tim Horton.
  4818. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Add build targets for
  4819. Debug_WinCairo and Release_WinCairo using CFLite.
  4820. * JavaScriptCore.vcxproj/JavaScriptCoreCFLite.props: Added.
  4821. * JavaScriptCore.vcxproj/JavaScriptCoreDebugCFLite.props: Added.
  4822. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj:
  4823. Add Debug_WinCairo and Release_WinCairo build targets to
  4824. make sure headers are copied to proper build folder.
  4825. * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: Ditto.
  4826. * JavaScriptCore.vcxproj/JavaScriptCoreReleaseCFLite.props: Added.
  4827. * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj:
  4828. Add Debug_WinCairo and Release_WinCairo build targets to
  4829. make sure headers are copied to proper build folder.
  4830. * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj:
  4831. Ditto.
  4832. * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
  4833. Ditto.
  4834. * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Ditto.
  4835. * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: Ditto.
  4836. * JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Ditto.
  4837. 2013-03-18 Michael Saboff <msaboff@apple.com>
  4838. Potentially unsafe register allocations in DFG code generation
  4839. https://bugs.webkit.org/show_bug.cgi?id=112477
  4840. Reviewed by Geoffrey Garen.
  4841. Moved allocation of temporary GPRs to be before any generated branches in the functions below.
  4842. * dfg/DFGSpeculativeJIT32_64.cpp:
  4843. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  4844. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  4845. (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
  4846. * dfg/DFGSpeculativeJIT64.cpp:
  4847. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  4848. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  4849. (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
  4850. 2013-03-15 Filip Pizlo <fpizlo@apple.com>
  4851. DFG string conversions and allocations should be inlined
  4852. https://bugs.webkit.org/show_bug.cgi?id=112376
  4853. Reviewed by Geoffrey Garen.
  4854. This turns new String(), String(), String.prototype.valueOf(), and
  4855. String.prototype.toString() into intrinsics. It gives the DFG the ability to handle
  4856. conversions from StringObject to JSString and vice-versa, and also gives it the
  4857. ability to handle cases where a variable may be either a StringObject or a JSString.
  4858. To do this, I added StringObject to value profiling (and removed the stale
  4859. distinction between Myarguments and Foreignarguments). I also cleaned up ToPrimitive
  4860. handling, using some of the new functionality but also taking advantage of the
  4861. existence of Identity(String:@a).
  4862. This is a 2% SunSpider speed-up. Also there are some speed-ups on V8v7 and Kraken.
  4863. On microbenchmarks that stress new String() this is a 14x speed-up.
  4864. * CMakeLists.txt:
  4865. * DerivedSources.make:
  4866. * DerivedSources.pri:
  4867. * GNUmakefile.list.am:
  4868. * bytecode/CodeBlock.h:
  4869. (CodeBlock):
  4870. (JSC::CodeBlock::hasExitSite):
  4871. (JSC):
  4872. * bytecode/DFGExitProfile.cpp:
  4873. (JSC::DFG::ExitProfile::hasExitSite):
  4874. (DFG):
  4875. * bytecode/DFGExitProfile.h:
  4876. (ExitProfile):
  4877. (JSC::DFG::ExitProfile::hasExitSite):
  4878. * bytecode/ExitKind.cpp:
  4879. (JSC::exitKindToString):
  4880. * bytecode/ExitKind.h:
  4881. * bytecode/SpeculatedType.cpp:
  4882. (JSC::dumpSpeculation):
  4883. (JSC::speculationToAbbreviatedString):
  4884. (JSC::speculationFromClassInfo):
  4885. * bytecode/SpeculatedType.h:
  4886. (JSC):
  4887. (JSC::isStringObjectSpeculation):
  4888. (JSC::isStringOrStringObjectSpeculation):
  4889. * create_hash_table:
  4890. * dfg/DFGAbstractState.cpp:
  4891. (JSC::DFG::AbstractState::executeEffects):
  4892. * dfg/DFGAbstractState.h:
  4893. (JSC::DFG::AbstractState::filterEdgeByUse):
  4894. * dfg/DFGByteCodeParser.cpp:
  4895. (ByteCodeParser):
  4896. (JSC::DFG::ByteCodeParser::handleCall):
  4897. (JSC::DFG::ByteCodeParser::emitArgumentPhantoms):
  4898. (DFG):
  4899. (JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
  4900. * dfg/DFGCSEPhase.cpp:
  4901. (JSC::DFG::CSEPhase::putStructureStoreElimination):
  4902. * dfg/DFGEdge.h:
  4903. (JSC::DFG::Edge::shift):
  4904. * dfg/DFGFixupPhase.cpp:
  4905. (JSC::DFG::FixupPhase::fixupNode):
  4906. (JSC::DFG::FixupPhase::isStringPrototypeMethodSane):
  4907. (FixupPhase):
  4908. (JSC::DFG::FixupPhase::canOptimizeStringObjectAccess):
  4909. (JSC::DFG::FixupPhase::observeUseKindOnNode):
  4910. * dfg/DFGGraph.h:
  4911. (JSC::DFG::Graph::hasGlobalExitSite):
  4912. (Graph):
  4913. (JSC::DFG::Graph::hasExitSite):
  4914. (JSC::DFG::Graph::clobbersWorld):
  4915. * dfg/DFGNode.h:
  4916. (JSC::DFG::Node::convertToToString):
  4917. (Node):
  4918. (JSC::DFG::Node::hasStructure):
  4919. (JSC::DFG::Node::shouldSpeculateStringObject):
  4920. (JSC::DFG::Node::shouldSpeculateStringOrStringObject):
  4921. * dfg/DFGNodeType.h:
  4922. (DFG):
  4923. * dfg/DFGOperations.cpp:
  4924. * dfg/DFGOperations.h:
  4925. * dfg/DFGPredictionPropagationPhase.cpp:
  4926. (JSC::DFG::PredictionPropagationPhase::propagate):
  4927. * dfg/DFGSpeculativeJIT.cpp:
  4928. (JSC::DFG::SpeculativeJIT::compileToStringOnCell):
  4929. (DFG):
  4930. (JSC::DFG::SpeculativeJIT::compileNewStringObject):
  4931. (JSC::DFG::SpeculativeJIT::speculateObject):
  4932. (JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
  4933. (JSC::DFG::SpeculativeJIT::speculateString):
  4934. (JSC::DFG::SpeculativeJIT::speculateStringObject):
  4935. (JSC::DFG::SpeculativeJIT::speculateStringOrStringObject):
  4936. (JSC::DFG::SpeculativeJIT::speculate):
  4937. * dfg/DFGSpeculativeJIT.h:
  4938. (JSC::DFG::SpeculativeJIT::callOperation):
  4939. (SpeculativeJIT):
  4940. (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand):
  4941. (DFG):
  4942. (JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure):
  4943. * dfg/DFGSpeculativeJIT32_64.cpp:
  4944. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  4945. (JSC::DFG::SpeculativeJIT::compile):
  4946. * dfg/DFGSpeculativeJIT64.cpp:
  4947. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  4948. (JSC::DFG::SpeculativeJIT::compile):
  4949. * dfg/DFGUseKind.cpp:
  4950. (WTF::printInternal):
  4951. * dfg/DFGUseKind.h:
  4952. (JSC::DFG::typeFilterFor):
  4953. * interpreter/CallFrame.h:
  4954. (JSC::ExecState::regExpPrototypeTable):
  4955. * runtime/CommonIdentifiers.h:
  4956. * runtime/Intrinsic.h:
  4957. * runtime/JSDestructibleObject.h:
  4958. (JSDestructibleObject):
  4959. (JSC::JSDestructibleObject::classInfoOffset):
  4960. * runtime/JSGlobalData.cpp:
  4961. (JSC):
  4962. (JSC::JSGlobalData::JSGlobalData):
  4963. (JSC::JSGlobalData::~JSGlobalData):
  4964. * runtime/JSGlobalData.h:
  4965. (JSGlobalData):
  4966. * runtime/JSObject.cpp:
  4967. * runtime/JSObject.h:
  4968. (JSC):
  4969. * runtime/JSWrapperObject.h:
  4970. (JSC::JSWrapperObject::allocationSize):
  4971. (JSWrapperObject):
  4972. (JSC::JSWrapperObject::internalValueOffset):
  4973. (JSC::JSWrapperObject::internalValueCellOffset):
  4974. * runtime/StringPrototype.cpp:
  4975. (JSC):
  4976. (JSC::StringPrototype::finishCreation):
  4977. (JSC::StringPrototype::create):
  4978. * runtime/StringPrototype.h:
  4979. (StringPrototype):
  4980. 2013-03-18 Filip Pizlo <fpizlo@apple.com>
  4981. ObjectPrototype properties should be eagerly created rather than lazily via static tables
  4982. https://bugs.webkit.org/show_bug.cgi?id=112539
  4983. Reviewed by Oliver Hunt.
  4984. This is the first part of https://bugs.webkit.org/show_bug.cgi?id=112233. Rolling this
  4985. in first since it's the less-likely-to-be-broken part.
  4986. * CMakeLists.txt:
  4987. * DerivedSources.make:
  4988. * DerivedSources.pri:
  4989. * GNUmakefile.list.am:
  4990. * interpreter/CallFrame.h:
  4991. (JSC::ExecState::objectConstructorTable):
  4992. * runtime/CommonIdentifiers.h:
  4993. * runtime/JSGlobalData.cpp:
  4994. (JSC):
  4995. (JSC::JSGlobalData::JSGlobalData):
  4996. (JSC::JSGlobalData::~JSGlobalData):
  4997. * runtime/JSGlobalData.h:
  4998. (JSGlobalData):
  4999. * runtime/JSObject.cpp:
  5000. (JSC::JSObject::putDirectNativeFunction):
  5001. (JSC):
  5002. * runtime/JSObject.h:
  5003. (JSObject):
  5004. (JSC):
  5005. * runtime/Lookup.cpp:
  5006. (JSC::setUpStaticFunctionSlot):
  5007. * runtime/ObjectPrototype.cpp:
  5008. (JSC):
  5009. (JSC::ObjectPrototype::finishCreation):
  5010. (JSC::ObjectPrototype::create):
  5011. * runtime/ObjectPrototype.h:
  5012. (ObjectPrototype):
  5013. 2013-03-16 Pratik Solanki <psolanki@apple.com>
  5014. Disable High DPI Canvas on iOS
  5015. https://bugs.webkit.org/show_bug.cgi?id=112511
  5016. Reviewed by Joseph Pecoraro.
  5017. * Configurations/FeatureDefines.xcconfig:
  5018. 2013-03-15 Andreas Kling <akling@apple.com>
  5019. Don't also clone StructureRareData when cloning Structure.
  5020. <http://webkit.org/b/111672>
  5021. Reviewed by Mark Hahnenberg.
  5022. We were cloning a lot of StructureRareData with only the previousID pointer set since
  5023. the enumerationCache is not shared between clones.
  5024. Let the Structure copy constructor decide whether it wants to clone the rare data.
  5025. The decision is made by StructureRareData::needsCloning() and will currently always
  5026. return false, since StructureRareData only holds on to caches at present.
  5027. This may change in the future as more members are added to StructureRareData.
  5028. * runtime/Structure.cpp:
  5029. (JSC::Structure::Structure):
  5030. (JSC::Structure::cloneRareDataFrom):
  5031. * runtime/StructureInlines.h:
  5032. (JSC::Structure::create):
  5033. 2013-03-15 Mark Hahnenberg <mhahnenberg@apple.com>
  5034. Roll out r145838
  5035. https://bugs.webkit.org/show_bug.cgi?id=112458
  5036. Unreviewed. Requested by Filip Pizlo.
  5037. * CMakeLists.txt:
  5038. * DerivedSources.make:
  5039. * DerivedSources.pri:
  5040. * GNUmakefile.list.am:
  5041. * dfg/DFGOperations.cpp:
  5042. * interpreter/CallFrame.h:
  5043. (JSC::ExecState::objectPrototypeTable):
  5044. * jit/JITStubs.cpp:
  5045. (JSC::getByVal):
  5046. * llint/LLIntSlowPaths.cpp:
  5047. (JSC::LLInt::getByVal):
  5048. * runtime/CommonIdentifiers.h:
  5049. * runtime/JSCell.cpp:
  5050. (JSC):
  5051. * runtime/JSCell.h:
  5052. (JSCell):
  5053. * runtime/JSCellInlines.h:
  5054. (JSC):
  5055. (JSC::JSCell::fastGetOwnProperty):
  5056. * runtime/JSGlobalData.cpp:
  5057. (JSC):
  5058. (JSC::JSGlobalData::JSGlobalData):
  5059. (JSC::JSGlobalData::~JSGlobalData):
  5060. * runtime/JSGlobalData.h:
  5061. (JSGlobalData):
  5062. * runtime/JSObject.cpp:
  5063. (JSC):
  5064. * runtime/JSObject.h:
  5065. (JSObject):
  5066. (JSC):
  5067. * runtime/Lookup.cpp:
  5068. (JSC::setUpStaticFunctionSlot):
  5069. * runtime/ObjectPrototype.cpp:
  5070. (JSC):
  5071. (JSC::ObjectPrototype::finishCreation):
  5072. (JSC::ObjectPrototype::getOwnPropertySlot):
  5073. (JSC::ObjectPrototype::getOwnPropertyDescriptor):
  5074. * runtime/ObjectPrototype.h:
  5075. (JSC::ObjectPrototype::create):
  5076. (ObjectPrototype):
  5077. * runtime/PropertyMapHashTable.h:
  5078. (JSC::PropertyTable::findWithString):
  5079. * runtime/Structure.h:
  5080. (Structure):
  5081. * runtime/StructureInlines.h:
  5082. (JSC::Structure::get):
  5083. 2013-03-15 Michael Saboff <msaboff@apple.com>
  5084. Cleanup of DFG and Baseline JIT debugging code
  5085. https://bugs.webkit.org/show_bug.cgi?id=111871
  5086. Reviewed by Geoffrey Garen.
  5087. Fixed various debug related issue in baseline and DFG JITs. See below.
  5088. * dfg/DFGRepatch.cpp:
  5089. (JSC::DFG::dfgLinkClosureCall): Used pointerDump() to handle when calleeCodeBlock is NULL.
  5090. * dfg/DFGScratchRegisterAllocator.h: Now use ScratchBuffer::activeLengthPtr() to get
  5091. pointer to scratch register length.
  5092. (JSC::DFG::ScratchRegisterAllocator::preserveUsedRegistersToScratchBuffer):
  5093. (JSC::DFG::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBuffer):
  5094. * dfg/DFGSpeculativeJIT.cpp:
  5095. (JSC::DFG::SpeculativeJIT::checkConsistency): Added missing case labels for DataFormatOSRMarker,
  5096. DataFormatDead, and DataFormatArguments and made them RELEASE_ASSERT_NOT_REACHED();
  5097. * jit/JITCall.cpp:
  5098. (JSC::JIT::privateCompileClosureCall): Used pointerDump() to handle when calleeCodeBlock is NULL.
  5099. * jit/JITCall32_64.cpp:
  5100. (JSC::JIT::privateCompileClosureCall): Used pointerDump() to handle when calleeCodeBlock is NULL.
  5101. * runtime/JSGlobalData.h:
  5102. (JSC::ScratchBuffer::ScratchBuffer): Fixed buffer allocation alignment to
  5103. be on a double boundary.
  5104. (JSC::ScratchBuffer::setActiveLength):
  5105. (JSC::ScratchBuffer::activeLength):
  5106. (JSC::ScratchBuffer::activeLengthPtr):
  5107. 2013-03-15 Michael Saboff <msaboff@apple.com>
  5108. Add runtime check for improper register allocations in DFG
  5109. https://bugs.webkit.org/show_bug.cgi?id=112380
  5110. Reviewed by Geoffrey Garen.
  5111. Added framework to check for register allocation within a branch source - target range. All register allocations
  5112. are saved using the offset in the code stream where the allocation occurred. Later when a jump is linked, the
  5113. currently saved register allocations are checked to make sure that they didn't occur in the range of code that was
  5114. jumped over. This protects against the case where an allocation could have spilled register contents to free up
  5115. a register and that spill only occurs on one path of a many through the code. A subsequent fill of the spilled
  5116. register may load garbage. See https://bugs.webkit.org/show_bug.cgi?id=111777 for one such bug.
  5117. This code is protected by the compile time check of #if ENABLE(DFG_REGISTER_ALLOCATION_VALIDATION).
  5118. The check is only done during the processing of SpeculativeJIT::compile(Node* node) and its callees.
  5119. * assembler/AbstractMacroAssembler.h:
  5120. (JSC::AbstractMacroAssembler::Jump::link): Invoke register allocation checks using source and target of link.
  5121. (JSC::AbstractMacroAssembler::Jump::linkTo): Invoke register allocation checks using source and target of link.
  5122. (AbstractMacroAssembler):
  5123. (RegisterAllocationOffset): New helper class to store the instruction stream offset and compare against a
  5124. jump range.
  5125. (JSC::AbstractMacroAssembler::RegisterAllocationOffset::RegisterAllocationOffset):
  5126. (JSC::AbstractMacroAssembler::RegisterAllocationOffset::check):
  5127. (JSC::AbstractMacroAssembler::addRegisterAllocationAtOffset):
  5128. (JSC::AbstractMacroAssembler::clearRegisterAllocationOffsets):
  5129. (JSC::AbstractMacroAssembler::checkRegisterAllocationAgainstBranchRange):
  5130. * dfg/DFGSpeculativeJIT.h:
  5131. (JSC::DFG::SpeculativeJIT::allocate):
  5132. * dfg/DFGSpeculativeJIT32_64.cpp:
  5133. (JSC::DFG::SpeculativeJIT::compile):
  5134. * dfg/DFGSpeculativeJIT64.cpp:
  5135. (JSC::DFG::SpeculativeJIT::compile):
  5136. 2013-03-14 Oliver Hunt <oliver@apple.com>
  5137. REGRESSION(r145000): Crash loading arstechnica.com when Safari Web Inspector is open
  5138. https://bugs.webkit.org/show_bug.cgi?id=111868
  5139. Reviewed by Antti Koivisto.
  5140. Don't allow non-local property lookup when the debugger is enabled.
  5141. * bytecompiler/BytecodeGenerator.cpp:
  5142. (JSC::BytecodeGenerator::resolve):
  5143. 2013-03-11 Mark Hahnenberg <mhahnenberg@apple.com>
  5144. Objective-C API: Objective-C functions exposed to JavaScript have the wrong type (object instead of function)
  5145. https://bugs.webkit.org/show_bug.cgi?id=105892
  5146. Reviewed by Geoffrey Garen.
  5147. Changed ObjCCallbackFunction to subclass JSCallbackFunction which already has all of the machinery to call
  5148. functions using the C API. Since ObjCCallbackFunction is now a JSCell, we changed the old implementation of
  5149. ObjCCallbackFunction to be the internal implementation and keep track of all the proper data so that we
  5150. don't have to put all of that in the header, which will now be included from C++ files (e.g. JSGlobalObject.cpp).
  5151. * API/JSCallbackFunction.cpp: Change JSCallbackFunction to allow subclassing. Originally it was internally
  5152. passing its own Structure up the chain of constructors, but we now want to be able to pass other Structures as well.
  5153. (JSC::JSCallbackFunction::JSCallbackFunction):
  5154. (JSC::JSCallbackFunction::create):
  5155. * API/JSCallbackFunction.h:
  5156. (JSCallbackFunction):
  5157. * API/JSWrapperMap.mm: Changed interface to tryUnwrapBlock.
  5158. (tryUnwrapObjcObject):
  5159. * API/ObjCCallbackFunction.h:
  5160. (ObjCCallbackFunction): Moved into the JSC namespace, just like JSCallbackFunction.
  5161. (JSC::ObjCCallbackFunction::createStructure): Overridden so that the correct ClassInfo gets used since we have
  5162. a destructor.
  5163. (JSC::ObjCCallbackFunction::impl): Getter for the internal impl.
  5164. * API/ObjCCallbackFunction.mm:
  5165. (JSC::ObjCCallbackFunctionImpl::ObjCCallbackFunctionImpl): What used to be ObjCCallbackFunction is now
  5166. ObjCCallbackFunctionImpl. It handles the Objective-C specific parts of managing callback functions.
  5167. (JSC::ObjCCallbackFunctionImpl::~ObjCCallbackFunctionImpl):
  5168. (JSC::objCCallbackFunctionCallAsFunction): Same as the old one, but now it casts to ObjCCallbackFunction and grabs the impl
  5169. rather than using JSObjectGetPrivate.
  5170. (JSC::ObjCCallbackFunction::ObjCCallbackFunction): New bits to allow being part of the JSCell hierarchy.
  5171. (JSC::ObjCCallbackFunction::create):
  5172. (JSC::ObjCCallbackFunction::destroy):
  5173. (JSC::ObjCCallbackFunctionImpl::call): Handles the actual invocation, just like it used to.
  5174. (objCCallbackFunctionForInvocation):
  5175. (tryUnwrapBlock): Changed to check the ClassInfo for inheritance directly, rather than going through the C API call.
  5176. * API/tests/testapi.mm: Added new test to make sure that doing Function.prototype.toString.call(f) won't result in
  5177. an error when f is an Objective-C method or block underneath the covers.
  5178. * runtime/JSGlobalObject.cpp: Added new Structure for ObjCCallbackFunction.
  5179. (JSC::JSGlobalObject::reset):
  5180. (JSC::JSGlobalObject::visitChildren):
  5181. * runtime/JSGlobalObject.h:
  5182. (JSGlobalObject):
  5183. (JSC::JSGlobalObject::objcCallbackFunctionStructure):
  5184. 2013-03-14 Mark Hahnenberg <mhahnenberg@apple.com>
  5185. Objective-C API: Nested dictionaries are not converted properly in the Objective-C binding
  5186. https://bugs.webkit.org/show_bug.cgi?id=112377
  5187. Reviewed by Oliver Hunt.
  5188. Accidental reassignment of the root task in the container conversion logic was causing the last
  5189. array or dictionary processed to be returned in the case of nested containers.
  5190. * API/JSValue.mm:
  5191. (containerValueToObject):
  5192. * API/tests/testapi.mm:
  5193. 2013-03-13 Filip Pizlo <fpizlo@apple.com>
  5194. JSObject fast by-string access optimizations should work even on the prototype chain, and even when the result is undefined
  5195. https://bugs.webkit.org/show_bug.cgi?id=112233
  5196. Reviewed by Oliver Hunt.
  5197. Extended the existing fast access path for String keys to work over the entire prototype chain,
  5198. not just the self access case. This will fail as soon as it sees an object that intercepts
  5199. getOwnPropertySlot, so this patch also ensures that ObjectPrototype does not fall into that
  5200. category. This is accomplished by making ObjectPrototype eagerly reify all of its properties.
  5201. This is safe for ObjectPrototype because it's so common and we expect all of its properties to
  5202. be reified for any interesting programs anyway. A new idiom for adding native functions to
  5203. prototypes is introduced, which ought to work well for any other prototypes that we wish to do
  5204. this conversion for.
  5205. This is a >60% speed-up in the case that you frequently do by-string lookups that "miss", i.e.
  5206. they don't turn up anything.
  5207. * CMakeLists.txt:
  5208. * DerivedSources.make:
  5209. * DerivedSources.pri:
  5210. * GNUmakefile.list.am:
  5211. * dfg/DFGOperations.cpp:
  5212. * interpreter/CallFrame.h:
  5213. (JSC::ExecState::objectConstructorTable):
  5214. * jit/JITStubs.cpp:
  5215. (JSC::getByVal):
  5216. * llint/LLIntSlowPaths.cpp:
  5217. (JSC::LLInt::getByVal):
  5218. * runtime/CommonIdentifiers.h:
  5219. * runtime/JSCell.cpp:
  5220. (JSC::JSCell::getByStringSlow):
  5221. (JSC):
  5222. * runtime/JSCell.h:
  5223. (JSCell):
  5224. * runtime/JSCellInlines.h:
  5225. (JSC):
  5226. (JSC::JSCell::getByStringAndKey):
  5227. (JSC::JSCell::getByString):
  5228. * runtime/JSGlobalData.cpp:
  5229. (JSC):
  5230. (JSC::JSGlobalData::JSGlobalData):
  5231. (JSC::JSGlobalData::~JSGlobalData):
  5232. * runtime/JSGlobalData.h:
  5233. (JSGlobalData):
  5234. * runtime/JSObject.cpp:
  5235. (JSC::JSObject::putDirectNativeFunction):
  5236. (JSC):
  5237. * runtime/JSObject.h:
  5238. (JSObject):
  5239. (JSC):
  5240. * runtime/Lookup.cpp:
  5241. (JSC::setUpStaticFunctionSlot):
  5242. * runtime/ObjectPrototype.cpp:
  5243. (JSC):
  5244. (JSC::ObjectPrototype::finishCreation):
  5245. (JSC::ObjectPrototype::create):
  5246. * runtime/ObjectPrototype.h:
  5247. (ObjectPrototype):
  5248. * runtime/PropertyMapHashTable.h:
  5249. (JSC::PropertyTable::findWithString):
  5250. * runtime/Structure.h:
  5251. (Structure):
  5252. * runtime/StructureInlines.h:
  5253. (JSC::Structure::get):
  5254. (JSC):
  5255. 2013-03-13 Filip Pizlo <fpizlo@apple.com>
  5256. DFG bytecode parser is too aggressive about getting rid of GetLocals on captured variables
  5257. https://bugs.webkit.org/show_bug.cgi?id=112287
  5258. <rdar://problem/13342340>
  5259. Reviewed by Oliver Hunt.
  5260. * bytecode/CodeBlock.cpp:
  5261. (JSC::CodeBlock::dumpBytecode):
  5262. (JSC::CodeBlock::finalizeUnconditionally):
  5263. * dfg/DFGByteCodeParser.cpp:
  5264. (JSC::DFG::ByteCodeParser::getLocal):
  5265. 2013-03-13 Ryosuke Niwa <rniwa@webkit.org>
  5266. Threaded HTML Parser is missing feature define flags in all but Chromium port's build files
  5267. https://bugs.webkit.org/show_bug.cgi?id=112277
  5268. Reviewed by Adam Barth.
  5269. * Configurations/FeatureDefines.xcconfig:
  5270. 2013-03-13 Csaba Osztrogonác <ossy@webkit.org>
  5271. LLINT C loop warning fix for GCC
  5272. https://bugs.webkit.org/show_bug.cgi?id=112145
  5273. Reviewed by Filip Pizlo.
  5274. * llint/LowLevelInterpreter.cpp:
  5275. (JSC::CLoop::execute):
  5276. 2013-02-13 Simon Hausmann <simon.hausmann@digia.com>
  5277. Add support for convenient conversion from JSStringRef to QString
  5278. https://bugs.webkit.org/show_bug.cgi?id=109694
  5279. Reviewed by Allan Sandfeld Jensen.
  5280. Add JSStringCopyQString helper function that allows for the convenient
  5281. extraction of a QString out of a JSStringRef.
  5282. * API/JSStringRefQt.cpp: Added.
  5283. (JSStringCopyQString):
  5284. * API/JSStringRefQt.h: Added.
  5285. * API/OpaqueJSString.h:
  5286. (OpaqueJSString):
  5287. (OpaqueJSString::qString):
  5288. (OpaqueJSString::OpaqueJSString):
  5289. * Target.pri:
  5290. 2013-03-13 Peter Gal <galpeter@inf.u-szeged.hu>
  5291. Token 'not' is ignored in the offlineasm.
  5292. https://bugs.webkit.org/show_bug.cgi?id=111568
  5293. Reviewed by Filip Pizlo.
  5294. * offlineasm/parser.rb: Build the Not AST node if the 'not' token is found.
  5295. 2013-03-12 Tim Horton <timothy_horton@apple.com>
  5296. WTF uses macros for exports. Try to fix the Windows build. Unreviewed.
  5297. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  5298. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  5299. 2013-03-12 Filip Pizlo <fpizlo@apple.com>
  5300. Array.prototype.sort should at least try to be PTIME even when the array is in some bizarre mode
  5301. https://bugs.webkit.org/show_bug.cgi?id=112187
  5302. <rdar://problem/13393550>
  5303. Reviewed by Michael Saboff and Gavin Barraclough.
  5304. If we have an array-like object in crazy mode passed into Array.prototype.sort, and its length is large,
  5305. then first copy all elements into a separate, compact, un-holy array and sort that. Then copy back.
  5306. This means that sorting will be at worst O(n^2) in the actual number of things in the array, rather than
  5307. O(n^2) in the array's length.
  5308. * runtime/ArrayPrototype.cpp:
  5309. (JSC::attemptFastSort):
  5310. (JSC::performSlowSort):
  5311. (JSC):
  5312. (JSC::arrayProtoFuncSort):
  5313. 2013-03-12 Tim Horton <timothy_horton@apple.com>
  5314. Try to fix the Windows build.
  5315. Not reviewed.
  5316. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  5317. 2013-03-12 Geoffrey Garen <ggaren@apple.com>
  5318. Try to fix the Windows build.
  5319. Not reviewed.
  5320. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  5321. Export a thing.
  5322. 2013-03-11 Oliver Hunt <oliver@apple.com>
  5323. Harden JSStringJoiner
  5324. https://bugs.webkit.org/show_bug.cgi?id=112093
  5325. Reviewed by Filip Pizlo.
  5326. Harden JSStringJoiner, make it use our CheckedArithmetic
  5327. class to simplify everything.
  5328. * runtime/JSStringJoiner.cpp:
  5329. (JSC::JSStringJoiner::build):
  5330. * runtime/JSStringJoiner.h:
  5331. (JSStringJoiner):
  5332. (JSC::JSStringJoiner::JSStringJoiner):
  5333. (JSC::JSStringJoiner::append):
  5334. 2013-03-12 Filip Pizlo <fpizlo@apple.com>
  5335. DFG generic array access cases should not be guarded by CheckStructure even of the profiling tells us that it could be
  5336. https://bugs.webkit.org/show_bug.cgi?id=112183
  5337. Reviewed by Oliver Hunt.
  5338. Slight speed-up on string-unpack-code.
  5339. * dfg/DFGFixupPhase.cpp:
  5340. (JSC::DFG::FixupPhase::findAndRemoveUnnecessaryStructureCheck):
  5341. (FixupPhase):
  5342. (JSC::DFG::FixupPhase::checkArray):
  5343. (JSC::DFG::FixupPhase::blessArrayOperation):
  5344. 2013-03-12 Gabor Rapcsanyi <rgabor@webkit.org>
  5345. https://bugs.webkit.org/show_bug.cgi?id=112141
  5346. LLInt CLoop backend misses Double2Ints() on 32bit architectures
  5347. Reviewed by Filip Pizlo.
  5348. Implement Double2Ints() in CLoop backend of LLInt on 32bit architectures.
  5349. * llint/LowLevelInterpreter.cpp:
  5350. (LLInt):
  5351. (JSC::LLInt::Double2Ints):
  5352. * offlineasm/cloop.rb:
  5353. 2013-03-12 Gabor Rapcsanyi <rgabor@webkit.org>
  5354. Making more sophisticated cache flush on ARM Linux platform
  5355. https://bugs.webkit.org/show_bug.cgi?id=111854
  5356. Reviewed by Zoltan Herczeg.
  5357. The cache flush on ARM Linux invalidates whole pages
  5358. instead of just the required area.
  5359. * assembler/ARMAssembler.h:
  5360. (ARMAssembler):
  5361. (JSC::ARMAssembler::linuxPageFlush):
  5362. (JSC::ARMAssembler::cacheFlush):
  5363. * assembler/ARMv7Assembler.h:
  5364. (ARMv7Assembler):
  5365. (JSC::ARMv7Assembler::linuxPageFlush):
  5366. (JSC::ARMv7Assembler::cacheFlush):
  5367. 2013-03-12 Gabor Rapcsanyi <rgabor@webkit.org>
  5368. Renaming the armv7.rb LLINT backend to arm.rb
  5369. https://bugs.webkit.org/show_bug.cgi?id=110565
  5370. Reviewed by Zoltan Herczeg.
  5371. This is the first step of a unified ARM backend for
  5372. all ARM 32 bit architectures in LLInt.
  5373. * CMakeLists.txt:
  5374. * GNUmakefile.list.am:
  5375. * JavaScriptCore.gypi:
  5376. * LLIntOffsetsExtractor.pro:
  5377. * offlineasm/arm.rb: Copied from Source/JavaScriptCore/offlineasm/armv7.rb.
  5378. * offlineasm/armv7.rb: Removed.
  5379. * offlineasm/backends.rb:
  5380. * offlineasm/risc.rb:
  5381. 2013-03-12 Csaba Osztrogonác <ossy@webkit.org>
  5382. REGRESSION(r145482): It broke 33 jsc tests and zillion layout tests on all platform
  5383. https://bugs.webkit.org/show_bug.cgi?id=112112
  5384. Reviewed by Oliver Hunt.
  5385. Rolling out https://trac.webkit.org/changeset/145482 to unbreak the bots.
  5386. * runtime/JSStringJoiner.cpp:
  5387. (JSC::JSStringJoiner::build):
  5388. * runtime/JSStringJoiner.h:
  5389. (JSStringJoiner):
  5390. (JSC::JSStringJoiner::JSStringJoiner):
  5391. (JSC::JSStringJoiner::append):
  5392. 2013-03-12 Filip Pizlo <fpizlo@apple.com>
  5393. DFG prediction propagation phase should not rerun forward propagation if double voting has already converged
  5394. https://bugs.webkit.org/show_bug.cgi?id=111920
  5395. Reviewed by Oliver Hunt.
  5396. I don't know why we weren't exiting early after double voting if !m_changed.
  5397. This change also removes backwards propagation from the voting fixpoint, since at that
  5398. point short-circuiting loops is probably not particularly profitable. Profiling shows
  5399. that this reduces the time spent in prediction propagation even further.
  5400. This change appears to be a 1% SunSpider speed-up.
  5401. * dfg/DFGPredictionPropagationPhase.cpp:
  5402. (JSC::DFG::PredictionPropagationPhase::run):
  5403. 2013-03-11 Filip Pizlo <fpizlo@apple.com>
  5404. DFG overflow check elimination is too smart for its own good
  5405. https://bugs.webkit.org/show_bug.cgi?id=111832
  5406. Reviewed by Oliver Hunt and Gavin Barraclough.
  5407. Rolling this back in after fixing accidental misuse of JSValue. The code was doing value < someInt
  5408. rather than value.asInt32() < someInt. This "worked" when isWithinPowerOfTwo wasn't templatized.
  5409. It worked by always being false and always disabling the relvant optimization.
  5410. This improves overflow check elimination in three ways:
  5411. 1) It reduces the amount of time the compiler will spend doing it.
  5412. 2) It fixes bugs where overflow check elimination was overzealous. Precisely, for a binary operation
  5413. over @a and @b where both @a and @b will type check that their inputs (@a->children, @b->children)
  5414. are int32's and then perform a possibly-overflowing operation, we must be careful not to assume
  5415. that @a's non-int32 parts don't matter if at the point that @a runs we have as yet not proved that
  5416. @b->children are int32's and that hence @b might produce a large enough result that doubles would
  5417. start chopping low bits. The specific implication of this is that for a binary operation to not
  5418. propagate that it cares about non-int32 parts (NodeUsedAsNumber), we must prove that at least one
  5419. of the inputs is guaranteed to produce a result within 2^32 and that there won't be a tower of such
  5420. operations large enough to ultimately produce a double greater than 2^52 (roughly). We achieve the
  5421. latter by disabling this optimization for very large basic blocks. It's noteworthy that blocks that
  5422. large won't even make it into the DFG currently.
  5423. 3) It makes the overflow check elimination more precise for cases where the inputs to an Add or Sub
  5424. are the outputs of a bit-op. For example in (@a + (@b | 0)) | 0, we don't need to propagate
  5425. NodeUsedAsNumber to either @a or @b.
  5426. This is neutral on V8v7 and a slight speed-up on compile time benchmarks.
  5427. * CMakeLists.txt:
  5428. * GNUmakefile.list.am:
  5429. * JavaScriptCore.xcodeproj/project.pbxproj:
  5430. * Target.pri:
  5431. * dfg/DFGArrayMode.cpp:
  5432. (JSC::DFG::ArrayMode::refine):
  5433. * dfg/DFGBackwardsPropagationPhase.cpp: Added.
  5434. (DFG):
  5435. (BackwardsPropagationPhase):
  5436. (JSC::DFG::BackwardsPropagationPhase::BackwardsPropagationPhase):
  5437. (JSC::DFG::BackwardsPropagationPhase::run):
  5438. (JSC::DFG::BackwardsPropagationPhase::isNotNegZero):
  5439. (JSC::DFG::BackwardsPropagationPhase::isNotZero):
  5440. (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwoForConstant):
  5441. (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwoNonRecursive):
  5442. (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwo):
  5443. (JSC::DFG::BackwardsPropagationPhase::mergeDefaultFlags):
  5444. (JSC::DFG::BackwardsPropagationPhase::propagate):
  5445. (JSC::DFG::performBackwardsPropagation):
  5446. * dfg/DFGBackwardsPropagationPhase.h: Added.
  5447. (DFG):
  5448. * dfg/DFGCPSRethreadingPhase.cpp:
  5449. (JSC::DFG::CPSRethreadingPhase::run):
  5450. (JSC::DFG::CPSRethreadingPhase::clearIsLoadedFrom):
  5451. (CPSRethreadingPhase):
  5452. (JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocalFor):
  5453. (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor):
  5454. * dfg/DFGDriver.cpp:
  5455. (JSC::DFG::compile):
  5456. * dfg/DFGGraph.cpp:
  5457. (JSC::DFG::Graph::dump):
  5458. * dfg/DFGNodeFlags.cpp:
  5459. (JSC::DFG::dumpNodeFlags):
  5460. (DFG):
  5461. * dfg/DFGNodeFlags.h:
  5462. (DFG):
  5463. * dfg/DFGPredictionPropagationPhase.cpp:
  5464. (PredictionPropagationPhase):
  5465. (JSC::DFG::PredictionPropagationPhase::propagate):
  5466. * dfg/DFGUnificationPhase.cpp:
  5467. (JSC::DFG::UnificationPhase::run):
  5468. * dfg/DFGVariableAccessData.h:
  5469. (JSC::DFG::VariableAccessData::VariableAccessData):
  5470. (JSC::DFG::VariableAccessData::mergeIsLoadedFrom):
  5471. (VariableAccessData):
  5472. (JSC::DFG::VariableAccessData::setIsLoadedFrom):
  5473. (JSC::DFG::VariableAccessData::isLoadedFrom):
  5474. 2013-03-11 Oliver Hunt <oliver@apple.com>
  5475. Harden JSStringJoiner
  5476. https://bugs.webkit.org/show_bug.cgi?id=112093
  5477. Reviewed by Filip Pizlo.
  5478. Harden JSStringJoiner, make it use our CheckedArithmetic
  5479. class to simplify everything.
  5480. * runtime/JSStringJoiner.cpp:
  5481. (JSC::JSStringJoiner::build):
  5482. * runtime/JSStringJoiner.h:
  5483. (JSStringJoiner):
  5484. (JSC::JSStringJoiner::JSStringJoiner):
  5485. (JSC::JSStringJoiner::append):
  5486. 2013-03-11 Michael Saboff <msaboff@apple.com>
  5487. Crash beneath operationCreateInlinedArguments running fast/js/dfg-create-inlined-arguments-in-closure-inline.html (32-bit only)
  5488. https://bugs.webkit.org/show_bug.cgi?id=112067
  5489. Reviewed by Geoffrey Garen.
  5490. We weren't setting the tag in SetCallee. Therefore set it to CellTag.
  5491. * dfg/DFGSpeculativeJIT32_64.cpp:
  5492. (JSC::DFG::SpeculativeJIT::compile):
  5493. 2013-03-11 Oliver Hunt <oliver@apple.com>
  5494. Make SegmentedVector Noncopyable
  5495. https://bugs.webkit.org/show_bug.cgi?id=112059
  5496. Reviewed by Geoffrey Garen.
  5497. Copying a SegmentedVector is very expensive, and really shouldn't
  5498. be necessary. So I've taken the one place where we currently copy
  5499. and replaced it with a regular Vector, and replaced the address
  5500. dependent logic with a indexing ref instead.
  5501. * bytecompiler/BytecodeGenerator.cpp:
  5502. (JSC::BytecodeGenerator::newLabelScope):
  5503. (JSC::BytecodeGenerator::emitComplexJumpScopes):
  5504. * bytecompiler/BytecodeGenerator.h:
  5505. (BytecodeGenerator):
  5506. * bytecompiler/LabelScope.h:
  5507. (JSC):
  5508. (JSC::LabelScopePtr::LabelScopePtr):
  5509. (LabelScopePtr):
  5510. (JSC::LabelScopePtr::operator=):
  5511. (JSC::LabelScopePtr::~LabelScopePtr):
  5512. (JSC::LabelScopePtr::operator*):
  5513. (JSC::LabelScopePtr::operator->):
  5514. * bytecompiler/NodesCodegen.cpp:
  5515. (JSC::DoWhileNode::emitBytecode):
  5516. (JSC::WhileNode::emitBytecode):
  5517. (JSC::ForNode::emitBytecode):
  5518. (JSC::ForInNode::emitBytecode):
  5519. (JSC::SwitchNode::emitBytecode):
  5520. (JSC::LabelNode::emitBytecode):
  5521. 2013-03-10 Andreas Kling <akling@apple.com>
  5522. SpeculativeJIT should use OwnPtr<SlowPathGenerator>.
  5523. <http://webkit.org/b/111942>
  5524. Reviewed by Anders Carlsson.
  5525. There's no need to include DFGSlowPathGenerator.h from the header as long as the destructor is out-of-line,
  5526. so let's use OwnPtr instead of raw pointers + deleteAllValues().
  5527. * dfg/DFGSpeculativeJIT.cpp:
  5528. (JSC::DFG::SpeculativeJIT::~SpeculativeJIT):
  5529. (JSC::DFG::SpeculativeJIT::addSlowPathGenerator):
  5530. * dfg/DFGSpeculativeJIT.h:
  5531. (SpeculativeJIT):
  5532. 2013-03-09 Sheriff Bot <webkit.review.bot@gmail.com>
  5533. Unreviewed, rolling out r145299.
  5534. http://trac.webkit.org/changeset/145299
  5535. https://bugs.webkit.org/show_bug.cgi?id=111928
  5536. compilation failure with recent clang
  5537. (DFGBackwardsPropagationPhase.cpp:132:35: error: comparison of
  5538. constant 10 with expression of type 'bool' is always false)
  5539. (Requested by thorton on #webkit).
  5540. * CMakeLists.txt:
  5541. * GNUmakefile.list.am:
  5542. * JavaScriptCore.xcodeproj/project.pbxproj:
  5543. * Target.pri:
  5544. * dfg/DFGArrayMode.cpp:
  5545. (JSC::DFG::ArrayMode::refine):
  5546. * dfg/DFGBackwardsPropagationPhase.cpp: Removed.
  5547. * dfg/DFGBackwardsPropagationPhase.h: Removed.
  5548. * dfg/DFGCPSRethreadingPhase.cpp:
  5549. (JSC::DFG::CPSRethreadingPhase::run):
  5550. (CPSRethreadingPhase):
  5551. (JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocalFor):
  5552. (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor):
  5553. * dfg/DFGDriver.cpp:
  5554. (JSC::DFG::compile):
  5555. * dfg/DFGGraph.cpp:
  5556. (JSC::DFG::Graph::dump):
  5557. * dfg/DFGNodeFlags.cpp:
  5558. (JSC::DFG::nodeFlagsAsString):
  5559. (DFG):
  5560. * dfg/DFGNodeFlags.h:
  5561. (DFG):
  5562. * dfg/DFGPredictionPropagationPhase.cpp:
  5563. (JSC::DFG::PredictionPropagationPhase::isNotNegZero):
  5564. (PredictionPropagationPhase):
  5565. (JSC::DFG::PredictionPropagationPhase::isNotZero):
  5566. (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoForConstant):
  5567. (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoNonRecursive):
  5568. (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwo):
  5569. (JSC::DFG::PredictionPropagationPhase::propagate):
  5570. (JSC::DFG::PredictionPropagationPhase::mergeDefaultFlags):
  5571. * dfg/DFGUnificationPhase.cpp:
  5572. (JSC::DFG::UnificationPhase::run):
  5573. * dfg/DFGVariableAccessData.h:
  5574. (JSC::DFG::VariableAccessData::VariableAccessData):
  5575. (VariableAccessData):
  5576. 2013-03-08 Filip Pizlo <fpizlo@apple.com>
  5577. DFG overflow check elimination is too smart for its own good
  5578. https://bugs.webkit.org/show_bug.cgi?id=111832
  5579. Reviewed by Oliver Hunt and Gavin Barraclough.
  5580. This improves overflow check elimination in three ways:
  5581. 1) It reduces the amount of time the compiler will spend doing it.
  5582. 2) It fixes bugs where overflow check elimination was overzealous. Precisely, for a binary operation
  5583. over @a and @b where both @a and @b will type check that their inputs (@a->children, @b->children)
  5584. are int32's and then perform a possibly-overflowing operation, we must be careful not to assume
  5585. that @a's non-int32 parts don't matter if at the point that @a runs we have as yet not proved that
  5586. @b->children are int32's and that hence @b might produce a large enough result that doubles would
  5587. start chopping low bits. The specific implication of this is that for a binary operation to not
  5588. propagate that it cares about non-int32 parts (NodeUsedAsNumber), we must prove that at least one
  5589. of the inputs is guaranteed to produce a result within 2^32 and that there won't be a tower of such
  5590. operations large enough to ultimately produce a double greater than 2^52 (roughly). We achieve the
  5591. latter by disabling this optimization for very large basic blocks. It's noteworthy that blocks that
  5592. large won't even make it into the DFG currently.
  5593. 3) It makes the overflow check elimination more precise for cases where the inputs to an Add or Sub
  5594. are the outputs of a bit-op. For example in (@a + (@b | 0)) | 0, we don't need to propagate
  5595. NodeUsedAsNumber to either @a or @b.
  5596. This is neutral on V8v7 and a slight speed-up on compile time benchmarks.
  5597. * CMakeLists.txt:
  5598. * GNUmakefile.list.am:
  5599. * JavaScriptCore.xcodeproj/project.pbxproj:
  5600. * Target.pri:
  5601. * dfg/DFGArrayMode.cpp:
  5602. (JSC::DFG::ArrayMode::refine):
  5603. * dfg/DFGBackwardsPropagationPhase.cpp: Added.
  5604. (DFG):
  5605. (BackwardsPropagationPhase):
  5606. (JSC::DFG::BackwardsPropagationPhase::BackwardsPropagationPhase):
  5607. (JSC::DFG::BackwardsPropagationPhase::run):
  5608. (JSC::DFG::BackwardsPropagationPhase::isNotNegZero):
  5609. (JSC::DFG::BackwardsPropagationPhase::isNotZero):
  5610. (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwoForConstant):
  5611. (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwoNonRecursive):
  5612. (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwo):
  5613. (JSC::DFG::BackwardsPropagationPhase::mergeDefaultFlags):
  5614. (JSC::DFG::BackwardsPropagationPhase::propagate):
  5615. (JSC::DFG::performBackwardsPropagation):
  5616. * dfg/DFGBackwardsPropagationPhase.h: Added.
  5617. (DFG):
  5618. * dfg/DFGCPSRethreadingPhase.cpp:
  5619. (JSC::DFG::CPSRethreadingPhase::run):
  5620. (JSC::DFG::CPSRethreadingPhase::clearIsLoadedFrom):
  5621. (CPSRethreadingPhase):
  5622. (JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocalFor):
  5623. (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor):
  5624. * dfg/DFGDriver.cpp:
  5625. (JSC::DFG::compile):
  5626. * dfg/DFGGraph.cpp:
  5627. (JSC::DFG::Graph::dump):
  5628. * dfg/DFGNodeFlags.cpp:
  5629. (JSC::DFG::dumpNodeFlags):
  5630. (DFG):
  5631. * dfg/DFGNodeFlags.h:
  5632. (DFG):
  5633. * dfg/DFGPredictionPropagationPhase.cpp:
  5634. (PredictionPropagationPhase):
  5635. (JSC::DFG::PredictionPropagationPhase::propagate):
  5636. * dfg/DFGUnificationPhase.cpp:
  5637. (JSC::DFG::UnificationPhase::run):
  5638. * dfg/DFGVariableAccessData.h:
  5639. (JSC::DFG::VariableAccessData::VariableAccessData):
  5640. (JSC::DFG::VariableAccessData::mergeIsLoadedFrom):
  5641. (VariableAccessData):
  5642. (JSC::DFG::VariableAccessData::setIsLoadedFrom):
  5643. (JSC::DFG::VariableAccessData::isLoadedFrom):
  5644. 2013-03-08 Roger Fong <roger_fong@apple.com>
  5645. Makefile fixes.
  5646. * JavaScriptCore.vcxproj/JavaScriptCore.make:
  5647. 2013-03-08 Gabor Rapcsanyi <rgabor@webkit.org>
  5648. Cache flush problem on ARMv7 JSC
  5649. https://bugs.webkit.org/show_bug.cgi?id=111441
  5650. Reviewed by Zoltan Herczeg.
  5651. Not proper cache flush causing random crashes on ARMv7 Linux with V8 tests.
  5652. The problem is similar to https://bugs.webkit.org/show_bug.cgi?id=77712.
  5653. Change the cache fulsh mechanism similar to ARM traditinal and revert the
  5654. temporary fix.
  5655. * assembler/ARMv7Assembler.h:
  5656. (JSC::ARMv7Assembler::cacheFlush):
  5657. 2013-03-07 Geoffrey Garen <ggaren@apple.com>
  5658. REGRESSION (r143759): 40% JSBench regression, 20% Octane/closure regression, 40% Octane/jquery regression, 2% Octane regression
  5659. https://bugs.webkit.org/show_bug.cgi?id=111797
  5660. Reviewed by Oliver Hunt.
  5661. The bot's testing configuration stresses the cache's starting guess
  5662. of 1MB.
  5663. This patch removes any starting guess, and just uses wall clock time
  5664. to discover the initial working set size of an app, in code size.
  5665. * runtime/CodeCache.cpp:
  5666. (JSC::CodeCacheMap::pruneSlowCase): Update our timer as we go.
  5667. Also fixed a bug where pruning from 0 to 0 would hang -- that case is
  5668. a possibility now that we start with a capacity of 0.
  5669. * runtime/CodeCache.h:
  5670. (CodeCacheMap):
  5671. (JSC::CodeCacheMap::CodeCacheMap):
  5672. (JSC::CodeCacheMap::add):
  5673. (JSC::CodeCacheMap::prune): Don't prune if we're in the middle of
  5674. discovering the working set size of an app, in code size.
  5675. 2013-03-07 Michael Saboff <msaboff@apple.com>
  5676. Crash when updating predictions below JSC::arrayProtoFuncForEach on tuaw.com article
  5677. https://bugs.webkit.org/show_bug.cgi?id=111777
  5678. Reviewed by Filip Pizlo.
  5679. Moved register allocations to be above any generated control flow so that any
  5680. resulting spill would be visible to all subsequently generated code.
  5681. * dfg/DFGSpeculativeJIT32_64.cpp:
  5682. (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
  5683. (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
  5684. (JSC::DFG::SpeculativeJIT::compile):
  5685. * dfg/DFGSpeculativeJIT64.cpp:
  5686. (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
  5687. (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
  5688. (JSC::DFG::SpeculativeJIT::compile):
  5689. 2013-03-07 Filip Pizlo <fpizlo@apple.com>
  5690. DFG should not get corrupted IR in the case of code that is dead, unreachable, and contains a chain of nodes that use each other in an untyped way
  5691. https://bugs.webkit.org/show_bug.cgi?id=111783
  5692. Reviewed by Mark Hahnenberg.
  5693. Unreachable code is not touched by CFA and so thinks that even untyped uses are checked.
  5694. But dead untyped uses don't need checks and hence don't need to be Phantom'd. The DCE knew
  5695. this in findTypeCheckRoot() but not in eliminateIrrelevantPhantomChildren(), leading to a
  5696. Phantom node that had another Phantom node as one of its kids.
  5697. * dfg/DFGDCEPhase.cpp:
  5698. (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren):
  5699. 2013-03-07 Filip Pizlo <fpizlo@apple.com>
  5700. The DFG fixpoint is not strictly profitable, and should be straight-lined
  5701. https://bugs.webkit.org/show_bug.cgi?id=111764
  5702. Reviewed by Oliver Hunt and Geoffrey Garen.
  5703. The DFG previously ran optimizations to fixpoint because there exists a circular dependency:
  5704. CSE depends on CFG simplification: CFG simplification merges blocks, and CSE is block-local.
  5705. CFG simplification depends on CFA and constant folding: constant folding reveals branches on
  5706. constants.
  5707. CFA depends on CSE: CSE reveals must-alias relationships by proving that two operations
  5708. always produce identical values.
  5709. Arguments simplification also depends on CSE, but it ought not depend on anything else.
  5710. Hence we get a cycle like: CFA -> folding -> CFG -> CSE -> CFA.
  5711. Note that before we had sparse conditional CFA, we also had CFA depending on CFG. This ought
  5712. not be the case anymore: CFG simplification should not by itself lead to better CFA results.
  5713. My guess is that the weakest link in this cycle is CFG -> CSE. CSE cuts both ways: if you
  5714. CSE too much then you increase register pressure. Hence it's not clear that you always want
  5715. to CSE after simplifying control flow. This leads to an order of optimization as follows:
  5716. CSE -> arguments -> CFA -> folding -> CFG
  5717. This is a 2.5% speed-up on SunSpider, a 4% speed-up on V8Spider, a possible 0.3% slow-down
  5718. on V8v7, nothing on Kraken, and 1.2% speed-up in the JSRegress geomean. I'll take a 2.5%
  5719. speed-up over a 0.3% V8v7 speed-up.
  5720. * dfg/DFGDriver.cpp:
  5721. (JSC::DFG::compile):
  5722. 2013-03-07 Roger Fong <roger_fong@apple.com>
  5723. Build fix for AppleWin VS2010.
  5724. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  5725. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
  5726. 2013-03-05 Mark Hahnenberg <mhahnenberg@apple.com>
  5727. Objective-C API: Need a good way to reference event handlers without causing cycles
  5728. https://bugs.webkit.org/show_bug.cgi?id=111088
  5729. Reviewed by Geoffrey Garen.
  5730. JSManagedValue is like a special kind of weak value. When you create a JSManagedValue, you can
  5731. supply an Objective-C object as its "owner". As long as the Objective-C owner object remains
  5732. alive and its wrapper remains accessible to the JSC garbage collector (e.g. by being marked by
  5733. the global object), the reference to the JavaScript value is strong. As soon as the Objective-C
  5734. owner is deallocated or its wrapper becomes inaccessible to the garbage collector, the reference
  5735. becomes weak.
  5736. If you do not supply an owner or you use the weakValueWithValue: convenience class method, the
  5737. returned JSManagedValue behaves as a normal weak reference.
  5738. This new class allows clients to maintain references to JavaScript values in the Objective-C
  5739. heap without creating reference cycles/leaking memory.
  5740. * API/JSAPIWrapperObject.cpp: Added.
  5741. (JSC):
  5742. (JSC::::createStructure):
  5743. (JSC::JSAPIWrapperObject::JSAPIWrapperObject): This is a special JSObject for the Objective-C API that knows
  5744. for the purposes of garbage collection/marking that it wraps an opaque Objective-C object.
  5745. (JSC::JSAPIWrapperObject::visitChildren): We add the pointer to the wrapped Objective-C object to the set of
  5746. opaque roots so that the weak handle owner for JSManagedValues can find it later.
  5747. * API/JSAPIWrapperObject.h: Added.
  5748. (JSC):
  5749. (JSAPIWrapperObject):
  5750. (JSC::JSAPIWrapperObject::wrappedObject):
  5751. (JSC::JSAPIWrapperObject::setWrappedObject):
  5752. * API/JSBase.cpp:
  5753. (JSSynchronousGarbageCollect):
  5754. * API/JSBasePrivate.h:
  5755. * API/JSCallbackObject.cpp:
  5756. (JSC):
  5757. * API/JSCallbackObject.h:
  5758. (JSC::JSCallbackObject::destroy): Moved this to the header so that we don't get link errors with JSAPIWrapperObject.
  5759. * API/JSContext.mm:
  5760. (-[JSContext initWithVirtualMachine:]): We weren't adding manually allocated/initialized JSVirtualMachine objects to
  5761. the global cache of virtual machines. The init methods handle this now rather than contextWithGlobalContextRef, since
  5762. not everyone is guaranteed to use the latter.
  5763. (-[JSContext initWithGlobalContextRef:]):
  5764. (+[JSContext contextWithGlobalContextRef:]):
  5765. * API/JSManagedValue.h: Added.
  5766. * API/JSManagedValue.mm: Added.
  5767. (JSManagedValueHandleOwner):
  5768. (managedValueHandleOwner):
  5769. (+[JSManagedValue weakValueWithValue:]):
  5770. (+[JSManagedValue managedValueWithValue:owner:]):
  5771. (-[JSManagedValue init]): We explicitly call the ARC entrypoints to initialize/get the weak owner field since we don't
  5772. use ARC when building our framework.
  5773. (-[JSManagedValue initWithValue:]):
  5774. (-[JSManagedValue initWithValue:owner:]):
  5775. (-[JSManagedValue dealloc]):
  5776. (-[JSManagedValue value]):
  5777. (-[JSManagedValue weakOwner]):
  5778. (JSManagedValueHandleOwner::isReachableFromOpaqueRoots): If the Objective-C owner is still alive (i.e. loading the weak field
  5779. returns non-nil) and that value was added to the set of opaque roots by the wrapper for that Objective-C owner, then the the
  5780. JSObject to which the JSManagedObject refers is still alive.
  5781. * API/JSObjectRef.cpp: We have to add explicit checks for the JSAPIWrapperObject, just like the other types of JSCallbackObjects.
  5782. (JSObjectGetPrivate):
  5783. (JSObjectSetPrivate):
  5784. (JSObjectGetPrivateProperty):
  5785. (JSObjectSetPrivateProperty):
  5786. (JSObjectDeletePrivateProperty):
  5787. * API/JSValue.mm:
  5788. (objectToValueWithoutCopy):
  5789. * API/JSValueRef.cpp:
  5790. (JSValueIsObjectOfClass):
  5791. * API/JSVirtualMachine.mm:
  5792. (-[JSVirtualMachine initWithContextGroupRef:]):
  5793. (+[JSVirtualMachine virtualMachineWithContextGroupRef:]):
  5794. * API/JSWrapperMap.mm:
  5795. (wrapperFinalize):
  5796. (makeWrapper): This is our own internal version of JSObjectMake which creates JSAPIWrapperObjects, the Obj-C API
  5797. version of JSCallbackObjects.
  5798. (createObjectWithCustomBrand):
  5799. (-[JSObjCClassInfo wrapperForObject:]):
  5800. (tryUnwrapObjcObject):
  5801. * API/JavaScriptCore.h:
  5802. * API/tests/testapi.mm: Added new tests for the strong and weak uses of JSManagedValue in the context of an
  5803. onclick handler for an Objective-C object inserted into a JSContext.
  5804. (-[TextXYZ setWeakOnclick:]):
  5805. (-[TextXYZ setOnclick:]):
  5806. (-[TextXYZ weakOnclick]):
  5807. (-[TextXYZ onclick]):
  5808. (-[TextXYZ click]):
  5809. * CMakeLists.txt: Various build system additions.
  5810. * GNUmakefile.list.am:
  5811. * JavaScriptCore.gypi:
  5812. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  5813. * JavaScriptCore.xcodeproj/project.pbxproj:
  5814. * runtime/JSGlobalObject.cpp: Added the new canonical Structure for the JSAPIWrapperObject class.
  5815. (JSC::JSGlobalObject::reset):
  5816. (JSC):
  5817. (JSC::JSGlobalObject::visitChildren):
  5818. * runtime/JSGlobalObject.h:
  5819. (JSGlobalObject):
  5820. (JSC::JSGlobalObject::objcWrapperObjectStructure):
  5821. 2013-03-06 Filip Pizlo <fpizlo@apple.com>
  5822. ConvertThis should be turned into Identity based on predictions in Fixup, rather than based on proofs in ConstantFolding
  5823. https://bugs.webkit.org/show_bug.cgi?id=111674
  5824. Reviewed by Oliver Hunt.
  5825. This gets rid of the speculated forms of ConvertThis in the backend, and has Fixup
  5826. convert them to either Identity(Object:@child) if the child is predicted object, or
  5827. Phantom(Other:@child) ; WeakJSConstant(global this object) if it's predicted Other.
  5828. The goal of this is to ensure that the optimization fixpoint doesn't create
  5829. Identity's, since doing so requires a rerun of CSE. So far this isn't a speed-up
  5830. but I'm hoping this will be a step towards reducing the need to rerun the fixpoint
  5831. so as to ultimately reduce compile times.
  5832. * dfg/DFGAbstractState.cpp:
  5833. (JSC::DFG::AbstractState::executeEffects):
  5834. * dfg/DFGAssemblyHelpers.h:
  5835. (AssemblyHelpers):
  5836. * dfg/DFGConstantFoldingPhase.cpp:
  5837. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  5838. * dfg/DFGFixupPhase.cpp:
  5839. (JSC::DFG::FixupPhase::fixupNode):
  5840. (FixupPhase):
  5841. (JSC::DFG::FixupPhase::observeUseKindOnNode):
  5842. (JSC::DFG::FixupPhase::setUseKindAndUnboxIfProfitable):
  5843. * dfg/DFGGraph.h:
  5844. (JSC::DFG::Graph::globalThisObjectFor):
  5845. (Graph):
  5846. * dfg/DFGNode.h:
  5847. (Node):
  5848. (JSC::DFG::Node::convertToIdentity):
  5849. (JSC::DFG::Node::convertToWeakConstant):
  5850. * dfg/DFGSpeculativeJIT32_64.cpp:
  5851. (JSC::DFG::SpeculativeJIT::compile):
  5852. * dfg/DFGSpeculativeJIT64.cpp:
  5853. (JSC::DFG::SpeculativeJIT::compile):
  5854. 2013-03-07 Peter Gal <galpeter@inf.u-szeged.hu>
  5855. Children method in LLINT AST Not class should return [@child]
  5856. https://bugs.webkit.org/show_bug.cgi?id=90740
  5857. Reviewed by Filip Pizlo.
  5858. * offlineasm/ast.rb: Fixed the return value of the children method in the Not AST class.
  5859. 2013-03-05 Oliver Hunt <oliver@apple.com>
  5860. Bring back eager resolution of function scoped variables
  5861. https://bugs.webkit.org/show_bug.cgi?id=111497
  5862. Reviewed by Geoffrey Garen.
  5863. This reverts the get/put_scoped_var part of the great non-local
  5864. variable resolution refactoring. This still leaves all the lazy
  5865. variable resolution logic as it's necessary for global property
  5866. resolution, and i don't want to make the patch bigger than it
  5867. already is.
  5868. * bytecode/CodeBlock.cpp:
  5869. (JSC::CodeBlock::dumpBytecode):
  5870. (JSC::CodeBlock::CodeBlock):
  5871. * bytecode/CodeBlock.h:
  5872. (CodeBlock):
  5873. * bytecode/Opcode.h:
  5874. (JSC):
  5875. (JSC::padOpcodeName):
  5876. * bytecode/UnlinkedCodeBlock.cpp:
  5877. (JSC::generateFunctionCodeBlock):
  5878. (JSC::UnlinkedFunctionExecutable::codeBlockFor):
  5879. (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
  5880. * bytecode/UnlinkedCodeBlock.h:
  5881. (JSC):
  5882. (UnlinkedFunctionExecutable):
  5883. (UnlinkedCodeBlock):
  5884. (JSC::UnlinkedCodeBlock::usesGlobalObject):
  5885. (JSC::UnlinkedCodeBlock::setGlobalObjectRegister):
  5886. (JSC::UnlinkedCodeBlock::globalObjectRegister):
  5887. * bytecompiler/BytecodeGenerator.cpp:
  5888. (JSC::ResolveResult::checkValidity):
  5889. (JSC::BytecodeGenerator::BytecodeGenerator):
  5890. (JSC::BytecodeGenerator::emitLoadGlobalObject):
  5891. (JSC):
  5892. (JSC::BytecodeGenerator::resolve):
  5893. (JSC::BytecodeGenerator::resolveConstDecl):
  5894. (JSC::BytecodeGenerator::emitResolve):
  5895. (JSC::BytecodeGenerator::emitResolveBase):
  5896. (JSC::BytecodeGenerator::emitResolveBaseForPut):
  5897. (JSC::BytecodeGenerator::emitResolveWithBaseForPut):
  5898. (JSC::BytecodeGenerator::emitResolveWithThis):
  5899. (JSC::BytecodeGenerator::emitGetStaticVar):
  5900. (JSC::BytecodeGenerator::emitPutStaticVar):
  5901. * bytecompiler/BytecodeGenerator.h:
  5902. (JSC::ResolveResult::lexicalResolve):
  5903. (JSC::ResolveResult::isStatic):
  5904. (JSC::ResolveResult::depth):
  5905. (JSC::ResolveResult::index):
  5906. (ResolveResult):
  5907. (JSC::ResolveResult::ResolveResult):
  5908. (BytecodeGenerator):
  5909. * bytecompiler/NodesCodegen.cpp:
  5910. (JSC::ResolveNode::isPure):
  5911. (JSC::FunctionCallResolveNode::emitBytecode):
  5912. (JSC::PostfixNode::emitResolve):
  5913. (JSC::TypeOfResolveNode::emitBytecode):
  5914. (JSC::PrefixNode::emitResolve):
  5915. (JSC::ReadModifyResolveNode::emitBytecode):
  5916. (JSC::AssignResolveNode::emitBytecode):
  5917. (JSC::ConstDeclNode::emitCodeSingle):
  5918. * dfg/DFGByteCodeParser.cpp:
  5919. (JSC::DFG::ByteCodeParser::parseBlock):
  5920. * dfg/DFGCapabilities.cpp:
  5921. (JSC::DFG::debugFail):
  5922. * dfg/DFGCapabilities.h:
  5923. (JSC::DFG::canCompileOpcode):
  5924. (JSC::DFG::canInlineOpcode):
  5925. * jit/JIT.cpp:
  5926. (JSC::JIT::privateCompileMainPass):
  5927. * jit/JIT.h:
  5928. (JIT):
  5929. * jit/JITPropertyAccess.cpp:
  5930. (JSC::JIT::emit_op_get_scoped_var):
  5931. (JSC):
  5932. (JSC::JIT::emit_op_put_scoped_var):
  5933. * jit/JITPropertyAccess32_64.cpp:
  5934. (JSC::JIT::emit_op_get_scoped_var):
  5935. (JSC):
  5936. (JSC::JIT::emit_op_put_scoped_var):
  5937. * llint/LowLevelInterpreter32_64.asm:
  5938. * llint/LowLevelInterpreter64.asm:
  5939. * runtime/CodeCache.cpp:
  5940. (JSC::CodeCache::getCodeBlock):
  5941. (JSC::CodeCache::getProgramCodeBlock):
  5942. (JSC::CodeCache::getEvalCodeBlock):
  5943. * runtime/CodeCache.h:
  5944. (JSC):
  5945. (CodeCache):
  5946. * runtime/Executable.cpp:
  5947. (JSC::EvalExecutable::compileInternal):
  5948. (JSC::FunctionExecutable::produceCodeBlockFor):
  5949. * runtime/JSGlobalObject.cpp:
  5950. (JSC::JSGlobalObject::createEvalCodeBlock):
  5951. * runtime/JSGlobalObject.h:
  5952. (JSGlobalObject):
  5953. * runtime/Options.cpp:
  5954. (JSC::Options::initialize):
  5955. 2013-03-06 Filip Pizlo <fpizlo@apple.com>
  5956. Unreviewed, roll out http://trac.webkit.org/changeset/144989
  5957. I think we want the assertion that I removed.
  5958. * dfg/DFGAbstractState.cpp:
  5959. (JSC::DFG::AbstractState::merge):
  5960. (JSC::DFG::AbstractState::mergeVariableBetweenBlocks):
  5961. * dfg/DFGAbstractState.h:
  5962. (AbstractState):
  5963. 2013-03-06 Filip Pizlo <fpizlo@apple.com>
  5964. DFG::AbstractState::merge() is still more complicated than it needs to be
  5965. https://bugs.webkit.org/show_bug.cgi?id=111619
  5966. Reviewed by Mark Hahnenberg.
  5967. This method is the one place where we still do some minimal amount of liveness pruning, but the style with
  5968. which it is written is awkward, and it makes an assertion about variablesAtTail that will be invalidated
  5969. by https://bugs.webkit.org/show_bug.cgi?id=111539.
  5970. * dfg/DFGAbstractState.cpp:
  5971. (JSC::DFG::AbstractState::merge):
  5972. (JSC::DFG::AbstractState::mergeVariableBetweenBlocks):
  5973. * dfg/DFGAbstractState.h:
  5974. (AbstractState):
  5975. 2013-03-06 Filip Pizlo <fpizlo@apple.com>
  5976. DFG should not run full CSE after the optimization fixpoint, since it really just wants store elimination
  5977. https://bugs.webkit.org/show_bug.cgi?id=111536
  5978. Reviewed by Oliver Hunt and Mark Hahnenberg.
  5979. The fixpoint will do aggressive load elimination and pure CSE. There's no need to do it after the fixpoint.
  5980. On the other hand, the fixpoint does not profit from doing store elimination (except for SetLocal/Flush).
  5981. Previously we had CSE do both, and had it avoid doing some store elimination during the fixpoint by querying
  5982. the fixpoint state. This changes CSE to be templated on mode - either NormalCSE or StoreElimination - so
  5983. that we explicitly put it into one of those modes depending on where we call it from. The goal is to reduce
  5984. time spent doing load elimination after the fixpoint, since that is just wasted cycles.
  5985. * dfg/DFGCSEPhase.cpp:
  5986. (JSC::DFG::CSEPhase::CSEPhase):
  5987. (JSC::DFG::CSEPhase::run):
  5988. (JSC::DFG::CSEPhase::performNodeCSE):
  5989. (JSC::DFG::CSEPhase::performBlockCSE):
  5990. (JSC::DFG::performCSE):
  5991. (DFG):
  5992. (JSC::DFG::performStoreElimination):
  5993. * dfg/DFGCSEPhase.h:
  5994. (DFG):
  5995. * dfg/DFGDriver.cpp:
  5996. (JSC::DFG::compile):
  5997. 2013-03-06 Andreas Kling <akling@apple.com>
  5998. Pack Structure members better.
  5999. <http://webkit.org/b/111593>
  6000. <rdar://problem/13359200>
  6001. Reviewed by Mark Hahnenberg.
  6002. Shrink Structure by 8 bytes (now at 104 bytes) on 64-bit by packing the members better.
  6003. * runtime/Structure.cpp:
  6004. (JSC::Structure::Structure):
  6005. * runtime/Structure.h:
  6006. (Structure):
  6007. 2013-03-06 Andreas Kling <akling@apple.com>
  6008. Unreviewed, fix Windows build after r144910.
  6009. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  6010. 2013-03-05 Filip Pizlo <fpizlo@apple.com>
  6011. DFG should not check if nodes are shouldGenerate prior to DCE
  6012. https://bugs.webkit.org/show_bug.cgi?id=111520
  6013. Reviewed by Geoffrey Garen.
  6014. All nodes are live before DCE. We don't need to check that they aren't, because they
  6015. definitely will be.
  6016. * dfg/DFGArgumentsSimplificationPhase.cpp:
  6017. (JSC::DFG::ArgumentsSimplificationPhase::run):
  6018. * dfg/DFGCFAPhase.cpp:
  6019. (JSC::DFG::CFAPhase::performBlockCFA):
  6020. * dfg/DFGCFGSimplificationPhase.cpp:
  6021. (JSC::DFG::CFGSimplificationPhase::keepOperandAlive):
  6022. * dfg/DFGCSEPhase.cpp:
  6023. (JSC::DFG::CSEPhase::pureCSE):
  6024. (JSC::DFG::CSEPhase::int32ToDoubleCSE):
  6025. (JSC::DFG::CSEPhase::constantCSE):
  6026. (JSC::DFG::CSEPhase::weakConstantCSE):
  6027. (JSC::DFG::CSEPhase::getCalleeLoadElimination):
  6028. (JSC::DFG::CSEPhase::getArrayLengthElimination):
  6029. (JSC::DFG::CSEPhase::globalVarLoadElimination):
  6030. (JSC::DFG::CSEPhase::scopedVarLoadElimination):
  6031. (JSC::DFG::CSEPhase::globalVarWatchpointElimination):
  6032. (JSC::DFG::CSEPhase::globalVarStoreElimination):
  6033. (JSC::DFG::CSEPhase::scopedVarStoreElimination):
  6034. (JSC::DFG::CSEPhase::getByValLoadElimination):
  6035. (JSC::DFG::CSEPhase::checkStructureElimination):
  6036. (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination):
  6037. (JSC::DFG::CSEPhase::putStructureStoreElimination):
  6038. (JSC::DFG::CSEPhase::getByOffsetLoadElimination):
  6039. (JSC::DFG::CSEPhase::putByOffsetStoreElimination):
  6040. (JSC::DFG::CSEPhase::getPropertyStorageLoadElimination):
  6041. (JSC::DFG::CSEPhase::checkArrayElimination):
  6042. (JSC::DFG::CSEPhase::getIndexedPropertyStorageLoadElimination):
  6043. (JSC::DFG::CSEPhase::getMyScopeLoadElimination):
  6044. (JSC::DFG::CSEPhase::getLocalLoadElimination):
  6045. (JSC::DFG::CSEPhase::setLocalStoreElimination):
  6046. (JSC::DFG::CSEPhase::performNodeCSE):
  6047. * dfg/DFGFixupPhase.cpp:
  6048. (JSC::DFG::FixupPhase::fixupNode):
  6049. (JSC::DFG::FixupPhase::fixupSetLocalsInBlock):
  6050. * dfg/DFGPredictionPropagationPhase.cpp:
  6051. (JSC::DFG::PredictionPropagationPhase::propagate):
  6052. * dfg/DFGStructureCheckHoistingPhase.cpp:
  6053. (JSC::DFG::StructureCheckHoistingPhase::run):
  6054. 2013-03-06 Csaba Osztrogonác <ossy@webkit.org>
  6055. Fix unused parameter warnings in ARM assembler
  6056. https://bugs.webkit.org/show_bug.cgi?id=111433
  6057. Reviewed by Kentaro Hara.
  6058. * assembler/ARMAssembler.h: Remove unreachable revertJump() after r143346.
  6059. * assembler/MacroAssemblerARM.h:
  6060. (JSC::MacroAssemblerARM::moveIntsToDouble): Remove unused scratch parameter instead of UNUSED_PARAM.
  6061. (JSC::MacroAssemblerARM::branchConvertDoubleToInt32): Remove unused fpTemp parameter.
  6062. (JSC::MacroAssemblerARM::revertJumpReplacementToPatchableBranchPtrWithPatch): Remove unused parameters.
  6063. 2013-03-06 Andreas Kling <akling@apple.com>
  6064. Unused Structure property tables waste 14MB on Membuster.
  6065. <http://webkit.org/b/110854>
  6066. <rdar://problem/13292104>
  6067. Reviewed by Geoffrey Garen.
  6068. Turn PropertyTable into a GC object and have Structure drop unpinned tables when marking.
  6069. 14 MB progression on Membuster3.
  6070. This time it should stick; I've been through all the tests with COLLECT_ON_EVERY_ALLOCATION.
  6071. The issue with the last version was that Structure::m_offset could be used uninitialized
  6072. when re-materializing a previously GC'd property table, causing some sanity checks to fail.
  6073. * CMakeLists.txt:
  6074. * GNUmakefile.list.am:
  6075. * JavaScriptCore.gypi:
  6076. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  6077. * JavaScriptCore.xcodeproj/project.pbxproj:
  6078. * Target.pri:
  6079. Added PropertyTable.cpp.
  6080. * runtime/PropertyTable.cpp: Added.
  6081. (JSC::PropertyTable::create):
  6082. (JSC::PropertyTable::clone):
  6083. (JSC::PropertyTable::PropertyTable):
  6084. (JSC::PropertyTable::destroy):
  6085. (JSC::PropertyTable::~PropertyTable):
  6086. (JSC::PropertyTable::visitChildren):
  6087. Moved marking of property table values here from Structure::visitChildren().
  6088. * runtime/WriteBarrier.h:
  6089. (JSC::WriteBarrierBase::get):
  6090. Move m_cell to a local before using it multiple times. This avoids a multiple-access race when
  6091. Structure::checkOffsetConsistency() is used in assertions on the main thread while a marking thread
  6092. zaps the property table.
  6093. * runtime/Structure.h:
  6094. (JSC::Structure::materializePropertyMapIfNecessary):
  6095. (JSC::Structure::materializePropertyMapIfNecessaryForPinning):
  6096. * runtime/StructureInlines.h:
  6097. (JSC::Structure::propertyTable):
  6098. Added a getter for the Structure's PropertyTable that ASSERTs GC currently isn't active.
  6099. Because GC can zap an unpinned property table at any time, it's not entirely safe to access it.
  6100. Renamed the variable itself to m_propertyTableUnsafe to force call sites into explaining themselves.
  6101. (JSC::Structure::putWillGrowOutOfLineStorage):
  6102. (JSC::Structure::checkOffsetConsistency):
  6103. Moved these out of Structure.h to break header dependency cycle between Structure/PropertyTable.
  6104. * runtime/Structure.cpp:
  6105. (JSC::Structure::visitChildren):
  6106. Null out m_propertyTable if the table is unpinned. This'll cause the table to get GC'd.
  6107. (JSC::Structure::takePropertyTableOrCloneIfPinned):
  6108. Added for setting up the property table in a new transition, this code is now shared between
  6109. addPropertyTransition() and nonPropertyTransition().
  6110. * runtime/JSGlobalData.h:
  6111. * runtime/JSGlobalData.cpp:
  6112. (JSC::JSGlobalData::JSGlobalData):
  6113. Add a global propertyTableStructure.
  6114. * runtime/PropertyMapHashTable.h:
  6115. (PropertyTable):
  6116. (JSC::PropertyTable::createStructure):
  6117. (JSC::PropertyTable::copy):
  6118. Make PropertyTable a GC object.
  6119. * runtime/Structure.cpp:
  6120. (JSC::Structure::dumpStatistics):
  6121. (JSC::Structure::materializePropertyMap):
  6122. (JSC::Structure::despecifyDictionaryFunction):
  6123. (JSC::Structure::addPropertyTransition):
  6124. (JSC::Structure::changePrototypeTransition):
  6125. (JSC::Structure::despecifyFunctionTransition):
  6126. (JSC::Structure::attributeChangeTransition):
  6127. (JSC::Structure::toDictionaryTransition):
  6128. (JSC::Structure::sealTransition):
  6129. (JSC::Structure::freezeTransition):
  6130. (JSC::Structure::preventExtensionsTransition):
  6131. (JSC::Structure::nonPropertyTransition):
  6132. (JSC::Structure::isSealed):
  6133. (JSC::Structure::isFrozen):
  6134. (JSC::Structure::flattenDictionaryStructure):
  6135. (JSC::Structure::pin):
  6136. (JSC::Structure::copyPropertyTable):
  6137. (JSC::Structure::copyPropertyTableForPinning):
  6138. (JSC::Structure::get):
  6139. (JSC::Structure::despecifyFunction):
  6140. (JSC::Structure::despecifyAllFunctions):
  6141. (JSC::Structure::putSpecificValue):
  6142. (JSC::Structure::remove):
  6143. (JSC::Structure::createPropertyMap):
  6144. (JSC::Structure::getPropertyNamesFromStructure):
  6145. (JSC::Structure::checkConsistency):
  6146. 2013-03-05 Filip Pizlo <fpizlo@apple.com>
  6147. Get rid of the invert argument to SpeculativeJIT::jumpSlowForUnwantedArrayMode
  6148. https://bugs.webkit.org/show_bug.cgi?id=105624
  6149. Reviewed by Oliver Hunt.
  6150. All callers pass invert = false, which is the default value of the argument. So, get
  6151. rid of the argument and fold away all code that checks it.
  6152. * dfg/DFGSpeculativeJIT.cpp:
  6153. (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
  6154. * dfg/DFGSpeculativeJIT.h:
  6155. (SpeculativeJIT):
  6156. 2013-03-05 Filip Pizlo <fpizlo@apple.com>
  6157. Unreviewed, fix an incorrect comment. The comment was a holdover from a work-in-progress version of this code.
  6158. * dfg/DFGDCEPhase.cpp:
  6159. (JSC::DFG::DCEPhase::run):
  6160. 2013-03-04 Filip Pizlo <fpizlo@apple.com>
  6161. DFG DCE might eliminate checks unsoundly
  6162. https://bugs.webkit.org/show_bug.cgi?id=109389
  6163. Reviewed by Oliver Hunt.
  6164. This gets rid of all eager reference counting, and does all dead code elimination
  6165. in one phase - the DCEPhase. This phase also sets up the node reference counts,
  6166. which are then used not just for DCE but also register allocation and stack slot
  6167. allocation.
  6168. Doing this required a number of surgical changes in places that previously relied
  6169. on always having liveness information. For example, the structure check hoisting
  6170. phase must now consult whether a VariableAccessData is profitable for unboxing to
  6171. make sure that it doesn't try to do hoisting on set SetLocals. The arguments
  6172. simplification phase employs its own light-weight liveness analysis. Both phases
  6173. previously just used reference counts.
  6174. The largest change is that now, dead nodes get turned into Phantoms. Those
  6175. Phantoms will retain those child edges that are not proven. This ensures that any
  6176. type checks performed by a dead node remain even after the node is killed. On the
  6177. other hand, this Phantom conversion means that we need special handling for
  6178. SetLocal. I decided to make the four forms of SetLocal explicit:
  6179. MovHint(@a, rK): Just indicates that node @a contains the value that would have
  6180. now been placed into virtual register rK. Does not actually cause @a to be
  6181. stored into rK. This would have previously been a dead SetLocal with @a
  6182. being live. MovHints are always dead.
  6183. ZombieHint(rK): Indicates that at this point, register rK will contain a dead
  6184. value and OSR should put Undefined into it. This would have previously been
  6185. a dead SetLocal with @a being dead also. ZombieHints are always dead.
  6186. MovHintAndCheck(@a, rK): Identical to MovHint except @a is also type checked,
  6187. according to whatever UseKind the edge to @a has. The type check is always a
  6188. forward exit. MovHintAndChecks are always live, since they are
  6189. NodeMustGenerate. Previously this would have been a dead SetLocal with a
  6190. live @a, and the check would have disappeared. This is one of the bugs that
  6191. this patch solves.
  6192. SetLocal(@a, rK): This still does exactly what it does now, if the SetLocal is
  6193. live.
  6194. Basically this patch makes it so that dead SetLocals eventually decay to MovHint,
  6195. ZombieHint, or MovHintAndCheck depending on the situation. If the child @a is
  6196. also dead, then you get a ZombieHint. If the child @a is live but the SetLocal
  6197. has a type check and @a's type hasn't been proven to have that type then you get
  6198. a MovHintAndCheck. Otherwise you get a MovHint.
  6199. This is performance neutral.
  6200. * CMakeLists.txt:
  6201. * GNUmakefile.list.am:
  6202. * JavaScriptCore.xcodeproj/project.pbxproj:
  6203. * Target.pri:
  6204. * dfg/DFGAbstractState.cpp:
  6205. (JSC::DFG::AbstractState::executeEffects):
  6206. (JSC::DFG::AbstractState::mergeStateAtTail):
  6207. * dfg/DFGArgumentsSimplificationPhase.cpp:
  6208. (JSC::DFG::ArgumentsSimplificationPhase::run):
  6209. (ArgumentsSimplificationPhase):
  6210. (JSC::DFG::ArgumentsSimplificationPhase::removeArgumentsReferencingPhantomChild):
  6211. * dfg/DFGBasicBlock.h:
  6212. (BasicBlock):
  6213. * dfg/DFGBasicBlockInlines.h:
  6214. (DFG):
  6215. * dfg/DFGByteCodeParser.cpp:
  6216. (JSC::DFG::ByteCodeParser::addToGraph):
  6217. (JSC::DFG::ByteCodeParser::insertPhiNode):
  6218. (JSC::DFG::ByteCodeParser::emitFunctionChecks):
  6219. * dfg/DFGCFAPhase.cpp:
  6220. (JSC::DFG::CFAPhase::run):
  6221. * dfg/DFGCFGSimplificationPhase.cpp:
  6222. (JSC::DFG::CFGSimplificationPhase::run):
  6223. (JSC::DFG::CFGSimplificationPhase::keepOperandAlive):
  6224. * dfg/DFGCPSRethreadingPhase.cpp:
  6225. (JSC::DFG::CPSRethreadingPhase::run):
  6226. (JSC::DFG::CPSRethreadingPhase::addPhiSilently):
  6227. * dfg/DFGCSEPhase.cpp:
  6228. (JSC::DFG::CSEPhase::eliminateIrrelevantPhantomChildren):
  6229. (JSC::DFG::CSEPhase::setReplacement):
  6230. (JSC::DFG::CSEPhase::performNodeCSE):
  6231. * dfg/DFGCommon.cpp:
  6232. (WTF::printInternal):
  6233. (WTF):
  6234. * dfg/DFGCommon.h:
  6235. (WTF):
  6236. * dfg/DFGConstantFoldingPhase.cpp:
  6237. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  6238. (JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck):
  6239. (JSC::DFG::ConstantFoldingPhase::paintUnreachableCode):
  6240. * dfg/DFGDCEPhase.cpp: Added.
  6241. (DFG):
  6242. (DCEPhase):
  6243. (JSC::DFG::DCEPhase::DCEPhase):
  6244. (JSC::DFG::DCEPhase::run):
  6245. (JSC::DFG::DCEPhase::findTypeCheckRoot):
  6246. (JSC::DFG::DCEPhase::countEdge):
  6247. (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren):
  6248. (JSC::DFG::performDCE):
  6249. * dfg/DFGDCEPhase.h: Added.
  6250. (DFG):
  6251. * dfg/DFGDriver.cpp:
  6252. (JSC::DFG::compile):
  6253. * dfg/DFGFixupPhase.cpp:
  6254. (JSC::DFG::FixupPhase::fixupNode):
  6255. (JSC::DFG::FixupPhase::checkArray):
  6256. (JSC::DFG::FixupPhase::blessArrayOperation):
  6257. (JSC::DFG::FixupPhase::fixIntEdge):
  6258. (JSC::DFG::FixupPhase::injectInt32ToDoubleNode):
  6259. (JSC::DFG::FixupPhase::truncateConstantToInt32):
  6260. * dfg/DFGGraph.cpp:
  6261. (JSC::DFG::Graph::Graph):
  6262. (JSC::DFG::Graph::dump):
  6263. (DFG):
  6264. * dfg/DFGGraph.h:
  6265. (JSC::DFG::Graph::changeChild):
  6266. (JSC::DFG::Graph::changeEdge):
  6267. (JSC::DFG::Graph::compareAndSwap):
  6268. (JSC::DFG::Graph::clearAndDerefChild):
  6269. (JSC::DFG::Graph::performSubstitution):
  6270. (JSC::DFG::Graph::performSubstitutionForEdge):
  6271. (Graph):
  6272. (JSC::DFG::Graph::substitute):
  6273. * dfg/DFGInsertionSet.h:
  6274. (InsertionSet):
  6275. * dfg/DFGNode.h:
  6276. (JSC::DFG::Node::Node):
  6277. (JSC::DFG::Node::convertToConstant):
  6278. (JSC::DFG::Node::convertToGetLocalUnlinked):
  6279. (JSC::DFG::Node::containsMovHint):
  6280. (Node):
  6281. (JSC::DFG::Node::hasVariableAccessData):
  6282. (JSC::DFG::Node::willHaveCodeGenOrOSR):
  6283. * dfg/DFGNodeType.h:
  6284. (DFG):
  6285. * dfg/DFGPredictionPropagationPhase.cpp:
  6286. (JSC::DFG::PredictionPropagationPhase::propagate):
  6287. * dfg/DFGSpeculativeJIT.cpp:
  6288. (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
  6289. (JSC::DFG::SpeculativeJIT::compileMovHint):
  6290. (JSC::DFG::SpeculativeJIT::compileMovHintAndCheck):
  6291. (DFG):
  6292. (JSC::DFG::SpeculativeJIT::compileInlineStart):
  6293. (JSC::DFG::SpeculativeJIT::compile):
  6294. * dfg/DFGSpeculativeJIT.h:
  6295. (SpeculativeJIT):
  6296. * dfg/DFGSpeculativeJIT32_64.cpp:
  6297. (JSC::DFG::SpeculativeJIT::compile):
  6298. * dfg/DFGSpeculativeJIT64.cpp:
  6299. (JSC::DFG::SpeculativeJIT::compile):
  6300. * dfg/DFGStructureCheckHoistingPhase.cpp:
  6301. (JSC::DFG::StructureCheckHoistingPhase::run):
  6302. (JSC::DFG::StructureCheckHoistingPhase::shouldConsiderForHoisting):
  6303. (StructureCheckHoistingPhase):
  6304. * dfg/DFGValidate.cpp:
  6305. (JSC::DFG::Validate::validate):
  6306. 2013-03-05 Mark Hahnenberg <mhahnenberg@apple.com>
  6307. Objective-C API: JSValue should implement init and return nil in exceptional cases
  6308. https://bugs.webkit.org/show_bug.cgi?id=111487
  6309. Reviewed by Darin Adler.
  6310. * API/JSValue.mm:
  6311. (-[JSValue init]): We return nil here because there is no way to get the instance into a coherent state
  6312. without a JSContext.
  6313. (-[JSValue initWithValue:inContext:]): Similarly, we should also return nil here if either of the arguments is 0.
  6314. 2013-03-05 Sheriff Bot <webkit.review.bot@gmail.com>
  6315. Unreviewed, rolling out r144708.
  6316. http://trac.webkit.org/changeset/144708
  6317. https://bugs.webkit.org/show_bug.cgi?id=111447
  6318. random assertion crashes in inspector tests on qt+mac bots
  6319. (Requested by kling on #webkit).
  6320. * CMakeLists.txt:
  6321. * GNUmakefile.list.am:
  6322. * JavaScriptCore.gypi:
  6323. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  6324. * JavaScriptCore.xcodeproj/project.pbxproj:
  6325. * Target.pri:
  6326. * runtime/JSGlobalData.cpp:
  6327. (JSC::JSGlobalData::JSGlobalData):
  6328. * runtime/JSGlobalData.h:
  6329. (JSGlobalData):
  6330. * runtime/PropertyMapHashTable.h:
  6331. (PropertyTable):
  6332. (JSC::PropertyTable::PropertyTable):
  6333. (JSC):
  6334. (JSC::PropertyTable::~PropertyTable):
  6335. (JSC::PropertyTable::copy):
  6336. * runtime/PropertyTable.cpp: Removed.
  6337. * runtime/Structure.cpp:
  6338. (JSC::Structure::dumpStatistics):
  6339. (JSC::Structure::materializePropertyMap):
  6340. (JSC::Structure::despecifyDictionaryFunction):
  6341. (JSC::Structure::addPropertyTransition):
  6342. (JSC::Structure::changePrototypeTransition):
  6343. (JSC::Structure::despecifyFunctionTransition):
  6344. (JSC::Structure::attributeChangeTransition):
  6345. (JSC::Structure::toDictionaryTransition):
  6346. (JSC::Structure::sealTransition):
  6347. (JSC::Structure::freezeTransition):
  6348. (JSC::Structure::preventExtensionsTransition):
  6349. (JSC::Structure::nonPropertyTransition):
  6350. (JSC::Structure::isSealed):
  6351. (JSC::Structure::isFrozen):
  6352. (JSC::Structure::flattenDictionaryStructure):
  6353. (JSC::Structure::pin):
  6354. (JSC::Structure::copyPropertyTable):
  6355. (JSC::Structure::copyPropertyTableForPinning):
  6356. (JSC::Structure::get):
  6357. (JSC::Structure::despecifyFunction):
  6358. (JSC::Structure::despecifyAllFunctions):
  6359. (JSC::Structure::putSpecificValue):
  6360. (JSC::Structure::remove):
  6361. (JSC::Structure::createPropertyMap):
  6362. (JSC::Structure::getPropertyNamesFromStructure):
  6363. (JSC::Structure::visitChildren):
  6364. (JSC::Structure::checkConsistency):
  6365. * runtime/Structure.h:
  6366. (JSC):
  6367. (JSC::Structure::putWillGrowOutOfLineStorage):
  6368. (JSC::Structure::materializePropertyMapIfNecessary):
  6369. (JSC::Structure::materializePropertyMapIfNecessaryForPinning):
  6370. (JSC::Structure::checkOffsetConsistency):
  6371. (Structure):
  6372. * runtime/StructureInlines.h:
  6373. (JSC::Structure::get):
  6374. * runtime/WriteBarrier.h:
  6375. (JSC::WriteBarrierBase::get):
  6376. 2013-03-05 David Kilzer <ddkilzer@apple.com>
  6377. BUILD FIX (r144698): Only enable SPEECH_SYNTHESIS for Mac
  6378. <http://webkit.org/b/106742>
  6379. Fixes the following build failures:
  6380. Undefined symbols for architecture i386:
  6381. "__ZTVN7WebCore25PlatformSpeechSynthesizerE", referenced from:
  6382. __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o
  6383. NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  6384. "__ZN7WebCore25PlatformSpeechSynthesizer19initializeVoiceListEv", referenced from:
  6385. __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o
  6386. ld: symbol(s) not found for architecture i386
  6387. * Configurations/FeatureDefines.xcconfig:
  6388. - Fix definition of ENABLE_ENCRYPTED_MEDIA_V2_macosx to match
  6389. other FeatureDefines.xcconfig files.
  6390. - Only set ENABLE_SPEECH_SYNTHESIS for the macosx platform.
  6391. 2013-03-04 Andreas Kling <akling@apple.com>
  6392. Unused Structure property tables waste 14MB on Membuster.
  6393. <http://webkit.org/b/110854>
  6394. <rdar://problem/13292104>
  6395. Reviewed by Geoffrey Garen.
  6396. Turn PropertyTable into a GC object and have Structure drop unpinned tables when marking.
  6397. 14 MB progression on Membuster3.
  6398. * CMakeLists.txt:
  6399. * GNUmakefile.list.am:
  6400. * JavaScriptCore.gypi:
  6401. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  6402. * JavaScriptCore.xcodeproj/project.pbxproj:
  6403. * Target.pri:
  6404. Added PropertyTable.cpp.
  6405. * runtime/PropertyTable.cpp: Added.
  6406. (JSC::PropertyTable::create):
  6407. (JSC::PropertyTable::clone):
  6408. (JSC::PropertyTable::PropertyTable):
  6409. (JSC::PropertyTable::destroy):
  6410. (JSC::PropertyTable::~PropertyTable):
  6411. (JSC::PropertyTable::visitChildren):
  6412. Moved marking of property table values here from Structure::visitChildren().
  6413. * runtime/WriteBarrier.h:
  6414. (JSC::WriteBarrierBase::get):
  6415. Move m_cell to a local before using it multiple times. This avoids a multiple-access race when
  6416. Structure::checkOffsetConsistency() is used in assertions on the main thread while a marking thread
  6417. zaps the property table.
  6418. * runtime/Structure.h:
  6419. (JSC::Structure::materializePropertyMapIfNecessary):
  6420. (JSC::Structure::materializePropertyMapIfNecessaryForPinning):
  6421. * runtime/StructureInlines.h:
  6422. (JSC::Structure::propertyTable):
  6423. Added a getter for the Structure's PropertyTable that ASSERTs GC currently isn't active.
  6424. Because GC can zap an unpinned property table at any time, it's not entirely safe to access it.
  6425. Renamed the variable itself to m_propertyTableUnsafe to force call sites into explaining themselves.
  6426. (JSC::Structure::putWillGrowOutOfLineStorage):
  6427. (JSC::Structure::checkOffsetConsistency):
  6428. Moved these out of Structure.h to break header dependency cycle between Structure/PropertyTable.
  6429. * runtime/Structure.cpp:
  6430. (JSC::Structure::visitChildren):
  6431. Null out m_propertyTable if the table is unpinned. This'll cause the table to get GC'd.
  6432. * runtime/JSGlobalData.h:
  6433. * runtime/JSGlobalData.cpp:
  6434. (JSC::JSGlobalData::JSGlobalData):
  6435. Add a global propertyTableStructure.
  6436. * runtime/PropertyMapHashTable.h:
  6437. (PropertyTable):
  6438. (JSC::PropertyTable::createStructure):
  6439. (JSC::PropertyTable::copy):
  6440. Make PropertyTable a GC object.
  6441. * runtime/Structure.cpp:
  6442. (JSC::Structure::dumpStatistics):
  6443. (JSC::Structure::materializePropertyMap):
  6444. (JSC::Structure::despecifyDictionaryFunction):
  6445. (JSC::Structure::addPropertyTransition):
  6446. (JSC::Structure::changePrototypeTransition):
  6447. (JSC::Structure::despecifyFunctionTransition):
  6448. (JSC::Structure::attributeChangeTransition):
  6449. (JSC::Structure::toDictionaryTransition):
  6450. (JSC::Structure::sealTransition):
  6451. (JSC::Structure::freezeTransition):
  6452. (JSC::Structure::preventExtensionsTransition):
  6453. (JSC::Structure::nonPropertyTransition):
  6454. (JSC::Structure::isSealed):
  6455. (JSC::Structure::isFrozen):
  6456. (JSC::Structure::flattenDictionaryStructure):
  6457. (JSC::Structure::pin):
  6458. (JSC::Structure::copyPropertyTable):
  6459. (JSC::Structure::copyPropertyTableForPinning):
  6460. (JSC::Structure::get):
  6461. (JSC::Structure::despecifyFunction):
  6462. (JSC::Structure::despecifyAllFunctions):
  6463. (JSC::Structure::putSpecificValue):
  6464. (JSC::Structure::remove):
  6465. (JSC::Structure::createPropertyMap):
  6466. (JSC::Structure::getPropertyNamesFromStructure):
  6467. (JSC::Structure::checkConsistency):
  6468. 2013-03-04 Chris Fleizach <cfleizach@apple.com>
  6469. Support WebSpeech - Speech Synthesis
  6470. https://bugs.webkit.org/show_bug.cgi?id=106742
  6471. Reviewed by Simon Fraser.
  6472. Enable speech synthesis for the Mac.
  6473. * Configurations/FeatureDefines.xcconfig:
  6474. 2013-03-04 Mark Hahnenberg <mhahnenberg@apple.com>
  6475. Remove contextInternalContext from JSContextInternal.h
  6476. https://bugs.webkit.org/show_bug.cgi?id=111356
  6477. Reviewed by Geoffrey Garen.
  6478. We don't need it any more since we have globalContextRef in JSContext.
  6479. * API/JSContext.mm:
  6480. * API/JSContextInternal.h:
  6481. * API/JSValue.mm:
  6482. (+[JSValue valueWithBool:inContext:]):
  6483. (+[JSValue valueWithDouble:inContext:]):
  6484. (+[JSValue valueWithInt32:inContext:]):
  6485. (+[JSValue valueWithUInt32:inContext:]):
  6486. (+[JSValue valueWithNewObjectInContext:]):
  6487. (+[JSValue valueWithNewArrayInContext:]):
  6488. (+[JSValue valueWithNewRegularExpressionFromPattern:flags:inContext:]):
  6489. (+[JSValue valueWithNewErrorFromMessage:inContext:]):
  6490. (+[JSValue valueWithNullInContext:]):
  6491. (+[JSValue valueWithUndefinedInContext:]):
  6492. (-[JSValue toBool]):
  6493. (-[JSValue toDouble]):
  6494. (-[JSValue toNumber]):
  6495. (-[JSValue toString]):
  6496. (-[JSValue toDate]):
  6497. (-[JSValue toArray]):
  6498. (-[JSValue toDictionary]):
  6499. (-[JSValue valueForProperty:]):
  6500. (-[JSValue setValue:forProperty:]):
  6501. (-[JSValue deleteProperty:]):
  6502. (-[JSValue hasProperty:]):
  6503. (-[JSValue valueAtIndex:]):
  6504. (-[JSValue setValue:atIndex:]):
  6505. (-[JSValue isUndefined]):
  6506. (-[JSValue isNull]):
  6507. (-[JSValue isBoolean]):
  6508. (-[JSValue isNumber]):
  6509. (-[JSValue isString]):
  6510. (-[JSValue isObject]):
  6511. (-[JSValue isEqualToObject:]):
  6512. (-[JSValue isEqualWithTypeCoercionToObject:]):
  6513. (-[JSValue isInstanceOf:]):
  6514. (-[JSValue callWithArguments:]):
  6515. (-[JSValue constructWithArguments:]):
  6516. (-[JSValue invokeMethod:withArguments:]):
  6517. (valueToObject):
  6518. (objectToValueWithoutCopy):
  6519. (objectToValue):
  6520. (-[JSValue initWithValue:inContext:]):
  6521. (-[JSValue dealloc]):
  6522. (-[JSValue description]):
  6523. * API/JSWrapperMap.mm:
  6524. (createObjectWithCustomBrand):
  6525. (-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]):
  6526. (-[JSObjCClassInfo wrapperForObject:]):
  6527. (-[JSWrapperMap jsWrapperForObject:]):
  6528. * API/ObjCCallbackFunction.mm:
  6529. (ObjCCallbackFunction::call):
  6530. (objCCallbackFunctionForInvocation):
  6531. 2013-03-04 Andreas Kling <akling@apple.com>
  6532. Add simple vector traits for JSC::Identifier.
  6533. <http://webkit.org/b/111323>
  6534. Reviewed by Geoffrey Garen.
  6535. Identifiers are really just Strings, giving them simple vector traits makes
  6536. Vector move them with memcpy() instead of churning the refcounts.
  6537. * runtime/Identifier.h:
  6538. (WTF):
  6539. 2013-03-04 Kunihiko Sakamoto <ksakamoto@chromium.org>
  6540. Add build flag for FontLoader
  6541. https://bugs.webkit.org/show_bug.cgi?id=111289
  6542. Reviewed by Benjamin Poulain.
  6543. Add ENABLE_FONT_LOAD_EVENTS build flag (disabled by default).
  6544. * Configurations/FeatureDefines.xcconfig:
  6545. 2013-03-03 Andreas Kling <akling@apple.com>
  6546. Shrink JSC::HashTable entries.
  6547. <http://webkit.org/b/111275>
  6548. <rdar://problem/13333511>
  6549. Reviewed by Anders Carlsson.
  6550. Move the Intrinsic value out of the function-specific part of the union,
  6551. and store it next to m_attributes. Reduces the size of HashEntry by 8 bytes.
  6552. 990 kB progression on Membuster3. (PTUS: 797 kB)
  6553. * runtime/Lookup.h:
  6554. (JSC::HashEntry::initialize):
  6555. (JSC::HashEntry::intrinsic):
  6556. (HashEntry):
  6557. 2013-03-01 David Kilzer <ddkilzer@apple.com>
  6558. BUILD FIX: testapi should link to Foundation, not CoreFoundation
  6559. * JavaScriptCore.xcodeproj/project.pbxproj: Change testapi to
  6560. link to Foundation.framework instead of CoreFoundation.framework
  6561. since it uses NS types.
  6562. 2013-03-01 Mark Hahnenberg <mhahnenberg@apple.com>
  6563. Objective-C API: Passing JS functions to Objective-C callbacks causes JSValue to leak
  6564. https://bugs.webkit.org/show_bug.cgi?id=107836
  6565. Reviewed by Oliver Hunt.
  6566. We've decided to remove support for this feature from the API because there's no way to automatically manage
  6567. the memory for clients in a satisfactory manner. Clients can still pass JS functions to Objective-C methods,
  6568. but the methods must accept plain JSValues instead of Objective-C blocks.
  6569. We now ignore functions that are part of a protocol that inherits from JSExport that accept blocks as arguments.
  6570. * API/JSBlockAdaptor.h: Removed.
  6571. * API/JSBlockAdaptor.mm: Removed.
  6572. * API/ObjCCallbackFunction.mm:
  6573. (ArgumentTypeDelegate::typeBlock): Return nil to signal that we want to ignore this function when copying it
  6574. to the object from the protocol.
  6575. * API/tests/testapi.mm: Added a test to make sure that we ignore methods declared as part of a JSExport-ed protocol
  6576. that have block arguments.
  6577. (-[TestObject bogusCallback:]):
  6578. * JavaScriptCore.gypi: Updated build files.
  6579. * JavaScriptCore.xcodeproj/project.pbxproj:
  6580. 2013-03-01 Filip Pizlo <fpizlo@apple.com>
  6581. DFG Branch(LogicalNot) peephole should not try to optimize and work-around the case where LogicalNot may be otherwise live
  6582. https://bugs.webkit.org/show_bug.cgi?id=111209
  6583. Reviewed by Oliver Hunt.
  6584. Even if it is then everything will work just fine. It's not necessary to check the ref count here.
  6585. * dfg/DFGFixupPhase.cpp:
  6586. (JSC::DFG::FixupPhase::fixupNode):
  6587. 2013-03-01 Filip Pizlo <fpizlo@apple.com>
  6588. DFG CSE phase shouldn't rely on ref count of nodes, since it doesn't have to
  6589. https://bugs.webkit.org/show_bug.cgi?id=111205
  6590. Reviewed by Oliver Hunt.
  6591. I don't understand the intuition behind setLocalStoreElimination() validating that the SetLocal's ref count
  6592. is 1. I believe this is a hold-over from when setLocalStoreElimination() would match one SetLocal to another,
  6593. and then try to eliminate the first SetLocal. But that's not how it works now. Now, setLocalStoreElimination()
  6594. is actually Flush elimination: it eliminates any Flush that anchors a SetLocal if it proves that every path
  6595. from the SetLocal to the Flush is devoid of operations that may observe the local. It doesn't actually kill
  6596. the SetLocal itself: if the SetLocal is live because of other things (other Flushes or GetLocals in other
  6597. basic blocks), then the SetLocal will naturally still be alive because th Flush was only keeping the SetLocal
  6598. alive by one count rather than being solely responsible for its liveness.
  6599. * dfg/DFGCSEPhase.cpp:
  6600. (JSC::DFG::CSEPhase::setLocalStoreElimination):
  6601. (JSC::DFG::CSEPhase::eliminate):
  6602. (JSC::DFG::CSEPhase::performNodeCSE):
  6603. 2013-03-01 Filip Pizlo <fpizlo@apple.com>
  6604. Rename MovHint to MovHintEvent so I can create a NodeType called MovHint
  6605. Rubber stamped by Mark Hahnenberg.
  6606. This is similar to the SetLocal/SetLocalEvent naming scheme, where SetLocal is the
  6607. NodeType and SetLocalEvent is the VariableEventKind.
  6608. * dfg/DFGVariableEvent.cpp:
  6609. (JSC::DFG::VariableEvent::dump):
  6610. * dfg/DFGVariableEvent.h:
  6611. (JSC::DFG::VariableEvent::movHint):
  6612. (JSC::DFG::VariableEvent::id):
  6613. (JSC::DFG::VariableEvent::operand):
  6614. (VariableEvent):
  6615. * dfg/DFGVariableEventStream.cpp:
  6616. (JSC::DFG::VariableEventStream::reconstruct):
  6617. 2013-03-01 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
  6618. [JSC] Fix sign comparison warning/error after r144340.
  6619. https://bugs.webkit.org/show_bug.cgi?id=111164
  6620. Reviewed by Mark Hahnenberg.
  6621. gcc (both 4.2.1 and 4.7.2) complain about comparing signed and
  6622. unsigned terms (clang accepts it just fine).
  6623. Work around that by casting the 1 to an uintptr_t as well.
  6624. * dfg/DFGEdge.h:
  6625. (JSC::DFG::Edge::makeWord):
  6626. 2013-02-28 Filip Pizlo <fpizlo@apple.com>
  6627. DFG CFA should not do liveness pruning
  6628. https://bugs.webkit.org/show_bug.cgi?id=111119
  6629. Reviewed by Mark Hahnenberg.
  6630. It adds complexity and probably buys nothing. Moreover, I'm transitioning to having
  6631. liveness only available at the bitter end of compilation, so this will stop working
  6632. after https://bugs.webkit.org/show_bug.cgi?id=109389 anyway.
  6633. * dfg/DFGAbstractState.cpp:
  6634. (JSC::DFG::AbstractState::initialize):
  6635. (JSC::DFG::AbstractState::mergeStateAtTail):
  6636. 2013-02-28 Filip Pizlo <fpizlo@apple.com>
  6637. Don't try to emit profiling if you don't have the DFG JIT.
  6638. Rubber stamped by Mark Hahnenberg.
  6639. * jit/JIT.h:
  6640. (JSC::JIT::shouldEmitProfiling):
  6641. 2013-02-28 Filip Pizlo <fpizlo@apple.com>
  6642. DFG Phantom node should be honest about the fact that it can exit
  6643. https://bugs.webkit.org/show_bug.cgi?id=111115
  6644. Reviewed by Mark Hahnenberg.
  6645. The chances of this having cause serious issues are low, since most clients of the
  6646. NodeDoesNotExit flag run after CFA and CFA updates this properly. But one possible
  6647. case of badness is if the ByteCodeParser inserted a Phantom with a type check in
  6648. between a LogicalNot and a Branch; then that peephole optimization in Fixup might
  6649. go slightly wrong.
  6650. * dfg/DFGNodeType.h:
  6651. (DFG):
  6652. 2013-02-28 Mark Hahnenberg <mhahnenberg@apple.com>
  6653. Add casts in DFGGPRInfo.h to suppress warnings
  6654. https://bugs.webkit.org/show_bug.cgi?id=111104
  6655. Reviewed by Filip Pizlo.
  6656. With certain flags on, we get compiler warnings on ARM. We should do the proper casts to make these warnings go away.
  6657. * dfg/DFGGPRInfo.h:
  6658. (JSC::DFG::GPRInfo::toIndex):
  6659. (JSC::DFG::GPRInfo::debugName):
  6660. 2013-02-28 Filip Pizlo <fpizlo@apple.com>
  6661. It should be easy to determine if a DFG node exits forward or backward when doing type checks
  6662. https://bugs.webkit.org/show_bug.cgi?id=111102
  6663. Reviewed by Mark Hahnenberg.
  6664. This adds a NodeExitsForward flag, which tells you the exit directionality of
  6665. type checks performed by the node. Even if you convert the node to a Phantom
  6666. and use the Edge UseKind for type checks, you'll still get the same exit
  6667. directionality that the original node would have wanted.
  6668. * dfg/DFGArgumentsSimplificationPhase.cpp:
  6669. (JSC::DFG::ArgumentsSimplificationPhase::run):
  6670. * dfg/DFGArrayifySlowPathGenerator.h:
  6671. (JSC::DFG::ArrayifySlowPathGenerator::ArrayifySlowPathGenerator):
  6672. * dfg/DFGCFGSimplificationPhase.cpp:
  6673. (JSC::DFG::CFGSimplificationPhase::run):
  6674. (JSC::DFG::CFGSimplificationPhase::mergeBlocks):
  6675. * dfg/DFGCPSRethreadingPhase.cpp:
  6676. (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor):
  6677. * dfg/DFGCSEPhase.cpp:
  6678. (JSC::DFG::CSEPhase::setReplacement):
  6679. (JSC::DFG::CSEPhase::eliminate):
  6680. (JSC::DFG::CSEPhase::performNodeCSE):
  6681. * dfg/DFGConstantFoldingPhase.cpp:
  6682. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  6683. * dfg/DFGFixupPhase.cpp:
  6684. (JSC::DFG::FixupPhase::checkArray):
  6685. * dfg/DFGNode.h:
  6686. (Node):
  6687. (JSC::DFG::Node::setOpAndDefaultNonExitFlags):
  6688. (JSC::DFG::Node::convertToPhantom):
  6689. * dfg/DFGNodeFlags.cpp:
  6690. (JSC::DFG::nodeFlagsAsString):
  6691. * dfg/DFGNodeFlags.h:
  6692. (DFG):
  6693. * dfg/DFGNodeType.h:
  6694. (DFG):
  6695. * dfg/DFGSpeculativeJIT.cpp:
  6696. (JSC::DFG::SpeculativeJIT::backwardSpeculationCheck):
  6697. (DFG):
  6698. (JSC::DFG::SpeculativeJIT::speculationCheck):
  6699. (JSC::DFG::SpeculativeJIT::speculationWatchpoint):
  6700. (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck):
  6701. (JSC::DFG::SpeculativeJIT::backwardTypeCheck):
  6702. (JSC::DFG::SpeculativeJIT::typeCheck):
  6703. (JSC::DFG::SpeculativeJIT::forwardTypeCheck):
  6704. (JSC::DFG::SpeculativeJIT::fillStorage):
  6705. (JSC::DFG::SpeculativeJIT::compile):
  6706. (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
  6707. (JSC::DFG::SpeculativeJIT::compileValueToInt32):
  6708. (JSC::DFG::SpeculativeJIT::compileInt32ToDouble):
  6709. * dfg/DFGSpeculativeJIT.h:
  6710. (SpeculativeJIT):
  6711. (JSC::DFG::SpeculateIntegerOperand::SpeculateIntegerOperand):
  6712. (JSC::DFG::SpeculateIntegerOperand::gpr):
  6713. (SpeculateIntegerOperand):
  6714. (JSC::DFG::SpeculateDoubleOperand::SpeculateDoubleOperand):
  6715. (JSC::DFG::SpeculateDoubleOperand::fpr):
  6716. (SpeculateDoubleOperand):
  6717. (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand):
  6718. (JSC::DFG::SpeculateCellOperand::gpr):
  6719. (SpeculateCellOperand):
  6720. (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand):
  6721. (JSC::DFG::SpeculateBooleanOperand::gpr):
  6722. (SpeculateBooleanOperand):
  6723. * dfg/DFGSpeculativeJIT32_64.cpp:
  6724. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  6725. (JSC::DFG::SpeculativeJIT::fillSpeculateInt):
  6726. (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict):
  6727. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  6728. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  6729. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  6730. (JSC::DFG::SpeculativeJIT::compile):
  6731. * dfg/DFGSpeculativeJIT64.cpp:
  6732. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  6733. (JSC::DFG::SpeculativeJIT::fillSpeculateInt):
  6734. (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict):
  6735. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  6736. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  6737. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  6738. (JSC::DFG::SpeculativeJIT::compile):
  6739. 2013-02-28 Filip Pizlo <fpizlo@apple.com>
  6740. CodeBlock::valueProfile() has a bogus assertion
  6741. https://bugs.webkit.org/show_bug.cgi?id=111106
  6742. <rdar://problem/13131427>
  6743. Reviewed by Mark Hahnenberg.
  6744. This was just a bad assertion: m_bytecodeOffset == -1 means that the value profile is constructed but not initialized.
  6745. ValueProfile constructs itself in a safe way; you can call any method you want on a constructed but not initialized
  6746. ValueProfile. CodeBlock first constructs all ValueProfiles (by growing the ValueProfile vector) and then initializes
  6747. their m_bytecodeOffset later. This is necessary because the initialization is linking bytecode instructions to their
  6748. ValueProfiles, so at that point we don't want the ValueProfile vector to resize, which implies that we want all of
  6749. them to already be constructed. A GC can happen during this phase, and the GC may want to walk all ValueProfiles.
  6750. This is safe, but one of the ValueProfile getters (CodeBlock::valueProfile()) was asserting that any value profile
  6751. you get has had its m_bytecodeOffset initialized. This need not be the case and nothing will go wrong if it isn't.
  6752. The solution is to remove the assertion, which I believe was put there to ensure that my m_valueProfiles refactoring
  6753. a long time ago was sound: it used to be that a ValueProfile with m_bytecodeOffset == -1 was an argument profile; now
  6754. all argument profiles are in m_argumentValueProfiles instead. I think it's safe to say that this refactoring was done
  6755. soundly since it was a long time ago. So we should kill the assertion - I don't see an easy way to make the assertion
  6756. sound with respect to the GC-during-CodeBlock-construction issue, and I don't believe that the assertion is buying us
  6757. anything at this point.
  6758. * bytecode/CodeBlock.h:
  6759. (JSC::CodeBlock::valueProfile):
  6760. 2013-02-27 Filip Pizlo <fpizlo@apple.com>
  6761. DFG CFA should leave behind information in Edge that says if the Edge's type check is proven to succeed
  6762. https://bugs.webkit.org/show_bug.cgi?id=110840
  6763. Reviewed by Mark Hahnenberg.
  6764. This doesn't add any observable functionality to the compiler, yet. But it does give
  6765. every phase that runs after CFA the ability to know, in O(1) time, whether an edge
  6766. will need to execute a type check.
  6767. * dfg/DFGAbstractState.h:
  6768. (JSC::DFG::AbstractState::filterEdgeByUse):
  6769. (JSC::DFG::AbstractState::filterByType):
  6770. * dfg/DFGCommon.cpp:
  6771. (WTF):
  6772. (WTF::printInternal):
  6773. * dfg/DFGCommon.h:
  6774. (JSC::DFG::isProved):
  6775. (DFG):
  6776. (JSC::DFG::proofStatusForIsProved):
  6777. (WTF):
  6778. * dfg/DFGEdge.cpp:
  6779. (JSC::DFG::Edge::dump):
  6780. * dfg/DFGEdge.h:
  6781. (JSC::DFG::Edge::Edge):
  6782. (JSC::DFG::Edge::setNode):
  6783. (JSC::DFG::Edge::useKindUnchecked):
  6784. (JSC::DFG::Edge::setUseKind):
  6785. (Edge):
  6786. (JSC::DFG::Edge::proofStatusUnchecked):
  6787. (JSC::DFG::Edge::proofStatus):
  6788. (JSC::DFG::Edge::setProofStatus):
  6789. (JSC::DFG::Edge::isProved):
  6790. (JSC::DFG::Edge::needsCheck):
  6791. (JSC::DFG::Edge::shift):
  6792. (JSC::DFG::Edge::makeWord):
  6793. 2013-02-28 Simon Hausmann <simon.hausmann@digia.com>
  6794. [Qt][Mac] Fix massive parallel builds
  6795. Reviewed by Tor Arne Vestbø.
  6796. There exists a race condition that LLIntDesiredOffsets.h is written to
  6797. by two parllel instances of the ruby script. This patch ensures that similar to the output file,
  6798. the generated file is also prefixed according to the build configuration.
  6799. * LLIntOffsetsExtractor.pro:
  6800. 2013-02-27 Sheriff Bot <webkit.review.bot@gmail.com>
  6801. Unreviewed, rolling out r144168.
  6802. http://trac.webkit.org/changeset/144168
  6803. https://bugs.webkit.org/show_bug.cgi?id=111019
  6804. It broke the build and tronical is unavailable (Requested by
  6805. Ossy_night on #webkit).
  6806. * LLIntOffsetsExtractor.pro:
  6807. 2013-02-26 Filip Pizlo <fpizlo@apple.com>
  6808. Disable some unsound DFG DCE
  6809. https://bugs.webkit.org/show_bug.cgi?id=110948
  6810. Reviewed by Michael Saboff.
  6811. DCE of bitops is not sound since the bitops might call some variant of valueOf.
  6812. This used to work right because ValueToInt32 was MustGenerate. From the DFG IR
  6813. standpoint it feels weird to make ValueToInt32 be MustGenerate since that node is
  6814. implemented entirely as a pure conversion. If we ever gave the DFG the ability to
  6815. do effectful bitops, we would most likely implement them as special nodes not
  6816. related to the ValueToInt32 and bitop nodes we have now.
  6817. This change is performance neutral.
  6818. * dfg/DFGNodeType.h:
  6819. (DFG):
  6820. 2013-02-27 Glenn Adams <glenn@skynav.com>
  6821. Add ENABLE_CSS3_TEXT_LINE_BREAK flag.
  6822. https://bugs.webkit.org/show_bug.cgi?id=110944
  6823. Reviewed by Dean Jackson.
  6824. * Configurations/FeatureDefines.xcconfig:
  6825. 2013-02-27 Julien Brianceau <jbrianceau@nds.com>
  6826. Fix build when DFG_JIT is not enabled
  6827. https://bugs.webkit.org/show_bug.cgi?id=110991
  6828. Reviewed by Csaba Osztrogonác.
  6829. * jit/JIT.h:
  6830. (JSC::JIT::canBeOptimizedOrInlined):
  6831. 2013-02-27 Simon Hausmann <simon.hausmann@digia.com>
  6832. [Qt][Mac] Fix massive parallel builds
  6833. Reviewed by Tor Arne Vestbø.
  6834. There exists a race condition that LLIntDesiredOffsets.h is written to
  6835. by two parllel instances of the ruby script. This patch ensures that similar to the output file,
  6836. the generated file is also prefixed according to the build configuration.
  6837. * LLIntOffsetsExtractor.pro:
  6838. 2013-02-26 Filip Pizlo <fpizlo@apple.com>
  6839. DFG OSR exit doesn't know which virtual register to use for the last result register for post_inc and post_dec
  6840. https://bugs.webkit.org/show_bug.cgi?id=109036
  6841. <rdar://problem/13292139>
  6842. Reviewed by Gavin Barraclough.
  6843. This was a two-fold problem:
  6844. 1) post_inc/dec has two results - the new value of the variable, and the old value of the variable. DFG OSR exit
  6845. assumed that the "last result" used for the Baseline JIT's register allocation would be the new value. It was
  6846. wrong in this assumption.
  6847. 2) The Baseline JIT knew to disable its last result optimization in cases where it might confuse the DFG. But it
  6848. was doing this only for code blocks that could be totally optimized, but not code blocks that could only be
  6849. optimized when inlined.
  6850. This patch introduces a more rigorous notion of when the Baseline JIT emits profiling, when it does extra work
  6851. to account for the possibility of OSR exit, and when it does extra work to account for the possibility of OSR
  6852. entry. These notions are called shouldEmitProfiling(), canBeOptimizedOrInlined(), and canBeOptimized(),
  6853. respectively.
  6854. This is performance-neutral and fixes the reported bug. It probably fixes other bugs as well, since previously
  6855. we for example weren't doing the more conservative implementation of op_mov in the Baseline JIT for code blocks
  6856. that could be inlined but not optimized. So, if such a code block OSR exited at just the right point, you'd get
  6857. symptoms similar to this bug.
  6858. * dfg/DFGCapabilities.h:
  6859. (JSC::DFG::canCompileOpcode):
  6860. * dfg/DFGCommon.h:
  6861. * jit/JIT.cpp:
  6862. (JSC::JIT::privateCompile):
  6863. * jit/JIT.h:
  6864. (JSC::JIT::compilePatchGetArrayLength):
  6865. (JSC::JIT::canBeOptimizedOrInlined):
  6866. (JIT):
  6867. * jit/JITArithmetic.cpp:
  6868. (JSC::JIT::emit_op_post_inc):
  6869. (JSC::JIT::emit_op_post_dec):
  6870. * jit/JITArithmetic32_64.cpp:
  6871. (JSC::JIT::emit_op_post_inc):
  6872. (JSC::JIT::emit_op_post_dec):
  6873. * jit/JITCall.cpp:
  6874. (JSC::JIT::emit_op_call_put_result):
  6875. (JSC::JIT::compileOpCall):
  6876. * jit/JITCall32_64.cpp:
  6877. (JSC::JIT::compileOpCall):
  6878. * jit/JITInlines.h:
  6879. (JSC::JIT::emitArrayProfilingSite):
  6880. (JSC::JIT::map):
  6881. * jit/JITOpcodes.cpp:
  6882. (JSC::JIT::emit_op_mov):
  6883. * jit/JITPropertyAccess.cpp:
  6884. (JSC::JIT::compileGetByIdHotPath):
  6885. (JSC::JIT::privateCompilePutByIdTransition):
  6886. * jit/JITPropertyAccess32_64.cpp:
  6887. (JSC::JIT::compileGetByIdHotPath):
  6888. (JSC::JIT::privateCompilePutByIdTransition):
  6889. 2013-02-26 Roger Fong <roger_fong@apple.com>
  6890. Unreviewed. AppleWin VS2010 build fix.
  6891. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  6892. 2013-02-25 Filip Pizlo <fpizlo@apple.com>
  6893. The DFG backend's and OSR's decision to unbox a variable should be based on whether it's used in a typed context
  6894. https://bugs.webkit.org/show_bug.cgi?id=110433
  6895. Reviewed by Oliver Hunt and Mark Hahnenberg.
  6896. This introduces the equivalent of a liveness analysis, except for type checking.
  6897. A variable is said to be "profitable for unboxing" (i.e. live at a type check)
  6898. if there exists a type check on a GetLocal of that variable, and the type check
  6899. is consistent with the variable's prediction. Variables that are not profitable
  6900. for unboxing aren't unboxed. Previously they would have been.
  6901. This is a slight speed-up on some things but mostly neutral.
  6902. * dfg/DFGArgumentPosition.h:
  6903. (JSC::DFG::ArgumentPosition::ArgumentPosition):
  6904. (JSC::DFG::ArgumentPosition::mergeShouldNeverUnbox):
  6905. (JSC::DFG::ArgumentPosition::mergeArgumentPredictionAwareness):
  6906. (JSC::DFG::ArgumentPosition::mergeArgumentUnboxingAwareness):
  6907. (ArgumentPosition):
  6908. (JSC::DFG::ArgumentPosition::isProfitableToUnbox):
  6909. (JSC::DFG::ArgumentPosition::shouldUseDoubleFormat):
  6910. * dfg/DFGCommon.h:
  6911. (JSC::DFG::checkAndSet):
  6912. (DFG):
  6913. * dfg/DFGFixupPhase.cpp:
  6914. (JSC::DFG::FixupPhase::run):
  6915. (JSC::DFG::FixupPhase::fixupNode):
  6916. (JSC::DFG::FixupPhase::fixupSetLocalsInBlock):
  6917. (FixupPhase):
  6918. (JSC::DFG::FixupPhase::alwaysUnboxSimplePrimitives):
  6919. (JSC::DFG::FixupPhase::setUseKindAndUnboxIfProfitable):
  6920. * dfg/DFGPredictionPropagationPhase.cpp:
  6921. (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting):
  6922. * dfg/DFGSpeculativeJIT.cpp:
  6923. (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
  6924. * dfg/DFGVariableAccessData.h:
  6925. (JSC::DFG::VariableAccessData::VariableAccessData):
  6926. (JSC::DFG::VariableAccessData::mergeIsCaptured):
  6927. (JSC::DFG::VariableAccessData::mergeIsProfitableToUnbox):
  6928. (VariableAccessData):
  6929. (JSC::DFG::VariableAccessData::isProfitableToUnbox):
  6930. (JSC::DFG::VariableAccessData::shouldUnboxIfPossible):
  6931. (JSC::DFG::VariableAccessData::mergeStructureCheckHoistingFailed):
  6932. (JSC::DFG::VariableAccessData::mergeIsArgumentsAlias):
  6933. (JSC::DFG::VariableAccessData::shouldUseDoubleFormat):
  6934. (JSC::DFG::VariableAccessData::mergeFlags):
  6935. 2013-02-26 Oliver Hunt <oliver@apple.com>
  6936. Fix windows build.
  6937. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  6938. 2013-02-26 Oliver Hunt <oliver@apple.com>
  6939. Web Inspector: REGRESSION: [JSC] SourceProvider reuses IDs
  6940. https://bugs.webkit.org/show_bug.cgi?id=99674
  6941. Reviewed by Gavin Barraclough.
  6942. Simple incrementing counter for SourceProvider IDs. Uses a
  6943. lock to incrementing the counter so we don't increment reuse
  6944. counter values or reassign the ID for a given SourceProvider.
  6945. * parser/SourceProvider.cpp:
  6946. (JSC::SourceProvider::SourceProvider):
  6947. (JSC):
  6948. (JSC::SourceProvider::getID):
  6949. * parser/SourceProvider.h:
  6950. (JSC::SourceProvider::asID):
  6951. (SourceProvider):
  6952. 2013-02-26 Sheriff Bot <webkit.review.bot@gmail.com>
  6953. Unreviewed, rolling out r144074.
  6954. http://trac.webkit.org/changeset/144074
  6955. https://bugs.webkit.org/show_bug.cgi?id=110897
  6956. Causing 20+ crashes on Mac (Requested by bradee-oh on
  6957. #webkit).
  6958. * CMakeLists.txt:
  6959. * GNUmakefile.list.am:
  6960. * JavaScriptCore.gypi:
  6961. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  6962. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  6963. * JavaScriptCore.xcodeproj/project.pbxproj:
  6964. * Target.pri:
  6965. * runtime/JSGlobalData.cpp:
  6966. (JSC::JSGlobalData::JSGlobalData):
  6967. * runtime/JSGlobalData.h:
  6968. (JSGlobalData):
  6969. * runtime/PropertyMapHashTable.h:
  6970. (PropertyTable):
  6971. (JSC::PropertyTable::PropertyTable):
  6972. (JSC):
  6973. (JSC::PropertyTable::~PropertyTable):
  6974. (JSC::PropertyTable::copy):
  6975. * runtime/PropertyTable.cpp: Removed.
  6976. * runtime/Structure.cpp:
  6977. (JSC::Structure::materializePropertyMap):
  6978. (JSC::Structure::addPropertyTransition):
  6979. (JSC::Structure::changePrototypeTransition):
  6980. (JSC::Structure::despecifyFunctionTransition):
  6981. (JSC::Structure::attributeChangeTransition):
  6982. (JSC::Structure::toDictionaryTransition):
  6983. (JSC::Structure::preventExtensionsTransition):
  6984. (JSC::Structure::nonPropertyTransition):
  6985. (JSC::Structure::copyPropertyTable):
  6986. (JSC::Structure::copyPropertyTableForPinning):
  6987. (JSC::Structure::putSpecificValue):
  6988. (JSC::Structure::createPropertyMap):
  6989. (JSC::Structure::visitChildren):
  6990. * runtime/Structure.h:
  6991. (JSC):
  6992. (JSC::Structure::putWillGrowOutOfLineStorage):
  6993. (JSC::Structure::checkOffsetConsistency):
  6994. (Structure):
  6995. * runtime/StructureInlines.h:
  6996. 2013-02-26 Roger Fong <roger_fong@apple.com>
  6997. Unreviewed. AppleWin VS2010 build fix.
  6998. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props:
  6999. 2013-02-26 Jer Noble <jer.noble@apple.com>
  7000. Unreviewed build fix; use correct macro for platform name in FeatureDefines.xcconfig.
  7001. * Configurations/FeatureDefines.xcconfig:
  7002. 2013-02-26 Michael Saboff <msaboff@apple.com>
  7003. Potential crash in YARR JIT generated code when building 64 bit
  7004. https://bugs.webkit.org/show_bug.cgi?id=110893
  7005. Reviewed by Gavin Barraclough.
  7006. The ABI doesn't define the behavior for the upper bits of a value that takes less than 64 bits.
  7007. Therefore, we zero extend both the count and length registers to assure that these unsigned values
  7008. don't have garbage upper bits.
  7009. * yarr/YarrJIT.cpp:
  7010. (JSC::Yarr::YarrGenerator::generateEnter):
  7011. 2013-02-26 Andreas Kling <akling@apple.com>
  7012. Unused Structure property tables waste 14MB on Membuster.
  7013. <http://webkit.org/b/110854>
  7014. <rdar://problem/13292104>
  7015. Reviewed by Filip Pizlo.
  7016. Turn PropertyTable into a GC object and have Structure drop unpinned tables when marking.
  7017. 14 MB progression on Membuster3.
  7018. * CMakeLists.txt:
  7019. * GNUmakefile.list.am:
  7020. * JavaScriptCore.gypi:
  7021. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  7022. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  7023. * JavaScriptCore.xcodeproj/project.pbxproj:
  7024. * Target.pri:
  7025. Added PropertyTable.cpp.
  7026. * runtime/PropertyTable.cpp: Added.
  7027. (JSC::PropertyTable::create):
  7028. (JSC::PropertyTable::clone):
  7029. (JSC::PropertyTable::PropertyTable):
  7030. (JSC::PropertyTable::destroy):
  7031. (JSC::PropertyTable::~PropertyTable):
  7032. (JSC::PropertyTable::visitChildren):
  7033. Moved marking of property table values here from Structure::visitChildren().
  7034. * runtime/StructureInlines.h:
  7035. (JSC::Structure::putWillGrowOutOfLineStorage):
  7036. (JSC::Structure::checkOffsetConsistency):
  7037. Moved these to StructureInlines.h to break header dependency cycle between Structure/PropertyTable.
  7038. * runtime/Structure.cpp:
  7039. (JSC::Structure::visitChildren):
  7040. Null out m_propertyTable if the table is unpinned. This'll cause the table to get GC'd.
  7041. (JSC::Structure::materializePropertyMap):
  7042. (JSC::Structure::addPropertyTransition):
  7043. (JSC::Structure::changePrototypeTransition):
  7044. (JSC::Structure::despecifyFunctionTransition):
  7045. (JSC::Structure::attributeChangeTransition):
  7046. (JSC::Structure::toDictionaryTransition):
  7047. (JSC::Structure::preventExtensionsTransition):
  7048. (JSC::Structure::nonPropertyTransition):
  7049. (JSC::Structure::copyPropertyTable):
  7050. (JSC::Structure::copyPropertyTableForPinning):
  7051. (JSC::Structure::putSpecificValue):
  7052. (JSC::Structure::createPropertyMap):
  7053. * runtime/Structure.h:
  7054. (Structure):
  7055. * runtime/JSGlobalData.cpp:
  7056. (JSC::JSGlobalData::JSGlobalData):
  7057. * runtime/JSGlobalData.h:
  7058. (JSGlobalData):
  7059. * runtime/PropertyMapHashTable.h:
  7060. (PropertyTable):
  7061. (JSC::PropertyTable::createStructure):
  7062. (JSC::PropertyTable::copy):
  7063. 2013-02-26 Andreas Kling <akling@apple.com>
  7064. Unreviewed, rolling out r144054.
  7065. http://trac.webkit.org/changeset/144054
  7066. https://bugs.webkit.org/show_bug.cgi?id=110854
  7067. broke builds
  7068. * CMakeLists.txt:
  7069. * GNUmakefile.list.am:
  7070. * JavaScriptCore.gypi:
  7071. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  7072. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  7073. * JavaScriptCore.xcodeproj/project.pbxproj:
  7074. * Target.pri:
  7075. * runtime/JSGlobalData.cpp:
  7076. (JSC::JSGlobalData::JSGlobalData):
  7077. * runtime/JSGlobalData.h:
  7078. (JSGlobalData):
  7079. * runtime/PropertyMapHashTable.h:
  7080. (PropertyTable):
  7081. (JSC::PropertyTable::PropertyTable):
  7082. (JSC):
  7083. (JSC::PropertyTable::~PropertyTable):
  7084. (JSC::PropertyTable::copy):
  7085. * runtime/PropertyTable.cpp: Removed.
  7086. * runtime/Structure.cpp:
  7087. (JSC::Structure::materializePropertyMap):
  7088. (JSC::Structure::addPropertyTransition):
  7089. (JSC::Structure::changePrototypeTransition):
  7090. (JSC::Structure::despecifyFunctionTransition):
  7091. (JSC::Structure::attributeChangeTransition):
  7092. (JSC::Structure::toDictionaryTransition):
  7093. (JSC::Structure::preventExtensionsTransition):
  7094. (JSC::Structure::nonPropertyTransition):
  7095. (JSC::Structure::copyPropertyTable):
  7096. (JSC::Structure::copyPropertyTableForPinning):
  7097. (JSC::Structure::putSpecificValue):
  7098. (JSC::Structure::createPropertyMap):
  7099. (JSC::Structure::visitChildren):
  7100. * runtime/Structure.h:
  7101. (JSC):
  7102. (JSC::Structure::putWillGrowOutOfLineStorage):
  7103. (JSC::Structure::checkOffsetConsistency):
  7104. (Structure):
  7105. * runtime/StructureInlines.h:
  7106. 2013-02-26 Andreas Kling <akling@apple.com>
  7107. Unused Structure property tables waste 14MB on Membuster.
  7108. <http://webkit.org/b/110854>
  7109. <rdar://problem/13292104>
  7110. Reviewed by Filip Pizlo.
  7111. Turn PropertyTable into a GC object and have Structure drop unpinned tables when marking.
  7112. 14 MB progression on Membuster3.
  7113. * CMakeLists.txt:
  7114. * GNUmakefile.list.am:
  7115. * JavaScriptCore.gypi:
  7116. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  7117. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  7118. * JavaScriptCore.xcodeproj/project.pbxproj:
  7119. * Target.pri:
  7120. Added PropertyTable.cpp.
  7121. * runtime/PropertyTable.cpp: Added.
  7122. (JSC::PropertyTable::create):
  7123. (JSC::PropertyTable::clone):
  7124. (JSC::PropertyTable::PropertyTable):
  7125. (JSC::PropertyTable::destroy):
  7126. (JSC::PropertyTable::~PropertyTable):
  7127. (JSC::PropertyTable::visitChildren):
  7128. Moved marking of property table values here from Structure::visitChildren().
  7129. * runtime/StructureInlines.h:
  7130. (JSC::Structure::putWillGrowOutOfLineStorage):
  7131. (JSC::Structure::checkOffsetConsistency):
  7132. Moved these to StructureInlines.h to break header dependency cycle between Structure/PropertyTable.
  7133. * runtime/Structure.cpp:
  7134. (JSC::Structure::visitChildren):
  7135. Null out m_propertyTable if the table is unpinned. This'll cause the table to get GC'd.
  7136. (JSC::Structure::materializePropertyMap):
  7137. (JSC::Structure::addPropertyTransition):
  7138. (JSC::Structure::changePrototypeTransition):
  7139. (JSC::Structure::despecifyFunctionTransition):
  7140. (JSC::Structure::attributeChangeTransition):
  7141. (JSC::Structure::toDictionaryTransition):
  7142. (JSC::Structure::preventExtensionsTransition):
  7143. (JSC::Structure::nonPropertyTransition):
  7144. (JSC::Structure::copyPropertyTable):
  7145. (JSC::Structure::copyPropertyTableForPinning):
  7146. (JSC::Structure::putSpecificValue):
  7147. (JSC::Structure::createPropertyMap):
  7148. * runtime/Structure.h:
  7149. (Structure):
  7150. * runtime/JSGlobalData.cpp:
  7151. (JSC::JSGlobalData::JSGlobalData):
  7152. * runtime/JSGlobalData.h:
  7153. (JSGlobalData):
  7154. * runtime/PropertyMapHashTable.h:
  7155. (PropertyTable):
  7156. (JSC::PropertyTable::createStructure):
  7157. (JSC::PropertyTable::copy):
  7158. 2013-02-26 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
  7159. Implement JIT on Windows 64 bits
  7160. https://bugs.webkit.org/show_bug.cgi?id=107965
  7161. Reviewed by Simon Hausmann.
  7162. 1. MSVC doesn't support inline assembly for 64 bits, implements the trampoline in a separate ASM file.
  7163. 2. Windows 64 bits has a different calling convention than other OSes following the AMD64 ABI.
  7164. Differences that we have to handle here:
  7165. - Registers passed parameters are RCX, RDX, R8 and R9 instead of RDI, RSI, RDX, RCX, R8 and R9
  7166. - RDI and RSI must be preserved by callee
  7167. - Only return values <= 8 bytes can be returned by register (RDX can't be used to return a second word)
  7168. - There is no red-zone after RIP on the stack, but instead 4 reserved words before it
  7169. * Target.pri:
  7170. * jit/JITStubs.cpp:
  7171. * jit/JITStubs.h:
  7172. (JSC):
  7173. (JITStackFrame):
  7174. (JSC::JITStackFrame::returnAddressSlot):
  7175. * jit/JITStubsMSVC64.asm: Added.
  7176. * jit/JSInterfaceJIT.h:
  7177. (JSInterfaceJIT):
  7178. * jit/ThunkGenerators.cpp:
  7179. (JSC::nativeForGenerator):
  7180. * yarr/YarrJIT.cpp:
  7181. (YarrGenerator):
  7182. (JSC::Yarr::YarrGenerator::generateEnter):
  7183. (JSC::Yarr::YarrGenerator::generateReturn):
  7184. 2013-02-26 Oliver Hunt <oliver@apple.com>
  7185. Kill another analyzer warning in javascriptcore
  7186. https://bugs.webkit.org/show_bug.cgi?id=110802
  7187. Reviewed by Benjamin Poulain.
  7188. Add null checks.
  7189. * profiler/LegacyProfiler.cpp:
  7190. (JSC::LegacyProfiler::startProfiling):
  7191. (JSC::LegacyProfiler::stopProfiling):
  7192. 2013-02-26 Sheriff Bot <webkit.review.bot@gmail.com>
  7193. Unreviewed, rolling out r144004.
  7194. http://trac.webkit.org/changeset/144004
  7195. https://bugs.webkit.org/show_bug.cgi?id=110858
  7196. This iOS change is outdated (Requested by notbenjamin on
  7197. #webkit).
  7198. * bytecompiler/BytecodeGenerator.cpp:
  7199. (JSC::BytecodeGenerator::BytecodeGenerator):
  7200. * bytecompiler/BytecodeGenerator.h:
  7201. (JSC::BytecodeGenerator::emitNode):
  7202. (JSC::BytecodeGenerator::emitNodeInConditionContext):
  7203. (BytecodeGenerator):
  7204. * parser/Parser.cpp:
  7205. (JSC::::Parser):
  7206. * parser/Parser.h:
  7207. (JSC::Parser::canRecurse):
  7208. (Parser):
  7209. 2013-02-25 Filip Pizlo <fpizlo@apple.com>
  7210. REGRESSION(r143654): some jquery test asserts on 32 bit debug build
  7211. https://bugs.webkit.org/show_bug.cgi?id=110756
  7212. Reviewed by Geoffrey Garen.
  7213. TypeOf does speculations manually, so it should mark its JSValueOperand as doing ManualOperandSpeculation.
  7214. * dfg/DFGSpeculativeJIT32_64.cpp:
  7215. (JSC::DFG::SpeculativeJIT::compile):
  7216. 2013-02-25 Benjamin Poulain <bpoulain@apple.com>
  7217. [JSC] Upstream iOS Stack bound checking
  7218. https://bugs.webkit.org/show_bug.cgi?id=110813
  7219. Reviewed by Filip Pizlo.
  7220. On iOS, the StackBounds cannot be cached because the stack
  7221. can be in one of two threads (the web thread or the UI thread).
  7222. We simply always consider the current stack bound when testing
  7223. stack boundaries.
  7224. * bytecompiler/BytecodeGenerator.cpp:
  7225. (JSC::BytecodeGenerator::BytecodeGenerator):
  7226. * bytecompiler/BytecodeGenerator.h:
  7227. (JSC::BytecodeGenerator::emitNode):
  7228. (JSC::BytecodeGenerator::emitNodeInConditionContext):
  7229. (BytecodeGenerator):
  7230. * parser/Parser.cpp:
  7231. (JSC::::Parser):
  7232. * parser/Parser.h:
  7233. (JSC::Parser::canRecurse):
  7234. (Parser):
  7235. 2013-02-25 Michael Saboff <msaboff@apple.com>
  7236. For JSVALUE32_64, maxOffsetRelativeToPatchedStorage() doesn't compute the maximum negative offset
  7237. https://bugs.webkit.org/show_bug.cgi?id=110828
  7238. Reviewed by Oliver Hunt.
  7239. * runtime/JSObject.h:
  7240. (JSC::maxOffsetRelativeToPatchedStorage): Only add the OBJECT_OFFSETOF(tag) for positive offsets.
  7241. That way this function will return the offset farthest from 0 needed to access either the payload
  7242. or tag.
  7243. 2013-02-25 Jeffrey Pfau <jpfau@apple.com>
  7244. Optionally partition cache to prevent using cache for tracking
  7245. https://bugs.webkit.org/show_bug.cgi?id=110269
  7246. Reviewed by Maciej Stachowiak.
  7247. * Configurations/FeatureDefines.xcconfig: Add defines for cache partitioning and public suffix list usage
  7248. 2013-02-25 Roger Fong <roger_fong@apple.com>
  7249. Unreviewed. VS2010 solution build fix.
  7250. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props:
  7251. 2013-02-24 Filip Pizlo <fpizlo@apple.com>
  7252. DFG::Edge should have more bits for UseKind, and DFG::Allocator should be simpler
  7253. https://bugs.webkit.org/show_bug.cgi?id=110722
  7254. Reviewed by Oliver Hunt.
  7255. This rolls out the DFG::Allocator part of http://trac.webkit.org/changeset/143654,
  7256. and changes Edge to have more room for UseKinds and possibly other things.
  7257. This is performance-neutral on both 32-bit and 64-bit. It reduces the size of
  7258. DFG::Node on 64-bit (by virtue of getting rid of the 16-byte alignment of Node)
  7259. and increases it slightly on 32-bit (by 4 bytes total - 16-byte alignment led to
  7260. 80 bytes, but the base size of Node plus the 12 bytes of new m_encodedWords in
  7261. Edge gets 84 bytes). But, it will mean that we don't have to increase Node by
  7262. another 16 bytes if we ever want to add more UseKinds or other things to Edge.
  7263. * dfg/DFGAllocator.h:
  7264. (DFG):
  7265. (Allocator):
  7266. (JSC::DFG::Allocator::Region::headerSize):
  7267. (JSC::DFG::Allocator::Region::numberOfThingsPerRegion):
  7268. (JSC::DFG::Allocator::Region::data):
  7269. (JSC::DFG::Allocator::Region::isInThisRegion):
  7270. (JSC::DFG::::Allocator):
  7271. (JSC::DFG::::~Allocator):
  7272. (JSC::DFG::::allocate):
  7273. (JSC::DFG::::free):
  7274. (JSC::DFG::::freeAll):
  7275. (JSC::DFG::::reset):
  7276. (JSC::DFG::::indexOf):
  7277. (JSC::DFG::::allocatorOf):
  7278. (JSC::DFG::::bumpAllocate):
  7279. (JSC::DFG::::freeListAllocate):
  7280. (JSC::DFG::::allocateSlow):
  7281. (JSC::DFG::::freeRegionsStartingAt):
  7282. (JSC::DFG::::startBumpingIn):
  7283. * dfg/DFGEdge.h:
  7284. (JSC::DFG::Edge::Edge):
  7285. (Edge):
  7286. (JSC::DFG::Edge::node):
  7287. (JSC::DFG::Edge::setNode):
  7288. (JSC::DFG::Edge::useKindUnchecked):
  7289. (JSC::DFG::Edge::setUseKind):
  7290. (JSC::DFG::Edge::operator==):
  7291. (JSC::DFG::Edge::operator!=):
  7292. (JSC::DFG::Edge::makeWord):
  7293. * dfg/DFGNodeAllocator.h:
  7294. (DFG):
  7295. 2013-02-22 Filip Pizlo <fpizlo@apple.com>
  7296. The DFG special case checks for isCreatedThisArgument are fragile
  7297. https://bugs.webkit.org/show_bug.cgi?id=110535
  7298. Reviewed by Oliver Hunt.
  7299. There may be many situations in which we want to force a variable to never be
  7300. unboxed. Capturing is one such case, and the created this argument is another.
  7301. Previously all code that dealt with this issue had to query both scenarios.
  7302. Now DFG::VariableAccessData knows these things. You just have to ask
  7303. VariableAccessData for whether a variable should be unboxed. Anyone wishing to
  7304. force a variable to never be unboxed just tells VariableAccessData.
  7305. * dfg/DFGAbstractState.cpp:
  7306. (JSC::DFG::AbstractState::initialize):
  7307. * dfg/DFGByteCodeParser.cpp:
  7308. (JSC::DFG::ByteCodeParser::parseBlock):
  7309. (DFG):
  7310. * dfg/DFGCFGSimplificationPhase.cpp:
  7311. (CFGSimplificationPhase):
  7312. * dfg/DFGFixupPhase.cpp:
  7313. (JSC::DFG::FixupPhase::fixupNode):
  7314. * dfg/DFGGraph.h:
  7315. (Graph):
  7316. * dfg/DFGPredictionPropagationPhase.cpp:
  7317. (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting):
  7318. * dfg/DFGSpeculativeJIT.cpp:
  7319. (JSC::DFG::SpeculativeJIT::compile):
  7320. * dfg/DFGSpeculativeJIT32_64.cpp:
  7321. (JSC::DFG::SpeculativeJIT::compile):
  7322. * dfg/DFGSpeculativeJIT64.cpp:
  7323. (JSC::DFG::SpeculativeJIT::compile):
  7324. * dfg/DFGUnificationPhase.cpp:
  7325. (JSC::DFG::UnificationPhase::run):
  7326. * dfg/DFGVariableAccessData.h:
  7327. (JSC::DFG::VariableAccessData::VariableAccessData):
  7328. (JSC::DFG::VariableAccessData::mergeIsCaptured):
  7329. (JSC::DFG::VariableAccessData::mergeShouldNeverUnbox):
  7330. (VariableAccessData):
  7331. (JSC::DFG::VariableAccessData::shouldNeverUnbox):
  7332. (JSC::DFG::VariableAccessData::shouldUnboxIfPossible):
  7333. (JSC::DFG::VariableAccessData::shouldUseDoubleFormat):
  7334. (JSC::DFG::VariableAccessData::tallyVotesForShouldUseDoubleFormat):
  7335. 2013-02-25 Geoffrey Garen <ggaren@apple.com>
  7336. Do one lookup per code cache insertion instead of two
  7337. https://bugs.webkit.org/show_bug.cgi?id=110674
  7338. Reviewed by Sam Weinig.
  7339. Deployed the idiomatic "add null value" trick to avoid a second hash
  7340. lookup when inserting an item.
  7341. * runtime/CodeCache.cpp:
  7342. (JSC::CodeCacheMap::pruneSlowCase): Factored this into a helper function
  7343. to improve clarity and get some code off the hot path.
  7344. (JSC::CodeCache::getCodeBlock):
  7345. (JSC::CodeCache::getFunctionExecutableFromGlobalCode): Use the add() API
  7346. to avoid two hash lookups. Be sure to remove items if parsing fails,
  7347. otherwise we'll leave nulls in the table. (I'm guessing that caching parse
  7348. errors is not a win.)
  7349. * runtime/CodeCache.h:
  7350. (JSC::SourceCodeValue::SourceCodeValue):
  7351. (CodeCacheMap):
  7352. (JSC::CodeCacheMap::add): Combined find() and set() into add().
  7353. (JSC::CodeCacheMap::remove):
  7354. (JSC::CodeCacheMap::age):
  7355. (JSC::CodeCacheMap::prune): Refactored to support above changes.
  7356. 2013-02-25 Carlos Garcia Campos <cgarcia@igalia.com>
  7357. [BlackBerry][ARM] Fix cast-align warnings in JavaScriptCore
  7358. https://bugs.webkit.org/show_bug.cgi?id=110738
  7359. Reviewed by Rob Buis.
  7360. Use reinterpret_cast_ptr instead of reinterpret_cast for
  7361. pointers.
  7362. * dfg/DFGOperations.cpp:
  7363. * heap/CopiedBlock.h:
  7364. (JSC::CopiedBlock::zeroFillWilderness):
  7365. * heap/WeakBlock.h:
  7366. (JSC::WeakBlock::asWeakImpl):
  7367. (JSC::WeakBlock::asFreeCell):
  7368. (JSC::WeakBlock::weakImpls):
  7369. * heap/WeakImpl.h:
  7370. (JSC::WeakImpl::asWeakImpl):
  7371. * interpreter/JSStack.cpp:
  7372. (JSC::JSStack::disableErrorStackReserve):
  7373. * interpreter/JSStack.h:
  7374. (JSC::JSStack::reservationEnd):
  7375. * runtime/ArrayStorage.h:
  7376. (JSC::ArrayStorage::from):
  7377. * runtime/Butterfly.h:
  7378. (JSC::Butterfly::indexingPayload):
  7379. * runtime/IndexingHeader.h:
  7380. (JSC::IndexingHeader::propertyStorage):
  7381. * runtime/JSActivation.h:
  7382. (JSC::JSActivation::tearOff):
  7383. (JSC::JSActivation::isTornOff):
  7384. (JSC::JSActivation::storage):
  7385. 2013-02-22 Filip Pizlo <fpizlo@apple.com>
  7386. DFG::SpeculativeJIT::speculateNumber() should just use SpeculateDoubleOperand instead of doing its own thing
  7387. https://bugs.webkit.org/show_bug.cgi?id=110659
  7388. Reviewed by Oliver Hunt and Mark Hahnenberg.
  7389. This simplifies the code, and also has the effect that if speculateNumber() is called
  7390. prior to someone actually using the number in a double context, then the number will
  7391. already be up-converted to double and ready to go.
  7392. Previously if this ever came up, the subsequent use would have to again branch to see
  7393. if the value is tagged as int or tagged as double.
  7394. On the other hand, if you ever did speculateNumber() and then used the value as a
  7395. JSValue, this will be a slow down now.
  7396. I suspect that the former (speculateNumber() and then use as number) is more likely
  7397. than the latter (speculateNumber() and then use as JSValue).
  7398. * dfg/DFGSpeculativeJIT.cpp:
  7399. (JSC::DFG::SpeculativeJIT::speculateNumber):
  7400. 2013-02-22 Filip Pizlo <fpizlo@apple.com>
  7401. DFG FixupPhase should have one common hook for knowing if a node is ever being speculated a certain way
  7402. https://bugs.webkit.org/show_bug.cgi?id=110650
  7403. Reviewed by Mark Hahnenberg.
  7404. Changes almost all calls to edge.setUseKind(kind) to be
  7405. setUseKindAndUnboxIfProfitable<kind>(edge). This will allow us to use the latter
  7406. as a hook for deciding which locals to unbox (webkit.org/b/110433).
  7407. * dfg/DFGFixupPhase.cpp:
  7408. (JSC::DFG::FixupPhase::fixupNode):
  7409. (FixupPhase):
  7410. (JSC::DFG::FixupPhase::setUseKindAndUnboxIfProfitable):
  7411. (JSC::DFG::FixupPhase::fixIntEdge):
  7412. (JSC::DFG::FixupPhase::fixDoubleEdge):
  7413. (JSC::DFG::FixupPhase::attemptToMakeIntegerAdd):
  7414. 2013-02-22 Filip Pizlo <fpizlo@apple.com>
  7415. REGRESSION(r143654): some fast/js test crashes on 32 bit build
  7416. https://bugs.webkit.org/show_bug.cgi?id=110590
  7417. Reviewed by Mark Hahnenberg.
  7418. In compileValueToInt32, the refactoring in r143654 undid one of the fixes from
  7419. r143314 due to a merge goof.
  7420. In speculateNumber, we were simply forgetting to indicate that we need a
  7421. ManualOperandSpeculation on a JSValueOperand. ManualOperandSpeculation should
  7422. be passed whenever you will be performing the type checks yourself rather than
  7423. using the operand class to do it for you.
  7424. * dfg/DFGSpeculativeJIT.cpp:
  7425. (JSC::DFG::SpeculativeJIT::compileValueToInt32):
  7426. (JSC::DFG::SpeculativeJIT::speculateNumber):
  7427. 2013-02-22 Geoffrey Garen <ggaren@apple.com>
  7428. Not reviewed.
  7429. Fix the 32-bit build by using the right data type in more places.
  7430. * runtime/CodeCache.h:
  7431. (CodeCacheMap):
  7432. 2013-02-22 Geoffrey Garen <ggaren@apple.com>
  7433. Not reviewed.
  7434. Fix the 32-bit build by using the right data type.
  7435. * runtime/CodeCache.h:
  7436. (JSC::CodeCacheMap::find):
  7437. 2013-02-21 Geoffrey Garen <ggaren@apple.com>
  7438. Code cache size should adapt to workload
  7439. https://bugs.webkit.org/show_bug.cgi?id=110560
  7440. Reviewed by Antti Koivisto.
  7441. (*) 5% PLT arithmetic mean speedup
  7442. (*) 10% PLT geometric mean speedup
  7443. (*) 3.4X microbenchmark speedup
  7444. (*) Reduces initial cache capacity by 16X
  7445. * runtime/CodeCache.cpp:
  7446. (JSC::CodeCache::CodeCache): Updated for interface change.
  7447. * runtime/CodeCache.h:
  7448. (JSC::SourceCodeValue::SourceCodeValue):
  7449. (SourceCodeValue): Turned the cache value into a struct so it can track its age.
  7450. (CodeCacheMap):
  7451. (JSC::CodeCacheMap::CodeCacheMap):
  7452. (JSC::CodeCacheMap::find):
  7453. (JSC::CodeCacheMap::set):
  7454. (JSC::CodeCacheMap::clear):
  7455. (JSC::CodeCacheMap::pruneIfNeeded):
  7456. (CodeCache): Grow and shrink in response to usage.
  7457. 2013-02-21 Jessie Berlin <jberlin@apple.com>
  7458. Fix a typo that broke the 32 bit build.
  7459. * dfg/DFGSpeculativeJIT32_64.cpp:
  7460. (JSC::DFG::SpeculativeJIT::compile):
  7461. 2013-02-21 Michael Saboff <msaboff@apple.com>
  7462. 25-30% regression in V8 RayTrace test in 32 bit builds with JIT disabled
  7463. https://bugs.webkit.org/show_bug.cgi?id=110539
  7464. Reviewed by Filip Pizlo.
  7465. Change the scale used to lookup pointers in JSGlobalObject::m_specialPointers to be 4 bytes for
  7466. the 32 bit version of the interpreter.
  7467. * llint/LowLevelInterpreter32_64.asm:
  7468. 2013-02-21 Roger Fong <roger_fong@apple.com>
  7469. Unreviewed. Add executable property to cmd file.
  7470. Required for executable files to maintain their executable permissions over svn.
  7471. * JavaScriptCore.vcxproj/copy-files.cmd: Added property svn:executable.
  7472. 2013-02-21 Filip Pizlo <fpizlo@apple.com>
  7473. Object allocation profiling will refuse to create objects with more than JSFinalObject::maxInlineCapacity() inline slots, but JSFunction::allocationProfile() asserts that the number of inline slots is always what it asked for
  7474. https://bugs.webkit.org/show_bug.cgi?id=110519
  7475. <rdar://problem/13218566>
  7476. Reviewed by Geoffrey Garen.
  7477. * runtime/JSFunction.h:
  7478. (JSC::JSFunction::allocationProfile):
  7479. 2013-02-21 Roger Fong <roger_fong@apple.com>
  7480. Unreviewed. Build fix for VS2010 WebKit solution.
  7481. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  7482. 2013-02-20 Filip Pizlo <fpizlo@apple.com>
  7483. DFG should not change its mind about what type speculations a node does, by encoding the checks in the NodeType, UseKind, and ArrayMode
  7484. https://bugs.webkit.org/show_bug.cgi?id=109371
  7485. Reviewed by Oliver Hunt.
  7486. FixupPhase now locks in the speculations that each node will do. The DFG then
  7487. remembers those speculations, and doesn't change its mind about them even if the
  7488. graph is transformed - for example if a node's child is repointed to a different
  7489. node as part of CSE, CFG simplification, or folding. Each node ensures that it
  7490. executes the speculations promised by its edges. This is true even for Phantom
  7491. nodes.
  7492. This still leaves some craziness on the table for future work, like the
  7493. elimination of speculating SetLocal's due to CFG simplification
  7494. (webkit.org/b/109388) and elimination of nodes via DCE (webkit.org/b/109389).
  7495. In all, this allows for a huge simplification of the DFG. Instead of having to
  7496. execute the right speculation heuristic each time you want to decide what a node
  7497. does (for example Node::shouldSpeculateInteger(child1, child2) &&
  7498. node->canSpeculateInteger()), you just ask for the use kinds of its children
  7499. (typically node->binaryUseKind() == Int32Use). Because the use kinds are
  7500. discrete, you can often just switch over them. This makes many parts of the code
  7501. more clear than they were before.
  7502. Having UseKinds describe the speculations being performed also makes it far
  7503. easier to perform analyses that need to know what speculations are done. This is
  7504. so far only used to simplify large parts of the CFA.
  7505. To have a larger vocabulary of UseKinds, this also changes the node allocator to
  7506. be able to round up Node sizes to the nearest multiple of 16.
  7507. This appears to be neutral on benchmarks, except for some goofy speed-ups, like
  7508. 8% on Octane/box2d.
  7509. * CMakeLists.txt:
  7510. * GNUmakefile.list.am:
  7511. * JavaScriptCore.xcodeproj/project.pbxproj:
  7512. * Target.pri:
  7513. * dfg/DFGAbstractState.cpp:
  7514. (JSC::DFG::AbstractState::startExecuting):
  7515. (DFG):
  7516. (JSC::DFG::AbstractState::executeEdges):
  7517. (JSC::DFG::AbstractState::verifyEdge):
  7518. (JSC::DFG::AbstractState::verifyEdges):
  7519. (JSC::DFG::AbstractState::executeEffects):
  7520. (JSC::DFG::AbstractState::execute):
  7521. * dfg/DFGAbstractState.h:
  7522. (AbstractState):
  7523. (JSC::DFG::AbstractState::filterEdgeByUse):
  7524. (JSC::DFG::AbstractState::filterByType):
  7525. * dfg/DFGAbstractValue.h:
  7526. (JSC::DFG::AbstractValue::filter):
  7527. * dfg/DFGAdjacencyList.h:
  7528. (JSC::DFG::AdjacencyList::AdjacencyList):
  7529. (JSC::DFG::AdjacencyList::child):
  7530. (JSC::DFG::AdjacencyList::setChild):
  7531. (JSC::DFG::AdjacencyList::reset):
  7532. (JSC::DFG::AdjacencyList::firstChild):
  7533. (JSC::DFG::AdjacencyList::setFirstChild):
  7534. (JSC::DFG::AdjacencyList::numChildren):
  7535. (JSC::DFG::AdjacencyList::setNumChildren):
  7536. (AdjacencyList):
  7537. * dfg/DFGAllocator.h:
  7538. (DFG):
  7539. (Allocator):
  7540. (JSC::DFG::Allocator::cellSize):
  7541. (JSC::DFG::Allocator::Region::headerSize):
  7542. (JSC::DFG::Allocator::Region::numberOfThingsPerRegion):
  7543. (JSC::DFG::Allocator::Region::payloadSize):
  7544. (JSC::DFG::Allocator::Region::payloadBegin):
  7545. (JSC::DFG::Allocator::Region::payloadEnd):
  7546. (JSC::DFG::Allocator::Region::isInThisRegion):
  7547. (JSC::DFG::::Allocator):
  7548. (JSC::DFG::::~Allocator):
  7549. (JSC::DFG::::allocate):
  7550. (JSC::DFG::::free):
  7551. (JSC::DFG::::freeAll):
  7552. (JSC::DFG::::reset):
  7553. (JSC::DFG::::indexOf):
  7554. (JSC::DFG::::allocatorOf):
  7555. (JSC::DFG::::bumpAllocate):
  7556. (JSC::DFG::::freeListAllocate):
  7557. (JSC::DFG::::allocateSlow):
  7558. (JSC::DFG::::freeRegionsStartingAt):
  7559. (JSC::DFG::::startBumpingIn):
  7560. * dfg/DFGByteCodeParser.cpp:
  7561. (JSC::DFG::ByteCodeParser::addToGraph):
  7562. (JSC::DFG::ByteCodeParser::handleMinMax):
  7563. * dfg/DFGCSEPhase.cpp:
  7564. (JSC::DFG::CSEPhase::setLocalStoreElimination):
  7565. (JSC::DFG::CSEPhase::eliminateIrrelevantPhantomChildren):
  7566. (JSC::DFG::CSEPhase::setReplacement):
  7567. (JSC::DFG::CSEPhase::performNodeCSE):
  7568. * dfg/DFGCommon.h:
  7569. (DFG):
  7570. * dfg/DFGConstantFoldingPhase.cpp:
  7571. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  7572. (JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck):
  7573. * dfg/DFGDriver.cpp:
  7574. (JSC::DFG::compile):
  7575. * dfg/DFGEdge.cpp:
  7576. (JSC::DFG::Edge::dump):
  7577. * dfg/DFGEdge.h:
  7578. (JSC::DFG::Edge::useKindUnchecked):
  7579. (JSC::DFG::Edge::useKind):
  7580. (JSC::DFG::Edge::shift):
  7581. * dfg/DFGFixupPhase.cpp:
  7582. (JSC::DFG::FixupPhase::run):
  7583. (JSC::DFG::FixupPhase::fixupNode):
  7584. (JSC::DFG::FixupPhase::checkArray):
  7585. (JSC::DFG::FixupPhase::blessArrayOperation):
  7586. (JSC::DFG::FixupPhase::fixIntEdge):
  7587. (JSC::DFG::FixupPhase::fixDoubleEdge):
  7588. (JSC::DFG::FixupPhase::injectInt32ToDoubleNode):
  7589. (FixupPhase):
  7590. (JSC::DFG::FixupPhase::truncateConstantToInt32):
  7591. (JSC::DFG::FixupPhase::truncateConstantsIfNecessary):
  7592. (JSC::DFG::FixupPhase::attemptToMakeIntegerAdd):
  7593. * dfg/DFGGraph.cpp:
  7594. (DFG):
  7595. (JSC::DFG::Graph::refChildren):
  7596. (JSC::DFG::Graph::derefChildren):
  7597. * dfg/DFGGraph.h:
  7598. (JSC::DFG::Graph::ref):
  7599. (JSC::DFG::Graph::deref):
  7600. (JSC::DFG::Graph::performSubstitution):
  7601. (JSC::DFG::Graph::isPredictedNumerical):
  7602. (JSC::DFG::Graph::addImmediateShouldSpeculateInteger):
  7603. (DFG):
  7604. * dfg/DFGNode.h:
  7605. (JSC::DFG::Node::Node):
  7606. (JSC::DFG::Node::convertToGetByOffset):
  7607. (JSC::DFG::Node::convertToPutByOffset):
  7608. (JSC::DFG::Node::willHaveCodeGenOrOSR):
  7609. (JSC::DFG::Node::child1):
  7610. (JSC::DFG::Node::child2):
  7611. (JSC::DFG::Node::child3):
  7612. (JSC::DFG::Node::binaryUseKind):
  7613. (Node):
  7614. (JSC::DFG::Node::isBinaryUseKind):
  7615. * dfg/DFGNodeAllocator.h:
  7616. (DFG):
  7617. * dfg/DFGNodeFlags.cpp:
  7618. (JSC::DFG::nodeFlagsAsString):
  7619. * dfg/DFGNodeType.h:
  7620. (DFG):
  7621. * dfg/DFGPredictionPropagationPhase.cpp:
  7622. (JSC::DFG::PredictionPropagationPhase::propagate):
  7623. * dfg/DFGSpeculativeJIT.cpp:
  7624. (JSC::DFG::SpeculativeJIT::speculationCheck):
  7625. (DFG):
  7626. (JSC::DFG::SpeculativeJIT::speculationWatchpoint):
  7627. (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck):
  7628. (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
  7629. (JSC::DFG::SpeculativeJIT::typeCheck):
  7630. (JSC::DFG::SpeculativeJIT::forwardTypeCheck):
  7631. (JSC::DFG::SpeculativeJIT::fillStorage):
  7632. (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
  7633. (JSC::DFG::SpeculativeJIT::compile):
  7634. (JSC::DFG::SpeculativeJIT::compileDoublePutByVal):
  7635. (JSC::DFG::SpeculativeJIT::compileValueToInt32):
  7636. (JSC::DFG::SpeculativeJIT::compileInt32ToDouble):
  7637. (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
  7638. (JSC::DFG::SpeculativeJIT::compileInstanceOf):
  7639. (JSC::DFG::SpeculativeJIT::compileAdd):
  7640. (JSC::DFG::SpeculativeJIT::compileArithSub):
  7641. (JSC::DFG::SpeculativeJIT::compileArithNegate):
  7642. (JSC::DFG::SpeculativeJIT::compileArithMul):
  7643. (JSC::DFG::SpeculativeJIT::compileArithMod):
  7644. (JSC::DFG::SpeculativeJIT::compare):
  7645. (JSC::DFG::SpeculativeJIT::compileStrictEq):
  7646. (JSC::DFG::SpeculativeJIT::speculateInt32):
  7647. (JSC::DFG::SpeculativeJIT::speculateNumber):
  7648. (JSC::DFG::SpeculativeJIT::speculateRealNumber):
  7649. (JSC::DFG::SpeculativeJIT::speculateBoolean):
  7650. (JSC::DFG::SpeculativeJIT::speculateCell):
  7651. (JSC::DFG::SpeculativeJIT::speculateObject):
  7652. (JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
  7653. (JSC::DFG::SpeculativeJIT::speculateString):
  7654. (JSC::DFG::SpeculativeJIT::speculateNotCell):
  7655. (JSC::DFG::SpeculativeJIT::speculateOther):
  7656. (JSC::DFG::SpeculativeJIT::speculate):
  7657. * dfg/DFGSpeculativeJIT.h:
  7658. (SpeculativeJIT):
  7659. (JSC::DFG::SpeculativeJIT::valueOfNumberConstant):
  7660. (JSC::DFG::SpeculativeJIT::needsTypeCheck):
  7661. (JSC::DFG::IntegerOperand::IntegerOperand):
  7662. (JSC::DFG::IntegerOperand::edge):
  7663. (IntegerOperand):
  7664. (JSC::DFG::IntegerOperand::node):
  7665. (JSC::DFG::IntegerOperand::gpr):
  7666. (JSC::DFG::IntegerOperand::use):
  7667. (JSC::DFG::JSValueOperand::JSValueOperand):
  7668. (JSValueOperand):
  7669. (JSC::DFG::JSValueOperand::edge):
  7670. (JSC::DFG::JSValueOperand::node):
  7671. (JSC::DFG::JSValueOperand::gpr):
  7672. (JSC::DFG::JSValueOperand::fill):
  7673. (JSC::DFG::JSValueOperand::use):
  7674. (JSC::DFG::StorageOperand::StorageOperand):
  7675. (JSC::DFG::StorageOperand::edge):
  7676. (StorageOperand):
  7677. (JSC::DFG::StorageOperand::node):
  7678. (JSC::DFG::StorageOperand::gpr):
  7679. (JSC::DFG::StorageOperand::use):
  7680. (JSC::DFG::SpeculateIntegerOperand::SpeculateIntegerOperand):
  7681. (SpeculateIntegerOperand):
  7682. (JSC::DFG::SpeculateIntegerOperand::edge):
  7683. (JSC::DFG::SpeculateIntegerOperand::node):
  7684. (JSC::DFG::SpeculateIntegerOperand::gpr):
  7685. (JSC::DFG::SpeculateIntegerOperand::use):
  7686. (JSC::DFG::SpeculateStrictInt32Operand::SpeculateStrictInt32Operand):
  7687. (SpeculateStrictInt32Operand):
  7688. (JSC::DFG::SpeculateStrictInt32Operand::edge):
  7689. (JSC::DFG::SpeculateStrictInt32Operand::node):
  7690. (JSC::DFG::SpeculateStrictInt32Operand::gpr):
  7691. (JSC::DFG::SpeculateStrictInt32Operand::use):
  7692. (JSC::DFG::SpeculateDoubleOperand::SpeculateDoubleOperand):
  7693. (SpeculateDoubleOperand):
  7694. (JSC::DFG::SpeculateDoubleOperand::edge):
  7695. (JSC::DFG::SpeculateDoubleOperand::node):
  7696. (JSC::DFG::SpeculateDoubleOperand::fpr):
  7697. (JSC::DFG::SpeculateDoubleOperand::use):
  7698. (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand):
  7699. (SpeculateCellOperand):
  7700. (JSC::DFG::SpeculateCellOperand::edge):
  7701. (JSC::DFG::SpeculateCellOperand::node):
  7702. (JSC::DFG::SpeculateCellOperand::gpr):
  7703. (JSC::DFG::SpeculateCellOperand::use):
  7704. (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand):
  7705. (JSC::DFG::SpeculateBooleanOperand::edge):
  7706. (SpeculateBooleanOperand):
  7707. (JSC::DFG::SpeculateBooleanOperand::node):
  7708. (JSC::DFG::SpeculateBooleanOperand::gpr):
  7709. (JSC::DFG::SpeculateBooleanOperand::use):
  7710. (DFG):
  7711. * dfg/DFGSpeculativeJIT32_64.cpp:
  7712. (JSC::DFG::SpeculativeJIT::fillInteger):
  7713. (JSC::DFG::SpeculativeJIT::fillJSValue):
  7714. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  7715. (JSC::DFG::SpeculativeJIT::fillSpeculateInt):
  7716. (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict):
  7717. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  7718. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  7719. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  7720. (JSC::DFG::SpeculativeJIT::compileObjectEquality):
  7721. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  7722. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  7723. (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
  7724. (JSC::DFG::SpeculativeJIT::compileLogicalNot):
  7725. (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
  7726. (JSC::DFG::SpeculativeJIT::emitBranch):
  7727. (JSC::DFG::SpeculativeJIT::compile):
  7728. * dfg/DFGSpeculativeJIT64.cpp:
  7729. (JSC::DFG::SpeculativeJIT::fillInteger):
  7730. (JSC::DFG::SpeculativeJIT::fillJSValue):
  7731. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  7732. (JSC::DFG::SpeculativeJIT::fillSpeculateInt):
  7733. (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict):
  7734. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  7735. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  7736. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  7737. (JSC::DFG::SpeculativeJIT::compileObjectEquality):
  7738. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  7739. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  7740. (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
  7741. (JSC::DFG::SpeculativeJIT::compileLogicalNot):
  7742. (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
  7743. (JSC::DFG::SpeculativeJIT::emitBranch):
  7744. (JSC::DFG::SpeculativeJIT::compile):
  7745. * dfg/DFGStructureCheckHoistingPhase.cpp:
  7746. (JSC::DFG::StructureCheckHoistingPhase::run):
  7747. * dfg/DFGUseKind.cpp: Added.
  7748. (WTF):
  7749. (WTF::printInternal):
  7750. * dfg/DFGUseKind.h: Added.
  7751. (DFG):
  7752. (JSC::DFG::typeFilterFor):
  7753. (JSC::DFG::isNumerical):
  7754. (WTF):
  7755. * dfg/DFGValidate.cpp:
  7756. (JSC::DFG::Validate::reportValidationContext):
  7757. 2013-02-20 Mark Hahnenberg <mhahnenberg@apple.com>
  7758. Objective-C API: Need a way to use the Objective-C JavaScript API with WebKit
  7759. https://bugs.webkit.org/show_bug.cgi?id=106059
  7760. Reviewed by Geoffrey Garen.
  7761. * API/JSBase.h: Renamed enable flag for API.
  7762. * API/JSBlockAdaptor.h: Using new flag.
  7763. * API/JSBlockAdaptor.mm: Ditto.
  7764. * API/JSContext.h: Add convenience C API conversion function for JSGlobalContextRef.
  7765. * API/JSContext.mm:
  7766. (-[JSContext JSGlobalContextRef]): Implementation of C API convenience function.
  7767. (-[JSContext initWithVirtualMachine:]): We don't use the m_apiData field any more.
  7768. (-[JSContext initWithGlobalContextRef:]): init method for allocating new JSContexts given a JSGlobalContextRef.
  7769. (-[JSContext dealloc]): No more m_apiData.
  7770. (-[JSContext wrapperForObjCObject:]): Renamed wrapperForObject.
  7771. (-[JSContext wrapperForJSObject:]): Fetches or allocates the JSValue for the specified JSValueRef in this JSContext.
  7772. (+[JSContext contextWithGlobalContextRef:]): Helper function to grab the lightweight JSContext wrapper for a given
  7773. JSGlobalContextRef from the global wrapper cache or allocate a new one if there isn't already one.
  7774. * API/JSContextInternal.h: New flag, new method declaration for initWithGlobalContextRef.
  7775. * API/JSExport.h: New flag.
  7776. * API/JSValue.h: New flag and new C API convenience method.
  7777. * API/JSValue.mm:
  7778. (-[JSValue JSValueRef]): Implementation of the C API convenience method.
  7779. (objectToValueWithoutCopy):
  7780. (+[JSValue valueWithValue:inContext:]): We now ask the JSContext for an Objective-C JSValue wrapper, which it can cache
  7781. in its internal JSWrapperMap.
  7782. * API/JSValueInternal.h:
  7783. * API/JSVirtualMachine.h:
  7784. * API/JSVirtualMachine.mm: Added global cache that maps JSContextGroupRef -> JSVirtualMachine lightweight wrappers.
  7785. (wrapperCacheLock):
  7786. (initWrapperCache):
  7787. (+[JSVMWrapperCache addWrapper:forJSContextGroupRef:]):
  7788. (+[JSVMWrapperCache wrapperForJSContextGroupRef:]):
  7789. (-[JSVirtualMachine init]):
  7790. (-[JSVirtualMachine initWithContextGroupRef:]):
  7791. (-[JSVirtualMachine dealloc]):
  7792. (+[JSVirtualMachine virtualMachineWithContextGroupRef:]):
  7793. (-[JSVirtualMachine contextForGlobalContextRef:]):
  7794. (-[JSVirtualMachine addContext:forGlobalContextRef:]):
  7795. * API/JSVirtualMachineInternal.h:
  7796. * API/JSWrapperMap.h:
  7797. * API/JSWrapperMap.mm:
  7798. (-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]): We use the JSObjectSetPrototype C API call because
  7799. setting the __proto__ property causes all sorts of bad things to happen behind the scenes, which can cause crashes based on
  7800. when it gets called.
  7801. (-[JSWrapperMap initWithContext:]):
  7802. (-[JSWrapperMap jsWrapperForObject:]):
  7803. (-[JSWrapperMap objcWrapperForJSValueRef:]):
  7804. * API/JavaScriptCore.h:
  7805. * API/ObjCCallbackFunction.h:
  7806. * API/ObjCCallbackFunction.mm:
  7807. (ObjCCallbackFunction::ObjCCallbackFunction): We never actually should have retained the target in the case that we had a
  7808. block as a callback. Blocks are initially allocated on the stack and are only moved to the heap if we call their copy method.
  7809. Retaining the block on the stack was a bad idea because if that stack frame ever went away and we called the block later,
  7810. we'd crash and burn.
  7811. (ObjCCallbackFunction::setContext): We need a new setter for when the weak reference to a JSContext inside an ObjCCallbackFunction
  7812. disappears, we can allocate a new one in its place.
  7813. (ObjCCallbackFunction):
  7814. (objCCallbackFunctionCallAsFunction): Reset the callback's context if it's ever destroyed.
  7815. (objCCallbackFunctionForInvocation): Again, don't set the __proto__ property because it uses black magic that can cause us to crash
  7816. depending on when this is called.
  7817. (objCCallbackFunctionForBlock): Here is where we copy the block to the heap when we're first creating the callback object for it.
  7818. * API/tests/testapi.c:
  7819. (main):
  7820. * API/tests/testapi.mm: We're going to get rid of the automatic block conversion, since that is causing leaks. I changed it
  7821. here in this test just so that it wouldn't mask any other potential leaks. Also modified some of the tests since JSContexts are
  7822. just lightweight wrappers now, we're not guaranteed to get the same pointer back from the call to [JSValue context] as the one
  7823. that the value was created in.
  7824. (-[TestObject callback:]):
  7825. * JavaScriptCore.xcodeproj/project.pbxproj:
  7826. * runtime/JSGlobalData.cpp:
  7827. (JSC::JSGlobalData::JSGlobalData): No more m_apiData.
  7828. * runtime/JSGlobalData.h: Ditto.
  7829. * runtime/JSGlobalObject.cpp:
  7830. (JSC::JSGlobalObject::JSGlobalObject): Ditto.
  7831. * runtime/JSGlobalObject.h:
  7832. 2013-02-19 Filip Pizlo <fpizlo@apple.com>
  7833. DFG::SpeculativeJIT::compileInt32ToDouble() has an unnecessary case for constant operands
  7834. https://bugs.webkit.org/show_bug.cgi?id=110309
  7835. Reviewed by Sam Weinig.
  7836. It used to be necessary, back when we didn't have constant folding. Now we have
  7837. constant folding. So we don't need it.
  7838. * dfg/DFGSpeculativeJIT.cpp:
  7839. (JSC::DFG::SpeculativeJIT::compileInt32ToDouble):
  7840. 2013-02-20 Filip Pizlo <fpizlo@apple.com>
  7841. DFG inlines Resolves that it doesn't know how to handle correctly
  7842. https://bugs.webkit.org/show_bug.cgi?id=110405
  7843. Reviewed by Geoffrey Garen.
  7844. Don't try to be clever: if there's a failing resolve, we can't inline it, period.
  7845. * dfg/DFGCapabilities.h:
  7846. (JSC::DFG::canInlineResolveOperations):
  7847. (JSC::DFG::canInlineOpcode):
  7848. 2013-02-20 Roger Fong <roger_fong@apple.com>
  7849. Get VS2010 Solution B&I ready.
  7850. <rdar://problem/1322988>
  7851. Rubberstamped by Timothy Horton.
  7852. Add Production configuration.
  7853. Add a JavaScriptCore submit solution with a DebugSuffix configuration.
  7854. Modify JavaScriptCore.make as necessary.
  7855. * JavaScriptCore.vcxproj/JavaScriptCore.make: Added.
  7856. * JavaScriptCore.vcxproj/JavaScriptCore.sln: Removed.
  7857. * JavaScriptCore.vcxproj/JavaScriptCore.submit.sln: Copied from Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.sln.
  7858. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  7859. * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
  7860. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj:
  7861. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props:
  7862. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPostBuild.cmd:
  7863. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPreBuild.cmd:
  7864. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorProduction.props: Added.
  7865. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorRelease.props:
  7866. * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj:
  7867. * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters:
  7868. * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedProduction.props: Added.
  7869. * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props:
  7870. * JavaScriptCore.vcxproj/JavaScriptCoreProduction.props: Added.
  7871. * JavaScriptCore.vcxproj/JavaScriptCoreRelease.props:
  7872. * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj:
  7873. * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj:
  7874. * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
  7875. * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props:
  7876. * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props:
  7877. * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.props: Added.
  7878. * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props:
  7879. * JavaScriptCore.vcxproj/jsc/jsc.vcxproj:
  7880. * JavaScriptCore.vcxproj/jsc/jscCommon.props:
  7881. * JavaScriptCore.vcxproj/jsc/jscProduction.props: Added.
  7882. * JavaScriptCore.vcxproj/jsc/jscRelease.props:
  7883. * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj:
  7884. * JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props:
  7885. * JavaScriptCore.vcxproj/testRegExp/testRegExpProduction.props: Added.
  7886. * JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props:
  7887. * JavaScriptCore.vcxproj/testapi/testapi.vcxproj:
  7888. * JavaScriptCore.vcxproj/testapi/testapiCommon.props:
  7889. * JavaScriptCore.vcxproj/testapi/testapiProduction.props: Added.
  7890. * JavaScriptCore.vcxproj/testapi/testapiRelease.props:
  7891. 2013-02-19 Jer Noble <jer.noble@apple.com>
  7892. EME: Enable both ENCRYPTED_MEDIA and ENCRYPTED_MEDIA_V2 until clients transition to the new API.
  7893. https://bugs.webkit.org/show_bug.cgi?id=110284
  7894. Reviewed by Eric Carlson.
  7895. Re-enable the ENCRYPTED_MEDIA flag.
  7896. * Configurations/FeatureDefines.xcconfig:
  7897. 2013-02-20 Dirk Schulze <krit@webkit.org>
  7898. Enable CANVAS_PATH flag
  7899. https://bugs.webkit.org/show_bug.cgi?id=108508
  7900. Reviewed by Simon Fraser.
  7901. Enable CANVAS_PATH flag on trunk.
  7902. Existing tests cover the feature.
  7903. * Configurations/FeatureDefines.xcconfig:
  7904. 2013-02-19 Mark Rowe <mrowe@apple.com>
  7905. Unreviewed, uninteresting change to test a theory about bad dependency handling.
  7906. * API/JSStringRefCF.cpp:
  7907. (JSStringCreateWithCFString): Remove an unnecessary else clause.
  7908. 2013-02-19 Oliver Hunt <oliver@apple.com>
  7909. Silence some analyzer warnings
  7910. https://bugs.webkit.org/show_bug.cgi?id=110281
  7911. Reviewed by Mark Hahnenberg.
  7912. The static analyzer believes that callerCodeBlock can be null,
  7913. based on other code performing null tests. This should not
  7914. ever be the case, but we'll add RELEASE_ASSERTs to make it
  7915. obvious if we're ever wrong.
  7916. * interpreter/Interpreter.cpp:
  7917. (JSC::getCallerInfo):
  7918. 2013-02-19 Oliver Hunt <oliver@apple.com>
  7919. Don't force everything to be blinded in debug builds
  7920. https://bugs.webkit.org/show_bug.cgi?id=110279
  7921. Reviewed by Mark Hahnenberg.
  7922. Switch to an explicit flag for indicating that we want
  7923. every constant to be blinded.
  7924. * assembler/MacroAssembler.h:
  7925. (JSC::MacroAssembler::shouldBlind):
  7926. 2013-02-19 Filip Pizlo <fpizlo@apple.com>
  7927. Fix indentation of Opcode.h
  7928. Rubber stamped by Mark Hahnenberg.
  7929. * bytecode/Opcode.h:
  7930. 2013-02-19 Filip Pizlo <fpizlo@apple.com>
  7931. Moved PolymorphicAccessStructureList into its own file.
  7932. Rubber stamped by Mark Hahnenberg.
  7933. * GNUmakefile.list.am:
  7934. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  7935. * JavaScriptCore.xcodeproj/project.pbxproj:
  7936. * bytecode/Instruction.h:
  7937. (JSC):
  7938. * bytecode/PolymorphicAccessStructureList.h: Added.
  7939. (JSC):
  7940. (PolymorphicAccessStructureList):
  7941. (PolymorphicStubInfo):
  7942. (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::PolymorphicStubInfo):
  7943. (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
  7944. (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
  7945. (JSC::PolymorphicAccessStructureList::visitWeak):
  7946. * bytecode/StructureStubInfo.h:
  7947. 2013-02-19 Filip Pizlo <fpizlo@apple.com>
  7948. Fix indentation of Instruction.h
  7949. Rubber stamped by Mark Hahnenberg.
  7950. * bytecode/Instruction.h:
  7951. 2013-02-18 Geoffrey Garen <ggaren@apple.com>
  7952. Unreviewed, rolling in r143348.
  7953. http://trac.webkit.org/changeset/143348
  7954. https://bugs.webkit.org/show_bug.cgi?id=110242
  7955. The bug was that isEmptyValue() was returning true for the deleted value.
  7956. Fixed this and simplified things further by delegating to m_sourceCode
  7957. for both isNull() and isHashTableDeletedValue(), so they can't be out of
  7958. sync.
  7959. * runtime/CodeCache.cpp:
  7960. (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
  7961. * runtime/CodeCache.h:
  7962. (JSC::SourceCodeKey::SourceCodeKey):
  7963. (JSC::SourceCodeKey::isHashTableDeletedValue):
  7964. (JSC::SourceCodeKey::hash):
  7965. (JSC::SourceCodeKey::length):
  7966. (JSC::SourceCodeKey::isNull):
  7967. (JSC::SourceCodeKey::operator==):
  7968. (SourceCodeKey):
  7969. 2013-02-15 Martin Robinson <mrobinson@igalia.com>
  7970. [GTK] Improve gyp build JavaScriptCore code generation
  7971. https://bugs.webkit.org/show_bug.cgi?id=109969
  7972. Reviewed by Dirk Pranke.
  7973. Switch away from using DerivedSources.make when building JavaScriptCore generated
  7974. sources. This bring a couple advantages, such as building the sources in parallel,
  7975. but requires us to list the generated sources more than once.
  7976. * JavaScriptCore.gyp/JavaScriptCoreGTK.gyp: Add rules for generating JavaScriptCore sources.
  7977. * JavaScriptCore.gyp/generate-derived-sources.sh: Added.
  7978. * JavaScriptCore.gyp/redirect-stdout.sh: Added.
  7979. 2013-02-19 Sheriff Bot <webkit.review.bot@gmail.com>
  7980. Unreviewed, rolling out r143348.
  7981. http://trac.webkit.org/changeset/143348
  7982. https://bugs.webkit.org/show_bug.cgi?id=110242
  7983. "Caused a deleted value sentinel crash on the layout tests"
  7984. (Requested by ggaren on #webkit).
  7985. * runtime/CodeCache.cpp:
  7986. (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
  7987. * runtime/CodeCache.h:
  7988. (JSC::SourceCodeKey::SourceCodeKey):
  7989. (JSC::SourceCodeKey::isHashTableDeletedValue):
  7990. (JSC::SourceCodeKey::hash):
  7991. (JSC::SourceCodeKey::length):
  7992. (JSC::SourceCodeKey::isNull):
  7993. (JSC::SourceCodeKey::operator==):
  7994. (SourceCodeKey):
  7995. 2013-02-19 Mark Hahnenberg <mhahnenberg@apple.com>
  7996. HeapBlock::destroy should issue warning if result is unused
  7997. https://bugs.webkit.org/show_bug.cgi?id=110233
  7998. Reviewed by Oliver Hunt.
  7999. To enforce the fact that we need to return blocks to the BlockAllocator after calling destroy,
  8000. we should add WARN_UNUSED_RETURN to HeapBlock::destroy and any other destroy functions in its subclasses.
  8001. * heap/HeapBlock.h:
  8002. 2013-02-19 Mark Hahnenberg <mhahnenberg@apple.com>
  8003. WeakSet::removeAllocator leaks WeakBlocks
  8004. https://bugs.webkit.org/show_bug.cgi?id=110228
  8005. Reviewed by Geoffrey Garen.
  8006. We need to return the WeakBlock to the BlockAllocator after the call to WeakBlock::destroy.
  8007. * heap/WeakSet.cpp:
  8008. (JSC::WeakSet::removeAllocator):
  8009. 2013-02-18 Geoffrey Garen <ggaren@apple.com>
  8010. Save space on keys in the CodeCache
  8011. https://bugs.webkit.org/show_bug.cgi?id=110179
  8012. Reviewed by Oliver Hunt.
  8013. Share the SourceProvider's string instead of making our own copy. This
  8014. chops off 16MB - 32MB from the CodeCache's memory footprint when full.
  8015. (It's 16MB when the strings are LChar, and 32MB when they're UChar.)
  8016. * runtime/CodeCache.cpp:
  8017. (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
  8018. * runtime/CodeCache.h: Removed a defunct enum value.
  8019. (JSC::SourceCodeKey::SourceCodeKey):
  8020. (JSC::SourceCodeKey::isHashTableDeletedValue):
  8021. (SourceCodeKey):
  8022. (JSC::SourceCodeKey::hash):
  8023. (JSC::SourceCodeKey::length):
  8024. (JSC::SourceCodeKey::isNull):
  8025. (JSC::SourceCodeKey::string):
  8026. (JSC::SourceCodeKey::operator==): Store a SourceCode instead of a String
  8027. so we can share our string with our SourceProvider. Cache our hash so
  8028. we don't have to re-decode our string just to re-hash the table.
  8029. 2013-02-19 Zoltan Herczeg <zherczeg@webkit.org>
  8030. revertBranchPtrWithPatch is incorrect on ARM traditional
  8031. https://bugs.webkit.org/show_bug.cgi?id=110201
  8032. Reviewed by Oliver Hunt.
  8033. Revert two instructions back to their original value.
  8034. * assembler/ARMAssembler.h:
  8035. (JSC::ARMAssembler::revertBranchPtrWithPatch):
  8036. (ARMAssembler):
  8037. * assembler/MacroAssemblerARM.h:
  8038. (JSC::MacroAssemblerARM::branchPtrWithPatch):
  8039. (JSC::MacroAssemblerARM::revertJumpReplacementToBranchPtrWithPatch):
  8040. 2013-02-19 Filip Pizlo <fpizlo@apple.com>
  8041. REGRESSION(r143241): It made 27 layout tests crash on 32 bit platforms
  8042. https://bugs.webkit.org/show_bug.cgi?id=110184
  8043. Reviewed by Zoltan Herczeg.
  8044. 32-bit backend was making all sorts of crazy assumptions, which happened to mostly
  8045. not break things prior to http://trac.webkit.org/changeset/143241. This brings the
  8046. 32-bit backend's type speculation fully into compliance with what the 64-bit
  8047. backend does.
  8048. * dfg/DFGSpeculativeJIT.cpp:
  8049. (JSC::DFG::SpeculativeJIT::checkGeneratedTypeForToInt32):
  8050. (JSC::DFG::SpeculativeJIT::compileValueToInt32):
  8051. * dfg/DFGSpeculativeJIT32_64.cpp:
  8052. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  8053. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  8054. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  8055. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  8056. 2013-02-18 Ilya Tikhonovsky <loislo@chromium.org>
  8057. Unreviewed build fix for Apple Windows. Second stage.
  8058. Add missed export statement.
  8059. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  8060. 2013-02-18 Roger Fong <roger_fong@apple.com>
  8061. Unreviewed Windows build fix.
  8062. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  8063. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  8064. 2013-02-18 Darin Adler <darin@apple.com>
  8065. Remove unneeded explicit function template arguments.
  8066. https://bugs.webkit.org/show_bug.cgi?id=110043
  8067. Reviewed by Ryosuke Niwa.
  8068. * runtime/Identifier.cpp:
  8069. (JSC::IdentifierASCIIStringTranslator::hash): Let the compiler deduce the type
  8070. when calling computeHashAndMaskTop8Bits.
  8071. (JSC::IdentifierLCharFromUCharTranslator::hash): Ditto.
  8072. * runtime/Identifier.h:
  8073. (JSC::IdentifierCharBufferTranslator::hash): Ditto.
  8074. 2013-02-18 Geoffrey Garen <ggaren@apple.com>
  8075. Shrank the SourceProvider cache
  8076. https://bugs.webkit.org/show_bug.cgi?id=110158
  8077. Reviewed by Oliver Hunt.
  8078. CodeCache is now our primary source cache, so a long-lived SourceProvider
  8079. cache is a waste. I measured this as a 10MB Membuster win; with more
  8080. precise instrumentation, Andreas estimated it as up to 30MB.
  8081. I didn't eliminate the SourceProvider cache because it's still useful
  8082. in speeding up uncached parsing of scripts with large nested functions
  8083. (i.e., all scripts).
  8084. * heap/Heap.cpp:
  8085. (JSC::Heap::collect): Discard all source provider caches after GC. This
  8086. is a convenient place to do so because it's reasonably soon after initial
  8087. parsing without being immediate.
  8088. * parser/Parser.cpp:
  8089. (JSC::::Parser): Updated for interface change: The heap now owns the
  8090. source provider cache, since most SourceProviders are not expected to
  8091. have one by default, and the heap is responsible for throwing them away.
  8092. (JSC::::parseInner): No need to update statistics on cache size, since
  8093. we're going to throw it away no matter what.
  8094. (JSC::::parseFunctionInfo): Reduced the minimum function size to 16. This
  8095. is a 27% win on a new parsing micro-benchmark I've added. Now that the
  8096. cache is temporary, we don't have to worry so much about its memory
  8097. footprint.
  8098. * parser/Parser.h:
  8099. (Parser): Updated for interface changes.
  8100. * parser/SourceProvider.cpp:
  8101. (JSC::SourceProvider::SourceProvider):
  8102. (JSC::SourceProvider::~SourceProvider):
  8103. * parser/SourceProvider.h:
  8104. (JSC):
  8105. (SourceProvider): SourceProvider doesn't own its cache anymore because
  8106. the cache is temporary.
  8107. * parser/SourceProviderCache.cpp:
  8108. (JSC::SourceProviderCache::clear):
  8109. (JSC::SourceProviderCache::add):
  8110. * parser/SourceProviderCache.h:
  8111. (JSC::SourceProviderCache::SourceProviderCache):
  8112. (SourceProviderCache):
  8113. * parser/SourceProviderCacheItem.h:
  8114. (SourceProviderCacheItem): No need to update statistics on cache size,
  8115. since we're going to throw it away no matter what.
  8116. * runtime/JSGlobalData.cpp:
  8117. (JSC::JSGlobalData::addSourceProviderCache):
  8118. (JSC):
  8119. (JSC::JSGlobalData::clearSourceProviderCaches):
  8120. * runtime/JSGlobalData.h:
  8121. (JSC):
  8122. (JSGlobalData): Moved the cache here so it's easier to throw away.
  8123. 2013-02-18 Filip Pizlo <fpizlo@apple.com>
  8124. DFG backend Branch handling has duplicate code and dead code
  8125. https://bugs.webkit.org/show_bug.cgi?id=110162
  8126. Reviewed by Mark Hahnenberg.
  8127. Streamline the code, and make the 64 backend's optimizations make more sense
  8128. (i.e. not be dead code).
  8129. * dfg/DFGSpeculativeJIT32_64.cpp:
  8130. (JSC::DFG::SpeculativeJIT::compile):
  8131. * dfg/DFGSpeculativeJIT64.cpp:
  8132. (JSC::DFG::SpeculativeJIT::emitBranch):
  8133. (JSC::DFG::SpeculativeJIT::compile):
  8134. 2013-02-18 Brent Fulgham <bfulgham@webkit.org>
  8135. [Windows] Unreviewed VS2010 build correction after r143273.
  8136. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Add missing source
  8137. file SourceProvider.cpp.
  8138. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto.
  8139. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: Add missing exports.
  8140. 2013-02-18 Filip Pizlo <fpizlo@apple.com>
  8141. Structure::flattenDictionaryStructure should compute max offset in a manner that soundly handles the case where the property list becomes empty
  8142. https://bugs.webkit.org/show_bug.cgi?id=110155
  8143. <rdar://problem/13233773>
  8144. Reviewed by Mark Rowe.
  8145. This was a rookie mistake. It was doing:
  8146. for (blah) {
  8147. m_offset = foo // foo's monotonically increase in the loop
  8148. }
  8149. as a way of computing max offset for all of the properties. Except what if the loop doesn't
  8150. execute because there are no properties? Well, then, you're going to have a bogus m_offset.
  8151. The solution is to initialize m_offset at the top of the loop.
  8152. * runtime/Structure.cpp:
  8153. (JSC::Structure::flattenDictionaryStructure):
  8154. 2013-02-18 Balazs Kilvady <kilvadyb@homejinni.com>
  8155. MIPS DFG implementation.
  8156. https://bugs.webkit.org/show_bug.cgi?id=101328
  8157. Reviewed by Oliver Hunt.
  8158. DFG implementation for MIPS.
  8159. * assembler/MIPSAssembler.h:
  8160. (JSC::MIPSAssembler::MIPSAssembler):
  8161. (JSC::MIPSAssembler::sllv):
  8162. (JSC::MIPSAssembler::movd):
  8163. (MIPSAssembler):
  8164. (JSC::MIPSAssembler::negd):
  8165. (JSC::MIPSAssembler::labelForWatchpoint):
  8166. (JSC::MIPSAssembler::label):
  8167. (JSC::MIPSAssembler::vmov):
  8168. (JSC::MIPSAssembler::linkDirectJump):
  8169. (JSC::MIPSAssembler::maxJumpReplacementSize):
  8170. (JSC::MIPSAssembler::revertJumpToMove):
  8171. (JSC::MIPSAssembler::replaceWithJump):
  8172. * assembler/MacroAssembler.h:
  8173. (MacroAssembler):
  8174. (JSC::MacroAssembler::poke):
  8175. * assembler/MacroAssemblerMIPS.h:
  8176. (JSC::MacroAssemblerMIPS::add32):
  8177. (MacroAssemblerMIPS):
  8178. (JSC::MacroAssemblerMIPS::and32):
  8179. (JSC::MacroAssemblerMIPS::lshift32):
  8180. (JSC::MacroAssemblerMIPS::mul32):
  8181. (JSC::MacroAssemblerMIPS::or32):
  8182. (JSC::MacroAssemblerMIPS::rshift32):
  8183. (JSC::MacroAssemblerMIPS::urshift32):
  8184. (JSC::MacroAssemblerMIPS::sub32):
  8185. (JSC::MacroAssemblerMIPS::xor32):
  8186. (JSC::MacroAssemblerMIPS::store32):
  8187. (JSC::MacroAssemblerMIPS::jump):
  8188. (JSC::MacroAssemblerMIPS::branchAdd32):
  8189. (JSC::MacroAssemblerMIPS::branchMul32):
  8190. (JSC::MacroAssemblerMIPS::branchSub32):
  8191. (JSC::MacroAssemblerMIPS::branchNeg32):
  8192. (JSC::MacroAssemblerMIPS::call):
  8193. (JSC::MacroAssemblerMIPS::loadDouble):
  8194. (JSC::MacroAssemblerMIPS::moveDouble):
  8195. (JSC::MacroAssemblerMIPS::swapDouble):
  8196. (JSC::MacroAssemblerMIPS::subDouble):
  8197. (JSC::MacroAssemblerMIPS::mulDouble):
  8198. (JSC::MacroAssemblerMIPS::divDouble):
  8199. (JSC::MacroAssemblerMIPS::negateDouble):
  8200. (JSC::MacroAssemblerMIPS::branchEqual):
  8201. (JSC::MacroAssemblerMIPS::branchNotEqual):
  8202. (JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32):
  8203. (JSC::MacroAssemblerMIPS::branchTruncateDoubleToUint32):
  8204. (JSC::MacroAssemblerMIPS::truncateDoubleToInt32):
  8205. (JSC::MacroAssemblerMIPS::truncateDoubleToUint32):
  8206. (JSC::MacroAssemblerMIPS::branchDoubleNonZero):
  8207. (JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN):
  8208. (JSC::MacroAssemblerMIPS::invert):
  8209. (JSC::MacroAssemblerMIPS::replaceWithJump):
  8210. (JSC::MacroAssemblerMIPS::maxJumpReplacementSize):
  8211. * dfg/DFGAssemblyHelpers.h:
  8212. (AssemblyHelpers):
  8213. (JSC::DFG::AssemblyHelpers::preserveReturnAddressAfterCall):
  8214. (JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn):
  8215. (JSC::DFG::AssemblyHelpers::debugCall):
  8216. * dfg/DFGCCallHelpers.h:
  8217. (CCallHelpers):
  8218. (JSC::DFG::CCallHelpers::setupArguments):
  8219. (JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
  8220. * dfg/DFGFPRInfo.h:
  8221. (DFG):
  8222. (FPRInfo):
  8223. (JSC::DFG::FPRInfo::toRegister):
  8224. (JSC::DFG::FPRInfo::toIndex):
  8225. (JSC::DFG::FPRInfo::debugName):
  8226. * dfg/DFGGPRInfo.h:
  8227. (DFG):
  8228. (GPRInfo):
  8229. (JSC::DFG::GPRInfo::toRegister):
  8230. (JSC::DFG::GPRInfo::toIndex):
  8231. (JSC::DFG::GPRInfo::debugName):
  8232. * dfg/DFGSpeculativeJIT.h:
  8233. (SpeculativeJIT):
  8234. * jit/JSInterfaceJIT.h:
  8235. (JSInterfaceJIT):
  8236. * runtime/JSGlobalData.h:
  8237. (JSC::ScratchBuffer::allocationSize):
  8238. (ScratchBuffer):
  8239. 2013-02-18 Filip Pizlo <fpizlo@apple.com>
  8240. DFG::SpeculativeJIT::isKnownXYZ methods should use CFA rather than other things
  8241. https://bugs.webkit.org/show_bug.cgi?id=110092
  8242. Reviewed by Geoffrey Garen.
  8243. These methods were previously using GenerationInfo and other things to try to
  8244. gain information that the CFA could give away for free, if you asked kindly
  8245. enough.
  8246. Also fixed CallLinkStatus's dump() method since it was making an invalid
  8247. assertion: we most certainly can have a status where the structure is non-null
  8248. and the executable is null, like if we're dealing with an InternalFunction.
  8249. Also removed calls to isKnownNotXYZ from fillSpeculateABC methods in 32_64. I
  8250. don't know why that was there. But it was causing asserts if the value was
  8251. empty - i.e. we had already exited unconditionally but we didn't know it. I
  8252. could have fixed this by introducing another form of isKnownNotXYZ which was
  8253. tolerant of empty values, but I didn't feel like fixing code that I knew to be
  8254. unnecessary. (More deeply, isKnownNotCell, for example, really asks: "do you
  8255. know that this value can never be a cell?" while some of the previous uses
  8256. wanted to ask: "do you know that this is a value that is not a cell?". The
  8257. former is "true" if the value is a contradiction [i.e. BOTTOM], while the
  8258. latter is "false" for contradictions, since contradictions are not values.)
  8259. * bytecode/CallLinkStatus.cpp:
  8260. (JSC::CallLinkStatus::dump):
  8261. * bytecode/CallLinkStatus.h:
  8262. (JSC::CallLinkStatus::CallLinkStatus):
  8263. * dfg/DFGSpeculativeJIT.cpp:
  8264. (DFG):
  8265. * dfg/DFGSpeculativeJIT.h:
  8266. (JSC::DFG::SpeculativeJIT::isKnownInteger):
  8267. (JSC::DFG::SpeculativeJIT::isKnownCell):
  8268. (JSC::DFG::SpeculativeJIT::isKnownNotInteger):
  8269. (JSC::DFG::SpeculativeJIT::isKnownNotNumber):
  8270. (JSC::DFG::SpeculativeJIT::isKnownNotCell):
  8271. * dfg/DFGSpeculativeJIT32_64.cpp:
  8272. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  8273. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  8274. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  8275. * dfg/DFGStructureAbstractValue.h:
  8276. (JSC::DFG::StructureAbstractValue::dump):
  8277. 2013-02-17 Filip Pizlo <fpizlo@apple.com>
  8278. Get rid of DFG::DoubleOperand and simplify ValueToInt32
  8279. https://bugs.webkit.org/show_bug.cgi?id=110072
  8280. Reviewed by Geoffrey Garen.
  8281. ValueToInt32 had a side-effecting path, which was not OSR-friendly: an OSR after
  8282. the side-effect would lead to the side-effect re-executing. I got rid of that path
  8283. and replaced it with an optimization for the case where the input is speculated
  8284. number-or-other. This makes idioms like null|0 and true|0 work as expected, and
  8285. get optimized appropriately.
  8286. Also got rid of DoubleOperand. Replaced all remaining uses of it with
  8287. SpeculateDoubleOperand. Because the latter asserts that the Edge is a DoubleUse
  8288. edge and the remaining uses of DoubleOperand are all for untyped uses, I worked
  8289. around the assertion by setting the UseKind to DoubleUse by force. This is sound,
  8290. since all existing assertions for DoubleUse are actually asserting that we're not
  8291. converting a value to double unexpectedly. But all of these calls to
  8292. SpeculateDoubleOperand are when the operand is already known to be represented as
  8293. double, so there is no conversion.
  8294. This is neutral on benchmarks, except stanford-crypto-ccm, which speeds up a
  8295. little. Mostly, this is intended to delete a bunch of code. DoubleOperand was
  8296. equivalent to the replace-edge-with-DoubleUse trick that I'm using now, except it
  8297. involved a _lot_ more code.
  8298. * dfg/DFGAbstractState.cpp:
  8299. (JSC::DFG::AbstractState::execute):
  8300. * dfg/DFGCSEPhase.cpp:
  8301. (JSC::DFG::CSEPhase::performNodeCSE):
  8302. * dfg/DFGFixupPhase.cpp:
  8303. (JSC::DFG::FixupPhase::fixupNode):
  8304. * dfg/DFGNodeType.h:
  8305. (DFG):
  8306. * dfg/DFGSpeculativeJIT.cpp:
  8307. (DFG):
  8308. (JSC::DFG::SpeculativeJIT::compileValueToInt32):
  8309. * dfg/DFGSpeculativeJIT.h:
  8310. (SpeculativeJIT):
  8311. (DFG):
  8312. (FPRTemporary):
  8313. * dfg/DFGSpeculativeJIT32_64.cpp:
  8314. (DFG):
  8315. (JSC::DFG::SpeculativeJIT::compile):
  8316. * dfg/DFGSpeculativeJIT64.cpp:
  8317. (DFG):
  8318. 2013-02-18 Ádám Kallai <kadam@inf.u-szeged.hu>
  8319. [Qt] Mountain Lion buildfix after r143147.
  8320. Reviewed by Csaba Osztrogonác.
  8321. * runtime/DateConstructor.cpp:
  8322. 2013-02-18 Zan Dobersek <zdobersek@igalia.com>
  8323. Stop placing std::isfinite and std::signbit inside the global scope
  8324. https://bugs.webkit.org/show_bug.cgi?id=109817
  8325. Reviewed by Darin Adler.
  8326. Prefix calls to the isfinite and signbit methods with std:: as the two
  8327. methods are no longer being imported into the global scope.
  8328. * assembler/MacroAssembler.h:
  8329. (JSC::MacroAssembler::shouldBlindDouble):
  8330. * offlineasm/cloop.rb:
  8331. * runtime/BigInteger.h:
  8332. (JSC::BigInteger::BigInteger):
  8333. * runtime/DateConstructor.cpp:
  8334. (JSC::constructDate):
  8335. * runtime/DatePrototype.cpp:
  8336. (JSC::fillStructuresUsingTimeArgs):
  8337. (JSC::fillStructuresUsingDateArgs):
  8338. (JSC::dateProtoFuncToISOString):
  8339. (JSC::dateProtoFuncSetYear):
  8340. * runtime/JSCJSValueInlines.h:
  8341. (JSC::JSValue::JSValue):
  8342. * runtime/JSGlobalObjectFunctions.cpp:
  8343. (JSC::globalFuncIsFinite):
  8344. * runtime/JSONObject.cpp:
  8345. (JSC::Stringifier::appendStringifiedValue):
  8346. * runtime/MathObject.cpp:
  8347. (JSC::mathProtoFuncMax): Also include an opportunistic style fix.
  8348. (JSC::mathProtoFuncMin): Ditto.
  8349. * runtime/NumberPrototype.cpp:
  8350. (JSC::toStringWithRadix):
  8351. (JSC::numberProtoFuncToExponential):
  8352. (JSC::numberProtoFuncToFixed):
  8353. (JSC::numberProtoFuncToPrecision):
  8354. (JSC::numberProtoFuncToString):
  8355. * runtime/Uint16WithFraction.h:
  8356. (JSC::Uint16WithFraction::Uint16WithFraction):
  8357. 2013-02-18 Ádám Kallai <kadam@inf.u-szeged.hu>
  8358. [Qt] Mountain Lion buildfix after r143147.
  8359. Reviewed by Csaba Osztrogonác.
  8360. * runtime/DateInstance.cpp:
  8361. 2013-02-18 Ilya Tikhonovsky <loislo@chromium.org>
  8362. Unreviewed speculative build fix for Apple Win bots.
  8363. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  8364. 2013-02-18 Filip Pizlo <fpizlo@apple.com>
  8365. Fix indentation of StructureStubInfo.h
  8366. Rubber stamped by Mark Hahnenberg.
  8367. * bytecode/StructureStubInfo.h:
  8368. 2013-02-18 Filip Pizlo <fpizlo@apple.com>
  8369. Fix indentation of JSGlobalObject.h and JSGlobalObjectFunctions.h
  8370. Rubber stamped by Mark Hahnenberg.
  8371. * runtime/JSGlobalObject.h:
  8372. * runtime/JSGlobalObjectFunctions.h:
  8373. 2013-02-18 Filip Pizlo <fpizlo@apple.com>
  8374. Fix indention of Operations.h
  8375. Rubber stamped by Mark Hahnenberg.
  8376. * runtime/Operations.h:
  8377. 2013-02-18 Filip Pizlo <fpizlo@apple.com>
  8378. Remove DFG::SpeculativeJIT::isKnownNumeric(), since it's not called from anywhere.
  8379. Rubber stamped by Andy Estes.
  8380. * dfg/DFGSpeculativeJIT.cpp:
  8381. (DFG):
  8382. * dfg/DFGSpeculativeJIT.h:
  8383. (SpeculativeJIT):
  8384. 2013-02-18 Filip Pizlo <fpizlo@apple.com>
  8385. Remove DFG::SpeculativeJIT::isStrictInt32(), since it's not called from anywhere.
  8386. Rubber stampted by Andy Estes.
  8387. * dfg/DFGSpeculativeJIT.cpp:
  8388. (DFG):
  8389. * dfg/DFGSpeculativeJIT.h:
  8390. (SpeculativeJIT):
  8391. 2013-02-18 Filip Pizlo <fpizlo@apple.com>
  8392. Remove dead code for ValueToNumber from the DFG.
  8393. Rubber stamped by Andy Estes.
  8394. We killed ValueToNumber at some point, but forgot to kill all of the backend support
  8395. for it.
  8396. * dfg/DFGByteCodeParser.cpp:
  8397. (JSC::DFG::ByteCodeParser::handleMinMax):
  8398. * dfg/DFGOperations.cpp:
  8399. * dfg/DFGOperations.h:
  8400. * dfg/DFGSpeculativeJIT.h:
  8401. (SpeculativeJIT):
  8402. * dfg/DFGSpeculativeJIT32_64.cpp:
  8403. * dfg/DFGSpeculativeJIT64.cpp:
  8404. 2013-02-17 Csaba Osztrogonác <ossy@webkit.org>
  8405. Unreviewed buildfix for JSVALUE32_64 builds after r143147.
  8406. * jit/JIT.h:
  8407. 2013-02-17 Filip Pizlo <fpizlo@apple.com>
  8408. Move all Structure out-of-line inline methods to StructureInlines.h
  8409. https://bugs.webkit.org/show_bug.cgi?id=110024
  8410. Rubber stamped by Mark Hahnenberg and Sam Weinig.
  8411. This was supposed to be easy.
  8412. But, initially, there was a Structure inline method in CodeBlock.h, and moving that
  8413. into StructureInlines.h meant that Operations.h included CodeBlock.h. This would
  8414. cause WebCore build failures, because CodeBlock.h transitively included the JSC
  8415. parser (via many, many paths), and the JSC parser defines tokens using enumeration
  8416. elements that CSSGrammar.cpp (generated by bison) would #define. For example,
  8417. bison would give CSSGrammar.cpp a #define FUNCTION 123, and would do so before
  8418. including anything interesting. The JSC parser would have an enum that included
  8419. FUNCTION as an element. Hence the JSC parser included into CSSGrammar.cpp would have
  8420. a token element called FUNCTION declared in an enumeration, but FUNCTION was
  8421. #define'd to 123, leading to a parser error.
  8422. Wow.
  8423. So I removed all transitive include paths from CodeBlock.h to the JSC Parser. I
  8424. believe I was able to do so without out-of-lining anything interesting or performance
  8425. critical. This is probably a purely good thing to have done: it will be nice to be
  8426. able to make changes to the parser without having to compile the universe.
  8427. Of course, doing this caused a bunch of other things to not compile, since a bunch of
  8428. headers relied on things being implicitly included for them when they transitively
  8429. included the parser. I fixed a lot of that.
  8430. Finally, I ended up removing the method that depended on CodeBlock.h from
  8431. StructureInlines.h, and putting it in Structure.cpp. That might seem like all of this
  8432. was a waste of time, except that I suspect it was a worthwhile forcing function for
  8433. cleaning up a bunch of cruft.
  8434. * API/JSCallbackFunction.cpp:
  8435. * CMakeLists.txt:
  8436. * GNUmakefile.list.am:
  8437. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  8438. * JavaScriptCore.xcodeproj/project.pbxproj:
  8439. * Target.pri:
  8440. * bytecode/CodeBlock.h:
  8441. (JSC):
  8442. * bytecode/EvalCodeCache.h:
  8443. * bytecode/SamplingTool.h:
  8444. * bytecode/UnlinkedCodeBlock.cpp:
  8445. (JSC::UnlinkedFunctionExecutable::parameterCount):
  8446. (JSC):
  8447. * bytecode/UnlinkedCodeBlock.h:
  8448. (UnlinkedFunctionExecutable):
  8449. * bytecompiler/BytecodeGenerator.h:
  8450. * bytecompiler/Label.h:
  8451. (JSC):
  8452. * dfg/DFGByteCodeParser.cpp:
  8453. * dfg/DFGByteCodeParser.h:
  8454. * dfg/DFGFPRInfo.h:
  8455. * dfg/DFGRegisterBank.h:
  8456. * heap/HandleStack.cpp:
  8457. * jit/JITWriteBarrier.h:
  8458. * parser/Nodes.h:
  8459. (JSC):
  8460. * parser/Parser.h:
  8461. * parser/ParserError.h: Added.
  8462. (JSC):
  8463. (JSC::ParserError::ParserError):
  8464. (ParserError):
  8465. (JSC::ParserError::toErrorObject):
  8466. * parser/ParserModes.h:
  8467. * parser/SourceProvider.cpp: Added.
  8468. (JSC):
  8469. (JSC::SourceProvider::SourceProvider):
  8470. (JSC::SourceProvider::~SourceProvider):
  8471. * parser/SourceProvider.h:
  8472. (JSC):
  8473. (SourceProvider):
  8474. * runtime/ArrayPrototype.cpp:
  8475. * runtime/DatePrototype.cpp:
  8476. * runtime/Executable.h:
  8477. * runtime/JSGlobalObject.cpp:
  8478. * runtime/JSGlobalObject.h:
  8479. (JSC):
  8480. * runtime/Operations.h:
  8481. * runtime/Structure.cpp:
  8482. (JSC::Structure::prototypeForLookup):
  8483. (JSC):
  8484. * runtime/Structure.h:
  8485. (JSC):
  8486. * runtime/StructureInlines.h: Added.
  8487. (JSC):
  8488. (JSC::Structure::create):
  8489. (JSC::Structure::createStructure):
  8490. (JSC::Structure::get):
  8491. (JSC::Structure::masqueradesAsUndefined):
  8492. (JSC::SlotVisitor::internalAppend):
  8493. (JSC::Structure::transitivelyTransitionedFrom):
  8494. (JSC::Structure::setEnumerationCache):
  8495. (JSC::Structure::enumerationCache):
  8496. (JSC::Structure::prototypeForLookup):
  8497. (JSC::Structure::prototypeChain):
  8498. (JSC::Structure::isValid):
  8499. * runtime/StructureRareData.cpp:
  8500. 2013-02-17 Roger Fong <roger_fong@apple.com>
  8501. Unreviewed. Windows build fix.
  8502. * runtime/CodeCache.h:
  8503. (CodeCacheMap):
  8504. 2013-02-16 Geoffrey Garen <ggaren@apple.com>
  8505. Code cache should be explicit about what it caches
  8506. https://bugs.webkit.org/show_bug.cgi?id=110039
  8507. Reviewed by Oliver Hunt.
  8508. This patch makes the code cache more explicit in two ways:
  8509. (1) The cache caches top-level scripts. Any sub-functions executed as a
  8510. part of a script are cached with it and evicted with it.
  8511. This simplifies things by eliminating out-of-band sub-function tracking,
  8512. and fixes pathological cases where functions for live scripts would be
  8513. evicted in favor of functions for dead scripts, and/or high probability
  8514. functions executed early in script lifetime would be evicted in favor of
  8515. low probability functions executed late in script lifetime, due to LRU.
  8516. Statistical data from general browsing and PLT confirms that caching
  8517. functions independently of scripts is not profitable.
  8518. (2) The cache tracks script size, not script count.
  8519. This reduces the worst-case cache size by a factor of infinity.
  8520. Script size is a reasonable first-order estimate of in-memory footprint
  8521. for a cached script because there are no syntactic constructs that have
  8522. super-linear memory footprint.
  8523. * bytecode/UnlinkedCodeBlock.cpp:
  8524. (JSC::generateFunctionCodeBlock): Moved this function out of the cache
  8525. because it does not consult the cache, and is not managed by it.
  8526. (JSC::UnlinkedFunctionExecutable::visitChildren): Visit our code blocks
  8527. because they are strong references now, rather than weak, a la (1).
  8528. (JSC::UnlinkedFunctionExecutable::codeBlockFor): Updated for interface changes.
  8529. * bytecode/UnlinkedCodeBlock.h:
  8530. (UnlinkedFunctionExecutable):
  8531. (UnlinkedFunctionCodeBlock): Strong now, not weak, a la (1).
  8532. * runtime/CodeCache.cpp:
  8533. (JSC::CodeCache::CodeCache):
  8534. * runtime/CodeCache.h:
  8535. (JSC::SourceCodeKey::length):
  8536. (SourceCodeKey):
  8537. (CodeCacheMap):
  8538. (JSC::CodeCacheMap::CodeCacheMap):
  8539. (JSC::CodeCacheMap::find):
  8540. (JSC::CodeCacheMap::set):
  8541. (JSC::CodeCacheMap::clear):
  8542. (CodeCache):
  8543. (JSC::CodeCache::clear): Removed individual function tracking, due to (1).
  8544. Added explicit character counting, for (2).
  8545. You might think 16000000 characters is a lot. It is. But this patch
  8546. didn't establish that limit -- it just took the existing limit and
  8547. made it more visible. I intend to reduce the size of the cache in a
  8548. future patch.
  8549. 2013-02-16 Filip Pizlo <fpizlo@apple.com>
  8550. Remove support for bytecode comments, since it doesn't build, and hasn't been used in a while.
  8551. https://bugs.webkit.org/show_bug.cgi?id=110035
  8552. Rubber stamped by Andreas Kling.
  8553. There are other ways of achieving the same effect, like adding print statements to the bytecode generator.
  8554. The fact that this feature doesn't build and nobody noticed implies that it's probably not a popular
  8555. feature. As well, the amount of wiring that was required for it was quite big considering its relatively
  8556. modest utility.
  8557. * GNUmakefile.list.am:
  8558. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  8559. * JavaScriptCore.xcodeproj/project.pbxproj:
  8560. * bytecode/CodeBlock.cpp:
  8561. (JSC):
  8562. (JSC::CodeBlock::dumpBytecode):
  8563. (JSC::CodeBlock::CodeBlock):
  8564. * bytecode/CodeBlock.h:
  8565. (CodeBlock):
  8566. * bytecode/Comment.h: Removed.
  8567. * bytecompiler/BytecodeGenerator.cpp:
  8568. (JSC::BytecodeGenerator::BytecodeGenerator):
  8569. (JSC::BytecodeGenerator::emitOpcode):
  8570. (JSC):
  8571. * bytecompiler/BytecodeGenerator.h:
  8572. (BytecodeGenerator):
  8573. (JSC::BytecodeGenerator::symbolTable):
  8574. 2013-02-16 Brent Fulgham <bfulgham@webkit.org>
  8575. [Windows] Unreviewed Visual Studio 2010 build fix after r143117
  8576. * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: Reference new path to property sheets.
  8577. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  8578. Build correction after new operator == added.
  8579. 2013-02-16 Filip Pizlo <fpizlo@apple.com>
  8580. Fix indentation of Structure.h
  8581. Rubber stamped by Mark Hahnenberg.
  8582. * runtime/Structure.h:
  8583. 2013-02-16 Christophe Dumez <ch.dumez@sisa.samsung.com>
  8584. Unreviewed build fix.
  8585. Export symbol for new CString operator== operator to fix Windows build.
  8586. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  8587. 2013-02-15 Filip Pizlo <fpizlo@apple.com>
  8588. Structure should be more methodical about the relationship between m_offset and m_propertyTable
  8589. https://bugs.webkit.org/show_bug.cgi?id=109978
  8590. Reviewed by Mark Hahnenberg.
  8591. Allegedly, the previous relationship was that either m_propertyTable or m_offset
  8592. would be set, and if m_propertyTable was not set you could rebuild it. In reality,
  8593. we would sometimes "reset" both: some transitions wouldn't set m_offset, and other
  8594. transitions would clear the previous structure's m_propertyTable. So, in a
  8595. structure transition chain of A->B->C you could have:
  8596. A transitions to B: B doesn't copy m_offset but does copy m_propertyTable, because
  8597. that seemed like a good idea at the time (this was a common idiom in the code).
  8598. B transitions to C: C steals B's m_propertyTable, leaving B with neither a
  8599. m_propertyTable nor a m_offset.
  8600. Then we would ask for the size of the property storage of B and get the answer
  8601. "none". That's not good.
  8602. Now, there is a new relationship, which, hopefully, should fix things: m_offset is
  8603. always set and always refers to the maximum offset ever used by the property table.
  8604. From this, you can infer both the inline and out-of-line property size, and
  8605. capacity. This is accomplished by having PropertyTable::add() take a
  8606. PropertyOffset reference, which must be Structure::m_offset. It will update this
  8607. offset. As well, all transitions now copy m_offset. And we frequently assert
  8608. (using RELEASE_ASSERT) that the m_offset matches what m_propertyTable would tell
  8609. you. Hence if you ever modify the m_propertyTable, you'll also update the offset.
  8610. If you ever copy the property table, you'll also copy the offset. Life should be
  8611. good, I think.
  8612. * runtime/PropertyMapHashTable.h:
  8613. (JSC::PropertyTable::add):
  8614. * runtime/Structure.cpp:
  8615. (JSC::Structure::materializePropertyMap):
  8616. (JSC::Structure::addPropertyTransition):
  8617. (JSC::Structure::removePropertyTransition):
  8618. (JSC::Structure::changePrototypeTransition):
  8619. (JSC::Structure::despecifyFunctionTransition):
  8620. (JSC::Structure::attributeChangeTransition):
  8621. (JSC::Structure::toDictionaryTransition):
  8622. (JSC::Structure::sealTransition):
  8623. (JSC::Structure::freezeTransition):
  8624. (JSC::Structure::preventExtensionsTransition):
  8625. (JSC::Structure::nonPropertyTransition):
  8626. (JSC::Structure::flattenDictionaryStructure):
  8627. (JSC::Structure::checkConsistency):
  8628. (JSC::Structure::putSpecificValue):
  8629. (JSC::Structure::createPropertyMap):
  8630. (JSC::PropertyTable::checkConsistency):
  8631. * runtime/Structure.h:
  8632. (JSC):
  8633. (JSC::Structure::putWillGrowOutOfLineStorage):
  8634. (JSC::Structure::outOfLineCapacity):
  8635. (JSC::Structure::outOfLineSize):
  8636. (JSC::Structure::isEmpty):
  8637. (JSC::Structure::materializePropertyMapIfNecessary):
  8638. (JSC::Structure::materializePropertyMapIfNecessaryForPinning):
  8639. (Structure):
  8640. (JSC::Structure::checkOffsetConsistency):
  8641. 2013-02-15 Martin Robinson <mrobinson@igalia.com>
  8642. [GTK] Spread the gyp build files throughout the tree
  8643. https://bugs.webkit.org/show_bug.cgi?id=109960
  8644. Reviewed by Dirk Pranke.
  8645. * JavaScriptCore.gyp/JavaScriptCoreGTK.gyp: Renamed from Source/WebKit/gtk/gyp/JavaScriptCore.gyp.
  8646. * JavaScriptCore.gyp/generate-derived-sources.sh: Renamed from Source/WebKit/gtk/gyp/generate-derived-sources.sh.
  8647. 2013-02-15 Filip Pizlo <fpizlo@apple.com>
  8648. DFG SpeculativeJIT64 should be more precise about when it's dealing with a cell (even though it probably doesn't matter)
  8649. https://bugs.webkit.org/show_bug.cgi?id=109625
  8650. Reviewed by Mark Hahnenberg.
  8651. * dfg/DFGSpeculativeJIT64.cpp:
  8652. (JSC::DFG::SpeculativeJIT::compileObjectEquality):
  8653. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  8654. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  8655. (JSC::DFG::SpeculativeJIT::compile):
  8656. 2013-02-15 Geoffrey Garen <ggaren@apple.com>
  8657. Merged the global function cache into the source code cache
  8658. https://bugs.webkit.org/show_bug.cgi?id=108660
  8659. Reviewed by Sam Weinig.
  8660. Responding to review comments by Darin Adler.
  8661. * runtime/CodeCache.h:
  8662. (JSC::SourceCodeKey::SourceCodeKey): Don't initialize m_name and m_flags
  8663. in the hash table deleted value because they're meaningless.
  8664. 2013-02-14 Filip Pizlo <fpizlo@apple.com>
  8665. DFG AbstractState should filter operands to NewArray more precisely
  8666. https://bugs.webkit.org/show_bug.cgi?id=109900
  8667. Reviewed by Mark Hahnenberg.
  8668. NewArray for primitive indexing types speculates that the inputs are the appropriate
  8669. primitives. Now, the CFA filters the abstract state accordingly, as well.
  8670. * dfg/DFGAbstractState.cpp:
  8671. (JSC::DFG::AbstractState::execute):
  8672. 2013-02-15 Andreas Kling <akling@apple.com>
  8673. Yarr: Use OwnPtr to make pattern/disjunction/character-class ownership clearer.
  8674. <http://webkit.org/b/109218>
  8675. Reviewed by Benjamin Poulain.
  8676. - Let classes that manage lifetime of other objects hold on to them with OwnPtr instead of raw pointers.
  8677. - Placed some strategic Vector::shrinkToFit(), ::reserveInitialCapacity() and ::swap().
  8678. 668 kB progression on Membuster3.
  8679. * yarr/YarrInterpreter.cpp:
  8680. (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
  8681. (JSC::Yarr::ByteCompiler::emitDisjunction):
  8682. (ByteCompiler):
  8683. * yarr/YarrInterpreter.h:
  8684. (JSC::Yarr::BytecodePattern::BytecodePattern):
  8685. (BytecodePattern):
  8686. * yarr/YarrJIT.cpp:
  8687. (JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):
  8688. (JSC::Yarr::YarrGenerator::opCompileParentheticalAssertion):
  8689. (JSC::Yarr::YarrGenerator::opCompileBody):
  8690. * yarr/YarrPattern.cpp:
  8691. (JSC::Yarr::CharacterClassConstructor::charClass):
  8692. (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
  8693. (JSC::Yarr::YarrPatternConstructor::reset):
  8694. (JSC::Yarr::YarrPatternConstructor::atomPatternCharacter):
  8695. (JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd):
  8696. (JSC::Yarr::YarrPatternConstructor::copyDisjunction):
  8697. (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):
  8698. (JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
  8699. (JSC::Yarr::YarrPatternConstructor::optimizeBOL):
  8700. (JSC::Yarr::YarrPatternConstructor::containsCapturingTerms):
  8701. (JSC::Yarr::YarrPatternConstructor::optimizeDotStarWrappedExpressions):
  8702. * yarr/YarrPattern.h:
  8703. (JSC::Yarr::PatternDisjunction::addNewAlternative):
  8704. (PatternDisjunction):
  8705. (YarrPattern):
  8706. (JSC::Yarr::YarrPattern::reset):
  8707. (JSC::Yarr::YarrPattern::newlineCharacterClass):
  8708. (JSC::Yarr::YarrPattern::digitsCharacterClass):
  8709. (JSC::Yarr::YarrPattern::spacesCharacterClass):
  8710. (JSC::Yarr::YarrPattern::wordcharCharacterClass):
  8711. (JSC::Yarr::YarrPattern::nondigitsCharacterClass):
  8712. (JSC::Yarr::YarrPattern::nonspacesCharacterClass):
  8713. (JSC::Yarr::YarrPattern::nonwordcharCharacterClass):
  8714. 2013-02-14 Geoffrey Garen <ggaren@apple.com>
  8715. Merged the global function cache into the source code cache
  8716. https://bugs.webkit.org/show_bug.cgi?id=108660
  8717. Reviewed by Sam Weinig.
  8718. This has a few benefits:
  8719. (*) Saves a few kB by removing a second cache data structure.
  8720. (*) Reduces the worst case memory usage of the cache by 1.75X. (Heavy
  8721. use of 'new Function' and other techniques could cause us to fill
  8722. both root caches, and they didn't trade off against each other.)
  8723. (*) Paves the way for future improvements based on a non-trivial
  8724. cache key (for example, shrinkable pointer to the key string, and
  8725. more precise cache size accounting).
  8726. Also cleaned up the cache implementation and simplified it a bit.
  8727. * heap/Handle.h:
  8728. (HandleBase):
  8729. * heap/Strong.h:
  8730. (Strong): Build!
  8731. * runtime/CodeCache.cpp:
  8732. (JSC):
  8733. (JSC::CodeCache::getCodeBlock):
  8734. (JSC::CodeCache::generateFunctionCodeBlock):
  8735. (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
  8736. (JSC::CodeCache::usedFunctionCode): Updated for three interface changes:
  8737. (*) SourceCodeKey is a class, not a pair.
  8738. (*) Table values are abstract pointers, since they can be executables
  8739. or code blocks. (In a future patch, I'd like to change this so we
  8740. always store only code blocks. But that's too much for one patch.)
  8741. (*) The cache function is named "set" because it always overwrites
  8742. unconditionally.
  8743. * runtime/CodeCache.h:
  8744. (CacheMap):
  8745. (JSC::CacheMap::find):
  8746. (JSC::CacheMap::set):
  8747. (JSC::CacheMap::clear): Added support for specifying hash traits, so we
  8748. can use a SourceCodeKey.
  8749. Removed side table and random number generator to save space and reduce
  8750. complexity. Hash tables are already random, so we don't need another source
  8751. of randomness.
  8752. (SourceCodeKey):
  8753. (JSC::SourceCodeKey::SourceCodeKey):
  8754. (JSC::SourceCodeKey::isHashTableDeletedValue):
  8755. (JSC::SourceCodeKey::hash):
  8756. (JSC::SourceCodeKey::isNull):
  8757. (JSC::SourceCodeKey::operator==):
  8758. (JSC::SourceCodeKeyHash::hash):
  8759. (JSC::SourceCodeKeyHash::equal):
  8760. (SourceCodeKeyHash):
  8761. (SourceCodeKeyHashTraits):
  8762. (JSC::SourceCodeKeyHashTraits::isEmptyValue): A SourceCodeKey is just a
  8763. fancy triplet: source code string; function name (or null, for non-functions);
  8764. and flags. Flags and function name distinguish between functions and programs
  8765. with identical code, so they can live in the same cache.
  8766. I chose to use the source code string as the primary hashing reference
  8767. because it's likely to be unique. We can use profiling to choose another
  8768. technique in future, if collisions between functions and programs prove
  8769. to be hot. I suspect they won't.
  8770. (JSC::CodeCache::clear):
  8771. (CodeCache): Removed the second cache.
  8772. * heap/Handle.h:
  8773. (HandleBase):
  8774. * heap/Strong.h:
  8775. (Strong):
  8776. * runtime/CodeCache.cpp:
  8777. (JSC):
  8778. (JSC::CodeCache::getCodeBlock):
  8779. (JSC::CodeCache::generateFunctionCodeBlock):
  8780. (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
  8781. (JSC::CodeCache::usedFunctionCode):
  8782. * runtime/CodeCache.h:
  8783. (JSC):
  8784. (CacheMap):
  8785. (JSC::CacheMap::find):
  8786. (JSC::CacheMap::set):
  8787. (JSC::CacheMap::clear):
  8788. (SourceCodeKey):
  8789. (JSC::SourceCodeKey::SourceCodeKey):
  8790. (JSC::SourceCodeKey::isHashTableDeletedValue):
  8791. (JSC::SourceCodeKey::hash):
  8792. (JSC::SourceCodeKey::isNull):
  8793. (JSC::SourceCodeKey::operator==):
  8794. (JSC::SourceCodeKeyHash::hash):
  8795. (JSC::SourceCodeKeyHash::equal):
  8796. (SourceCodeKeyHash):
  8797. (SourceCodeKeyHashTraits):
  8798. (JSC::SourceCodeKeyHashTraits::isEmptyValue):
  8799. (JSC::CodeCache::clear):
  8800. (CodeCache):
  8801. 2013-02-14 Tony Chang <tony@chromium.org>
  8802. Unreviewed, set svn:eol-style native for .sln, .vcproj, and .vsprops files.
  8803. https://bugs.webkit.org/show_bug.cgi?id=96934
  8804. * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style.
  8805. * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style.
  8806. * JavaScriptCore.vcproj/testRegExp/testRegExpCommon.vsprops: Added property svn:eol-style.
  8807. * JavaScriptCore.vcproj/testRegExp/testRegExpDebug.vsprops: Added property svn:eol-style.
  8808. * JavaScriptCore.vcproj/testRegExp/testRegExpDebugAll.vsprops: Added property svn:eol-style.
  8809. * JavaScriptCore.vcproj/testRegExp/testRegExpDebugCairoCFLite.vsprops: Added property svn:eol-style.
  8810. * JavaScriptCore.vcproj/testRegExp/testRegExpProduction.vsprops: Added property svn:eol-style.
  8811. * JavaScriptCore.vcproj/testRegExp/testRegExpRelease.vsprops: Added property svn:eol-style.
  8812. * JavaScriptCore.vcproj/testRegExp/testRegExpReleaseCairoCFLite.vsprops: Added property svn:eol-style.
  8813. * JavaScriptCore.vcproj/testRegExp/testRegExpReleasePGO.vsprops: Added property svn:eol-style.
  8814. 2013-02-14 Tony Chang <tony@chromium.org>
  8815. Unreviewed, set svn:eol-style CRLF for .sln files.
  8816. * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style.
  8817. * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style.
  8818. 2013-02-14 David Kilzer <ddkilzer@apple.com>
  8819. [Mac] Clean up WARNING_CFLAGS
  8820. <http://webkit.org/b/109747>
  8821. <rdar://problem/13208373>
  8822. Reviewed by Mark Rowe.
  8823. * Configurations/Base.xcconfig: Use
  8824. GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable
  8825. -Wshorten-64-to-32 rather than WARNING_CFLAGS.
  8826. * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style.
  8827. * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style.
  8828. 2013-02-13 Anders Carlsson <andersca@apple.com>
  8829. Better build fix.
  8830. * API/tests/testapi.c:
  8831. (assertEqualsAsNumber):
  8832. (main):
  8833. 2013-02-13 Roger Fong <roger_fong@apple.com>
  8834. Unreviewed. Build fix.
  8835. * API/tests/testapi.c:
  8836. (assertEqualsAsNumber):
  8837. (main):
  8838. 2013-02-13 Oliver Hunt <oliver@apple.com>
  8839. Yet another build fix
  8840. * bytecode/CodeBlock.cpp:
  8841. (JSC::CodeBlock::CodeBlock):
  8842. 2013-02-13 Zan Dobersek <zdobersek@igalia.com>
  8843. The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
  8844. https://bugs.webkit.org/show_bug.cgi?id=109325
  8845. Reviewed by Anders Carlsson.
  8846. Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
  8847. two methods as they're provided by the C++ standard library being used.
  8848. * API/JSValueRef.cpp:
  8849. (JSValueMakeNumber):
  8850. * JSCTypedArrayStubs.h:
  8851. (JSC):
  8852. * bytecompiler/BytecodeGenerator.cpp:
  8853. (JSC::BytecodeGenerator::emitLoad):
  8854. * dfg/DFGByteCodeParser.cpp:
  8855. (JSC::DFG::ByteCodeParser::constantNaN):
  8856. * offlineasm/cloop.rb:
  8857. * runtime/DateConstructor.cpp:
  8858. (JSC::dateUTC): Also include an opportunistic style fix.
  8859. * runtime/DateInstance.cpp:
  8860. (JSC::DateInstance::calculateGregorianDateTime):
  8861. (JSC::DateInstance::calculateGregorianDateTimeUTC):
  8862. * runtime/DatePrototype.cpp:
  8863. (JSC::dateProtoFuncGetMilliSeconds):
  8864. (JSC::dateProtoFuncGetUTCMilliseconds):
  8865. (JSC::setNewValueFromTimeArgs):
  8866. (JSC::setNewValueFromDateArgs):
  8867. (JSC::dateProtoFuncSetYear):
  8868. * runtime/JSCJSValue.cpp:
  8869. (JSC::JSValue::toInteger):
  8870. * runtime/JSDateMath.cpp:
  8871. (JSC::getUTCOffset):
  8872. (JSC::parseDateFromNullTerminatedCharacters):
  8873. (JSC::parseDate):
  8874. * runtime/JSGlobalObjectFunctions.cpp:
  8875. (JSC::globalFuncIsNaN):
  8876. * runtime/MathObject.cpp:
  8877. (JSC::mathProtoFuncMax):
  8878. (JSC::mathProtoFuncMin):
  8879. (JSC::mathProtoFuncPow):
  8880. * runtime/PropertyDescriptor.cpp:
  8881. (JSC::sameValue):
  8882. 2013-02-13 Filip Pizlo <fpizlo@apple.com>
  8883. Change another use of (SpecCell & ~SpecString) to SpecObject.
  8884. Reviewed by Mark Hahnenberg.
  8885. * dfg/DFGAbstractState.cpp:
  8886. (JSC::DFG::AbstractState::execute):
  8887. 2013-02-13 Filip Pizlo <fpizlo@apple.com>
  8888. ForwardInt32ToDouble is not in DFG::MinifiedNode's list of relevant node types
  8889. https://bugs.webkit.org/show_bug.cgi?id=109726
  8890. Reviewed by Mark Hahnenberg.
  8891. If you add it to the list of relevant node types, you also need to make sure
  8892. it's listed as either hasChild or one of the other kinds. Otherwise you get
  8893. an assertion. This is causing test failures in run-javascriptcore-tests.
  8894. * dfg/DFGMinifiedNode.h:
  8895. (JSC::DFG::MinifiedNode::hasChild):
  8896. 2013-02-13 Oliver Hunt <oliver@apple.com>
  8897. Build fix.
  8898. Rearranged the code somewhat to reduce the number of
  8899. DFG related ifdefs.
  8900. * bytecode/CodeBlock.cpp:
  8901. (JSC::CodeBlock::CodeBlock):
  8902. 2013-02-13 Filip Pizlo <fpizlo@apple.com>
  8903. ForwardInt32ToDouble is not in DFG::MinifiedNode's list of relevant node types
  8904. https://bugs.webkit.org/show_bug.cgi?id=109726
  8905. Reviewed by Gavin Barraclough.
  8906. This is asymptomatic because ForwardInt32ToDouble is only used in SetLocals, in
  8907. which case the value is already stored to the stack. Still, we should fix this.
  8908. * dfg/DFGMinifiedNode.h:
  8909. (JSC::DFG::belongsInMinifiedGraph):
  8910. 2013-02-12 Filip Pizlo <fpizlo@apple.com>
  8911. DFG LogicalNot/Branch peephole removal and inversion ignores the possibility of things exiting
  8912. https://bugs.webkit.org/show_bug.cgi?id=109489
  8913. Reviewed by Mark Hahnenberg.
  8914. If things can exit between the LogicalNot and the Branch then don't peephole.
  8915. * dfg/DFGFixupPhase.cpp:
  8916. (JSC::DFG::FixupPhase::fixupNode):
  8917. 2013-02-13 Oliver Hunt <oliver@apple.com>
  8918. Remove unnecessary indirection to non-local variable access operations
  8919. https://bugs.webkit.org/show_bug.cgi?id=109724
  8920. Reviewed by Filip Pizlo.
  8921. Linked bytecode now stores a direct pointer to the resolve operation
  8922. vectors, so the interpreter no longer needs a bunch of indirection to
  8923. to perform non-local lookup.
  8924. * bytecode/CodeBlock.cpp:
  8925. (JSC::CodeBlock::CodeBlock):
  8926. * bytecode/CodeBlock.h:
  8927. (CodeBlock):
  8928. * bytecode/Instruction.h:
  8929. * dfg/DFGByteCodeParser.cpp:
  8930. (ByteCodeParser):
  8931. (InlineStackEntry):
  8932. (JSC::DFG::ByteCodeParser::parseResolveOperations):
  8933. (JSC::DFG::ByteCodeParser::parseBlock):
  8934. (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
  8935. * dfg/DFGCapabilities.h:
  8936. (JSC::DFG::canInlineOpcode):
  8937. * dfg/DFGGraph.h:
  8938. (ResolveGlobalData):
  8939. (ResolveOperationData):
  8940. (PutToBaseOperationData):
  8941. * dfg/DFGSpeculativeJIT.h:
  8942. * dfg/DFGSpeculativeJIT32_64.cpp:
  8943. (JSC::DFG::SpeculativeJIT::compile):
  8944. * dfg/DFGSpeculativeJIT64.cpp:
  8945. (JSC::DFG::SpeculativeJIT::compile):
  8946. * jit/JITOpcodes.cpp:
  8947. (JSC::JIT::emit_op_put_to_base):
  8948. (JSC::JIT::emit_op_resolve):
  8949. (JSC::JIT::emitSlow_op_resolve):
  8950. (JSC::JIT::emit_op_resolve_base):
  8951. (JSC::JIT::emitSlow_op_resolve_base):
  8952. (JSC::JIT::emit_op_resolve_with_base):
  8953. (JSC::JIT::emitSlow_op_resolve_with_base):
  8954. (JSC::JIT::emit_op_resolve_with_this):
  8955. (JSC::JIT::emitSlow_op_resolve_with_this):
  8956. (JSC::JIT::emitSlow_op_put_to_base):
  8957. * jit/JITOpcodes32_64.cpp:
  8958. (JSC::JIT::emit_op_put_to_base):
  8959. * llint/LLIntSlowPaths.cpp:
  8960. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  8961. * llint/LowLevelInterpreter.asm:
  8962. 2013-02-13 Zoltan Herczeg <zherczeg@webkit.org>
  8963. replaceWithJump should not decrease the offset by 1 on ARM traditional.
  8964. https://bugs.webkit.org/show_bug.cgi?id=109689
  8965. Reviewed by Oliver Hunt.
  8966. * assembler/ARMAssembler.h:
  8967. (JSC::ARMAssembler::replaceWithJump):
  8968. 2013-02-12 Joseph Pecoraro <pecoraro@apple.com>
  8969. [iOS] Enable PAGE_VISIBILITY_API
  8970. https://bugs.webkit.org/show_bug.cgi?id=109399
  8971. Reviewed by David Kilzer.
  8972. * Configurations/FeatureDefines.xcconfig:
  8973. 2013-02-12 Filip Pizlo <fpizlo@apple.com>
  8974. Renamed SpecObjectMask to SpecObject.
  8975. Rubber stamped by Mark Hahnenberg.
  8976. "SpecObjectMask" is a weird name considering that a bunch of the other speculated
  8977. types are also masks, but don't have "Mask" in the name.
  8978. * bytecode/SpeculatedType.h:
  8979. (JSC):
  8980. (JSC::isObjectSpeculation):
  8981. (JSC::isObjectOrOtherSpeculation):
  8982. * dfg/DFGAbstractState.cpp:
  8983. (JSC::DFG::AbstractState::execute):
  8984. * dfg/DFGPredictionPropagationPhase.cpp:
  8985. (JSC::DFG::PredictionPropagationPhase::propagate):
  8986. * dfg/DFGSpeculativeJIT.cpp:
  8987. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
  8988. * dfg/DFGSpeculativeJIT32_64.cpp:
  8989. (JSC::DFG::SpeculativeJIT::compileObjectEquality):
  8990. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  8991. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  8992. * dfg/DFGSpeculativeJIT64.cpp:
  8993. (JSC::DFG::SpeculativeJIT::compileObjectEquality):
  8994. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  8995. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  8996. 2013-02-12 Filip Pizlo <fpizlo@apple.com>
  8997. DFG CFA doesn't filter precisely enough for CompareStrictEq
  8998. https://bugs.webkit.org/show_bug.cgi?id=109618
  8999. Reviewed by Mark Hahnenberg.
  9000. The backend speculates object for this case, but the CFA was filtering on
  9001. (SpecCell & ~SpecString) | SpecOther.
  9002. * dfg/DFGAbstractState.cpp:
  9003. (JSC::DFG::AbstractState::execute):
  9004. 2013-02-12 Martin Robinson <mrobinson@igalia.com>
  9005. Fix the gyp build of JavaScriptCore.
  9006. * JavaScriptCore.gypi: Added some missing DFG files to the source list.
  9007. 2013-02-12 Sheriff Bot <webkit.review.bot@gmail.com>
  9008. Unreviewed, rolling out r142387.
  9009. http://trac.webkit.org/changeset/142387
  9010. https://bugs.webkit.org/show_bug.cgi?id=109601
  9011. caused all layout and jscore tests on windows to fail
  9012. (Requested by kling on #webkit).
  9013. * bytecode/UnlinkedCodeBlock.cpp:
  9014. (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
  9015. * bytecode/UnlinkedCodeBlock.h:
  9016. (UnlinkedCodeBlock):
  9017. 2013-02-11 Filip Pizlo <fpizlo@apple.com>
  9018. DFG CompareEq optimization should be retuned
  9019. https://bugs.webkit.org/show_bug.cgi?id=109545
  9020. Reviewed by Mark Hahnenberg.
  9021. - Made the object-to-object equality case work again by hoisting the if statement
  9022. for it. Previously, object-to-object equality would be compiled as
  9023. object-to-object-or-other.
  9024. - Added AbstractState guards for most of the type checks that the object equality
  9025. code uses.
  9026. Looks like a hint of a speed-up on all of the things.
  9027. * dfg/DFGAbstractState.cpp:
  9028. (JSC::DFG::AbstractState::execute):
  9029. * dfg/DFGSpeculativeJIT.cpp:
  9030. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
  9031. (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
  9032. (JSC::DFG::SpeculativeJIT::compare):
  9033. * dfg/DFGSpeculativeJIT32_64.cpp:
  9034. (JSC::DFG::SpeculativeJIT::compileObjectEquality):
  9035. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  9036. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  9037. * dfg/DFGSpeculativeJIT64.cpp:
  9038. (JSC::DFG::SpeculativeJIT::compileObjectEquality):
  9039. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  9040. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  9041. 2013-02-12 Gabor Rapcsanyi <rgabor@webkit.org>
  9042. JSC asserting with long parameter list functions in debug mode on ARM traditional
  9043. https://bugs.webkit.org/show_bug.cgi?id=109565
  9044. Reviewed by Zoltan Herczeg.
  9045. Increase the value of sequenceGetByIdSlowCaseInstructionSpace to 80.
  9046. * jit/JIT.h:
  9047. 2013-02-11 Oliver Hunt <oliver@apple.com>
  9048. Make JSC API more NULL tolerant
  9049. https://bugs.webkit.org/show_bug.cgi?id=109515
  9050. Reviewed by Mark Hahnenberg.
  9051. We do so much marshalling for the C API these days anyway that a single null
  9052. check isn't a performance issue. Yet the existing "null is unsafe" behaviour
  9053. leads to crashes in embedding applications whenever there's an untested code
  9054. path, so it seems having defined behaviour is superior.
  9055. * API/APICast.h:
  9056. (toJS):
  9057. (toJSForGC):
  9058. * API/JSObjectRef.cpp:
  9059. (JSObjectIsFunction):
  9060. (JSObjectCallAsFunction):
  9061. (JSObjectIsConstructor):
  9062. (JSObjectCallAsConstructor):
  9063. * API/tests/testapi.c:
  9064. (main):
  9065. 2013-02-11 Filip Pizlo <fpizlo@apple.com>
  9066. Unreviewed, adding a FIXME to remind ourselves of a bug.
  9067. https://bugs.webkit.org/show_bug.cgi?id=109487
  9068. * dfg/DFGSpeculativeJIT.cpp:
  9069. (JSC::DFG::SpeculativeJIT::compileStrictEqForConstant):
  9070. 2013-02-11 Filip Pizlo <fpizlo@apple.com>
  9071. Strange bug in DFG OSR in JSC
  9072. https://bugs.webkit.org/show_bug.cgi?id=109491
  9073. Reviewed by Mark Hahnenberg.
  9074. Int32ToDouble was being injected after a side-effecting operation and before a SetLocal. Anytime we
  9075. inject something just before a SetLocal we should be aware that the previous operation may have been
  9076. a side-effect associated with the current code origin. Hence, we should use a forward exit.
  9077. Int32ToDouble does not do forward exits by default.
  9078. This patch adds a forward-exiting form of Int32ToDouble, for use in SetLocal Int32ToDouble injections.
  9079. Changed the CSE and other things to treat these nodes identically, but for the exit strategy to be
  9080. distinct (Int32ToDouble -> backward, ForwardInt32ToDouble -> forward). The use of the NodeType for
  9081. signaling exit direction is not "great" but it's what we use in other places already (like
  9082. ForwardCheckStructure).
  9083. * dfg/DFGAbstractState.cpp:
  9084. (JSC::DFG::AbstractState::execute):
  9085. * dfg/DFGCSEPhase.cpp:
  9086. (JSC::DFG::CSEPhase::int32ToDoubleCSE):
  9087. (CSEPhase):
  9088. (JSC::DFG::CSEPhase::performNodeCSE):
  9089. * dfg/DFGCommon.h:
  9090. * dfg/DFGFixupPhase.cpp:
  9091. (JSC::DFG::FixupPhase::fixupNode):
  9092. (JSC::DFG::FixupPhase::fixDoubleEdge):
  9093. (JSC::DFG::FixupPhase::injectInt32ToDoubleNode):
  9094. * dfg/DFGNode.h:
  9095. (JSC::DFG::Node::willHaveCodeGenOrOSR):
  9096. * dfg/DFGNodeType.h:
  9097. (DFG):
  9098. * dfg/DFGPredictionPropagationPhase.cpp:
  9099. (JSC::DFG::PredictionPropagationPhase::propagate):
  9100. * dfg/DFGSpeculativeJIT.cpp:
  9101. (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
  9102. (JSC::DFG::SpeculativeJIT::compileInt32ToDouble):
  9103. * dfg/DFGSpeculativeJIT.h:
  9104. * dfg/DFGSpeculativeJIT32_64.cpp:
  9105. (JSC::DFG::SpeculativeJIT::compile):
  9106. * dfg/DFGSpeculativeJIT64.cpp:
  9107. (JSC::DFG::SpeculativeJIT::compile):
  9108. * dfg/DFGVariableEventStream.cpp:
  9109. (JSC::DFG::VariableEventStream::reconstruct):
  9110. 2013-02-11 Filip Pizlo <fpizlo@apple.com>
  9111. NonStringCell and Object are practically the same thing for the purpose of speculation
  9112. https://bugs.webkit.org/show_bug.cgi?id=109492
  9113. Reviewed by Mark Hahnenberg.
  9114. Removed isNonStringCellSpeculation, and made all callers use isObjectSpeculation.
  9115. Changed isNonStringCellOrOtherSpeculation to be isObjectOrOtherSpeculation.
  9116. I believe this is correct because even weird object types like JSNotAnObject end up
  9117. being "objects" from the standpoint of our typesystem. Anyway, the assumption that
  9118. "is cell but not a string" equates to "object" is an assumption that is already made
  9119. in other places in the system so there's little value in being paranoid about it.
  9120. * bytecode/SpeculatedType.h:
  9121. (JSC::isObjectSpeculation):
  9122. (JSC::isObjectOrOtherSpeculation):
  9123. * dfg/DFGAbstractState.cpp:
  9124. (JSC::DFG::AbstractState::execute):
  9125. * dfg/DFGNode.h:
  9126. (Node):
  9127. (JSC::DFG::Node::shouldSpeculateObjectOrOther):
  9128. * dfg/DFGSpeculativeJIT.cpp:
  9129. (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
  9130. (JSC::DFG::SpeculativeJIT::compare):
  9131. (JSC::DFG::SpeculativeJIT::compileStrictEq):
  9132. * dfg/DFGSpeculativeJIT.h:
  9133. (SpeculativeJIT):
  9134. * dfg/DFGSpeculativeJIT32_64.cpp:
  9135. (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
  9136. (JSC::DFG::SpeculativeJIT::compileLogicalNot):
  9137. (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
  9138. (JSC::DFG::SpeculativeJIT::emitBranch):
  9139. (JSC::DFG::SpeculativeJIT::compile):
  9140. * dfg/DFGSpeculativeJIT64.cpp:
  9141. (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
  9142. (JSC::DFG::SpeculativeJIT::compileLogicalNot):
  9143. (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
  9144. (JSC::DFG::SpeculativeJIT::emitBranch):
  9145. (JSC::DFG::SpeculativeJIT::compile):
  9146. 2013-02-10 Filip Pizlo <fpizlo@apple.com>
  9147. DFG CompareEq(a, null) and CompareStrictEq(a, const) are unsound with respect to constant folding
  9148. https://bugs.webkit.org/show_bug.cgi?id=109387
  9149. Reviewed by Oliver Hunt and Mark Hahnenberg.
  9150. Lock in the decision to use a non-speculative constant comparison as early as possible
  9151. and don't let the CFA change it by folding constants. This might be a performance
  9152. penalty on some really weird code (FWIW, I haven't seen this on benchmarks), but on
  9153. the other hand it completely side-steps the unsoundness that the bug speaks of.
  9154. Rolling back in after adding 32-bit path.
  9155. * dfg/DFGAbstractState.cpp:
  9156. (JSC::DFG::AbstractState::execute):
  9157. * dfg/DFGByteCodeParser.cpp:
  9158. (JSC::DFG::ByteCodeParser::isConstantForCompareStrictEq):
  9159. (ByteCodeParser):
  9160. (JSC::DFG::ByteCodeParser::parseBlock):
  9161. * dfg/DFGCSEPhase.cpp:
  9162. (JSC::DFG::CSEPhase::performNodeCSE):
  9163. * dfg/DFGNodeType.h:
  9164. (DFG):
  9165. * dfg/DFGPredictionPropagationPhase.cpp:
  9166. (JSC::DFG::PredictionPropagationPhase::propagate):
  9167. * dfg/DFGSpeculativeJIT.cpp:
  9168. (JSC::DFG::SpeculativeJIT::compileStrictEq):
  9169. * dfg/DFGSpeculativeJIT32_64.cpp:
  9170. (JSC::DFG::SpeculativeJIT::compile):
  9171. * dfg/DFGSpeculativeJIT64.cpp:
  9172. (JSC::DFG::SpeculativeJIT::compile):
  9173. 2013-02-10 Filip Pizlo <fpizlo@apple.com>
  9174. DFG TypeOf implementation should have its backend code aligned to what the CFA does
  9175. https://bugs.webkit.org/show_bug.cgi?id=109385
  9176. Reviewed by Sam Weinig.
  9177. The problem was that if we ended up trying to constant fold, but didn't succeed
  9178. because of prediction mismatches, then we would also fail to do filtration.
  9179. Rearranged the control flow in the CFA to fix that.
  9180. As far as I know, this is asymptomatic - it's sort of OK for the CFA to prove less
  9181. things, which is what the bug was.
  9182. * dfg/DFGAbstractState.cpp:
  9183. (JSC::DFG::AbstractState::execute):
  9184. 2013-02-11 Sheriff Bot <webkit.review.bot@gmail.com>
  9185. Unreviewed, rolling out r142491.
  9186. http://trac.webkit.org/changeset/142491
  9187. https://bugs.webkit.org/show_bug.cgi?id=109470
  9188. broke the 32 bit build (Requested by jessieberlin on #webkit).
  9189. * dfg/DFGAbstractState.cpp:
  9190. (JSC::DFG::AbstractState::execute):
  9191. * dfg/DFGByteCodeParser.cpp:
  9192. (JSC::DFG::ByteCodeParser::parseBlock):
  9193. * dfg/DFGCSEPhase.cpp:
  9194. (JSC::DFG::CSEPhase::performNodeCSE):
  9195. * dfg/DFGNodeType.h:
  9196. (DFG):
  9197. * dfg/DFGPredictionPropagationPhase.cpp:
  9198. (JSC::DFG::PredictionPropagationPhase::propagate):
  9199. * dfg/DFGSpeculativeJIT.cpp:
  9200. (JSC::DFG::SpeculativeJIT::compileStrictEq):
  9201. * dfg/DFGSpeculativeJIT64.cpp:
  9202. (JSC::DFG::SpeculativeJIT::compile):
  9203. 2013-02-10 Filip Pizlo <fpizlo@apple.com>
  9204. DFG CompareEq(a, null) and CompareStrictEq(a, const) are unsound with respect to constant folding
  9205. https://bugs.webkit.org/show_bug.cgi?id=109387
  9206. Reviewed by Oliver Hunt.
  9207. Lock in the decision to use a non-speculative constant comparison as early as possible
  9208. and don't let the CFA change it by folding constants. This might be a performance
  9209. penalty on some really weird code (FWIW, I haven't seen this on benchmarks), but on
  9210. the other hand it completely side-steps the unsoundness that the bug speaks of.
  9211. * dfg/DFGAbstractState.cpp:
  9212. (JSC::DFG::AbstractState::execute):
  9213. * dfg/DFGByteCodeParser.cpp:
  9214. (JSC::DFG::ByteCodeParser::isConstantForCompareStrictEq):
  9215. (ByteCodeParser):
  9216. (JSC::DFG::ByteCodeParser::parseBlock):
  9217. * dfg/DFGCSEPhase.cpp:
  9218. (JSC::DFG::CSEPhase::performNodeCSE):
  9219. * dfg/DFGNodeType.h:
  9220. (DFG):
  9221. * dfg/DFGPredictionPropagationPhase.cpp:
  9222. (JSC::DFG::PredictionPropagationPhase::propagate):
  9223. * dfg/DFGSpeculativeJIT.cpp:
  9224. (JSC::DFG::SpeculativeJIT::compileStrictEq):
  9225. * dfg/DFGSpeculativeJIT64.cpp:
  9226. (JSC::DFG::SpeculativeJIT::compile):
  9227. 2013-02-11 Csaba Osztrogonác <ossy@webkit.org>
  9228. Unreviewed fix after r13954 for !ENABLE(JIT) builds.
  9229. * llint/LowLevelInterpreter.cpp:
  9230. 2013-02-11 Gabor Rapcsanyi <rgabor@webkit.org>
  9231. JSC build failing with verbose debug mode
  9232. https://bugs.webkit.org/show_bug.cgi?id=109441
  9233. Reviewed by Darin Adler.
  9234. Fixing some verbose messages which caused build errors.
  9235. * dfg/DFGAbstractState.cpp:
  9236. (JSC::DFG::AbstractState::mergeToSuccessors):
  9237. * dfg/DFGCFAPhase.cpp:
  9238. (JSC::DFG::CFAPhase::performBlockCFA):
  9239. * dfg/DFGCSEPhase.cpp:
  9240. (JSC::DFG::CSEPhase::setReplacement):
  9241. (JSC::DFG::CSEPhase::eliminate):
  9242. * dfg/DFGPredictionInjectionPhase.cpp:
  9243. (JSC::DFG::PredictionInjectionPhase::run):
  9244. 2013-02-10 Martin Robinson <mrobinson@igalia.com>
  9245. Fix the GTK+ gyp build
  9246. * JavaScriptCore.gypi: Update the source list to accurately
  9247. reflect what's in the repository and remove the offsets extractor
  9248. from the list of JavaScriptCore files. It's only used to build
  9249. the extractor binary.
  9250. 2013-02-09 Andreas Kling <akling@apple.com>
  9251. Shrink-wrap UnlinkedCodeBlock members.
  9252. <http://webkit.org/b/109368>
  9253. Reviewed by Oliver Hunt.
  9254. Rearrange the members of UnlinkedCodeBlock to avoid unnecessary padding on 64-bit.
  9255. Knocks ~600 KB off of the Membuster3 peak.
  9256. * bytecode/UnlinkedCodeBlock.cpp:
  9257. (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
  9258. * bytecode/UnlinkedCodeBlock.h:
  9259. (UnlinkedCodeBlock):
  9260. 2013-02-08 Filip Pizlo <fpizlo@apple.com>
  9261. DFG should allow phases to break Phi's and then have one phase to rebuild them
  9262. https://bugs.webkit.org/show_bug.cgi?id=108414
  9263. Reviewed by Mark Hahnenberg.
  9264. Introduces two new DFG forms: LoadStore and ThreadedCPS. These are described in
  9265. detail in DFGCommon.h.
  9266. Consequently, DFG phases no longer have to worry about preserving data flow
  9267. links between basic blocks. It is generally always safe to request that the
  9268. graph be dethreaded (Graph::dethread), which brings it into LoadStore form, where
  9269. the data flow is implicit. In this form, only liveness-at-head needs to be
  9270. preserved.
  9271. All of the machinery for "threading" the graph to introduce data flow between
  9272. blocks is now moved out of the bytecode parser and into the CPSRethreadingPhase.
  9273. All phases that previously did this maintenance themselves now just rely on
  9274. being able to dethread the graph. The one exception is the structure check
  9275. hoising phase, which operates over a threaded graph and preserves it, for the
  9276. sake of performance.
  9277. Also moved two other things into their own phases: unification (previously found
  9278. in the parser) and prediction injection (previously found in various places).
  9279. * CMakeLists.txt:
  9280. * GNUmakefile.list.am:
  9281. * JavaScriptCore.xcodeproj/project.pbxproj:
  9282. * Target.pri:
  9283. * bytecode/Operands.h:
  9284. (Operands):
  9285. (JSC::Operands::sizeFor):
  9286. (JSC::Operands::atFor):
  9287. * dfg/DFGAbstractState.cpp:
  9288. (JSC::DFG::AbstractState::execute):
  9289. (JSC::DFG::AbstractState::mergeStateAtTail):
  9290. * dfg/DFGAllocator.h:
  9291. (JSC::DFG::::allocateSlow):
  9292. * dfg/DFGArgumentsSimplificationPhase.cpp:
  9293. (JSC::DFG::ArgumentsSimplificationPhase::run):
  9294. * dfg/DFGBasicBlockInlines.h:
  9295. (DFG):
  9296. * dfg/DFGByteCodeParser.cpp:
  9297. (JSC::DFG::ByteCodeParser::getLocal):
  9298. (JSC::DFG::ByteCodeParser::getArgument):
  9299. (JSC::DFG::ByteCodeParser::flushDirect):
  9300. (JSC::DFG::ByteCodeParser::parseBlock):
  9301. (DFG):
  9302. (JSC::DFG::ByteCodeParser::parse):
  9303. * dfg/DFGCFGSimplificationPhase.cpp:
  9304. (JSC::DFG::CFGSimplificationPhase::run):
  9305. (JSC::DFG::CFGSimplificationPhase::killUnreachable):
  9306. (JSC::DFG::CFGSimplificationPhase::keepOperandAlive):
  9307. (CFGSimplificationPhase):
  9308. (JSC::DFG::CFGSimplificationPhase::fixJettisonedPredecessors):
  9309. (JSC::DFG::CFGSimplificationPhase::mergeBlocks):
  9310. * dfg/DFGCPSRethreadingPhase.cpp: Added.
  9311. (DFG):
  9312. (CPSRethreadingPhase):
  9313. (JSC::DFG::CPSRethreadingPhase::CPSRethreadingPhase):
  9314. (JSC::DFG::CPSRethreadingPhase::run):
  9315. (JSC::DFG::CPSRethreadingPhase::freeUnnecessaryNodes):
  9316. (JSC::DFG::CPSRethreadingPhase::clearVariablesAtHeadAndTail):
  9317. (JSC::DFG::CPSRethreadingPhase::addPhiSilently):
  9318. (JSC::DFG::CPSRethreadingPhase::addPhi):
  9319. (JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocalFor):
  9320. (JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocal):
  9321. (JSC::DFG::CPSRethreadingPhase::canonicalizeSetLocal):
  9322. (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor):
  9323. (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocal):
  9324. (JSC::DFG::CPSRethreadingPhase::canonicalizeSetArgument):
  9325. (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock):
  9326. (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlocks):
  9327. (JSC::DFG::CPSRethreadingPhase::propagatePhis):
  9328. (JSC::DFG::CPSRethreadingPhase::PhiStackEntry::PhiStackEntry):
  9329. (PhiStackEntry):
  9330. (JSC::DFG::CPSRethreadingPhase::phiStackFor):
  9331. (JSC::DFG::performCPSRethreading):
  9332. * dfg/DFGCPSRethreadingPhase.h: Added.
  9333. (DFG):
  9334. * dfg/DFGCSEPhase.cpp:
  9335. (CSEPhase):
  9336. (JSC::DFG::CSEPhase::performNodeCSE):
  9337. * dfg/DFGCommon.cpp:
  9338. (WTF):
  9339. (WTF::printInternal):
  9340. * dfg/DFGCommon.h:
  9341. (JSC::DFG::logCompilationChanges):
  9342. (DFG):
  9343. (WTF):
  9344. * dfg/DFGConstantFoldingPhase.cpp:
  9345. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  9346. * dfg/DFGDriver.cpp:
  9347. (JSC::DFG::compile):
  9348. * dfg/DFGGraph.cpp:
  9349. (JSC::DFG::Graph::Graph):
  9350. (JSC::DFG::Graph::dump):
  9351. (JSC::DFG::Graph::dethread):
  9352. (JSC::DFG::Graph::collectGarbage):
  9353. * dfg/DFGGraph.h:
  9354. (JSC::DFG::Graph::performSubstitution):
  9355. (Graph):
  9356. (JSC::DFG::Graph::performSubstitutionForEdge):
  9357. (JSC::DFG::Graph::convertToConstant):
  9358. * dfg/DFGNode.h:
  9359. (JSC::DFG::Node::convertToPhantomLocal):
  9360. (Node):
  9361. (JSC::DFG::Node::convertToGetLocal):
  9362. (JSC::DFG::Node::hasVariableAccessData):
  9363. * dfg/DFGNodeType.h:
  9364. (DFG):
  9365. * dfg/DFGPhase.cpp:
  9366. (JSC::DFG::Phase::beginPhase):
  9367. * dfg/DFGPhase.h:
  9368. (JSC::DFG::runAndLog):
  9369. * dfg/DFGPredictionInjectionPhase.cpp: Added.
  9370. (DFG):
  9371. (PredictionInjectionPhase):
  9372. (JSC::DFG::PredictionInjectionPhase::PredictionInjectionPhase):
  9373. (JSC::DFG::PredictionInjectionPhase::run):
  9374. (JSC::DFG::performPredictionInjection):
  9375. * dfg/DFGPredictionInjectionPhase.h: Added.
  9376. (DFG):
  9377. * dfg/DFGPredictionPropagationPhase.cpp:
  9378. (JSC::DFG::PredictionPropagationPhase::run):
  9379. (JSC::DFG::PredictionPropagationPhase::propagate):
  9380. * dfg/DFGSpeculativeJIT32_64.cpp:
  9381. (JSC::DFG::SpeculativeJIT::compile):
  9382. * dfg/DFGSpeculativeJIT64.cpp:
  9383. (JSC::DFG::SpeculativeJIT::compile):
  9384. * dfg/DFGStructureCheckHoistingPhase.cpp:
  9385. (JSC::DFG::StructureCheckHoistingPhase::run):
  9386. * dfg/DFGUnificationPhase.cpp: Added.
  9387. (DFG):
  9388. (UnificationPhase):
  9389. (JSC::DFG::UnificationPhase::UnificationPhase):
  9390. (JSC::DFG::UnificationPhase::run):
  9391. (JSC::DFG::performUnification):
  9392. * dfg/DFGUnificationPhase.h: Added.
  9393. (DFG):
  9394. * dfg/DFGValidate.cpp:
  9395. (JSC::DFG::Validate::validate):
  9396. (JSC::DFG::Validate::dumpGraphIfAppropriate):
  9397. * dfg/DFGVirtualRegisterAllocationPhase.cpp:
  9398. (JSC::DFG::VirtualRegisterAllocationPhase::run):
  9399. * llint/LLIntSlowPaths.cpp:
  9400. (JSC::LLInt::setUpCall):
  9401. * runtime/JSCJSValue.cpp:
  9402. (JSC::JSValue::dump):
  9403. * runtime/JSString.h:
  9404. (JSString):
  9405. * runtime/Options.h:
  9406. (JSC):
  9407. 2013-02-08 Jer Noble <jer.noble@apple.com>
  9408. Bring WebKit up to speed with latest Encrypted Media spec.
  9409. https://bugs.webkit.org/show_bug.cgi?id=97037
  9410. Reviewed by Eric Carlson.
  9411. Define the ENABLE_ENCRYPTED_MEDIA_V2 setting.
  9412. * Configurations/FeatureDefines.xcconfig:
  9413. 2013-02-08 Gavin Barraclough <barraclough@apple.com>
  9414. Objective-C API for JavaScriptCore
  9415. https://bugs.webkit.org/show_bug.cgi?id=105889
  9416. Reviewed by Joseph Pecoraro
  9417. Following up on review comments, mostly typos.
  9418. * API/JSBlockAdaptor.h:
  9419. * API/JSBlockAdaptor.mm:
  9420. (-[JSBlockAdaptor blockFromValue:inContext:withException:]):
  9421. * API/JSContext.h:
  9422. * API/JSExport.h:
  9423. * API/JSValue.h:
  9424. * API/JSValue.mm:
  9425. * API/JSWrapperMap.mm:
  9426. (selectorToPropertyName):
  9427. (-[JSWrapperMap classInfoForClass:]):
  9428. (-[JSWrapperMap wrapperForObject:]):
  9429. 2013-02-08 Martin Robinson <mrobinson@igalia.com>
  9430. [GTK] Add an experimental gyp build
  9431. https://bugs.webkit.org/show_bug.cgi?id=109003
  9432. Reviewed by Gustavo Noronha Silva.
  9433. * JavaScriptCore.gypi: Update the list of source files to include those
  9434. necessary for the GTK+ build.
  9435. 2013-02-08 Andreas Kling <akling@apple.com>
  9436. JSC: Lower minimum PropertyTable size.
  9437. <http://webkit.org/b/109247>
  9438. Reviewed by Darin Adler.
  9439. Lower the minimum table size for PropertyTable from 16 to 8.
  9440. 3.32 MB progression on Membuster3 (a ~13% reduction in memory used by PropertyTables.)
  9441. * runtime/PropertyMapHashTable.h:
  9442. (PropertyTable):
  9443. (JSC::PropertyTable::sizeForCapacity):
  9444. 2013-02-07 Roger Fong <roger_fong@apple.com>
  9445. Unreviewed. More VS2010 WebKit solution touchups.
  9446. Make JavaScriptCoreExports.def.in be treated as a custom build file so that changes to it cause the exports to be rebuilt.
  9447. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj:
  9448. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj.filters:
  9449. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
  9450. 2013-02-07 Mark Hahnenberg <mhahnenberg@apple.com>
  9451. Objective-C API: testapi.mm should use ARC
  9452. https://bugs.webkit.org/show_bug.cgi?id=107838
  9453. Reviewed by Mark Rowe.
  9454. Removing the changes to the Xcode project file and moving the equivalent flags into
  9455. the ToolExecutable xcconfig file.
  9456. * Configurations/ToolExecutable.xcconfig:
  9457. * JavaScriptCore.xcodeproj/project.pbxproj:
  9458. 2013-02-07 Brent Fulgham <bfulgham@webkit.org>
  9459. [Windows] Unreviewed Visual Studio 2010 build fixes after r142179.
  9460. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: Correct changed symbols
  9461. * JavaScriptCore.vcxproj/JavaScriptCoreExports.def: Removed autogenerated file.
  9462. 2013-02-05 Filip Pizlo <fpizlo@apple.com>
  9463. DFG::ByteCodeParser should do surgical constant folding to reduce load on the optimization fixpoint
  9464. https://bugs.webkit.org/show_bug.cgi?id=109000
  9465. Reviewed by Oliver Hunt.
  9466. Previously our source parser's ASTBuilder did some surgical constant folding, but it
  9467. didn't cover some cases. It was particularly incapable of doing constant folding for
  9468. cases where we do some minimal loop peeling in the bytecode generator - since it
  9469. didn't "see" those constants prior to the peeling. Example:
  9470. for (var i = 0; i < 4; ++i)
  9471. things;
  9472. This will get peeled just a bit by the bytecode generator, so that the "i < 4" is
  9473. duplicated both at the top of the loop and the bottom. This means that we have a
  9474. constant comparison: "0 < 4", which the bytecode generator emits without any further
  9475. thought.
  9476. The DFG optimization fixpoint of course folds this and simplifies the CFG
  9477. accordingly, but this incurs a compile-time cost. The purpose of this change is to
  9478. do some surgical constant folding in the DFG's bytecode parser, so that such
  9479. constructs reduce load on the CFG simplifier and the optimization fixpoint. The goal
  9480. is not to cover all cases, since the DFG CFA and CFG simplifier have a powerful
  9481. sparse conditional constant propagation that we can always fall back on. Instead the
  9482. goal is to cover enough cases that for common small functions we don't have to
  9483. perform such transformations, thereby reducing compile times.
  9484. This also refactors m_inlineStackEntry->m_inlineCallFrame to be a handy method call
  9485. and also adds the notion of a TriState-based JSValue::pureToBoolean(). Both of these
  9486. things are used by the folder.
  9487. As well, care has been taken to make sure that the bytecode parser only does folding
  9488. that is statically provable, and that doesn't arise out of speculation. This means
  9489. we cannot fold on data flow that crosses inlining boundaries. On the other hand, the
  9490. folding that the bytecode parser uses doesn't require phantoming anything. Such is
  9491. the trade-off: for anything that we do need phantoming, we defer it to the
  9492. optimization fixpoint.
  9493. Slight SunSpider speed-up.
  9494. * dfg/DFGByteCodeParser.cpp:
  9495. (JSC::DFG::ByteCodeParser::get):
  9496. (JSC::DFG::ByteCodeParser::getLocal):
  9497. (JSC::DFG::ByteCodeParser::setLocal):
  9498. (JSC::DFG::ByteCodeParser::flushDirect):
  9499. (JSC::DFG::ByteCodeParser::flushArgumentsAndCapturedVariables):
  9500. (JSC::DFG::ByteCodeParser::toInt32):
  9501. (ByteCodeParser):
  9502. (JSC::DFG::ByteCodeParser::inlineCallFrame):
  9503. (JSC::DFG::ByteCodeParser::currentCodeOrigin):
  9504. (JSC::DFG::ByteCodeParser::canFold):
  9505. (JSC::DFG::ByteCodeParser::handleInlining):
  9506. (JSC::DFG::ByteCodeParser::getScope):
  9507. (JSC::DFG::ByteCodeParser::parseResolveOperations):
  9508. (JSC::DFG::ByteCodeParser::parseBlock):
  9509. (JSC::DFG::ByteCodeParser::parseCodeBlock):
  9510. * dfg/DFGNode.h:
  9511. (JSC::DFG::Node::isStronglyProvedConstantIn):
  9512. (Node):
  9513. * runtime/JSCJSValue.h:
  9514. * runtime/JSCJSValueInlines.h:
  9515. (JSC::JSValue::pureToBoolean):
  9516. (JSC):
  9517. 2013-02-07 Zoltan Herczeg <zherczeg@webkit.org>
  9518. Invalid code is generated for storing constants with baseindex addressing modes on ARM traditional.
  9519. https://bugs.webkit.org/show_bug.cgi?id=109050
  9520. Reviewed by Oliver Hunt.
  9521. The S! scratch register is reused, but it should contain the constant value.
  9522. * assembler/ARMAssembler.cpp:
  9523. (JSC::ARMAssembler::baseIndexTransfer32):
  9524. (JSC::ARMAssembler::baseIndexTransfer16):
  9525. 2013-02-07 Andras Becsi <andras.becsi@digia.com>
  9526. [Qt] Use GNU ar's thin archive format for intermediate static libs
  9527. https://bugs.webkit.org/show_bug.cgi?id=109052
  9528. Reviewed by Jocelyn Turcotte.
  9529. Adjust project files that used activeBuildConfig()
  9530. to use targetSubDir().
  9531. * JavaScriptCore.pri:
  9532. * LLIntOffsetsExtractor.pro:
  9533. * Target.pri:
  9534. 2013-02-06 Roger Fong <roger_fong@apple.com>
  9535. Unreviewed. Touchups to VS2010 WebKit solution.
  9536. Fix an export generator script, modify some property sheets, add resouce file.
  9537. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorDebug.props:
  9538. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPostBuild.cmd:
  9539. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorRelease.props:
  9540. * JavaScriptCore.vcxproj/resource.h: Added.
  9541. 2013-02-06 Ilya Tikhonovsky <loislo@chromium.org>
  9542. Web Inspector: Native Memory Instrumentation: assign class name to the heap graph node automatically
  9543. https://bugs.webkit.org/show_bug.cgi?id=107262
  9544. Reviewed by Yury Semikhatsky.
  9545. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  9546. 2013-02-06 Mike West <mkwst@chromium.org>
  9547. Add an ENABLE_NOSNIFF feature flag.
  9548. https://bugs.webkit.org/show_bug.cgi?id=109029
  9549. Reviewed by Jochen Eisinger.
  9550. This new flag will control the behavior of 'X-Content-Type-Options: nosniff'
  9551. when processing script and other resource types.
  9552. * Configurations/FeatureDefines.xcconfig:
  9553. 2013-02-05 Mark Hahnenberg <mhahnenberg@apple.com>
  9554. put_to_base should emit a Phantom for "value" across the ForceOSRExit
  9555. https://bugs.webkit.org/show_bug.cgi?id=108998
  9556. Reviewed by Oliver Hunt.
  9557. Otherwise, the OSR exit compiler could clobber it, which would lead to badness.
  9558. * bytecode/CodeBlock.cpp:
  9559. (JSC::CodeBlock::tallyFrequentExitSites): Build fixes for when DFG debug logging is enabled.
  9560. * dfg/DFGByteCodeParser.cpp:
  9561. (JSC::DFG::ByteCodeParser::parseBlock): Added extra Phantoms for the "value" field where needed.
  9562. * dfg/DFGSpeculativeJIT.cpp:
  9563. (JSC::DFG::SpeculativeJIT::compile): Ditto.
  9564. 2013-02-05 Michael Saboff <msaboff@apple.com>
  9565. Crash at JSC::call when loading www.gap.com with JSVALUE32_64 Enabled
  9566. https://bugs.webkit.org/show_bug.cgi?id=108991
  9567. Reviewed by Oliver Hunt.
  9568. Changed the restoration from calleeGPR to nonArgGPR0 because the restoration of the return location
  9569. may step on calleeGPR is it happen to be nonArgGPR2.
  9570. * dfg/DFGRepatch.cpp:
  9571. (JSC::DFG::dfgLinkClosureCall):
  9572. 2013-02-05 Roger Fong <roger_fong@apple.com>
  9573. Add a JavaScriptCore Export Generator project.
  9574. https://bugs.webkit.org/show_bug.cgi?id=108971.
  9575. Reviewed by Brent Fulgham.
  9576. * JavaScriptCore.vcxproj/JavaScriptCore.sln:
  9577. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  9578. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
  9579. * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
  9580. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator: Added.
  9581. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj: Added.
  9582. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj.filters: Added.
  9583. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj.user: Added.
  9584. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorBuildCmd.cmd: Added.
  9585. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props: Added.
  9586. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorDebug.props: Added.
  9587. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPostBuild.cmd: Added.
  9588. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPreBuild.cmd: Added.
  9589. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorRelease.props: Added.
  9590. * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: Added.
  9591. 2013-02-04 Filip Pizlo <fpizlo@apple.com>
  9592. DFG should have a precise view of jump targets
  9593. https://bugs.webkit.org/show_bug.cgi?id=108868
  9594. Reviewed by Oliver Hunt.
  9595. Previously, the DFG relied entirely on the CodeBlock's jump targets list for
  9596. determining when to break basic blocks. This worked great, except sometimes it
  9597. would be too conservative since the CodeBlock just says where the bytecode
  9598. generator inserted labels.
  9599. This change keeps the old jump target list in CodeBlock since it is still
  9600. valuable to the baseline JIT, but switches the DFG to use its own jump target
  9601. calculator. This ought to reduce pressure on the DFG simplifier, which would
  9602. previously do a lot of work to try to merge redundantly created basic blocks.
  9603. It appears to be a 1% progression on SunSpider.
  9604. * CMakeLists.txt:
  9605. * GNUmakefile.list.am:
  9606. * JavaScriptCore.xcodeproj/project.pbxproj:
  9607. * Target.pri:
  9608. * bytecode/PreciseJumpTargets.cpp: Added.
  9609. (JSC):
  9610. (JSC::addSimpleSwitchTargets):
  9611. (JSC::computePreciseJumpTargets):
  9612. * bytecode/PreciseJumpTargets.h: Added.
  9613. (JSC):
  9614. * dfg/DFGByteCodeParser.cpp:
  9615. (JSC::DFG::ByteCodeParser::parseCodeBlock):
  9616. 2013-02-01 Roger Fong <roger_fong@apple.com>
  9617. Make ConfigurationBuildDir include directories precede WebKitLibraries in JSC.
  9618. https://bugs.webkit.org/show_bug.cgi?id=108693.
  9619. Rubberstamped by Timothy Horton.
  9620. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  9621. 2013-02-04 Mark Hahnenberg <mhahnenberg@apple.com>
  9622. Structure::m_outOfLineCapacity is unnecessary
  9623. https://bugs.webkit.org/show_bug.cgi?id=108206
  9624. Reviewed by Darin Adler.
  9625. Simplifying the utility functions that we use since we don't need a
  9626. bunch of fancy templates for this one specific call site.
  9627. * runtime/Structure.h:
  9628. (JSC::Structure::outOfLineCapacity):
  9629. 2013-02-05 Mark Hahnenberg <mhahnenberg@apple.com>
  9630. Objective-C API: testapi.mm should use ARC
  9631. https://bugs.webkit.org/show_bug.cgi?id=107838
  9632. Reviewed by Oliver Hunt.
  9633. In ToT testapi.mm uses the Obj-C garbage collector, which hides a lot of our object lifetime bugs.
  9634. We should enable ARC, since that is what most of our clients will be using. We use Xcode project
  9635. settings to make sure we don't try to compile ARC on 32-bit.
  9636. * API/tests/testapi.mm:
  9637. (+[TestObject testObject]):
  9638. (testObjectiveCAPI):
  9639. * JavaScriptCore.xcodeproj/project.pbxproj:
  9640. 2013-02-05 Brent Fulgham <bfulgham@webkit.org>
  9641. [Windows] Unreviewed VS2010 Build Correction after r141651
  9642. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Add missing
  9643. StructureRareData.h and StructureRareData.cpp files.
  9644. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto.
  9645. 2013-02-05 Michael Saboff <msaboff@apple.com>
  9646. r141788 won't build due to not having all changes needed by Node* change
  9647. https://bugs.webkit.org/show_bug.cgi?id=108944
  9648. Reviewed by David Kilzer.
  9649. Fixed three instances of integerResult(..., m_compileIndex) to be integerResult(..., node).
  9650. * dfg/DFGSpeculativeJIT.cpp:
  9651. (JSC::DFG::SpeculativeJIT::compileSoftModulo):
  9652. (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForARMv7s):
  9653. 2013-02-04 Sheriff Bot <webkit.review.bot@gmail.com>
  9654. Unreviewed, rolling out r141809.
  9655. http://trac.webkit.org/changeset/141809
  9656. https://bugs.webkit.org/show_bug.cgi?id=108860
  9657. ARC isn't supported on 32-bit. (Requested by mhahnenberg on
  9658. #webkit).
  9659. * API/tests/testapi.mm:
  9660. (+[TestObject testObject]):
  9661. (testObjectiveCAPI):
  9662. * JavaScriptCore.xcodeproj/project.pbxproj:
  9663. 2013-02-04 Mark Hahnenberg <mhahnenberg@apple.com>
  9664. Objective-C API: testapi.mm should use ARC
  9665. https://bugs.webkit.org/show_bug.cgi?id=107838
  9666. Reviewed by Oliver Hunt.
  9667. In ToT testapi.mm uses the Obj-C garbage collector, which hides a lot of our object lifetime bugs.
  9668. We should enable ARC, since that is what most of our clients will be using.
  9669. * API/tests/testapi.mm:
  9670. (-[TestObject init]):
  9671. (-[TestObject dealloc]):
  9672. (+[TestObject testObject]):
  9673. (testObjectiveCAPI):
  9674. * JavaScriptCore.xcodeproj/project.pbxproj:
  9675. 2013-02-04 Mark Hahnenberg <mhahnenberg@apple.com>
  9676. Objective-C API: ObjCCallbackFunction should retain the target of its NSInvocation
  9677. https://bugs.webkit.org/show_bug.cgi?id=108843
  9678. Reviewed by Darin Adler.
  9679. Currently, ObjCCallbackFunction doesn't retain the target of its NSInvocation. It needs to do
  9680. this to prevent crashes when trying to invoke a callback later on.
  9681. * API/ObjCCallbackFunction.mm:
  9682. (ObjCCallbackFunction::ObjCCallbackFunction):
  9683. (ObjCCallbackFunction::~ObjCCallbackFunction):
  9684. 2013-02-04 Martin Robinson <mrobinson@igalia.com>
  9685. Fix GTK+ 'make dist' in preparation for the 1.11.5 release.
  9686. * GNUmakefile.list.am: Update the source lists.
  9687. 2013-02-04 Michael Saboff <msaboff@apple.com>
  9688. For ARMv7s use integer divide instruction for divide and modulo when possible
  9689. https://bugs.webkit.org/show_bug.cgi?id=108840
  9690. Reviewed in person by Filip Pizlo.
  9691. Added ARMv7s integer divide path for ArithDiv and ArithMod where operands and results are integer.
  9692. This is patterned after the similar code for X86. Also added modulo power of 2 optimization
  9693. that uses logical and. Added sdiv and udiv to the ARMv7 disassembler. Put all the changes
  9694. behind #if CPU(APPLE_ARMV7S).
  9695. * assembler/ARMv7Assembler.h:
  9696. (ARMv7Assembler):
  9697. (JSC::ARMv7Assembler::sdiv):
  9698. (JSC::ARMv7Assembler::udiv):
  9699. * dfg/DFGCommon.h:
  9700. (JSC::DFG::isARMv7s):
  9701. * dfg/DFGFixupPhase.cpp:
  9702. (JSC::DFG::FixupPhase::fixupNode):
  9703. * dfg/DFGSpeculativeJIT.cpp:
  9704. (JSC::DFG::SpeculativeJIT::compileSoftModulo):
  9705. (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForARMv7s):
  9706. * dfg/DFGSpeculativeJIT.h:
  9707. (SpeculativeJIT):
  9708. * dfg/DFGSpeculativeJIT32_64.cpp:
  9709. (JSC::DFG::SpeculativeJIT::compile):
  9710. 2013-02-04 David Kilzer <ddkilzer@apple.com>
  9711. Check PrivateHeaders/JSBasePrivate.h for inappropriate macros
  9712. <http://webkit.org/b/108749>
  9713. Reviewed by Joseph Pecoraro.
  9714. * JavaScriptCore.xcodeproj/project.pbxproj: Add
  9715. PrivateHeaders/JSBasePrivate.h to list of headers to check in
  9716. "Check for Inappropriate Macros in External Headers" build phase
  9717. script.
  9718. 2013-02-04 David Kilzer <ddkilzer@apple.com>
  9719. Remove duplicate entries from JavaScriptCore Xcode project
  9720. $ uniq Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj | diff -u - Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj | patch -p0 -R
  9721. patching file Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
  9722. * JavaScriptCore.xcodeproj/project.pbxproj: Remove duplicates.
  9723. 2013-02-04 David Kilzer <ddkilzer@apple.com>
  9724. Sort JavaScriptCore Xcode project file
  9725. * JavaScriptCore.xcodeproj/project.pbxproj:
  9726. 2013-02-03 David Kilzer <ddkilzer@apple.com>
  9727. Upstream ENABLE_PDFKIT_PLUGIN settting
  9728. <http://webkit.org/b/108792>
  9729. Reviewed by Tim Horton.
  9730. * Configurations/FeatureDefines.xcconfig: Disable PDFKIT_PLUGIN
  9731. on iOS since PDFKit is a Mac-only framework.
  9732. 2013-02-02 Andreas Kling <akling@apple.com>
  9733. Vector should consult allocator about ideal size when choosing capacity.
  9734. <http://webkit.org/b/108410>
  9735. <rdar://problem/13124002>
  9736. Reviewed by Benjamin Poulain.
  9737. Remove assertion about Vector capacity that won't hold anymore since capacity()
  9738. may not be what you passed to reserveCapacity().
  9739. Also export WTF::fastMallocGoodSize() for Windows builds.
  9740. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  9741. * bytecode/CodeBlock.cpp:
  9742. (JSC::CodeBlock::CodeBlock):
  9743. 2013-02-02 Patrick Gansterer <paroga@webkit.org>
  9744. [CMake] Adopt the WinCE port to new CMake
  9745. https://bugs.webkit.org/show_bug.cgi?id=108754
  9746. Reviewed by Laszlo Gombos.
  9747. * os-win32/WinMain.cpp: Removed.
  9748. * shell/PlatformWinCE.cmake: Removed.
  9749. 2013-02-02 Mark Rowe <mrowe@apple.com>
  9750. <http://webkit.org/b/108745> WTF shouldn't use a script build phase to detect the presence of headers when the compiler can do it for us
  9751. Reviewed by Sam Weinig.
  9752. * DerivedSources.make: Remove an obsolete Makefile rule. This should have been removed when the use
  9753. of the generated file moved to WTF.
  9754. 2013-02-02 David Kilzer <ddkilzer@apple.com>
  9755. Upstream iOS FeatureDefines
  9756. <http://webkit.org/b/108753>
  9757. Reviewed by Anders Carlsson.
  9758. * Configurations/FeatureDefines.xcconfig:
  9759. - ENABLE_DEVICE_ORIENTATION: Add iOS configurations.
  9760. - ENABLE_PLUGIN_PROXY_FOR_VIDEO: Ditto.
  9761. - FEATURE_DEFINES: Add ENABLE_PLUGIN_PROXY_FOR_VIDEO. Add
  9762. PLATFORM_NAME variant to reduce future merge conflicts.
  9763. 2013-02-01 Mark Hahnenberg <mhahnenberg@apple.com>
  9764. Structure::m_enumerationCache should be moved to StructureRareData
  9765. https://bugs.webkit.org/show_bug.cgi?id=108723
  9766. Reviewed by Oliver Hunt.
  9767. m_enumerationCache is only used by objects whose properties are iterated over, so not every Structure needs this
  9768. field and it can therefore be moved safely to StructureRareData to help with memory savings.
  9769. * runtime/JSPropertyNameIterator.h:
  9770. (JSPropertyNameIterator):
  9771. (JSC::Register::propertyNameIterator):
  9772. (JSC::StructureRareData::enumerationCache): Add to JSPropertyNameIterator.h so that it can see the correct type.
  9773. (JSC::StructureRareData::setEnumerationCache): Ditto.
  9774. * runtime/Structure.cpp:
  9775. (JSC::Structure::addPropertyWithoutTransition): Use the enumerationCache() getter rather than accessing the field.
  9776. (JSC::Structure::removePropertyWithoutTransition): Ditto.
  9777. (JSC::Structure::visitChildren): We no longer have to worry about marking the m_enumerationCache field.
  9778. * runtime/Structure.h:
  9779. (JSC::Structure::setEnumerationCache): Move the old accessors back since we don't have to have any knowledge of
  9780. the JSPropertyNameIterator type.
  9781. (JSC::Structure::enumerationCache): Ditto.
  9782. * runtime/StructureRareData.cpp:
  9783. (JSC::StructureRareData::visitChildren): Mark the new m_enumerationCache field.
  9784. * runtime/StructureRareData.h: Add new functions/fields.
  9785. (StructureRareData):
  9786. 2013-02-01 Roger Fong <roger_fong@apple.com>
  9787. Unreviewed. JavaScriptCore VS2010 project cleanup.
  9788. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  9789. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
  9790. * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
  9791. * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj:
  9792. 2013-02-01 Sheriff Bot <webkit.review.bot@gmail.com>
  9793. Unreviewed, rolling out r141662.
  9794. http://trac.webkit.org/changeset/141662
  9795. https://bugs.webkit.org/show_bug.cgi?id=108738
  9796. it's an incorrect change since processPhiStack will
  9797. dereference dangling BasicBlock pointers (Requested by pizlo
  9798. on #webkit).
  9799. * dfg/DFGByteCodeParser.cpp:
  9800. (JSC::DFG::ByteCodeParser::parse):
  9801. 2013-02-01 Filip Pizlo <fpizlo@apple.com>
  9802. Eliminate dead blocks sooner in the DFG::ByteCodeParser to make clear that you don't need to hold onto them during Phi construction
  9803. https://bugs.webkit.org/show_bug.cgi?id=108717
  9804. Reviewed by Mark Hahnenberg.
  9805. I think this makes the code clearer. It doesn't change behavior.
  9806. * dfg/DFGByteCodeParser.cpp:
  9807. (JSC::DFG::ByteCodeParser::parse):
  9808. 2013-02-01 Mark Hahnenberg <mhahnenberg@apple.com>
  9809. Structure should have a StructureRareData field to save space
  9810. https://bugs.webkit.org/show_bug.cgi?id=108659
  9811. Reviewed by Oliver Hunt.
  9812. Many of the fields in Structure are used in a subset of all total Structures; however, all Structures must
  9813. pay the memory cost of those fields, regardless of whether they use them or not. Since we can have potentially
  9814. many Structures on a single page (e.g. bing.com creates ~1500 Structures), it would be profitable to
  9815. refactor Structure so that not every Structure has to pay the memory costs for these infrequently used fields.
  9816. To accomplish this, we can create a new StructureRareData class to house these seldom used fields which we
  9817. can allocate on demand whenever a Structure requires it. This StructureRareData can itself be a JSCell, and
  9818. can do all the marking of the fields for the Structure. The StructureRareData field will be part of a union
  9819. with m_previous to minimize overhead. We'll add a new field to JSTypeInfo to indicate that the Structure has
  9820. a StructureRareData field. During transitions, a Structure will clone its previous Structure's StructureRareData
  9821. if it has one. There could be some potential for optimizing this process, but the initial implementation will
  9822. be dumb since we'd be paying these overhead costs for each Structure anyways.
  9823. Initially we'll only put two fields in the StructureRareData to avoid a memory regression. Over time we'll
  9824. continue to move fields from Structure to StructureRareData. Optimistically, this could potentially reduce our
  9825. Structure memory footprint by up to around 75%. It could also clear the way for removing destructors from
  9826. Structures (and into StructureRareData).
  9827. * CMakeLists.txt:
  9828. * GNUmakefile.list.am:
  9829. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  9830. * JavaScriptCore.xcodeproj/project.pbxproj:
  9831. * Target.pri:
  9832. * dfg/DFGRepatch.cpp: Includes for linking purposes.
  9833. * jit/JITStubs.cpp:
  9834. * jsc.cpp:
  9835. * llint/LLIntSlowPaths.cpp:
  9836. * runtime/JSCellInlines.h: Added ifdef guards.
  9837. * runtime/JSGlobalData.cpp: New Structure for StructureRareData class.
  9838. (JSC::JSGlobalData::JSGlobalData):
  9839. * runtime/JSGlobalData.h:
  9840. (JSGlobalData):
  9841. * runtime/JSGlobalObject.h:
  9842. * runtime/JSTypeInfo.h: New flag to indicate whether or not a Structure has a StructureRareData field.
  9843. (JSC::TypeInfo::flags):
  9844. (JSC::TypeInfo::structureHasRareData):
  9845. * runtime/ObjectPrototype.cpp:
  9846. * runtime/Structure.cpp: We use a combined WriteBarrier<JSCell> field m_previousOrRareData to avoid compiler issues.
  9847. (JSC::Structure::dumpStatistics):
  9848. (JSC::Structure::Structure):
  9849. (JSC::Structure::materializePropertyMap):
  9850. (JSC::Structure::addPropertyTransition):
  9851. (JSC::Structure::nonPropertyTransition):
  9852. (JSC::Structure::pin):
  9853. (JSC::Structure::allocateRareData): Handles allocating a brand new StructureRareData field.
  9854. (JSC::Structure::cloneRareDataFrom): Handles cloning a StructureRareData field from another. Used during Structure
  9855. transitions.
  9856. (JSC::Structure::visitChildren): We no longer have to worry about marking m_objectToStringValue.
  9857. * runtime/Structure.h:
  9858. (JSC::Structure::previousID): Checks the structureHasRareData flag to see where it should get the previous Structure.
  9859. (JSC::Structure::objectToStringValue): Reads the value from the StructureRareData. If it doesn't exist, returns 0.
  9860. (JSC::Structure::setObjectToStringValue): Ensures that we have a StructureRareData field, then forwards the function
  9861. call to it.
  9862. (JSC::Structure::materializePropertyMapIfNecessary):
  9863. (JSC::Structure::setPreviousID): Checks for StructureRareData and forwards if necessary.
  9864. (Structure):
  9865. (JSC::Structure::clearPreviousID): Ditto.
  9866. (JSC::Structure::create):
  9867. * runtime/StructureRareData.cpp: Added. All of the basic functionality of a JSCell with the fields that we've moved
  9868. from Structure and the functions required to access/modify those fields as Structure would have done.
  9869. (JSC):
  9870. (JSC::StructureRareData::createStructure):
  9871. (JSC::StructureRareData::create):
  9872. (JSC::StructureRareData::clone):
  9873. (JSC::StructureRareData::StructureRareData):
  9874. (JSC::StructureRareData::visitChildren):
  9875. * runtime/StructureRareData.h: Added.
  9876. (JSC):
  9877. (StructureRareData):
  9878. * runtime/StructureRareDataInlines.h: Added.
  9879. (JSC):
  9880. (JSC::StructureRareData::previousID):
  9881. (JSC::StructureRareData::setPreviousID):
  9882. (JSC::StructureRareData::clearPreviousID):
  9883. (JSC::Structure::previous): Handles the ugly casting to get the value of the right type of m_previousOrRareData.
  9884. (JSC::Structure::rareData): Ditto.
  9885. (JSC::StructureRareData::objectToStringValue):
  9886. (JSC::StructureRareData::setObjectToStringValue):
  9887. * CMakeLists.txt:
  9888. * GNUmakefile.list.am:
  9889. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  9890. * JavaScriptCore.xcodeproj/project.pbxproj:
  9891. * Target.pri:
  9892. * dfg/DFGRepatch.cpp:
  9893. * jit/JITStubs.cpp:
  9894. * jsc.cpp:
  9895. * llint/LLIntSlowPaths.cpp:
  9896. * runtime/JSCellInlines.h:
  9897. * runtime/JSGlobalData.cpp:
  9898. (JSC::JSGlobalData::JSGlobalData):
  9899. * runtime/JSGlobalData.h:
  9900. (JSGlobalData):
  9901. * runtime/JSGlobalObject.h:
  9902. * runtime/JSTypeInfo.h:
  9903. (JSC):
  9904. (JSC::TypeInfo::flags):
  9905. (JSC::TypeInfo::structureHasRareData):
  9906. * runtime/ObjectPrototype.cpp:
  9907. * runtime/Structure.cpp:
  9908. (JSC::Structure::dumpStatistics):
  9909. (JSC::Structure::Structure):
  9910. (JSC::Structure::materializePropertyMap):
  9911. (JSC::Structure::addPropertyTransition):
  9912. (JSC::Structure::nonPropertyTransition):
  9913. (JSC::Structure::pin):
  9914. (JSC::Structure::allocateRareData):
  9915. (JSC):
  9916. (JSC::Structure::cloneRareDataFrom):
  9917. (JSC::Structure::visitChildren):
  9918. * runtime/Structure.h:
  9919. (JSC::Structure::previousID):
  9920. (JSC::Structure::objectToStringValue):
  9921. (JSC::Structure::setObjectToStringValue):
  9922. (JSC::Structure::materializePropertyMapIfNecessary):
  9923. (JSC::Structure::setPreviousID):
  9924. (Structure):
  9925. (JSC::Structure::clearPreviousID):
  9926. (JSC::Structure::previous):
  9927. (JSC::Structure::rareData):
  9928. (JSC::Structure::create):
  9929. * runtime/StructureRareData.cpp: Added.
  9930. (JSC):
  9931. (JSC::StructureRareData::createStructure):
  9932. (JSC::StructureRareData::create):
  9933. (JSC::StructureRareData::clone):
  9934. (JSC::StructureRareData::StructureRareData):
  9935. (JSC::StructureRareData::visitChildren):
  9936. * runtime/StructureRareData.h: Added.
  9937. (JSC):
  9938. (StructureRareData):
  9939. * runtime/StructureRareDataInlines.h: Added.
  9940. (JSC):
  9941. (JSC::StructureRareData::previousID):
  9942. (JSC::StructureRareData::setPreviousID):
  9943. (JSC::StructureRareData::clearPreviousID):
  9944. (JSC::StructureRareData::objectToStringValue):
  9945. (JSC::StructureRareData::setObjectToStringValue):
  9946. 2013-02-01 Balazs Kilvady <kilvadyb@homejinni.com>
  9947. offlineasm BaseIndex handling is broken on ARM due to MIPS changes
  9948. https://bugs.webkit.org/show_bug.cgi?id=108261
  9949. Reviewed by Filip Pizlo.
  9950. offlineasm BaseIndex handling fix on MIPS.
  9951. * offlineasm/mips.rb:
  9952. * offlineasm/risc.rb:
  9953. 2013-02-01 Geoffrey Garen <ggaren@apple.com>
  9954. Removed an unused function: JSGlobalObject::createFunctionExecutableFromGlobalCode
  9955. https://bugs.webkit.org/show_bug.cgi?id=108657
  9956. Reviewed by Anders Carlsson.
  9957. * runtime/JSGlobalObject.cpp:
  9958. (JSC):
  9959. * runtime/JSGlobalObject.h:
  9960. (JSGlobalObject):
  9961. 2013-02-01 Geoffrey Garen <ggaren@apple.com>
  9962. Added TriState to WTF and started using it in one place
  9963. https://bugs.webkit.org/show_bug.cgi?id=108628
  9964. Reviewed by Beth Dakin.
  9965. * runtime/PrototypeMap.h:
  9966. (JSC::PrototypeMap::isPrototype): Use TriState instead of boolean. In
  9967. response to review feedback, this is an attempt to clarify that our
  9968. 'true' condition is actually just a 'maybe'.
  9969. * runtime/PrototypeMap.h:
  9970. (PrototypeMap):
  9971. (JSC::PrototypeMap::isPrototype):
  9972. 2013-02-01 Alexis Menard <alexis@webkit.org>
  9973. Enable unprefixed CSS transitions by default.
  9974. https://bugs.webkit.org/show_bug.cgi?id=108216
  9975. Reviewed by Dean Jackson.
  9976. Rename the flag CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED
  9977. to CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED which will be used later to
  9978. guard the unprefixing work for CSS Transforms and animations.
  9979. * Configurations/FeatureDefines.xcconfig:
  9980. 2013-01-31 Filip Pizlo <fpizlo@apple.com>
  9981. DFG::CFGSimplificationPhase::keepOperandAlive() conflates liveness and availability
  9982. https://bugs.webkit.org/show_bug.cgi?id=108580
  9983. Reviewed by Oliver Hunt.
  9984. This is a harmless bug in that it only results in us keeping a bit too many things
  9985. for OSR. But it's worth fixing so that the code is consistent.
  9986. keepOperandAlive() is called when block A has a branch to blocks B and C, but the
  9987. A->B edge is proven to never be taken and we want to optimize the code to have A
  9988. unconditionally jump to C. In that case, for the purposes of OSR, we need to
  9989. preserve the knowledge that the state that B expected to be live incoming from A
  9990. ought still to be live up to the point of where the A->B,C branch used to be. The
  9991. way we keep things alive is by using the variablesAtTail of A (i.e., we use the
  9992. knowledge of in what manner A made state available to B and C). The way we choose
  9993. which state should be kept alive ought to be chosen by the variablesAtHead of B
  9994. (i.e. the things B says it needs from its predecessors, including A), except that
  9995. keepOperandAlive() was previously just using variablesAtTail of A for this
  9996. purpose.
  9997. The fix is to have keepOperandAlive() use both liveness and availability in its
  9998. logic. It should use liveness (i.e. B->variablesAtHead) to decide what to keep
  9999. alive, and it should use availability (i.e. A->variablesAtTail) to decide how to
  10000. keep it alive.
  10001. This might be a microscopic win on some programs, but it's mainly intended to be
  10002. a code clean-up so that I don't end up scratching my head in confusion the next
  10003. time I look at this code.
  10004. * dfg/DFGCFGSimplificationPhase.cpp:
  10005. (JSC::DFG::CFGSimplificationPhase::keepOperandAlive):
  10006. (JSC::DFG::CFGSimplificationPhase::jettisonBlock):
  10007. (JSC::DFG::CFGSimplificationPhase::mergeBlocks):
  10008. 2013-01-31 Geoffrey Garen <ggaren@apple.com>
  10009. REGRESSION (r141192): Crash beneath cti_op_get_by_id_generic @ discussions.apple.com
  10010. https://bugs.webkit.org/show_bug.cgi?id=108576
  10011. Reviewed by Filip Pizlo.
  10012. This was a long-standing bug. The DFG would destructively reuse a register
  10013. in op_convert_this, but:
  10014. * The bug only presented during speculation failure for type Other
  10015. * The bug presented by removing the low bits of a pointer, which
  10016. used to be harmless, since all objects were so aligned anyway.
  10017. * dfg/DFGSpeculativeJIT64.cpp:
  10018. (JSC::DFG::SpeculativeJIT::compile): Don't reuse our this register as
  10019. our scratch register. The whole point of our scratch register is to
  10020. avoid destructively modifying our this register. I'm pretty sure this
  10021. was a copy-paste error.
  10022. 2013-01-31 Roger Fong <roger_fong@apple.com>
  10023. Unreviewed. Windows build fix.
  10024. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  10025. 2013-01-31 Jessie Berlin <jberlin@apple.com>
  10026. Rolling out r141407 because it is causing crashes under
  10027. WTF::TCMalloc_Central_FreeList::FetchFromSpans() in Release builds.
  10028. * bytecode/CodeBlock.cpp:
  10029. (JSC::CodeBlock::CodeBlock):
  10030. 2013-01-31 Mark Hahnenberg <mhahnenberg@apple.com>
  10031. Objective-C API: JSContext exception property causes reference cycle
  10032. https://bugs.webkit.org/show_bug.cgi?id=107778
  10033. Reviewed by Darin Adler.
  10034. JSContext has a (retain) JSValue * exception property which, when non-null, creates a
  10035. reference cycle (since the JSValue * holds a strong reference back to the JSContext *).
  10036. * API/JSContext.mm: Instead of JSValue *, we now use a plain JSValueRef, which eliminates the reference cycle.
  10037. (-[JSContext initWithVirtualMachine:]):
  10038. (-[JSContext setException:]):
  10039. (-[JSContext exception]):
  10040. 2013-01-31 Roger Fong <roger_fong@apple.com>
  10041. Unreviewed build fix. Win7 port.
  10042. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  10043. 2013-01-31 Joseph Pecoraro <pecoraro@apple.com>
  10044. Disable ENABLE_FULLSCREEN_API on iOS
  10045. https://bugs.webkit.org/show_bug.cgi?id=108250
  10046. Reviewed by Benjamin Poulain.
  10047. * Configurations/FeatureDefines.xcconfig:
  10048. 2013-01-31 Mark Hahnenberg <mhahnenberg@apple.com>
  10049. Objective-C API: Fix insertion of values greater than the max index allowed by the spec
  10050. https://bugs.webkit.org/show_bug.cgi?id=108264
  10051. Reviewed by Oliver Hunt.
  10052. Fixed a bug, added a test to the API tests, cleaned up some code.
  10053. * API/JSValue.h: Changed some of the documentation on setValue:atIndex: to indicate that
  10054. setting values at indices greater than UINT_MAX - 1 wont' affect the length of JS arrays.
  10055. * API/JSValue.mm:
  10056. (-[JSValue valueAtIndex:]): We weren't returning when we should have been.
  10057. (-[JSValue setValue:atIndex:]): Added a comment about why we do the early check for being larger than UINT_MAX.
  10058. (objectToValueWithoutCopy): Removed two redundant cases that were already checked previously.
  10059. * API/tests/testapi.mm:
  10060. 2013-01-30 Andreas Kling <akling@apple.com>
  10061. Vector should consult allocator about ideal size when choosing capacity.
  10062. <http://webkit.org/b/108410>
  10063. <rdar://problem/13124002>
  10064. Reviewed by Benjamin Poulain.
  10065. Remove assertion about Vector capacity that won't hold anymore since capacity()
  10066. may not be what you passed to reserveCapacity().
  10067. * bytecode/CodeBlock.cpp:
  10068. (JSC::CodeBlock::CodeBlock):
  10069. 2013-01-30 Filip Pizlo <fpizlo@apple.com>
  10070. DFG bytecode parser should have more assertions about the status of local accesses
  10071. https://bugs.webkit.org/show_bug.cgi?id=108417
  10072. Reviewed by Mark Hahnenberg.
  10073. Assert some things that we already know to be true, just to reassure ourselves that they are true.
  10074. This is meant as a prerequisite for https://bugs.webkit.org/show_bug.cgi?id=108414, which will
  10075. make these rules even stricter.
  10076. * dfg/DFGByteCodeParser.cpp:
  10077. (JSC::DFG::ByteCodeParser::getLocal):
  10078. (JSC::DFG::ByteCodeParser::getArgument):
  10079. 2013-01-30 Mark Hahnenberg <mhahnenberg@apple.com>
  10080. Objective-C API: JSContext's dealloc causes ASSERT due to ordering of releases
  10081. https://bugs.webkit.org/show_bug.cgi?id=107978
  10082. Reviewed by Filip Pizlo.
  10083. We need to add the Identifier table save/restore in JSContextGroupRelease so that we
  10084. have the correct table if we end up destroying the JSGlobalData/Heap.
  10085. * API/JSContextRef.cpp:
  10086. (JSContextGroupRelease):
  10087. 2013-01-30 Mark Hahnenberg <mhahnenberg@apple.com>
  10088. Objective-C API: exceptionHandler needs to be released in JSContext dealloc
  10089. https://bugs.webkit.org/show_bug.cgi?id=108378
  10090. Reviewed by Filip Pizlo.
  10091. JSContext has a (copy) exceptionHandler property that it doesn't release in dealloc.
  10092. That sounds like the potential for a leak. It should be released.
  10093. * API/JSContext.mm:
  10094. (-[JSContext dealloc]):
  10095. 2013-01-30 Filip Pizlo <fpizlo@apple.com>
  10096. REGRESSION(140504): pure CSE no longer matches things, 10% regression on Kraken
  10097. https://bugs.webkit.org/show_bug.cgi?id=108366
  10098. Reviewed by Geoffrey Garen and Mark Hahnenberg.
  10099. This was a longstanding bug that was revealed by http://trac.webkit.org/changeset/140504.
  10100. Pure CSE requires that the Node::flags() that may affect the behavior of a node match,
  10101. when comparing a possibly redundant node to its possible replacement. It was doing this
  10102. by comparing Node::arithNodeFlags(), which as the name might appear to suggest, returns
  10103. just those flag bits that correspond to actual node behavior and not auxiliary things.
  10104. Unfortunately, Node::arithNodeFlags() wasn't actually masking off the irrelevant bits.
  10105. This worked prior to r140504 because CSE itself didn't mutate the flags, so there was a
  10106. very high probability that matching nodes would also have completely identical flag bits
  10107. (even the ones that aren't relevant to arithmetic behavior, like NodeDoesNotExit). But
  10108. r140504 moved one of CSE's side-tables (m_relevantToOSR) into a flag bit for quicker
  10109. access. These bits would be mutated as the CSE ran over a basic block, in such a way that
  10110. there was a very high probability that the possible replacement would already have the
  10111. bit set, while the redundant node did not have the bit set. Since Node::arithNodeFlags()
  10112. returned all of the bits, this would cause CSEPhase::pureCSE() to reject the match
  10113. almost every time.
  10114. The solution is to make Node::arithNodeFlags() do as its name suggests: only return those
  10115. flags that are relevant to arithmetic behavior. This patch introduces a new mask that
  10116. represents those bits, and includes NodeBehaviorMask and NodeBackPropMask, which are both
  10117. used for queries on Node::arithNodeFlags(), and both affect arithmetic code gen. None of
  10118. the other flags are relevant to Node::arithNodeFlags() since they either correspond to
  10119. information already conveyed by the opcode (like NodeResultMask, NodeMustGenerate,
  10120. NodeHasVarArgs, NodeClobbersWorld, NodeMightClobber) or information that doesn't affect
  10121. the result that the node will produce or any of the queries performed on the result of
  10122. Node::arithNodeFlags (NodeDoesNotExit and of course NodeRelevantToOSR).
  10123. This is a 10% speed-up on Kraken, undoing the regression from r140504.
  10124. * dfg/DFGNode.h:
  10125. (JSC::DFG::Node::arithNodeFlags):
  10126. * dfg/DFGNodeFlags.h:
  10127. (DFG):
  10128. 2013-01-29 Mark Hahnenberg <mhahnenberg@apple.com>
  10129. Structure::m_outOfLineCapacity is unnecessary
  10130. https://bugs.webkit.org/show_bug.cgi?id=108206
  10131. Reviewed by Geoffrey Garen.
  10132. We can calculate our out of line capacity by using the outOfLineSize and our knowledge about our resize policy.
  10133. According to GDB, this knocks Structures down from 136 bytes to 128 bytes (I'm guessing the extra bytes are from
  10134. better alignment of object fields), which puts Structures in a smaller size class. Woohoo! Looks neutral on our
  10135. benchmarks.
  10136. * runtime/Structure.cpp:
  10137. (JSC::Structure::Structure):
  10138. (JSC):
  10139. (JSC::Structure::suggestedNewOutOfLineStorageCapacity):
  10140. (JSC::Structure::addPropertyTransition):
  10141. (JSC::Structure::addPropertyWithoutTransition):
  10142. * runtime/Structure.h:
  10143. (Structure):
  10144. (JSC::Structure::outOfLineCapacity):
  10145. (JSC::Structure::totalStorageCapacity):
  10146. 2013-01-29 Geoffrey Garen <ggaren@apple.com>
  10147. Be a little more conservative about emitting table-based switches
  10148. https://bugs.webkit.org/show_bug.cgi?id=108292
  10149. Reviewed by Filip Pizlo.
  10150. Profiling shows we're using op_switch in cases where it's a regression.
  10151. * bytecompiler/NodesCodegen.cpp:
  10152. (JSC):
  10153. (JSC::length):
  10154. (JSC::CaseBlockNode::tryTableSwitch):
  10155. (JSC::CaseBlockNode::emitBytecodeForBlock):
  10156. * parser/Nodes.h:
  10157. (CaseBlockNode):
  10158. 2013-01-29 Sheriff Bot <webkit.review.bot@gmail.com>
  10159. Unreviewed, rolling out r140983.
  10160. http://trac.webkit.org/changeset/140983
  10161. https://bugs.webkit.org/show_bug.cgi?id=108277
  10162. Unfortunately, this API has one last client (Requested by
  10163. abarth on #webkit).
  10164. * Configurations/FeatureDefines.xcconfig:
  10165. 2013-01-29 Mark Hahnenberg <mhahnenberg@apple.com>
  10166. Objective-C API: JSObjCClassInfo creates reference cycle with JSContext
  10167. https://bugs.webkit.org/show_bug.cgi?id=107839
  10168. Reviewed by Geoffrey Garen.
  10169. Fixing several ASSERTs that were incorrect along with some of the reallocation of m_prototype and
  10170. m_constructor that they were based on.
  10171. * API/JSWrapperMap.mm:
  10172. (-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]): We now only allocate those
  10173. fields that are null (i.e. have been collected or have never been allocated to begin with).
  10174. (-[JSObjCClassInfo reallocateConstructorAndOrPrototype]): Renamed to better indicate that we're
  10175. reallocating one or both of the prototype/constructor combo.
  10176. (-[JSObjCClassInfo wrapperForObject:]): Call new reallocate function.
  10177. (-[JSObjCClassInfo constructor]): Ditto.
  10178. 2013-01-29 Geoffrey Garen <ggaren@apple.com>
  10179. Make precise size classes more precise
  10180. https://bugs.webkit.org/show_bug.cgi?id=108270
  10181. Reviewed by Mark Hahnenberg.
  10182. Size inference makes this profitable.
  10183. I chose 8 byte increments because JSString is 24 bytes. Otherwise, 16
  10184. byte increments might be better.
  10185. * heap/Heap.h:
  10186. (Heap): Removed firstAllocatorWithoutDestructors because it's unused now.
  10187. * heap/MarkedBlock.h:
  10188. (MarkedBlock): Updated constants.
  10189. * heap/MarkedSpace.h:
  10190. (MarkedSpace):
  10191. (JSC): Also reduced the maximum precise size class because my testing
  10192. has shown that the smaller size classes are much more common. This
  10193. offsets some of the size class explosion caused by reducing the precise
  10194. increment.
  10195. * llint/LLIntData.cpp:
  10196. (JSC::LLInt::Data::performAssertions): No need for this ASSERT anymore
  10197. because we don't rely on firstAllocatorWithoutDestructors anymore, since
  10198. we pick size classes dynamically now.
  10199. 2013-01-29 Oliver Hunt <oliver@apple.com>
  10200. Add some hardening to methodTable()
  10201. https://bugs.webkit.org/show_bug.cgi?id=108253
  10202. Reviewed by Mark Hahnenberg.
  10203. When accessing methodTable() we now always make sure that our
  10204. structure _could_ be valid. Added a separate method to get a
  10205. classes methodTable during destruction as it's not possible to
  10206. validate the structure at that point. This separation might
  10207. also make it possible to improve the performance of methodTable
  10208. access more generally in future.
  10209. * heap/MarkedBlock.cpp:
  10210. (JSC::MarkedBlock::callDestructor):
  10211. * runtime/JSCell.h:
  10212. (JSCell):
  10213. * runtime/JSCellInlines.h:
  10214. (JSC::JSCell::methodTableForDestruction):
  10215. (JSC):
  10216. (JSC::JSCell::methodTable):
  10217. 2013-01-29 Filip Pizlo <fpizlo@apple.com>
  10218. offlineasm BaseIndex handling is broken on ARM due to MIPS changes
  10219. https://bugs.webkit.org/show_bug.cgi?id=108261
  10220. Reviewed by Oliver Hunt.
  10221. Backends shouldn't override each other's methods. That's not cool.
  10222. * offlineasm/mips.rb:
  10223. 2013-01-29 Filip Pizlo <fpizlo@apple.com>
  10224. cloop.rb shouldn't use a method called 'dump' for code generation
  10225. https://bugs.webkit.org/show_bug.cgi?id=108251
  10226. Reviewed by Mark Hahnenberg.
  10227. Revert http://trac.webkit.org/changeset/141178 and rename 'dump' to 'clDump'.
  10228. Also made trivial build fixes for !ENABLE(JIT).
  10229. * offlineasm/cloop.rb:
  10230. * runtime/Executable.h:
  10231. (ExecutableBase):
  10232. (JSC::ExecutableBase::intrinsicFor):
  10233. * runtime/JSGlobalData.h:
  10234. 2013-01-29 Geoffrey Garen <ggaren@apple.com>
  10235. Removed GGC because it has been disabled for a long time
  10236. https://bugs.webkit.org/show_bug.cgi?id=108245
  10237. Reviewed by Filip Pizlo.
  10238. * GNUmakefile.list.am:
  10239. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  10240. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
  10241. * JavaScriptCore.xcodeproj/project.pbxproj:
  10242. * dfg/DFGRepatch.cpp:
  10243. (JSC::DFG::emitPutReplaceStub):
  10244. (JSC::DFG::emitPutTransitionStub):
  10245. * dfg/DFGSpeculativeJIT.cpp:
  10246. (JSC::DFG::SpeculativeJIT::writeBarrier):
  10247. * dfg/DFGSpeculativeJIT.h:
  10248. (SpeculativeJIT):
  10249. * dfg/DFGSpeculativeJIT32_64.cpp:
  10250. (JSC::DFG::SpeculativeJIT::compile):
  10251. * dfg/DFGSpeculativeJIT64.cpp:
  10252. (JSC::DFG::SpeculativeJIT::compile):
  10253. * heap/CardSet.h: Removed.
  10254. * heap/Heap.cpp:
  10255. (JSC::Heap::markRoots):
  10256. (JSC::Heap::collect):
  10257. * heap/Heap.h:
  10258. (Heap):
  10259. (JSC::Heap::shouldCollect):
  10260. (JSC::Heap::isWriteBarrierEnabled):
  10261. (JSC):
  10262. (JSC::Heap::writeBarrier):
  10263. * heap/MarkedBlock.h:
  10264. (MarkedBlock):
  10265. (JSC):
  10266. * heap/MarkedSpace.cpp:
  10267. (JSC):
  10268. * jit/JITPropertyAccess.cpp:
  10269. (JSC::JIT::emitWriteBarrier):
  10270. 2013-01-29 Filip Pizlo <fpizlo@apple.com>
  10271. Remove redundant AST dump method from cloop.rb, since they are already defined in ast.rb
  10272. https://bugs.webkit.org/show_bug.cgi?id=108247
  10273. Reviewed by Oliver Hunt.
  10274. Makes offlineasm dumping easier to read and less likely to cause assertion failures.
  10275. Also fixes the strange situation where cloop.rb and ast.rb both defined dump methods,
  10276. but cloop.rb was winning.
  10277. * offlineasm/cloop.rb:
  10278. 2013-01-29 Mark Hahnenberg <mhahnenberg@apple.com>
  10279. Objective-C API: JSObjCClassInfo creates reference cycle with JSContext
  10280. https://bugs.webkit.org/show_bug.cgi?id=107839
  10281. Reviewed by Oliver Hunt.
  10282. JSContext has a JSWrapperMap, which has an NSMutableDictionary m_classMap, which has values that
  10283. are JSObjCClassInfo objects, which have strong references to two JSValue *'s, m_prototype and
  10284. m_constructor, which in turn have strong references to the JSContext, creating a reference cycle.
  10285. We should make m_prototype and m_constructor Weak<JSObject>. This gets rid of the strong reference
  10286. to the JSContext and also prevents clients from accidentally creating reference cycles by assigning
  10287. to the prototype of the constructor. If Weak<JSObject> fields are ever garbage collected, we will
  10288. reallocate them.
  10289. * API/JSContext.mm:
  10290. (-[JSContext wrapperMap]):
  10291. * API/JSContextInternal.h:
  10292. * API/JSWrapperMap.mm:
  10293. (-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]):
  10294. (-[JSObjCClassInfo dealloc]):
  10295. (-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]):
  10296. (-[JSObjCClassInfo allocateConstructorAndPrototype]):
  10297. (-[JSObjCClassInfo wrapperForObject:]):
  10298. (-[JSObjCClassInfo constructor]):
  10299. 2013-01-29 Oliver Hunt <oliver@apple.com>
  10300. REGRESSION (r140594): RELEASE_ASSERT_NOT_REACHED in JSC::Interpreter::execute
  10301. https://bugs.webkit.org/show_bug.cgi?id=108097
  10302. Reviewed by Geoffrey Garen.
  10303. LiteralParser was accepting a bogus 'var a.b = c' statement
  10304. * runtime/LiteralParser.cpp:
  10305. (JSC::::tryJSONPParse):
  10306. 2013-01-29 Oliver Hunt <oliver@apple.com>
  10307. Force debug builds to do bounds checks on contiguous property storage
  10308. https://bugs.webkit.org/show_bug.cgi?id=108212
  10309. Reviewed by Mark Hahnenberg.
  10310. Add a ContiguousData type that we use to represent contiguous property
  10311. storage. In release builds it is simply a pointer to the correct type,
  10312. but in debug builds it also carries the data length and performs bounds
  10313. checks. This means we don't have to add as many manual bounds assertions
  10314. when performing operations over contiguous data.
  10315. * dfg/DFGOperations.cpp:
  10316. * runtime/ArrayStorage.h:
  10317. (ArrayStorage):
  10318. (JSC::ArrayStorage::vector):
  10319. * runtime/Butterfly.h:
  10320. (JSC::ContiguousData::ContiguousData):
  10321. (ContiguousData):
  10322. (JSC::ContiguousData::operator[]):
  10323. (JSC::ContiguousData::data):
  10324. (JSC::ContiguousData::length):
  10325. (JSC):
  10326. (JSC::Butterfly::contiguousInt32):
  10327. (Butterfly):
  10328. (JSC::Butterfly::contiguousDouble):
  10329. (JSC::Butterfly::contiguous):
  10330. * runtime/JSArray.cpp:
  10331. (JSC::JSArray::sortNumericVector):
  10332. (ContiguousTypeAccessor):
  10333. (JSC::ContiguousTypeAccessor::getAsValue):
  10334. (JSC::ContiguousTypeAccessor::setWithValue):
  10335. (JSC::ContiguousTypeAccessor::replaceDataReference):
  10336. (JSC):
  10337. (JSC::JSArray::sortCompactedVector):
  10338. (JSC::JSArray::sort):
  10339. (JSC::JSArray::fillArgList):
  10340. (JSC::JSArray::copyToArguments):
  10341. * runtime/JSArray.h:
  10342. (JSArray):
  10343. * runtime/JSObject.cpp:
  10344. (JSC::JSObject::copyButterfly):
  10345. (JSC::JSObject::visitButterfly):
  10346. (JSC::JSObject::createInitialInt32):
  10347. (JSC::JSObject::createInitialDouble):
  10348. (JSC::JSObject::createInitialContiguous):
  10349. (JSC::JSObject::convertUndecidedToInt32):
  10350. (JSC::JSObject::convertUndecidedToDouble):
  10351. (JSC::JSObject::convertUndecidedToContiguous):
  10352. (JSC::JSObject::convertInt32ToDouble):
  10353. (JSC::JSObject::convertInt32ToContiguous):
  10354. (JSC::JSObject::genericConvertDoubleToContiguous):
  10355. (JSC::JSObject::convertDoubleToContiguous):
  10356. (JSC::JSObject::rageConvertDoubleToContiguous):
  10357. (JSC::JSObject::ensureInt32Slow):
  10358. (JSC::JSObject::ensureDoubleSlow):
  10359. (JSC::JSObject::ensureContiguousSlow):
  10360. (JSC::JSObject::rageEnsureContiguousSlow):
  10361. (JSC::JSObject::ensureLengthSlow):
  10362. * runtime/JSObject.h:
  10363. (JSC::JSObject::ensureInt32):
  10364. (JSC::JSObject::ensureDouble):
  10365. (JSC::JSObject::ensureContiguous):
  10366. (JSC::JSObject::rageEnsureContiguous):
  10367. (JSObject):
  10368. (JSC::JSObject::indexingData):
  10369. (JSC::JSObject::currentIndexingData):
  10370. 2013-01-29 Brent Fulgham <bfulgham@webkit.org>
  10371. [Windows, WinCairo] Unreviewed build fix after r141050
  10372. * JavaScriptCore.vcxproj/JavaScriptCoreExports.def: Update symbols
  10373. to match JavaScriptCore.vcproj version.
  10374. 2013-01-29 Allan Sandfeld Jensen <allan.jensen@digia.com>
  10375. [Qt] Implement GCActivityCallback
  10376. https://bugs.webkit.org/show_bug.cgi?id=103998
  10377. Reviewed by Simon Hausmann.
  10378. Implements the activity triggered garbage collector.
  10379. * runtime/GCActivityCallback.cpp:
  10380. (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
  10381. (JSC::DefaultGCActivityCallback::scheduleTimer):
  10382. (JSC::DefaultGCActivityCallback::cancelTimer):
  10383. * runtime/GCActivityCallback.h:
  10384. (GCActivityCallback):
  10385. (DefaultGCActivityCallback):
  10386. 2013-01-29 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
  10387. Compilation warning in JSC
  10388. https://bugs.webkit.org/show_bug.cgi?id=108178
  10389. Reviewed by Kentaro Hara.
  10390. Fixed 'comparison between signed and unsigned integer' warning in JSC::Structure constructor.
  10391. * runtime/Structure.cpp:
  10392. (JSC::Structure::Structure):
  10393. 2013-01-29 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
  10394. [Qt] Fix the JSC build on Mac
  10395. Unreviewed, build fix.
  10396. * heap/HeapTimer.h:
  10397. Qt on Mac has USE(CF) true, and should use the CF HeapTimer in that case.
  10398. 2013-01-29 Allan Sandfeld Jensen <allan.jensen@digia.com>
  10399. [Qt] Implement IncrementalSweeper and HeapTimer
  10400. https://bugs.webkit.org/show_bug.cgi?id=103996
  10401. Reviewed by Simon Hausmann.
  10402. Implements the incremental sweeping garbage collection for the Qt platform.
  10403. * heap/HeapTimer.cpp:
  10404. (JSC::HeapTimer::HeapTimer):
  10405. (JSC::HeapTimer::~HeapTimer):
  10406. (JSC::HeapTimer::timerEvent):
  10407. (JSC::HeapTimer::synchronize):
  10408. (JSC::HeapTimer::invalidate):
  10409. (JSC::HeapTimer::didStartVMShutdown):
  10410. * heap/HeapTimer.h:
  10411. (HeapTimer):
  10412. * heap/IncrementalSweeper.cpp:
  10413. (JSC::IncrementalSweeper::IncrementalSweeper):
  10414. (JSC::IncrementalSweeper::scheduleTimer):
  10415. * heap/IncrementalSweeper.h:
  10416. (IncrementalSweeper):
  10417. 2013-01-28 Filip Pizlo <fpizlo@apple.com>
  10418. DFG should not use a graph that is a vector, Nodes shouldn't move after allocation, and we should always refer to nodes by Node*
  10419. https://bugs.webkit.org/show_bug.cgi?id=106868
  10420. Reviewed by Oliver Hunt.
  10421. This adds a pool allocator for Nodes, and uses that instead of a Vector. Changes all
  10422. uses of Node& and NodeIndex to be simply Node*. Nodes no longer have an index except
  10423. for debugging (Node::index(), which is not guaranteed to be O(1)).
  10424. 1% speed-up on SunSpider, presumably because this improves compile times.
  10425. * CMakeLists.txt:
  10426. * GNUmakefile.list.am:
  10427. * JavaScriptCore.xcodeproj/project.pbxproj:
  10428. * Target.pri:
  10429. * bytecode/DataFormat.h:
  10430. (JSC::dataFormatToString):
  10431. * dfg/DFGAbstractState.cpp:
  10432. (JSC::DFG::AbstractState::initialize):
  10433. (JSC::DFG::AbstractState::booleanResult):
  10434. (JSC::DFG::AbstractState::execute):
  10435. (JSC::DFG::AbstractState::mergeStateAtTail):
  10436. (JSC::DFG::AbstractState::mergeToSuccessors):
  10437. (JSC::DFG::AbstractState::mergeVariableBetweenBlocks):
  10438. (JSC::DFG::AbstractState::dump):
  10439. * dfg/DFGAbstractState.h:
  10440. (DFG):
  10441. (JSC::DFG::AbstractState::forNode):
  10442. (AbstractState):
  10443. (JSC::DFG::AbstractState::speculateInt32Unary):
  10444. (JSC::DFG::AbstractState::speculateNumberUnary):
  10445. (JSC::DFG::AbstractState::speculateBooleanUnary):
  10446. (JSC::DFG::AbstractState::speculateInt32Binary):
  10447. (JSC::DFG::AbstractState::speculateNumberBinary):
  10448. (JSC::DFG::AbstractState::trySetConstant):
  10449. * dfg/DFGAbstractValue.h:
  10450. (AbstractValue):
  10451. * dfg/DFGAdjacencyList.h:
  10452. (JSC::DFG::AdjacencyList::AdjacencyList):
  10453. (JSC::DFG::AdjacencyList::initialize):
  10454. * dfg/DFGAllocator.h: Added.
  10455. (DFG):
  10456. (Allocator):
  10457. (JSC::DFG::Allocator::Region::size):
  10458. (JSC::DFG::Allocator::Region::headerSize):
  10459. (JSC::DFG::Allocator::Region::numberOfThingsPerRegion):
  10460. (JSC::DFG::Allocator::Region::data):
  10461. (JSC::DFG::Allocator::Region::isInThisRegion):
  10462. (JSC::DFG::Allocator::Region::regionFor):
  10463. (Region):
  10464. (JSC::DFG::::Allocator):
  10465. (JSC::DFG::::~Allocator):
  10466. (JSC::DFG::::allocate):
  10467. (JSC::DFG::::free):
  10468. (JSC::DFG::::freeAll):
  10469. (JSC::DFG::::reset):
  10470. (JSC::DFG::::indexOf):
  10471. (JSC::DFG::::allocatorOf):
  10472. (JSC::DFG::::bumpAllocate):
  10473. (JSC::DFG::::freeListAllocate):
  10474. (JSC::DFG::::allocateSlow):
  10475. (JSC::DFG::::freeRegionsStartingAt):
  10476. (JSC::DFG::::startBumpingIn):
  10477. * dfg/DFGArgumentsSimplificationPhase.cpp:
  10478. (JSC::DFG::ArgumentsSimplificationPhase::run):
  10479. (JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUse):
  10480. (JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUses):
  10481. (JSC::DFG::ArgumentsSimplificationPhase::observeProperArgumentsUse):
  10482. (JSC::DFG::ArgumentsSimplificationPhase::isOKToOptimize):
  10483. (JSC::DFG::ArgumentsSimplificationPhase::removeArgumentsReferencingPhantomChild):
  10484. * dfg/DFGArrayMode.cpp:
  10485. (JSC::DFG::ArrayMode::originalArrayStructure):
  10486. (JSC::DFG::ArrayMode::alreadyChecked):
  10487. * dfg/DFGArrayMode.h:
  10488. (ArrayMode):
  10489. * dfg/DFGArrayifySlowPathGenerator.h:
  10490. (JSC::DFG::ArrayifySlowPathGenerator::ArrayifySlowPathGenerator):
  10491. * dfg/DFGBasicBlock.h:
  10492. (JSC::DFG::BasicBlock::node):
  10493. (JSC::DFG::BasicBlock::isInPhis):
  10494. (JSC::DFG::BasicBlock::isInBlock):
  10495. (BasicBlock):
  10496. * dfg/DFGBasicBlockInlines.h:
  10497. (DFG):
  10498. * dfg/DFGByteCodeParser.cpp:
  10499. (ByteCodeParser):
  10500. (JSC::DFG::ByteCodeParser::getDirect):
  10501. (JSC::DFG::ByteCodeParser::get):
  10502. (JSC::DFG::ByteCodeParser::setDirect):
  10503. (JSC::DFG::ByteCodeParser::set):
  10504. (JSC::DFG::ByteCodeParser::setPair):
  10505. (JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation):
  10506. (JSC::DFG::ByteCodeParser::getLocal):
  10507. (JSC::DFG::ByteCodeParser::setLocal):
  10508. (JSC::DFG::ByteCodeParser::getArgument):
  10509. (JSC::DFG::ByteCodeParser::setArgument):
  10510. (JSC::DFG::ByteCodeParser::flushDirect):
  10511. (JSC::DFG::ByteCodeParser::getToInt32):
  10512. (JSC::DFG::ByteCodeParser::toInt32):
  10513. (JSC::DFG::ByteCodeParser::getJSConstantForValue):
  10514. (JSC::DFG::ByteCodeParser::getJSConstant):
  10515. (JSC::DFG::ByteCodeParser::getCallee):
  10516. (JSC::DFG::ByteCodeParser::getThis):
  10517. (JSC::DFG::ByteCodeParser::setThis):
  10518. (JSC::DFG::ByteCodeParser::isJSConstant):
  10519. (JSC::DFG::ByteCodeParser::isInt32Constant):
  10520. (JSC::DFG::ByteCodeParser::valueOfJSConstant):
  10521. (JSC::DFG::ByteCodeParser::valueOfInt32Constant):
  10522. (JSC::DFG::ByteCodeParser::constantUndefined):
  10523. (JSC::DFG::ByteCodeParser::constantNull):
  10524. (JSC::DFG::ByteCodeParser::one):
  10525. (JSC::DFG::ByteCodeParser::constantNaN):
  10526. (JSC::DFG::ByteCodeParser::cellConstant):
  10527. (JSC::DFG::ByteCodeParser::addToGraph):
  10528. (JSC::DFG::ByteCodeParser::insertPhiNode):
  10529. (JSC::DFG::ByteCodeParser::addVarArgChild):
  10530. (JSC::DFG::ByteCodeParser::addCall):
  10531. (JSC::DFG::ByteCodeParser::addStructureTransitionCheck):
  10532. (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
  10533. (JSC::DFG::ByteCodeParser::getPrediction):
  10534. (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks):
  10535. (JSC::DFG::ByteCodeParser::makeSafe):
  10536. (JSC::DFG::ByteCodeParser::makeDivSafe):
  10537. (JSC::DFG::ByteCodeParser::ConstantRecord::ConstantRecord):
  10538. (ConstantRecord):
  10539. (JSC::DFG::ByteCodeParser::PhiStackEntry::PhiStackEntry):
  10540. (PhiStackEntry):
  10541. (JSC::DFG::ByteCodeParser::handleCall):
  10542. (JSC::DFG::ByteCodeParser::emitFunctionChecks):
  10543. (JSC::DFG::ByteCodeParser::handleInlining):
  10544. (JSC::DFG::ByteCodeParser::setIntrinsicResult):
  10545. (JSC::DFG::ByteCodeParser::handleMinMax):
  10546. (JSC::DFG::ByteCodeParser::handleIntrinsic):
  10547. (JSC::DFG::ByteCodeParser::handleGetByOffset):
  10548. (JSC::DFG::ByteCodeParser::handleGetById):
  10549. (JSC::DFG::ByteCodeParser::getScope):
  10550. (JSC::DFG::ByteCodeParser::parseResolveOperations):
  10551. (JSC::DFG::ByteCodeParser::parseBlock):
  10552. (JSC::DFG::ByteCodeParser::processPhiStack):
  10553. (JSC::DFG::ByteCodeParser::linkBlock):
  10554. (JSC::DFG::ByteCodeParser::parseCodeBlock):
  10555. (JSC::DFG::ByteCodeParser::parse):
  10556. * dfg/DFGCFAPhase.cpp:
  10557. (JSC::DFG::CFAPhase::performBlockCFA):
  10558. * dfg/DFGCFGSimplificationPhase.cpp:
  10559. (JSC::DFG::CFGSimplificationPhase::run):
  10560. (JSC::DFG::CFGSimplificationPhase::keepOperandAlive):
  10561. (JSC::DFG::CFGSimplificationPhase::fixPossibleGetLocal):
  10562. (JSC::DFG::CFGSimplificationPhase::fixPhis):
  10563. (JSC::DFG::CFGSimplificationPhase::removePotentiallyDeadPhiReference):
  10564. (JSC::DFG::CFGSimplificationPhase::OperandSubstitution::OperandSubstitution):
  10565. (JSC::DFG::CFGSimplificationPhase::OperandSubstitution::dump):
  10566. (OperandSubstitution):
  10567. (JSC::DFG::CFGSimplificationPhase::skipGetLocal):
  10568. (JSC::DFG::CFGSimplificationPhase::recordNewTarget):
  10569. (JSC::DFG::CFGSimplificationPhase::fixTailOperand):
  10570. (JSC::DFG::CFGSimplificationPhase::mergeBlocks):
  10571. * dfg/DFGCSEPhase.cpp:
  10572. (JSC::DFG::CSEPhase::canonicalize):
  10573. (JSC::DFG::CSEPhase::endIndexForPureCSE):
  10574. (JSC::DFG::CSEPhase::pureCSE):
  10575. (JSC::DFG::CSEPhase::constantCSE):
  10576. (JSC::DFG::CSEPhase::weakConstantCSE):
  10577. (JSC::DFG::CSEPhase::getCalleeLoadElimination):
  10578. (JSC::DFG::CSEPhase::getArrayLengthElimination):
  10579. (JSC::DFG::CSEPhase::globalVarLoadElimination):
  10580. (JSC::DFG::CSEPhase::scopedVarLoadElimination):
  10581. (JSC::DFG::CSEPhase::globalVarWatchpointElimination):
  10582. (JSC::DFG::CSEPhase::globalVarStoreElimination):
  10583. (JSC::DFG::CSEPhase::scopedVarStoreElimination):
  10584. (JSC::DFG::CSEPhase::getByValLoadElimination):
  10585. (JSC::DFG::CSEPhase::checkFunctionElimination):
  10586. (JSC::DFG::CSEPhase::checkExecutableElimination):
  10587. (JSC::DFG::CSEPhase::checkStructureElimination):
  10588. (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination):
  10589. (JSC::DFG::CSEPhase::putStructureStoreElimination):
  10590. (JSC::DFG::CSEPhase::getByOffsetLoadElimination):
  10591. (JSC::DFG::CSEPhase::putByOffsetStoreElimination):
  10592. (JSC::DFG::CSEPhase::getPropertyStorageLoadElimination):
  10593. (JSC::DFG::CSEPhase::checkArrayElimination):
  10594. (JSC::DFG::CSEPhase::getIndexedPropertyStorageLoadElimination):
  10595. (JSC::DFG::CSEPhase::getMyScopeLoadElimination):
  10596. (JSC::DFG::CSEPhase::getLocalLoadElimination):
  10597. (JSC::DFG::CSEPhase::setLocalStoreElimination):
  10598. (JSC::DFG::CSEPhase::performSubstitution):
  10599. (JSC::DFG::CSEPhase::eliminateIrrelevantPhantomChildren):
  10600. (JSC::DFG::CSEPhase::setReplacement):
  10601. (JSC::DFG::CSEPhase::eliminate):
  10602. (JSC::DFG::CSEPhase::performNodeCSE):
  10603. (JSC::DFG::CSEPhase::performBlockCSE):
  10604. (CSEPhase):
  10605. * dfg/DFGCommon.cpp: Added.
  10606. (DFG):
  10607. (JSC::DFG::NodePointerTraits::dump):
  10608. * dfg/DFGCommon.h:
  10609. (DFG):
  10610. (JSC::DFG::NodePointerTraits::defaultValue):
  10611. (NodePointerTraits):
  10612. (JSC::DFG::verboseCompilationEnabled):
  10613. (JSC::DFG::shouldDumpGraphAtEachPhase):
  10614. (JSC::DFG::validationEnabled):
  10615. * dfg/DFGConstantFoldingPhase.cpp:
  10616. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  10617. (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter):
  10618. (JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck):
  10619. (JSC::DFG::ConstantFoldingPhase::paintUnreachableCode):
  10620. * dfg/DFGDisassembler.cpp:
  10621. (JSC::DFG::Disassembler::Disassembler):
  10622. (JSC::DFG::Disassembler::createDumpList):
  10623. (JSC::DFG::Disassembler::dumpDisassembly):
  10624. * dfg/DFGDisassembler.h:
  10625. (JSC::DFG::Disassembler::setForNode):
  10626. (Disassembler):
  10627. * dfg/DFGDriver.cpp:
  10628. (JSC::DFG::compile):
  10629. * dfg/DFGEdge.cpp: Added.
  10630. (DFG):
  10631. (JSC::DFG::Edge::dump):
  10632. * dfg/DFGEdge.h:
  10633. (JSC::DFG::Edge::Edge):
  10634. (JSC::DFG::Edge::node):
  10635. (JSC::DFG::Edge::operator*):
  10636. (JSC::DFG::Edge::operator->):
  10637. (Edge):
  10638. (JSC::DFG::Edge::setNode):
  10639. (JSC::DFG::Edge::useKind):
  10640. (JSC::DFG::Edge::setUseKind):
  10641. (JSC::DFG::Edge::isSet):
  10642. (JSC::DFG::Edge::shift):
  10643. (JSC::DFG::Edge::makeWord):
  10644. (JSC::DFG::operator==):
  10645. (JSC::DFG::operator!=):
  10646. * dfg/DFGFixupPhase.cpp:
  10647. (JSC::DFG::FixupPhase::fixupBlock):
  10648. (JSC::DFG::FixupPhase::fixupNode):
  10649. (JSC::DFG::FixupPhase::checkArray):
  10650. (JSC::DFG::FixupPhase::blessArrayOperation):
  10651. (JSC::DFG::FixupPhase::fixIntEdge):
  10652. (JSC::DFG::FixupPhase::fixDoubleEdge):
  10653. (JSC::DFG::FixupPhase::injectInt32ToDoubleNode):
  10654. (FixupPhase):
  10655. * dfg/DFGGenerationInfo.h:
  10656. (JSC::DFG::GenerationInfo::GenerationInfo):
  10657. (JSC::DFG::GenerationInfo::initConstant):
  10658. (JSC::DFG::GenerationInfo::initInteger):
  10659. (JSC::DFG::GenerationInfo::initJSValue):
  10660. (JSC::DFG::GenerationInfo::initCell):
  10661. (JSC::DFG::GenerationInfo::initBoolean):
  10662. (JSC::DFG::GenerationInfo::initDouble):
  10663. (JSC::DFG::GenerationInfo::initStorage):
  10664. (GenerationInfo):
  10665. (JSC::DFG::GenerationInfo::node):
  10666. (JSC::DFG::GenerationInfo::noticeOSRBirth):
  10667. (JSC::DFG::GenerationInfo::use):
  10668. (JSC::DFG::GenerationInfo::appendFill):
  10669. (JSC::DFG::GenerationInfo::appendSpill):
  10670. * dfg/DFGGraph.cpp:
  10671. (JSC::DFG::Graph::Graph):
  10672. (JSC::DFG::Graph::~Graph):
  10673. (DFG):
  10674. (JSC::DFG::Graph::dumpCodeOrigin):
  10675. (JSC::DFG::Graph::amountOfNodeWhiteSpace):
  10676. (JSC::DFG::Graph::printNodeWhiteSpace):
  10677. (JSC::DFG::Graph::dump):
  10678. (JSC::DFG::Graph::dumpBlockHeader):
  10679. (JSC::DFG::Graph::refChildren):
  10680. (JSC::DFG::Graph::derefChildren):
  10681. (JSC::DFG::Graph::predictArgumentTypes):
  10682. (JSC::DFG::Graph::collectGarbage):
  10683. (JSC::DFG::Graph::determineReachability):
  10684. (JSC::DFG::Graph::resetExitStates):
  10685. * dfg/DFGGraph.h:
  10686. (Graph):
  10687. (JSC::DFG::Graph::ref):
  10688. (JSC::DFG::Graph::deref):
  10689. (JSC::DFG::Graph::changeChild):
  10690. (JSC::DFG::Graph::compareAndSwap):
  10691. (JSC::DFG::Graph::clearAndDerefChild):
  10692. (JSC::DFG::Graph::clearAndDerefChild1):
  10693. (JSC::DFG::Graph::clearAndDerefChild2):
  10694. (JSC::DFG::Graph::clearAndDerefChild3):
  10695. (JSC::DFG::Graph::convertToConstant):
  10696. (JSC::DFG::Graph::getJSConstantSpeculation):
  10697. (JSC::DFG::Graph::addSpeculationMode):
  10698. (JSC::DFG::Graph::valueAddSpeculationMode):
  10699. (JSC::DFG::Graph::arithAddSpeculationMode):
  10700. (JSC::DFG::Graph::addShouldSpeculateInteger):
  10701. (JSC::DFG::Graph::mulShouldSpeculateInteger):
  10702. (JSC::DFG::Graph::negateShouldSpeculateInteger):
  10703. (JSC::DFG::Graph::isConstant):
  10704. (JSC::DFG::Graph::isJSConstant):
  10705. (JSC::DFG::Graph::isInt32Constant):
  10706. (JSC::DFG::Graph::isDoubleConstant):
  10707. (JSC::DFG::Graph::isNumberConstant):
  10708. (JSC::DFG::Graph::isBooleanConstant):
  10709. (JSC::DFG::Graph::isCellConstant):
  10710. (JSC::DFG::Graph::isFunctionConstant):
  10711. (JSC::DFG::Graph::isInternalFunctionConstant):
  10712. (JSC::DFG::Graph::valueOfJSConstant):
  10713. (JSC::DFG::Graph::valueOfInt32Constant):
  10714. (JSC::DFG::Graph::valueOfNumberConstant):
  10715. (JSC::DFG::Graph::valueOfBooleanConstant):
  10716. (JSC::DFG::Graph::valueOfFunctionConstant):
  10717. (JSC::DFG::Graph::valueProfileFor):
  10718. (JSC::DFG::Graph::methodOfGettingAValueProfileFor):
  10719. (JSC::DFG::Graph::numSuccessors):
  10720. (JSC::DFG::Graph::successor):
  10721. (JSC::DFG::Graph::successorForCondition):
  10722. (JSC::DFG::Graph::isPredictedNumerical):
  10723. (JSC::DFG::Graph::byValIsPure):
  10724. (JSC::DFG::Graph::clobbersWorld):
  10725. (JSC::DFG::Graph::varArgNumChildren):
  10726. (JSC::DFG::Graph::numChildren):
  10727. (JSC::DFG::Graph::varArgChild):
  10728. (JSC::DFG::Graph::child):
  10729. (JSC::DFG::Graph::voteNode):
  10730. (JSC::DFG::Graph::voteChildren):
  10731. (JSC::DFG::Graph::substitute):
  10732. (JSC::DFG::Graph::substituteGetLocal):
  10733. (JSC::DFG::Graph::addImmediateShouldSpeculateInteger):
  10734. (JSC::DFG::Graph::mulImmediateShouldSpeculateInteger):
  10735. * dfg/DFGInsertionSet.h:
  10736. (JSC::DFG::Insertion::Insertion):
  10737. (JSC::DFG::Insertion::element):
  10738. (Insertion):
  10739. (JSC::DFG::InsertionSet::insert):
  10740. (InsertionSet):
  10741. * dfg/DFGJITCompiler.cpp:
  10742. * dfg/DFGJITCompiler.h:
  10743. (JSC::DFG::JITCompiler::setForNode):
  10744. (JSC::DFG::JITCompiler::addressOfDoubleConstant):
  10745. (JSC::DFG::JITCompiler::noticeOSREntry):
  10746. * dfg/DFGLongLivedState.cpp: Added.
  10747. (DFG):
  10748. (JSC::DFG::LongLivedState::LongLivedState):
  10749. (JSC::DFG::LongLivedState::~LongLivedState):
  10750. (JSC::DFG::LongLivedState::shrinkToFit):
  10751. * dfg/DFGLongLivedState.h: Added.
  10752. (DFG):
  10753. (LongLivedState):
  10754. * dfg/DFGMinifiedID.h:
  10755. (JSC::DFG::MinifiedID::MinifiedID):
  10756. (JSC::DFG::MinifiedID::node):
  10757. * dfg/DFGMinifiedNode.cpp:
  10758. (JSC::DFG::MinifiedNode::fromNode):
  10759. * dfg/DFGMinifiedNode.h:
  10760. (MinifiedNode):
  10761. * dfg/DFGNode.cpp: Added.
  10762. (DFG):
  10763. (JSC::DFG::Node::index):
  10764. (WTF):
  10765. (WTF::printInternal):
  10766. * dfg/DFGNode.h:
  10767. (DFG):
  10768. (JSC::DFG::Node::Node):
  10769. (Node):
  10770. (JSC::DFG::Node::convertToGetByOffset):
  10771. (JSC::DFG::Node::convertToPutByOffset):
  10772. (JSC::DFG::Node::ref):
  10773. (JSC::DFG::Node::shouldSpeculateInteger):
  10774. (JSC::DFG::Node::shouldSpeculateIntegerForArithmetic):
  10775. (JSC::DFG::Node::shouldSpeculateIntegerExpectingDefined):
  10776. (JSC::DFG::Node::shouldSpeculateDoubleForArithmetic):
  10777. (JSC::DFG::Node::shouldSpeculateNumber):
  10778. (JSC::DFG::Node::shouldSpeculateNumberExpectingDefined):
  10779. (JSC::DFG::Node::shouldSpeculateFinalObject):
  10780. (JSC::DFG::Node::shouldSpeculateArray):
  10781. (JSC::DFG::Node::dumpChildren):
  10782. (WTF):
  10783. * dfg/DFGNodeAllocator.h: Added.
  10784. (DFG):
  10785. (operator new ):
  10786. * dfg/DFGOSRExit.cpp:
  10787. (JSC::DFG::OSRExit::OSRExit):
  10788. * dfg/DFGOSRExit.h:
  10789. (OSRExit):
  10790. (SpeculationFailureDebugInfo):
  10791. * dfg/DFGOSRExitCompiler.cpp:
  10792. * dfg/DFGOSRExitCompiler32_64.cpp:
  10793. (JSC::DFG::OSRExitCompiler::compileExit):
  10794. * dfg/DFGOSRExitCompiler64.cpp:
  10795. (JSC::DFG::OSRExitCompiler::compileExit):
  10796. * dfg/DFGOperations.cpp:
  10797. * dfg/DFGPhase.cpp:
  10798. (DFG):
  10799. (JSC::DFG::Phase::beginPhase):
  10800. (JSC::DFG::Phase::endPhase):
  10801. * dfg/DFGPhase.h:
  10802. (Phase):
  10803. (JSC::DFG::runAndLog):
  10804. * dfg/DFGPredictionPropagationPhase.cpp:
  10805. (JSC::DFG::PredictionPropagationPhase::setPrediction):
  10806. (JSC::DFG::PredictionPropagationPhase::mergePrediction):
  10807. (JSC::DFG::PredictionPropagationPhase::isNotNegZero):
  10808. (JSC::DFG::PredictionPropagationPhase::isNotZero):
  10809. (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoForConstant):
  10810. (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoNonRecursive):
  10811. (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwo):
  10812. (JSC::DFG::PredictionPropagationPhase::propagate):
  10813. (JSC::DFG::PredictionPropagationPhase::mergeDefaultFlags):
  10814. (JSC::DFG::PredictionPropagationPhase::propagateForward):
  10815. (JSC::DFG::PredictionPropagationPhase::propagateBackward):
  10816. (JSC::DFG::PredictionPropagationPhase::doDoubleVoting):
  10817. (PredictionPropagationPhase):
  10818. (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting):
  10819. * dfg/DFGScoreBoard.h:
  10820. (JSC::DFG::ScoreBoard::ScoreBoard):
  10821. (JSC::DFG::ScoreBoard::use):
  10822. (JSC::DFG::ScoreBoard::useIfHasResult):
  10823. (ScoreBoard):
  10824. * dfg/DFGSilentRegisterSavePlan.h:
  10825. (JSC::DFG::SilentRegisterSavePlan::SilentRegisterSavePlan):
  10826. (JSC::DFG::SilentRegisterSavePlan::node):
  10827. (SilentRegisterSavePlan):
  10828. * dfg/DFGSlowPathGenerator.h:
  10829. (JSC::DFG::SlowPathGenerator::SlowPathGenerator):
  10830. (JSC::DFG::SlowPathGenerator::generate):
  10831. (SlowPathGenerator):
  10832. * dfg/DFGSpeculativeJIT.cpp:
  10833. (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
  10834. (JSC::DFG::SpeculativeJIT::speculationCheck):
  10835. (JSC::DFG::SpeculativeJIT::speculationWatchpoint):
  10836. (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
  10837. (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck):
  10838. (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
  10839. (JSC::DFG::SpeculativeJIT::silentSavePlanForGPR):
  10840. (JSC::DFG::SpeculativeJIT::silentSavePlanForFPR):
  10841. (JSC::DFG::SpeculativeJIT::silentSpill):
  10842. (JSC::DFG::SpeculativeJIT::silentFill):
  10843. (JSC::DFG::SpeculativeJIT::checkArray):
  10844. (JSC::DFG::SpeculativeJIT::arrayify):
  10845. (JSC::DFG::SpeculativeJIT::fillStorage):
  10846. (JSC::DFG::SpeculativeJIT::useChildren):
  10847. (JSC::DFG::SpeculativeJIT::isStrictInt32):
  10848. (JSC::DFG::SpeculativeJIT::isKnownInteger):
  10849. (JSC::DFG::SpeculativeJIT::isKnownNumeric):
  10850. (JSC::DFG::SpeculativeJIT::isKnownCell):
  10851. (JSC::DFG::SpeculativeJIT::isKnownNotCell):
  10852. (JSC::DFG::SpeculativeJIT::isKnownNotInteger):
  10853. (JSC::DFG::SpeculativeJIT::isKnownNotNumber):
  10854. (JSC::DFG::SpeculativeJIT::writeBarrier):
  10855. (JSC::DFG::SpeculativeJIT::nonSpeculativeCompare):
  10856. (JSC::DFG::SpeculativeJIT::nonSpeculativeStrictEq):
  10857. (JSC::DFG::GPRTemporary::GPRTemporary):
  10858. (JSC::DFG::FPRTemporary::FPRTemporary):
  10859. (JSC::DFG::SpeculativeJIT::compilePeepHoleDoubleBranch):
  10860. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
  10861. (JSC::DFG::SpeculativeJIT::compilePeepHoleIntegerBranch):
  10862. (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
  10863. (JSC::DFG::SpeculativeJIT::noticeOSRBirth):
  10864. (JSC::DFG::SpeculativeJIT::compileMovHint):
  10865. (JSC::DFG::SpeculativeJIT::compile):
  10866. (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
  10867. (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):
  10868. (JSC::DFG::SpeculativeJIT::compileDoublePutByVal):
  10869. (JSC::DFG::SpeculativeJIT::compileGetCharCodeAt):
  10870. (JSC::DFG::SpeculativeJIT::compileGetByValOnString):
  10871. (JSC::DFG::SpeculativeJIT::checkGeneratedTypeForToInt32):
  10872. (JSC::DFG::SpeculativeJIT::compileValueToInt32):
  10873. (JSC::DFG::SpeculativeJIT::compileUInt32ToNumber):
  10874. (JSC::DFG::SpeculativeJIT::compileDoubleAsInt32):
  10875. (JSC::DFG::SpeculativeJIT::compileInt32ToDouble):
  10876. (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
  10877. (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
  10878. (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
  10879. (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
  10880. (JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
  10881. (JSC::DFG::SpeculativeJIT::compileInstanceOf):
  10882. (JSC::DFG::SpeculativeJIT::compileSoftModulo):
  10883. (JSC::DFG::SpeculativeJIT::compileAdd):
  10884. (JSC::DFG::SpeculativeJIT::compileArithSub):
  10885. (JSC::DFG::SpeculativeJIT::compileArithNegate):
  10886. (JSC::DFG::SpeculativeJIT::compileArithMul):
  10887. (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForX86):
  10888. (JSC::DFG::SpeculativeJIT::compileArithMod):
  10889. (JSC::DFG::SpeculativeJIT::compare):
  10890. (JSC::DFG::SpeculativeJIT::compileStrictEqForConstant):
  10891. (JSC::DFG::SpeculativeJIT::compileStrictEq):
  10892. (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
  10893. (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments):
  10894. (JSC::DFG::SpeculativeJIT::compileGetArgumentsLength):
  10895. (JSC::DFG::SpeculativeJIT::compileGetArrayLength):
  10896. (JSC::DFG::SpeculativeJIT::compileNewFunctionNoCheck):
  10897. (JSC::DFG::SpeculativeJIT::compileNewFunctionExpression):
  10898. (JSC::DFG::SpeculativeJIT::compileRegExpExec):
  10899. (JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
  10900. (JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):
  10901. * dfg/DFGSpeculativeJIT.h:
  10902. (SpeculativeJIT):
  10903. (JSC::DFG::SpeculativeJIT::canReuse):
  10904. (JSC::DFG::SpeculativeJIT::isFilled):
  10905. (JSC::DFG::SpeculativeJIT::isFilledDouble):
  10906. (JSC::DFG::SpeculativeJIT::use):
  10907. (JSC::DFG::SpeculativeJIT::isConstant):
  10908. (JSC::DFG::SpeculativeJIT::isJSConstant):
  10909. (JSC::DFG::SpeculativeJIT::isInt32Constant):
  10910. (JSC::DFG::SpeculativeJIT::isDoubleConstant):
  10911. (JSC::DFG::SpeculativeJIT::isNumberConstant):
  10912. (JSC::DFG::SpeculativeJIT::isBooleanConstant):
  10913. (JSC::DFG::SpeculativeJIT::isFunctionConstant):
  10914. (JSC::DFG::SpeculativeJIT::valueOfInt32Constant):
  10915. (JSC::DFG::SpeculativeJIT::valueOfNumberConstant):
  10916. (JSC::DFG::SpeculativeJIT::valueOfNumberConstantAsInt32):
  10917. (JSC::DFG::SpeculativeJIT::addressOfDoubleConstant):
  10918. (JSC::DFG::SpeculativeJIT::valueOfJSConstant):
  10919. (JSC::DFG::SpeculativeJIT::valueOfBooleanConstant):
  10920. (JSC::DFG::SpeculativeJIT::valueOfFunctionConstant):
  10921. (JSC::DFG::SpeculativeJIT::isNullConstant):
  10922. (JSC::DFG::SpeculativeJIT::valueOfJSConstantAsImm64):
  10923. (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
  10924. (JSC::DFG::SpeculativeJIT::integerResult):
  10925. (JSC::DFG::SpeculativeJIT::noResult):
  10926. (JSC::DFG::SpeculativeJIT::cellResult):
  10927. (JSC::DFG::SpeculativeJIT::booleanResult):
  10928. (JSC::DFG::SpeculativeJIT::jsValueResult):
  10929. (JSC::DFG::SpeculativeJIT::storageResult):
  10930. (JSC::DFG::SpeculativeJIT::doubleResult):
  10931. (JSC::DFG::SpeculativeJIT::initConstantInfo):
  10932. (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheck):
  10933. (JSC::DFG::SpeculativeJIT::isInteger):
  10934. (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal):
  10935. (JSC::DFG::SpeculativeJIT::emitAllocateBasicStorage):
  10936. (JSC::DFG::SpeculativeJIT::setNodeForOperand):
  10937. (JSC::DFG::IntegerOperand::IntegerOperand):
  10938. (JSC::DFG::IntegerOperand::node):
  10939. (JSC::DFG::IntegerOperand::gpr):
  10940. (JSC::DFG::IntegerOperand::use):
  10941. (IntegerOperand):
  10942. (JSC::DFG::DoubleOperand::DoubleOperand):
  10943. (JSC::DFG::DoubleOperand::node):
  10944. (JSC::DFG::DoubleOperand::fpr):
  10945. (JSC::DFG::DoubleOperand::use):
  10946. (DoubleOperand):
  10947. (JSC::DFG::JSValueOperand::JSValueOperand):
  10948. (JSC::DFG::JSValueOperand::node):
  10949. (JSC::DFG::JSValueOperand::gpr):
  10950. (JSC::DFG::JSValueOperand::fill):
  10951. (JSC::DFG::JSValueOperand::use):
  10952. (JSValueOperand):
  10953. (JSC::DFG::StorageOperand::StorageOperand):
  10954. (JSC::DFG::StorageOperand::node):
  10955. (JSC::DFG::StorageOperand::gpr):
  10956. (JSC::DFG::StorageOperand::use):
  10957. (StorageOperand):
  10958. (JSC::DFG::SpeculateIntegerOperand::SpeculateIntegerOperand):
  10959. (JSC::DFG::SpeculateIntegerOperand::node):
  10960. (JSC::DFG::SpeculateIntegerOperand::gpr):
  10961. (JSC::DFG::SpeculateIntegerOperand::use):
  10962. (SpeculateIntegerOperand):
  10963. (JSC::DFG::SpeculateStrictInt32Operand::SpeculateStrictInt32Operand):
  10964. (JSC::DFG::SpeculateStrictInt32Operand::node):
  10965. (JSC::DFG::SpeculateStrictInt32Operand::gpr):
  10966. (JSC::DFG::SpeculateStrictInt32Operand::use):
  10967. (SpeculateStrictInt32Operand):
  10968. (JSC::DFG::SpeculateDoubleOperand::SpeculateDoubleOperand):
  10969. (JSC::DFG::SpeculateDoubleOperand::node):
  10970. (JSC::DFG::SpeculateDoubleOperand::fpr):
  10971. (JSC::DFG::SpeculateDoubleOperand::use):
  10972. (SpeculateDoubleOperand):
  10973. (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand):
  10974. (JSC::DFG::SpeculateCellOperand::node):
  10975. (JSC::DFG::SpeculateCellOperand::gpr):
  10976. (JSC::DFG::SpeculateCellOperand::use):
  10977. (SpeculateCellOperand):
  10978. (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand):
  10979. (JSC::DFG::SpeculateBooleanOperand::node):
  10980. (JSC::DFG::SpeculateBooleanOperand::gpr):
  10981. (JSC::DFG::SpeculateBooleanOperand::use):
  10982. (SpeculateBooleanOperand):
  10983. * dfg/DFGSpeculativeJIT32_64.cpp:
  10984. (JSC::DFG::SpeculativeJIT::fillInteger):
  10985. (JSC::DFG::SpeculativeJIT::fillDouble):
  10986. (JSC::DFG::SpeculativeJIT::fillJSValue):
  10987. (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
  10988. (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
  10989. (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
  10990. (JSC::DFG::SpeculativeJIT::cachedPutById):
  10991. (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
  10992. (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
  10993. (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull):
  10994. (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
  10995. (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
  10996. (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
  10997. (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
  10998. (JSC::DFG::SpeculativeJIT::emitCall):
  10999. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  11000. (JSC::DFG::SpeculativeJIT::fillSpeculateInt):
  11001. (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict):
  11002. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  11003. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  11004. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  11005. (JSC::DFG::SpeculativeJIT::compileObjectEquality):
  11006. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  11007. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  11008. (JSC::DFG::SpeculativeJIT::compileIntegerCompare):
  11009. (JSC::DFG::SpeculativeJIT::compileDoubleCompare):
  11010. (JSC::DFG::SpeculativeJIT::compileValueAdd):
  11011. (JSC::DFG::SpeculativeJIT::compileNonStringCellOrOtherLogicalNot):
  11012. (JSC::DFG::SpeculativeJIT::compileLogicalNot):
  11013. (JSC::DFG::SpeculativeJIT::emitNonStringCellOrOtherBranch):
  11014. (JSC::DFG::SpeculativeJIT::emitBranch):
  11015. (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
  11016. (JSC::DFG::SpeculativeJIT::compile):
  11017. * dfg/DFGSpeculativeJIT64.cpp:
  11018. (JSC::DFG::SpeculativeJIT::fillInteger):
  11019. (JSC::DFG::SpeculativeJIT::fillDouble):
  11020. (JSC::DFG::SpeculativeJIT::fillJSValue):
  11021. (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
  11022. (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
  11023. (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
  11024. (JSC::DFG::SpeculativeJIT::cachedPutById):
  11025. (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
  11026. (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
  11027. (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull):
  11028. (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
  11029. (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
  11030. (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
  11031. (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
  11032. (JSC::DFG::SpeculativeJIT::emitCall):
  11033. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  11034. (JSC::DFG::SpeculativeJIT::fillSpeculateInt):
  11035. (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict):
  11036. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  11037. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  11038. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  11039. (JSC::DFG::SpeculativeJIT::compileObjectEquality):
  11040. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  11041. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  11042. (JSC::DFG::SpeculativeJIT::compileIntegerCompare):
  11043. (JSC::DFG::SpeculativeJIT::compileDoubleCompare):
  11044. (JSC::DFG::SpeculativeJIT::compileValueAdd):
  11045. (JSC::DFG::SpeculativeJIT::compileNonStringCellOrOtherLogicalNot):
  11046. (JSC::DFG::SpeculativeJIT::compileLogicalNot):
  11047. (JSC::DFG::SpeculativeJIT::emitNonStringCellOrOtherBranch):
  11048. (JSC::DFG::SpeculativeJIT::emitBranch):
  11049. (JSC::DFG::SpeculativeJIT::compile):
  11050. * dfg/DFGStructureAbstractValue.h:
  11051. (StructureAbstractValue):
  11052. * dfg/DFGStructureCheckHoistingPhase.cpp:
  11053. (JSC::DFG::StructureCheckHoistingPhase::run):
  11054. * dfg/DFGValidate.cpp:
  11055. (DFG):
  11056. (Validate):
  11057. (JSC::DFG::Validate::validate):
  11058. (JSC::DFG::Validate::reportValidationContext):
  11059. * dfg/DFGValidate.h:
  11060. * dfg/DFGValueSource.cpp:
  11061. (JSC::DFG::ValueSource::dump):
  11062. * dfg/DFGValueSource.h:
  11063. (JSC::DFG::ValueSource::ValueSource):
  11064. * dfg/DFGVirtualRegisterAllocationPhase.cpp:
  11065. (JSC::DFG::VirtualRegisterAllocationPhase::run):
  11066. * runtime/FunctionExecutableDump.cpp: Added.
  11067. (JSC):
  11068. (JSC::FunctionExecutableDump::dump):
  11069. * runtime/FunctionExecutableDump.h: Added.
  11070. (JSC):
  11071. (FunctionExecutableDump):
  11072. (JSC::FunctionExecutableDump::FunctionExecutableDump):
  11073. * runtime/JSGlobalData.cpp:
  11074. (JSC::JSGlobalData::JSGlobalData):
  11075. * runtime/JSGlobalData.h:
  11076. (JSC):
  11077. (DFG):
  11078. (JSGlobalData):
  11079. * runtime/Options.h:
  11080. (JSC):
  11081. 2013-01-28 Laszlo Gombos <l.gombos@samsung.com>
  11082. Collapse testing for a list of PLATFORM() into OS() and USE() tests
  11083. https://bugs.webkit.org/show_bug.cgi?id=108018
  11084. Reviewed by Eric Seidel.
  11085. No functional change as "OS(DARWIN) && USE(CF)" equals to the
  11086. following platforms: MAC, WX, QT and CHROMIUM. CHROMIUM
  11087. is not using JavaScriptCore.
  11088. * runtime/DatePrototype.cpp:
  11089. (JSC):
  11090. 2013-01-28 Geoffrey Garen <ggaren@apple.com>
  11091. Static size inference for JavaScript objects
  11092. https://bugs.webkit.org/show_bug.cgi?id=108093
  11093. Reviewed by Phil Pizlo.
  11094. * API/JSObjectRef.cpp:
  11095. * JavaScriptCore.order:
  11096. * JavaScriptCore.xcodeproj/project.pbxproj: Pay the tax man.
  11097. * bytecode/CodeBlock.cpp:
  11098. (JSC::CodeBlock::dumpBytecode): op_new_object and op_create_this now
  11099. have an extra inferredInlineCapacity argument. This is the statically
  11100. inferred inline capacity, just from analyzing source text. op_new_object
  11101. also gets a pointer to an allocation profile. (For op_create_this, the
  11102. profile is in the construtor function.)
  11103. (JSC::CodeBlock::CodeBlock): Link op_new_object.
  11104. (JSC::CodeBlock::stronglyVisitStrongReferences): Mark our profiles.
  11105. * bytecode/CodeBlock.h:
  11106. (CodeBlock): Removed some dead code. Added object allocation profiles.
  11107. * bytecode/Instruction.h:
  11108. (JSC): New union type, since an instruction operand may point to an
  11109. object allocation profile now.
  11110. * bytecode/ObjectAllocationProfile.h: Added.
  11111. (JSC):
  11112. (ObjectAllocationProfile):
  11113. (JSC::ObjectAllocationProfile::offsetOfAllocator):
  11114. (JSC::ObjectAllocationProfile::offsetOfStructure):
  11115. (JSC::ObjectAllocationProfile::ObjectAllocationProfile):
  11116. (JSC::ObjectAllocationProfile::isNull):
  11117. (JSC::ObjectAllocationProfile::initialize):
  11118. (JSC::ObjectAllocationProfile::structure):
  11119. (JSC::ObjectAllocationProfile::inlineCapacity):
  11120. (JSC::ObjectAllocationProfile::clear):
  11121. (JSC::ObjectAllocationProfile::visitAggregate):
  11122. (JSC::ObjectAllocationProfile::possibleDefaultPropertyCount): New class
  11123. for tracking a prediction about object allocation: structure, inline
  11124. capacity, allocator to use.
  11125. * bytecode/Opcode.h:
  11126. (JSC):
  11127. (JSC::padOpcodeName): Updated instruction sizes.
  11128. * bytecode/UnlinkedCodeBlock.cpp:
  11129. (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
  11130. * bytecode/UnlinkedCodeBlock.h:
  11131. (JSC):
  11132. (JSC::UnlinkedCodeBlock::addObjectAllocationProfile):
  11133. (JSC::UnlinkedCodeBlock::numberOfObjectAllocationProfiles):
  11134. (UnlinkedCodeBlock): Unlinked support for allocation profiles.
  11135. * bytecompiler/BytecodeGenerator.cpp:
  11136. (JSC::BytecodeGenerator::generate): Kill all remaining analyses at the
  11137. end of codegen, since this is our last opportunity.
  11138. (JSC::BytecodeGenerator::BytecodeGenerator): Added a static property
  11139. analyzer to bytecode generation. It tracks initializing assignments and
  11140. makes a guess about how many will happen.
  11141. (JSC::BytecodeGenerator::newObjectAllocationProfile):
  11142. (JSC):
  11143. (JSC::BytecodeGenerator::emitProfiledOpcode):
  11144. (JSC::BytecodeGenerator::emitMove):
  11145. (JSC::BytecodeGenerator::emitResolve):
  11146. (JSC::BytecodeGenerator::emitResolveBase):
  11147. (JSC::BytecodeGenerator::emitResolveBaseForPut):
  11148. (JSC::BytecodeGenerator::emitResolveWithBaseForPut):
  11149. (JSC::BytecodeGenerator::emitResolveWithThis):
  11150. (JSC::BytecodeGenerator::emitGetById):
  11151. (JSC::BytecodeGenerator::emitPutById):
  11152. (JSC::BytecodeGenerator::emitDirectPutById):
  11153. (JSC::BytecodeGenerator::emitPutGetterSetter):
  11154. (JSC::BytecodeGenerator::emitGetArgumentByVal):
  11155. (JSC::BytecodeGenerator::emitGetByVal): Added hooks to the static property
  11156. analyzer, so it can observe allocations and stores.
  11157. (JSC::BytecodeGenerator::emitCreateThis): Factored this into a helper
  11158. function because it was a significant amount of logic, and I wanted to
  11159. add to it.
  11160. (JSC::BytecodeGenerator::emitNewObject):
  11161. (JSC::BytecodeGenerator::emitExpectedFunctionSnippet):
  11162. (JSC::BytecodeGenerator::emitCall):
  11163. (JSC::BytecodeGenerator::emitCallVarargs):
  11164. (JSC::BytecodeGenerator::emitConstruct): Added a hook to profiled opcodes
  11165. to track their stores, in case a store kills a profiled allocation. Since
  11166. profiled opcodes are basically the only interesting stores we do, this
  11167. is a convenient place to notice any store that might kill an allocation.
  11168. * bytecompiler/BytecodeGenerator.h:
  11169. (BytecodeGenerator): As above.
  11170. * bytecompiler/StaticPropertyAnalysis.h: Added.
  11171. (JSC):
  11172. (StaticPropertyAnalysis):
  11173. (JSC::StaticPropertyAnalysis::create):
  11174. (JSC::StaticPropertyAnalysis::addPropertyIndex):
  11175. (JSC::StaticPropertyAnalysis::record):
  11176. (JSC::StaticPropertyAnalysis::propertyIndexCount):
  11177. (JSC::StaticPropertyAnalysis::StaticPropertyAnalysis): Simple helper
  11178. class for tracking allocations and stores.
  11179. * bytecompiler/StaticPropertyAnalyzer.h: Added.
  11180. (StaticPropertyAnalyzer):
  11181. (JSC::StaticPropertyAnalyzer::StaticPropertyAnalyzer):
  11182. (JSC::StaticPropertyAnalyzer::createThis):
  11183. (JSC::StaticPropertyAnalyzer::newObject):
  11184. (JSC::StaticPropertyAnalyzer::putById):
  11185. (JSC::StaticPropertyAnalyzer::mov):
  11186. (JSC::StaticPropertyAnalyzer::kill): Helper class for observing allocations
  11187. and stores and making an inline capacity guess. The heuristics here are
  11188. intentionally minimal because we don't want this one class to try to
  11189. re-create something like a DFG or a runtime analysis. If we discover that
  11190. we need those kinds of analyses, we should just replace this class with
  11191. something else.
  11192. This class tracks multiple registers that alias the same object -- that
  11193. happens a lot, when moving locals into temporary registers -- but it
  11194. doesn't track control flow or multiple objects that alias the same register.
  11195. * dfg/DFGAbstractState.cpp:
  11196. (JSC::DFG::AbstractState::execute): Updated for rename.
  11197. * dfg/DFGByteCodeParser.cpp:
  11198. (JSC::DFG::ByteCodeParser::parseBlock): Updated for inline capacity and
  11199. allocation profile.
  11200. * dfg/DFGNode.h:
  11201. (JSC::DFG::Node::hasInlineCapacity):
  11202. (Node):
  11203. (JSC::DFG::Node::inlineCapacity):
  11204. (JSC::DFG::Node::hasFunction): Give the graph a good way to represent
  11205. inline capacity for an allocation.
  11206. * dfg/DFGNodeType.h:
  11207. (DFG): Updated for rename.
  11208. * dfg/DFGOperations.cpp: Updated for interface change.
  11209. * dfg/DFGOperations.h: We pass the inline capacity to the slow case as
  11210. an argument. This is the simplest way, since it's stored as a bytecode operand.
  11211. * dfg/DFGPredictionPropagationPhase.cpp:
  11212. (JSC::DFG::PredictionPropagationPhase::propagate): Updated for rename.
  11213. * dfg/DFGRepatch.cpp:
  11214. (JSC::DFG::tryCacheGetByID): Fixed a horrible off-by-one-half bug that only
  11215. appears when doing an inline cached load for property number 64 on a 32-bit
  11216. system. In JSVALUE32_64 land, "offsetRelativeToPatchedStorage" is the
  11217. offset of the 64bit JSValue -- but we'll actually issue two loads, one for
  11218. the payload at that offset, and one for the tag at that offset + 4. We need
  11219. to ensure that both loads have a compact representation, or we'll corrupt
  11220. the instruction stream.
  11221. * dfg/DFGSpeculativeJIT.cpp:
  11222. (JSC::DFG::SpeculativeJIT::emitAllocateJSArray):
  11223. * dfg/DFGSpeculativeJIT.h:
  11224. (JSC::DFG::SpeculativeJIT::callOperation):
  11225. (JSC::DFG::SpeculativeJIT::emitAllocateBasicStorage):
  11226. (SpeculativeJIT):
  11227. (JSC::DFG::SpeculativeJIT::emitAllocateJSObject):
  11228. * dfg/DFGSpeculativeJIT32_64.cpp:
  11229. (JSC::DFG::SpeculativeJIT::compile):
  11230. * dfg/DFGSpeculativeJIT64.cpp:
  11231. (JSC::DFG::SpeculativeJIT::compile): Lots of refactoring to support
  11232. passing an allocator to our allocation function, and/or passing a Structure
  11233. as a register instead of an immediate.
  11234. * heap/MarkedAllocator.h:
  11235. (DFG):
  11236. (MarkedAllocator):
  11237. (JSC::MarkedAllocator::offsetOfFreeListHead): Added an accessor to simplify
  11238. JIT code generation of allocation from an arbitrary allocator.
  11239. * jit/JIT.h:
  11240. (JSC):
  11241. * jit/JITInlines.h:
  11242. (JSC):
  11243. (JSC::JIT::emitAllocateJSObject):
  11244. * jit/JITOpcodes.cpp:
  11245. (JSC::JIT::emit_op_new_object):
  11246. (JSC::JIT::emitSlow_op_new_object):
  11247. (JSC::JIT::emit_op_create_this):
  11248. (JSC::JIT::emitSlow_op_create_this):
  11249. * jit/JITOpcodes32_64.cpp:
  11250. (JSC::JIT::emit_op_new_object):
  11251. (JSC::JIT::emitSlow_op_new_object):
  11252. (JSC::JIT::emit_op_create_this):
  11253. (JSC::JIT::emitSlow_op_create_this): Same refactoring as done for the DFG.
  11254. * jit/JITStubs.cpp:
  11255. (JSC::tryCacheGetByID): Fixed the same bug mentioned above.
  11256. (JSC::DEFINE_STUB_FUNCTION): Updated for interface changes.
  11257. * llint/LLIntData.cpp:
  11258. (JSC::LLInt::Data::performAssertions): Updated for interface changes.
  11259. * llint/LLIntSlowPaths.cpp:
  11260. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  11261. * llint/LowLevelInterpreter.asm:
  11262. * llint/LowLevelInterpreter32_64.asm:
  11263. * llint/LowLevelInterpreter64.asm: Same refactoring as for the JITs.
  11264. * profiler/ProfilerBytecode.cpp:
  11265. * profiler/ProfilerBytecodes.cpp:
  11266. * profiler/ProfilerCompilation.cpp:
  11267. * profiler/ProfilerCompiledBytecode.cpp:
  11268. * profiler/ProfilerDatabase.cpp:
  11269. * profiler/ProfilerOSRExit.cpp:
  11270. * profiler/ProfilerOrigin.cpp:
  11271. * profiler/ProfilerProfiledBytecodes.cpp: Include ObjectConstructor.h
  11272. because that's where createEmptyObject() lives now.
  11273. * runtime/Executable.h:
  11274. (JSC::JSFunction::JSFunction): Updated for rename.
  11275. * runtime/JSCellInlines.h:
  11276. (JSC::allocateCell): Updated to match the allocator selection code in
  11277. the JIT, so it's clearer that both are correct.
  11278. * runtime/JSFunction.cpp:
  11279. (JSC::JSFunction::JSFunction):
  11280. (JSC::JSFunction::createAllocationProfile):
  11281. (JSC::JSFunction::visitChildren):
  11282. (JSC::JSFunction::getOwnPropertySlot):
  11283. (JSC::JSFunction::put):
  11284. (JSC::JSFunction::defineOwnProperty):
  11285. (JSC::JSFunction::getConstructData):
  11286. * runtime/JSFunction.h:
  11287. (JSC::JSFunction::offsetOfScopeChain):
  11288. (JSC::JSFunction::offsetOfExecutable):
  11289. (JSC::JSFunction::offsetOfAllocationProfile):
  11290. (JSC::JSFunction::allocationProfile):
  11291. (JSFunction):
  11292. (JSC::JSFunction::tryGetAllocationProfile):
  11293. (JSC::JSFunction::addAllocationProfileWatchpoint): Changed inheritorID
  11294. data member to be an ObjectAllocationProfile, which includes a pointer
  11295. to the desired allocator. This simplifies JIT code, since we don't have
  11296. to compute the allocator on the fly. I verified by code inspection that
  11297. JSFunction is still only 64 bytes.
  11298. * runtime/JSGlobalObject.cpp:
  11299. (JSC::JSGlobalObject::reset):
  11300. (JSC::JSGlobalObject::visitChildren):
  11301. * runtime/JSGlobalObject.h:
  11302. (JSGlobalObject):
  11303. (JSC::JSGlobalObject::dateStructure): No direct pointer to the empty
  11304. object structure anymore, because now clients need to specify how much
  11305. inline capacity they want.
  11306. * runtime/JSONObject.cpp:
  11307. * runtime/JSObject.h:
  11308. (JSC):
  11309. (JSFinalObject):
  11310. (JSC::JSFinalObject::defaultInlineCapacity):
  11311. (JSC::JSFinalObject::maxInlineCapacity):
  11312. (JSC::JSFinalObject::createStructure): A little refactoring to try to
  11313. clarify where some of these constants derive from.
  11314. (JSC::maxOffsetRelativeToPatchedStorage): Used for bug fix, above.
  11315. * runtime/JSProxy.cpp:
  11316. (JSC::JSProxy::setTarget): Ugly, but effective.
  11317. * runtime/LiteralParser.cpp:
  11318. * runtime/ObjectConstructor.cpp:
  11319. (JSC::constructObject):
  11320. (JSC::constructWithObjectConstructor):
  11321. (JSC::callObjectConstructor):
  11322. (JSC::objectConstructorCreate): Updated for interface changes.
  11323. * runtime/ObjectConstructor.h:
  11324. (JSC::constructEmptyObject): Clarified your options for how to allocate
  11325. an empty object, to emphasize what things can actually vary.
  11326. * runtime/PropertyOffset.h: These constants have moved because they're
  11327. really higher level concepts to do with the layout of objects and the
  11328. collector. PropertyOffset is just an abstract number line, independent
  11329. of those things.
  11330. * runtime/PrototypeMap.cpp:
  11331. (JSC::PrototypeMap::emptyObjectStructureForPrototype):
  11332. (JSC::PrototypeMap::clearEmptyObjectStructureForPrototype):
  11333. * runtime/PrototypeMap.h:
  11334. (PrototypeMap): The map key is now a pair of prototype and inline capacity,
  11335. since Structure encodes inline capacity.
  11336. * runtime/Structure.cpp:
  11337. (JSC::Structure::Structure):
  11338. (JSC::Structure::materializePropertyMap):
  11339. (JSC::Structure::addPropertyTransition):
  11340. (JSC::Structure::nonPropertyTransition):
  11341. (JSC::Structure::copyPropertyTableForPinning):
  11342. * runtime/Structure.h:
  11343. (Structure):
  11344. (JSC::Structure::totalStorageSize):
  11345. (JSC::Structure::transitionCount):
  11346. (JSC::Structure::create): Fixed a nasty refactoring bug that only shows
  11347. up after enabling variable-sized inline capacities: we were passing our
  11348. type info where our inline capacity was expected. The compiler didn't
  11349. notice because both have type int :(.
  11350. 2013-01-28 Oliver Hunt <oliver@apple.com>
  11351. Add more assertions to the property storage use in arrays
  11352. https://bugs.webkit.org/show_bug.cgi?id=107728
  11353. Reviewed by Filip Pizlo.
  11354. Add a bunch of assertions to array and object butterfly
  11355. usage. This should make debugging somewhat easier.
  11356. I also converted a couple of assertions to release asserts
  11357. as they were so low cost it seemed a sensible thing to do.
  11358. * runtime/JSArray.cpp:
  11359. (JSC::JSArray::sortVector):
  11360. (JSC::JSArray::compactForSorting):
  11361. * runtime/JSObject.h:
  11362. (JSC::JSObject::getHolyIndexQuickly):
  11363. 2013-01-28 Adam Barth <abarth@webkit.org>
  11364. Remove webkitNotifications.createHTMLNotification
  11365. https://bugs.webkit.org/show_bug.cgi?id=107598
  11366. Reviewed by Benjamin Poulain.
  11367. * Configurations/FeatureDefines.xcconfig:
  11368. 2013-01-28 Michael Saboff <msaboff@apple.com>
  11369. Cleanup ARM version of debugName() in DFGFPRInfo.h
  11370. https://bugs.webkit.org/show_bug.cgi?id=108090
  11371. Reviewed by David Kilzer.
  11372. Fixed debugName() so it will compile by adding static_cast<int> and missing commas.
  11373. * dfg/DFGFPRInfo.h:
  11374. (JSC::DFG::FPRInfo::debugName):
  11375. 2013-01-27 Andreas Kling <akling@apple.com>
  11376. JSC: FunctionParameters are memory hungry.
  11377. <http://webkit.org/b/108033>
  11378. <rdar://problem/13094803>
  11379. Reviewed by Sam Weinig.
  11380. Instead of inheriting from Vector<Identifier>, make FunctionParameters a simple fixed-size array
  11381. with a custom-allocating create() function. Removes one step of indirection and cuts memory usage
  11382. roughly in half.
  11383. 2.73 MB progression on Membuster3.
  11384. * bytecode/UnlinkedCodeBlock.cpp:
  11385. (JSC::UnlinkedFunctionExecutable::paramString):
  11386. * bytecompiler/BytecodeGenerator.cpp:
  11387. (JSC::BytecodeGenerator::BytecodeGenerator):
  11388. * parser/Nodes.cpp:
  11389. (JSC::FunctionParameters::create):
  11390. (JSC::FunctionParameters::FunctionParameters):
  11391. (JSC::FunctionParameters::~FunctionParameters):
  11392. * parser/Nodes.h:
  11393. (FunctionParameters):
  11394. (JSC::FunctionParameters::size):
  11395. (JSC::FunctionParameters::at):
  11396. (JSC::FunctionParameters::identifiers):
  11397. 2013-01-27 Andreas Kling <akling@apple.com>
  11398. JSC: SourceProviderCache is memory hungry.
  11399. <http://webkit.org/b/108029>
  11400. <rdar://problem/13094806>
  11401. Reviewed by Sam Weinig.
  11402. Use fixed-size arrays for SourceProviderCacheItem's lists of captured variables.
  11403. Since the lists never change after the object is created, there's no need to keep them in Vectors
  11404. and we can instead create the whole cache item in a single allocation.
  11405. 13.37 MB progression on Membuster3.
  11406. * parser/Parser.cpp:
  11407. (JSC::::parseFunctionInfo):
  11408. * parser/Parser.h:
  11409. (JSC::Scope::copyCapturedVariablesToVector):
  11410. (JSC::Scope::fillParametersForSourceProviderCache):
  11411. (JSC::Scope::restoreFromSourceProviderCache):
  11412. * parser/SourceProviderCacheItem.h:
  11413. (SourceProviderCacheItemCreationParameters):
  11414. (SourceProviderCacheItem):
  11415. (JSC::SourceProviderCacheItem::approximateByteSize):
  11416. (JSC::SourceProviderCacheItem::usedVariables):
  11417. (JSC::SourceProviderCacheItem::writtenVariables):
  11418. (JSC::SourceProviderCacheItem::~SourceProviderCacheItem):
  11419. (JSC::SourceProviderCacheItem::create):
  11420. (JSC::SourceProviderCacheItem::SourceProviderCacheItem):
  11421. 2013-01-27 Zoltan Arvai <zarvai@inf.u-szeged.hu>
  11422. Fixing atomicIncrement implementation for Windows by dropping support before XP SP2.
  11423. https://bugs.webkit.org/show_bug.cgi?id=106740
  11424. Reviewed by Benjamin Poulain.
  11425. * config.h:
  11426. 2013-01-25 Filip Pizlo <fpizlo@apple.com>
  11427. DFG variable event stream shouldn't use NodeIndex
  11428. https://bugs.webkit.org/show_bug.cgi?id=107996
  11429. Reviewed by Oliver Hunt.
  11430. Introduce the notion of a DFG::MinifiedID, which is just a unique ID of a DFG Node.
  11431. Internally it currently uses a NodeIndex, but we could change this without having
  11432. to recode all of the users of MinifiedID. This effectively decouples the OSR exit
  11433. compiler's way of identifying nodes from the speculative JIT's way of identifying
  11434. nodes, and should make it easier to make changes to the speculative JIT's internals
  11435. in the future.
  11436. Also changed variable event stream logging to exclude information about births and
  11437. deaths of constants, since the OSR exit compiler never cares about which register
  11438. holds a constant; if a value is constant then the OSR exit compiler can reify it.
  11439. Also changed the variable event stream's value recovery computation to use a
  11440. HashMap keyed by MinifiedID rather than a Vector indexed by NodeIndex.
  11441. This appears to be performance-neutral. It's primarily meant as a small step
  11442. towards https://bugs.webkit.org/show_bug.cgi?id=106868.
  11443. * GNUmakefile.list.am:
  11444. * JavaScriptCore.xcodeproj/project.pbxproj:
  11445. * dfg/DFGGenerationInfo.h:
  11446. (JSC::DFG::GenerationInfo::GenerationInfo):
  11447. (JSC::DFG::GenerationInfo::initConstant):
  11448. (JSC::DFG::GenerationInfo::initInteger):
  11449. (JSC::DFG::GenerationInfo::initJSValue):
  11450. (JSC::DFG::GenerationInfo::initCell):
  11451. (JSC::DFG::GenerationInfo::initBoolean):
  11452. (JSC::DFG::GenerationInfo::initDouble):
  11453. (JSC::DFG::GenerationInfo::initStorage):
  11454. (JSC::DFG::GenerationInfo::noticeOSRBirth):
  11455. (JSC::DFG::GenerationInfo::use):
  11456. (JSC::DFG::GenerationInfo::appendFill):
  11457. (JSC::DFG::GenerationInfo::appendSpill):
  11458. (GenerationInfo):
  11459. * dfg/DFGJITCompiler.cpp:
  11460. (JSC::DFG::JITCompiler::link):
  11461. * dfg/DFGMinifiedGraph.h:
  11462. (JSC::DFG::MinifiedGraph::at):
  11463. (MinifiedGraph):
  11464. * dfg/DFGMinifiedID.h: Added.
  11465. (DFG):
  11466. (MinifiedID):
  11467. (JSC::DFG::MinifiedID::MinifiedID):
  11468. (JSC::DFG::MinifiedID::operator!):
  11469. (JSC::DFG::MinifiedID::nodeIndex):
  11470. (JSC::DFG::MinifiedID::operator==):
  11471. (JSC::DFG::MinifiedID::operator!=):
  11472. (JSC::DFG::MinifiedID::operator<):
  11473. (JSC::DFG::MinifiedID::operator>):
  11474. (JSC::DFG::MinifiedID::operator<=):
  11475. (JSC::DFG::MinifiedID::operator>=):
  11476. (JSC::DFG::MinifiedID::hash):
  11477. (JSC::DFG::MinifiedID::dump):
  11478. (JSC::DFG::MinifiedID::isHashTableDeletedValue):
  11479. (JSC::DFG::MinifiedID::invalidID):
  11480. (JSC::DFG::MinifiedID::otherInvalidID):
  11481. (JSC::DFG::MinifiedID::fromBits):
  11482. (JSC::DFG::MinifiedIDHash::hash):
  11483. (JSC::DFG::MinifiedIDHash::equal):
  11484. (MinifiedIDHash):
  11485. (WTF):
  11486. * dfg/DFGMinifiedNode.cpp:
  11487. (JSC::DFG::MinifiedNode::fromNode):
  11488. * dfg/DFGMinifiedNode.h:
  11489. (JSC::DFG::MinifiedNode::id):
  11490. (JSC::DFG::MinifiedNode::child1):
  11491. (JSC::DFG::MinifiedNode::getID):
  11492. (JSC::DFG::MinifiedNode::compareByNodeIndex):
  11493. (MinifiedNode):
  11494. * dfg/DFGSpeculativeJIT.cpp:
  11495. (JSC::DFG::SpeculativeJIT::compileMovHint):
  11496. (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):
  11497. * dfg/DFGSpeculativeJIT.h:
  11498. (JSC::DFG::SpeculativeJIT::setNodeIndexForOperand):
  11499. * dfg/DFGValueSource.cpp:
  11500. (JSC::DFG::ValueSource::dump):
  11501. * dfg/DFGValueSource.h:
  11502. (JSC::DFG::ValueSource::ValueSource):
  11503. (JSC::DFG::ValueSource::isSet):
  11504. (JSC::DFG::ValueSource::kind):
  11505. (JSC::DFG::ValueSource::id):
  11506. (ValueSource):
  11507. (JSC::DFG::ValueSource::idFromKind):
  11508. (JSC::DFG::ValueSource::kindFromID):
  11509. * dfg/DFGVariableEvent.cpp:
  11510. (JSC::DFG::VariableEvent::dump):
  11511. (JSC::DFG::VariableEvent::dumpFillInfo):
  11512. (JSC::DFG::VariableEvent::dumpSpillInfo):
  11513. * dfg/DFGVariableEvent.h:
  11514. (JSC::DFG::VariableEvent::fillGPR):
  11515. (JSC::DFG::VariableEvent::fillPair):
  11516. (JSC::DFG::VariableEvent::fillFPR):
  11517. (JSC::DFG::VariableEvent::spill):
  11518. (JSC::DFG::VariableEvent::death):
  11519. (JSC::DFG::VariableEvent::movHint):
  11520. (JSC::DFG::VariableEvent::id):
  11521. (VariableEvent):
  11522. * dfg/DFGVariableEventStream.cpp:
  11523. (DFG):
  11524. (JSC::DFG::VariableEventStream::tryToSetConstantRecovery):
  11525. (JSC::DFG::VariableEventStream::reconstruct):
  11526. * dfg/DFGVariableEventStream.h:
  11527. (VariableEventStream):
  11528. 2013-01-25 Roger Fong <roger_fong@apple.com>
  11529. Unreviewed. Rename LLInt projects folder and make appropriate changes to solutions.
  11530. * JavaScriptCore.vcxproj/JavaScriptCore.sln:
  11531. * JavaScriptCore.vcxproj/LLInt: Copied from JavaScriptCore.vcxproj/LLInt.vcproj.
  11532. * JavaScriptCore.vcxproj/LLInt.vcproj: Removed.
  11533. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly: Removed.
  11534. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.make: Removed.
  11535. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.vcxproj: Removed.
  11536. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.vcxproj.user: Removed.
  11537. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/build-LLIntAssembly.sh: Removed.
  11538. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets: Removed.
  11539. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.make: Removed.
  11540. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: Removed.
  11541. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj.user: Removed.
  11542. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh: Removed.
  11543. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor: Removed.
  11544. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj: Removed.
  11545. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj.user: Removed.
  11546. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props: Removed.
  11547. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: Removed.
  11548. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props: Removed.
  11549. 2013-01-24 Roger Fong <roger_fong@apple.com>
  11550. VS2010 JavascriptCore: Clean up property sheets, add a JSC solution, add testRegExp and testAPI projects.
  11551. https://bugs.webkit.org/show_bug.cgi?id=106987
  11552. Reviewed by Brent Fulgham.
  11553. * JavaScriptCore.vcxproj/JavaScriptCore.sln: Added.
  11554. * JavaScriptCore.vcxproj/JavaScriptCoreCF.props:
  11555. * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
  11556. * JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd:
  11557. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props:
  11558. * JavaScriptCore.vcxproj/jsc/jscCommon.props:
  11559. * JavaScriptCore.vcxproj/jsc/jscDebug.props:
  11560. * JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd:
  11561. * JavaScriptCore.vcxproj/jsc/jscPreLink.cmd:
  11562. * JavaScriptCore.vcxproj/testRegExp: Added.
  11563. * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: Added.
  11564. * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters: Added.
  11565. * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.user: Added.
  11566. * JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props: Added.
  11567. * JavaScriptCore.vcxproj/testRegExp/testRegExpDebug.props: Added.
  11568. * JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd: Added.
  11569. * JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd: Added.
  11570. * JavaScriptCore.vcxproj/testRegExp/testRegExpPreLink.cmd: Added.
  11571. * JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props: Added.
  11572. * JavaScriptCore.vcxproj/testapi: Added.
  11573. * JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Added.
  11574. * JavaScriptCore.vcxproj/testapi/testapi.vcxproj.filters: Added.
  11575. * JavaScriptCore.vcxproj/testapi/testapi.vcxproj.user: Added.
  11576. * JavaScriptCore.vcxproj/testapi/testapiCommon.props: Added.
  11577. * JavaScriptCore.vcxproj/testapi/testapiDebug.props: Added.
  11578. * JavaScriptCore.vcxproj/testapi/testapiPostBuild.cmd: Added.
  11579. * JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd: Added.
  11580. * JavaScriptCore.vcxproj/testapi/testapiPreLink.cmd: Added.
  11581. * JavaScriptCore.vcxproj/testapi/testapiRelease.props: Added.
  11582. 2013-01-24 Roger Fong <roger_fong@apple.com>
  11583. Unreviewed. Windows build fix.
  11584. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  11585. 2013-01-24 Filip Pizlo <fpizlo@apple.com>
  11586. DFG::JITCompiler::getSpeculation() methods are badly named and superfluous
  11587. https://bugs.webkit.org/show_bug.cgi?id=107860
  11588. Reviewed by Mark Hahnenberg.
  11589. * dfg/DFGJITCompiler.h:
  11590. (JITCompiler):
  11591. * dfg/DFGSpeculativeJIT64.cpp:
  11592. (JSC::DFG::SpeculativeJIT::compileLogicalNot):
  11593. (JSC::DFG::SpeculativeJIT::emitBranch):
  11594. 2013-01-24 Mark Hahnenberg <mhahnenberg@apple.com>
  11595. Objective-C API: Rename JSValue.h/APIJSValue.h to JSCJSValue.h/JSValue.h
  11596. https://bugs.webkit.org/show_bug.cgi?id=107327
  11597. Reviewed by Filip Pizlo.
  11598. We're renaming these two files, so we have to replace the names everywhere.
  11599. * API/APICast.h:
  11600. * API/APIJSValue.h: Removed.
  11601. * API/JSBlockAdaptor.mm:
  11602. * API/JSStringRefCF.cpp:
  11603. * API/JSValue.h: Copied from Source/JavaScriptCore/API/APIJSValue.h.
  11604. * API/JSValue.mm:
  11605. * API/JSValueInternal.h:
  11606. * API/JSValueRef.cpp:
  11607. * API/JSWeakObjectMapRefPrivate.cpp:
  11608. * API/JavaScriptCore.h:
  11609. * CMakeLists.txt:
  11610. * GNUmakefile.list.am:
  11611. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  11612. * JavaScriptCore.xcodeproj/project.pbxproj:
  11613. * Target.pri:
  11614. * bytecode/CallLinkStatus.h:
  11615. * bytecode/CodeBlock.cpp:
  11616. * bytecode/MethodOfGettingAValueProfile.h:
  11617. * bytecode/ResolveGlobalStatus.cpp:
  11618. * bytecode/ResolveGlobalStatus.h:
  11619. * bytecode/SpeculatedType.h:
  11620. * bytecode/ValueRecovery.h:
  11621. * dfg/DFGByteCodeParser.cpp:
  11622. * dfg/DFGJITCompiler.cpp:
  11623. * dfg/DFGNode.h:
  11624. * dfg/DFGSpeculativeJIT.cpp:
  11625. * dfg/DFGSpeculativeJIT64.cpp:
  11626. * heap/CopiedBlock.h:
  11627. * heap/HandleStack.cpp:
  11628. * heap/HandleTypes.h:
  11629. * heap/WeakImpl.h:
  11630. * interpreter/Interpreter.h:
  11631. * interpreter/Register.h:
  11632. * interpreter/VMInspector.h:
  11633. * jit/HostCallReturnValue.cpp:
  11634. * jit/HostCallReturnValue.h:
  11635. * jit/JITCode.h:
  11636. * jit/JITExceptions.cpp:
  11637. * jit/JITExceptions.h:
  11638. * jit/JSInterfaceJIT.h:
  11639. * llint/LLIntCLoop.h:
  11640. * llint/LLIntData.h:
  11641. * llint/LLIntSlowPaths.cpp:
  11642. * profiler/ProfilerBytecode.h:
  11643. * profiler/ProfilerBytecodeSequence.h:
  11644. * profiler/ProfilerBytecodes.h:
  11645. * profiler/ProfilerCompilation.h:
  11646. * profiler/ProfilerCompiledBytecode.h:
  11647. * profiler/ProfilerDatabase.h:
  11648. * profiler/ProfilerOSRExit.h:
  11649. * profiler/ProfilerOSRExitSite.h:
  11650. * profiler/ProfilerOrigin.h:
  11651. * profiler/ProfilerOriginStack.h:
  11652. * runtime/ArgList.cpp:
  11653. * runtime/CachedTranscendentalFunction.h:
  11654. * runtime/CallData.h:
  11655. * runtime/Completion.h:
  11656. * runtime/ConstructData.h:
  11657. * runtime/DateConstructor.cpp:
  11658. * runtime/DateInstance.cpp:
  11659. * runtime/DatePrototype.cpp:
  11660. * runtime/JSAPIValueWrapper.h:
  11661. * runtime/JSCJSValue.cpp: Copied from Source/JavaScriptCore/runtime/JSValue.cpp.
  11662. * runtime/JSCJSValue.h: Copied from Source/JavaScriptCore/runtime/JSValue.h.
  11663. (JSValue):
  11664. * runtime/JSCJSValueInlines.h: Copied from Source/JavaScriptCore/runtime/JSValueInlines.h.
  11665. * runtime/JSGlobalData.h:
  11666. * runtime/JSGlobalObject.cpp:
  11667. * runtime/JSGlobalObjectFunctions.h:
  11668. * runtime/JSStringJoiner.h:
  11669. * runtime/JSValue.cpp: Removed.
  11670. * runtime/JSValue.h: Removed.
  11671. * runtime/JSValueInlines.h: Removed.
  11672. * runtime/LiteralParser.h:
  11673. * runtime/Operations.h:
  11674. * runtime/PropertyDescriptor.h:
  11675. * runtime/PropertySlot.h:
  11676. * runtime/Protect.h:
  11677. * runtime/RegExpPrototype.cpp:
  11678. * runtime/Structure.h:
  11679. 2013-01-23 Oliver Hunt <oliver@apple.com>
  11680. Harden JSC a bit with RELEASE_ASSERT
  11681. https://bugs.webkit.org/show_bug.cgi?id=107766
  11682. Reviewed by Mark Hahnenberg.
  11683. Went through and replaced a pile of ASSERTs that were covering
  11684. significantly important details (bounds checks, etc) where
  11685. having the checks did not impact release performance in any
  11686. measurable way.
  11687. * API/JSContextRef.cpp:
  11688. (JSContextCreateBacktrace):
  11689. * assembler/MacroAssembler.h:
  11690. (JSC::MacroAssembler::branchAdd32):
  11691. (JSC::MacroAssembler::branchMul32):
  11692. * bytecode/CodeBlock.cpp:
  11693. (JSC::CodeBlock::dumpBytecode):
  11694. (JSC::CodeBlock::handlerForBytecodeOffset):
  11695. (JSC::CodeBlock::lineNumberForBytecodeOffset):
  11696. (JSC::CodeBlock::bytecodeOffset):
  11697. * bytecode/CodeBlock.h:
  11698. (JSC::CodeBlock::bytecodeOffsetForCallAtIndex):
  11699. (JSC::CodeBlock::bytecodeOffset):
  11700. (JSC::CodeBlock::exceptionHandler):
  11701. (JSC::CodeBlock::codeOrigin):
  11702. (JSC::CodeBlock::immediateSwitchJumpTable):
  11703. (JSC::CodeBlock::characterSwitchJumpTable):
  11704. (JSC::CodeBlock::stringSwitchJumpTable):
  11705. (JSC::CodeBlock::setIdentifiers):
  11706. (JSC::baselineCodeBlockForInlineCallFrame):
  11707. (JSC::ExecState::uncheckedR):
  11708. * bytecode/CodeOrigin.cpp:
  11709. (JSC::CodeOrigin::inlineStack):
  11710. * bytecode/CodeOrigin.h:
  11711. (JSC::CodeOrigin::CodeOrigin):
  11712. * dfg/DFGCSEPhase.cpp:
  11713. * dfg/DFGOSRExit.cpp:
  11714. * dfg/DFGScratchRegisterAllocator.h:
  11715. (JSC::DFG::ScratchRegisterAllocator::preserveUsedRegistersToScratchBuffer):
  11716. (JSC::DFG::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBuffer):
  11717. * dfg/DFGSpeculativeJIT.h:
  11718. (JSC::DFG::SpeculativeJIT::allocate):
  11719. (JSC::DFG::SpeculativeJIT::spill):
  11720. (JSC::DFG::SpeculativeJIT::integerResult):
  11721. * dfg/DFGSpeculativeJIT64.cpp:
  11722. (JSC::DFG::SpeculativeJIT::fillInteger):
  11723. (JSC::DFG::SpeculativeJIT::fillDouble):
  11724. (JSC::DFG::SpeculativeJIT::fillJSValue):
  11725. (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull):
  11726. (JSC::DFG::SpeculativeJIT::emitCall):
  11727. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  11728. (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict):
  11729. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  11730. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  11731. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  11732. (JSC::DFG::SpeculativeJIT::compile):
  11733. * dfg/DFGValueSource.h:
  11734. (JSC::DFG::dataFormatToValueSourceKind):
  11735. (JSC::DFG::ValueSource::ValueSource):
  11736. * dfg/DFGVirtualRegisterAllocationPhase.cpp:
  11737. * heap/BlockAllocator.cpp:
  11738. (JSC::BlockAllocator::BlockAllocator):
  11739. (JSC::BlockAllocator::releaseFreeRegions):
  11740. (JSC::BlockAllocator::blockFreeingThreadMain):
  11741. * heap/Heap.cpp:
  11742. (JSC::Heap::lastChanceToFinalize):
  11743. (JSC::Heap::collect):
  11744. * interpreter/Interpreter.cpp:
  11745. (JSC::Interpreter::throwException):
  11746. (JSC::Interpreter::execute):
  11747. * jit/GCAwareJITStubRoutine.cpp:
  11748. (JSC::GCAwareJITStubRoutine::observeZeroRefCount):
  11749. * jit/JIT.cpp:
  11750. (JSC::JIT::privateCompileMainPass):
  11751. (JSC::JIT::privateCompileSlowCases):
  11752. * jit/JITExceptions.cpp:
  11753. (JSC::genericThrow):
  11754. * jit/JITInlines.h:
  11755. (JSC::JIT::emitLoad):
  11756. * jit/JITOpcodes.cpp:
  11757. (JSC::JIT::emit_op_end):
  11758. (JSC::JIT::emit_resolve_operations):
  11759. * jit/JITStubRoutine.cpp:
  11760. (JSC::JITStubRoutine::observeZeroRefCount):
  11761. * jit/JITStubs.cpp:
  11762. (JSC::returnToThrowTrampoline):
  11763. * runtime/Arguments.cpp:
  11764. (JSC::Arguments::getOwnPropertySlot):
  11765. (JSC::Arguments::getOwnPropertyDescriptor):
  11766. (JSC::Arguments::deleteProperty):
  11767. (JSC::Arguments::defineOwnProperty):
  11768. (JSC::Arguments::didTearOffActivation):
  11769. * runtime/ArrayPrototype.cpp:
  11770. (JSC::shift):
  11771. (JSC::unshift):
  11772. (JSC::arrayProtoFuncLastIndexOf):
  11773. * runtime/ButterflyInlines.h:
  11774. (JSC::Butterfly::growPropertyStorage):
  11775. * runtime/CodeCache.cpp:
  11776. (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
  11777. * runtime/CodeCache.h:
  11778. (JSC::CacheMap::add):
  11779. * runtime/Completion.cpp:
  11780. (JSC::checkSyntax):
  11781. (JSC::evaluate):
  11782. * runtime/Executable.cpp:
  11783. (JSC::FunctionExecutable::FunctionExecutable):
  11784. (JSC::EvalExecutable::unlinkCalls):
  11785. (JSC::ProgramExecutable::compileOptimized):
  11786. (JSC::ProgramExecutable::unlinkCalls):
  11787. (JSC::ProgramExecutable::initializeGlobalProperties):
  11788. (JSC::FunctionExecutable::baselineCodeBlockFor):
  11789. (JSC::FunctionExecutable::compileOptimizedForCall):
  11790. (JSC::FunctionExecutable::compileOptimizedForConstruct):
  11791. (JSC::FunctionExecutable::compileForCallInternal):
  11792. (JSC::FunctionExecutable::compileForConstructInternal):
  11793. (JSC::FunctionExecutable::unlinkCalls):
  11794. (JSC::NativeExecutable::hashFor):
  11795. * runtime/Executable.h:
  11796. (JSC::EvalExecutable::compile):
  11797. (JSC::ProgramExecutable::compile):
  11798. (JSC::FunctionExecutable::compileForCall):
  11799. (JSC::FunctionExecutable::compileForConstruct):
  11800. * runtime/IndexingHeader.h:
  11801. (JSC::IndexingHeader::setVectorLength):
  11802. * runtime/JSArray.cpp:
  11803. (JSC::JSArray::pop):
  11804. (JSC::JSArray::shiftCountWithArrayStorage):
  11805. (JSC::JSArray::shiftCountWithAnyIndexingType):
  11806. (JSC::JSArray::unshiftCountWithArrayStorage):
  11807. * runtime/JSGlobalObjectFunctions.cpp:
  11808. (JSC::jsStrDecimalLiteral):
  11809. * runtime/JSObject.cpp:
  11810. (JSC::JSObject::copyButterfly):
  11811. (JSC::JSObject::defineOwnIndexedProperty):
  11812. (JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes):
  11813. * runtime/JSString.cpp:
  11814. (JSC::JSRopeString::getIndexSlowCase):
  11815. * yarr/YarrInterpreter.cpp:
  11816. (JSC::Yarr::Interpreter::popParenthesesDisjunctionContext):
  11817. 2013-01-23 Filip Pizlo <fpizlo@apple.com>
  11818. Constant folding an access to an uncaptured variable that is captured later in the same basic block shouldn't lead to assertion failures
  11819. https://bugs.webkit.org/show_bug.cgi?id=107750
  11820. <rdar://problem/12387265>
  11821. Reviewed by Mark Hahnenberg.
  11822. The point of this assertion was that if there is no variable capturing going on, then there should only be one GetLocal
  11823. for the variable anywhere in the basic block. But if there is some capturing, then we'll have an unbounded number of
  11824. GetLocals. The assertion was too imprecise for the latter case. I want to keep this assertion, so I introduced a
  11825. checker that verifies this precisely: if there are any captured accesses to the variable anywhere at or after the
  11826. GetLocal we are eliminating, then we allow redundant GetLocals.
  11827. * dfg/DFGConstantFoldingPhase.cpp:
  11828. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  11829. (ConstantFoldingPhase):
  11830. (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter):
  11831. 2013-01-23 Oliver Hunt <oliver@apple.com>
  11832. Replace ASSERT_NOT_REACHED with RELEASE_ASSERT_NOT_REACHED in JSC
  11833. https://bugs.webkit.org/show_bug.cgi?id=107736
  11834. Reviewed by Mark Hahnenberg.
  11835. Mechanical change with no performance impact.
  11836. * API/JSBlockAdaptor.mm:
  11837. (BlockArgumentTypeDelegate::typeVoid):
  11838. * API/JSCallbackObjectFunctions.h:
  11839. (JSC::::construct):
  11840. (JSC::::call):
  11841. * API/JSScriptRef.cpp:
  11842. * API/ObjCCallbackFunction.mm:
  11843. (ArgumentTypeDelegate::typeVoid):
  11844. * assembler/ARMv7Assembler.h:
  11845. (JSC::ARMv7Assembler::link):
  11846. (JSC::ARMv7Assembler::replaceWithLoad):
  11847. (JSC::ARMv7Assembler::replaceWithAddressComputation):
  11848. * assembler/MacroAssembler.h:
  11849. (JSC::MacroAssembler::invert):
  11850. * assembler/MacroAssemblerARM.h:
  11851. (JSC::MacroAssemblerARM::countLeadingZeros32):
  11852. (JSC::MacroAssemblerARM::divDouble):
  11853. * assembler/MacroAssemblerMIPS.h:
  11854. (JSC::MacroAssemblerMIPS::absDouble):
  11855. (JSC::MacroAssemblerMIPS::replaceWithJump):
  11856. (JSC::MacroAssemblerMIPS::maxJumpReplacementSize):
  11857. * assembler/MacroAssemblerSH4.h:
  11858. (JSC::MacroAssemblerSH4::absDouble):
  11859. (JSC::MacroAssemblerSH4::replaceWithJump):
  11860. (JSC::MacroAssemblerSH4::maxJumpReplacementSize):
  11861. * assembler/SH4Assembler.h:
  11862. (JSC::SH4Assembler::shllImm8r):
  11863. (JSC::SH4Assembler::shlrImm8r):
  11864. (JSC::SH4Assembler::cmplRegReg):
  11865. (JSC::SH4Assembler::branch):
  11866. * assembler/X86Assembler.h:
  11867. (JSC::X86Assembler::replaceWithLoad):
  11868. (JSC::X86Assembler::replaceWithAddressComputation):
  11869. * bytecode/CallLinkInfo.cpp:
  11870. (JSC::CallLinkInfo::unlink):
  11871. * bytecode/CodeBlock.cpp:
  11872. (JSC::debugHookName):
  11873. (JSC::CodeBlock::printGetByIdOp):
  11874. (JSC::CodeBlock::printGetByIdCacheStatus):
  11875. (JSC::CodeBlock::visitAggregate):
  11876. (JSC::CodeBlock::finalizeUnconditionally):
  11877. (JSC::CodeBlock::usesOpcode):
  11878. * bytecode/DataFormat.h:
  11879. (JSC::needDataFormatConversion):
  11880. * bytecode/ExitKind.cpp:
  11881. (JSC::exitKindToString):
  11882. (JSC::exitKindIsCountable):
  11883. * bytecode/MethodOfGettingAValueProfile.cpp:
  11884. (JSC::MethodOfGettingAValueProfile::getSpecFailBucket):
  11885. * bytecode/Opcode.h:
  11886. (JSC::opcodeLength):
  11887. * bytecode/PolymorphicPutByIdList.cpp:
  11888. (JSC::PutByIdAccess::fromStructureStubInfo):
  11889. (JSC::PutByIdAccess::visitWeak):
  11890. * bytecode/StructureStubInfo.cpp:
  11891. (JSC::StructureStubInfo::deref):
  11892. * bytecompiler/BytecodeGenerator.cpp:
  11893. (JSC::ResolveResult::checkValidity):
  11894. (JSC::BytecodeGenerator::emitGetLocalVar):
  11895. (JSC::BytecodeGenerator::beginSwitch):
  11896. * bytecompiler/NodesCodegen.cpp:
  11897. (JSC::BinaryOpNode::emitBytecode):
  11898. (JSC::emitReadModifyAssignment):
  11899. * dfg/DFGAbstractState.cpp:
  11900. (JSC::DFG::AbstractState::execute):
  11901. (JSC::DFG::AbstractState::mergeStateAtTail):
  11902. (JSC::DFG::AbstractState::mergeToSuccessors):
  11903. * dfg/DFGByteCodeParser.cpp:
  11904. (JSC::DFG::ByteCodeParser::makeSafe):
  11905. (JSC::DFG::ByteCodeParser::parseBlock):
  11906. * dfg/DFGCFGSimplificationPhase.cpp:
  11907. (JSC::DFG::CFGSimplificationPhase::fixPossibleGetLocal):
  11908. (JSC::DFG::CFGSimplificationPhase::fixTailOperand):
  11909. * dfg/DFGCSEPhase.cpp:
  11910. (JSC::DFG::CSEPhase::setLocalStoreElimination):
  11911. * dfg/DFGCapabilities.cpp:
  11912. (JSC::DFG::canHandleOpcodes):
  11913. * dfg/DFGCommon.h:
  11914. (JSC::DFG::useKindToString):
  11915. * dfg/DFGDoubleFormatState.h:
  11916. (JSC::DFG::mergeDoubleFormatStates):
  11917. (JSC::DFG::doubleFormatStateToString):
  11918. * dfg/DFGFixupPhase.cpp:
  11919. (JSC::DFG::FixupPhase::blessArrayOperation):
  11920. * dfg/DFGGraph.h:
  11921. (JSC::DFG::Graph::clobbersWorld):
  11922. * dfg/DFGNode.h:
  11923. (JSC::DFG::Node::valueOfJSConstant):
  11924. (JSC::DFG::Node::successor):
  11925. * dfg/DFGNodeFlags.cpp:
  11926. (JSC::DFG::nodeFlagsAsString):
  11927. * dfg/DFGNodeType.h:
  11928. (JSC::DFG::defaultFlags):
  11929. * dfg/DFGRepatch.h:
  11930. (JSC::DFG::dfgResetGetByID):
  11931. (JSC::DFG::dfgResetPutByID):
  11932. * dfg/DFGSlowPathGenerator.h:
  11933. (JSC::DFG::SlowPathGenerator::call):
  11934. * dfg/DFGSpeculativeJIT.cpp:
  11935. (JSC::DFG::SpeculativeJIT::silentSavePlanForGPR):
  11936. (JSC::DFG::SpeculativeJIT::silentSpill):
  11937. (JSC::DFG::SpeculativeJIT::silentFill):
  11938. (JSC::DFG::SpeculativeJIT::checkArray):
  11939. (JSC::DFG::SpeculativeJIT::checkGeneratedTypeForToInt32):
  11940. (JSC::DFG::SpeculativeJIT::compileValueToInt32):
  11941. (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
  11942. (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
  11943. * dfg/DFGSpeculativeJIT.h:
  11944. (JSC::DFG::SpeculativeJIT::bitOp):
  11945. (JSC::DFG::SpeculativeJIT::shiftOp):
  11946. (JSC::DFG::SpeculativeJIT::integerResult):
  11947. * dfg/DFGSpeculativeJIT32_64.cpp:
  11948. (JSC::DFG::SpeculativeJIT::fillInteger):
  11949. (JSC::DFG::SpeculativeJIT::fillDouble):
  11950. (JSC::DFG::SpeculativeJIT::fillJSValue):
  11951. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  11952. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  11953. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  11954. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  11955. (JSC::DFG::SpeculativeJIT::compile):
  11956. * dfg/DFGSpeculativeJIT64.cpp:
  11957. (JSC::DFG::SpeculativeJIT::fillInteger):
  11958. (JSC::DFG::SpeculativeJIT::fillDouble):
  11959. (JSC::DFG::SpeculativeJIT::fillJSValue):
  11960. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  11961. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  11962. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  11963. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  11964. (JSC::DFG::SpeculativeJIT::compile):
  11965. * dfg/DFGStructureCheckHoistingPhase.cpp:
  11966. (JSC::DFG::StructureCheckHoistingPhase::run):
  11967. * dfg/DFGValueSource.h:
  11968. (JSC::DFG::ValueSource::valueRecovery):
  11969. * dfg/DFGVariableEvent.cpp:
  11970. (JSC::DFG::VariableEvent::dump):
  11971. * dfg/DFGVariableEventStream.cpp:
  11972. (JSC::DFG::VariableEventStream::reconstruct):
  11973. * heap/BlockAllocator.h:
  11974. (JSC::BlockAllocator::regionSetFor):
  11975. * heap/GCThread.cpp:
  11976. (JSC::GCThread::gcThreadMain):
  11977. * heap/MarkedBlock.cpp:
  11978. (JSC::MarkedBlock::sweepHelper):
  11979. * heap/MarkedBlock.h:
  11980. (JSC::MarkedBlock::isLive):
  11981. * interpreter/CallFrame.h:
  11982. (JSC::ExecState::inlineCallFrame):
  11983. * interpreter/Interpreter.cpp:
  11984. (JSC::getCallerInfo):
  11985. (JSC::getStackFrameCodeType):
  11986. (JSC::Interpreter::execute):
  11987. * jit/ExecutableAllocatorFixedVMPool.cpp:
  11988. (JSC::FixedVMPoolExecutableAllocator::notifyPageIsFree):
  11989. * jit/JIT.cpp:
  11990. (JSC::JIT::privateCompileMainPass):
  11991. (JSC::JIT::privateCompileSlowCases):
  11992. (JSC::JIT::privateCompile):
  11993. * jit/JITArithmetic.cpp:
  11994. (JSC::JIT::emitSlow_op_mod):
  11995. * jit/JITArithmetic32_64.cpp:
  11996. (JSC::JIT::emitBinaryDoubleOp):
  11997. (JSC::JIT::emitSlow_op_mod):
  11998. * jit/JITPropertyAccess.cpp:
  11999. (JSC::JIT::isDirectPutById):
  12000. * jit/JITStubs.cpp:
  12001. (JSC::getPolymorphicAccessStructureListSlot):
  12002. (JSC::DEFINE_STUB_FUNCTION):
  12003. * llint/LLIntSlowPaths.cpp:
  12004. (JSC::LLInt::jitCompileAndSetHeuristics):
  12005. * parser/Lexer.cpp:
  12006. (JSC::::lex):
  12007. * parser/Nodes.h:
  12008. (JSC::ExpressionNode::emitBytecodeInConditionContext):
  12009. * parser/Parser.h:
  12010. (JSC::Parser::getTokenName):
  12011. (JSC::Parser::updateErrorMessageSpecialCase):
  12012. * parser/SyntaxChecker.h:
  12013. (JSC::SyntaxChecker::operatorStackPop):
  12014. * runtime/Arguments.cpp:
  12015. (JSC::Arguments::tearOffForInlineCallFrame):
  12016. * runtime/DatePrototype.cpp:
  12017. (JSC::formatLocaleDate):
  12018. * runtime/Executable.cpp:
  12019. (JSC::samplingDescription):
  12020. * runtime/Executable.h:
  12021. (JSC::ScriptExecutable::unlinkCalls):
  12022. * runtime/Identifier.cpp:
  12023. (JSC):
  12024. * runtime/InternalFunction.cpp:
  12025. (JSC::InternalFunction::getCallData):
  12026. * runtime/JSArray.cpp:
  12027. (JSC::JSArray::push):
  12028. (JSC::JSArray::sort):
  12029. * runtime/JSCell.cpp:
  12030. (JSC::JSCell::defaultValue):
  12031. (JSC::JSCell::getOwnPropertyNames):
  12032. (JSC::JSCell::getOwnNonIndexPropertyNames):
  12033. (JSC::JSCell::className):
  12034. (JSC::JSCell::getPropertyNames):
  12035. (JSC::JSCell::customHasInstance):
  12036. (JSC::JSCell::putDirectVirtual):
  12037. (JSC::JSCell::defineOwnProperty):
  12038. (JSC::JSCell::getOwnPropertyDescriptor):
  12039. * runtime/JSCell.h:
  12040. (JSCell):
  12041. * runtime/JSNameScope.cpp:
  12042. (JSC::JSNameScope::put):
  12043. * runtime/JSObject.cpp:
  12044. (JSC::JSObject::getOwnPropertySlotByIndex):
  12045. (JSC::JSObject::putByIndex):
  12046. (JSC::JSObject::ensureArrayStorageSlow):
  12047. (JSC::JSObject::deletePropertyByIndex):
  12048. (JSC::JSObject::getOwnPropertyNames):
  12049. (JSC::JSObject::putByIndexBeyondVectorLength):
  12050. (JSC::JSObject::putDirectIndexBeyondVectorLength):
  12051. (JSC::JSObject::getOwnPropertyDescriptor):
  12052. * runtime/JSObject.h:
  12053. (JSC::JSObject::canGetIndexQuickly):
  12054. (JSC::JSObject::getIndexQuickly):
  12055. (JSC::JSObject::tryGetIndexQuickly):
  12056. (JSC::JSObject::canSetIndexQuickly):
  12057. (JSC::JSObject::canSetIndexQuicklyForPutDirect):
  12058. (JSC::JSObject::setIndexQuickly):
  12059. (JSC::JSObject::initializeIndex):
  12060. (JSC::JSObject::hasSparseMap):
  12061. (JSC::JSObject::inSparseIndexingMode):
  12062. * runtime/JSScope.cpp:
  12063. (JSC::JSScope::isDynamicScope):
  12064. * runtime/JSSymbolTableObject.cpp:
  12065. (JSC::JSSymbolTableObject::putDirectVirtual):
  12066. * runtime/JSSymbolTableObject.h:
  12067. (JSSymbolTableObject):
  12068. * runtime/LiteralParser.cpp:
  12069. (JSC::::parse):
  12070. * runtime/RegExp.cpp:
  12071. (JSC::RegExp::compile):
  12072. (JSC::RegExp::compileMatchOnly):
  12073. * runtime/StructureTransitionTable.h:
  12074. (JSC::newIndexingType):
  12075. * tools/CodeProfile.cpp:
  12076. (JSC::CodeProfile::sample):
  12077. * yarr/YarrCanonicalizeUCS2.h:
  12078. (JSC::Yarr::getCanonicalPair):
  12079. (JSC::Yarr::areCanonicallyEquivalent):
  12080. * yarr/YarrInterpreter.cpp:
  12081. (JSC::Yarr::Interpreter::matchCharacterClass):
  12082. (JSC::Yarr::Interpreter::matchBackReference):
  12083. (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
  12084. (JSC::Yarr::Interpreter::matchParentheses):
  12085. (JSC::Yarr::Interpreter::backtrackParentheses):
  12086. (JSC::Yarr::Interpreter::matchDisjunction):
  12087. * yarr/YarrJIT.cpp:
  12088. (JSC::Yarr::YarrGenerator::generateTerm):
  12089. (JSC::Yarr::YarrGenerator::backtrackTerm):
  12090. * yarr/YarrParser.h:
  12091. (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary):
  12092. (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference):
  12093. * yarr/YarrPattern.cpp:
  12094. (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn):
  12095. 2013-01-23 Tony Chang <tony@chromium.org>
  12096. Unreviewed, set svn:eol-style to CRLF on Windows .sln files.
  12097. * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style.
  12098. * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style.
  12099. 2013-01-23 Oliver Hunt <oliver@apple.com>
  12100. Replace numerous manual CRASH's in JSC with RELEASE_ASSERT
  12101. https://bugs.webkit.org/show_bug.cgi?id=107726
  12102. Reviewed by Filip Pizlo.
  12103. Fairly manual change from if (foo) CRASH(); to RELEASE_ASSERT(!foo);
  12104. * assembler/MacroAssembler.h:
  12105. (JSC::MacroAssembler::branchAdd32):
  12106. (JSC::MacroAssembler::branchMul32):
  12107. * bytecode/CodeBlockHash.cpp:
  12108. (JSC::CodeBlockHash::CodeBlockHash):
  12109. * heap/BlockAllocator.h:
  12110. (JSC::Region::create):
  12111. (JSC::Region::createCustomSize):
  12112. * heap/GCAssertions.h:
  12113. * heap/HandleSet.cpp:
  12114. (JSC::HandleSet::visitStrongHandles):
  12115. (JSC::HandleSet::writeBarrier):
  12116. * heap/HandleSet.h:
  12117. (JSC::HandleSet::allocate):
  12118. * heap/Heap.cpp:
  12119. (JSC::Heap::collect):
  12120. * heap/SlotVisitor.cpp:
  12121. (JSC::SlotVisitor::validate):
  12122. * interpreter/Interpreter.cpp:
  12123. (JSC::Interpreter::execute):
  12124. * jit/ExecutableAllocator.cpp:
  12125. (JSC::DemandExecutableAllocator::allocateNewSpace):
  12126. (JSC::ExecutableAllocator::allocate):
  12127. * jit/ExecutableAllocator.h:
  12128. (JSC::roundUpAllocationSize):
  12129. * jit/ExecutableAllocatorFixedVMPool.cpp:
  12130. (JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator):
  12131. (JSC::ExecutableAllocator::allocate):
  12132. * runtime/ButterflyInlines.h:
  12133. (JSC::Butterfly::createUninitialized):
  12134. * runtime/Completion.cpp:
  12135. (JSC::evaluate):
  12136. * runtime/JSArray.h:
  12137. (JSC::constructArray):
  12138. * runtime/JSGlobalObject.cpp:
  12139. (JSC::slowValidateCell):
  12140. * runtime/JSObject.cpp:
  12141. (JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists):
  12142. (JSC::JSObject::createArrayStorage):
  12143. * tools/TieredMMapArray.h:
  12144. (JSC::TieredMMapArray::append):
  12145. * yarr/YarrInterpreter.cpp:
  12146. (JSC::Yarr::Interpreter::allocDisjunctionContext):
  12147. (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
  12148. (JSC::Yarr::Interpreter::InputStream::readChecked):
  12149. (JSC::Yarr::Interpreter::InputStream::uncheckInput):
  12150. (JSC::Yarr::Interpreter::InputStream::atEnd):
  12151. (JSC::Yarr::Interpreter::interpret):
  12152. 2013-01-22 Filip Pizlo <fpizlo@apple.com>
  12153. Convert CSE phase to not rely too much on NodeIndex
  12154. https://bugs.webkit.org/show_bug.cgi?id=107616
  12155. Reviewed by Geoffrey Garen.
  12156. - Instead of looping over the graph (which assumes that you can simply loop over all
  12157. nodes without considering blocks first) to reset node.replacement, do that in the
  12158. loop that sets up relevantToOSR, just before running CSE on the block.
  12159. - Instead of having a relevantToOSR bitvector indexed by NodeIndex, made
  12160. NodeRelevantToOSR be a NodeFlag. We had exactly one bit left in NodeFlags, so I did
  12161. some reshuffling to fit it in.
  12162. * dfg/DFGCSEPhase.cpp:
  12163. (JSC::DFG::CSEPhase::CSEPhase):
  12164. (JSC::DFG::CSEPhase::eliminateIrrelevantPhantomChildren):
  12165. (JSC::DFG::CSEPhase::performNodeCSE):
  12166. (JSC::DFG::CSEPhase::performBlockCSE):
  12167. (CSEPhase):
  12168. * dfg/DFGNodeFlags.h:
  12169. (DFG):
  12170. * dfg/DFGNodeType.h:
  12171. (DFG):
  12172. 2013-01-21 Kentaro Hara <haraken@chromium.org>
  12173. Implement UIEvent constructor
  12174. https://bugs.webkit.org/show_bug.cgi?id=107430
  12175. Reviewed by Adam Barth.
  12176. Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
  12177. UIEvent constructor is implemented under a DOM4_EVENTS_CONSTRUCTOR flag,
  12178. which is enabled on Safari and Chromium for now.
  12179. * Configurations/FeatureDefines.xcconfig:
  12180. 2013-01-22 Roger Fong <roger_fong@apple.com>
  12181. Unreviewed VS2010 build fix following r140259.
  12182. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  12183. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
  12184. 2013-01-22 Roger Fong <roger_fong@apple.com>
  12185. JavaScriptCore property sheets, project files and modified build scripts.
  12186. https://bugs.webkit.org/show_bug.cgi?id=106987
  12187. Reviewed by Brent Fulgham.
  12188. * JavaScriptCore.vcxproj: Added.
  12189. * JavaScriptCore.vcxproj/JavaScriptCore.resources: Added.
  12190. * JavaScriptCore.vcxproj/JavaScriptCore.resources/Info.plist: Added.
  12191. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Added.
  12192. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Added.
  12193. * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.user: Added.
  12194. * JavaScriptCore.vcxproj/JavaScriptCoreCF.props: Added.
  12195. * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: Added.
  12196. * JavaScriptCore.vcxproj/JavaScriptCoreDebug.props: Added.
  12197. * JavaScriptCore.vcxproj/JavaScriptCoreExports.def: Added.
  12198. * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make: Added.
  12199. * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: Added.
  12200. * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters: Added.
  12201. * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.user: Added.
  12202. * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedCommon.props: Added.
  12203. * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedDebug.props: Added.
  12204. * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props: Added.
  12205. * JavaScriptCore.vcxproj/JavaScriptCorePostBuild.cmd: Added.
  12206. * JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd: Added.
  12207. * JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd: Added.
  12208. * JavaScriptCore.vcxproj/JavaScriptCoreRelease.props: Added.
  12209. * JavaScriptCore.vcxproj/LLInt.vcproj: Added.
  12210. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly: Added.
  12211. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.make: Added.
  12212. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.vcxproj: Added.
  12213. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.vcxproj.user: Added.
  12214. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/build-LLIntAssembly.sh: Added.
  12215. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets: Added.
  12216. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.make: Added.
  12217. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: Added.
  12218. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj.user: Added.
  12219. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh: Added.
  12220. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor: Added.
  12221. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj: Added.
  12222. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj.user: Added.
  12223. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props: Added.
  12224. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: Added.
  12225. * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props: Added.
  12226. * JavaScriptCore.vcxproj/build-generated-files.sh: Added.
  12227. * JavaScriptCore.vcxproj/copy-files.cmd: Added.
  12228. * JavaScriptCore.vcxproj/jsc: Added.
  12229. * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Added.
  12230. * JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters: Added.
  12231. * JavaScriptCore.vcxproj/jsc/jsc.vcxproj.user: Added.
  12232. * JavaScriptCore.vcxproj/jsc/jscCommon.props: Added.
  12233. * JavaScriptCore.vcxproj/jsc/jscDebug.props: Added.
  12234. * JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd: Added.
  12235. * JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd: Added.
  12236. * JavaScriptCore.vcxproj/jsc/jscPreLink.cmd: Added.
  12237. * JavaScriptCore.vcxproj/jsc/jscRelease.props: Added.
  12238. * config.h:
  12239. 2013-01-22 Joseph Pecoraro <pecoraro@apple.com>
  12240. [Mac] Enable Page Visibility (PAGE_VISIBILITY_API)
  12241. https://bugs.webkit.org/show_bug.cgi?id=107230
  12242. Reviewed by David Kilzer.
  12243. * Configurations/FeatureDefines.xcconfig:
  12244. 2013-01-22 Tobias Netzel <tobias.netzel@googlemail.com>
  12245. Yarr JIT isn't big endian compatible
  12246. https://bugs.webkit.org/show_bug.cgi?id=102897
  12247. Reviewed by Oliver Hunt.
  12248. This patch was tested in the current mozilla codebase only and has passed the regexp tests there.
  12249. * yarr/YarrJIT.cpp:
  12250. (JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
  12251. 2013-01-22 David Kilzer <ddkilzer@apple.com>
  12252. Fix DateMath.cpp to compile with -Wshorten-64-to-32
  12253. <http://webkit.org/b/107503>
  12254. Reviewed by Darin Adler.
  12255. * runtime/JSDateMath.cpp:
  12256. (JSC::parseDateFromNullTerminatedCharacters): Remove unneeded
  12257. static_cast<int>().
  12258. 2013-01-22 Tim Horton <timothy_horton@apple.com>
  12259. PDFPlugin: Build PDFPlugin everywhere, enable at runtime
  12260. https://bugs.webkit.org/show_bug.cgi?id=107117
  12261. Reviewed by Alexey Proskuryakov.
  12262. Since PDFLayerController SPI is all forward-declared, the plugin should build
  12263. on all Mac platforms, and can be enabled at runtime.
  12264. * Configurations/FeatureDefines.xcconfig:
  12265. 2013-01-21 Justin Schuh <jschuh@chromium.org>
  12266. [CHROMIUM] Suppress c4267 build warnings for Win64 targets
  12267. https://bugs.webkit.org/show_bug.cgi?id=107499
  12268. Reviewed by Abhishek Arya.
  12269. * JavaScriptCore.gyp/JavaScriptCore.gyp:
  12270. 2013-01-21 Dirk Schulze <dschulze@adobe.com>
  12271. Add build flag for Canvas's Path object (disabled by default)
  12272. https://bugs.webkit.org/show_bug.cgi?id=107473
  12273. Reviewed by Dean Jackson.
  12274. Add CANVAS_PATH build flag to build systems.
  12275. * Configurations/FeatureDefines.xcconfig:
  12276. 2013-01-20 Geoffrey Garen <ggaren@apple.com>
  12277. Weak GC maps should be easier to use
  12278. https://bugs.webkit.org/show_bug.cgi?id=107312
  12279. Reviewed by Sam Weinig.
  12280. Follow-up fix.
  12281. * runtime/PrototypeMap.cpp:
  12282. (JSC::PrototypeMap::emptyObjectStructureForPrototype): Restored this
  12283. ASSERT, which was disabled because of a bug in WeakGCMap.
  12284. * runtime/WeakGCMap.h:
  12285. (JSC::WeakGCMap::add): We can't pass our passed-in value to add() because
  12286. a PassWeak() clears itself when passed to another function. So, we pass
  12287. nullptr instead, and fix things up afterwards.
  12288. 2013-01-20 Geoffrey Garen <ggaren@apple.com>
  12289. Unreviewed.
  12290. Temporarily disabling this ASSERT to get the bots green
  12291. while I investigate a fix.
  12292. * runtime/PrototypeMap.cpp:
  12293. (JSC::PrototypeMap::emptyObjectStructureForPrototype):
  12294. 2013-01-20 Filip Pizlo <fpizlo@apple.com>
  12295. Inserting a node into the DFG graph should not require five lines of code
  12296. https://bugs.webkit.org/show_bug.cgi?id=107381
  12297. Reviewed by Sam Weinig.
  12298. This adds fairly comprehensive support for inserting a node into a DFG graph in one
  12299. method call. A common example of this is:
  12300. m_insertionSet.insertNode(indexInBlock, DontRefChildren, DontRefNode, SpecNone, ForceOSRExit, codeOrigin);
  12301. The arguments to insert() specify what reference counting you need to have happen
  12302. (RefChildren => recursively refs all children, RefNode => non-recursively refs the node
  12303. that was created), the prediction to set (SpecNone is a common default), followed by
  12304. the arguments to the Node() constructor. InsertionSet::insertNode() and similar methods
  12305. (Graph::addNode() and BasicBlock::appendNode()) all use a common variadic template
  12306. function macro from DFGVariadicFunction.h. Also, all of these methods will automatically
  12307. non-recursively ref() the node being created if the flags say NodeMustGenerate.
  12308. In all, this new mechanism retains the flexibility of the old approach (you get to
  12309. manage ref counts yourself, albeit in less code) while ensuring that most code that adds
  12310. nodes to the graph now needs less code to do it.
  12311. In the future, we should revisit the reference counting methodology in the DFG: we could
  12312. do like most compilers and get rid of it entirely, or we could make it automatic. This
  12313. patch doesn't attempt to make any such major changes, and only seeks to simplify the
  12314. technique we were already using (manual ref counting).
  12315. * GNUmakefile.list.am:
  12316. * JavaScriptCore.xcodeproj/project.pbxproj:
  12317. * bytecode/Operands.h:
  12318. (JSC::dumpOperands):
  12319. * dfg/DFGAdjacencyList.h:
  12320. (AdjacencyList):
  12321. (JSC::DFG::AdjacencyList::kind):
  12322. * dfg/DFGArgumentsSimplificationPhase.cpp:
  12323. (JSC::DFG::ArgumentsSimplificationPhase::run):
  12324. * dfg/DFGBasicBlock.h:
  12325. (DFG):
  12326. (BasicBlock):
  12327. * dfg/DFGBasicBlockInlines.h: Added.
  12328. (DFG):
  12329. * dfg/DFGCFGSimplificationPhase.cpp:
  12330. (JSC::DFG::CFGSimplificationPhase::run):
  12331. (JSC::DFG::CFGSimplificationPhase::keepOperandAlive):
  12332. * dfg/DFGCommon.h:
  12333. * dfg/DFGConstantFoldingPhase.cpp:
  12334. (JSC::DFG::ConstantFoldingPhase::ConstantFoldingPhase):
  12335. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  12336. (JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck):
  12337. (JSC::DFG::ConstantFoldingPhase::paintUnreachableCode):
  12338. (ConstantFoldingPhase):
  12339. * dfg/DFGFixupPhase.cpp:
  12340. (JSC::DFG::FixupPhase::FixupPhase):
  12341. (JSC::DFG::FixupPhase::fixupBlock):
  12342. (JSC::DFG::FixupPhase::fixupNode):
  12343. (FixupPhase):
  12344. (JSC::DFG::FixupPhase::checkArray):
  12345. (JSC::DFG::FixupPhase::blessArrayOperation):
  12346. (JSC::DFG::FixupPhase::injectInt32ToDoubleNode):
  12347. * dfg/DFGGraph.h:
  12348. (JSC::DFG::Graph::ref):
  12349. (Graph):
  12350. * dfg/DFGInsertionSet.h:
  12351. (DFG):
  12352. (JSC::DFG::Insertion::Insertion):
  12353. (JSC::DFG::Insertion::element):
  12354. (Insertion):
  12355. (JSC::DFG::InsertionSet::InsertionSet):
  12356. (JSC::DFG::InsertionSet::insert):
  12357. (InsertionSet):
  12358. (JSC::DFG::InsertionSet::execute):
  12359. * dfg/DFGNode.h:
  12360. (JSC::DFG::Node::Node):
  12361. (Node):
  12362. * dfg/DFGStructureCheckHoistingPhase.cpp:
  12363. (JSC::DFG::StructureCheckHoistingPhase::run):
  12364. * dfg/DFGVariadicFunction.h: Added.
  12365. 2013-01-19 Geoffrey Garen <ggaren@apple.com>
  12366. Track inheritance structures in a side table, instead of using a private
  12367. name in each prototype
  12368. https://bugs.webkit.org/show_bug.cgi?id=107378
  12369. Reviewed by Sam Weinig and Phil Pizlo.
  12370. This is a step toward object size inference.
  12371. Using a side table frees us to use a more complex key (a pair of
  12372. prototype and expected inline capacity).
  12373. It also avoids ruining inline caches for prototypes. (Adding a new private
  12374. name for a new inline capacity would change the prototype's structure,
  12375. possibly firing watchpoints, making inline caches go polymorphic, and
  12376. generally causing us to have a bad time.)
  12377. * CMakeLists.txt:
  12378. * GNUmakefile.list.am:
  12379. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  12380. * JavaScriptCore.xcodeproj/project.pbxproj:
  12381. * Target.pri: Buildage.
  12382. * runtime/ArrayPrototype.cpp:
  12383. (JSC::ArrayPrototype::finishCreation): Updated to use new side table API.
  12384. * runtime/JSFunction.cpp:
  12385. (JSC::JSFunction::cacheInheritorID): Updated to use new side table API.
  12386. (JSC::JSFunction::visitChildren): Fixed a long-standing bug where JSFunction
  12387. forgot to visit one of its data members (m_cachedInheritorID). This
  12388. wasn't a user-visible problem before because JSFunction would always
  12389. visit its .prototype property, which visited its m_cachedInheritorID.
  12390. But now, function.prototype only weakly owns function.m_cachedInheritorID.
  12391. * runtime/JSGlobalData.h:
  12392. (JSGlobalData): Added the map, taking care to make sure that its
  12393. destructor would run after the heap destructor.
  12394. * runtime/JSGlobalObject.cpp:
  12395. (JSC::JSGlobalObject::reset): Updated to use new side table API.
  12396. * runtime/JSObject.cpp:
  12397. (JSC::JSObject::notifyPresenceOfIndexedAccessors):
  12398. (JSC::JSObject::setPrototype):
  12399. * runtime/JSObject.h:
  12400. (JSObject): Updated to use new side table API, and removed lots of code
  12401. that used to manage the per-object private name.
  12402. * runtime/JSProxy.cpp:
  12403. (JSC::JSProxy::setTarget):
  12404. * runtime/ObjectConstructor.cpp:
  12405. (JSC::objectConstructorCreate):
  12406. * runtime/ObjectPrototype.cpp:
  12407. (JSC::ObjectPrototype::finishCreation): Updated to use new side table API.
  12408. * runtime/PrototypeMap.cpp: Added.
  12409. (JSC):
  12410. (JSC::PrototypeMap::addPrototype):
  12411. (JSC::PrototypeMap::emptyObjectStructureForPrototype):
  12412. * runtime/PrototypeMap.h: Added.
  12413. (PrototypeMap):
  12414. (JSC::PrototypeMap::isPrototype):
  12415. (JSC::PrototypeMap::clearEmptyObjectStructureForPrototype): New side table.
  12416. This is a simple weak map, mapping an object to the structure you should
  12417. use when inheriting from that object. (In future, inline capacity will
  12418. be a part of the mapping.)
  12419. I used two maps to preserve existing behavior that allowed us to speculate
  12420. about an object becoming a prototype, even if it wasn't one at the moment.
  12421. However, I suspect that behavior can be removed without harm.
  12422. * runtime/WeakGCMap.h:
  12423. (JSC::WeakGCMap::contains):
  12424. (WeakGCMap): I would rate myself a 6 / 10 in C++.
  12425. 2013-01-18 Dan Bernstein <mitz@apple.com>
  12426. Removed duplicate references to two headers in the project files.
  12427. Rubber-stamped by Mark Rowe.
  12428. * JavaScriptCore.xcodeproj/project.pbxproj:
  12429. 2013-01-18 Michael Saboff <msaboff@apple.com>
  12430. Unreviewed build fix for building JSC with DFG_ENABLE_DEBUG_PROPAGATION_VERBOSE enabled in DFGCommon.h.
  12431. Fixes the case where the argument node in fixupNode is freed due to the Vector storage being reallocated.
  12432. * dfg/DFGFixupPhase.cpp:
  12433. (JSC::DFG::FixupPhase::fixupNode):
  12434. 2013-01-18 Michael Saboff <msaboff@apple.com>
  12435. Unreviewed build fix for release builds when DFG_ENABLE_DEBUG_PROPAGATION_VERBOSE is set to 1 in DFGCommon.h.
  12436. * dfg/DFGCFAPhase.cpp: Added #include "Operations.h"
  12437. 2013-01-18 Michael Saboff <msaboff@apple.com>
  12438. Change set r140201 broke editing/selection/move-by-word-visually-multi-line.html
  12439. https://bugs.webkit.org/show_bug.cgi?id=107340
  12440. Reviewed by Filip Pizlo.
  12441. Due to the change landed in r140201, more nodes might end up
  12442. generating Int32ToDouble nodes. Therefore, changed the JSVALUE64
  12443. constant path of compileInt32ToDouble() to use the more
  12444. restrictive isInt32Constant() check on the input. This check was
  12445. the same as the existing ASSERT() so the ASSERT was eliminated.
  12446. * dfg/DFGSpeculativeJIT.cpp:
  12447. (JSC::DFG::SpeculativeJIT::compileInt32ToDouble):
  12448. 2013-01-18 Viatcheslav Ostapenko <sl.ostapenko@samsung.com>
  12449. Weak GC maps should be easier to use
  12450. https://bugs.webkit.org/show_bug.cgi?id=107312
  12451. Reviewed by Ryosuke Niwa.
  12452. Build fix for linux platforms after r140194.
  12453. * runtime/WeakGCMap.h:
  12454. (WeakGCMap):
  12455. 2013-01-18 Michael Saboff <msaboff@apple.com>
  12456. Harden ArithDiv of integers fix-up by inserting Int32ToDouble node directly
  12457. https://bugs.webkit.org/show_bug.cgi?id=107321
  12458. Reviewed by Filip Pizlo.
  12459. Split out the Int32ToDouble node insertion from fixDoubleEdge() and used it directly when we're fixing up
  12460. an ArithDiv node with integer inputs and output for platforms that don't have integer division.
  12461. Since we are checking that our inputs should be ints, we can just insert the Int32ToDouble node
  12462. without any further checks.
  12463. * dfg/DFGFixupPhase.cpp:
  12464. (JSC::DFG::FixupPhase::fixupNode):
  12465. (JSC::DFG::FixupPhase::fixDoubleEdge):
  12466. (FixupPhase):
  12467. (JSC::DFG::FixupPhase::injectInt32ToDoubleNode):
  12468. 2013-01-18 Michael Saboff <msaboff@apple.com>
  12469. Fix up of ArithDiv nodes for non-x86 CPUs is broken
  12470. https://bugs.webkit.org/show_bug.cgi?id=107309
  12471. Reviewed by Filip Pizlo.
  12472. Changed the logic so that we insert an Int32ToDouble node when the existing edge is not SpecDouble.
  12473. * dfg/DFGFixupPhase.cpp:
  12474. (JSC::DFG::FixupPhase::fixDoubleEdge):
  12475. 2013-01-18 Dan Bernstein <mitz@apple.com>
  12476. Tried to fix the build after r140194.
  12477. * API/JSWrapperMap.mm:
  12478. (-[JSWrapperMap wrapperForObject:]):
  12479. 2013-01-18 Mark Hahnenberg <mhahnenberg@apple.com>
  12480. Objective-C API: Update documentation for JSValue and JSContext
  12481. https://bugs.webkit.org/show_bug.cgi?id=107313
  12482. Reviewed by Geoffrey Garen.
  12483. After changing the semantics of object lifetime we need to update the API documentation to reflect the new semantics.
  12484. * API/APIJSValue.h:
  12485. * API/JSContext.h:
  12486. 2013-01-18 Balazs Kilvady <kilvadyb@homejinni.com>
  12487. r134080 causes heap problem on linux systems where PAGESIZE != 4096
  12488. https://bugs.webkit.org/show_bug.cgi?id=102828
  12489. Reviewed by Mark Hahnenberg.
  12490. Make MarkStackSegment::blockSize as the capacity of segments of a MarkStackArray.
  12491. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  12492. * heap/MarkStack.cpp:
  12493. (JSC):
  12494. (JSC::MarkStackArray::MarkStackArray):
  12495. (JSC::MarkStackArray::expand):
  12496. (JSC::MarkStackArray::donateSomeCellsTo):
  12497. (JSC::MarkStackArray::stealSomeCellsFrom):
  12498. * heap/MarkStack.h:
  12499. (JSC::MarkStackSegment::data):
  12500. (CapacityFromSize):
  12501. (MarkStackArray):
  12502. * heap/MarkStackInlines.h:
  12503. (JSC::MarkStackArray::setTopForFullSegment):
  12504. (JSC::MarkStackArray::append):
  12505. (JSC::MarkStackArray::isEmpty):
  12506. (JSC::MarkStackArray::size):
  12507. * runtime/Options.h:
  12508. (JSC):
  12509. 2013-01-18 Geoffrey Garen <ggaren@apple.com>
  12510. Weak GC maps should be easier to use
  12511. https://bugs.webkit.org/show_bug.cgi?id=107312
  12512. Reviewed by Sam Weinig.
  12513. This patch changes WeakGCMap to not use a WeakImpl finalizer to remove
  12514. items from the map, and to instead have the map automatically remove
  12515. stale items itself upon insertion. This has a few advantages:
  12516. (1) WeakGCMap is now compatible with all the specializations you would
  12517. use for HashMap.
  12518. (2) There's no need for clients to write special finalization munging
  12519. functions.
  12520. (3) Clients can specify custom value finalizers if they like.
  12521. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: Def!
  12522. * API/JSWeakObjectMapRefPrivate.cpp: Setter no longer requires a global
  12523. data, since we've reduced interdependency.
  12524. * heap/Handle.h: No more need to forward declare, since we've reduced
  12525. interdependency.
  12526. * heap/Weak.h:
  12527. (Weak): Use explicit so we can assign directly to a weak map iterator
  12528. without ambiguity between Weak<T> and PassWeak<T>.
  12529. * runtime/Structure.cpp:
  12530. (JSC::StructureTransitionTable::add): See above.
  12531. * runtime/Structure.h:
  12532. (JSC):
  12533. * runtime/StructureTransitionTable.h:
  12534. (StructureTransitionTable): Bad code goes away, programmer happy.
  12535. * runtime/WeakGCMap.h:
  12536. (JSC):
  12537. (WeakGCMap):
  12538. (JSC::WeakGCMap::WeakGCMap):
  12539. (JSC::WeakGCMap::set):
  12540. (JSC::WeakGCMap::add):
  12541. (JSC::WeakGCMap::find):
  12542. (JSC::WeakGCMap::contains):
  12543. (JSC::WeakGCMap::gcMap):
  12544. (JSC::WeakGCMap::gcMapIfNeeded): Inherit from HashMap and override any
  12545. function that might observe a Weak<T> that has died, just enough to
  12546. make such items appear as if they are not in the table.
  12547. 2013-01-18 Michael Saboff <msaboff@apple.com>
  12548. Refactor isPowerOf2() and add getLSBSet()
  12549. https://bugs.webkit.org/show_bug.cgi?id=107306
  12550. Reviewed by Filip Pizlo.
  12551. Moved implementation of isPowerOf2() to new hasOneBitSet() in wtf/MathExtras.h.
  12552. * runtime/PropertyMapHashTable.h:
  12553. (JSC::isPowerOf2):
  12554. 2013-01-17 Mark Hahnenberg <mhahnenberg@apple.com>
  12555. Objective-C API: Clean up JSValue.mm
  12556. https://bugs.webkit.org/show_bug.cgi?id=107163
  12557. Reviewed by Darin Adler.
  12558. m_context is no longer weak, so there is now a lot of dead code in in JSValue.mm, and a wasted message send
  12559. on every API call. In the head of just about every method in JSValue.mm we're doing:
  12560. JSContext *context = [self context];
  12561. if (!context)
  12562. return nil;
  12563. This is getting a retained copy of the context, which is no longer necessary now m_context is no longer weak.
  12564. We can just delete all these lines from all functions doing this, and where they were referring to the local
  12565. variable 'context', instead we can just access m_context directly.
  12566. Since we're already going to be modifying most of JSValue.mm, we'll also do the following:
  12567. 1) context @property is no longer weak – the context property is declared as:
  12568. @property(readonly, weak) JSContext *context;
  12569. This is really only informative (since we're not presently synthesizing the ivar), but it is now misleading.
  12570. We should change it to:
  12571. @property(readonly, retain) JSContext *context;
  12572. 2) the JSContext ivar and accessor can be automatically generated. Since we're no longer doing anything
  12573. special with m_context, we can just let the compiler handle the ivar for us. We'll delete:
  12574. JSContext *m_context;
  12575. and:
  12576. - (JSContext *)context
  12577. {
  12578. return m_context;
  12579. }
  12580. and find&replace "m_context" to "_context" in JSValue.mm.
  12581. * API/APIJSValue.h:
  12582. * API/JSValue.mm:
  12583. (-[JSValue toObject]):
  12584. (-[JSValue toBool]):
  12585. (-[JSValue toDouble]):
  12586. (-[JSValue toNumber]):
  12587. (-[JSValue toString]):
  12588. (-[JSValue toDate]):
  12589. (-[JSValue toArray]):
  12590. (-[JSValue toDictionary]):
  12591. (-[JSValue valueForProperty:]):
  12592. (-[JSValue setValue:forProperty:]):
  12593. (-[JSValue deleteProperty:]):
  12594. (-[JSValue hasProperty:]):
  12595. (-[JSValue defineProperty:descriptor:]):
  12596. (-[JSValue valueAtIndex:]):
  12597. (-[JSValue setValue:atIndex:]):
  12598. (-[JSValue isUndefined]):
  12599. (-[JSValue isNull]):
  12600. (-[JSValue isBoolean]):
  12601. (-[JSValue isNumber]):
  12602. (-[JSValue isString]):
  12603. (-[JSValue isObject]):
  12604. (-[JSValue isEqualToObject:]):
  12605. (-[JSValue isEqualWithTypeCoercionToObject:]):
  12606. (-[JSValue isInstanceOf:]):
  12607. (-[JSValue callWithArguments:]):
  12608. (-[JSValue constructWithArguments:]):
  12609. (-[JSValue invokeMethod:withArguments:]):
  12610. (-[JSValue objectForKeyedSubscript:]):
  12611. (-[JSValue setObject:forKeyedSubscript:]):
  12612. (-[JSValue initWithValue:inContext:]):
  12613. (-[JSValue dealloc]):
  12614. (-[JSValue description]):
  12615. 2013-01-17 Mark Hahnenberg <mhahnenberg@apple.com>
  12616. Objective-C API: Clean up JSValue
  12617. https://bugs.webkit.org/show_bug.cgi?id=107156
  12618. Reviewed by Oliver Hunt.
  12619. JSContext m_protectCounts, protect, unprotect are all now unnecessary overhead, and should all be removed.
  12620. These exist to handle the context going away before the value does; the context needs to be able to unprotect
  12621. values early. Since the value is now keeping the context alive there is no longer any danger of this happening;
  12622. instead we should just protect/unprotect the value in JSValue's init/dealloc methods.
  12623. * API/JSContext.mm:
  12624. (-[JSContext dealloc]):
  12625. * API/JSContextInternal.h:
  12626. * API/JSValue.mm:
  12627. (-[JSValue initWithValue:inContext:]):
  12628. (-[JSValue dealloc]):
  12629. 2013-01-17 Filip Pizlo <fpizlo@apple.com>
  12630. DFG Node::ref() and Node::deref() should not return bool, and should have postfixRef variants
  12631. https://bugs.webkit.org/show_bug.cgi?id=107147
  12632. Reviewed by Mark Hahnenberg.
  12633. This small refactoring will enable a world where ref() returns Node*, which is useful for
  12634. https://bugs.webkit.org/show_bug.cgi?id=106868. Also, while this refactoring does lead to
  12635. slightly less terse code, it's also slightly more self-explanatory. I could never quite
  12636. remember what the meaning of the bool return from ref() and deref() was.
  12637. * dfg/DFGGraph.cpp:
  12638. (JSC::DFG::Graph::collectGarbage):
  12639. * dfg/DFGGraph.h:
  12640. (JSC::DFG::Graph::ref):
  12641. (JSC::DFG::Graph::deref):
  12642. * dfg/DFGNode.h:
  12643. (JSC::DFG::Node::ref):
  12644. (Node):
  12645. (JSC::DFG::Node::postfixRef):
  12646. (JSC::DFG::Node::deref):
  12647. (JSC::DFG::Node::postfixDeref):
  12648. 2013-01-17 Alexey Proskuryakov <ap@apple.com>
  12649. Added svn:ignore=*.pyc, so that ud_opcode.pyc and ud_optable.pyc don't show up
  12650. in svn stat.
  12651. * disassembler/udis86: Added property svn:ignore.
  12652. 2013-01-16 Filip Pizlo <fpizlo@apple.com>
  12653. DFG 32_64 backend doesn't check for hasArrayStorage() in NewArrayWithSize
  12654. https://bugs.webkit.org/show_bug.cgi?id=107081
  12655. Reviewed by Michael Saboff.
  12656. This bug led to the 32_64 backend emitting contiguous allocation code to allocate
  12657. ArrayStorage arrays. This then led to all manner of heap corruption, since
  12658. subsequent array accesses would be accessing the contiguous array "as if" it was
  12659. an arraystorage array.
  12660. * dfg/DFGSpeculativeJIT32_64.cpp:
  12661. (JSC::DFG::SpeculativeJIT::compile):
  12662. 2013-01-16 Jonathan Liu <net147@gmail.com>
  12663. Add missing sys/mman.h include on Mac
  12664. https://bugs.webkit.org/show_bug.cgi?id=98089
  12665. Reviewed by Darin Adler.
  12666. The madvise function and MADV_FREE constant require sys/mman.h.
  12667. * jit/ExecutableAllocatorFixedVMPool.cpp:
  12668. 2013-01-15 Michael Saboff <msaboff@apple.com>
  12669. DFG X86: division in the used-as-int case doesn't correctly check for -2^31/-1
  12670. https://bugs.webkit.org/show_bug.cgi?id=106978
  12671. Reviewed by Filip Pizlo.
  12672. Changed the numerator equal to -2^31 check to just return if we expect an integer
  12673. result, since the check is after we have determined that the denominator is -1.
  12674. The int result of -2^31 / -1 is -2^31, so just return the numerator as the result.
  12675. * dfg/DFGSpeculativeJIT.cpp:
  12676. (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForX86):
  12677. 2013-01-15 Levi Weintraub <leviw@chromium.org>
  12678. Unreviewed, rolling out r139792.
  12679. http://trac.webkit.org/changeset/139792
  12680. https://bugs.webkit.org/show_bug.cgi?id=106970
  12681. Broke the windows build.
  12682. * bytecode/GlobalResolveInfo.h: Removed property svn:mergeinfo.
  12683. 2013-01-15 Pratik Solanki <psolanki@apple.com>
  12684. Use MADV_FREE_REUSABLE to return JIT memory to OS
  12685. https://bugs.webkit.org/show_bug.cgi?id=106830
  12686. <rdar://problem/11437701>
  12687. Reviewed by Geoffrey Garen.
  12688. Use MADV_FREE_REUSABLE to return JIT memory on OSes that have the underlying madvise bug
  12689. fixed.
  12690. * jit/ExecutableAllocatorFixedVMPool.cpp:
  12691. (JSC::FixedVMPoolExecutableAllocator::notifyPageIsFree):
  12692. 2013-01-15 Levi Weintraub <leviw@chromium.org>
  12693. Unreviewed, rolling out r139790.
  12694. http://trac.webkit.org/changeset/139790
  12695. https://bugs.webkit.org/show_bug.cgi?id=106948
  12696. The patch is failing its own test.
  12697. * bytecode/GlobalResolveInfo.h: Removed property svn:mergeinfo.
  12698. 2013-01-15 Zan Dobersek <zandobersek@gmail.com>
  12699. [Autotools] Unify JavaScriptCore sources list, regardless of target OS
  12700. https://bugs.webkit.org/show_bug.cgi?id=106007
  12701. Reviewed by Gustavo Noronha Silva.
  12702. Include the Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp target
  12703. in the general sources list as it is guarded by the ENABLE_EXECUTABLE_ALLOCATOR_FIXED
  12704. feature define. This define is only used on 64-bit architecture and indirectly depends
  12705. on enabling either JIT or YARR JIT feature. Both of these defines are disabled on
  12706. Windows OS when using 64-bit architecture so there's no need to add this target to
  12707. sources only when the target OS is Windows.
  12708. * GNUmakefile.list.am:
  12709. 2013-01-11 Filip Pizlo <fpizlo@apple.com>
  12710. DFG should not forget that it had proved something to be a constant during a merge just because it's merging against the empty value
  12711. https://bugs.webkit.org/show_bug.cgi?id=106727
  12712. Reviewed by Oliver Hunt.
  12713. The problem was this statement:
  12714. if (m_value != other.m_value)
  12715. m_value = JSValue();
  12716. This is well-intentioned, in the sense that if we want our abstract value (i.e. this) to become the superset of the other
  12717. abstract value, and the two abstract values have proven different constants, then our abstract value should rescind its
  12718. claim that it has been proven to be constant. But this misses the special case that if the other abstract value is
  12719. completely clear (meaning that it wishes to contribute zero information and so the superset operation shouldn't change
  12720. this), it will have a clear m_value. So, the code prior to this patch would rescind the constant proof even though it
  12721. didn't have to.
  12722. This comes up rarely and I don't believe it will be a performance win, but it is good to have the CFA been consistently
  12723. precise as often as possible.
  12724. * dfg/DFGAbstractValue.h:
  12725. (JSC::DFG::AbstractValue::merge):
  12726. 2013-01-11 Filip Pizlo <fpizlo@apple.com>
  12727. Python implementation reports "MemoryError" instead of doing things
  12728. https://bugs.webkit.org/show_bug.cgi?id=106690
  12729. Reviewed by Oliver Hunt.
  12730. The bug was that the CFA was assuming that a variable is dead at the end of a basic block and hence doesn't need to
  12731. be merged to the next block if the last mention of the variable was dead. This is almost correct, except that it
  12732. doesn't work if the last mention is a GetLocal - the GetLocal itself may be dead, but that doesn't mean that the
  12733. variable is dead - it may still be live. The appropriate thing to do is to look at the GetLocal's Phi. If the
  12734. variable is used in the next block then the next block will have a reference to the last mention in our block unless
  12735. that last mention is a GetLocal, in which case it will link to the Phi. Doing it this way captures everything that
  12736. the CFA wants: if the last use is a live GetLocal then the CFA needs to consider the GetLocal itself for possible
  12737. refinements to the proof of the value in the variable, but if the GetLocal is dead, then this must mean that the
  12738. variable is not mentioned in the block but may still be "passed through" it, which is what the Phi will tell us.
  12739. Note that it is not possible for the GetLocal to refer to anything other than a Phi, and it is also not possible
  12740. for the last mention of a variable to be a dead GetLocal while there are other mentions that aren't dead - if
  12741. there had been SetLocals or GetLocals prior to the dead one then the dead one wouldn't have been emitted by the
  12742. parser.
  12743. This also fixes a similar bug in the handling of captured variables. If a variable is captured, then it doesn't
  12744. matter if the last mention is dead, or not. Either way, we already know that a captured variable will be live in
  12745. the next block, so we must merge it no matter what.
  12746. Finally, this change makes the output of Operands dumping a bit more verbose: it now prints the variable name next
  12747. to each variable's dump. I've often found the lack of this information confusing particularly for operand dumps
  12748. that involve a lot of variables.
  12749. * bytecode/Operands.h:
  12750. (JSC::dumpOperands):
  12751. * dfg/DFGAbstractState.cpp:
  12752. (JSC::DFG::AbstractState::mergeStateAtTail):
  12753. 2013-01-14 Roger Fong <roger_fong@apple.com>
  12754. Unreviewed. Fix vcproj file. Missing file tag after http://trac.webkit.org/changeset/139541.
  12755. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  12756. 2013-01-13 Filip Pizlo <fpizlo@apple.com>
  12757. DFG phases that store per-node information should store it in Node itself rather than using a secondary vector
  12758. https://bugs.webkit.org/show_bug.cgi?id=106753
  12759. Reviewed by Geoffrey Garen.
  12760. * dfg/DFGAbstractState.cpp:
  12761. (JSC::DFG::AbstractState::AbstractState):
  12762. (JSC::DFG::AbstractState::beginBasicBlock):
  12763. (JSC::DFG::AbstractState::dump):
  12764. * dfg/DFGAbstractState.h:
  12765. (JSC::DFG::AbstractState::forNode):
  12766. (AbstractState):
  12767. * dfg/DFGCFGSimplificationPhase.cpp:
  12768. * dfg/DFGCSEPhase.cpp:
  12769. (JSC::DFG::CSEPhase::CSEPhase):
  12770. (JSC::DFG::CSEPhase::performSubstitution):
  12771. (JSC::DFG::CSEPhase::setReplacement):
  12772. (CSEPhase):
  12773. * dfg/DFGNode.h:
  12774. (Node):
  12775. 2013-01-12 Tim Horton <timothy_horton@apple.com>
  12776. Unreviewed build fix.
  12777. * API/JSBlockAdaptor.mm:
  12778. * API/JSContext.mm:
  12779. * API/JSValue.mm:
  12780. 2013-01-12 Csaba Osztrogonác <ossy@webkit.org>
  12781. Unreviewed 64 bit buildfix after r139496.
  12782. * dfg/DFGOperations.cpp:
  12783. 2013-01-11 Filip Pizlo <fpizlo@apple.com>
  12784. Unreviewed, speculative build fix.
  12785. * API/JSWrapperMap.mm:
  12786. 2013-01-10 Filip Pizlo <fpizlo@apple.com>
  12787. JITThunks should not compile only because of luck
  12788. https://bugs.webkit.org/show_bug.cgi?id=105696
  12789. Rubber stamped by Sam Weinig and Geoffrey Garen.
  12790. This patch was supposed to just move JITThunks into its own file. But then I
  12791. realized that there is a horrible circular dependency chain between JSCell,
  12792. JSGlobalData, CallFrame, and Weak, which only works because of magical include
  12793. order in JITStubs.h, and the fact that JSGlobalData.h includes JITStubs.h
  12794. before it includes JSCell or JSValue.
  12795. I first tried to just get JITThunks.h to just magically do the same pointless
  12796. includes that JITStubs.h had, but then I decided to actually fix the underflying
  12797. problem, which was that JSCell needed CallFrame, CallFrame needed JSGlobalData,
  12798. JSGlobalData needed JITThunks, JITThunks needed Weak, and Weak needed JSCell.
  12799. Now, all of JSCell's outgoing dependencies are placed in JSCellInlines.h. This
  12800. also gave me an opportunity to move JSValue inline methods from JSCell.h into
  12801. JSValueInlines.h. But to make this really work, I needed to remove includes of
  12802. *Inlines.h from other headers (CodeBlock.h for example included JSValueInlines.h,
  12803. which defeats the whole entire purpose of having an Inlines.h file), and I needed
  12804. to add includes of *Inlines.h into a bunch of .cpp files. I did this mostly by
  12805. having .cpp files include Operations.h. In future, if you're adding a .cpp file
  12806. to JSC, you'll almost certainly have to include Operations.h unless you enjoy
  12807. link errors.
  12808. * API/JSBase.cpp:
  12809. * API/JSCallbackConstructor.cpp:
  12810. * API/JSCallbackFunction.cpp:
  12811. * API/JSCallbackObject.cpp:
  12812. * API/JSClassRef.cpp:
  12813. * API/JSContextRef.cpp:
  12814. * API/JSObjectRef.cpp:
  12815. * API/JSScriptRef.cpp:
  12816. * API/JSWeakObjectMapRefPrivate.cpp:
  12817. * JSCTypedArrayStubs.h:
  12818. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  12819. * JavaScriptCore.xcodeproj/project.pbxproj:
  12820. * bytecode/ArrayAllocationProfile.cpp:
  12821. * bytecode/CodeBlock.cpp:
  12822. * bytecode/GetByIdStatus.cpp:
  12823. * bytecode/LazyOperandValueProfile.cpp:
  12824. * bytecode/ResolveGlobalStatus.cpp:
  12825. * bytecode/SpeculatedType.cpp:
  12826. * bytecode/UnlinkedCodeBlock.cpp:
  12827. * bytecompiler/BytecodeGenerator.cpp:
  12828. * debugger/Debugger.cpp:
  12829. * debugger/DebuggerActivation.cpp:
  12830. * debugger/DebuggerCallFrame.cpp:
  12831. * dfg/DFGArgumentsSimplificationPhase.cpp:
  12832. * dfg/DFGArrayMode.cpp:
  12833. * dfg/DFGByteCodeParser.cpp:
  12834. * dfg/DFGConstantFoldingPhase.cpp:
  12835. * dfg/DFGDriver.cpp:
  12836. * dfg/DFGFixupPhase.cpp:
  12837. * dfg/DFGGraph.cpp:
  12838. * dfg/DFGJITCompiler.cpp:
  12839. * dfg/DFGOSREntry.cpp:
  12840. * dfg/DFGOSRExitCompiler.cpp:
  12841. * dfg/DFGOSRExitCompiler32_64.cpp:
  12842. * dfg/DFGOSRExitCompiler64.cpp:
  12843. * dfg/DFGPredictionPropagationPhase.cpp:
  12844. * dfg/DFGSpeculativeJIT.cpp:
  12845. (JSC::DFG::SpeculativeJIT::silentSavePlanForGPR):
  12846. (DFG):
  12847. (JSC::DFG::SpeculativeJIT::silentSavePlanForFPR):
  12848. (JSC::DFG::SpeculativeJIT::silentSpill):
  12849. (JSC::DFG::SpeculativeJIT::silentFill):
  12850. * dfg/DFGSpeculativeJIT.h:
  12851. (SpeculativeJIT):
  12852. * dfg/DFGSpeculativeJIT32_64.cpp:
  12853. * dfg/DFGSpeculativeJIT64.cpp:
  12854. * dfg/DFGStructureCheckHoistingPhase.cpp:
  12855. * dfg/DFGVariableEventStream.cpp:
  12856. * heap/CopiedBlock.h:
  12857. * heap/CopiedSpace.cpp:
  12858. * heap/HandleSet.cpp:
  12859. * heap/Heap.cpp:
  12860. * heap/HeapStatistics.cpp:
  12861. * heap/SlotVisitor.cpp:
  12862. * heap/WeakBlock.cpp:
  12863. * interpreter/CallFrame.cpp:
  12864. * interpreter/CallFrame.h:
  12865. * jit/ClosureCallStubRoutine.cpp:
  12866. * jit/GCAwareJITStubRoutine.cpp:
  12867. * jit/JIT.cpp:
  12868. * jit/JITArithmetic.cpp:
  12869. * jit/JITArithmetic32_64.cpp:
  12870. * jit/JITCall.cpp:
  12871. * jit/JITCall32_64.cpp:
  12872. * jit/JITCode.h:
  12873. * jit/JITExceptions.cpp:
  12874. * jit/JITStubs.h:
  12875. * jit/JITThunks.h:
  12876. * jsc.cpp:
  12877. * llint/LLIntExceptions.cpp:
  12878. * profiler/LegacyProfiler.cpp:
  12879. * profiler/ProfileGenerator.cpp:
  12880. * profiler/ProfilerBytecode.cpp:
  12881. * profiler/ProfilerBytecodeSequence.cpp:
  12882. * profiler/ProfilerBytecodes.cpp:
  12883. * profiler/ProfilerCompilation.cpp:
  12884. * profiler/ProfilerCompiledBytecode.cpp:
  12885. * profiler/ProfilerDatabase.cpp:
  12886. * profiler/ProfilerOSRExit.cpp:
  12887. * profiler/ProfilerOSRExitSite.cpp:
  12888. * profiler/ProfilerOrigin.cpp:
  12889. * profiler/ProfilerOriginStack.cpp:
  12890. * profiler/ProfilerProfiledBytecodes.cpp:
  12891. * runtime/ArgList.cpp:
  12892. * runtime/Arguments.cpp:
  12893. * runtime/ArrayConstructor.cpp:
  12894. * runtime/BooleanConstructor.cpp:
  12895. * runtime/BooleanObject.cpp:
  12896. * runtime/BooleanPrototype.cpp:
  12897. * runtime/CallData.cpp:
  12898. * runtime/CodeCache.cpp:
  12899. * runtime/Completion.cpp:
  12900. * runtime/ConstructData.cpp:
  12901. * runtime/DateConstructor.cpp:
  12902. * runtime/DateInstance.cpp:
  12903. * runtime/DatePrototype.cpp:
  12904. * runtime/Error.cpp:
  12905. * runtime/ErrorConstructor.cpp:
  12906. * runtime/ErrorInstance.cpp:
  12907. * runtime/ErrorPrototype.cpp:
  12908. * runtime/ExceptionHelpers.cpp:
  12909. * runtime/Executable.cpp:
  12910. * runtime/FunctionConstructor.cpp:
  12911. * runtime/FunctionPrototype.cpp:
  12912. * runtime/GetterSetter.cpp:
  12913. * runtime/Identifier.cpp:
  12914. * runtime/InternalFunction.cpp:
  12915. * runtime/JSActivation.cpp:
  12916. * runtime/JSBoundFunction.cpp:
  12917. * runtime/JSCell.cpp:
  12918. * runtime/JSCell.h:
  12919. (JSC):
  12920. * runtime/JSCellInlines.h: Added.
  12921. (JSC):
  12922. (JSC::JSCell::JSCell):
  12923. (JSC::JSCell::finishCreation):
  12924. (JSC::JSCell::structure):
  12925. (JSC::JSCell::visitChildren):
  12926. (JSC::allocateCell):
  12927. (JSC::isZapped):
  12928. (JSC::JSCell::isObject):
  12929. (JSC::JSCell::isString):
  12930. (JSC::JSCell::isGetterSetter):
  12931. (JSC::JSCell::isProxy):
  12932. (JSC::JSCell::isAPIValueWrapper):
  12933. (JSC::JSCell::setStructure):
  12934. (JSC::JSCell::methodTable):
  12935. (JSC::JSCell::inherits):
  12936. (JSC::JSCell::fastGetOwnPropertySlot):
  12937. (JSC::JSCell::fastGetOwnProperty):
  12938. (JSC::JSCell::toBoolean):
  12939. * runtime/JSDateMath.cpp:
  12940. * runtime/JSFunction.cpp:
  12941. * runtime/JSFunction.h:
  12942. (JSC):
  12943. * runtime/JSGlobalData.h:
  12944. (JSC):
  12945. (JSGlobalData):
  12946. * runtime/JSGlobalObject.cpp:
  12947. * runtime/JSGlobalObjectFunctions.cpp:
  12948. * runtime/JSLock.cpp:
  12949. * runtime/JSNameScope.cpp:
  12950. * runtime/JSNotAnObject.cpp:
  12951. * runtime/JSONObject.cpp:
  12952. * runtime/JSObject.h:
  12953. (JSC):
  12954. * runtime/JSProxy.cpp:
  12955. * runtime/JSScope.cpp:
  12956. * runtime/JSSegmentedVariableObject.cpp:
  12957. * runtime/JSString.h:
  12958. (JSC):
  12959. * runtime/JSStringJoiner.cpp:
  12960. * runtime/JSSymbolTableObject.cpp:
  12961. * runtime/JSValue.cpp:
  12962. * runtime/JSValueInlines.h:
  12963. (JSC::JSValue::toInt32):
  12964. (JSC::JSValue::toUInt32):
  12965. (JSC):
  12966. (JSC::JSValue::isUInt32):
  12967. (JSC::JSValue::asUInt32):
  12968. (JSC::JSValue::asNumber):
  12969. (JSC::jsNaN):
  12970. (JSC::JSValue::JSValue):
  12971. (JSC::JSValue::encode):
  12972. (JSC::JSValue::decode):
  12973. (JSC::JSValue::operator bool):
  12974. (JSC::JSValue::operator==):
  12975. (JSC::JSValue::operator!=):
  12976. (JSC::JSValue::isEmpty):
  12977. (JSC::JSValue::isUndefined):
  12978. (JSC::JSValue::isNull):
  12979. (JSC::JSValue::isUndefinedOrNull):
  12980. (JSC::JSValue::isCell):
  12981. (JSC::JSValue::isInt32):
  12982. (JSC::JSValue::isDouble):
  12983. (JSC::JSValue::isTrue):
  12984. (JSC::JSValue::isFalse):
  12985. (JSC::JSValue::tag):
  12986. (JSC::JSValue::payload):
  12987. (JSC::JSValue::asInt32):
  12988. (JSC::JSValue::asDouble):
  12989. (JSC::JSValue::asCell):
  12990. (JSC::JSValue::isNumber):
  12991. (JSC::JSValue::isBoolean):
  12992. (JSC::JSValue::asBoolean):
  12993. (JSC::reinterpretDoubleToInt64):
  12994. (JSC::reinterpretInt64ToDouble):
  12995. (JSC::JSValue::isString):
  12996. (JSC::JSValue::isPrimitive):
  12997. (JSC::JSValue::isGetterSetter):
  12998. (JSC::JSValue::isObject):
  12999. (JSC::JSValue::getString):
  13000. (JSC::::getString):
  13001. (JSC::JSValue::getObject):
  13002. (JSC::JSValue::getUInt32):
  13003. (JSC::JSValue::toPrimitive):
  13004. (JSC::JSValue::getPrimitiveNumber):
  13005. (JSC::JSValue::toNumber):
  13006. (JSC::JSValue::toObject):
  13007. (JSC::JSValue::isFunction):
  13008. (JSC::JSValue::inherits):
  13009. (JSC::JSValue::toThisObject):
  13010. (JSC::JSValue::get):
  13011. (JSC::JSValue::put):
  13012. (JSC::JSValue::putByIndex):
  13013. (JSC::JSValue::structureOrUndefined):
  13014. (JSC::JSValue::equal):
  13015. (JSC::JSValue::equalSlowCaseInline):
  13016. (JSC::JSValue::strictEqualSlowCaseInline):
  13017. (JSC::JSValue::strictEqual):
  13018. * runtime/JSVariableObject.cpp:
  13019. * runtime/JSWithScope.cpp:
  13020. * runtime/JSWrapperObject.cpp:
  13021. * runtime/LiteralParser.cpp:
  13022. * runtime/Lookup.cpp:
  13023. * runtime/NameConstructor.cpp:
  13024. * runtime/NameInstance.cpp:
  13025. * runtime/NamePrototype.cpp:
  13026. * runtime/NativeErrorConstructor.cpp:
  13027. * runtime/NativeErrorPrototype.cpp:
  13028. * runtime/NumberConstructor.cpp:
  13029. * runtime/NumberObject.cpp:
  13030. * runtime/ObjectConstructor.cpp:
  13031. * runtime/ObjectPrototype.cpp:
  13032. * runtime/Operations.h:
  13033. (JSC):
  13034. * runtime/PropertySlot.cpp:
  13035. * runtime/RegExp.cpp:
  13036. * runtime/RegExpCache.cpp:
  13037. * runtime/RegExpCachedResult.cpp:
  13038. * runtime/RegExpConstructor.cpp:
  13039. * runtime/RegExpMatchesArray.cpp:
  13040. * runtime/RegExpObject.cpp:
  13041. * runtime/RegExpPrototype.cpp:
  13042. * runtime/SmallStrings.cpp:
  13043. * runtime/SparseArrayValueMap.cpp:
  13044. * runtime/StrictEvalActivation.cpp:
  13045. * runtime/StringConstructor.cpp:
  13046. * runtime/StringObject.cpp:
  13047. * runtime/StringRecursionChecker.cpp:
  13048. * runtime/Structure.h:
  13049. (JSC):
  13050. * runtime/StructureChain.cpp:
  13051. * runtime/TimeoutChecker.cpp:
  13052. * testRegExp.cpp:
  13053. 2013-01-11 Filip Pizlo <fpizlo@apple.com>
  13054. If you use Phantom to force something to be live across an OSR exit, you should put it after the OSR exit
  13055. https://bugs.webkit.org/show_bug.cgi?id=106724
  13056. Reviewed by Oliver Hunt.
  13057. In cases where we were getting it wrong, I think it was benign because we would either already have an
  13058. OSR exit prior to there, or the operand would be a constant. But still, it's good to get this right.
  13059. * dfg/DFGByteCodeParser.cpp:
  13060. (JSC::DFG::ByteCodeParser::parseBlock):
  13061. 2013-01-11 Filip Pizlo <fpizlo@apple.com>
  13062. Phantom(GetLocal) should be treated as relevant to OSR
  13063. https://bugs.webkit.org/show_bug.cgi?id=106715
  13064. Reviewed by Mark Hahnenberg.
  13065. * dfg/DFGCSEPhase.cpp:
  13066. (JSC::DFG::CSEPhase::performBlockCSE):
  13067. 2013-01-11 Pratik Solanki <psolanki@apple.com>
  13068. Fix function name typo ProgramExecutable::initalizeGlobalProperties()
  13069. https://bugs.webkit.org/show_bug.cgi?id=106701
  13070. Reviewed by Geoffrey Garen.
  13071. * interpreter/Interpreter.cpp:
  13072. (JSC::Interpreter::execute):
  13073. * runtime/Executable.cpp:
  13074. (JSC::ProgramExecutable::initializeGlobalProperties):
  13075. * runtime/Executable.h:
  13076. 2013-01-11 Mark Hahnenberg <mhahnenberg@apple.com>
  13077. testapi is failing with a block-related error in the Objc API
  13078. https://bugs.webkit.org/show_bug.cgi?id=106055
  13079. Reviewed by Filip Pizlo.
  13080. Same bug as in testapi.mm. We need to actually call the static block, rather than casting the block to a bool.
  13081. * API/ObjCCallbackFunction.mm:
  13082. (blockSignatureContainsClass):
  13083. 2013-01-11 Filip Pizlo <fpizlo@apple.com>
  13084. Add a run-time option to print bytecode at DFG compile time
  13085. https://bugs.webkit.org/show_bug.cgi?id=106704
  13086. Reviewed by Mark Hahnenberg.
  13087. * dfg/DFGByteCodeParser.cpp:
  13088. (JSC::DFG::ByteCodeParser::parseCodeBlock):
  13089. * runtime/Options.h:
  13090. (JSC):
  13091. 2013-01-11 Filip Pizlo <fpizlo@apple.com>
  13092. It should be possible to enable verbose printing of each OSR exit at run-time (rather than compile-time) and it should print register state
  13093. https://bugs.webkit.org/show_bug.cgi?id=106700
  13094. Reviewed by Mark Hahnenberg.
  13095. * dfg/DFGAssemblyHelpers.h:
  13096. (DFG):
  13097. (JSC::DFG::AssemblyHelpers::debugCall):
  13098. * dfg/DFGCommon.h:
  13099. * dfg/DFGOSRExit.h:
  13100. (DFG):
  13101. * dfg/DFGOSRExitCompiler32_64.cpp:
  13102. (JSC::DFG::OSRExitCompiler::compileExit):
  13103. * dfg/DFGOSRExitCompiler64.cpp:
  13104. (JSC::DFG::OSRExitCompiler::compileExit):
  13105. * dfg/DFGOperations.cpp:
  13106. * dfg/DFGOperations.h:
  13107. * runtime/Options.h:
  13108. (JSC):
  13109. 2013-01-11 Geoffrey Garen <ggaren@apple.com>
  13110. Removed getDirectLocation and offsetForLocation and all their uses
  13111. https://bugs.webkit.org/show_bug.cgi?id=106692
  13112. Reviewed by Filip Pizlo.
  13113. getDirectLocation() and its associated offsetForLocation() relied on
  13114. detailed knowledge of the rules of PropertyOffset, JSObject, and
  13115. Structure, which is a hard thing to reverse-engineer reliably. Luckily,
  13116. it wasn't needed, and all clients either wanted a true value or a
  13117. PropertyOffset. So, I refactored accordingly.
  13118. * dfg/DFGOperations.cpp: Renamed putDirectOffset to putDirect, to clarify
  13119. that we are not putting an offset.
  13120. * runtime/JSActivation.cpp:
  13121. (JSC::JSActivation::getOwnPropertySlot): Get a value instead of a value
  13122. pointer, since we never wanted a pointer to begin with.
  13123. * runtime/JSFunction.cpp:
  13124. (JSC::JSFunction::getOwnPropertySlot): Use a PropertyOffset instead of a pointer,
  13125. so we don't have to reverse-engineer the offset from the pointer.
  13126. * runtime/JSObject.cpp:
  13127. (JSC::JSObject::put):
  13128. (JSC::JSObject::resetInheritorID):
  13129. (JSC::JSObject::inheritorID):
  13130. (JSC::JSObject::removeDirect):
  13131. (JSC::JSObject::fillGetterPropertySlot):
  13132. (JSC::JSObject::getOwnPropertyDescriptor): Renamed getDirectOffset and
  13133. putDirectOffset, as explaind above. We want to use the name "getDirectOffset"
  13134. for when the thing you're getting is the offset.
  13135. * runtime/JSObject.h:
  13136. (JSC::JSObject::getDirect):
  13137. (JSC::JSObject::getDirectOffset): Changed getDirectLocation to getDirectOffset,
  13138. since clients really wants PropertyOffsets and not locations.
  13139. (JSObject::offsetForLocation): Removed this function because it was hard
  13140. to get right.
  13141. (JSC::JSObject::putDirect):
  13142. (JSC::JSObject::putDirectUndefined):
  13143. (JSC::JSObject::inlineGetOwnPropertySlot):
  13144. (JSC::JSObject::putDirectInternal):
  13145. (JSC::JSObject::putDirectWithoutTransition):
  13146. * runtime/JSScope.cpp:
  13147. (JSC::executeResolveOperations):
  13148. (JSC::JSScope::resolvePut):
  13149. * runtime/JSValue.cpp:
  13150. (JSC::JSValue::putToPrimitive): Updated for renames.
  13151. * runtime/Lookup.cpp:
  13152. (JSC::setUpStaticFunctionSlot): Use a PropertyOffset instead of a pointer,
  13153. so we don't have to reverse-engineer the offset from the pointer.
  13154. * runtime/Structure.cpp:
  13155. (JSC::Structure::flattenDictionaryStructure): Updated for renames.
  13156. 2013-01-11 Geoffrey Garen <ggaren@apple.com>
  13157. Removed an unused version of getDirectLocation
  13158. https://bugs.webkit.org/show_bug.cgi?id=106691
  13159. Reviewed by Gavin Barraclough.
  13160. getDirectLocation is a weird operation. Removing the unused version is
  13161. the easy part.
  13162. * runtime/JSObject.h:
  13163. (JSObject):
  13164. 2013-01-11 Mark Hahnenberg <mhahnenberg@apple.com>
  13165. Objective-C objects that are passed to JavaScript leak (until the JSContext is destroyed)
  13166. https://bugs.webkit.org/show_bug.cgi?id=106056
  13167. Reviewed by Darin Adler.
  13168. * API/APIJSValue.h:
  13169. * API/JSValue.mm: Make the reference to the JSContext strong.
  13170. (-[JSValue context]):
  13171. (-[JSValue initWithValue:inContext:]):
  13172. (-[JSValue dealloc]):
  13173. * API/JSWrapperMap.mm: Make the reference back from wrappers to Obj-C objects weak instead of strong.
  13174. Also add an explicit WeakGCMap in the JSWrapperMap rather than using Obj-C associated object API which
  13175. was causing memory leaks.
  13176. (wrapperClass):
  13177. (-[JSObjCClassInfo wrapperForObject:]):
  13178. (-[JSWrapperMap initWithContext:]):
  13179. (-[JSWrapperMap dealloc]):
  13180. (-[JSWrapperMap wrapperForObject:]):
  13181. 2013-01-11 Geoffrey Garen <ggaren@apple.com>
  13182. Fixed some bogus PropertyOffset ASSERTs
  13183. https://bugs.webkit.org/show_bug.cgi?id=106686
  13184. Reviewed by Gavin Barraclough.
  13185. The ASSERTs were passing a JSType instead of an inlineCapacity, due to
  13186. an incomplete refactoring.
  13187. The compiler didn't catch this because both types are int underneath.
  13188. * runtime/JSObject.h:
  13189. (JSC::JSObject::getDirect):
  13190. (JSC::JSObject::getDirectLocation):
  13191. (JSC::JSObject::offsetForLocation):
  13192. * runtime/Structure.cpp:
  13193. (JSC::Structure::addPropertyTransitionToExistingStructure): Validate against
  13194. our inline capacity, as we intended.
  13195. 2013-01-11 Geoffrey Garen <ggaren@apple.com>
  13196. Rename propertyOffsetFor => offsetForPropertyNumber
  13197. https://bugs.webkit.org/show_bug.cgi?id=106685
  13198. Reviewed by Gavin Barraclough.
  13199. Since the argument is just a typedef and not an object, I wanted to clarify the meaning.
  13200. * runtime/PropertyMapHashTable.h:
  13201. (JSC::PropertyTable::nextOffset): Updated for rename.
  13202. * runtime/PropertyOffset.h:
  13203. (JSC::offsetForPropertyNumber): Renamed. Also changed some PropertyOffset variables
  13204. to plain ints, because they're not actually on the PropertyOffsets number line.
  13205. * runtime/Structure.cpp:
  13206. (JSC::Structure::flattenDictionaryStructure):
  13207. * runtime/Structure.h:
  13208. (JSC::Structure::lastValidOffset): Updated for rename.
  13209. 2013-01-10 Zan Dobersek <zandobersek@gmail.com>
  13210. Remove the ENABLE_ANIMATION_API feature define occurences
  13211. https://bugs.webkit.org/show_bug.cgi?id=106544
  13212. Reviewed by Simon Fraser.
  13213. The Animation API code was removed in r137243. The ENABLE_ANIMATION_API
  13214. feature define handling still lingers in various build systems and configurations
  13215. but is of no use, so it should be removed.
  13216. * Configurations/FeatureDefines.xcconfig:
  13217. 2013-01-09 Roger Fong <roger_fong@apple.com>
  13218. Unreviewed. Just move the JavaScriptCore exports file around in the vcproj to make things clearer.
  13219. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  13220. 2013-01-09 Filip Pizlo <fpizlo@apple.com>
  13221. Dont use a node reference after appending to the graph.
  13222. https://bugs.webkit.org/show_bug.cgi?id=103305
  13223. <rdar://problem/12753096>
  13224. Reviewed by Mark Hahnenberg.
  13225. * dfg/DFGArgumentsSimplificationPhase.cpp:
  13226. (JSC::DFG::ArgumentsSimplificationPhase::run):
  13227. 2013-01-09 Roger Fong <roger_fong@apple.com>
  13228. Rename export files to make them more easily findable.
  13229. https://bugs.webkit.org/show_bug.cgi?id=98695.
  13230. Reviewed by Timothy Horton.
  13231. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed.
  13232. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  13233. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  13234. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def.
  13235. 2013-01-09 Carlos Garcia Campos <cgarcia@igalia.com>
  13236. Unreviewed. Fix make distcheck.
  13237. * GNUmakefile.list.am: Add mips.rb to offlineasm_nosources.
  13238. 2013-01-08 Oliver Hunt <oliver@apple.com>
  13239. Support op_typeof in the DFG
  13240. https://bugs.webkit.org/show_bug.cgi?id=98898
  13241. Reviewed by Filip Pizlo.
  13242. Adds a TypeOf node to the DFG to support op_typeof.
  13243. To avoid adding too much GC horror, this also makes the
  13244. common strings portion of the SmallString cache strongly
  13245. referenced.
  13246. * dfg/DFGAbstractState.cpp:
  13247. (JSC::DFG::AbstractState::execute):
  13248. We try to determine the result early here, and substitute in a constant.
  13249. Otherwise we leave the node intact, and set the result type to SpecString.
  13250. * dfg/DFGByteCodeParser.cpp:
  13251. (JSC::DFG::ByteCodeParser::parseBlock):
  13252. Parse op_typeof
  13253. * dfg/DFGCSEPhase.cpp:
  13254. (JSC::DFG::CSEPhase::performNodeCSE):
  13255. TypeOf nodes can be subjected to pure CSE
  13256. * dfg/DFGCapabilities.h:
  13257. (JSC::DFG::canCompileOpcode):
  13258. We can handle typeof.
  13259. * dfg/DFGNodeType.h:
  13260. (DFG):
  13261. Define the node.
  13262. * dfg/DFGOperations.cpp:
  13263. * dfg/DFGOperations.h:
  13264. Add operationTypeOf to support the non-trivial cases.
  13265. * dfg/DFGPredictionPropagationPhase.cpp:
  13266. (JSC::DFG::PredictionPropagationPhase::propagate):
  13267. * dfg/DFGSpeculativeJIT32_64.cpp:
  13268. (JSC::DFG::SpeculativeJIT::compile):
  13269. * dfg/DFGSpeculativeJIT64.cpp:
  13270. (JSC::DFG::SpeculativeJIT::compile):
  13271. Actual codegen
  13272. * runtime/Operations.cpp:
  13273. (JSC::jsTypeStringForValue):
  13274. (JSC):
  13275. * runtime/Operations.h:
  13276. (JSC):
  13277. Some refactoring to allow us to get the type string for an
  13278. object without needing a callframe.
  13279. 2013-01-08 Filip Pizlo <fpizlo@apple.com>
  13280. DFG shouldn't treat the 'this' argument as being captured if a code block uses arguments
  13281. https://bugs.webkit.org/show_bug.cgi?id=106398
  13282. <rdar://problem/12439776>
  13283. Reviewed by Mark Hahnenberg.
  13284. This is a possible optimization for inlined calls, and fixes crashes for inlined constructors, in the case
  13285. that the inlined code used arguments. The problem was that assuming that 'this' was captured implies the
  13286. assumption that it was initialized by the caller, which is wrong for constructors and this.
  13287. Also added a pretty essential DFG IR validation rule: we shouldn't have any live locals at the top of the
  13288. root block. This helps to catch this bug: our assumption that 'this' was captured in an inlined constructor
  13289. that used arguments led to liveness for the temporary that would have held 'this' in the caller being
  13290. propagated all the way up to the entrypoint of the function.
  13291. * bytecode/CodeBlock.h:
  13292. (JSC::CodeBlock::isCaptured):
  13293. * dfg/DFGValidate.cpp:
  13294. (JSC::DFG::Validate::validate):
  13295. (JSC::DFG::Validate::reportValidationContext):
  13296. (Validate):
  13297. (JSC::DFG::Validate::dumpGraphIfAppropriate):
  13298. 2013-01-08 Filip Pizlo <fpizlo@apple.com>
  13299. REGRESSION (r138921): Crash in JSC::Arguments::create
  13300. https://bugs.webkit.org/show_bug.cgi?id=106329
  13301. <rdar://problem/12974196>
  13302. Reviewed by Mark Hahnenberg.
  13303. Arguments::finishCreation() that takes an InlineCallFrame* needs to understand that the callee can
  13304. be unset, indicating that the callee needs to be loaded from the true call frame. This adds a
  13305. method to InlineCallFrame to do just that.
  13306. * bytecode/CodeOrigin.cpp:
  13307. (JSC::InlineCallFrame::calleeForCallFrame):
  13308. * bytecode/CodeOrigin.h:
  13309. (InlineCallFrame):
  13310. * runtime/Arguments.h:
  13311. (JSC::Arguments::finishCreation):
  13312. 2013-01-08 Filip Pizlo <fpizlo@apple.com>
  13313. DFG initrinsic handling should ensure that we backwards propagate the fact that all operands may escape
  13314. https://bugs.webkit.org/show_bug.cgi?id=106365
  13315. Reviewed by Mark Hahnenberg.
  13316. Use the fact that Phantom means that things escaped, and just insert Phantoms for all
  13317. of the operands.
  13318. * dfg/DFGByteCodeParser.cpp:
  13319. (JSC::DFG::ByteCodeParser::handleCall):
  13320. 2013-01-08 Filip Pizlo <fpizlo@apple.com>
  13321. If array allocation profiling causes a new_array to allocate double arrays, then the holes should end up being correctly initialized
  13322. https://bugs.webkit.org/show_bug.cgi?id=106363
  13323. Reviewed by Mark Hahnenberg.
  13324. * runtime/JSArray.h:
  13325. (JSC::JSArray::tryCreateUninitialized):
  13326. 2013-01-07 Filip Pizlo <fpizlo@apple.com>
  13327. DFG should backwards-propagate NodeUsedAsValue for Phantom
  13328. https://bugs.webkit.org/show_bug.cgi?id=106299
  13329. Reviewed by Mark Hahnenberg.
  13330. This is currently benign because Phantom is only inserted by the bytecode parser for
  13331. things that already happen to be used in contexts that backwards propagate
  13332. NodeUsedAsValue. But that doesn't change the fact that the semantics of Phantom are
  13333. that the value can be arbitrarily used by the baseline JIT.
  13334. * dfg/DFGPredictionPropagationPhase.cpp:
  13335. (JSC::DFG::PredictionPropagationPhase::propagate):
  13336. 2013-01-07 Filip Pizlo <fpizlo@apple.com>
  13337. Rationalize closure call heuristics and profiling
  13338. https://bugs.webkit.org/show_bug.cgi?id=106270
  13339. Reviewed by Oliver Hunt.
  13340. Did a number of things:
  13341. - CallLinkInfo now remembers if it was ever a closure call, and CallLinkStatus uses
  13342. this. Reduces the likelihood that we will inline a closure call as if it was a
  13343. normal call.
  13344. - Made InlineCallFrame print inferred function names, and refactored
  13345. CodeBlock::inferredName() to better use FunctionExecutable's API.
  13346. - Made bytecode dumping print frequent exit sites that led to recompilation.
  13347. - Made bytecode dumping for op_call and op_construct print what the CallLinkStatus
  13348. saw.
  13349. * bytecode/CallLinkInfo.h:
  13350. (JSC::CallLinkInfo::CallLinkInfo):
  13351. (CallLinkInfo):
  13352. * bytecode/CallLinkStatus.cpp:
  13353. (JSC::CallLinkStatus::computeFor):
  13354. * bytecode/CodeBlock.cpp:
  13355. (JSC::CodeBlock::inferredName):
  13356. (JSC::CodeBlock::dumpBytecodeCommentAndNewLine):
  13357. (JSC::CodeBlock::printCallOp):
  13358. * bytecode/CodeOrigin.cpp:
  13359. (JSC::CodeOrigin::dump):
  13360. (JSC::InlineCallFrame::inferredName):
  13361. (JSC):
  13362. (JSC::InlineCallFrame::dumpBriefFunctionInformation):
  13363. (JSC::InlineCallFrame::dump):
  13364. * bytecode/CodeOrigin.h:
  13365. (InlineCallFrame):
  13366. * bytecode/DFGExitProfile.cpp:
  13367. (JSC::DFG::ExitProfile::exitSitesFor):
  13368. (DFG):
  13369. * bytecode/DFGExitProfile.h:
  13370. (ExitProfile):
  13371. * jit/JITStubs.cpp:
  13372. (JSC::DEFINE_STUB_FUNCTION):
  13373. 2013-01-07 Ryosuke Niwa <rniwa@webkit.org>
  13374. Sorted the xcodeproj file.
  13375. * JavaScriptCore.xcodeproj/project.pbxproj:
  13376. 2013-01-07 Filip Pizlo <fpizlo@apple.com>
  13377. Unreviewed, it should be possible to build JSC on ARM.
  13378. * API/JSBase.h:
  13379. * jit/JITStubs.cpp:
  13380. (JSC::performPlatformSpecificJITAssertions):
  13381. (JSC):
  13382. * jit/JITStubs.h:
  13383. (JSC):
  13384. * jit/JITThunks.cpp:
  13385. (JSC::JITThunks::JITThunks):
  13386. * jit/JITThunks.h:
  13387. (JITThunks):
  13388. * offlineasm/armv7.rb:
  13389. * runtime/JSGlobalData.cpp:
  13390. (JSC::JSGlobalData::JSGlobalData):
  13391. 2013-01-07 Balazs Kilvady <kilvadyb@homejinni.com>
  13392. MIPS LLInt implementation.
  13393. https://bugs.webkit.org/show_bug.cgi?id=99706
  13394. Reviewed by Filip Pizlo.
  13395. LLInt implementation for MIPS.
  13396. * assembler/MacroAssemblerMIPS.h:
  13397. (JSC::MacroAssemblerMIPS::jump):
  13398. * dfg/DFGOperations.cpp:
  13399. (JSC):
  13400. * jit/JITStubs.cpp:
  13401. (JSC):
  13402. * jit/JITStubs.h:
  13403. (JITStackFrame):
  13404. * llint/LLIntOfflineAsmConfig.h:
  13405. * llint/LowLevelInterpreter.asm:
  13406. * llint/LowLevelInterpreter32_64.asm:
  13407. * offlineasm/backends.rb:
  13408. * offlineasm/instructions.rb:
  13409. * offlineasm/mips.rb: Added.
  13410. 2013-01-07 Mark Hahnenberg <mhahnenberg@apple.com>
  13411. testapi is failing with a block-related error in the Objc API
  13412. https://bugs.webkit.org/show_bug.cgi?id=106055
  13413. Reviewed by Geoffrey Garen.
  13414. Casting a block to a bool will always return true, which isn't the behavior that is intended here.
  13415. Instead we need to call the block, but C semantics don't allow this, so we need to change
  13416. testapi.m to be Objective-C++ and therefore testapi.mm.
  13417. * API/tests/testapi.m: Removed.
  13418. * API/tests/testapi.mm: Copied from Source/JavaScriptCore/API/tests/testapi.m.
  13419. (blockSignatureContainsClass):
  13420. * JavaScriptCore.xcodeproj/project.pbxproj:
  13421. 2013-01-06 Filip Pizlo <fpizlo@apple.com>
  13422. Simplify slow case profiling
  13423. https://bugs.webkit.org/show_bug.cgi?id=106208
  13424. Reviewed by Mark Rowe.
  13425. Removing the minimum execution ratio portion of slow case profiling, which allows
  13426. the removal of a field from CodeBlock. This appears to be performance neutral,
  13427. implying that the complexity incurred by the previous heuristic was purely
  13428. harmful: it made the code more complicated, and it made CodeBlock larger, without
  13429. resulting in any measurable benefits.
  13430. * bytecode/CodeBlock.cpp:
  13431. (JSC::CodeBlock::CodeBlock):
  13432. * bytecode/CodeBlock.h:
  13433. (JSC::CodeBlock::likelyToTakeSlowCase):
  13434. (JSC::CodeBlock::couldTakeSlowCase):
  13435. (JSC::CodeBlock::likelyToTakeSpecialFastCase):
  13436. (JSC::CodeBlock::couldTakeSpecialFastCase):
  13437. (JSC::CodeBlock::likelyToTakeDeepestSlowCase):
  13438. (JSC::CodeBlock::likelyToTakeAnySlowCase):
  13439. * jit/JIT.cpp:
  13440. (JSC::JIT::privateCompile):
  13441. * runtime/Options.h:
  13442. 2013-01-05 Filip Pizlo <fpizlo@apple.com>
  13443. DFG should inline closure calls
  13444. https://bugs.webkit.org/show_bug.cgi?id=106067
  13445. Reviewed by Gavin Barraclough.
  13446. This adds initial support for inlining closure calls to the DFG. A call is considered
  13447. to be a closure call when the JSFunction* varies, but always has the same executable.
  13448. We already have closure call inline caching in both JITs, which works by checking that
  13449. the callee has an expected structure (as a cheap way of detecting that it is in fact
  13450. a JSFunction) and an expected executable. Closure call inlining uses profiling data
  13451. aggregated by CallLinkStatus to decide when to specialize the call to the particular
  13452. structure/executable, and inline the call rather than emitting a call sequence. When
  13453. we choose to do a closure inline rather than an ordinary inline, a number of things
  13454. change about how inlining is performed:
  13455. - The inline is guarded by a CheckStructure/CheckExecutable rather than a
  13456. CheckFunction.
  13457. - Instead of propagating a constant value for the scope, we emit GetMyScope every time
  13458. that the scope is needed, which loads the scope from a local variable. We do similar
  13459. things for the callee.
  13460. - The prologue of the inlined code includes SetMyScope and SetCallee nodes to eagerly
  13461. plant the scope and callee into the "true call frame", i.e. the place on the stack
  13462. where the call frame would have been if the call had been actually performed. This
  13463. allows GetMyScope/GetCallee to work as they would if the code wasn't inlined. It
  13464. also allows for trivial handling of scope and callee for call frame reconstruction
  13465. upon stack introspection and during OSR.
  13466. - A new node called GetScope is introduced, which just gets the scope of a function.
  13467. This node has the expected CSE support. This allows for the
  13468. SetMyScope(GetScope(@function)) sequence to set up the scope in the true call frame.
  13469. - GetMyScope/GetCallee CSE can match against SetMyScope/SetCallee, which means that
  13470. the GetMyScope/GetCallee nodes emitted during parsing are often removed during CSE,
  13471. if we can prove that it is safe to do so.
  13472. - Inlining heuristics are adjusted to grok the cost of inlining a closure. We are
  13473. less likely to inline a closure call than we are to inline a normal call, since we
  13474. end up emitting more code for closures due to CheckStructure, CheckExecutable,
  13475. GetScope, SetMyScope, and SetCallee.
  13476. Additionally, I've fixed the VariableEventStream to ensure that we don't attempt to
  13477. plant Undefined into the true call frames. This was previously a harmless oversight,
  13478. but it becomes quite bad if OSR is relying on the scope/callee already having been
  13479. set and not subsequently clobbered by the OSR itself.
  13480. This is a ~60% speed-up on programs that frequently make calls to closures. It's
  13481. neutral on V8v7 and other major benchmark suites.
  13482. The lack of a definite speed-up is likely due the fact that closure inlining currently
  13483. does not do any cardinality [1] optimizations. We don't observe when a closure was
  13484. constructed within its caller, and so used the scope from its caller; and furthermore
  13485. we have no facility to detect when the scope is single. All scoped variable accesses
  13486. are assumed to be multiple instead. A subsequent step will be to ensure that closure
  13487. call inlining will be single and loving it.
  13488. [1] Single and loving it: Must-alias analysis for higher-order languages. Suresh
  13489. Jagannathan, Peter Thiemann, Stephen Weeks, and Andrew Wright. In POPL '98.
  13490. * bytecode/CallLinkStatus.cpp:
  13491. (JSC::CallLinkStatus::dump):
  13492. * bytecode/CallLinkStatus.h:
  13493. (JSC::CallLinkStatus::isClosureCall):
  13494. (CallLinkStatus):
  13495. * bytecode/CodeBlock.cpp:
  13496. (JSC::CodeBlock::globalObjectFor):
  13497. (JSC):
  13498. * bytecode/CodeBlock.h:
  13499. (CodeBlock):
  13500. * bytecode/CodeOrigin.cpp:
  13501. (JSC::InlineCallFrame::dump):
  13502. * dfg/DFGAbstractState.cpp:
  13503. (JSC::DFG::AbstractState::execute):
  13504. * dfg/DFGByteCodeParser.cpp:
  13505. (ByteCodeParser):
  13506. (JSC::DFG::ByteCodeParser::handleCall):
  13507. (JSC::DFG::ByteCodeParser::emitFunctionChecks):
  13508. (JSC::DFG::ByteCodeParser::handleInlining):
  13509. * dfg/DFGCSEPhase.cpp:
  13510. (JSC::DFG::CSEPhase::pureCSE):
  13511. (CSEPhase):
  13512. (JSC::DFG::CSEPhase::getCalleeLoadElimination):
  13513. (JSC::DFG::CSEPhase::checkExecutableElimination):
  13514. (JSC::DFG::CSEPhase::getMyScopeLoadElimination):
  13515. (JSC::DFG::CSEPhase::performNodeCSE):
  13516. * dfg/DFGCapabilities.cpp:
  13517. (JSC::DFG::mightInlineFunctionForClosureCall):
  13518. * dfg/DFGCapabilities.h:
  13519. (DFG):
  13520. (JSC::DFG::mightInlineFunctionForClosureCall):
  13521. (JSC::DFG::canInlineFunctionForClosureCall):
  13522. (JSC::DFG::canInlineFunctionFor):
  13523. * dfg/DFGNode.h:
  13524. (Node):
  13525. (JSC::DFG::Node::hasExecutable):
  13526. (JSC::DFG::Node::executable):
  13527. * dfg/DFGNodeType.h:
  13528. (DFG):
  13529. * dfg/DFGPredictionPropagationPhase.cpp:
  13530. (JSC::DFG::PredictionPropagationPhase::propagate):
  13531. * dfg/DFGSpeculativeJIT32_64.cpp:
  13532. (JSC::DFG::SpeculativeJIT::compile):
  13533. * dfg/DFGSpeculativeJIT64.cpp:
  13534. (JSC::DFG::SpeculativeJIT::compile):
  13535. * dfg/DFGVariableEventStream.cpp:
  13536. (JSC::DFG::VariableEventStream::reconstruct):
  13537. * runtime/Options.h:
  13538. (JSC):
  13539. 2013-01-05 Filip Pizlo <fpizlo@apple.com>
  13540. Data flow paths that carry non-numbers, non-undefined, non-null values should not cause subtractions and arithmetic additions (i.e. ++) to speculate double
  13541. https://bugs.webkit.org/show_bug.cgi?id=106190
  13542. Reviewed by Sam Weinig.
  13543. The problem is that the DFG logic for deciding when to speculate integer was
  13544. confusing the special case of ValueAdd (where non-numeric values should cause us
  13545. to not speculate integer, because we want to fall off into the generic case) with
  13546. the more normal case of ArithAdd and ArithSub (where we want to speculate integer
  13547. unless we have evidence that the operands are doubles, since the DFG doesn't have
  13548. generic handling of non-numeric arithmetic). Prior to this change doing a - b where
  13549. either a or b were possibly non-numeric would always force the subtraction to be
  13550. done using doubles.
  13551. * dfg/DFGGraph.h:
  13552. (JSC::DFG::Graph::addSpeculationMode):
  13553. (Graph):
  13554. (JSC::DFG::Graph::valueAddSpeculationMode):
  13555. (JSC::DFG::Graph::arithAddSpeculationMode):
  13556. (JSC::DFG::Graph::addImmediateShouldSpeculateInteger):
  13557. 2013-01-04 Filip Pizlo <fpizlo@apple.com>
  13558. DFG should trust array profiling over value profiling
  13559. https://bugs.webkit.org/show_bug.cgi?id=106155
  13560. Reviewed by Gavin Barraclough.
  13561. The real problem is that prediction propagation is not flow-sensitive. We had code
  13562. like:
  13563. var a = (some load from memory); // returns either an array or false
  13564. if (a)
  13565. a[i] = v;
  13566. Because 'a' could be 'false', we were emitting a fully generic unoptimized PutByVal.
  13567. This patch changes ArrayMode to ignore the type of the base of an array access, if
  13568. array profiling tells us that the array access can be optimized.
  13569. In the future, we could probably make this work even better with some flow
  13570. sensitivity in the prediction propagator, but I also tend to think that this is a
  13571. more robust overall solution. If we ever did want to support array accesses on
  13572. array-or-false then we should change the array profiler to be able to tell us that
  13573. this is what is going on.
  13574. 3.7% speed-up on V8/earley.
  13575. * dfg/DFGArrayMode.cpp:
  13576. (JSC::DFG::ArrayMode::refine):
  13577. 2013-01-04 Filip Pizlo <fpizlo@apple.com>
  13578. Rationalize exit site profiling for calls
  13579. https://bugs.webkit.org/show_bug.cgi?id=106150
  13580. Reviewed by Sam Weinig.
  13581. This adds two new exit kinds for calls: BadFunction and BadExecutable. The latter is not used
  13582. yet, but is already integrated with profiling. CheckFunction uses a BadFunction speculation
  13583. instead of BadCache, now. This allows CallLinkStatus to turn itself into a closure call status
  13584. if we had a BadFunction exit site but the CallLinkInfo told us to use a non-closure call. This
  13585. might happen if we had call unlinking that led to information loss along the way.
  13586. No performance impact. This is meant as another step towards inlining closure calls.
  13587. * bytecode/CallLinkStatus.cpp:
  13588. * bytecode/CallLinkStatus.h:
  13589. (JSC::CallLinkStatus::setIsProved):
  13590. (JSC::CallLinkStatus::setHasBadFunctionExitSite):
  13591. (CallLinkStatus):
  13592. (JSC::CallLinkStatus::setHasBadCacheExitSite):
  13593. (JSC::CallLinkStatus::setHasBadExecutableExitSite):
  13594. * bytecode/ExitKind.cpp:
  13595. (JSC::exitKindToString):
  13596. * bytecode/ExitKind.h:
  13597. * dfg/DFGByteCodeParser.cpp:
  13598. (JSC::DFG::ByteCodeParser::handleCall):
  13599. * dfg/DFGSpeculativeJIT32_64.cpp:
  13600. (JSC::DFG::SpeculativeJIT::compile):
  13601. * dfg/DFGSpeculativeJIT64.cpp:
  13602. (JSC::DFG::SpeculativeJIT::compile):
  13603. 2013-01-03 Filip Pizlo <fpizlo@apple.com>
  13604. DFG should not elide CheckStructure if it's needed to perform a cell check
  13605. https://bugs.webkit.org/show_bug.cgi?id=106074
  13606. Reviewed by Ryosuke Niwa.
  13607. The problem here was that the constant folding phase was misinterpreting the meaning of the sets
  13608. in DFG::AbstractValue. AbstractValue describes a constraint on the values that a variable (i.e.
  13609. a DFG Node, or a virtual register, i.e. local or argument) may have. It does so by containing
  13610. four sets: the set of JSValues (either empty, the singleton set containing one JSValue, or the
  13611. set of all JSValues); the set of "current known" structures, i.e. the set of structures that you
  13612. already know that this value may have right now (also either empty, the singleton set, or the set
  13613. of all structures); the set of "future possible" structures, i.e. the set of structures that this
  13614. value could have in the future if none of the structure transition watchpoints for those
  13615. structures had fired (also empty, singleton, or all); and the set of types, which is a
  13616. SpeculatedType bitmask. The correct way to interpret the sets is to think of the AbstractValue as
  13617. the intersection of these three sets of values:
  13618. - The set of JSValues that have a type that belongs to the m_type set.
  13619. - If m_value is not the empty value then: the set of all JSValues that are == m_value;
  13620. else: the set of all JSValues.
  13621. where '==' is as defined by JSValue::operator==.
  13622. - Union of { the set of all cells that have a structure that belongs to m_currentKnownStructure }
  13623. and { the set of all JSValues that are not cells }.
  13624. You can then further intersect this set with the following set, if you guard the code with
  13625. watchpoints on all structures in the m_futurePossibleStructure:
  13626. - Union of { the set of all cells that have a structure that belongs to m_futurePossibleStructure }
  13627. and { the set of all JSValues that are not cells }.
  13628. One way to think of this is that m_currentKnownStructure is filtered by m_futurePossibleStructure
  13629. (i.e. is set to the intersection of m_currentKnownStructure and m_futurePossibleStructure), if the
  13630. code for which you're doing this is always preceded by watchpoints on all structures in
  13631. m_futurePossibleStructure, and is always before any side-effects that could change the structures
  13632. of objects.
  13633. The incorrect optimization related to CheckStructure. CheckStructure checks that the value is a
  13634. cell, and that it has a particular structure. It was incorrectly assuming that you could eliminate
  13635. the CheckStructure, if m_currentKnownStructure contained the structure that CheckStructure was
  13636. checking. But this is not the case, since m_currentKnownStructure does not prove that the value is
  13637. a cell with a particular structure; it only proves that if the value was a cell then it would have
  13638. a particular structure. Hence, to eliminate CheckStructure, it is also necessary to check that
  13639. AbstractValue::m_type contains only cells (i.e. isCellSpeculation(m_type) == true).
  13640. It wasn't doing that, and this changes makes sure that it does do that.
  13641. * dfg/DFGConstantFoldingPhase.cpp:
  13642. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  13643. 2013-01-04 Adam Klein <adamk@chromium.org>
  13644. Remove ENABLE_MUTATION_OBSERVERS #define
  13645. https://bugs.webkit.org/show_bug.cgi?id=105459
  13646. Reviewed by Ryosuke Niwa.
  13647. * Configurations/FeatureDefines.xcconfig:
  13648. 2013-01-03 Filip Pizlo <fpizlo@apple.com>
  13649. DFG::ByteCodeCache serves little or no purpose ever since we decided to keep bytecode around permanently
  13650. https://bugs.webkit.org/show_bug.cgi?id=106058
  13651. Reviewed by Michael Saboff.
  13652. All baseline code blocks now always have bytecode, so the bytecode cache's ability to minimize the
  13653. number of times that the DFG produces bytecode sequences for code blocks is superfluous.
  13654. * GNUmakefile.list.am:
  13655. * JavaScriptCore.xcodeproj/project.pbxproj:
  13656. * dfg/DFGByteCodeCache.h: Removed.
  13657. * dfg/DFGByteCodeParser.cpp:
  13658. (ByteCodeParser):
  13659. (JSC::DFG::ByteCodeParser::handleInlining):
  13660. * runtime/Executable.cpp:
  13661. (JSC):
  13662. * runtime/Executable.h:
  13663. (FunctionExecutable):
  13664. 2013-01-03 Filip Pizlo <fpizlo@apple.com>
  13665. Unreviewed, fix build for DFG JIT disabled.
  13666. * bytecode/CodeBlock.cpp:
  13667. (JSC::CodeBlock::dumpValueProfiling):
  13668. (JSC::CodeBlock::dumpArrayProfiling):
  13669. * runtime/Executable.cpp:
  13670. (JSC):
  13671. (JSC::ExecutableBase::intrinsic):
  13672. 2013-01-03 Filip Pizlo <fpizlo@apple.com>
  13673. CallLinkStatus should be aware of closure calls, and the DFG bytecode parser should use that as its sole internal notion of how to optimize calls
  13674. https://bugs.webkit.org/show_bug.cgi?id=106027
  13675. Reviewed by Mark Hahnenberg.
  13676. Previously, the DFG bytecode parser had its own internal notion of exactly what CallLinkStatus was
  13677. meant to do, in the form of a CallType, expectedFunction, intrinsic, etc. This change makes CallLinkStatus
  13678. smart enough to do all of that, and also gives it the ability to understand closure calls.
  13679. * bytecode/CallLinkStatus.cpp:
  13680. (JSC::CallLinkStatus::CallLinkStatus):
  13681. (JSC):
  13682. (JSC::CallLinkStatus::function):
  13683. (JSC::CallLinkStatus::internalFunction):
  13684. (JSC::CallLinkStatus::intrinsicFor):
  13685. (JSC::CallLinkStatus::setIsProved):
  13686. (JSC::CallLinkStatus::computeFromLLInt):
  13687. (JSC::CallLinkStatus::computeFor):
  13688. (JSC::CallLinkStatus::dump):
  13689. * bytecode/CallLinkStatus.h:
  13690. (JSC):
  13691. (JSC::CallLinkStatus::CallLinkStatus):
  13692. (CallLinkStatus):
  13693. (JSC::CallLinkStatus::takesSlowPath):
  13694. (JSC::CallLinkStatus::isSet):
  13695. (JSC::CallLinkStatus::isClosureCall):
  13696. (JSC::CallLinkStatus::callTarget):
  13697. (JSC::CallLinkStatus::executable):
  13698. (JSC::CallLinkStatus::structure):
  13699. (JSC::CallLinkStatus::isProved):
  13700. (JSC::CallLinkStatus::canOptimize):
  13701. * dfg/DFGByteCodeParser.cpp:
  13702. (JSC::DFG::ByteCodeParser::handleCall):
  13703. * dfg/DFGGraph.h:
  13704. (JSC::DFG::Graph::valueOfFunctionConstant):
  13705. 2013-01-02 Simon Hausmann <simon.hausmann@digia.com>
  13706. [MinGW-w64] Centralize workaround for pow() implementation
  13707. https://bugs.webkit.org/show_bug.cgi?id=105925
  13708. Reviewed by Sam Weinig.
  13709. As suggested by Sam, move the MinGW-w64 workaround into MathExtras.h
  13710. away from the JSC usage.
  13711. * runtime/MathObject.cpp:
  13712. (JSC::mathPow):
  13713. 2013-01-02 Gavin Barraclough <barraclough@apple.com>
  13714. Objective-C API for JavaScriptCore
  13715. https://bugs.webkit.org/show_bug.cgi?id=105889
  13716. Reviewed by Geoff Garen.
  13717. Fixes for more issues raised by Darin.
  13718. * API/JSBlockAdaptor.mm:
  13719. (BlockArgument):
  13720. (BlockArgumentStruct::BlockArgumentStruct):
  13721. (BlockArgumentTypeDelegate::typeStruct):
  13722. (BlockResult):
  13723. (BlockResultStruct::BlockResultStruct):
  13724. (buildBlockSignature):
  13725. (-[JSBlockAdaptor initWithBlockSignatureFromProtocol:]):
  13726. (-[JSBlockAdaptor blockFromValue:inContext:withException:]):
  13727. - fix * position for Objective-C types
  13728. * API/JSContext.h:
  13729. - fix * position for Objective-C types
  13730. * API/JSContext.mm:
  13731. (-[JSContext initWithVirtualMachine:]):
  13732. (-[JSContext virtualMachine]):
  13733. (contextInternalContext):
  13734. - fix * position for Objective-C types
  13735. (-[JSContext dealloc]):
  13736. (-[JSContext protect:]):
  13737. (-[JSContext unprotect:]):
  13738. - HashMap<JSValueRef, size_t> -> HashCountedSet<JSValueRef>
  13739. * API/JSContextInternal.h:
  13740. (WeakContextRef):
  13741. - fix * position for Objective-C types
  13742. * API/JSValue.mm:
  13743. (valueToString):
  13744. - fix * position for Objective-C types
  13745. (isNSBoolean):
  13746. - Added helper to check for booleans.
  13747. (objectToValueWithoutCopy):
  13748. - Added contextRef
  13749. - fix * position for Objective-C types
  13750. - Remove @YES, @NO literal usage, use isNSBoolean instead
  13751. (objectToValue):
  13752. - Added contextRef
  13753. (+[JSValue valueWithValue:inContext:]):
  13754. (-[JSValue initWithValue:inContext:]):
  13755. - fix * position for Objective-C types
  13756. (createStructHandlerMap):
  13757. (handerForStructTag):
  13758. - getStructTagHandler -> handerForStructTag
  13759. - Split out createStructHandlerMap
  13760. - strncmp -> memcmp
  13761. - String(type).impl() -> StringImpl::create(type)
  13762. (+[JSValue selectorForStructToValue:]):
  13763. (+[JSValue selectorForValueToStruct:]):
  13764. - getStructTagHandler -> handerForStructTag
  13765. (typeToValueInvocationFor):
  13766. (valueToTypeInvocationFor):
  13767. - fix * position for Objective-C types
  13768. * API/JSValueInternal.h:
  13769. - fix * position for Objective-C types
  13770. * API/JSVirtualMachineInternal.h:
  13771. - fix * position for Objective-C types
  13772. * API/JSWrapperMap.h:
  13773. - fix * position for Objective-C types
  13774. * API/JSWrapperMap.mm:
  13775. (selectorToPropertyName):
  13776. (createObjectWithCustomBrand):
  13777. (createRenameMap):
  13778. (putNonEnumerable):
  13779. (copyMethodsToObject):
  13780. (copyPrototypeProperties):
  13781. (-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]):
  13782. (-[JSWrapperMap initWithContext:]):
  13783. (-[JSWrapperMap wrapperForObject:]):
  13784. (getJSExportProtocol):
  13785. - fix * position for Objective-C types
  13786. * API/ObjCCallbackFunction.h:
  13787. - fix * position for Objective-C types
  13788. * API/ObjCCallbackFunction.mm:
  13789. (CallbackArgument):
  13790. (CallbackArgumentStruct::CallbackArgumentStruct):
  13791. - fix * position for Objective-C types
  13792. (CallbackArgumentBlockCallback::createAdoptingJSBlockAdaptor):
  13793. - Added to make adopt explicit
  13794. (CallbackArgumentBlockCallback):
  13795. (CallbackArgumentBlockCallback::CallbackArgumentBlockCallback):
  13796. (ArgumentTypeDelegate::typeBlock):
  13797. - Call createAdoptingJSBlockAdaptor
  13798. (ArgumentTypeDelegate::typeStruct):
  13799. (CallbackResult):
  13800. (CallbackResultStruct::CallbackResultStruct):
  13801. (ResultTypeDelegate::typeStruct):
  13802. (ObjCCallbackFunction::ObjCCallbackFunction):
  13803. (ObjCCallbackFunction::context):
  13804. (objCCallbackFunctionForInvocation):
  13805. (objCCallbackFunctionForMethod):
  13806. (objCCallbackFunctionForBlock):
  13807. - fix * position for Objective-C types
  13808. * API/ObjcRuntimeExtras.h:
  13809. (protocolImplementsProtocol):
  13810. (forEachProtocolImplementingProtocol):
  13811. (forEachMethodInProtocol):
  13812. (forEachPropertyInProtocol):
  13813. - fix * position for Objective-C types
  13814. * API/tests/testapi.m:
  13815. (-[TestObject testArgumentTypesWithInt:double:boolean:string:number:array:dictionary:]):
  13816. (testObjectiveCAPI):
  13817. - fix * position for Objective-C types
  13818. 2013-01-02 Geoffrey Garen <ggaren@apple.com>
  13819. Some renaming in the CodeCache
  13820. https://bugs.webkit.org/show_bug.cgi?id=105966
  13821. Reviewed by Gavin Barraclough.
  13822. CodeBlockKey => SourceCodeKey because the key is not a CodeBlock.
  13823. m_recentlyUsedFunctionCode => m_recentlyUsedFunctions to match other names.
  13824. GlobalFunctionKey => FunctionKey because the key is not unique to globalness.
  13825. m_cachedGlobalFunctions => m_globalFunctions because "cached" is redundant
  13826. for data members in an object called "CodeCache".
  13827. kMaxRootCodeBlockEntries => kMaxRootEntries because there are no non-CodeBlock
  13828. entries in a CodeBlock cache.
  13829. kMaxFunctionCodeBlocks => kMaxChildFunctionEntries to clarify that this
  13830. number models a parent-child relationship.
  13831. Also removed the initial "k" from enum constants. That's an interesting
  13832. style for calling out constants, but it's not the WebKit style.
  13833. Finally, a behavior change: Use MaxRootEntries for the limit on global
  13834. functions, and not MaxChildFunctionEntries. Previously, there was an
  13835. unused constant that seemed to have been intended for this purpose.
  13836. * runtime/CodeCache.cpp:
  13837. (JSC::CodeCache::makeSourceCodeKey):
  13838. (JSC::CodeCache::getCodeBlock):
  13839. (JSC::CodeCache::generateFunctionCodeBlock):
  13840. (JSC::CodeCache::makeFunctionKey):
  13841. (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
  13842. (JSC::CodeCache::usedFunctionCode):
  13843. * runtime/CodeCache.h:
  13844. (JSC::CodeCache::clear):
  13845. 2013-01-02 Filip Pizlo <fpizlo@apple.com>
  13846. DFG inlining machinery should be robust against the inline callee varying while the executable stays the same
  13847. https://bugs.webkit.org/show_bug.cgi?id=105953
  13848. Reviewed by Mark Hahnenberg.
  13849. This institutes the policy that if InlineCallFrame::callee is null, then the callee and scope have already
  13850. been stored into the true call frame (i.e. the place where the call frame of the inlined call would have
  13851. been) and so any attempt to access the callee or scope should do a load instead of assuming that the value
  13852. is constant. This wires the changes through the bytecode parser, the stack scanning logic, and the compiler
  13853. optimization phases and backends.
  13854. * bytecode/CodeOrigin.cpp:
  13855. (JSC::InlineCallFrame::dump):
  13856. * bytecode/CodeOrigin.h:
  13857. (CodeOrigin):
  13858. (InlineCallFrame):
  13859. (JSC::InlineCallFrame::isClosureCall):
  13860. (JSC::CodeOrigin::stackOffset):
  13861. (JSC):
  13862. * dfg/DFGAssemblyHelpers.h:
  13863. * dfg/DFGByteCodeParser.cpp:
  13864. (JSC::DFG::ByteCodeParser::get):
  13865. (InlineStackEntry):
  13866. (JSC::DFG::ByteCodeParser::getScope):
  13867. (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
  13868. * dfg/DFGCSEPhase.cpp:
  13869. (CSEPhase):
  13870. (JSC::DFG::CSEPhase::genericPureCSE):
  13871. (JSC::DFG::CSEPhase::pureCSE):
  13872. (JSC::DFG::CSEPhase::pureCSERequiringSameInlineCallFrame):
  13873. (JSC::DFG::CSEPhase::getMyScopeLoadElimination):
  13874. (JSC::DFG::CSEPhase::performNodeCSE):
  13875. * dfg/DFGOSRExitCompiler32_64.cpp:
  13876. (JSC::DFG::OSRExitCompiler::compileExit):
  13877. * dfg/DFGOSRExitCompiler64.cpp:
  13878. (JSC::DFG::OSRExitCompiler::compileExit):
  13879. * dfg/DFGSpeculativeJIT32_64.cpp:
  13880. (JSC::DFG::SpeculativeJIT::compile):
  13881. * dfg/DFGSpeculativeJIT64.cpp:
  13882. (JSC::DFG::SpeculativeJIT::compile):
  13883. * interpreter/CallFrame.cpp:
  13884. (JSC::CallFrame::trueCallFrame):
  13885. 2013-01-02 Gavin Barraclough <barraclough@apple.com>
  13886. Objective-C API for JavaScriptCore
  13887. https://bugs.webkit.org/show_bug.cgi?id=105889
  13888. Reviewed by Geoff Garen.
  13889. Fixes for a number of issues raised by Darin.
  13890. * API/APIJSValue.h:
  13891. - Fix typos in comment
  13892. - Add newline before NS_CLASS_AVAILABLE(10_9, NA)
  13893. - cls -> expectedClass
  13894. - key type for -setObject:forKeyedSubscript: is now NSObject <NSCopying> *
  13895. * API/JSBase.h:
  13896. - JS_OBJC_API_ENABLED no longer implies __OBJC__
  13897. * API/JSBlockAdaptor.mm:
  13898. (BlockArgumentStruct::BlockArgumentStruct):
  13899. (BlockArgumentStruct):
  13900. - mark virtual functions as virtual, override, and private
  13901. - refactor out buffer allocation for struct types
  13902. (BlockArgumentTypeDelegate::typeVoid):
  13903. (BlockArgumentTypeDelegate::typeBlock):
  13904. (BlockArgumentTypeDelegate::typeStruct):
  13905. - return nil -> return 0
  13906. (BlockResultStruct::BlockResultStruct):
  13907. (BlockResultStruct):
  13908. - mark virtual functions as virtual, override, and private
  13909. - refactor out buffer allocation for struct types
  13910. (buildBlockSignature):
  13911. - %lu is not an appropriate format specifier for NSInteger
  13912. (-[JSBlockAdaptor initWithBlockSignatureFromProtocol:]):
  13913. - nil check [super init]
  13914. (-[JSBlockAdaptor blockMatchesSignature:]):
  13915. (-[JSBlockAdaptor blockFromValue:inContext:withException:]):
  13916. - ctx -> contextRef
  13917. * API/JSContext.h:
  13918. - Fix typos in comment
  13919. - Add newline before NS_CLASS_AVAILABLE(10_9, NA)
  13920. - key type for -setObject:forKeyedSubscript: is now NSObject <NSCopying> *
  13921. * API/JSContext.mm:
  13922. (-[JSContext initWithVirtualMachine:]):
  13923. - nil check [super init]
  13924. (+[JSContext currentArguments]):
  13925. - args -> argumentArray
  13926. (-[JSContext setObject:forKeyedSubscript:]):
  13927. - key type for -setObject:forKeyedSubscript: is now NSObject <NSCopying> *
  13928. (-[JSContext dealloc]):
  13929. (-[JSContext protect:]):
  13930. (-[JSContext unprotect:]):
  13931. - m_protected -> m_protectCounts
  13932. * API/JSValue.mm:
  13933. (-[JSValue toObjectOfClass:]):
  13934. - cls -> expectedClass
  13935. (-[JSValue toBool]):
  13936. (-[JSValue deleteProperty:]):
  13937. (-[JSValue hasProperty:]):
  13938. (-[JSValue isUndefined]):
  13939. (-[JSValue isNull]):
  13940. (-[JSValue isBoolean]):
  13941. (-[JSValue isNumber]):
  13942. (-[JSValue isString]):
  13943. (-[JSValue isObject]):
  13944. (-[JSValue isEqualToObject:]):
  13945. (-[JSValue isEqualWithTypeCoercionToObject:]):
  13946. (-[JSValue isInstanceOf:]):
  13947. - removed ? YES : NO
  13948. (-[JSValue callWithArguments:]):
  13949. (-[JSValue constructWithArguments:]):
  13950. (-[JSValue invokeMethod:withArguments:]):
  13951. - args -> argumentArray
  13952. (+[JSValue valueWithPoint:inContext:]):
  13953. (+[JSValue valueWithRange:inContext:]):
  13954. (+[JSValue valueWithRect:inContext:]):
  13955. (+[JSValue valueWithSize:inContext:]):
  13956. - [NSNumber numberWithFloat:] -> @()
  13957. (-[JSValue objectForKeyedSubscript:]):
  13958. (-[JSValue setObject:forKeyedSubscript:]):
  13959. - key type for -setObject:forKeyedSubscript: is now NSObject <NSCopying> *
  13960. (JSContainerConvertor):
  13961. (JSContainerConvertor::isWorkListEmpty):
  13962. (JSContainerConvertor::convert):
  13963. (ObjcContainerConvertor):
  13964. (ObjcContainerConvertor::isWorkListEmpty):
  13965. - remove WTF::
  13966. - isWorkListEmpty is const
  13967. (objectToValue):
  13968. - use fast enumeration
  13969. (-[JSValue initWithValue:inContext:]):
  13970. - nil check [super init]
  13971. (getStructTagHandler):
  13972. - m_structHandlers -> structHandlers
  13973. * API/JSVirtualMachine.h:
  13974. - Add newline before NS_CLASS_AVAILABLE(10_9, NA)
  13975. * API/JSVirtualMachine.mm:
  13976. (-[JSVirtualMachine init]):
  13977. - nil check [super init]
  13978. * API/JSWrapperMap.mm:
  13979. (selectorToPropertyName):
  13980. (copyPrototypeProperties):
  13981. - remove WTF::
  13982. - use static_cast
  13983. (-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]):
  13984. (-[JSWrapperMap initWithContext:]):
  13985. - nil check [super init]
  13986. (-[JSWrapperMap wrapperForObject:]):
  13987. (tryUnwrapObjcObject):
  13988. - enable ASSERT
  13989. (getJSExportProtocol):
  13990. (getNSBlockClass):
  13991. - remove if check on initializing static
  13992. * API/JavaScriptCore.h:
  13993. - JS_OBJC_API_ENABLED no longer implies __OBJC__
  13994. * API/ObjCCallbackFunction.mm:
  13995. (CallbackArgumentOfClass):
  13996. (CallbackArgumentOfClass::~CallbackArgumentOfClass):
  13997. (CallbackArgumentStruct::CallbackArgumentStruct):
  13998. (CallbackArgumentStruct):
  13999. (CallbackArgumentBlockCallback):
  14000. - mark virtual functions as virtual, override, and private
  14001. - refactor out buffer allocation for struct types
  14002. (ArgumentTypeDelegate::typeVoid):
  14003. (ArgumentTypeDelegate::typeOfClass):
  14004. (ArgumentTypeDelegate::typeStruct):
  14005. - return nil -> return 0
  14006. (CallbackResultStruct::CallbackResultStruct):
  14007. (CallbackResultStruct):
  14008. - mark virtual functions as virtual, override, and private
  14009. - refactor out buffer allocation for struct types
  14010. (ResultTypeDelegate::typeStruct):
  14011. - return nil -> return 0
  14012. (ObjCCallbackFunction):
  14013. - remove WTF::
  14014. (objCCallbackFunctionFinalize):
  14015. - use static_cast
  14016. (objCCallbackFunctionCallAsFunction):
  14017. - Fix typos in comment
  14018. (createObjCCallbackFunctionClass):
  14019. (objCCallbackFunctionClass):
  14020. - Split out createObjCCallbackFunctionClass from objCCallbackFunctionClass
  14021. (ObjCCallbackFunction::call):
  14022. - ctx -> contextRef
  14023. (blockSignatureContainsClass):
  14024. - Remove tri-state enum.
  14025. (skipNumber):
  14026. - isdigit -> isASCIIDigit
  14027. (objCCallbackFunctionForInvocation):
  14028. - clean up & comment blockSignatureContainsClass() usage
  14029. (tryUnwrapBlock):
  14030. - use static_cast
  14031. * API/ObjcRuntimeExtras.h:
  14032. (forEachProtocolImplementingProtocol):
  14033. (forEachMethodInClass):
  14034. (forEachMethodInProtocol):
  14035. (forEachPropertyInProtocol):
  14036. - Remove WTF::
  14037. - Remove if (count) checks
  14038. (skipPair):
  14039. - NSUInteger -> size_t
  14040. (StringRange):
  14041. (StringRange::operator const char*):
  14042. (StringRange::get):
  14043. (StructBuffer):
  14044. (StructBuffer::StructBuffer):
  14045. (StructBuffer::~StructBuffer):
  14046. (StructBuffer::operator void*):
  14047. - Added helper for creating an aligned buffer, used by struct conversion invocations.
  14048. (parseObjCType):
  14049. - *(position++) -> *position++
  14050. * API/tests/testapi.c:
  14051. - PLATFORM(MAC) -> JS_OBJC_API_ENABLED
  14052. * API/tests/testapi.m:
  14053. (blockSignatureContainsClass):
  14054. - Remove tri-state enum.
  14055. (testObjectiveCAPI):
  14056. - Added more result type checks.
  14057. 2013-01-02 Filip Pizlo <fpizlo@apple.com>
  14058. DFG should not use the InlineCallFrame's callee when it could have used the executable istead
  14059. https://bugs.webkit.org/show_bug.cgi?id=105947
  14060. Reviewed by Mark Hahnenberg.
  14061. We shouldn't use the callee to get the executable when we have the executable already. Not only
  14062. does this make the logic more clear, but it also allows for a world where the executable is known
  14063. but the callee isn't.
  14064. * dfg/DFGAssemblyHelpers.h:
  14065. (JSC::DFG::AssemblyHelpers::strictModeFor):
  14066. 2013-01-02 Filip Pizlo <fpizlo@apple.com>
  14067. DFG inliner should not use the callee's bytecode variable for resolving references to the callee in inlined code
  14068. https://bugs.webkit.org/show_bug.cgi?id=105938
  14069. Reviewed by Mark Hahnenberg.
  14070. This simplifies a bunch of code for referring to the callee. It also ought to simplify how we do
  14071. closure call inlining: for inlined closure call frames we will simply require that the callee is
  14072. already stashed on the stack in the Callee slot in the inline call frame header.
  14073. * dfg/DFGByteCodeParser.cpp:
  14074. (ByteCodeParser):
  14075. (JSC::DFG::ByteCodeParser::getDirect):
  14076. (JSC::DFG::ByteCodeParser::get):
  14077. (InlineStackEntry):
  14078. (JSC::DFG::ByteCodeParser::InlineStackEntry::remapOperand):
  14079. (JSC::DFG::ByteCodeParser::handleCall):
  14080. (JSC::DFG::ByteCodeParser::handleInlining):
  14081. (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
  14082. (JSC::DFG::ByteCodeParser::parse):
  14083. 2013-01-02 Ryosuke Niwa <rniwa@webkit.org>
  14084. Another Windows port build fix attempt. Try not exporting this symbol from JSC
  14085. since it's also compiled in WebCore.
  14086. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  14087. 2013-01-02 Csaba Osztrogonác <ossy@webkit.org>
  14088. One more unreviewed buildfix after r138609.
  14089. * jit/JITCall.cpp: Add a missing include.
  14090. 2013-01-02 Csaba Osztrogonác <ossy@webkit.org>
  14091. Unreviewed buildfix after r138609.
  14092. * jit/JITCall32_64.cpp: Add a missing include.
  14093. 2013-01-01 Filip Pizlo <fpizlo@apple.com>
  14094. Baseline JIT should have closure call caching
  14095. https://bugs.webkit.org/show_bug.cgi?id=105900
  14096. Reviewed by Gavin Barraclough.
  14097. This is not a speed-up by itself, but is meant to allow the DFG inliner to
  14098. accurately discern between closure calls and non-closure calls, so that it can
  14099. do closure call inlining in the future.
  14100. * bytecode/CallLinkStatus.cpp:
  14101. (JSC::CallLinkStatus::computeFromLLInt):
  14102. (JSC::CallLinkStatus::computeFor):
  14103. * bytecode/CallLinkStatus.h:
  14104. (JSC::CallLinkStatus::CallLinkStatus):
  14105. (JSC::CallLinkStatus::isClosureCall):
  14106. (CallLinkStatus):
  14107. * dfg/DFGByteCodeParser.cpp:
  14108. (JSC::DFG::ByteCodeParser::handleCall):
  14109. * jit/JIT.cpp:
  14110. (JSC::JIT::linkFor):
  14111. (JSC::JIT::linkSlowCall):
  14112. * jit/JIT.h:
  14113. (JSC::JIT::compileClosureCall):
  14114. * jit/JITCall.cpp:
  14115. (JSC::JIT::privateCompileClosureCall):
  14116. * jit/JITCall32_64.cpp:
  14117. (JSC::JIT::privateCompileClosureCall):
  14118. * jit/JITStubs.cpp:
  14119. (JSC::DEFINE_STUB_FUNCTION):
  14120. * jit/JITStubs.h:
  14121. * jit/ThunkGenerators.cpp:
  14122. (JSC::linkClosureCallGenerator):
  14123. * jit/ThunkGenerators.h:
  14124. 2013-01-01 Dan Bernstein <mitz@apple.com>
  14125. <rdar://problem/12942239> Update copyright strings
  14126. Reviewed by Sam Weinig.
  14127. * Info.plist:
  14128. 2012-12-31 Gavin Barraclough <barraclough@apple.com>
  14129. Objective-C API for JavaScriptCore
  14130. https://bugs.webkit.org/show_bug.cgi?id=105889
  14131. Reviewed by Filip Pizlo.
  14132. For a detailed description of the API implemented here, see:
  14133. JSContext.h
  14134. APIJSValue.h
  14135. JSVirtualMachine.h
  14136. JSExport.h
  14137. Still to do -
  14138. (1) Shoud rename APIJSValue.h -> JSValue.h (but we'll have to rename JSValue.h first).
  14139. (2) Numerous FIXMEs, all with separate bugs filed.
  14140. * API/APIJSValue.h: Added.
  14141. - this Objective-C class is used to reference a JavaScript object.
  14142. * API/JSBase.h:
  14143. - added JS_OBJC_API_ENABLED macro to control ObjC API support.
  14144. * API/JSBlockAdaptor.h: Added.
  14145. - this Objective-C class is used in creating a special NSBlock proxying a JavaScript function.
  14146. * API/JSBlockAdaptor.mm: Added.
  14147. (BlockArgument):
  14148. (BlockArgument::~BlockArgument):
  14149. (BlockArgumentBoolean):
  14150. (BlockArgumentBoolean::get):
  14151. (BlockArgumentNumeric):
  14152. (BlockArgumentNumeric::get):
  14153. (BlockArgumentId):
  14154. (BlockArgumentId::get):
  14155. (BlockArgumentStruct):
  14156. (BlockArgumentStruct::BlockArgumentStruct):
  14157. (BlockArgumentStruct::~BlockArgumentStruct):
  14158. (BlockArgumentStruct::get):
  14159. - decoded arguent type information of a JSBlockAdaptor.
  14160. (BlockArgumentTypeDelegate):
  14161. (BlockArgumentTypeDelegate::typeInteger):
  14162. (BlockArgumentTypeDelegate::typeDouble):
  14163. (BlockArgumentTypeDelegate::typeBool):
  14164. (BlockArgumentTypeDelegate::typeVoid):
  14165. (BlockArgumentTypeDelegate::typeId):
  14166. (BlockArgumentTypeDelegate::typeOfClass):
  14167. (BlockArgumentTypeDelegate::typeBlock):
  14168. (BlockArgumentTypeDelegate::typeStruct):
  14169. - delegate for use in conjunction with parseObjCType.
  14170. (BlockResult):
  14171. (BlockResult::~BlockResult):
  14172. (BlockResultVoid):
  14173. (BlockResultVoid::set):
  14174. (BlockResultInteger):
  14175. (BlockResultInteger::set):
  14176. (BlockResultDouble):
  14177. (BlockResultDouble::set):
  14178. (BlockResultBoolean):
  14179. (BlockResultBoolean::set):
  14180. (BlockResultStruct):
  14181. (BlockResultStruct::BlockResultStruct):
  14182. (BlockResultStruct::~BlockResultStruct):
  14183. (BlockResultStruct::set):
  14184. - decoded result type information of a JSBlockAdaptor.
  14185. (buildBlockSignature):
  14186. - partial step in constructing a signature with stack offset information from one without.
  14187. (-[JSBlockAdaptor initWithBlockSignatureFromProtocol:]):
  14188. - constructor.
  14189. (-[JSBlockAdaptor blockMatchesSignature:]):
  14190. - check whether signature strings match, where only one contains stack frame offsets.
  14191. (-[JSBlockAdaptor blockFromValue:inContext:withException:]):
  14192. - use the adaptor to create a special forwarding block.
  14193. * API/JSCallbackObjectFunctions.h:
  14194. (JSC::::inherits):
  14195. - add missing braces to multiline for statement.
  14196. * API/JSContext.h: Added.
  14197. - this Objective-C class is used to reference a JavaScript context.
  14198. * API/JSContext.mm: Added.
  14199. (-[JSContext init]):
  14200. - constructor.
  14201. (-[JSContext initWithVirtualMachine:]):
  14202. - construct in a given VM (JSGlobalData).
  14203. (-[JSContext evaluateScript:]):
  14204. (-[JSContext globalObject]):
  14205. - evaluate a script, global object accessor.
  14206. (+[JSContext currentContext]):
  14207. (+[JSContext currentThis]):
  14208. (+[JSContext currentArguments]):
  14209. - These methods obtain context, this, arguments from within a callback.
  14210. (-[JSContext virtualMachine]):
  14211. - implementation for .virtualMachine property.
  14212. (-[JSContext objectForKeyedSubscript:]):
  14213. (-[JSContext setObject:forKeyedSubscript:]):
  14214. - support for subscript property access.
  14215. (contextInternalContext):
  14216. - internal accessor to m_context.
  14217. (-[JSContext dealloc]):
  14218. - desctructor.
  14219. (-[JSContext notifyException:]):
  14220. (-[JSContext valueFromNotifyException:]):
  14221. (-[JSContext boolFromNotifyException:]):
  14222. - internal method to record an exception was thrown.
  14223. (-[JSContext beginCallbackWithData:thisValue:argumentCount:arguments:]):
  14224. (-[JSContext endCallbackWithData:]):
  14225. - internal methods to push/pop a callback record.
  14226. (-[JSContext protect:]):
  14227. (-[JSContext unprotect:]):
  14228. - internal methods to add a value to a protect set (used to protect the internal property of JSValue).
  14229. (-[JSContext wrapperForObject:]):
  14230. - internal method to create a wrapper object.
  14231. (WeakContextRef::WeakContextRef):
  14232. (WeakContextRef::~WeakContextRef):
  14233. (WeakContextRef::get):
  14234. (WeakContextRef::set):
  14235. - Helper class to implement a weak reference to a JSContext.
  14236. * API/JSContextInternal.h: Added.
  14237. (CallbackData):
  14238. (WeakContextRef):
  14239. - see API/JSContext.mm for description of internal methods.
  14240. * API/JSExport.h: Added.
  14241. - Provides JSExport protocol & JSExportAs macro.
  14242. * API/JSValue.mm: Added.
  14243. (+[JSValue valueWithObject:inContext:]):
  14244. (+[JSValue valueWithBool:inContext:]):
  14245. (+[JSValue valueWithDouble:inContext:]):
  14246. (+[JSValue valueWithInt32:inContext:]):
  14247. (+[JSValue valueWithUInt32:inContext:]):
  14248. (+[JSValue valueWithNewObjectInContext:]):
  14249. (+[JSValue valueWithNewArrayInContext:]):
  14250. (+[JSValue valueWithNewRegularExpressionFromPattern:flags:inContext:]):
  14251. (+[JSValue valueWithNewErrorFromMessage:inContext:]):
  14252. (+[JSValue valueWithNullInContext:]):
  14253. (+[JSValue valueWithUndefinedInContext:]):
  14254. - Constructors.
  14255. (-[JSValue toObject]):
  14256. (-[JSValue toObjectOfClass:]):
  14257. (-[JSValue toBool]):
  14258. (-[JSValue toDouble]):
  14259. (-[JSValue toInt32]):
  14260. (-[JSValue toUInt32]):
  14261. (-[JSValue toNumber]):
  14262. (-[JSValue toString]):
  14263. (-[JSValue toDate]):
  14264. (-[JSValue toArray]):
  14265. (-[JSValue toDictionary]):
  14266. - Conversion to Objective-C types.
  14267. (-[JSValue valueForProperty:]):
  14268. (-[JSValue setValue:forProperty:]):
  14269. (-[JSValue deleteProperty:]):
  14270. (-[JSValue hasProperty:]):
  14271. (-[JSValue defineProperty:descriptor:]):
  14272. - Property access by property name.
  14273. (-[JSValue valueAtIndex:]):
  14274. (-[JSValue setValue:atIndex:]):
  14275. - Property access by index.
  14276. (-[JSValue isUndefined]):
  14277. (-[JSValue isNull]):
  14278. (-[JSValue isBoolean]):
  14279. (-[JSValue isNumber]):
  14280. (-[JSValue isString]):
  14281. (-[JSValue isObject]):
  14282. - Test JavaScript type.
  14283. (-[JSValue isEqualToObject:]):
  14284. (-[JSValue isEqualWithTypeCoercionToObject:]):
  14285. (-[JSValue isInstanceOf:]):
  14286. - ===, ==, instanceof operators.
  14287. (-[JSValue callWithArguments:]):
  14288. (-[JSValue constructWithArguments:]):
  14289. (-[JSValue invokeMethod:withArguments:]):
  14290. - Call & construct.
  14291. (-[JSValue context]):
  14292. - implementation for .context property.
  14293. (-[JSValue toPoint]):
  14294. (-[JSValue toRange]):
  14295. (-[JSValue toRect]):
  14296. (-[JSValue toSize]):
  14297. (+[JSValue valueWithPoint:inContext:]):
  14298. (+[JSValue valueWithRange:inContext:]):
  14299. (+[JSValue valueWithRect:inContext:]):
  14300. (+[JSValue valueWithSize:inContext:]):
  14301. - Support for NS struct types.
  14302. (-[JSValue objectForKeyedSubscript:]):
  14303. (-[JSValue objectAtIndexedSubscript:]):
  14304. (-[JSValue setObject:forKeyedSubscript:]):
  14305. (-[JSValue setObject:atIndexedSubscript:]):
  14306. - support for subscript property access.
  14307. (isDate):
  14308. (isArray):
  14309. - internal helper functions to check for instances of JS Date, Array types.
  14310. (JSContainerConvertor):
  14311. (Task):
  14312. (JSContainerConvertor::JSContainerConvertor):
  14313. (JSContainerConvertor::isWorkListEmpty):
  14314. (JSContainerConvertor::convert):
  14315. (JSContainerConvertor::add):
  14316. (JSContainerConvertor::take):
  14317. - helper class for tracking state while converting to Array/Dictionary objects.
  14318. (valueToObjectWithoutCopy):
  14319. (containerValueToObject):
  14320. (valueToObject):
  14321. (valueToNumber):
  14322. (valueToString):
  14323. (valueToDate):
  14324. (valueToArray):
  14325. (valueToDictionary):
  14326. - function for converting JavaScript values to Objective-C objects.
  14327. (ObjcContainerConvertor):
  14328. (ObjcContainerConvertor::ObjcContainerConvertor):
  14329. (ObjcContainerConvertor::isWorkListEmpty):
  14330. (ObjcContainerConvertor::convert):
  14331. (ObjcContainerConvertor::add):
  14332. (ObjcContainerConvertor::take):
  14333. - helper class for tracking state while converting to Array/Dictionary values.
  14334. (objectToValueWithoutCopy):
  14335. (objectToValue):
  14336. (valueInternalValue):
  14337. - function for converting Objective-C objects to JavaScript values.
  14338. (+[JSValue valueWithValue:inContext:]):
  14339. (-[JSValue initWithValue:inContext:]):
  14340. - internal constructors.
  14341. (StructTagHandler):
  14342. (getStructTagHandler):
  14343. (+[JSValue selectorForStructToValue:]):
  14344. (+[JSValue selectorForValueToStruct:]):
  14345. - methods to tracking struct types that support conversion to/from JSValue.
  14346. (-[JSValue dealloc]):
  14347. - destructor.
  14348. (-[JSValue description]):
  14349. - Objective-C to-NSString conversion.
  14350. (typeToValueInvocationFor):
  14351. (valueToTypeInvocationFor):
  14352. - create invocation objects for conversion to/from JSValue.
  14353. * API/JSValueInternal.h: Added.
  14354. - see API/JSValue.mm for description of internal methods.
  14355. * API/JSVirtualMachine.h: Added.
  14356. - this Objective-C class is used to reference a JavaScript virtual machine (JSGlobalData).
  14357. * API/JSVirtualMachine.mm: Added.
  14358. (-[JSVirtualMachine init]):
  14359. (-[JSVirtualMachine dealloc]):
  14360. - constructor & destructor.
  14361. (getGroupFromVirtualMachine):
  14362. - internal accessor for m_group property.
  14363. * API/JSVirtualMachineInternal.h: Added.
  14364. - see API/JSVirtualMachine.mm for description of internal methods.
  14365. * API/JSWrapperMap.h: Added.
  14366. * API/JSWrapperMap.mm: Added.
  14367. (wrapperClass):
  14368. - singleton root for detction (& unwrapping) of wrapper objects.
  14369. (selectorToPropertyName):
  14370. - default selector to property name conversion.
  14371. (createObjectWithCustomBrand):
  14372. - creates a JSObject with a custom NativeBrand (class name).
  14373. (createRenameMap):
  14374. - parse @optional properties of a JSExport protocol.
  14375. (putNonEnumerable):
  14376. - property put with enumerable=false.
  14377. (copyMethodsToObject):
  14378. - iterate methods in a protocol; add functions to a JSObject.
  14379. (parsePropertyAttributes):
  14380. - examine protocol property metadata.
  14381. (makeSetterName):
  14382. - "foo" -> "setFoo"
  14383. (copyPrototypeProperties):
  14384. - create properties on a Protocol object reflecting the instance methods & properties of a protocol.
  14385. (-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]):
  14386. (-[JSObjCClassInfo dealloc]):
  14387. (-[JSObjCClassInfo wrapperForObject:]):
  14388. (-[JSObjCClassInfo constructor]):
  14389. - cache the Protocol/Constructor objects for an Objective-C type.
  14390. (-[JSWrapperMap initWithContext:]):
  14391. (-[JSWrapperMap dealloc]):
  14392. - constructor & desctructor.
  14393. (-[JSWrapperMap classInfoForClass:]):
  14394. - maps Class -> JSObjCClassInfo.
  14395. (-[JSWrapperMap wrapperForObject:]):
  14396. - cretae or retrieve a cached wrapper value for an object.
  14397. (tryUnwrapObjcObject):
  14398. - check whether a value is a wrapper object; unwrap if so.
  14399. * API/JavaScriptCore.h:
  14400. - Added includes for new API headers.
  14401. * API/ObjCCallbackFunction.h: Added.
  14402. - this class is used to wrap Objective-C instance methods, class methods & blocks as JSFunction objects.
  14403. * API/ObjCCallbackFunction.mm: Added.
  14404. (CallbackArgument):
  14405. (CallbackArgument::~CallbackArgument):
  14406. (CallbackArgumentBoolean):
  14407. (CallbackArgumentBoolean::set):
  14408. (CallbackArgumentInteger):
  14409. (CallbackArgumentInteger::set):
  14410. (CallbackArgumentDouble):
  14411. (CallbackArgumentDouble::set):
  14412. (CallbackArgumentJSValue):
  14413. (CallbackArgumentJSValue::set):
  14414. (CallbackArgumentId):
  14415. (CallbackArgumentId::set):
  14416. (CallbackArgumentOfClass):
  14417. (CallbackArgumentOfClass::CallbackArgumentOfClass):
  14418. (CallbackArgumentOfClass::~CallbackArgumentOfClass):
  14419. (CallbackArgumentOfClass::set):
  14420. (CallbackArgumentNSNumber):
  14421. (CallbackArgumentNSNumber::set):
  14422. (CallbackArgumentNSString):
  14423. (CallbackArgumentNSString::set):
  14424. (CallbackArgumentNSDate):
  14425. (CallbackArgumentNSDate::set):
  14426. (CallbackArgumentNSArray):
  14427. (CallbackArgumentNSArray::set):
  14428. (CallbackArgumentNSDictionary):
  14429. (CallbackArgumentNSDictionary::set):
  14430. (CallbackArgumentStruct):
  14431. (CallbackArgumentStruct::CallbackArgumentStruct):
  14432. (CallbackArgumentStruct::~CallbackArgumentStruct):
  14433. (CallbackArgumentStruct::set):
  14434. (CallbackArgumentBlockCallback):
  14435. (CallbackArgumentBlockCallback::CallbackArgumentBlockCallback):
  14436. (CallbackArgumentBlockCallback::~CallbackArgumentBlockCallback):
  14437. (CallbackArgumentBlockCallback::set):
  14438. - decoded arguent type information of a ObjCCallbackFunction.
  14439. (ArgumentTypeDelegate):
  14440. (ArgumentTypeDelegate::typeInteger):
  14441. (ArgumentTypeDelegate::typeDouble):
  14442. (ArgumentTypeDelegate::typeBool):
  14443. (ArgumentTypeDelegate::typeVoid):
  14444. (ArgumentTypeDelegate::typeId):
  14445. (ArgumentTypeDelegate::typeOfClass):
  14446. (ArgumentTypeDelegate::typeBlock):
  14447. (ArgumentTypeDelegate::typeStruct):
  14448. - delegate for use in conjunction with parseObjCType.
  14449. (CallbackResult):
  14450. (CallbackResult::~CallbackResult):
  14451. (CallbackResultVoid):
  14452. (CallbackResultVoid::get):
  14453. (CallbackResultId):
  14454. (CallbackResultId::get):
  14455. (CallbackResultNumeric):
  14456. (CallbackResultNumeric::get):
  14457. (CallbackResultBoolean):
  14458. (CallbackResultBoolean::get):
  14459. (CallbackResultStruct):
  14460. (CallbackResultStruct::CallbackResultStruct):
  14461. (CallbackResultStruct::~CallbackResultStruct):
  14462. (CallbackResultStruct::get):
  14463. - decoded result type information of a ObjCCallbackFunction.
  14464. (ResultTypeDelegate):
  14465. (ResultTypeDelegate::typeInteger):
  14466. (ResultTypeDelegate::typeDouble):
  14467. (ResultTypeDelegate::typeBool):
  14468. (ResultTypeDelegate::typeVoid):
  14469. (ResultTypeDelegate::typeId):
  14470. (ResultTypeDelegate::typeOfClass):
  14471. (ResultTypeDelegate::typeBlock):
  14472. (ResultTypeDelegate::typeStruct):
  14473. - delegate for use in conjunction with parseObjCType.
  14474. (ObjCCallbackFunction):
  14475. (ObjCCallbackFunction::ObjCCallbackFunction):
  14476. (ObjCCallbackFunction::~ObjCCallbackFunction):
  14477. - constructor & destructor.
  14478. (ObjCCallbackFunction::context):
  14479. - accessor.
  14480. (ObjCCallbackFunction::wrappedBlock):
  14481. - attemmpt to unwrap a block object.
  14482. (objCCallbackFunctionFinalize):
  14483. (objCCallbackFunctionCallAsFunction):
  14484. (objCCallbackFunctionClass):
  14485. - JSClassRef used to represent ObjCCallbackFunction objects.
  14486. (ObjCCallbackFunction::call):
  14487. (blockSignatureContainsClass):
  14488. - helper function to determine if we're running on a recent Clang.
  14489. (skipNumber):
  14490. - helper used in parsing signature strings.
  14491. (objCCallbackFunctionForInvocation):
  14492. (objCCallbackFunctionForMethod):
  14493. (objCCallbackFunctionForBlock):
  14494. - functions to try to create ObjCCallbackFunction instances for methods/blocks.
  14495. (tryUnwrapBlock):
  14496. - attemmpt to unwrap a block object.
  14497. * API/ObjcRuntimeExtras.h: Added.
  14498. (protocolImplementsProtocol):
  14499. (forEachProtocolImplementingProtocol):
  14500. (forEachMethodInClass):
  14501. (forEachMethodInProtocol):
  14502. (forEachPropertyInProtocol):
  14503. - functions used in reflecting on Objective-C types.
  14504. (skipPair):
  14505. - parsing helper used by parseObjCType, scans for matching parentheses.
  14506. (StringRange):
  14507. (StringRange::StringRange):
  14508. (StringRange::~StringRange):
  14509. (StringRange::operator const char*):
  14510. (StringRange::get):
  14511. - Helper class - create a c string copy of a range of an existing string.
  14512. (parseObjCType):
  14513. - function to parse Objective-C type strings, makes callbacks to a deleagte.
  14514. * API/tests/testapi.c:
  14515. (main):
  14516. - added call to testObjectiveCAPI (in testapi.m).
  14517. * API/tests/testapi.m: Added.
  14518. (+[ParentObject parentTest]):
  14519. (+[TestObject testObject]):
  14520. (+[TestObject classTest]):
  14521. (-[TestObject getString]):
  14522. (-[TestObject testArgumentTypesWithInt:double:boolean:string:number:array:dictionary:]):
  14523. (-[TestObject callback:]):
  14524. (-[TextXYZ test:]):
  14525. - test object, used in various test vases.
  14526. (checkResult):
  14527. - helper function.
  14528. (blockSignatureContainsClass):
  14529. - helper function to determine if we're running on a recent Clang.
  14530. (testObjectiveCAPI):
  14531. - new test cases.
  14532. * JavaScriptCore.xcodeproj/project.pbxproj:
  14533. - added new files.
  14534. * runtime/JSGlobalData.cpp:
  14535. (JSC::JSGlobalData::JSGlobalData):
  14536. * runtime/JSGlobalData.h:
  14537. (JSGlobalData):
  14538. - added m_apiData - provide convenient storage for use by the API.
  14539. * runtime/JSGlobalObject.cpp:
  14540. (JSC::JSGlobalObject::JSGlobalObject):
  14541. * runtime/JSGlobalObject.h:
  14542. (JSGlobalObject):
  14543. - added m_apiData - provide convenient storage for use by the API.
  14544. 2012-12-27 Csaba Osztrogonác <ossy@webkit.org>
  14545. One more unreviwed holiday MIPS and SH4 buildfixes after r138516.
  14546. * jit/ThunkGenerators.cpp:
  14547. 2012-12-27 Csaba Osztrogonác <ossy@webkit.org>
  14548. Unreviwed holiday ARM and SH4 buildfixes after r138516.
  14549. * jit/ThunkGenerators.cpp:
  14550. (JSC::nativeForGenerator):
  14551. 2012-12-26 Filip Pizlo <fpizlo@apple.com>
  14552. All JIT stubs should go through the getCTIStub API
  14553. https://bugs.webkit.org/show_bug.cgi?id=105750
  14554. Reviewed by Sam Weinig.
  14555. Previously JITThunks had two sets of thunks: one static set stored in a struct,
  14556. which was filled by JIT::privateCompileCTITrampolines, and another set stored in
  14557. a HashMap. Moreover, the code to generate the code for the CTI trampoline struct
  14558. had loads of copy-paste between JSVALUE32_64 and JSVALUE64, and was total
  14559. unmodular with respect to calls versus constructors, among other things.
  14560. This changeset removes this struct and rationalizes the code that generates those
  14561. thunks. All of thunks are now generated through the getCTIStub HashMap API. All
  14562. thunks for the baseline JIT now use the JSInterfaceJIT and have their codegen
  14563. located in ThunkGenerators.cpp. All thunks now share as much code as possible -
  14564. it turns out that they are almost 100% identical between 32_64 and 64, so that
  14565. works out great. A bunch of call vs. construct duplication was eliminated. And,
  14566. most of the call link versus virtual call duplication was also eliminated.
  14567. This does not change behavior but it does make it easier to add more thunks in
  14568. the future.
  14569. * bytecode/CallLinkInfo.cpp:
  14570. (JSC::CallLinkInfo::unlink):
  14571. * jit/JIT.cpp:
  14572. (JSC::JIT::linkFor):
  14573. * jit/JIT.h:
  14574. (JIT):
  14575. * jit/JITCall.cpp:
  14576. (JSC::JIT::compileCallEvalSlowCase):
  14577. (JSC::JIT::compileOpCallSlowCase):
  14578. * jit/JITCall32_64.cpp:
  14579. (JSC::JIT::compileCallEvalSlowCase):
  14580. (JSC::JIT::compileOpCallSlowCase):
  14581. * jit/JITInlines.h:
  14582. (JSC):
  14583. * jit/JITOpcodes.cpp:
  14584. (JSC):
  14585. (JSC::JIT::privateCompileCTINativeCall):
  14586. * jit/JITOpcodes32_64.cpp:
  14587. (JSC):
  14588. * jit/JITStubs.cpp:
  14589. (JSC::tryCacheGetByID):
  14590. * jit/JITThunks.cpp:
  14591. (JSC::JITThunks::JITThunks):
  14592. (JSC::JITThunks::ctiNativeCall):
  14593. (JSC::JITThunks::ctiNativeConstruct):
  14594. (JSC):
  14595. (JSC::JITThunks::hostFunctionStub):
  14596. * jit/JITThunks.h:
  14597. (JSC):
  14598. (JITThunks):
  14599. * jit/JSInterfaceJIT.h:
  14600. (JSInterfaceJIT):
  14601. (JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
  14602. (JSC):
  14603. (JSC::JSInterfaceJIT::emitFastArithIntToImmNoCheck):
  14604. (JSC::JSInterfaceJIT::emitJumpIfNotType):
  14605. (JSC::JSInterfaceJIT::emitGetFromCallFrameHeaderPtr):
  14606. (JSC::JSInterfaceJIT::emitPutToCallFrameHeader):
  14607. (JSC::JSInterfaceJIT::emitPutImmediateToCallFrameHeader):
  14608. (JSC::JSInterfaceJIT::emitPutCellToCallFrameHeader):
  14609. (JSC::JSInterfaceJIT::preserveReturnAddressAfterCall):
  14610. (JSC::JSInterfaceJIT::restoreReturnAddressBeforeReturn):
  14611. (JSC::JSInterfaceJIT::restoreArgumentReference):
  14612. * jit/ThunkGenerators.cpp:
  14613. (JSC::generateSlowCaseFor):
  14614. (JSC):
  14615. (JSC::linkForGenerator):
  14616. (JSC::linkCallGenerator):
  14617. (JSC::linkConstructGenerator):
  14618. (JSC::virtualForGenerator):
  14619. (JSC::virtualCallGenerator):
  14620. (JSC::virtualConstructGenerator):
  14621. (JSC::stringLengthTrampolineGenerator):
  14622. (JSC::nativeForGenerator):
  14623. (JSC::nativeCallGenerator):
  14624. (JSC::nativeConstructGenerator):
  14625. (JSC::charCodeAtThunkGenerator):
  14626. (JSC::charAtThunkGenerator):
  14627. (JSC::fromCharCodeThunkGenerator):
  14628. (JSC::sqrtThunkGenerator):
  14629. (JSC::floorThunkGenerator):
  14630. (JSC::ceilThunkGenerator):
  14631. (JSC::roundThunkGenerator):
  14632. (JSC::expThunkGenerator):
  14633. (JSC::logThunkGenerator):
  14634. (JSC::absThunkGenerator):
  14635. (JSC::powThunkGenerator):
  14636. * jit/ThunkGenerators.h:
  14637. (JSC):
  14638. * runtime/Executable.h:
  14639. (NativeExecutable):
  14640. (JSC::NativeExecutable::nativeFunctionFor):
  14641. (JSC::NativeExecutable::offsetOfNativeFunctionFor):
  14642. 2012-12-25 Gyuyoung Kim <gyuyoung.kim@samsung.com>
  14643. [CMAKE] Remove header files in JavaScriptCore/CMakeLists.txt
  14644. https://bugs.webkit.org/show_bug.cgi?id=105753
  14645. Reviewed by Laszlo Gombos.
  14646. * CMakeLists.txt: Remove header files in source list.
  14647. 2012-12-25 Filip Pizlo <fpizlo@apple.com>
  14648. JITThunks should be in its own file
  14649. https://bugs.webkit.org/show_bug.cgi?id=105744
  14650. Rubber stamped by Sam Weinig.
  14651. Moved JITThunks into its own file and removed some static methods from it
  14652. that were not related to what JITThunks currently does. Performed various
  14653. pagan rituals to get it to build - apparently there is a circular dependency
  14654. between JSCell, Weak, and JITThunks, which magically resolves itself if you
  14655. make sure to first include Register.h. Making it so that fewer pagan rituals
  14656. need to be performed if this code changes in the future is covered by
  14657. https://bugs.webkit.org/show_bug.cgi?id=105696.
  14658. * CMakeLists.txt:
  14659. * GNUmakefile.list.am:
  14660. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  14661. * JavaScriptCore.xcodeproj/project.pbxproj:
  14662. * Target.pri:
  14663. * jit/JITStubs.cpp:
  14664. (JSC::tryCachePutByID):
  14665. (JSC::tryCacheGetByID):
  14666. * jit/JITStubs.h:
  14667. (JSC::JITStackFrame::returnAddressSlot):
  14668. (JSC::returnAddressIsInCtiTrampoline):
  14669. * jit/JITThunks.cpp: Added.
  14670. (JSC::JITThunks::JITThunks):
  14671. (JSC::JITThunks::~JITThunks):
  14672. (JSC::JITThunks::ctiStub):
  14673. (JSC::JITThunks::hostFunctionStub):
  14674. (JSC::JITThunks::clearHostFunctionStubs):
  14675. * jit/JITThunks.h: Added.
  14676. (JSC::JITThunks::ctiStringLengthTrampoline):
  14677. (JSC::JITThunks::ctiVirtualCallLink):
  14678. (JSC::JITThunks::ctiVirtualConstructLink):
  14679. (JSC::JITThunks::ctiVirtualCall):
  14680. (JSC::JITThunks::ctiVirtualConstruct):
  14681. (JSC::JITThunks::ctiNativeCall):
  14682. (JSC::JITThunks::ctiNativeConstruct):
  14683. * jit/ThunkGenerator.h: Added.
  14684. * jit/ThunkGenerators.cpp:
  14685. * jit/ThunkGenerators.h:
  14686. * runtime/JSGlobalData.h:
  14687. 2012-12-25 Ilya Tikhonovsky <loislo@chromium.org>
  14688. Unreviewed follow-up for r138455.
  14689. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  14690. 2012-12-24 Ilya Tikhonovsky <loislo@chromium.org>
  14691. Unreviewed compilation fix for r138452.
  14692. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  14693. 2012-12-24 Laszlo Gombos <l.gombos@samsung.com>
  14694. Remove wtf/Platform.h includes from {c|cpp} files
  14695. https://bugs.webkit.org/show_bug.cgi?id=105678
  14696. Reviewed by Kentaro Hara.
  14697. Remove wtf/Platform.h from the include list as it is already
  14698. included in config.h.
  14699. * disassembler/udis86/udis86.c:
  14700. * disassembler/udis86/udis86_decode.c:
  14701. * disassembler/udis86/udis86_input.c:
  14702. * disassembler/udis86/udis86_itab_holder.c:
  14703. * disassembler/udis86/udis86_syn-att.c:
  14704. * disassembler/udis86/udis86_syn-intel.c:
  14705. * disassembler/udis86/udis86_syn.c:
  14706. * heap/VTableSpectrum.cpp:
  14707. 2012-12-21 Filip Pizlo <fpizlo@apple.com>
  14708. DFG Arrayify slow path should be out-of-line
  14709. https://bugs.webkit.org/show_bug.cgi?id=105400
  14710. Reviewed by Gavin Barraclough.
  14711. The interesting bit of this change is allowing out-of-line slow path generators
  14712. to emit speculation checks. This is accomplished by having a version of
  14713. speculationCheck() that returns a jump placeholder instead of taking a jump (or
  14714. jump list) as an argument. You can then fill in that jump placeholder at a
  14715. later time, so long as you do it before OSR exit linking. Slow path generators
  14716. run before linking, so that just naturally ends up working.
  14717. This isn't really a big win, but we know that out-of-lining slow paths is
  14718. generally a good thing to do, so it's fair to assume that this is a move in the
  14719. right direction.
  14720. * CMakeLists.txt:
  14721. * GNUmakefile.list.am:
  14722. * JavaScriptCore.xcodeproj/project.pbxproj:
  14723. * Target.pri:
  14724. * dfg/DFGArrayifySlowPathGenerator.h: Added.
  14725. (DFG):
  14726. (ArrayifySlowPathGenerator):
  14727. (JSC::DFG::ArrayifySlowPathGenerator::ArrayifySlowPathGenerator):
  14728. (JSC::DFG::ArrayifySlowPathGenerator::generateInternal):
  14729. * dfg/DFGOSRExitJumpPlaceholder.cpp: Added.
  14730. (DFG):
  14731. (JSC::DFG::OSRExitJumpPlaceholder::fill):
  14732. * dfg/DFGOSRExitJumpPlaceholder.h: Added.
  14733. (DFG):
  14734. (OSRExitJumpPlaceholder):
  14735. (JSC::DFG::OSRExitJumpPlaceholder::OSRExitJumpPlaceholder):
  14736. (JSC::DFG::OSRExitJumpPlaceholder::operator!):
  14737. * dfg/DFGSpeculativeJIT.cpp:
  14738. (JSC::DFG::SpeculativeJIT::speculationCheck):
  14739. (DFG):
  14740. (JSC::DFG::SpeculativeJIT::arrayify):
  14741. * dfg/DFGSpeculativeJIT.h:
  14742. (SpeculativeJIT):
  14743. 2012-12-20 Oliver Hunt <oliver@apple.com>
  14744. Finally found the problem. Using the wrong JSContextGroup.
  14745. * API/tests/testapi.c:
  14746. (main):
  14747. 2012-12-20 Oliver Hunt <oliver@apple.com>
  14748. Try to convince bots to be happy with testapi.
  14749. * API/JSScriptRefPrivate.h:
  14750. 2012-12-20 Michael Saboff <msaboff@apple.com>
  14751. JIT: Change uninitialized pointer value -1 to constant
  14752. https://bugs.webkit.org/show_bug.cgi?id=105576
  14753. Rubber stamped by Gavin Barraclough.
  14754. Changed the use of -1 as a pointer value in the JITs to be the constant unusedPointer defined in the
  14755. new file jit/UnusedPointer.h. Made it's value 0xd1e7beef, which is a bad pointer on most architectures
  14756. because it is odd, and to distinguish it from other common values.
  14757. * GNUmakefile.list.am:
  14758. * JavaScriptCore.xcodeproj/project.pbxproj:
  14759. * dfg/DFGRepatch.cpp:
  14760. (JSC::DFG::dfgResetGetByID):
  14761. (JSC::DFG::dfgResetPutByID):
  14762. * dfg/DFGSpeculativeJIT32_64.cpp:
  14763. (JSC::DFG::SpeculativeJIT::cachedGetById):
  14764. (JSC::DFG::SpeculativeJIT::cachedPutById):
  14765. * dfg/DFGSpeculativeJIT64.cpp:
  14766. (JSC::DFG::SpeculativeJIT::cachedGetById):
  14767. (JSC::DFG::SpeculativeJIT::cachedPutById):
  14768. * jit/JIT.h:
  14769. * jit/JITPropertyAccess.cpp:
  14770. (JSC::JIT::resetPatchGetById):
  14771. (JSC::JIT::resetPatchPutById):
  14772. * jit/JITPropertyAccess32_64.cpp:
  14773. (JSC::JIT::resetPatchGetById):
  14774. (JSC::JIT::resetPatchPutById):
  14775. * jit/JITWriteBarrier.h:
  14776. (JSC::JITWriteBarrierBase::clearToUnusedPointer):
  14777. (JSC::JITWriteBarrierBase::get):
  14778. * jit/UnusedPointer.h: Added.
  14779. 2012-12-20 Filip Pizlo <fpizlo@apple.com>
  14780. DFG shouldn't emit CheckStructure on array accesses if exit profiling tells it not to
  14781. https://bugs.webkit.org/show_bug.cgi?id=105577
  14782. Reviewed by Mark Hahnenberg.
  14783. I don't know why this wasn't there from the beginning.
  14784. * dfg/DFGByteCodeParser.cpp:
  14785. (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks):
  14786. 2012-12-19 Filip Pizlo <fpizlo@apple.com>
  14787. DFG speculation checks that take JumpList should consolidate OSRExits
  14788. https://bugs.webkit.org/show_bug.cgi?id=105401
  14789. Reviewed by Oliver Hunt.
  14790. Change OSRExitCompilationInfo to always contain a JumpList, and change JumpList
  14791. to be more compact. This way, a speculationCheck that takes a JumpList only has
  14792. to emit one OSRExit structure, and one OSRExit landing pad.
  14793. The downside is that we get less precise information about *where* we exited
  14794. from. So, this also includes changes to the profiler to be more relaxed about
  14795. what an ExitSite is.
  14796. * assembler/AbstractMacroAssembler.h:
  14797. (JumpList):
  14798. * dfg/DFGJITCompiler.cpp:
  14799. (JSC::DFG::JITCompiler::linkOSRExits):
  14800. (JSC::DFG::JITCompiler::link):
  14801. * dfg/DFGJITCompiler.h:
  14802. (DFG):
  14803. (JSC::DFG::JITCompiler::appendExitInfo):
  14804. (JITCompiler):
  14805. * dfg/DFGOSRExitCompilationInfo.h:
  14806. (OSRExitCompilationInfo):
  14807. * dfg/DFGSpeculativeJIT.cpp:
  14808. (JSC::DFG::SpeculativeJIT::speculationCheck):
  14809. (JSC::DFG::SpeculativeJIT::speculationWatchpoint):
  14810. (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck):
  14811. * profiler/ProfilerCompilation.cpp:
  14812. (JSC::Profiler::Compilation::addOSRExitSite):
  14813. * profiler/ProfilerCompilation.h:
  14814. (Compilation):
  14815. * profiler/ProfilerOSRExitSite.cpp:
  14816. (JSC::Profiler::OSRExitSite::toJS):
  14817. * profiler/ProfilerOSRExitSite.h:
  14818. (JSC::Profiler::OSRExitSite::OSRExitSite):
  14819. (JSC::Profiler::OSRExitSite::codeAddress):
  14820. (OSRExitSite):
  14821. 2012-12-19 Oliver Hunt <oliver@apple.com>
  14822. Fix some incorrect tests in testapi.c
  14823. Reviewed by Simon Fraser.
  14824. * API/tests/testapi.c:
  14825. (main):
  14826. 2012-12-19 Filip Pizlo <fpizlo@apple.com>
  14827. JSObject::ensure<IndexingType> should gracefully handle InterceptsGetOwn..., and should never be called when the 'this' is not an object
  14828. https://bugs.webkit.org/show_bug.cgi?id=105468
  14829. Reviewed by Mark Hahnenberg, Oliver Hunt, and Gavin Barraclough.
  14830. Changed JSObject::ensure<IndexingType> methods to gracefully handle
  14831. InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero. Most of them handle it by returning
  14832. null as a result of indexingShouldBeSparse() returning true, while ensureArrayStorage handles it
  14833. by entering dictionary indexing mode, which forces the object to behave correctly even if there
  14834. is proxying or weird prototype stuff going on.
  14835. Changed DFGOperations entrypoints to reject non-objects, so that JSObject doesn't have to deal
  14836. with pretending to be JSString. In particular, this would go wrong in the ArrayStorage case
  14837. since we'd try to resize a butterfly on a JSString, but JSString has something other than
  14838. m_butterfly at that offset.
  14839. Finally, removed all InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero from JIT code
  14840. since those are now redundant.
  14841. * dfg/DFGOperations.cpp:
  14842. * dfg/DFGOperations.h:
  14843. * dfg/DFGSpeculativeJIT.cpp:
  14844. (JSC::DFG::SpeculativeJIT::arrayify):
  14845. * dfg/DFGSpeculativeJIT.h:
  14846. (JSC::DFG::SpeculativeJIT::callOperation):
  14847. * runtime/JSObject.cpp:
  14848. (JSC::JSObject::enterDictionaryIndexingMode):
  14849. (JSC::JSObject::ensureInt32Slow):
  14850. (JSC::JSObject::ensureDoubleSlow):
  14851. (JSC::JSObject::ensureContiguousSlow):
  14852. (JSC::JSObject::ensureArrayStorageSlow):
  14853. (JSC):
  14854. (JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes):
  14855. * runtime/JSObject.h:
  14856. (JSObject):
  14857. 2012-12-19 Oliver Hunt <oliver@apple.com>
  14858. Tidy up JSScriptRef API
  14859. https://bugs.webkit.org/show_bug.cgi?id=105470
  14860. Reviewed by Anders Carlsson.
  14861. People found the API's use of a context confusing, so we'll switch to a JSContextGroup based
  14862. API, and drop a number of the unnecessary uses of contexts.
  14863. * API/JSScriptRef.cpp:
  14864. (OpaqueJSScript::globalData):
  14865. (parseScript):
  14866. * API/JSScriptRefPrivate.h:
  14867. * API/tests/testapi.c:
  14868. (main):
  14869. 2012-12-19 Alexis Menard <alexis@webkit.org>
  14870. Implement CSS parsing for CSS transitions unprefixed.
  14871. https://bugs.webkit.org/show_bug.cgi?id=104804
  14872. Reviewed by Dean Jackson.
  14873. Add a new flag ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED
  14874. to cover the work of unprefixing Transforms, Animations and
  14875. Transitions. It will let the possibility of each ports to turn it off
  14876. in their release branches until we're confident that these CSS
  14877. properties are ready to be unprefixed.
  14878. * Configurations/FeatureDefines.xcconfig:
  14879. 2012-12-18 Filip Pizlo <fpizlo@apple.com>
  14880. Proxies should set InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero
  14881. https://bugs.webkit.org/show_bug.cgi?id=105379
  14882. Reviewed by Gavin Barraclough.
  14883. Forgetting to set this flag led to the DFG trying to ensure array storage on a proxy. I've
  14884. now hardened the code with a release assertion as well as fixing the bug. A release assertion
  14885. is appropriate here since this is slow-path code.
  14886. * runtime/JSObject.cpp:
  14887. (JSC::JSObject::enterDictionaryIndexingMode):
  14888. (JSC::JSObject::ensureInt32Slow):
  14889. (JSC::JSObject::ensureDoubleSlow):
  14890. (JSC::JSObject::ensureContiguousSlow):
  14891. (JSC::JSObject::ensureArrayStorageSlowNoCheck):
  14892. (JSC::JSObject::ensureArrayStorageSlow):
  14893. (JSC):
  14894. (JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes):
  14895. * runtime/JSObject.h:
  14896. (JSObject):
  14897. * runtime/JSProxy.h:
  14898. (JSProxy):
  14899. 2012-12-18 Oliver Hunt <oliver@apple.com>
  14900. Add a JSScriptRef API to JSC so that we can allow API users to avoid the full cost of reparsing everytime the execute a script.
  14901. https://bugs.webkit.org/show_bug.cgi?id=105340
  14902. Reviewed by Gavin Barraclough.
  14903. This patch adds a (currently private) API to allow users of the JSC API to create a JSScript object
  14904. that references a reusable version of the script that they wish to evaluate. This can help us avoid
  14905. numeorus copies that are otherwise induced by our existing API and gives us an opaque object that we
  14906. can hang various caches off. Currently this is simply a simple SourceProvider, but in future we may
  14907. be able to add more caching without requiring new/replacement APIs.
  14908. * API/JSScriptRef.cpp: Added.
  14909. * API/JSScriptRefPrivate.h: Added.
  14910. * API/tests/testapi.c:
  14911. Add tests for new APIs.
  14912. * JavaScriptCore.xcodeproj/project.pbxproj:
  14913. 2012-12-18 Filip Pizlo <fpizlo@apple.com>
  14914. DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode incorrectly checks for non-array array storage when it should be checking for array array storage
  14915. https://bugs.webkit.org/show_bug.cgi?id=105365
  14916. Reviewed by Mark Hahnenberg.
  14917. * dfg/DFGSpeculativeJIT.cpp:
  14918. (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
  14919. 2012-12-18 Filip Pizlo <fpizlo@apple.com>
  14920. SunSpider/date-format-tofte shouldn't compile each of the tiny worthless eval's only to OSR exit in the prologue every time
  14921. https://bugs.webkit.org/show_bug.cgi?id=105335
  14922. Reviewed by Geoffrey Garen.
  14923. The first thing I did was restructure the logic of canInlineResolveOperations(),
  14924. because I didn't understand it. This was relevant because the OSR exits are
  14925. caused by a resolve that the DFG cannot handle.
  14926. I was then going to make it so that we didn't compile the resolve at all, but
  14927. realized that this would not be the best fix: it didn't seem sensible to me to
  14928. be optimizing these evals after only 60 invocations. Evals should have a higher
  14929. threshold, since they often contain code for which the baseline JIT does a
  14930. pretty good job already (if all you've got is a single heap access or a single
  14931. hard-to-inline call, then the baseline JIT has got you covered), and typically
  14932. if we see one eval code block we expect to see more (from the same eval site):
  14933. so our typical low threshold could lead to a *lot* of compilation. As such, the
  14934. main effect of this patch is to introduce an evalThresholdMultiplier, which is
  14935. now set to 10.
  14936. This is a ~5% speed-up on data-format-tofte. No regressions anywhere as far as
  14937. I can see.
  14938. * bytecode/CodeBlock.cpp:
  14939. (JSC::CodeBlock::codeTypeThresholdMultiplier):
  14940. (JSC):
  14941. (JSC::CodeBlock::optimizationThresholdScalingFactor):
  14942. (JSC::CodeBlock::exitCountThresholdForReoptimization):
  14943. (JSC::CodeBlock::exitCountThresholdForReoptimizationFromLoop):
  14944. * bytecode/CodeBlock.h:
  14945. (CodeBlock):
  14946. * dfg/DFGCapabilities.h:
  14947. (JSC::DFG::canInlineResolveOperations):
  14948. * dfg/DFGOSRExitCompiler.cpp:
  14949. * runtime/Options.h:
  14950. (JSC):
  14951. 2012-12-18 Filip Pizlo <fpizlo@apple.com>
  14952. Convert indexingTypeToString to IndexingTypeDump
  14953. https://bugs.webkit.org/show_bug.cgi?id=105351
  14954. Reviewed by Mark Hahnenberg.
  14955. This gets rid of another case of static char buffer[thingy].
  14956. * dfg/DFGGraph.cpp:
  14957. (JSC::DFG::Graph::dump):
  14958. * runtime/IndexingType.cpp:
  14959. (JSC::dumpIndexingType):
  14960. * runtime/IndexingType.h:
  14961. (JSC):
  14962. * runtime/JSValue.cpp:
  14963. (JSC::JSValue::dump):
  14964. 2012-12-18 Beth Dakin <bdakin@apple.com>
  14965. https://bugs.webkit.org/show_bug.cgi?id=102579
  14966. [mac] Enable scaled cursors
  14967. Reviewed by Dean Jackson.
  14968. * Configurations/FeatureDefines.xcconfig:
  14969. 2012-12-18 Mark Hahnenberg <mhahnenberg@apple.com>
  14970. Restrictions on oversize CopiedBlock allocations should be relaxed
  14971. https://bugs.webkit.org/show_bug.cgi?id=105339
  14972. Reviewed by Filip Pizlo.
  14973. Currently the DFG has a single branch in the inline allocation path for property/array storage where
  14974. it checks to see if the number of bytes requested will fit in the current block. This does not match
  14975. what the C++ allocation path does; it checks if the requested number of bytes is oversize, and then
  14976. if it's not, it tries to fit it in the current block. The garbage collector assumes that ALL allocations
  14977. that are greater than 16KB are in oversize blocks. Therefore, this mismatch can lead to crashes when
  14978. the collector tries to perform some operation on a CopiedBlock.
  14979. To avoid adding an extra branch to the inline allocation path in the JIT, we should make it so that
  14980. oversize blocks are allocated on the same alignment boundaries so that there is a single mask to find
  14981. the block header of any CopiedBlock (rather than two, one for normal and one for oversize blocks), and
  14982. we should figure out if a block is oversize by some other method than just whatever the JSObject says
  14983. it is. One way we could record this info Region of the block, since we allocate a one-off Region for
  14984. oversize blocks.
  14985. * heap/BlockAllocator.h:
  14986. (JSC::Region::isCustomSize):
  14987. (Region):
  14988. (JSC::Region::createCustomSize):
  14989. (JSC::Region::Region):
  14990. (JSC::BlockAllocator::deallocateCustomSize):
  14991. * heap/CopiedBlock.h:
  14992. (CopiedBlock):
  14993. (JSC::CopiedBlock::isOversize):
  14994. (JSC):
  14995. * heap/CopiedSpace.cpp:
  14996. (JSC::CopiedSpace::tryAllocateOversize):
  14997. (JSC::CopiedSpace::tryReallocate):
  14998. (JSC::CopiedSpace::tryReallocateOversize):
  14999. * heap/CopiedSpace.h:
  15000. (CopiedSpace):
  15001. * heap/CopiedSpaceInlines.h:
  15002. (JSC::CopiedSpace::contains):
  15003. (JSC::CopiedSpace::tryAllocate):
  15004. (JSC):
  15005. * heap/CopyVisitor.h:
  15006. (CopyVisitor):
  15007. * heap/CopyVisitorInlines.h:
  15008. (JSC::CopyVisitor::checkIfShouldCopy):
  15009. (JSC::CopyVisitor::didCopy):
  15010. * heap/SlotVisitorInlines.h:
  15011. (JSC::SlotVisitor::copyLater):
  15012. * runtime/JSObject.cpp:
  15013. (JSC::JSObject::copyButterfly):
  15014. 2012-12-18 Joseph Pecoraro <pecoraro@apple.com>
  15015. [Mac] Add Build Phase to Check Headers for Inappropriate Macros (Platform.h macros)
  15016. https://bugs.webkit.org/show_bug.cgi?id=104279
  15017. Reviewed by David Kilzer.
  15018. Add a build phase to check the public JavaScriptCore headers for
  15019. inappropriate macros.
  15020. * JavaScriptCore.xcodeproj/project.pbxproj:
  15021. 2012-12-18 Michael Saboff <msaboff@apple.com>
  15022. [Qt] Fix the ARMv7 build after r137976
  15023. https://bugs.webkit.org/show_bug.cgi?id=105270
  15024. Reviewed by Csaba Osztrogonác.
  15025. Add default value for Jump parameter to fix build.
  15026. * assembler/AbstractMacroAssembler.h:
  15027. (JSC::AbstractMacroAssembler::Jump::Jump):
  15028. 2012-12-17 Geoffrey Garen <ggaren@apple.com>
  15029. Constant fold !{number} in the parser
  15030. https://bugs.webkit.org/show_bug.cgi?id=105232
  15031. Reviewed by Filip Pizlo.
  15032. Typically, we wait for hot execution and constant fold in the DFG.
  15033. However, !0 and !1 are common enough in minifiers that it can be good
  15034. to get them out of the way early, for faster/smaller parsing and startup.
  15035. * parser/ASTBuilder.h:
  15036. (JSC::ASTBuilder::createLogicalNot): !{literal} is super simple, especially
  15037. since there's no literal form of NaN or Inf.
  15038. 2012-12-17 Filip Pizlo <fpizlo@apple.com>
  15039. DFG is too aggressive eliding overflow checks for additions involving large constants
  15040. https://bugs.webkit.org/show_bug.cgi?id=105239
  15041. Reviewed by Gavin Barraclough.
  15042. If we elide overflow checks on an addition (or subtraction) involving a larger-than-2^32 immediate,
  15043. then make sure that the non-constant child of the addition knows that he's got to do an overflow
  15044. check, by flowing the UsedAsNumber property at him.
  15045. * dfg/DFGGraph.h:
  15046. (JSC::DFG::Graph::addSpeculationMode):
  15047. (Graph):
  15048. (JSC::DFG::Graph::addShouldSpeculateInteger):
  15049. (JSC::DFG::Graph::addImmediateShouldSpeculateInteger):
  15050. * dfg/DFGPredictionPropagationPhase.cpp:
  15051. (JSC::DFG::PredictionPropagationPhase::propagate):
  15052. 2012-12-17 Michael Saboff <msaboff@apple.com>
  15053. DFG: Refactor DFGCorrectableJumpPoint to reduce size of OSRExit data
  15054. https://bugs.webkit.org/show_bug.cgi?id=105237
  15055. Reviewed by Filip Pizlo.
  15056. Replaced DFGCorrectableJumpPoint with OSRExitCompilationInfo which is used and kept alive only while we are
  15057. compiling in the DFG. Moved the patchable branch offset directly into OSRExit.
  15058. * CMakeLists.txt:
  15059. * GNUmakefile.list.am:
  15060. * JavaScriptCore.xcodeproj/project.pbxproj:
  15061. * Target.pri:
  15062. * assembler/AbstractMacroAssembler.h:
  15063. * dfg/DFGCorrectableJumpPoint.cpp: Removed.
  15064. * dfg/DFGCorrectableJumpPoint.h: Removed.
  15065. * dfg/DFGJITCompiler.cpp:
  15066. (JSC::DFG::JITCompiler::linkOSRExits):
  15067. (JSC::DFG::JITCompiler::link):
  15068. * dfg/DFGJITCompiler.h:
  15069. (JSC::DFG::JITCompiler::appendExitJump):
  15070. (JITCompiler):
  15071. * dfg/DFGOSRExit.cpp:
  15072. (JSC::DFG::OSRExit::OSRExit):
  15073. (JSC::DFG::OSRExit::setPatchableCodeOffset):
  15074. (JSC::DFG::OSRExit::getPatchableCodeOffsetAsJump):
  15075. (JSC::DFG::OSRExit::codeLocationForRepatch):
  15076. (JSC::DFG::OSRExit::correctJump):
  15077. * dfg/DFGOSRExit.h:
  15078. (OSRExit):
  15079. * dfg/DFGOSRExitCompilationInfo.h: Added.
  15080. (OSRExitCompilationInfo):
  15081. (JSC::DFG::OSRExitCompilationInfo::OSRExitCompilationInfo):
  15082. (JSC::DFG::OSRExitCompilationInfo::failureJump):
  15083. * dfg/DFGOSRExitCompiler.cpp:
  15084. * dfg/DFGSpeculativeJIT.cpp:
  15085. (JSC::DFG::SpeculativeJIT::speculationCheck):
  15086. (JSC::DFG::SpeculativeJIT::speculationWatchpoint):
  15087. 2012-12-17 Filip Pizlo <fpizlo@apple.com>
  15088. DFG is too aggressive with eliding overflow checks in loops
  15089. https://bugs.webkit.org/show_bug.cgi?id=105226
  15090. Reviewed by Mark Hahnenberg and Oliver Hunt.
  15091. If we see a variable's live range cross basic block boundaries, conservatively assume that it may
  15092. be part of a data-flow back-edge, and as a result, we may have entirely integer operations that
  15093. could lead to the creation of an integer that is out of range of 2^52 (the significand of a double
  15094. float). This does not seem to regress any of the benchmarks we care about, and it fixes the bug.
  15095. In future we may want to actually look at whether or not there was a data-flow back-edge instead
  15096. of being super conservative about it. But we have no evidence, yet, that this would help us on
  15097. real code.
  15098. * dfg/DFGNodeFlags.h:
  15099. (DFG):
  15100. * dfg/DFGPredictionPropagationPhase.cpp:
  15101. (JSC::DFG::PredictionPropagationPhase::propagate):
  15102. 2012-12-17 Mark Hahnenberg <mhahnenberg@apple.com>
  15103. Butterfly::growArrayRight shouldn't be called on null Butterfly objects
  15104. https://bugs.webkit.org/show_bug.cgi?id=105221
  15105. Reviewed by Filip Pizlo.
  15106. Currently we depend upon the fact that Butterfly::growArrayRight works with null Butterfly
  15107. objects purely by coincidence. We should add a new static function that null checks the old
  15108. Butterfly object and creates a new one if it's null, or calls growArrayRight if it isn't for
  15109. use in the couple of places in JSObject that expect such behavior to work.
  15110. * runtime/Butterfly.h:
  15111. (Butterfly):
  15112. * runtime/ButterflyInlines.h:
  15113. (JSC::Butterfly::createOrGrowArrayRight):
  15114. (JSC):
  15115. * runtime/JSObject.cpp:
  15116. (JSC::JSObject::createInitialIndexedStorage):
  15117. (JSC::JSObject::createArrayStorage):
  15118. 2012-12-17 Filip Pizlo <fpizlo@apple.com>
  15119. javascript integer overflow
  15120. https://bugs.webkit.org/show_bug.cgi?id=104967
  15121. Reviewed by Mark Hahnenberg.
  15122. Fix PutScopedVar backward flow.
  15123. * dfg/DFGPredictionPropagationPhase.cpp:
  15124. (JSC::DFG::PredictionPropagationPhase::propagate):
  15125. 2012-12-16 Filip Pizlo <fpizlo@apple.com>
  15126. Rationalize array profiling for out-of-bounds and hole cases
  15127. https://bugs.webkit.org/show_bug.cgi?id=105139
  15128. Reviewed by Geoffrey Garen.
  15129. This makes ArrayProfile track whether or not we had out-of-bounds, which allows
  15130. for more precise decision-making in the DFG.
  15131. Also cleaned up ExitKinds for out-of-bounds and hole cases to make it easier to
  15132. look at them in the profiler.
  15133. Slight speed-up (5-8%) on SunSpider/crypto-md5.
  15134. * bytecode/ArrayProfile.cpp:
  15135. (JSC::ArrayProfile::computeUpdatedPrediction):
  15136. (JSC::ArrayProfile::briefDescription):
  15137. * bytecode/ArrayProfile.h:
  15138. (JSC::ArrayProfile::ArrayProfile):
  15139. (JSC::ArrayProfile::addressOfOutOfBounds):
  15140. (JSC::ArrayProfile::expectedStructure):
  15141. (JSC::ArrayProfile::structureIsPolymorphic):
  15142. (JSC::ArrayProfile::outOfBounds):
  15143. (JSC::ArrayProfile::polymorphicStructure):
  15144. * bytecode/CodeBlock.cpp:
  15145. (JSC::dumpChain):
  15146. * bytecode/ExitKind.cpp:
  15147. (JSC::exitKindToString):
  15148. (JSC::exitKindIsCountable):
  15149. * bytecode/ExitKind.h:
  15150. * dfg/DFGByteCodeParser.cpp:
  15151. (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks):
  15152. * dfg/DFGSpeculativeJIT.cpp:
  15153. (JSC::DFG::SpeculativeJIT::compileDoublePutByVal):
  15154. * dfg/DFGSpeculativeJIT32_64.cpp:
  15155. (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
  15156. (JSC::DFG::SpeculativeJIT::compile):
  15157. * dfg/DFGSpeculativeJIT64.cpp:
  15158. (JSC::DFG::SpeculativeJIT::compile):
  15159. * jit/JIT.h:
  15160. * jit/JITInlines.h:
  15161. (JSC::JIT::emitArrayProfileOutOfBoundsSpecialCase):
  15162. * jit/JITPropertyAccess.cpp:
  15163. (JSC::JIT::emitSlow_op_get_by_val):
  15164. (JSC::JIT::emitSlow_op_put_by_val):
  15165. * jit/JITPropertyAccess32_64.cpp:
  15166. (JSC::JIT::emitSlow_op_get_by_val):
  15167. (JSC::JIT::emitSlow_op_put_by_val):
  15168. * llint/LowLevelInterpreter32_64.asm:
  15169. * llint/LowLevelInterpreter64.asm:
  15170. 2012-12-17 Balazs Kilvady <kilvadyb@homejinni.com>
  15171. Implement add64 for MIPS assembler after r136601
  15172. https://bugs.webkit.org/show_bug.cgi?id=104106
  15173. Reviewed by Zoltan Herczeg.
  15174. Added add64 function to MacroAssebler of MIPS.
  15175. * assembler/MacroAssemblerMIPS.h:
  15176. (JSC::MacroAssemblerMIPS::add32):
  15177. (JSC::MacroAssemblerMIPS::add64):
  15178. (MacroAssemblerMIPS):
  15179. 2012-12-17 Jonathan Liu <net147@gmail.com>
  15180. Fix Math.pow implementation with MinGW-w64
  15181. https://bugs.webkit.org/show_bug.cgi?id=105087
  15182. Reviewed by Simon Hausmann.
  15183. The MinGW-w64 runtime has different behaviour for pow()
  15184. compared to other C runtimes. This results in the following
  15185. test262 tests failing with the latest MinGW-w64 runtime:
  15186. - S15.8.2.13_A14
  15187. - S15.8.2.13_A16
  15188. - S15.8.2.13_A20
  15189. - S15.8.2.13_A22
  15190. Handle the special cases that are different with MinGW-w64.
  15191. * runtime/MathObject.cpp:
  15192. (JSC::mathPow):
  15193. 2012-12-16 Filip Pizlo <fpizlo@apple.com>
  15194. Bytecode dumping should show rare case profiles
  15195. https://bugs.webkit.org/show_bug.cgi?id=105133
  15196. Reviewed by Geoffrey Garen.
  15197. Refactored the dumper to call dumpBytecodeCommandAndNewLine in just one place,
  15198. rather than in all of the places. Changed the rare case profile getters to use
  15199. tryBinarySearch rather than binarySearch, so that they can be used speculatively
  15200. even if you don't know that the bytecode has rare case profiles. This actually
  15201. increases our assertion level, since it means that in release builds we will get
  15202. null and crash rather than getting some random adjacent profile. And then this
  15203. adds some printing of the rare case profiles.
  15204. * bytecode/CodeBlock.cpp:
  15205. (JSC::CodeBlock::printUnaryOp):
  15206. (JSC::CodeBlock::printBinaryOp):
  15207. (JSC::CodeBlock::printConditionalJump):
  15208. (JSC::CodeBlock::printCallOp):
  15209. (JSC::CodeBlock::printPutByIdOp):
  15210. (JSC::CodeBlock::beginDumpProfiling):
  15211. (JSC):
  15212. (JSC::CodeBlock::dumpValueProfiling):
  15213. (JSC::CodeBlock::dumpArrayProfiling):
  15214. (JSC::CodeBlock::dumpRareCaseProfile):
  15215. (JSC::CodeBlock::dumpBytecode):
  15216. * bytecode/CodeBlock.h:
  15217. (JSC::CodeBlock::rareCaseProfileForBytecodeOffset):
  15218. (JSC::CodeBlock::specialFastCaseProfileForBytecodeOffset):
  15219. 2012-12-13 Filip Pizlo <fpizlo@apple.com>
  15220. Attempt to rationalize and simplify WTF::binarySearch
  15221. https://bugs.webkit.org/show_bug.cgi?id=104890
  15222. Reviewed by Maciej Stachowiak.
  15223. Switch to using the new binarySearch() API. No change in behavior.
  15224. * bytecode/CodeBlock.cpp:
  15225. (JSC::CodeBlock::bytecodeOffset):
  15226. (JSC::CodeBlock::codeOriginForReturn):
  15227. * bytecode/CodeBlock.h:
  15228. (JSC::CodeBlock::getStubInfo):
  15229. (JSC::CodeBlock::getByValInfo):
  15230. (JSC::CodeBlock::getCallLinkInfo):
  15231. (JSC::CodeBlock::dfgOSREntryDataForBytecodeIndex):
  15232. (JSC::CodeBlock::valueProfileForBytecodeOffset):
  15233. (JSC::CodeBlock::rareCaseProfileForBytecodeOffset):
  15234. (JSC::CodeBlock::specialFastCaseProfileForBytecodeOffset):
  15235. * dfg/DFGGraph.h:
  15236. (JSC::DFG::Graph::blockIndexForBytecodeOffset):
  15237. * dfg/DFGMinifiedGraph.h:
  15238. (JSC::DFG::MinifiedGraph::at):
  15239. * dfg/DFGOSRExitCompiler32_64.cpp:
  15240. (JSC::DFG::OSRExitCompiler::compileExit):
  15241. * dfg/DFGOSRExitCompiler64.cpp:
  15242. (JSC::DFG::OSRExitCompiler::compileExit):
  15243. * llint/LLIntSlowPaths.cpp:
  15244. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  15245. * profiler/ProfilerBytecodeSequence.cpp:
  15246. (JSC::Profiler::BytecodeSequence::indexForBytecodeIndex):
  15247. 2012-12-13 Filip Pizlo <fpizlo@apple.com>
  15248. Don't assert that flags <= 0x3ff in JSTypeInfo
  15249. https://bugs.webkit.org/show_bug.cgi?id=104988
  15250. Reviewed by Sam Weinig.
  15251. This assertion doesn't accomplish anything other than crashes.
  15252. * runtime/JSTypeInfo.h:
  15253. (JSC::TypeInfo::TypeInfo):
  15254. 2012-12-13 Filip Pizlo <fpizlo@apple.com>
  15255. Named lookups on HTML documents produce inconsistent results in JavaScriptCore bindings
  15256. https://bugs.webkit.org/show_bug.cgi?id=104623
  15257. Reviewed by Geoffrey Garen.
  15258. Add the notion of objects that HasImpureGetOwnPropertySlot, and use that to inhibit prototype chain caching
  15259. in some cases. This appears to be perf-neutral on benchmarks that we track.
  15260. * dfg/DFGRepatch.cpp:
  15261. (JSC::DFG::tryCacheGetByID):
  15262. (JSC::DFG::tryBuildGetByIDProtoList):
  15263. * jit/JITStubs.cpp:
  15264. (JSC::JITThunks::tryCacheGetByID):
  15265. (JSC::DEFINE_STUB_FUNCTION):
  15266. * runtime/JSTypeInfo.h:
  15267. (JSC):
  15268. (JSC::TypeInfo::hasImpureGetOwnPropertySlot):
  15269. * runtime/Operations.h:
  15270. (JSC::normalizePrototypeChainForChainAccess):
  15271. 2012-12-13 Filip Pizlo <fpizlo@apple.com>
  15272. Unreviewed, roll out http://trac.webkit.org/changeset/137683.
  15273. It broke gmail.
  15274. * dfg/DFGAbstractState.cpp:
  15275. (JSC::DFG::AbstractState::execute):
  15276. * dfg/DFGByteCodeParser.cpp:
  15277. (JSC::DFG::ByteCodeParser::parseBlock):
  15278. * dfg/DFGCSEPhase.cpp:
  15279. (JSC::DFG::CSEPhase::putStructureStoreElimination):
  15280. (JSC::DFG::CSEPhase::performNodeCSE):
  15281. * dfg/DFGCapabilities.h:
  15282. (JSC::DFG::canCompileOpcode):
  15283. * dfg/DFGNodeType.h:
  15284. (DFG):
  15285. * dfg/DFGOperations.cpp:
  15286. * dfg/DFGOperations.h:
  15287. * dfg/DFGPredictionPropagationPhase.cpp:
  15288. (JSC::DFG::PredictionPropagationPhase::propagate):
  15289. * dfg/DFGSpeculativeJIT32_64.cpp:
  15290. (JSC::DFG::SpeculativeJIT::compile):
  15291. * dfg/DFGSpeculativeJIT64.cpp:
  15292. (JSC::DFG::SpeculativeJIT::compile):
  15293. * runtime/Operations.cpp:
  15294. (JSC::jsTypeStringForValue):
  15295. (JSC):
  15296. * runtime/Operations.h:
  15297. (JSC):
  15298. 2012-13-11 Oliver Hunt <oliver@apple.com>
  15299. Support op_typeof in the DFG
  15300. https://bugs.webkit.org/show_bug.cgi?id=98898
  15301. Reviewed by Filip Pizlo.
  15302. Adds a TypeOf node to the DFG to support op_typeof.
  15303. * dfg/DFGAbstractState.cpp:
  15304. (JSC::DFG::AbstractState::execute):
  15305. We try to determine the result early here, and substitute in a constant.
  15306. Otherwise we leave the node intact, and set the result type to SpecString.
  15307. * dfg/DFGByteCodeParser.cpp:
  15308. (JSC::DFG::ByteCodeParser::parseBlock):
  15309. Parse op_typeof
  15310. * dfg/DFGCSEPhase.cpp:
  15311. (JSC::DFG::CSEPhase::performNodeCSE):
  15312. TypeOf nodes can be subjected to pure CSE
  15313. * dfg/DFGCapabilities.h:
  15314. (JSC::DFG::canCompileOpcode):
  15315. We can handle typeof.
  15316. * dfg/DFGNodeType.h:
  15317. (DFG):
  15318. Define the node.
  15319. * dfg/DFGOperations.cpp:
  15320. * dfg/DFGOperations.h:
  15321. Add operationTypeOf to support the non-trivial cases.
  15322. * dfg/DFGPredictionPropagationPhase.cpp:
  15323. (JSC::DFG::PredictionPropagationPhase::propagate):
  15324. * dfg/DFGSpeculativeJIT32_64.cpp:
  15325. (JSC::DFG::SpeculativeJIT::compile):
  15326. * dfg/DFGSpeculativeJIT64.cpp:
  15327. (JSC::DFG::SpeculativeJIT::compile):
  15328. Actual codegen
  15329. * runtime/Operations.cpp:
  15330. (JSC::jsTypeStringForValue):
  15331. (JSC):
  15332. * runtime/Operations.h:
  15333. (JSC):
  15334. Some refactoring to allow us to get the type string for an
  15335. object without needing a callframe.
  15336. 2012-12-12 Filip Pizlo <fpizlo@apple.com>
  15337. OSR exit compiler should emit code for resetting the execution counter that matches the logic of ExecutionCounter.cpp
  15338. https://bugs.webkit.org/show_bug.cgi?id=104791
  15339. Reviewed by Oliver Hunt.
  15340. The OSR exit compiler wants to make it so that every OSR exit does the equivalent
  15341. of:
  15342. codeBlock->m_jitExecuteCounter.setNewThreshold(
  15343. codeBlock->counterValueForOptimizeAfterLongWarmUp());
  15344. This logically involves:
  15345. - Resetting the counter to zero.
  15346. - Setting m_activeThreshold to counterValueForOptimizeAfterLongWarmUp().
  15347. - Figuring out the scaled threshold, subtracting the count so far (which is zero,
  15348. so this part is a no-op), and clipping (ExecuteCounter::clippedThreshold()).
  15349. - Setting m_counter to the negated clipped threshold.
  15350. - Setting m_totalCount to the previous count so far (which is zero) plus the
  15351. clipped threshold.
  15352. Because of the reset, which sets the count-so-far to zero, this amounts to:
  15353. - Setting m_activeThreshold to counterValueForOptimizeAfterLongWarmUp().
  15354. - Figuring out the clipped scaled threshold.
  15355. - Setting m_counter to the negated clipped scaled threshold.
  15356. - Setting m_totalCount to the (positive) clipped scaled threshold.
  15357. The code was previously not doing this, but now is. This is performance neutral.
  15358. The only change in behavior over what the code was previously doing (setting the
  15359. m_counter to the negated scaled threshold, without clipping, and then setting
  15360. the m_totalCount to the clipped scaled threshold) is that this will respond more
  15361. gracefully under memory pressure and will ensure that we get more value profile
  15362. LUBing before triggering recompilation. More LUBing is almost always a good
  15363. thing.
  15364. * dfg/DFGOSRExitCompiler.cpp:
  15365. (JSC::DFG::OSRExitCompiler::handleExitCounts):
  15366. 2012-12-12 Ilya Tikhonovsky <loislo@chromium.org>
  15367. Web Inspector: Native Memory Instrumentation: remove fake root MemoryObjectInfo.
  15368. https://bugs.webkit.org/show_bug.cgi?id=104796
  15369. Reviewed by Yury Semikhatsky.
  15370. It was not a good idea to introduce a fake root MemoryObjectInfo.
  15371. It makes a problem when we visit an object without its own MemoryObjectType.
  15372. Example: RenderBox has a global pointer to a hash map.
  15373. HashMap doesn't have its own object type because it is a generic container.
  15374. It will inherit object type from the fake root memory object info.
  15375. The same could happen for another container in another class with other MemoryObjectType.
  15376. This fact forces me to create custom process method for root objects
  15377. because they need to have their own MemoryObjectInfo with customisable memory object type.
  15378. Drive by fix: InstrumentedPointer* was replaced with Wrapper* because actually it is using
  15379. for instrumented and not instrumented object classes.
  15380. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  15381. 2012-12-11 Gabor Ballabas <gaborb@inf.u-szeged.hu>
  15382. Implement add64 for ARM traditional assembler after r136601
  15383. https://bugs.webkit.org/show_bug.cgi?id=104103
  15384. Reviewed by Zoltan Herczeg.
  15385. Implement add64 function for ARM traditional macroassembler.
  15386. * assembler/MacroAssemblerARM.h:
  15387. (JSC::MacroAssemblerARM::add64):
  15388. (MacroAssemblerARM):
  15389. 2012-12-11 Filip Pizlo <fpizlo@apple.com>
  15390. Unreviewed. Fix build with DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE).
  15391. * bytecode/CodeBlock.cpp:
  15392. (JSC::CodeBlock::tallyFrequentExitSites):
  15393. 2012-12-11 Filip Pizlo <fpizlo@apple.com>
  15394. Profiler should show bytecode dumps as they would have been visible to the JITs, including the profiling data that the JITs would see
  15395. https://bugs.webkit.org/show_bug.cgi?id=104647
  15396. Reviewed by Oliver Hunt.
  15397. Adds more profiling data to bytecode dumps, and adds the ability to do a secondary
  15398. bytecode dump for each JIT compilation of a code block. This is relevant because both
  15399. the bytecodes, and the profiling data, may change after some number of executions.
  15400. Also fixes some random dumping code to use PrintStream& rather than
  15401. static const char[thingy].
  15402. * CMakeLists.txt:
  15403. * GNUmakefile.list.am:
  15404. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  15405. * JavaScriptCore.xcodeproj/project.pbxproj:
  15406. * Target.pri:
  15407. * bytecode/ArrayProfile.cpp:
  15408. (JSC::dumpArrayModes):
  15409. (JSC::ArrayProfile::briefDescription):
  15410. * bytecode/ArrayProfile.h:
  15411. * bytecode/CodeBlock.cpp:
  15412. (JSC::CodeBlock::printGetByIdOp):
  15413. (JSC::CodeBlock::printGetByIdCacheStatus):
  15414. (JSC::CodeBlock::printCallOp):
  15415. (JSC::CodeBlock::dumpValueProfiling):
  15416. (JSC::CodeBlock::dumpArrayProfiling):
  15417. (JSC::CodeBlock::dumpBytecode):
  15418. * bytecode/CodeBlock.h:
  15419. * bytecode/ValueProfile.h:
  15420. (JSC::ValueProfileBase::briefDescription):
  15421. * dfg/DFGAbstractValue.h:
  15422. (JSC::DFG::AbstractValue::dump):
  15423. * dfg/DFGByteCodeParser.cpp:
  15424. (JSC::DFG::ByteCodeParser::parseCodeBlock):
  15425. * jit/JIT.cpp:
  15426. (JSC::JIT::privateCompile):
  15427. * profiler/ProfilerBytecodeSequence.cpp: Added.
  15428. (JSC::Profiler::BytecodeSequence::BytecodeSequence):
  15429. (JSC::Profiler::BytecodeSequence::~BytecodeSequence):
  15430. (JSC::Profiler::BytecodeSequence::indexForBytecodeIndex):
  15431. (JSC::Profiler::BytecodeSequence::forBytecodeIndex):
  15432. (JSC::Profiler::BytecodeSequence::addSequenceProperties):
  15433. * profiler/ProfilerBytecodeSequence.h: Added.
  15434. (JSC::Profiler::BytecodeSequence::size):
  15435. (JSC::Profiler::BytecodeSequence::at):
  15436. * profiler/ProfilerBytecodes.cpp:
  15437. (JSC::Profiler::Bytecodes::Bytecodes):
  15438. (JSC::Profiler::Bytecodes::toJS):
  15439. * profiler/ProfilerBytecodes.h:
  15440. (JSC::Profiler::Bytecodes::instructionCount):
  15441. * profiler/ProfilerCompilation.cpp:
  15442. (JSC::Profiler::Compilation::addProfiledBytecodes):
  15443. (JSC::Profiler::Compilation::toJS):
  15444. * profiler/ProfilerCompilation.h:
  15445. (JSC::Profiler::Compilation::profiledBytecodesSize):
  15446. (JSC::Profiler::Compilation::profiledBytecodesAt):
  15447. * profiler/ProfilerDatabase.cpp:
  15448. (JSC::Profiler::Database::ensureBytecodesFor):
  15449. * profiler/ProfilerDatabase.h:
  15450. * profiler/ProfilerProfiledBytecodes.cpp: Added.
  15451. (JSC::Profiler::ProfiledBytecodes::ProfiledBytecodes):
  15452. (JSC::Profiler::ProfiledBytecodes::~ProfiledBytecodes):
  15453. (JSC::Profiler::ProfiledBytecodes::toJS):
  15454. * profiler/ProfilerProfiledBytecodes.h: Added.
  15455. (JSC::Profiler::ProfiledBytecodes::bytecodes):
  15456. * runtime/CommonIdentifiers.h:
  15457. 2012-12-11 Oswald Buddenhagen <oswald.buddenhagen@digia.com>
  15458. [Qt] delete dead include paths
  15459. Reviewed by Simon Hausmann.
  15460. followup to https://bugs.webkit.org/show_bug.cgi?id=93446
  15461. * JavaScriptCore.pri:
  15462. 2012-12-11 Julien BRIANCEAU <jbrianceau@nds.com>
  15463. Implement add64 for SH4 assembler to fix build after r136601
  15464. https://bugs.webkit.org/show_bug.cgi?id=104377
  15465. Reviewed by Zoltan Herczeg.
  15466. * assembler/MacroAssemblerSH4.h:
  15467. (JSC::MacroAssemblerSH4::add64):
  15468. (MacroAssemblerSH4):
  15469. 2012-12-10 Yury Semikhatsky <yurys@chromium.org>
  15470. Memory instrumentation: make sure each edge is reported only once
  15471. https://bugs.webkit.org/show_bug.cgi?id=104630
  15472. Reviewed by Pavel Feldman.
  15473. Changed exported symbols for MemoryInstrumentation.
  15474. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  15475. 2012-12-10 Filip Pizlo <fpizlo@apple.com>
  15476. Don't OSR exit just because a string is a rope
  15477. https://bugs.webkit.org/show_bug.cgi?id=104621
  15478. Reviewed by Michael Saboff.
  15479. Slight SunSpider speed-up at around the 0.7% level. This patch does the obvious
  15480. thing of calling a slow path to resolve ropes rather than OSR exiting if the
  15481. string is a rope.
  15482. * dfg/DFGAbstractState.cpp:
  15483. (JSC::DFG::AbstractState::execute):
  15484. * dfg/DFGArrayMode.h:
  15485. (JSC::DFG::ArrayMode::getIndexedPropertyStorageMayTriggerGC):
  15486. (ArrayMode):
  15487. * dfg/DFGCSEPhase.cpp:
  15488. (JSC::DFG::CSEPhase::putStructureStoreElimination):
  15489. * dfg/DFGOperations.cpp:
  15490. * dfg/DFGOperations.h:
  15491. * dfg/DFGSpeculativeJIT.cpp:
  15492. (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
  15493. * dfg/DFGSpeculativeJIT.h:
  15494. (JSC::DFG::SpeculativeJIT::callOperation):
  15495. 2012-12-10 Gustavo Noronha Silva <gns@gnome.org>
  15496. Unreviewed distcheck fix.
  15497. * GNUmakefile.list.am:
  15498. 2012-12-10 Filip Pizlo <fpizlo@apple.com>
  15499. JSC profiling and debug dump code should use inferred names when possible
  15500. https://bugs.webkit.org/show_bug.cgi?id=104519
  15501. Reviewed by Oliver Hunt.
  15502. This does as advertised: the profiler now knows the inferred name of all code blocks,
  15503. and all uses of CodeBlock::dump() dump it along with the hash.
  15504. * bytecode/CodeBlock.cpp:
  15505. (JSC::CodeBlock::inferredName):
  15506. (JSC::CodeBlock::dumpAssumingJITType):
  15507. * bytecode/CodeBlock.h:
  15508. * profiler/ProfilerBytecodes.cpp:
  15509. (JSC::Profiler::Bytecodes::Bytecodes):
  15510. (JSC::Profiler::Bytecodes::toJS):
  15511. * profiler/ProfilerBytecodes.h:
  15512. (JSC::Profiler::Bytecodes::inferredName):
  15513. * profiler/ProfilerDatabase.cpp:
  15514. (JSC::Profiler::Database::addBytecodes):
  15515. (JSC::Profiler::Database::ensureBytecodesFor):
  15516. * profiler/ProfilerDatabase.h:
  15517. * runtime/CommonIdentifiers.h:
  15518. 2012-12-09 Filip Pizlo <fpizlo@apple.com>
  15519. Profiler should say things about OSR exits
  15520. https://bugs.webkit.org/show_bug.cgi?id=104497
  15521. Reviewed by Oliver Hunt.
  15522. This adds support for profiling OSR exits. For each exit that is taken, the profiler
  15523. records the machine code address that the exit occurred on, the exit kind, the origin
  15524. stack, and the number of times that it happened.
  15525. * CMakeLists.txt:
  15526. * GNUmakefile.list.am:
  15527. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  15528. * JavaScriptCore.xcodeproj/project.pbxproj:
  15529. * Target.pri:
  15530. * assembler/AbstractMacroAssembler.h:
  15531. (Jump):
  15532. (JSC::AbstractMacroAssembler::Jump::label):
  15533. * bytecode/CodeBlock.h:
  15534. (JSC::CodeBlock::saveCompilation):
  15535. (CodeBlock):
  15536. (JSC::CodeBlock::compilation):
  15537. (DFGData):
  15538. * bytecode/DFGExitProfile.h:
  15539. (DFG):
  15540. * bytecode/ExitKind.cpp: Added.
  15541. (JSC):
  15542. (JSC::exitKindToString):
  15543. (JSC::exitKindIsCountable):
  15544. (WTF):
  15545. (WTF::printInternal):
  15546. * bytecode/ExitKind.h: Added.
  15547. (JSC):
  15548. (WTF):
  15549. * dfg/DFGGraph.h:
  15550. (Graph):
  15551. * dfg/DFGJITCompiler.cpp:
  15552. (JSC::DFG::JITCompiler::linkOSRExits):
  15553. (JSC::DFG::JITCompiler::link):
  15554. (JSC::DFG::JITCompiler::compile):
  15555. (JSC::DFG::JITCompiler::compileFunction):
  15556. * dfg/DFGJITCompiler.h:
  15557. (JITCompiler):
  15558. * dfg/DFGOSRExitCompiler.cpp:
  15559. * jit/JIT.cpp:
  15560. (JSC::JIT::JIT):
  15561. (JSC::JIT::privateCompile):
  15562. * jit/JIT.h:
  15563. (JIT):
  15564. * jit/JumpReplacementWatchpoint.h:
  15565. (JSC::JumpReplacementWatchpoint::sourceLabel):
  15566. (JumpReplacementWatchpoint):
  15567. * profiler/ProfilerCompilation.cpp:
  15568. (JSC::Profiler::Compilation::addOSRExitSite):
  15569. (Profiler):
  15570. (JSC::Profiler::Compilation::addOSRExit):
  15571. (JSC::Profiler::Compilation::toJS):
  15572. * profiler/ProfilerCompilation.h:
  15573. (Compilation):
  15574. * profiler/ProfilerDatabase.cpp:
  15575. (JSC::Profiler::Database::newCompilation):
  15576. * profiler/ProfilerDatabase.h:
  15577. (Database):
  15578. * profiler/ProfilerOSRExit.cpp: Added.
  15579. (Profiler):
  15580. (JSC::Profiler::OSRExit::OSRExit):
  15581. (JSC::Profiler::OSRExit::~OSRExit):
  15582. (JSC::Profiler::OSRExit::toJS):
  15583. * profiler/ProfilerOSRExit.h: Added.
  15584. (Profiler):
  15585. (OSRExit):
  15586. (JSC::Profiler::OSRExit::id):
  15587. (JSC::Profiler::OSRExit::origin):
  15588. (JSC::Profiler::OSRExit::exitKind):
  15589. (JSC::Profiler::OSRExit::isWatchpoint):
  15590. (JSC::Profiler::OSRExit::counterAddress):
  15591. (JSC::Profiler::OSRExit::count):
  15592. * profiler/ProfilerOSRExitSite.cpp: Added.
  15593. (Profiler):
  15594. (JSC::Profiler::OSRExitSite::toJS):
  15595. * profiler/ProfilerOSRExitSite.h: Added.
  15596. (Profiler):
  15597. (OSRExitSite):
  15598. (JSC::Profiler::OSRExitSite::OSRExitSite):
  15599. (JSC::Profiler::OSRExitSite::codeAddress):
  15600. * runtime/CommonIdentifiers.h:
  15601. 2012-12-10 Alexis Menard <alexis@webkit.org>
  15602. [CSS3 Backgrounds and Borders] Remove CSS3_BACKGROUND feature flag.
  15603. https://bugs.webkit.org/show_bug.cgi?id=104539
  15604. Reviewed by Antonio Gomes.
  15605. As discussed on webkit-dev it is not needed to keep this feature flag
  15606. as support for <position> type is a small feature that is already
  15607. implemented by three other UAs. It was useful while landing this
  15608. feature as partial bits were landed one after one.
  15609. * Configurations/FeatureDefines.xcconfig:
  15610. 2012-12-09 Filip Pizlo <fpizlo@apple.com>
  15611. DFG ArrayPush/Pop should not pass their second child as the index for blessArrayOperation()
  15612. https://bugs.webkit.org/show_bug.cgi?id=104500
  15613. Reviewed by Oliver Hunt.
  15614. Slight across-the-board speed-up.
  15615. * dfg/DFGAbstractState.cpp:
  15616. (JSC::DFG::AbstractState::execute):
  15617. * dfg/DFGFixupPhase.cpp:
  15618. (JSC::DFG::FixupPhase::fixupNode):
  15619. 2012-12-08 Filip Pizlo <fpizlo@apple.com>
  15620. JSC should scale the optimization threshold for a code block according to the cost of compiling it
  15621. https://bugs.webkit.org/show_bug.cgi?id=104406
  15622. Reviewed by Oliver Hunt.
  15623. We've long known that we want to scale the execution count threshold needed for the DFG
  15624. to kick in to scale according to some estimate of the cost of compiling that code block.
  15625. This institutes a relationship like this:
  15626. threshold = thresholdSetting * (a * sqrt(instructionCount + b) + abs(c * instructionCount) + d
  15627. Where a, b, c, d are coefficients derived from fitting the above expression to various
  15628. data points, which I chose based on looking at one benchmark (3d-cube) and from my
  15629. own intuitions.
  15630. Making this work well also required changing the thresholdForOptimizeAfterLongWarmUp
  15631. from 5000 to 1000.
  15632. This is a >1% speed-up on SunSpider, a >3% speed-up on V8Spider, ~1% speed-up on V8v7,
  15633. neutral on Octane, and neutral on Kraken.
  15634. I also out-of-lined a bunch of methods related to these heuristics, because I couldn't
  15635. stand having them defined in the header anymore. I also made improvements to debugging
  15636. code because I needed it for tuning this change.
  15637. * CMakeLists.txt:
  15638. * GNUmakefile.list.am:
  15639. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  15640. * JavaScriptCore.xcodeproj/project.pbxproj:
  15641. * Target.pri:
  15642. * bytecode/CodeBlock.cpp:
  15643. (JSC::CodeBlock::sourceCodeForTools):
  15644. (JSC::CodeBlock::sourceCodeOnOneLine):
  15645. (JSC::CodeBlock::dumpBytecode):
  15646. (JSC::CodeBlock::CodeBlock):
  15647. (JSC::CodeBlock::reoptimizationRetryCounter):
  15648. (JSC::CodeBlock::countReoptimization):
  15649. (JSC::CodeBlock::optimizationThresholdScalingFactor):
  15650. (JSC::clipThreshold):
  15651. (JSC::CodeBlock::counterValueForOptimizeAfterWarmUp):
  15652. (JSC::CodeBlock::counterValueForOptimizeAfterLongWarmUp):
  15653. (JSC::CodeBlock::counterValueForOptimizeSoon):
  15654. (JSC::CodeBlock::checkIfOptimizationThresholdReached):
  15655. (JSC::CodeBlock::optimizeNextInvocation):
  15656. (JSC::CodeBlock::dontOptimizeAnytimeSoon):
  15657. (JSC::CodeBlock::optimizeAfterWarmUp):
  15658. (JSC::CodeBlock::optimizeAfterLongWarmUp):
  15659. (JSC::CodeBlock::optimizeSoon):
  15660. (JSC::CodeBlock::adjustedExitCountThreshold):
  15661. (JSC::CodeBlock::exitCountThresholdForReoptimization):
  15662. (JSC::CodeBlock::exitCountThresholdForReoptimizationFromLoop):
  15663. (JSC::CodeBlock::shouldReoptimizeNow):
  15664. (JSC::CodeBlock::shouldReoptimizeFromLoopNow):
  15665. * bytecode/CodeBlock.h:
  15666. * bytecode/ExecutionCounter.cpp:
  15667. (JSC::ExecutionCounter::hasCrossedThreshold):
  15668. * bytecode/ReduceWhitespace.cpp: Added.
  15669. (JSC::reduceWhitespace):
  15670. * bytecode/ReduceWhitespace.h: Added.
  15671. * dfg/DFGCapabilities.cpp:
  15672. (JSC::DFG::mightCompileEval):
  15673. (JSC::DFG::mightCompileProgram):
  15674. (JSC::DFG::mightCompileFunctionForCall):
  15675. (JSC::DFG::mightCompileFunctionForConstruct):
  15676. (JSC::DFG::mightInlineFunctionForCall):
  15677. (JSC::DFG::mightInlineFunctionForConstruct):
  15678. * dfg/DFGCapabilities.h:
  15679. * dfg/DFGDisassembler.cpp:
  15680. (JSC::DFG::Disassembler::dumpHeader):
  15681. * dfg/DFGOSREntry.cpp:
  15682. (JSC::DFG::prepareOSREntry):
  15683. * jit/JITDisassembler.cpp:
  15684. (JSC::JITDisassembler::dumpHeader):
  15685. * jit/JITStubs.cpp:
  15686. (JSC::DEFINE_STUB_FUNCTION):
  15687. * llint/LLIntSlowPaths.cpp:
  15688. (JSC::LLInt::entryOSR):
  15689. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  15690. * profiler/ProfilerDatabase.cpp:
  15691. (JSC::Profiler::Database::ensureBytecodesFor):
  15692. * runtime/Options.h:
  15693. 2012-12-07 Jonathan Liu <net147@gmail.com>
  15694. Add missing forward declaration for JSC::ArrayAllocationProfile
  15695. https://bugs.webkit.org/show_bug.cgi?id=104425
  15696. Reviewed by Kentaro Hara.
  15697. The header for the JSC::ArrayConstructor class is missing a forward
  15698. declaration for the JSC::ArrayAllocationProfile class which causes
  15699. compilation to fail when compiling with MinGW-w64.
  15700. * runtime/ArrayConstructor.h:
  15701. (JSC):
  15702. 2012-12-07 Jonathan Liu <net147@gmail.com>
  15703. Add missing const qualifier to JSC::CodeBlock::getJITType()
  15704. https://bugs.webkit.org/show_bug.cgi?id=104424
  15705. Reviewed by Laszlo Gombos.
  15706. JSC::CodeBlock::getJITType() has the const qualifier when JIT is
  15707. enabled but is missing the const qualifier when JIT is disabled.
  15708. * bytecode/CodeBlock.h:
  15709. (JSC::CodeBlock::getJITType):
  15710. 2012-12-07 Oliver Hunt <oliver@apple.com>
  15711. Make function code cache proportional to main codeblock cache
  15712. https://bugs.webkit.org/show_bug.cgi?id=104420
  15713. Reviewed by Geoffrey Garen.
  15714. Makes the constants determining the recently used function cache proportional
  15715. to the number of root codeblocks in the cache. Also renames the constants to
  15716. make them more clear.
  15717. * runtime/CodeCache.h:
  15718. 2012-12-06 Filip Pizlo <fpizlo@apple.com>
  15719. Strange results calculating a square root in a loop
  15720. https://bugs.webkit.org/show_bug.cgi?id=104247
  15721. <rdar://problem/12826880>
  15722. Reviewed by Oliver Hunt.
  15723. Fixed the CFG simplification phase to ignore dead GetLocals in the first of the blocks
  15724. under the merge. This fixes the assertion, and is also cleaner: our general rule is
  15725. to not "revive" things that we've already proved to be dead.
  15726. Also fixed some rotted debug code.
  15727. * dfg/DFGCFGSimplificationPhase.cpp:
  15728. (JSC::DFG::CFGSimplificationPhase::fixPossibleGetLocal):
  15729. * dfg/DFGStructureCheckHoistingPhase.cpp:
  15730. (JSC::DFG::StructureCheckHoistingPhase::run):
  15731. 2012-12-07 Geoffrey Garen <ggaren@apple.com>
  15732. Crash in JSC::Bindings::RootObject::globalObject() sync'ing notes in Evernote
  15733. https://bugs.webkit.org/show_bug.cgi?id=104321
  15734. <rdar://problem/12770497>
  15735. Reviewed by Sam Weinig.
  15736. Work around a JSValueUnprotect(NULL) in Evernote.
  15737. * API/JSValueRef.cpp:
  15738. (evernoteHackNeeded):
  15739. (JSValueUnprotect):
  15740. 2012-12-06 Filip Pizlo <fpizlo@apple.com>
  15741. Incorrect inequality for checking whether a statement is within bounds of a handler
  15742. https://bugs.webkit.org/show_bug.cgi?id=104313
  15743. <rdar://problem/12808934>
  15744. Reviewed by Geoffrey Garen.
  15745. The most relevant change is in handlerForBytecodeOffset(), which fixes the inequality
  15746. used for checking whether a handler is pertinent to the current instruction. '<' is
  15747. correct, but '<=' isn't, since the 'end' is not inclusive.
  15748. Also found, and addressed, a benign goof in how the finally inliner works: sometimes
  15749. we will have end > start. This falls out naturally from how the inliner works and how
  15750. we pop scopes in the bytecompiler, but it's sufficiently surprising that, to avoid any
  15751. future confusion, I added a comment and some code to prune those handlers out. Because
  15752. of how the handler resolution works, these handlers would have been skipped anyway.
  15753. Also made various fixes to debugging code, which was necessary for tracking this down.
  15754. * bytecode/CodeBlock.cpp:
  15755. (JSC::CodeBlock::dumpBytecode):
  15756. (JSC::CodeBlock::handlerForBytecodeOffset):
  15757. * bytecompiler/BytecodeGenerator.cpp:
  15758. (JSC::BytecodeGenerator::generate):
  15759. * bytecompiler/Label.h:
  15760. (JSC::Label::bind):
  15761. * interpreter/Interpreter.cpp:
  15762. (JSC::Interpreter::throwException):
  15763. * llint/LLIntExceptions.cpp:
  15764. (JSC::LLInt::interpreterThrowInCaller):
  15765. (JSC::LLInt::returnToThrow):
  15766. (JSC::LLInt::callToThrow):
  15767. * llint/LLIntSlowPaths.cpp:
  15768. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  15769. (JSC::LLInt::handleHostCall):
  15770. 2012-12-06 Rick Byers <rbyers@chromium.org>
  15771. CSS cursor property should support webkit-image-set
  15772. https://bugs.webkit.org/show_bug.cgi?id=99493
  15773. Reviewed by Beth Dakin.
  15774. Add ENABLE_MOUSE_CURSOR_SCALE (disabled by default)
  15775. * Configurations/FeatureDefines.xcconfig:
  15776. 2012-12-06 Laszlo Gombos <l.gombos@samsung.com>
  15777. [CMake] Consolidate list of files to build for JavaScriptCore
  15778. https://bugs.webkit.org/show_bug.cgi?id=104287
  15779. Reviewed by Gyuyoung Kim.
  15780. Add MemoryStatistics.cpp and ExecutableAllocator.cpp to the common
  15781. list of files and remove them from the port specific lists.
  15782. * CMakeLists.txt:
  15783. * PlatformBlackBerry.cmake:
  15784. * PlatformEfl.cmake:
  15785. * PlatformWinCE.cmake:
  15786. 2012-12-06 Oliver Hunt <oliver@apple.com>
  15787. Tell heap that we've released all the compiled code.
  15788. Reviewed by Geoff Garen.
  15789. When we discard compiled code, inform the heap that we've
  15790. released an entire object graph. This informs the heap that
  15791. it might want to perform a GC soon.
  15792. * runtime/JSGlobalData.cpp:
  15793. (JSC::JSGlobalData::discardAllCode):
  15794. 2012-12-06 Laszlo Gombos <l.gombos@samsung.com>
  15795. [EFL] Remove ENABLE_GLIB_SUPPORT CMake variable
  15796. https://bugs.webkit.org/show_bug.cgi?id=104278
  15797. Reviewed by Brent Fulgham.
  15798. The conditional is not required as it is always set for EFL.
  15799. * PlatformEfl.cmake:
  15800. 2012-12-06 Oliver Hunt <oliver@apple.com>
  15801. Build fix, last patch rolled out logic that is now needed on ToT.
  15802. * parser/ASTBuilder.h:
  15803. (ASTBuilder):
  15804. (JSC::ASTBuilder::setFunctionStart):
  15805. * parser/Nodes.h:
  15806. (JSC::FunctionBodyNode::setFunctionStart):
  15807. (JSC::FunctionBodyNode::functionStart):
  15808. (FunctionBodyNode):
  15809. * parser/Parser.cpp:
  15810. (JSC::::parseFunctionInfo):
  15811. * parser/SyntaxChecker.h:
  15812. (JSC::SyntaxChecker::setFunctionStart):
  15813. 2012-12-05 Oliver Hunt <oliver@apple.com>
  15814. Remove harmful string->function cache
  15815. https://bugs.webkit.org/show_bug.cgi?id=104193
  15816. Reviewed by Alexey Proskuryakov.
  15817. Remove the string->function code cache that turned out to actually
  15818. be quite harmful.
  15819. * runtime/CodeCache.cpp:
  15820. (JSC::CodeCache::getFunctionCodeBlock):
  15821. * runtime/CodeCache.h:
  15822. (JSC::CodeCache::clear):
  15823. 2012-12-05 Halton Huo <halton.huo@intel.com>
  15824. [CMake] Unify coding style for CMake files
  15825. https://bugs.webkit.org/show_bug.cgi?id=103605
  15826. Reviewed by Laszlo Gombos.
  15827. Update cmake files(.cmake, CMakeLists.txt) with following style rules:
  15828. 1. Indentation
  15829. 1.1 Use spaces, not tabs.
  15830. 1.2 Four spaces as indent.
  15831. 2. Spacing
  15832. 2.1 Place one space between control statements and their parentheses.
  15833. For eg, if (), else (), elseif (), endif (), foreach (),
  15834. endforeach (), while (), endwhile (), break ().
  15835. 2.2 Do not place spaces between function and macro statements and
  15836. their parentheses. For eg, macro(), endmacro(), function(),
  15837. endfunction().
  15838. 2.3 Do not place spaces between a command or function or macro and its
  15839. parentheses, or between a parenthesis and its content. For eg,
  15840. message("testing") not message( "testing") or message ("testing" )
  15841. 2.4 No space at line ending.
  15842. 3. Lowercase when call commands macros and functions. For eg,
  15843. add_executable() not ADD_EXECUTABLE(), set() not SET().
  15844. * CMakeLists.txt:
  15845. * PlatformBlackBerry.cmake:
  15846. * PlatformEfl.cmake:
  15847. * PlatformWinCE.cmake:
  15848. * shell/CMakeLists.txt:
  15849. * shell/PlatformBlackBerry.cmake:
  15850. * shell/PlatformEfl.cmake:
  15851. * shell/PlatformWinCE.cmake:
  15852. 2012-12-05 Oliver Hunt <oliver@apple.com>
  15853. Empty parse cache when receiving a low memory warning
  15854. https://bugs.webkit.org/show_bug.cgi?id=104161
  15855. Reviewed by Filip Pizlo.
  15856. This adds a function to the globaldata to empty all code related data
  15857. structures (code in the heap and the code cache).
  15858. It also adds a function to allow the CodeCache to actually be cleared
  15859. at all.
  15860. * runtime/CodeCache.h:
  15861. (CacheMap):
  15862. (JSC::CacheMap::clear):
  15863. (JSC::CodeCache::clear):
  15864. (CodeCache):
  15865. * runtime/JSGlobalData.cpp:
  15866. (JSC::JSGlobalData::discardAllCode):
  15867. (JSC):
  15868. * runtime/JSGlobalData.h:
  15869. (JSGlobalData):
  15870. 2012-12-05 Filip Pizlo <fpizlo@apple.com>
  15871. JSC profiler should not count executions of op_call_put_result because doing so changes DFG codegen
  15872. https://bugs.webkit.org/show_bug.cgi?id=104102
  15873. Reviewed by Oliver Hunt.
  15874. This removes op_call_put_result from profiling, since profiling it has an effect on
  15875. codegen. This fix enables all of SunSpider, V8, and Kraken to be profiled with the
  15876. new profiler.
  15877. To make this all fit together, the profiler now also reports in its output the exact
  15878. bytecode opcode name for each instruction (in addition to the stringified dump of that
  15879. bytecode), so that tools that grok the output can take note of op_call_put_result and
  15880. work around the fact that it has no counts.
  15881. * dfg/DFGByteCodeParser.cpp:
  15882. (JSC::DFG::ByteCodeParser::parseBlock):
  15883. (JSC::DFG::ByteCodeParser::parseCodeBlock):
  15884. * dfg/DFGDriver.cpp:
  15885. (JSC::DFG::compile):
  15886. * jit/JIT.cpp:
  15887. (JSC::JIT::privateCompileMainPass):
  15888. * profiler/ProfilerBytecode.cpp:
  15889. (JSC::Profiler::Bytecode::toJS):
  15890. * profiler/ProfilerBytecode.h:
  15891. (JSC::Profiler::Bytecode::Bytecode):
  15892. (JSC::Profiler::Bytecode::opcodeID):
  15893. (Bytecode):
  15894. * profiler/ProfilerDatabase.cpp:
  15895. (JSC::Profiler::Database::ensureBytecodesFor):
  15896. * runtime/CommonIdentifiers.h:
  15897. 2012-12-04 Filip Pizlo <fpizlo@apple.com>
  15898. display-profiler-output should be able to show source code
  15899. https://bugs.webkit.org/show_bug.cgi?id=104073
  15900. Reviewed by Oliver Hunt.
  15901. Modify the profiler database to store source code. For functions, we store the
  15902. function including the function signature.
  15903. * bytecode/CodeBlock.h:
  15904. (JSC::CodeBlock::unlinkedCodeBlock):
  15905. (CodeBlock):
  15906. * profiler/ProfilerBytecodes.cpp:
  15907. (JSC::Profiler::Bytecodes::Bytecodes):
  15908. (JSC::Profiler::Bytecodes::toJS):
  15909. * profiler/ProfilerBytecodes.h:
  15910. (Bytecodes):
  15911. (JSC::Profiler::Bytecodes::sourceCode):
  15912. * profiler/ProfilerDatabase.cpp:
  15913. (JSC::Profiler::Database::addBytecodes):
  15914. (JSC::Profiler::Database::ensureBytecodesFor):
  15915. * profiler/ProfilerDatabase.h:
  15916. (Database):
  15917. * runtime/CommonIdentifiers.h:
  15918. * runtime/Executable.h:
  15919. (FunctionExecutable):
  15920. (JSC::FunctionExecutable::unlinkedExecutable):
  15921. 2012-12-02 Filip Pizlo <fpizlo@apple.com>
  15922. JSC should be able to report profiling data associated with the IR dumps and disassembly
  15923. https://bugs.webkit.org/show_bug.cgi?id=102999
  15924. Reviewed by Gavin Barraclough.
  15925. Added a new profiler to JSC. It's simply called "Profiler" in anticipation of it
  15926. ultimately replacing the previous profiling infrastructure. This profiler counts the
  15927. number of times that a bytecode executes in various engines, and will record both the
  15928. counts and all disassembly and bytecode dumps, into a database that can be at any
  15929. time turned into either a JS object using any global object or global data of your
  15930. choice, or can be turned into a JSON string, or saved to a file.
  15931. Currently the only use of this is the new '-p <file>' flag to the jsc command-line.
  15932. The profiler is always compiled in and normally incurs no execution time cost, but is
  15933. only activated when you create a Profiler::Database and install it in
  15934. JSGlobalData::m_perBytecodeProfiler. From that point on, all code blocks will be
  15935. compiled along with disassembly and bytecode dumps stored into the Profiler::Database,
  15936. and all code blocks will have execution counts, which are also stored in the database.
  15937. The database will continue to keep information about code blocks alive even after they
  15938. are otherwise GC'd.
  15939. This currently still has some glitches, like the fact that it only counts executions
  15940. in the JITs. Doing execution counting in the LLInt might require a bit of a rethink
  15941. about how the counting is expressed - currently it is implicit in bytecode, so there
  15942. is no easy way to "turn it on" in the LLInt. Also, right now there is no information
  15943. recorded about OSR exits or out-of-line stubs. But, even so, it's quite cool, and
  15944. gives you a peek into what JSC is doing that would otherwise not be possible.
  15945. * CMakeLists.txt:
  15946. * GNUmakefile.list.am:
  15947. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  15948. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  15949. * JavaScriptCore.xcodeproj/project.pbxproj:
  15950. * Target.pri:
  15951. * bytecode/CodeBlock.cpp:
  15952. (JSC::CodeBlock::~CodeBlock):
  15953. * bytecode/CodeBlock.h:
  15954. (CodeBlock):
  15955. (JSC::CodeBlock::baselineVersion):
  15956. * bytecode/CodeOrigin.cpp:
  15957. (JSC::InlineCallFrame::baselineCodeBlock):
  15958. (JSC):
  15959. * bytecode/CodeOrigin.h:
  15960. (InlineCallFrame):
  15961. * dfg/DFGAbstractState.cpp:
  15962. (JSC::DFG::AbstractState::execute):
  15963. * dfg/DFGByteCodeParser.cpp:
  15964. (JSC::DFG::ByteCodeParser::parseBlock):
  15965. * dfg/DFGDisassembler.cpp:
  15966. (JSC::DFG::Disassembler::dump):
  15967. (DFG):
  15968. (JSC::DFG::Disassembler::reportToProfiler):
  15969. (JSC::DFG::Disassembler::dumpHeader):
  15970. (JSC::DFG::Disassembler::append):
  15971. (JSC::DFG::Disassembler::createDumpList):
  15972. * dfg/DFGDisassembler.h:
  15973. (Disassembler):
  15974. (JSC::DFG::Disassembler::DumpedOp::DumpedOp):
  15975. (DumpedOp):
  15976. * dfg/DFGGraph.cpp:
  15977. (JSC::DFG::Graph::Graph):
  15978. (JSC::DFG::Graph::dumpCodeOrigin):
  15979. (JSC::DFG::Graph::dump):
  15980. * dfg/DFGGraph.h:
  15981. (Graph):
  15982. * dfg/DFGJITCompiler.cpp:
  15983. (JSC::DFG::JITCompiler::JITCompiler):
  15984. (JSC::DFG::JITCompiler::compile):
  15985. (JSC::DFG::JITCompiler::compileFunction):
  15986. * dfg/DFGNode.h:
  15987. (Node):
  15988. (JSC::DFG::Node::hasExecutionCounter):
  15989. (JSC::DFG::Node::executionCounter):
  15990. * dfg/DFGNodeType.h:
  15991. (DFG):
  15992. * dfg/DFGPredictionPropagationPhase.cpp:
  15993. (JSC::DFG::PredictionPropagationPhase::propagate):
  15994. * dfg/DFGSpeculativeJIT32_64.cpp:
  15995. (JSC::DFG::SpeculativeJIT::compile):
  15996. * dfg/DFGSpeculativeJIT64.cpp:
  15997. (JSC::DFG::SpeculativeJIT::compile):
  15998. * jit/JIT.cpp:
  15999. (JSC::JIT::JIT):
  16000. (JSC::JIT::privateCompileMainPass):
  16001. (JSC::JIT::privateCompile):
  16002. * jit/JIT.h:
  16003. (JIT):
  16004. * jit/JITDisassembler.cpp:
  16005. (JSC::JITDisassembler::dump):
  16006. (JSC::JITDisassembler::reportToProfiler):
  16007. (JSC):
  16008. (JSC::JITDisassembler::dumpHeader):
  16009. (JSC::JITDisassembler::firstSlowLabel):
  16010. (JSC::JITDisassembler::dumpVectorForInstructions):
  16011. (JSC::JITDisassembler::dumpForInstructions):
  16012. (JSC::JITDisassembler::reportInstructions):
  16013. * jit/JITDisassembler.h:
  16014. (JITDisassembler):
  16015. (DumpedOp):
  16016. * jsc.cpp:
  16017. (CommandLine::CommandLine):
  16018. (CommandLine):
  16019. (printUsageStatement):
  16020. (CommandLine::parseArguments):
  16021. (jscmain):
  16022. * profiler/ProfilerBytecode.cpp: Added.
  16023. (Profiler):
  16024. (JSC::Profiler::Bytecode::toJS):
  16025. * profiler/ProfilerBytecode.h: Added.
  16026. (Profiler):
  16027. (Bytecode):
  16028. (JSC::Profiler::Bytecode::Bytecode):
  16029. (JSC::Profiler::Bytecode::bytecodeIndex):
  16030. (JSC::Profiler::Bytecode::description):
  16031. (JSC::Profiler::getBytecodeIndexForBytecode):
  16032. * profiler/ProfilerBytecodes.cpp: Added.
  16033. (Profiler):
  16034. (JSC::Profiler::Bytecodes::Bytecodes):
  16035. (JSC::Profiler::Bytecodes::~Bytecodes):
  16036. (JSC::Profiler::Bytecodes::indexForBytecodeIndex):
  16037. (JSC::Profiler::Bytecodes::forBytecodeIndex):
  16038. (JSC::Profiler::Bytecodes::dump):
  16039. (JSC::Profiler::Bytecodes::toJS):
  16040. * profiler/ProfilerBytecodes.h: Added.
  16041. (Profiler):
  16042. (Bytecodes):
  16043. (JSC::Profiler::Bytecodes::append):
  16044. (JSC::Profiler::Bytecodes::id):
  16045. (JSC::Profiler::Bytecodes::hash):
  16046. (JSC::Profiler::Bytecodes::size):
  16047. (JSC::Profiler::Bytecodes::at):
  16048. * profiler/ProfilerCompilation.cpp: Added.
  16049. (Profiler):
  16050. (JSC::Profiler::Compilation::Compilation):
  16051. (JSC::Profiler::Compilation::~Compilation):
  16052. (JSC::Profiler::Compilation::addDescription):
  16053. (JSC::Profiler::Compilation::executionCounterFor):
  16054. (JSC::Profiler::Compilation::toJS):
  16055. * profiler/ProfilerCompilation.h: Added.
  16056. (Profiler):
  16057. (Compilation):
  16058. (JSC::Profiler::Compilation::bytecodes):
  16059. (JSC::Profiler::Compilation::kind):
  16060. * profiler/ProfilerCompilationKind.cpp: Added.
  16061. (WTF):
  16062. (WTF::printInternal):
  16063. * profiler/ProfilerCompilationKind.h: Added.
  16064. (Profiler):
  16065. (WTF):
  16066. * profiler/ProfilerCompiledBytecode.cpp: Added.
  16067. (Profiler):
  16068. (JSC::Profiler::CompiledBytecode::CompiledBytecode):
  16069. (JSC::Profiler::CompiledBytecode::~CompiledBytecode):
  16070. (JSC::Profiler::CompiledBytecode::toJS):
  16071. * profiler/ProfilerCompiledBytecode.h: Added.
  16072. (Profiler):
  16073. (CompiledBytecode):
  16074. (JSC::Profiler::CompiledBytecode::originStack):
  16075. (JSC::Profiler::CompiledBytecode::description):
  16076. * profiler/ProfilerDatabase.cpp: Added.
  16077. (Profiler):
  16078. (JSC::Profiler::Database::Database):
  16079. (JSC::Profiler::Database::~Database):
  16080. (JSC::Profiler::Database::addBytecodes):
  16081. (JSC::Profiler::Database::ensureBytecodesFor):
  16082. (JSC::Profiler::Database::notifyDestruction):
  16083. (JSC::Profiler::Database::newCompilation):
  16084. (JSC::Profiler::Database::toJS):
  16085. (JSC::Profiler::Database::toJSON):
  16086. (JSC::Profiler::Database::save):
  16087. * profiler/ProfilerDatabase.h: Added.
  16088. (Profiler):
  16089. (Database):
  16090. * profiler/ProfilerExecutionCounter.h: Added.
  16091. (Profiler):
  16092. (ExecutionCounter):
  16093. (JSC::Profiler::ExecutionCounter::ExecutionCounter):
  16094. (JSC::Profiler::ExecutionCounter::address):
  16095. (JSC::Profiler::ExecutionCounter::count):
  16096. * profiler/ProfilerOrigin.cpp: Added.
  16097. (Profiler):
  16098. (JSC::Profiler::Origin::Origin):
  16099. (JSC::Profiler::Origin::dump):
  16100. (JSC::Profiler::Origin::toJS):
  16101. * profiler/ProfilerOrigin.h: Added.
  16102. (JSC):
  16103. (Profiler):
  16104. (Origin):
  16105. (JSC::Profiler::Origin::Origin):
  16106. (JSC::Profiler::Origin::operator!):
  16107. (JSC::Profiler::Origin::bytecodes):
  16108. (JSC::Profiler::Origin::bytecodeIndex):
  16109. (JSC::Profiler::Origin::operator!=):
  16110. (JSC::Profiler::Origin::operator==):
  16111. (JSC::Profiler::Origin::hash):
  16112. (JSC::Profiler::Origin::isHashTableDeletedValue):
  16113. (JSC::Profiler::OriginHash::hash):
  16114. (JSC::Profiler::OriginHash::equal):
  16115. (OriginHash):
  16116. (WTF):
  16117. * profiler/ProfilerOriginStack.cpp: Added.
  16118. (Profiler):
  16119. (JSC::Profiler::OriginStack::OriginStack):
  16120. (JSC::Profiler::OriginStack::~OriginStack):
  16121. (JSC::Profiler::OriginStack::append):
  16122. (JSC::Profiler::OriginStack::operator==):
  16123. (JSC::Profiler::OriginStack::hash):
  16124. (JSC::Profiler::OriginStack::dump):
  16125. (JSC::Profiler::OriginStack::toJS):
  16126. * profiler/ProfilerOriginStack.h: Added.
  16127. (JSC):
  16128. (Profiler):
  16129. (OriginStack):
  16130. (JSC::Profiler::OriginStack::OriginStack):
  16131. (JSC::Profiler::OriginStack::operator!):
  16132. (JSC::Profiler::OriginStack::size):
  16133. (JSC::Profiler::OriginStack::fromBottom):
  16134. (JSC::Profiler::OriginStack::fromTop):
  16135. (JSC::Profiler::OriginStack::isHashTableDeletedValue):
  16136. (JSC::Profiler::OriginStackHash::hash):
  16137. (JSC::Profiler::OriginStackHash::equal):
  16138. (OriginStackHash):
  16139. (WTF):
  16140. * runtime/CommonIdentifiers.h:
  16141. * runtime/ExecutionHarness.h:
  16142. (JSC::prepareForExecution):
  16143. (JSC::prepareFunctionForExecution):
  16144. * runtime/JSGlobalData.cpp:
  16145. (JSC::JSGlobalData::JSGlobalData):
  16146. (JSC::JSGlobalData::~JSGlobalData):
  16147. * runtime/JSGlobalData.h:
  16148. (JSGlobalData):
  16149. * runtime/Options.h:
  16150. (JSC):
  16151. 2012-12-04 Filip Pizlo <fpizlo@apple.com>
  16152. Rename Profiler to LegacyProfiler
  16153. https://bugs.webkit.org/show_bug.cgi?id=104031
  16154. Rubber stamped by Mark Hahnenberg
  16155. Make room in the namespace for https://bugs.webkit.org/show_bug.cgi?id=102999.
  16156. * API/JSProfilerPrivate.cpp:
  16157. (JSStartProfiling):
  16158. (JSEndProfiling):
  16159. * CMakeLists.txt:
  16160. * GNUmakefile.list.am:
  16161. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  16162. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  16163. * JavaScriptCore.xcodeproj/project.pbxproj:
  16164. * Target.pri:
  16165. * interpreter/Interpreter.cpp:
  16166. (JSC::Interpreter::throwException):
  16167. (JSC::Interpreter::execute):
  16168. (JSC::Interpreter::executeCall):
  16169. (JSC::Interpreter::executeConstruct):
  16170. * jit/JIT.h:
  16171. * jit/JITCode.h:
  16172. * jit/JITStubs.cpp:
  16173. (JSC::DEFINE_STUB_FUNCTION):
  16174. * jit/JITStubs.h:
  16175. (JSC):
  16176. * llint/LLIntSlowPaths.cpp:
  16177. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  16178. * profiler/LegacyProfiler.cpp: Added.
  16179. (JSC):
  16180. (JSC::LegacyProfiler::profiler):
  16181. (JSC::LegacyProfiler::startProfiling):
  16182. (JSC::LegacyProfiler::stopProfiling):
  16183. (JSC::dispatchFunctionToProfiles):
  16184. (JSC::LegacyProfiler::willExecute):
  16185. (JSC::LegacyProfiler::didExecute):
  16186. (JSC::LegacyProfiler::exceptionUnwind):
  16187. (JSC::LegacyProfiler::createCallIdentifier):
  16188. (JSC::createCallIdentifierFromFunctionImp):
  16189. * profiler/LegacyProfiler.h: Added.
  16190. (JSC):
  16191. (LegacyProfiler):
  16192. (JSC::LegacyProfiler::currentProfiles):
  16193. * profiler/ProfileGenerator.cpp:
  16194. (JSC::ProfileGenerator::addParentForConsoleStart):
  16195. * profiler/ProfileNode.cpp:
  16196. * profiler/Profiler.cpp: Removed.
  16197. * profiler/Profiler.h: Removed.
  16198. * runtime/JSGlobalData.h:
  16199. (JSC):
  16200. (JSC::JSGlobalData::enabledProfiler):
  16201. (JSGlobalData):
  16202. * runtime/JSGlobalObject.cpp:
  16203. (JSC::JSGlobalObject::~JSGlobalObject):
  16204. 2012-12-03 Filip Pizlo <fpizlo@apple.com>
  16205. DFG should inline code blocks that use scoped variable access
  16206. https://bugs.webkit.org/show_bug.cgi?id=103974
  16207. Reviewed by Oliver Hunt.
  16208. This mostly just turns on something we could have done all along, but also adds a few key
  16209. necessities to make this right:
  16210. 1) Constant folding of SkipScope, since if we inline with a known JSFunction* then the
  16211. scope is constant.
  16212. 2) Interference analysis for GetLocal<->PutScopedVar and SetLocal<->GetScopedVar.
  16213. This is not meant to be a speed-up on major benchmarks since we don't yet inline most
  16214. closure calls for entirely unrelated reasons. But on toy programs it can be >2x faster.
  16215. * dfg/DFGAbstractState.cpp:
  16216. (JSC::DFG::AbstractState::execute):
  16217. * dfg/DFGByteCodeParser.cpp:
  16218. (JSC::DFG::ByteCodeParser::getScope):
  16219. (JSC::DFG::ByteCodeParser::parseResolveOperations):
  16220. * dfg/DFGCSEPhase.cpp:
  16221. (JSC::DFG::CSEPhase::scopedVarLoadElimination):
  16222. (JSC::DFG::CSEPhase::scopedVarStoreElimination):
  16223. (JSC::DFG::CSEPhase::getLocalLoadElimination):
  16224. (JSC::DFG::CSEPhase::setLocalStoreElimination):
  16225. * dfg/DFGCapabilities.h:
  16226. (JSC::DFG::canInlineResolveOperations):
  16227. 2012-12-03 Filip Pizlo <fpizlo@apple.com>
  16228. Replace JSValue::description() with JSValue::dump(PrintStream&)
  16229. https://bugs.webkit.org/show_bug.cgi?id=103866
  16230. Reviewed by Darin Adler.
  16231. JSValue now has a dump() method. Anywhere that you would have wanted to use
  16232. description(), you can either do toCString(value).data(), or if the callee
  16233. is a print()/dataLog() method then you just pass the value directly.
  16234. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  16235. * bytecode/CodeBlock.cpp:
  16236. (JSC::valueToSourceString):
  16237. (JSC::CodeBlock::finalizeUnconditionally):
  16238. * bytecode/ValueProfile.h:
  16239. (JSC::ValueProfileBase::dump):
  16240. * bytecode/ValueRecovery.h:
  16241. (JSC::ValueRecovery::dump):
  16242. * dfg/DFGAbstractValue.h:
  16243. (JSC::DFG::AbstractValue::dump):
  16244. * dfg/DFGGraph.cpp:
  16245. (JSC::DFG::Graph::dump):
  16246. * interpreter/Interpreter.cpp:
  16247. (JSC::Interpreter::dumpRegisters):
  16248. * jsc.cpp:
  16249. (functionDescribe):
  16250. * llint/LLIntSlowPaths.cpp:
  16251. (JSC::LLInt::llint_trace_value):
  16252. * runtime/JSValue.cpp:
  16253. (JSC::JSValue::dump):
  16254. * runtime/JSValue.h:
  16255. 2012-12-04 Filip Pizlo <fpizlo@apple.com>
  16256. jsc command line tool's support for typed arrays should be robust against array buffer allocation errors
  16257. https://bugs.webkit.org/show_bug.cgi?id=104020
  16258. <rdar://problem/12802478>
  16259. Reviewed by Mark Hahnenberg.
  16260. Check for null buffers, since that's what typed array allocators are supposed to do. WebCore does it,
  16261. and that is indeed the contract of ArrayBuffer and TypedArrayBase.
  16262. * JSCTypedArrayStubs.h:
  16263. (JSC):
  16264. 2012-12-03 Peter Rybin <prybin@chromium.org>
  16265. Web Inspector: make ASSERTION FAILED: foundPropertiesCount == object->size() more useful
  16266. https://bugs.webkit.org/show_bug.cgi?id=103254
  16267. Reviewed by Pavel Feldman.
  16268. Missing symbol WTFReportFatalError is added to the linker list.
  16269. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  16270. 2012-12-03 Alexis Menard <alexis@webkit.org>
  16271. [Mac] Enable CSS3 background-position offset by default.
  16272. https://bugs.webkit.org/show_bug.cgi?id=103905
  16273. Reviewed by Simon Fraser.
  16274. Turn the flag on by default.
  16275. * Configurations/FeatureDefines.xcconfig:
  16276. 2012-12-02 Filip Pizlo <fpizlo@apple.com>
  16277. DFG should trigger rage conversion from double to contiguous if it sees a GetByVal on Double being used in an integer context
  16278. https://bugs.webkit.org/show_bug.cgi?id=103858
  16279. Reviewed by Gavin Barraclough.
  16280. A rage conversion from double to contiguous is one where you try to convert each
  16281. double to an int32.
  16282. This is probably not the last we'll hear of rage conversion from double to contiguous.
  16283. It may be better to do this right during parsing, which will result in fewer cases of
  16284. Arrayification. But even so, this looks like a straight win already - 1% speed-up on
  16285. Kraken, no major regression anywhere else.
  16286. * dfg/DFGAbstractState.cpp:
  16287. (JSC::DFG::AbstractState::execute):
  16288. * dfg/DFGArrayMode.cpp:
  16289. (JSC::DFG::ArrayMode::refine):
  16290. (JSC::DFG::arrayConversionToString):
  16291. (JSC::DFG::ArrayMode::dump):
  16292. (WTF):
  16293. (WTF::printInternal):
  16294. * dfg/DFGArrayMode.h:
  16295. (JSC::DFG::ArrayMode::withConversion):
  16296. (ArrayMode):
  16297. (JSC::DFG::ArrayMode::doesConversion):
  16298. (WTF):
  16299. * dfg/DFGFixupPhase.cpp:
  16300. (JSC::DFG::FixupPhase::fixupBlock):
  16301. (JSC::DFG::FixupPhase::fixupNode):
  16302. (JSC::DFG::FixupPhase::checkArray):
  16303. (FixupPhase):
  16304. * dfg/DFGGraph.cpp:
  16305. (JSC::DFG::Graph::dump):
  16306. * dfg/DFGNodeFlags.h:
  16307. (DFG):
  16308. * dfg/DFGOperations.cpp:
  16309. * dfg/DFGOperations.h:
  16310. * dfg/DFGPredictionPropagationPhase.cpp:
  16311. (JSC::DFG::PredictionPropagationPhase::propagate):
  16312. * dfg/DFGSpeculativeJIT.cpp:
  16313. (JSC::DFG::SpeculativeJIT::arrayify):
  16314. * dfg/DFGStructureCheckHoistingPhase.cpp:
  16315. (JSC::DFG::StructureCheckHoistingPhase::run):
  16316. * runtime/JSObject.cpp:
  16317. (JSC):
  16318. (JSC::JSObject::genericConvertDoubleToContiguous):
  16319. (JSC::JSObject::convertDoubleToContiguous):
  16320. (JSC::JSObject::rageConvertDoubleToContiguous):
  16321. (JSC::JSObject::ensureContiguousSlow):
  16322. (JSC::JSObject::rageEnsureContiguousSlow):
  16323. * runtime/JSObject.h:
  16324. (JSObject):
  16325. (JSC::JSObject::rageEnsureContiguous):
  16326. 2012-12-02 Filip Pizlo <fpizlo@apple.com>
  16327. DFG CSE should not keep alive things that aren't relevant to OSR
  16328. https://bugs.webkit.org/show_bug.cgi?id=103849
  16329. Reviewed by Oliver Hunt.
  16330. Most Phantom nodes are inserted by CSE, and by default have the same children as the
  16331. node that CSE had eliminated. This change makes CSE inspect all Phantom nodes (both
  16332. those it creates and those that were created by other phases) to see if they have
  16333. children that are redundant - i.e. children that are not interesting to OSR, which
  16334. is the only reason why Phantoms exist in the first place. Being relevant to OSR is
  16335. defined as one of: (1) you're a Phi, (2) you're a SetLocal, (3) somewhere between
  16336. your definition and the Phantom there was a SetLocal that referred to you.
  16337. This is a slight speed-up in a few places.
  16338. * dfg/DFGCSEPhase.cpp:
  16339. (JSC::DFG::CSEPhase::CSEPhase):
  16340. (JSC::DFG::CSEPhase::run):
  16341. (JSC::DFG::CSEPhase::performSubstitution):
  16342. (CSEPhase):
  16343. (JSC::DFG::CSEPhase::eliminateIrrelevantPhantomChildren):
  16344. (JSC::DFG::CSEPhase::setReplacement):
  16345. (JSC::DFG::CSEPhase::eliminate):
  16346. (JSC::DFG::CSEPhase::performNodeCSE):
  16347. (JSC::DFG::CSEPhase::performBlockCSE):
  16348. 2012-12-02 Filip Pizlo <fpizlo@apple.com>
  16349. It should be possible to build and run with DFG_ENABLE(PROPAGATION_VERBOSE)
  16350. https://bugs.webkit.org/show_bug.cgi?id=103848
  16351. Reviewed by Sam Weinig.
  16352. Fix random dataLog() and print() statements.
  16353. * dfg/DFGArgumentsSimplificationPhase.cpp:
  16354. (JSC::DFG::ArgumentsSimplificationPhase::run):
  16355. * dfg/DFGByteCodeParser.cpp:
  16356. (JSC::DFG::ByteCodeParser::parseCodeBlock):
  16357. * dfg/DFGGraph.cpp:
  16358. (JSC::DFG::Graph::dumpBlockHeader):
  16359. * dfg/DFGPredictionPropagationPhase.cpp:
  16360. (JSC::DFG::PredictionPropagationPhase::propagate):
  16361. * dfg/DFGStructureCheckHoistingPhase.cpp:
  16362. (JSC::DFG::StructureCheckHoistingPhase::run):
  16363. 2012-12-01 Filip Pizlo <fpizlo@apple.com>
  16364. CodeBlock should be able to dump bytecode to something other than WTF::dataFile()
  16365. https://bugs.webkit.org/show_bug.cgi?id=103832
  16366. Reviewed by Oliver Hunt.
  16367. Add a PrintStream& argument to all of the CodeBlock bytecode dumping methods.
  16368. * bytecode/CodeBlock.cpp:
  16369. (JSC::CodeBlock::dumpBytecodeCommentAndNewLine):
  16370. (JSC::CodeBlock::printUnaryOp):
  16371. (JSC::CodeBlock::printBinaryOp):
  16372. (JSC::CodeBlock::printConditionalJump):
  16373. (JSC::CodeBlock::printGetByIdOp):
  16374. (JSC::dumpStructure):
  16375. (JSC::dumpChain):
  16376. (JSC::CodeBlock::printGetByIdCacheStatus):
  16377. (JSC::CodeBlock::printCallOp):
  16378. (JSC::CodeBlock::printPutByIdOp):
  16379. (JSC::CodeBlock::printStructure):
  16380. (JSC::CodeBlock::printStructures):
  16381. (JSC::CodeBlock::dumpBytecode):
  16382. * bytecode/CodeBlock.h:
  16383. (CodeBlock):
  16384. * jit/JITDisassembler.cpp:
  16385. (JSC::JITDisassembler::dumpForInstructions):
  16386. 2012-11-30 Pierre Rossi <pierre.rossi@gmail.com>
  16387. [Qt] Unreviewed speculative Mac build fix after r136232
  16388. Update the include path so that LLIntAssembly.h is picked up.
  16389. The bot didn't break until later when a clean build was triggered.
  16390. * JavaScriptCore.pri:
  16391. 2012-11-30 Oliver Hunt <oliver@apple.com>
  16392. Optimise more cases of op_typeof
  16393. https://bugs.webkit.org/show_bug.cgi?id=103783
  16394. Reviewed by Mark Hahnenberg.
  16395. Increase our coverage of typeof based typechecks by
  16396. making sure that the codegenerators always uses
  16397. consistent operand ordering when feeding typeof operations
  16398. into equality operations.
  16399. * bytecompiler/NodesCodegen.cpp:
  16400. (JSC::BinaryOpNode::emitBytecode):
  16401. (JSC::EqualNode::emitBytecode):
  16402. (JSC::StrictEqualNode::emitBytecode):
  16403. 2012-11-30 Filip Pizlo <fpizlo@apple.com>
  16404. Rationalize and clean up DFG handling of scoped accesses
  16405. https://bugs.webkit.org/show_bug.cgi?id=103715
  16406. Reviewed by Oliver Hunt.
  16407. Previously, we had a GetScope node that specified the depth to which you wanted
  16408. to travel to get a JSScope, and the backend implementation of the node would
  16409. perform all of the necessary footwork, including potentially skipping the top
  16410. scope if necessary, and doing however many loads were needed. But there were
  16411. strange things. First, if you had accesses at different scope depths, then the
  16412. loads to get to the common depth could not be CSE'd - CSE would match only
  16413. GetScope's that had identical depth. Second, GetScope would be emitted even if
  16414. we already had the scope, for example in put_to_base. And finally, even though
  16415. the ResolveOperations could tell us whether or not we had to skip the top scope,
  16416. the backend would recompute this information itself, often pessimistically.
  16417. This eliminates GetScope and replaces it with the following:
  16418. GetMyScope: just get the JSScope from the call frame header. This will forever
  16419. mean getting the JSScope associated with the machine call frame; it will not
  16420. mean getting the scope of an inlined function. Or at least that's the intent.
  16421. SkipTopScope: check if there is an activation, and if so, skip a scope. This
  16422. takes a scope as a child and returns a scope.
  16423. SkipScope: skip one scope level.
  16424. The bytecode parser now emits the right combination of the above, and
  16425. potentially emits multiple SkipScope's, based on the ResolveOperations.
  16426. This change also includes some fixups to debug logging. We now always print
  16427. the ExecutableBase* in addition to the CodeBlock* in the CodeBlock's dump,
  16428. and we are now more verbose when dumping CodeOrigins and InlineCallFrames.
  16429. This is performance-neutral. It's just meant to be a clean-up.
  16430. * bytecode/CodeBlock.cpp:
  16431. (JSC::CodeBlock::dumpAssumingJITType):
  16432. * bytecode/CodeOrigin.cpp:
  16433. (JSC::CodeOrigin::inlineStack):
  16434. (JSC::CodeOrigin::dump):
  16435. (JSC):
  16436. (JSC::InlineCallFrame::dump):
  16437. * bytecode/CodeOrigin.h:
  16438. (CodeOrigin):
  16439. (InlineCallFrame):
  16440. * dfg/DFGAbstractState.cpp:
  16441. (JSC::DFG::AbstractState::execute):
  16442. * dfg/DFGByteCodeParser.cpp:
  16443. (ByteCodeParser):
  16444. (JSC::DFG::ByteCodeParser::getScope):
  16445. (DFG):
  16446. (JSC::DFG::ByteCodeParser::parseResolveOperations):
  16447. (JSC::DFG::ByteCodeParser::parseBlock):
  16448. * dfg/DFGCSEPhase.cpp:
  16449. (JSC::DFG::CSEPhase::scopedVarLoadElimination):
  16450. (JSC::DFG::CSEPhase::scopedVarStoreElimination):
  16451. (JSC::DFG::CSEPhase::getMyScopeLoadElimination):
  16452. (JSC::DFG::CSEPhase::setLocalStoreElimination):
  16453. (JSC::DFG::CSEPhase::performNodeCSE):
  16454. * dfg/DFGDisassembler.cpp:
  16455. (JSC::DFG::Disassembler::dump):
  16456. * dfg/DFGGraph.cpp:
  16457. (JSC::DFG::Graph::dumpCodeOrigin):
  16458. (JSC::DFG::Graph::dumpBlockHeader):
  16459. * dfg/DFGNode.h:
  16460. (Node):
  16461. * dfg/DFGNodeType.h:
  16462. (DFG):
  16463. * dfg/DFGPredictionPropagationPhase.cpp:
  16464. (JSC::DFG::PredictionPropagationPhase::propagate):
  16465. * dfg/DFGSpeculativeJIT32_64.cpp:
  16466. (JSC::DFG::SpeculativeJIT::compile):
  16467. * dfg/DFGSpeculativeJIT64.cpp:
  16468. (JSC::DFG::SpeculativeJIT::compile):
  16469. * jit/JITDisassembler.cpp:
  16470. (JSC::JITDisassembler::dump):
  16471. 2012-11-30 Oliver Hunt <oliver@apple.com>
  16472. Add direct string->function code cache
  16473. https://bugs.webkit.org/show_bug.cgi?id=103764
  16474. Reviewed by Michael Saboff.
  16475. A fairly logically simple patch. We now track the start of the
  16476. unique portion of a functions body, and use that as our key for
  16477. unlinked function code. This allows us to cache identical code
  16478. in different contexts, leading to a small but consistent improvement
  16479. on the benchmarks we track.
  16480. * bytecode/UnlinkedCodeBlock.cpp:
  16481. (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
  16482. * bytecode/UnlinkedCodeBlock.h:
  16483. (JSC::UnlinkedFunctionExecutable::functionStartOffset):
  16484. (UnlinkedFunctionExecutable):
  16485. * parser/ASTBuilder.h:
  16486. (ASTBuilder):
  16487. (JSC::ASTBuilder::setFunctionStart):
  16488. * parser/Nodes.cpp:
  16489. * parser/Nodes.h:
  16490. (JSC::FunctionBodyNode::setFunctionStart):
  16491. (JSC::FunctionBodyNode::functionStart):
  16492. (FunctionBodyNode):
  16493. * parser/Parser.cpp:
  16494. (JSC::::parseFunctionInfo):
  16495. * parser/Parser.h:
  16496. (JSC::Parser::findCachedFunctionInfo):
  16497. * parser/SyntaxChecker.h:
  16498. (JSC::SyntaxChecker::setFunctionStart):
  16499. * runtime/CodeCache.cpp:
  16500. (JSC::CodeCache::generateFunctionCodeBlock):
  16501. (JSC::CodeCache::getFunctionCodeBlock):
  16502. (JSC::CodeCache::usedFunctionCode):
  16503. * runtime/CodeCache.h:
  16504. 2012-11-30 Allan Sandfeld Jensen <allan.jensen@digia.com>
  16505. Crash in conversion of empty OpaqueJSString to Identifier
  16506. https://bugs.webkit.org/show_bug.cgi?id=101867
  16507. Reviewed by Michael Saboff.
  16508. The constructor call used for both null and empty OpaqueJSStrings results
  16509. in an assertion voilation and crash. This patch instead uses the Identifier
  16510. constructors which are specifically for null and empty Identifier.
  16511. * API/OpaqueJSString.cpp:
  16512. (OpaqueJSString::identifier):
  16513. 2012-11-30 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
  16514. [Qt] Place the LLIntOffsetsExtractor binaries in debug/release subdirs on Mac
  16515. Otherwise we'll end up using the same LLIntAssembly.h for both build
  16516. configs of JavaScriptCore -- one of them which will be for the wrong
  16517. config.
  16518. Reviewed by Simon Hausmann.
  16519. * LLIntOffsetsExtractor.pro:
  16520. 2012-11-30 Julien BRIANCEAU <jbrianceau@nds.com>
  16521. [sh4] Fix compilation warnings in JavaScriptCore JIT for sh4 arch
  16522. https://bugs.webkit.org/show_bug.cgi?id=103378
  16523. Reviewed by Filip Pizlo.
  16524. * assembler/MacroAssemblerSH4.h:
  16525. (JSC::MacroAssemblerSH4::branchTest32):
  16526. (JSC::MacroAssemblerSH4::branchAdd32):
  16527. (JSC::MacroAssemblerSH4::branchMul32):
  16528. (JSC::MacroAssemblerSH4::branchSub32):
  16529. (JSC::MacroAssemblerSH4::branchOr32):
  16530. 2012-11-29 Rafael Weinstein <rafaelw@chromium.org>
  16531. [HTMLTemplateElement] Add feature flag
  16532. https://bugs.webkit.org/show_bug.cgi?id=103694
  16533. Reviewed by Adam Barth.
  16534. This flag will guard the implementation of the HTMLTemplateElement.
  16535. http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
  16536. * Configurations/FeatureDefines.xcconfig:
  16537. 2012-11-29 Filip Pizlo <fpizlo@apple.com>
  16538. It should be easy to find code blocks in debug dumps
  16539. https://bugs.webkit.org/show_bug.cgi?id=103623
  16540. Reviewed by Goeffrey Garen.
  16541. This gives CodeBlock a relatively strong, but also relatively compact, hash. We compute
  16542. it lazily so that it only impacts run-time when debug support is enabled. We stringify
  16543. it smartly so that it's short and easy to type. We base it on the source code so that
  16544. the optimization level is irrelevant. And, we use SHA1 since it's already in our code
  16545. base. Now, when a piece of code wants to print some debugging to say that it's operating
  16546. on some code block, it can use this CodeBlockHash instead of memory addresses.
  16547. This also takes CodeBlock debugging into the new world of print() and dataLog(). In
  16548. particular, CodeBlock::dump() corresponds to the thing you want printed if you do:
  16549. dataLog("I heart ", *myCodeBlock);
  16550. Probably, you want to just print some identifying information at this point rather than
  16551. the full bytecode dump. So, the existing CodeBlock::dump() has been renamed to
  16552. CodeBlock::dumpBytecode(), and CodeBlock::dump() now prints the CodeBlockHash plus just
  16553. a few little tidbits.
  16554. Here's an example of CodeBlock::dump() output:
  16555. EkILzr:[0x103883a00, BaselineFunctionCall]
  16556. EkILzr is the CodeBlockHash. 0x103883a00 is the CodeBlock's address in memory. The other
  16557. part is self-explanatory.
  16558. Finally, this new notion of CodeBlockHash is available for other purposes like bisecting
  16559. breakage. As such CodeBlockHash has all of the comparison operator overloads. When
  16560. bisecting in DFGDriver.cpp, you can now say things like:
  16561. if (codeBlock->hash() < CodeBlockHash("CAAAAA"))
  16562. return false;
  16563. And yes, CAAAAA is near the median hash, and the largest one is smaller than E99999. Such
  16564. is life when you use base 62 to encode a 32-bit number.
  16565. * CMakeLists.txt:
  16566. * GNUmakefile.list.am:
  16567. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  16568. * JavaScriptCore.xcodeproj/project.pbxproj:
  16569. * Target.pri:
  16570. * bytecode/CallLinkInfo.h:
  16571. (CallLinkInfo):
  16572. (JSC::CallLinkInfo::specializationKind):
  16573. * bytecode/CodeBlock.cpp:
  16574. (JSC::CodeBlock::hash):
  16575. (JSC):
  16576. (JSC::CodeBlock::dumpAssumingJITType):
  16577. (JSC::CodeBlock::dump):
  16578. (JSC::CodeBlock::dumpBytecode):
  16579. (JSC::CodeBlock::CodeBlock):
  16580. (JSC::CodeBlock::finalizeUnconditionally):
  16581. (JSC::CodeBlock::resetStubInternal):
  16582. (JSC::CodeBlock::reoptimize):
  16583. (JSC::ProgramCodeBlock::jettison):
  16584. (JSC::EvalCodeBlock::jettison):
  16585. (JSC::FunctionCodeBlock::jettison):
  16586. (JSC::CodeBlock::shouldOptimizeNow):
  16587. (JSC::CodeBlock::tallyFrequentExitSites):
  16588. (JSC::CodeBlock::dumpValueProfiles):
  16589. * bytecode/CodeBlock.h:
  16590. (JSC::CodeBlock::specializationKind):
  16591. (CodeBlock):
  16592. (JSC::CodeBlock::getJITType):
  16593. * bytecode/CodeBlockHash.cpp: Added.
  16594. (JSC):
  16595. (JSC::CodeBlockHash::CodeBlockHash):
  16596. (JSC::CodeBlockHash::dump):
  16597. * bytecode/CodeBlockHash.h: Added.
  16598. (JSC):
  16599. (CodeBlockHash):
  16600. (JSC::CodeBlockHash::CodeBlockHash):
  16601. (JSC::CodeBlockHash::hash):
  16602. (JSC::CodeBlockHash::operator==):
  16603. (JSC::CodeBlockHash::operator!=):
  16604. (JSC::CodeBlockHash::operator<):
  16605. (JSC::CodeBlockHash::operator>):
  16606. (JSC::CodeBlockHash::operator<=):
  16607. (JSC::CodeBlockHash::operator>=):
  16608. * bytecode/CodeBlockWithJITType.h: Added.
  16609. (JSC):
  16610. (CodeBlockWithJITType):
  16611. (JSC::CodeBlockWithJITType::CodeBlockWithJITType):
  16612. (JSC::CodeBlockWithJITType::dump):
  16613. * bytecode/CodeOrigin.cpp: Added.
  16614. (JSC):
  16615. (JSC::CodeOrigin::inlineDepthForCallFrame):
  16616. (JSC::CodeOrigin::inlineDepth):
  16617. (JSC::CodeOrigin::inlineStack):
  16618. (JSC::InlineCallFrame::hash):
  16619. * bytecode/CodeOrigin.h:
  16620. (InlineCallFrame):
  16621. (JSC::InlineCallFrame::specializationKind):
  16622. (JSC):
  16623. * bytecode/CodeType.cpp: Added.
  16624. (WTF):
  16625. (WTF::printInternal):
  16626. * bytecode/CodeType.h:
  16627. (WTF):
  16628. * bytecode/ExecutionCounter.cpp:
  16629. (JSC::ExecutionCounter::dump):
  16630. * bytecode/ExecutionCounter.h:
  16631. (ExecutionCounter):
  16632. * dfg/DFGByteCodeParser.cpp:
  16633. (JSC::DFG::ByteCodeParser::parseCodeBlock):
  16634. * dfg/DFGDisassembler.cpp:
  16635. (JSC::DFG::Disassembler::dump):
  16636. * dfg/DFGGraph.cpp:
  16637. (JSC::DFG::Graph::dumpCodeOrigin):
  16638. * dfg/DFGOSRExitCompiler.cpp:
  16639. * dfg/DFGOperations.cpp:
  16640. * dfg/DFGRepatch.cpp:
  16641. (JSC::DFG::generateProtoChainAccessStub):
  16642. (JSC::DFG::tryCacheGetByID):
  16643. (JSC::DFG::tryBuildGetByIDList):
  16644. (JSC::DFG::emitPutReplaceStub):
  16645. (JSC::DFG::emitPutTransitionStub):
  16646. (JSC::DFG::dfgLinkClosureCall):
  16647. * interpreter/Interpreter.cpp:
  16648. (JSC::Interpreter::dumpCallFrame):
  16649. * jit/JITCode.cpp: Added.
  16650. (WTF):
  16651. (WTF::printInternal):
  16652. * jit/JITCode.h:
  16653. (JSC::JITCode::jitType):
  16654. (WTF):
  16655. * jit/JITDisassembler.cpp:
  16656. (JSC::JITDisassembler::dump):
  16657. (JSC::JITDisassembler::dumpForInstructions):
  16658. * jit/JITPropertyAccess.cpp:
  16659. (JSC::JIT::privateCompilePutByIdTransition):
  16660. (JSC::JIT::privateCompilePatchGetArrayLength):
  16661. (JSC::JIT::privateCompileGetByIdProto):
  16662. (JSC::JIT::privateCompileGetByIdSelfList):
  16663. (JSC::JIT::privateCompileGetByIdProtoList):
  16664. (JSC::JIT::privateCompileGetByIdChainList):
  16665. (JSC::JIT::privateCompileGetByIdChain):
  16666. (JSC::JIT::privateCompileGetByVal):
  16667. (JSC::JIT::privateCompilePutByVal):
  16668. * jit/JITPropertyAccess32_64.cpp:
  16669. (JSC::JIT::privateCompilePutByIdTransition):
  16670. (JSC::JIT::privateCompilePatchGetArrayLength):
  16671. (JSC::JIT::privateCompileGetByIdProto):
  16672. (JSC::JIT::privateCompileGetByIdSelfList):
  16673. (JSC::JIT::privateCompileGetByIdProtoList):
  16674. (JSC::JIT::privateCompileGetByIdChainList):
  16675. (JSC::JIT::privateCompileGetByIdChain):
  16676. * jit/JITStubs.cpp:
  16677. (JSC::DEFINE_STUB_FUNCTION):
  16678. * runtime/CodeSpecializationKind.cpp: Added.
  16679. (WTF):
  16680. (WTF::printInternal):
  16681. * runtime/CodeSpecializationKind.h:
  16682. (JSC::specializationFromIsCall):
  16683. (JSC):
  16684. (JSC::specializationFromIsConstruct):
  16685. (WTF):
  16686. * runtime/Executable.cpp:
  16687. (JSC::ExecutableBase::hashFor):
  16688. (JSC):
  16689. (JSC::NativeExecutable::hashFor):
  16690. (JSC::ScriptExecutable::hashFor):
  16691. * runtime/Executable.h:
  16692. (ExecutableBase):
  16693. (NativeExecutable):
  16694. (ScriptExecutable):
  16695. (JSC::ScriptExecutable::source):
  16696. 2012-11-29 Michael Saboff <msaboff@apple.com>
  16697. Speculative Windows build fix after r136086.
  16698. Unreviewed build fix.
  16699. Suspect that ?setDumpsGeneratedCode@BytecodeGenerator@JSC@@SAX_N@Z needs to be removed from Windows
  16700. export list since the symbol was removed in r136086.
  16701. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  16702. 2012-11-28 Filip Pizlo <fpizlo@apple.com>
  16703. SpeculatedType dumping should not use the static char buffer[thingy] idiom
  16704. https://bugs.webkit.org/show_bug.cgi?id=103584
  16705. Reviewed by Michael Saboff.
  16706. Changed SpeculatedType to be "dumpable" by saying things like:
  16707. dataLog("thingy = ", SpeculationDump(thingy))
  16708. Removed the old stringification functions, and changed all code that referred to them
  16709. to use the new dataLog()/print() style.
  16710. * CMakeLists.txt:
  16711. * GNUmakefile.list.am:
  16712. * JavaScriptCore.xcodeproj/project.pbxproj:
  16713. * Target.pri:
  16714. * bytecode/SpeculatedType.cpp:
  16715. (JSC::dumpSpeculation):
  16716. (JSC::speculationToAbbreviatedString):
  16717. (JSC::dumpSpeculationAbbreviated):
  16718. * bytecode/SpeculatedType.h:
  16719. * bytecode/ValueProfile.h:
  16720. (JSC::ValueProfileBase::dump):
  16721. * bytecode/VirtualRegister.h:
  16722. (WTF::printInternal):
  16723. * dfg/DFGAbstractValue.h:
  16724. (JSC::DFG::AbstractValue::dump):
  16725. * dfg/DFGByteCodeParser.cpp:
  16726. (JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation):
  16727. (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
  16728. * dfg/DFGGraph.cpp:
  16729. (JSC::DFG::Graph::dump):
  16730. (JSC::DFG::Graph::predictArgumentTypes):
  16731. * dfg/DFGGraph.h:
  16732. (Graph):
  16733. * dfg/DFGStructureAbstractValue.h:
  16734. * dfg/DFGVariableAccessDataDump.cpp: Added.
  16735. (JSC::DFG::VariableAccessDataDump::VariableAccessDataDump):
  16736. (JSC::DFG::VariableAccessDataDump::dump):
  16737. * dfg/DFGVariableAccessDataDump.h: Added.
  16738. (VariableAccessDataDump):
  16739. 2012-11-28 Michael Saboff <msaboff@apple.com>
  16740. Change Bytecompiler s_dumpsGeneratedCode to an Options value
  16741. https://bugs.webkit.org/show_bug.cgi?id=103588
  16742. Reviewed by Filip Pizlo.
  16743. Moved the control of dumping bytecodes to Options::dumpGeneratedBytecodes.
  16744. * bytecode/CodeBlock.cpp:
  16745. (JSC::CodeBlock::CodeBlock):
  16746. * bytecompiler/BytecodeGenerator.cpp:
  16747. * bytecompiler/BytecodeGenerator.h:
  16748. * jsc.cpp:
  16749. (runWithScripts):
  16750. * runtime/Options.h:
  16751. 2012-11-28 Mark Hahnenberg <mhahnenberg@apple.com>
  16752. Copying phase should use work lists
  16753. https://bugs.webkit.org/show_bug.cgi?id=101390
  16754. Reviewed by Filip Pizlo.
  16755. * JavaScriptCore.xcodeproj/project.pbxproj:
  16756. * heap/BlockAllocator.cpp:
  16757. (JSC::BlockAllocator::BlockAllocator):
  16758. * heap/BlockAllocator.h: New RegionSet for CopyWorkListSegments.
  16759. (BlockAllocator):
  16760. (JSC::CopyWorkListSegment):
  16761. * heap/CopiedBlock.h: Added a per-block CopyWorkList to keep track of the JSCells that need to be revisited during the copying
  16762. phase to copy their backing stores.
  16763. (CopiedBlock):
  16764. (JSC::CopiedBlock::CopiedBlock):
  16765. (JSC::CopiedBlock::didSurviveGC):
  16766. (JSC::CopiedBlock::didEvacuateBytes): There is now a one-to-one relationship between GCThreads and the CopiedBlocks they're
  16767. responsible for evacuating, we no longer need any of that fancy compare and swap stuff.
  16768. (JSC::CopiedBlock::pin):
  16769. (JSC::CopiedBlock::hasWorkList):
  16770. (JSC::CopiedBlock::workList):
  16771. * heap/CopiedBlockInlines.h: Added.
  16772. (JSC::CopiedBlock::reportLiveBytes): Since we now have to grab a SpinLock to perform operations on the CopyWorkList during marking,
  16773. we don't need to do any of that fancy compare and swap stuff we were doing for tracking live bytes.
  16774. * heap/CopiedSpace.h:
  16775. (CopiedSpace):
  16776. * heap/CopiedSpaceInlines.h:
  16777. (JSC::CopiedSpace::pin):
  16778. * heap/CopyVisitor.cpp:
  16779. (JSC::CopyVisitor::copyFromShared): We now iterate over a range of CopiedBlocks rather than MarkedBlocks and revisit the cells in those
  16780. blocks' CopyWorkLists.
  16781. * heap/CopyVisitor.h:
  16782. (CopyVisitor):
  16783. * heap/CopyVisitorInlines.h:
  16784. (JSC::CopyVisitor::visitCell): The function responsible for calling the correct copyBackingStore() function for each JSCell from
  16785. a CopiedBlock's CopyWorkList.
  16786. (JSC::CopyVisitor::didCopy): We no longer need to check if the block is empty here because we know exactly when we're done
  16787. evacuating a CopiedBlock, which is when we've gone through all of the CopiedBlock's CopyWorkList.
  16788. * heap/CopyWorkList.h: Added.
  16789. (CopyWorkListSegment): Individual chunk of a CopyWorkList that is allocated from the BlockAllocator.
  16790. (JSC::CopyWorkListSegment::create):
  16791. (JSC::CopyWorkListSegment::size):
  16792. (JSC::CopyWorkListSegment::isFull):
  16793. (JSC::CopyWorkListSegment::get):
  16794. (JSC::CopyWorkListSegment::append):
  16795. (JSC::CopyWorkListSegment::CopyWorkListSegment):
  16796. (JSC::CopyWorkListSegment::data):
  16797. (JSC::CopyWorkListSegment::endOfBlock):
  16798. (CopyWorkListIterator): Responsible for giving CopyVisitors a contiguous notion of access across the separate CopyWorkListSegments
  16799. that make up each CopyWorkList.
  16800. (JSC::CopyWorkListIterator::get):
  16801. (JSC::CopyWorkListIterator::operator*):
  16802. (JSC::CopyWorkListIterator::operator->):
  16803. (JSC::CopyWorkListIterator::operator++):
  16804. (JSC::CopyWorkListIterator::operator==):
  16805. (JSC::CopyWorkListIterator::operator!=):
  16806. (JSC::CopyWorkListIterator::CopyWorkListIterator):
  16807. (CopyWorkList): Data structure that keeps track of the JSCells that need copying in a particular CopiedBlock.
  16808. (JSC::CopyWorkList::CopyWorkList):
  16809. (JSC::CopyWorkList::~CopyWorkList):
  16810. (JSC::CopyWorkList::append):
  16811. (JSC::CopyWorkList::begin):
  16812. (JSC::CopyWorkList::end):
  16813. * heap/GCThreadSharedData.cpp:
  16814. (JSC::GCThreadSharedData::GCThreadSharedData): We no longer use the m_blockSnapshot from the Heap during the copying phase.
  16815. (JSC::GCThreadSharedData::didStartCopying): We now copy the set of all blocks in the CopiedSpace to a separate vector for
  16816. iterating over during the copying phase since the set stored in the CopiedSpace will change as blocks are evacuated and
  16817. recycled throughout the copying phase.
  16818. * heap/GCThreadSharedData.h:
  16819. (GCThreadSharedData):
  16820. * heap/Heap.h:
  16821. (Heap):
  16822. * heap/SlotVisitor.h: We now need to know the object who is being marked that has a backing store so that we can store it
  16823. in a CopyWorkList to revisit later during the copying phase.
  16824. * heap/SlotVisitorInlines.h:
  16825. (JSC::SlotVisitor::copyLater):
  16826. * runtime/JSObject.cpp:
  16827. (JSC::JSObject::visitButterfly):
  16828. 2012-11-28 Filip Pizlo <fpizlo@apple.com>
  16829. Disassembly methods should be able to disassemble to any PrintStream& rather than always using WTF::dataFile()
  16830. https://bugs.webkit.org/show_bug.cgi?id=103492
  16831. Reviewed by Mark Hahnenberg.
  16832. Switched disassembly code to use PrintStream&, and to use print() rather than printf().
  16833. * dfg/DFGDisassembler.cpp:
  16834. (JSC::DFG::Disassembler::dump):
  16835. (DFG):
  16836. (JSC::DFG::Disassembler::dumpDisassembly):
  16837. * dfg/DFGDisassembler.h:
  16838. (Disassembler):
  16839. * dfg/DFGGraph.cpp:
  16840. (JSC::DFG::printWhiteSpace):
  16841. (JSC::DFG::Graph::dumpCodeOrigin):
  16842. (JSC::DFG::Graph::printNodeWhiteSpace):
  16843. (JSC::DFG::Graph::dump):
  16844. (DFG):
  16845. (JSC::DFG::Graph::dumpBlockHeader):
  16846. * dfg/DFGGraph.h:
  16847. (Graph):
  16848. * jit/JITDisassembler.cpp:
  16849. (JSC::JITDisassembler::dump):
  16850. (JSC::JITDisassembler::dumpForInstructions):
  16851. (JSC::JITDisassembler::dumpDisassembly):
  16852. * jit/JITDisassembler.h:
  16853. (JITDisassembler):
  16854. 2012-11-28 Filip Pizlo <fpizlo@apple.com>
  16855. It should be possible to say dataLog("count = ", count, "\n") instead of dataLogF("count = %d\n", count)
  16856. https://bugs.webkit.org/show_bug.cgi?id=103009
  16857. Reviewed by Michael Saboff.
  16858. Instead of converting all of JSC to use the new dataLog()/print() methods, I just changed
  16859. one place: dumping of abstract values. This is mainly just to ensure that the code I
  16860. added to WTF is actually doing things.
  16861. * bytecode/CodeBlock.cpp:
  16862. (JSC::CodeBlock::dump):
  16863. * dfg/DFGAbstractValue.h:
  16864. (JSC::DFG::AbstractValue::dump):
  16865. (WTF):
  16866. (WTF::printInternal):
  16867. * dfg/DFGStructureAbstractValue.h:
  16868. (JSC::DFG::StructureAbstractValue::dump):
  16869. (WTF):
  16870. (WTF::printInternal):
  16871. 2012-11-28 Oliver Hunt <oliver@apple.com>
  16872. Make source cache include more information about the function extent.
  16873. https://bugs.webkit.org/show_bug.cgi?id=103552
  16874. Reviewed by Gavin Barraclough.
  16875. Add a bit more information to the source cache.
  16876. * parser/Parser.cpp:
  16877. (JSC::::parseFunctionInfo):
  16878. Store the function start offset
  16879. * parser/SourceProviderCacheItem.h:
  16880. (JSC::SourceProviderCacheItem::SourceProviderCacheItem):
  16881. (SourceProviderCacheItem):
  16882. Add additional field for the start of the real function string, and re-arrange
  16883. fields to avoid growing the struct.
  16884. 2012-11-27 Filip Pizlo <fpizlo@apple.com>
  16885. Convert some remaining uses of FILE* to PrintStream&.
  16886. Rubber stamped by Mark Hahnenberg.
  16887. * bytecode/ValueProfile.h:
  16888. (JSC::ValueProfileBase::dump):
  16889. * bytecode/ValueRecovery.h:
  16890. (JSC::ValueRecovery::dump):
  16891. * dfg/DFGByteCodeParser.cpp:
  16892. (JSC::DFG::ByteCodeParser::parseCodeBlock):
  16893. * dfg/DFGNode.h:
  16894. (JSC::DFG::Node::dumpChildren):
  16895. 2012-11-27 Filip Pizlo <fpizlo@apple.com>
  16896. Fix indentation in JSValue.h
  16897. Rubber stamped by Mark Hahnenberg.
  16898. * runtime/JSValue.h:
  16899. 2012-11-26 Filip Pizlo <fpizlo@apple.com>
  16900. DFG SetLocal should use forwardSpeculationCheck instead of its own half-baked version of same
  16901. https://bugs.webkit.org/show_bug.cgi?id=103353
  16902. Reviewed by Oliver Hunt and Gavin Barraclough.
  16903. Made it possible to use forward speculations for most of the operand classes. Changed the conditional
  16904. direction parameter from being 'bool isForward' to an enum (SpeculationDirection). Changed SetLocal
  16905. to use forward speculations and got rid of its half-baked version of same.
  16906. Also added the ability to force the DFG's disassembler to dump all nodes, even ones that are dead.
  16907. * dfg/DFGByteCodeParser.cpp:
  16908. (JSC::DFG::ByteCodeParser::parseBlock):
  16909. * dfg/DFGDisassembler.cpp:
  16910. (JSC::DFG::Disassembler::dump):
  16911. * dfg/DFGDriver.cpp:
  16912. (JSC::DFG::compile):
  16913. * dfg/DFGSpeculativeJIT.cpp:
  16914. (JSC::DFG::SpeculativeJIT::speculationCheck):
  16915. (DFG):
  16916. (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
  16917. (JSC::DFG::SpeculativeJIT::speculationWatchpoint):
  16918. (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
  16919. (JSC::DFG::SpeculativeJIT::fillStorage):
  16920. * dfg/DFGSpeculativeJIT.h:
  16921. (SpeculativeJIT):
  16922. (JSC::DFG::SpeculateIntegerOperand::SpeculateIntegerOperand):
  16923. (JSC::DFG::SpeculateIntegerOperand::gpr):
  16924. (SpeculateIntegerOperand):
  16925. (JSC::DFG::SpeculateDoubleOperand::SpeculateDoubleOperand):
  16926. (JSC::DFG::SpeculateDoubleOperand::fpr):
  16927. (SpeculateDoubleOperand):
  16928. (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand):
  16929. (JSC::DFG::SpeculateCellOperand::gpr):
  16930. (SpeculateCellOperand):
  16931. (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand):
  16932. (JSC::DFG::SpeculateBooleanOperand::gpr):
  16933. (SpeculateBooleanOperand):
  16934. * dfg/DFGSpeculativeJIT32_64.cpp:
  16935. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  16936. (JSC::DFG::SpeculativeJIT::fillSpeculateInt):
  16937. (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict):
  16938. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  16939. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  16940. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  16941. (JSC::DFG::SpeculativeJIT::compile):
  16942. * dfg/DFGSpeculativeJIT64.cpp:
  16943. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  16944. (JSC::DFG::SpeculativeJIT::fillSpeculateInt):
  16945. (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict):
  16946. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  16947. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  16948. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  16949. (JSC::DFG::SpeculativeJIT::compile):
  16950. * runtime/Options.h:
  16951. (JSC):
  16952. 2012-11-26 Daniel Bates <dbates@webkit.org>
  16953. Substitute "allSeparators8Bit" for "allSeperators8Bit" in JSC::jsSpliceSubstringsWithSeparators()
  16954. <https://bugs.webkit.org/show_bug.cgi?id=103303>
  16955. Reviewed by Simon Fraser.
  16956. Fix misspelled word, "Seperators" [sic], in a local variable name in JSC::jsSpliceSubstringsWithSeparators().
  16957. * runtime/StringPrototype.cpp:
  16958. (JSC::jsSpliceSubstringsWithSeparators):
  16959. 2012-11-26 Daniel Bates <dbates@webkit.org>
  16960. JavaScript fails to handle String.replace() with large replacement string
  16961. https://bugs.webkit.org/show_bug.cgi?id=102956
  16962. <rdar://problem/12738012>
  16963. Reviewed by Oliver Hunt.
  16964. Fix an issue where we didn't check for overflow when computing the length
  16965. of the result of String.replace() with a large replacement string.
  16966. * runtime/StringPrototype.cpp:
  16967. (JSC::jsSpliceSubstringsWithSeparators):
  16968. 2012-11-26 Zeno Albisser <zeno@webkit.org>
  16969. [Qt] Fix the LLInt build on Mac
  16970. https://bugs.webkit.org/show_bug.cgi?id=97587
  16971. Reviewed by Simon Hausmann.
  16972. * DerivedSources.pri:
  16973. * JavaScriptCore.pro:
  16974. 2012-11-26 Oliver Hunt <oliver@apple.com>
  16975. 32-bit build fix. Move the method decalration outside of the X86_64 only section.
  16976. * assembler/MacroAssembler.h:
  16977. (MacroAssembler):
  16978. (JSC::MacroAssembler::shouldConsiderBlinding):
  16979. 2012-11-26 Oliver Hunt <oliver@apple.com>
  16980. Don't blind all the things.
  16981. https://bugs.webkit.org/show_bug.cgi?id=102572
  16982. Reviewed by Gavin Barraclough.
  16983. No longer blind all the constants in the instruction stream. We use a
  16984. simple non-deterministic filter to avoid blinding everything. Also modified
  16985. the basic integer blinding logic to avoid blinding small negative values.
  16986. * assembler/MacroAssembler.h:
  16987. (MacroAssembler):
  16988. (JSC::MacroAssembler::shouldConsiderBlinding):
  16989. (JSC::MacroAssembler::shouldBlind):
  16990. 2012-11-26 Mark Hahnenberg <mhahnenberg@apple.com>
  16991. JSObject::copyButterfly doesn't handle undecided indexing types correctly
  16992. https://bugs.webkit.org/show_bug.cgi?id=102573
  16993. Reviewed by Filip Pizlo.
  16994. We don't do any copying into the newly allocated vector and we don't zero-initialize CopiedBlocks
  16995. during the copying phase, so we end up with uninitialized memory in arrays which have undecided indexing
  16996. types. We should just do the actual memcpy from the old block to the new one.
  16997. * runtime/JSObject.cpp:
  16998. (JSC::JSObject::copyButterfly): Just do the same thing that we do for other contiguous indexing types.
  16999. 2012-11-26 Julien BRIANCEAU <jbrianceau@nds.com>
  17000. [sh4] JavaScriptCore JIT build is broken since r135330
  17001. Add missing implementation for sh4 arch.
  17002. https://bugs.webkit.org/show_bug.cgi?id=103145
  17003. Reviewed by Oliver Hunt.
  17004. * assembler/MacroAssemblerSH4.h:
  17005. (JSC::MacroAssemblerSH4::canJumpReplacePatchableBranchPtrWithPatch):
  17006. (MacroAssemblerSH4):
  17007. (JSC::MacroAssemblerSH4::startOfBranchPtrWithPatchOnRegister):
  17008. (JSC::MacroAssemblerSH4::revertJumpReplacementToBranchPtrWithPatch):
  17009. (JSC::MacroAssemblerSH4::startOfPatchableBranchPtrWithPatchOnAddress):
  17010. (JSC::MacroAssemblerSH4::revertJumpReplacementToPatchableBranchPtrWithPatch):
  17011. * assembler/SH4Assembler.h:
  17012. (JSC::SH4Assembler::revertJump):
  17013. (SH4Assembler):
  17014. (JSC::SH4Assembler::printInstr):
  17015. 2012-11-26 Yuqiang Xian <yuqiang.xian@intel.com>
  17016. Use load64 instead of loadPtr to load a JSValue on JSVALUE64 platforms
  17017. https://bugs.webkit.org/show_bug.cgi?id=100909
  17018. Reviewed by Brent Fulgham.
  17019. This is a (trivial) fix after r132701.
  17020. * dfg/DFGOSRExitCompiler64.cpp:
  17021. (JSC::DFG::OSRExitCompiler::compileExit):
  17022. 2012-11-26 Gabor Ballabas <gaborb@inf.u-szeged.hu>
  17023. [Qt][ARM] REGRESSION(r130826): It made 33 JSC test and 466 layout tests crash
  17024. https://bugs.webkit.org/show_bug.cgi?id=98857
  17025. Reviewed by Zoltan Herczeg.
  17026. Implement a new version of patchableBranch32 to fix crashing JSC
  17027. tests.
  17028. * assembler/MacroAssembler.h:
  17029. (MacroAssembler):
  17030. * assembler/MacroAssemblerARM.h:
  17031. (JSC::MacroAssemblerARM::patchableBranch32):
  17032. (MacroAssemblerARM):
  17033. 2012-11-21 Filip Pizlo <fpizlo@apple.com>
  17034. Any function that can log things should be able to easily log them to a memory buffer as well
  17035. https://bugs.webkit.org/show_bug.cgi?id=103000
  17036. Reviewed by Sam Weinig.
  17037. Change all users of WTF::dataFile() to expect a PrintStream& rather than a FILE*.
  17038. * bytecode/Operands.h:
  17039. (JSC::OperandValueTraits::dump):
  17040. (JSC::dumpOperands):
  17041. (JSC):
  17042. * dfg/DFGAbstractState.cpp:
  17043. (JSC::DFG::AbstractState::dump):
  17044. * dfg/DFGAbstractState.h:
  17045. (AbstractState):
  17046. * dfg/DFGAbstractValue.h:
  17047. (JSC::DFG::AbstractValue::dump):
  17048. * dfg/DFGCommon.h:
  17049. (JSC::DFG::NodeIndexTraits::dump):
  17050. * dfg/DFGStructureAbstractValue.h:
  17051. (JSC::DFG::StructureAbstractValue::dump):
  17052. * dfg/DFGVariableEvent.cpp:
  17053. (JSC::DFG::VariableEvent::dump):
  17054. (JSC::DFG::VariableEvent::dumpFillInfo):
  17055. (JSC::DFG::VariableEvent::dumpSpillInfo):
  17056. * dfg/DFGVariableEvent.h:
  17057. (VariableEvent):
  17058. * disassembler/Disassembler.h:
  17059. (JSC):
  17060. (JSC::tryToDisassemble):
  17061. * disassembler/UDis86Disassembler.cpp:
  17062. (JSC::tryToDisassemble):
  17063. 2012-11-23 Alexis Menard <alexis@webkit.org>
  17064. [CSS3 Backgrounds and Borders] Implement new CSS3 background-position parsing.
  17065. https://bugs.webkit.org/show_bug.cgi?id=102104
  17066. Reviewed by Julien Chaffraix.
  17067. Protect the new feature behind a feature flag.
  17068. * Configurations/FeatureDefines.xcconfig:
  17069. 2012-11-23 Gabor Ballabas <gaborb@inf.u-szeged.hu>
  17070. Fix the ARM traditional build after r135330
  17071. https://bugs.webkit.org/show_bug.cgi?id=102871
  17072. Reviewed by Zoltan Herczeg.
  17073. Added missing functionality to traditional ARM architecture.
  17074. * assembler/ARMAssembler.h:
  17075. (JSC::ARMAssembler::revertJump):
  17076. (ARMAssembler):
  17077. * assembler/MacroAssemblerARM.h:
  17078. (JSC::MacroAssemblerARM::startOfPatchableBranchPtrWithPatchOnAddress):
  17079. (JSC::MacroAssemblerARM::startOfBranchPtrWithPatchOnRegister):
  17080. (MacroAssemblerARM):
  17081. (JSC::MacroAssemblerARM::revertJumpReplacementToBranchPtrWithPatch):
  17082. 2012-11-16 Yury Semikhatsky <yurys@chromium.org>
  17083. Memory instrumentation: extract MemoryObjectInfo declaration into a separate file
  17084. https://bugs.webkit.org/show_bug.cgi?id=102510
  17085. Reviewed by Pavel Feldman.
  17086. Added new symbols for the methods that have moved into .../wtf/MemoryInstrumentation.cpp
  17087. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  17088. 2012-11-23 Julien BRIANCEAU <jbrianceau@nds.com>
  17089. [sh4] JavaScriptCore JIT build is broken since r130839
  17090. Add missing implementation for sh4 arch.
  17091. https://bugs.webkit.org/show_bug.cgi?id=101479
  17092. Reviewed by Filip Pizlo.
  17093. * assembler/MacroAssemblerSH4.h:
  17094. (JSC::MacroAssemblerSH4::load8Signed):
  17095. (MacroAssemblerSH4):
  17096. (JSC::MacroAssemblerSH4::load16Signed):
  17097. (JSC::MacroAssemblerSH4::store8):
  17098. (JSC::MacroAssemblerSH4::store16):
  17099. (JSC::MacroAssemblerSH4::moveDoubleToInts):
  17100. (JSC::MacroAssemblerSH4::moveIntsToDouble):
  17101. (JSC::MacroAssemblerSH4::loadFloat):
  17102. (JSC::MacroAssemblerSH4::loadDouble):
  17103. (JSC::MacroAssemblerSH4::storeFloat):
  17104. (JSC::MacroAssemblerSH4::storeDouble):
  17105. (JSC::MacroAssemblerSH4::addDouble):
  17106. (JSC::MacroAssemblerSH4::convertFloatToDouble):
  17107. (JSC::MacroAssemblerSH4::convertDoubleToFloat):
  17108. (JSC::MacroAssemblerSH4::urshift32):
  17109. * assembler/SH4Assembler.h:
  17110. (JSC::SH4Assembler::sublRegReg):
  17111. (JSC::SH4Assembler::subvlRegReg):
  17112. (JSC::SH4Assembler::floatfpulfrn):
  17113. (JSC::SH4Assembler::fldsfpul):
  17114. (JSC::SH4Assembler::fstsfpul):
  17115. (JSC::SH4Assembler::dcnvsd):
  17116. (SH4Assembler):
  17117. (JSC::SH4Assembler::movbRegMem):
  17118. (JSC::SH4Assembler::sizeOfConstantPool):
  17119. (JSC::SH4Assembler::linkJump):
  17120. (JSC::SH4Assembler::printInstr):
  17121. (JSC::SH4Assembler::printBlockInstr):
  17122. 2012-11-22 Balazs Kilvady <kilvadyb@homejinni.com>
  17123. Fix the MIPS build after r135330
  17124. https://bugs.webkit.org/show_bug.cgi?id=102872
  17125. Reviewed by Gavin Barraclough.
  17126. Revert/replace functions added to MIPS port.
  17127. * assembler/MIPSAssembler.h:
  17128. (JSC::MIPSAssembler::revertJumpToMove):
  17129. (MIPSAssembler):
  17130. (JSC::MIPSAssembler::replaceWithJump):
  17131. * assembler/MacroAssemblerMIPS.h:
  17132. (MacroAssemblerMIPS):
  17133. (JSC::MacroAssemblerMIPS::startOfBranchPtrWithPatchOnRegister):
  17134. (JSC::MacroAssemblerMIPS::revertJumpReplacementToBranchPtrWithPatch):
  17135. (JSC::MacroAssemblerMIPS::startOfPatchableBranchPtrWithPatchOnAddress):
  17136. 2012-11-21 Filip Pizlo <fpizlo@apple.com>
  17137. Rename dataLog() and dataLogV() to dataLogF() and dataLogFV()
  17138. https://bugs.webkit.org/show_bug.cgi?id=103001
  17139. Rubber stamped by Dan Bernstein.
  17140. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  17141. * assembler/LinkBuffer.cpp:
  17142. (JSC::LinkBuffer::finalizeCodeWithDisassembly):
  17143. (JSC::LinkBuffer::dumpLinkStatistics):
  17144. (JSC::LinkBuffer::dumpCode):
  17145. * assembler/LinkBuffer.h:
  17146. (JSC):
  17147. * assembler/SH4Assembler.h:
  17148. (JSC::SH4Assembler::vprintfStdoutInstr):
  17149. * bytecode/CodeBlock.cpp:
  17150. (JSC::CodeBlock::dumpBytecodeCommentAndNewLine):
  17151. (JSC::CodeBlock::printUnaryOp):
  17152. (JSC::CodeBlock::printBinaryOp):
  17153. (JSC::CodeBlock::printConditionalJump):
  17154. (JSC::CodeBlock::printGetByIdOp):
  17155. (JSC::dumpStructure):
  17156. (JSC::dumpChain):
  17157. (JSC::CodeBlock::printGetByIdCacheStatus):
  17158. (JSC::CodeBlock::printCallOp):
  17159. (JSC::CodeBlock::printPutByIdOp):
  17160. (JSC::CodeBlock::printStructure):
  17161. (JSC::CodeBlock::printStructures):
  17162. (JSC::CodeBlock::dump):
  17163. (JSC::CodeBlock::dumpStatistics):
  17164. (JSC::CodeBlock::finalizeUnconditionally):
  17165. (JSC::CodeBlock::resetStubInternal):
  17166. (JSC::CodeBlock::reoptimize):
  17167. (JSC::ProgramCodeBlock::jettison):
  17168. (JSC::EvalCodeBlock::jettison):
  17169. (JSC::FunctionCodeBlock::jettison):
  17170. (JSC::CodeBlock::shouldOptimizeNow):
  17171. (JSC::CodeBlock::tallyFrequentExitSites):
  17172. (JSC::CodeBlock::dumpValueProfiles):
  17173. * bytecode/Opcode.cpp:
  17174. (JSC::OpcodeStats::~OpcodeStats):
  17175. * bytecode/SamplingTool.cpp:
  17176. (JSC::SamplingFlags::stop):
  17177. (JSC::SamplingRegion::dumpInternal):
  17178. (JSC::SamplingTool::dump):
  17179. * dfg/DFGAbstractState.cpp:
  17180. (JSC::DFG::AbstractState::initialize):
  17181. (JSC::DFG::AbstractState::endBasicBlock):
  17182. (JSC::DFG::AbstractState::mergeStateAtTail):
  17183. (JSC::DFG::AbstractState::mergeToSuccessors):
  17184. * dfg/DFGAbstractValue.h:
  17185. (JSC::DFG::AbstractValue::dump):
  17186. * dfg/DFGArgumentsSimplificationPhase.cpp:
  17187. (JSC::DFG::ArgumentsSimplificationPhase::run):
  17188. * dfg/DFGByteCodeParser.cpp:
  17189. (JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation):
  17190. (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
  17191. (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks):
  17192. (JSC::DFG::ByteCodeParser::makeSafe):
  17193. (JSC::DFG::ByteCodeParser::makeDivSafe):
  17194. (JSC::DFG::ByteCodeParser::handleCall):
  17195. (JSC::DFG::ByteCodeParser::handleInlining):
  17196. (JSC::DFG::ByteCodeParser::parseBlock):
  17197. (JSC::DFG::ByteCodeParser::processPhiStack):
  17198. (JSC::DFG::ByteCodeParser::linkBlock):
  17199. (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
  17200. (JSC::DFG::ByteCodeParser::parseCodeBlock):
  17201. (JSC::DFG::ByteCodeParser::parse):
  17202. * dfg/DFGCFAPhase.cpp:
  17203. (JSC::DFG::CFAPhase::performBlockCFA):
  17204. (JSC::DFG::CFAPhase::performForwardCFA):
  17205. * dfg/DFGCFGSimplificationPhase.cpp:
  17206. (JSC::DFG::CFGSimplificationPhase::run):
  17207. (JSC::DFG::CFGSimplificationPhase::fixPossibleGetLocal):
  17208. (JSC::DFG::CFGSimplificationPhase::fixPhis):
  17209. (JSC::DFG::CFGSimplificationPhase::fixJettisonedPredecessors):
  17210. (JSC::DFG::CFGSimplificationPhase::removePotentiallyDeadPhiReference):
  17211. (JSC::DFG::CFGSimplificationPhase::mergeBlocks):
  17212. * dfg/DFGCSEPhase.cpp:
  17213. (JSC::DFG::CSEPhase::endIndexForPureCSE):
  17214. (JSC::DFG::CSEPhase::setReplacement):
  17215. (JSC::DFG::CSEPhase::eliminate):
  17216. (JSC::DFG::CSEPhase::performNodeCSE):
  17217. * dfg/DFGCapabilities.cpp:
  17218. (JSC::DFG::debugFail):
  17219. * dfg/DFGConstantFoldingPhase.cpp:
  17220. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  17221. (JSC::DFG::ConstantFoldingPhase::paintUnreachableCode):
  17222. * dfg/DFGDisassembler.cpp:
  17223. (JSC::DFG::Disassembler::dump):
  17224. * dfg/DFGDriver.cpp:
  17225. (JSC::DFG::compile):
  17226. * dfg/DFGFixupPhase.cpp:
  17227. (JSC::DFG::FixupPhase::fixupNode):
  17228. (JSC::DFG::FixupPhase::fixDoubleEdge):
  17229. * dfg/DFGGraph.cpp:
  17230. (JSC::DFG::printWhiteSpace):
  17231. (JSC::DFG::Graph::dumpCodeOrigin):
  17232. (JSC::DFG::Graph::dump):
  17233. (JSC::DFG::Graph::dumpBlockHeader):
  17234. (JSC::DFG::Graph::predictArgumentTypes):
  17235. * dfg/DFGJITCompiler.cpp:
  17236. (JSC::DFG::JITCompiler::link):
  17237. * dfg/DFGOSREntry.cpp:
  17238. (JSC::DFG::prepareOSREntry):
  17239. * dfg/DFGOSRExitCompiler.cpp:
  17240. * dfg/DFGOSRExitCompiler32_64.cpp:
  17241. (JSC::DFG::OSRExitCompiler::compileExit):
  17242. * dfg/DFGOSRExitCompiler64.cpp:
  17243. (JSC::DFG::OSRExitCompiler::compileExit):
  17244. * dfg/DFGOperations.cpp:
  17245. * dfg/DFGPhase.cpp:
  17246. (JSC::DFG::Phase::beginPhase):
  17247. * dfg/DFGPhase.h:
  17248. (JSC::DFG::runAndLog):
  17249. * dfg/DFGPredictionPropagationPhase.cpp:
  17250. (JSC::DFG::PredictionPropagationPhase::propagate):
  17251. (JSC::DFG::PredictionPropagationPhase::propagateForward):
  17252. (JSC::DFG::PredictionPropagationPhase::propagateBackward):
  17253. (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting):
  17254. * dfg/DFGRegisterBank.h:
  17255. (JSC::DFG::RegisterBank::dump):
  17256. * dfg/DFGScoreBoard.h:
  17257. (JSC::DFG::ScoreBoard::use):
  17258. (JSC::DFG::ScoreBoard::dump):
  17259. * dfg/DFGSlowPathGenerator.h:
  17260. (JSC::DFG::SlowPathGenerator::generate):
  17261. * dfg/DFGSpeculativeJIT.cpp:
  17262. (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
  17263. (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecutionWithConditionalDirection):
  17264. (JSC::DFG::SpeculativeJIT::runSlowPathGenerators):
  17265. (JSC::DFG::SpeculativeJIT::dump):
  17266. (JSC::DFG::SpeculativeJIT::checkConsistency):
  17267. (JSC::DFG::SpeculativeJIT::compile):
  17268. (JSC::DFG::SpeculativeJIT::checkGeneratedTypeForToInt32):
  17269. * dfg/DFGSpeculativeJIT32_64.cpp:
  17270. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  17271. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  17272. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  17273. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  17274. * dfg/DFGSpeculativeJIT64.cpp:
  17275. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  17276. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  17277. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  17278. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  17279. * dfg/DFGStructureCheckHoistingPhase.cpp:
  17280. (JSC::DFG::StructureCheckHoistingPhase::run):
  17281. * dfg/DFGValidate.cpp:
  17282. (Validate):
  17283. (JSC::DFG::Validate::reportValidationContext):
  17284. (JSC::DFG::Validate::dumpData):
  17285. (JSC::DFG::Validate::dumpGraphIfAppropriate):
  17286. * dfg/DFGVariableEventStream.cpp:
  17287. (JSC::DFG::VariableEventStream::logEvent):
  17288. (JSC::DFG::VariableEventStream::reconstruct):
  17289. * dfg/DFGVirtualRegisterAllocationPhase.cpp:
  17290. (JSC::DFG::VirtualRegisterAllocationPhase::run):
  17291. * heap/Heap.cpp:
  17292. * heap/HeapStatistics.cpp:
  17293. (JSC::HeapStatistics::logStatistics):
  17294. (JSC::HeapStatistics::showObjectStatistics):
  17295. * heap/MarkStack.h:
  17296. * heap/MarkedBlock.h:
  17297. * heap/SlotVisitor.cpp:
  17298. (JSC::SlotVisitor::validate):
  17299. * interpreter/CallFrame.cpp:
  17300. (JSC::CallFrame::dumpCaller):
  17301. * interpreter/Interpreter.cpp:
  17302. (JSC::Interpreter::dumpRegisters):
  17303. * jit/JIT.cpp:
  17304. (JSC::JIT::privateCompileMainPass):
  17305. (JSC::JIT::privateCompileSlowCases):
  17306. (JSC::JIT::privateCompile):
  17307. * jit/JITDisassembler.cpp:
  17308. (JSC::JITDisassembler::dump):
  17309. (JSC::JITDisassembler::dumpForInstructions):
  17310. * jit/JITStubRoutine.h:
  17311. (JSC):
  17312. * jit/JITStubs.cpp:
  17313. (JSC::DEFINE_STUB_FUNCTION):
  17314. * jit/JumpReplacementWatchpoint.cpp:
  17315. (JSC::JumpReplacementWatchpoint::fireInternal):
  17316. * llint/LLIntExceptions.cpp:
  17317. (JSC::LLInt::interpreterThrowInCaller):
  17318. (JSC::LLInt::returnToThrow):
  17319. (JSC::LLInt::callToThrow):
  17320. * llint/LLIntSlowPaths.cpp:
  17321. (JSC::LLInt::llint_trace_operand):
  17322. (JSC::LLInt::llint_trace_value):
  17323. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  17324. (JSC::LLInt::traceFunctionPrologue):
  17325. (JSC::LLInt::jitCompileAndSetHeuristics):
  17326. (JSC::LLInt::entryOSR):
  17327. (JSC::LLInt::handleHostCall):
  17328. (JSC::LLInt::setUpCall):
  17329. * profiler/Profile.cpp:
  17330. (JSC::Profile::debugPrintData):
  17331. (JSC::Profile::debugPrintDataSampleStyle):
  17332. * profiler/ProfileNode.cpp:
  17333. (JSC::ProfileNode::debugPrintData):
  17334. (JSC::ProfileNode::debugPrintDataSampleStyle):
  17335. * runtime/JSGlobalData.cpp:
  17336. (JSC::JSGlobalData::dumpRegExpTrace):
  17337. * runtime/RegExp.cpp:
  17338. (JSC::RegExp::matchCompareWithInterpreter):
  17339. * runtime/SamplingCounter.cpp:
  17340. (JSC::AbstractSamplingCounter::dump):
  17341. * runtime/Structure.cpp:
  17342. (JSC::Structure::dumpStatistics):
  17343. (JSC::PropertyMapStatisticsExitLogger::~PropertyMapStatisticsExitLogger):
  17344. * tools/CodeProfile.cpp:
  17345. (JSC::CodeProfile::report):
  17346. * tools/ProfileTreeNode.h:
  17347. (JSC::ProfileTreeNode::dumpInternal):
  17348. * yarr/YarrInterpreter.cpp:
  17349. (JSC::Yarr::ByteCompiler::dumpDisjunction):
  17350. 2012-11-21 Filip Pizlo <fpizlo@apple.com>
  17351. It should be possible to say disassemble(stuff) instead of having to say if (!tryToDisassemble(stuff)) dataLog("I failed")
  17352. https://bugs.webkit.org/show_bug.cgi?id=103010
  17353. Reviewed by Anders Carlsson.
  17354. You can still say tryToDisassemble(), which will tell you if it failed; you can then
  17355. decide what to do instead. But it's better to say disassemble(), which will just print
  17356. the instruction ranges if tryToDisassemble() failed. This is particularly appropriate
  17357. since that's what all previous users of tryToDisassemble() would have done in some
  17358. form or another.
  17359. * CMakeLists.txt:
  17360. * GNUmakefile.list.am:
  17361. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  17362. * JavaScriptCore.xcodeproj/project.pbxproj:
  17363. * Target.pri:
  17364. * assembler/LinkBuffer.cpp:
  17365. (JSC::LinkBuffer::finalizeCodeWithDisassembly):
  17366. * dfg/DFGDisassembler.cpp:
  17367. (JSC::DFG::Disassembler::dumpDisassembly):
  17368. * disassembler/Disassembler.cpp: Added.
  17369. (JSC):
  17370. (JSC::disassemble):
  17371. * disassembler/Disassembler.h:
  17372. (JSC):
  17373. * jit/JITDisassembler.cpp:
  17374. (JSC::JITDisassembler::dumpDisassembly):
  17375. 2012-11-21 Filip Pizlo <fpizlo@apple.com>
  17376. dumpOperands() claims that it needs a non-const Operands& when that is completely false
  17377. https://bugs.webkit.org/show_bug.cgi?id=103005
  17378. Reviewed by Eric Carlson.
  17379. * bytecode/Operands.h:
  17380. (JSC::dumpOperands):
  17381. (JSC):
  17382. 2012-11-20 Filip Pizlo <fpizlo@apple.com>
  17383. Baseline JIT's disassembly should be just as pretty as the DFG's
  17384. https://bugs.webkit.org/show_bug.cgi?id=102873
  17385. Reviewed by Sam Weinig.
  17386. Integrated the CodeBlock's bytecode dumper with the JIT's disassembler. Also fixed
  17387. some type goof-ups (instructions are not in a Vector<Instruction> so using a Vector
  17388. iterator makes no sense) and stream-lined some things (you don't actually need a
  17389. full-fledged ExecState* to dump bytecode).
  17390. * CMakeLists.txt:
  17391. * GNUmakefile.list.am:
  17392. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  17393. * JavaScriptCore.xcodeproj/project.pbxproj:
  17394. * Target.pri:
  17395. * bytecode/CodeBlock.cpp:
  17396. (JSC::CodeBlock::printUnaryOp):
  17397. (JSC::CodeBlock::printBinaryOp):
  17398. (JSC::CodeBlock::printConditionalJump):
  17399. (JSC::CodeBlock::printGetByIdOp):
  17400. (JSC::CodeBlock::printCallOp):
  17401. (JSC::CodeBlock::printPutByIdOp):
  17402. (JSC::CodeBlock::dump):
  17403. (JSC):
  17404. (JSC::CodeBlock::CodeBlock):
  17405. * bytecode/CodeBlock.h:
  17406. (CodeBlock):
  17407. * interpreter/Interpreter.cpp:
  17408. (JSC::Interpreter::dumpCallFrame):
  17409. * jit/JIT.cpp:
  17410. (JSC::JIT::privateCompileMainPass):
  17411. (JSC::JIT::privateCompileSlowCases):
  17412. (JSC::JIT::privateCompile):
  17413. * jit/JIT.h:
  17414. (JIT):
  17415. * jit/JITDisassembler.cpp: Added.
  17416. (JSC):
  17417. (JSC::JITDisassembler::JITDisassembler):
  17418. (JSC::JITDisassembler::~JITDisassembler):
  17419. (JSC::JITDisassembler::dump):
  17420. (JSC::JITDisassembler::dumpForInstructions):
  17421. (JSC::JITDisassembler::dumpDisassembly):
  17422. * jit/JITDisassembler.h: Added.
  17423. (JSC):
  17424. (JITDisassembler):
  17425. (JSC::JITDisassembler::setStartOfCode):
  17426. (JSC::JITDisassembler::setForBytecodeMainPath):
  17427. (JSC::JITDisassembler::setForBytecodeSlowPath):
  17428. (JSC::JITDisassembler::setEndOfSlowPath):
  17429. (JSC::JITDisassembler::setEndOfCode):
  17430. 2012-11-21 Daniel Bates <dbates@webkit.org>
  17431. JavaScript fails to concatenate large strings
  17432. <https://bugs.webkit.org/show_bug.cgi?id=102963>
  17433. Reviewed by Michael Saboff.
  17434. Fixes an issue where we inadvertently didn't check the length of
  17435. a JavaScript string for overflow.
  17436. * runtime/Operations.h:
  17437. (JSC::jsString):
  17438. (JSC::jsStringFromArguments):
  17439. 2012-11-20 Filip Pizlo <fpizlo@apple.com>
  17440. DFG should be able to cache closure calls (part 2/2)
  17441. https://bugs.webkit.org/show_bug.cgi?id=102662
  17442. Reviewed by Gavin Barraclough.
  17443. Added caching of calls where the JSFunction* varies, but the Structure* and ExecutableBase*
  17444. stay the same. This is accomplished by replacing the branch that compares against a constant
  17445. JSFunction* with a jump to a closure call stub. The closure call stub contains a fast path,
  17446. and jumps slow directly to the virtual call thunk.
  17447. Looks like a 1% win on V8v7.
  17448. * CMakeLists.txt:
  17449. * GNUmakefile.list.am:
  17450. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  17451. * JavaScriptCore.xcodeproj/project.pbxproj:
  17452. * Target.pri:
  17453. * bytecode/CallLinkInfo.cpp:
  17454. (JSC::CallLinkInfo::unlink):
  17455. * bytecode/CallLinkInfo.h:
  17456. (CallLinkInfo):
  17457. (JSC::CallLinkInfo::isLinked):
  17458. (JSC::getCallLinkInfoBytecodeIndex):
  17459. * bytecode/CodeBlock.cpp:
  17460. (JSC::CodeBlock::finalizeUnconditionally):
  17461. (JSC):
  17462. (JSC::CodeBlock::findClosureCallForReturnPC):
  17463. (JSC::CodeBlock::bytecodeOffset):
  17464. (JSC::CodeBlock::codeOriginForReturn):
  17465. * bytecode/CodeBlock.h:
  17466. (JSC::CodeBlock::getCallLinkInfo):
  17467. (CodeBlock):
  17468. (JSC::CodeBlock::isIncomingCallAlreadyLinked):
  17469. * dfg/DFGJITCompiler.cpp:
  17470. (JSC::DFG::JITCompiler::link):
  17471. * dfg/DFGJITCompiler.h:
  17472. (JSC::DFG::JITCompiler::addJSCall):
  17473. (JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord):
  17474. (JSCallRecord):
  17475. * dfg/DFGOperations.cpp:
  17476. * dfg/DFGOperations.h:
  17477. * dfg/DFGRepatch.cpp:
  17478. (JSC::DFG::linkSlowFor):
  17479. (DFG):
  17480. (JSC::DFG::dfgLinkFor):
  17481. (JSC::DFG::dfgLinkSlowFor):
  17482. (JSC::DFG::dfgLinkClosureCall):
  17483. * dfg/DFGRepatch.h:
  17484. (DFG):
  17485. * dfg/DFGSpeculativeJIT32_64.cpp:
  17486. (JSC::DFG::SpeculativeJIT::emitCall):
  17487. * dfg/DFGSpeculativeJIT64.cpp:
  17488. (JSC::DFG::SpeculativeJIT::emitCall):
  17489. * dfg/DFGThunks.cpp:
  17490. (DFG):
  17491. (JSC::DFG::linkClosureCallThunkGenerator):
  17492. * dfg/DFGThunks.h:
  17493. (DFG):
  17494. * heap/Heap.h:
  17495. (Heap):
  17496. (JSC::Heap::jitStubRoutines):
  17497. * heap/JITStubRoutineSet.h:
  17498. (JSC::JITStubRoutineSet::size):
  17499. (JSC::JITStubRoutineSet::at):
  17500. (JITStubRoutineSet):
  17501. * jit/ClosureCallStubRoutine.cpp: Added.
  17502. (JSC):
  17503. (JSC::ClosureCallStubRoutine::ClosureCallStubRoutine):
  17504. (JSC::ClosureCallStubRoutine::~ClosureCallStubRoutine):
  17505. (JSC::ClosureCallStubRoutine::markRequiredObjectsInternal):
  17506. * jit/ClosureCallStubRoutine.h: Added.
  17507. (JSC):
  17508. (ClosureCallStubRoutine):
  17509. (JSC::ClosureCallStubRoutine::structure):
  17510. (JSC::ClosureCallStubRoutine::executable):
  17511. (JSC::ClosureCallStubRoutine::codeOrigin):
  17512. * jit/GCAwareJITStubRoutine.cpp:
  17513. (JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine):
  17514. * jit/GCAwareJITStubRoutine.h:
  17515. (GCAwareJITStubRoutine):
  17516. (JSC::GCAwareJITStubRoutine::isClosureCall):
  17517. * jit/JIT.cpp:
  17518. (JSC::JIT::privateCompile):
  17519. 2012-11-20 Filip Pizlo <fpizlo@apple.com>
  17520. DFG should be able to cache closure calls (part 1/2)
  17521. https://bugs.webkit.org/show_bug.cgi?id=102662
  17522. Reviewed by Gavin Barraclough.
  17523. Add ability to revert a jump replacement back to
  17524. branchPtrWithPatch(Condition, RegisterID, TrustedImmPtr). This is meant to be
  17525. a mandatory piece of functionality for all assemblers. I also renamed some of
  17526. the functions for reverting jump replacements back to
  17527. patchableBranchPtrWithPatch(Condition, Address, TrustedImmPtr), so as to avoid
  17528. confusion.
  17529. * assembler/ARMv7Assembler.h:
  17530. (JSC::ARMv7Assembler::BadReg):
  17531. (ARMv7Assembler):
  17532. (JSC::ARMv7Assembler::revertJumpTo_movT3):
  17533. * assembler/LinkBuffer.h:
  17534. (JSC):
  17535. * assembler/MacroAssemblerARMv7.h:
  17536. (JSC::MacroAssemblerARMv7::startOfBranchPtrWithPatchOnRegister):
  17537. (MacroAssemblerARMv7):
  17538. (JSC::MacroAssemblerARMv7::revertJumpReplacementToBranchPtrWithPatch):
  17539. (JSC::MacroAssemblerARMv7::startOfPatchableBranchPtrWithPatchOnAddress):
  17540. * assembler/MacroAssemblerX86.h:
  17541. (JSC::MacroAssemblerX86::startOfBranchPtrWithPatchOnRegister):
  17542. (MacroAssemblerX86):
  17543. (JSC::MacroAssemblerX86::startOfPatchableBranchPtrWithPatchOnAddress):
  17544. (JSC::MacroAssemblerX86::revertJumpReplacementToBranchPtrWithPatch):
  17545. * assembler/MacroAssemblerX86_64.h:
  17546. (JSC::MacroAssemblerX86_64::startOfBranchPtrWithPatchOnRegister):
  17547. (JSC::MacroAssemblerX86_64::startOfPatchableBranchPtrWithPatchOnAddress):
  17548. (MacroAssemblerX86_64):
  17549. (JSC::MacroAssemblerX86_64::revertJumpReplacementToBranchPtrWithPatch):
  17550. * assembler/RepatchBuffer.h:
  17551. (JSC::RepatchBuffer::startOfBranchPtrWithPatchOnRegister):
  17552. (RepatchBuffer):
  17553. (JSC::RepatchBuffer::startOfPatchableBranchPtrWithPatchOnAddress):
  17554. (JSC::RepatchBuffer::revertJumpReplacementToBranchPtrWithPatch):
  17555. * assembler/X86Assembler.h:
  17556. (JSC::X86Assembler::revertJumpTo_cmpl_ir_force32):
  17557. (X86Assembler):
  17558. * dfg/DFGRepatch.cpp:
  17559. (JSC::DFG::replaceWithJump):
  17560. (JSC::DFG::dfgResetGetByID):
  17561. (JSC::DFG::dfgResetPutByID):
  17562. 2012-11-20 Yong Li <yoli@rim.com>
  17563. [ARMv7] Neither linkCall() nor linkPointer() should flush code.
  17564. https://bugs.webkit.org/show_bug.cgi?id=99213
  17565. Reviewed by George Staikos.
  17566. LinkBuffer doesn't need to flush code during linking. It will
  17567. eventually flush the whole executable. Fixing this gives >%5
  17568. sunspider boost (on QNX).
  17569. Also make replaceWithLoad() and replaceWithAddressComputation() flush
  17570. only when necessary.
  17571. * assembler/ARMv7Assembler.h:
  17572. (JSC::ARMv7Assembler::linkCall):
  17573. (JSC::ARMv7Assembler::linkPointer):
  17574. (JSC::ARMv7Assembler::relinkCall):
  17575. (JSC::ARMv7Assembler::repatchInt32):
  17576. (JSC::ARMv7Assembler::repatchPointer):
  17577. (JSC::ARMv7Assembler::replaceWithLoad): Flush only after it did write.
  17578. (JSC::ARMv7Assembler::replaceWithAddressComputation): Flush only after it did write.
  17579. (JSC::ARMv7Assembler::setInt32):
  17580. (JSC::ARMv7Assembler::setPointer):
  17581. 2012-11-19 Filip Pizlo <fpizlo@apple.com>
  17582. Remove support for ARMv7 errata from the jump code
  17583. https://bugs.webkit.org/show_bug.cgi?id=102759
  17584. Reviewed by Oliver Hunt.
  17585. The jump replacement code was wrong to begin with since it wasn't doing
  17586. a cache flush on the inserted padding. And, to my knowledge, we don't need
  17587. this anymore, so this patch removes all errata code from the ARMv7 port.
  17588. * assembler/ARMv7Assembler.h:
  17589. (JSC::ARMv7Assembler::computeJumpType):
  17590. (JSC::ARMv7Assembler::replaceWithJump):
  17591. (JSC::ARMv7Assembler::maxJumpReplacementSize):
  17592. (JSC::ARMv7Assembler::canBeJumpT3):
  17593. (JSC::ARMv7Assembler::canBeJumpT4):
  17594. 2012-11-19 Patrick Gansterer <paroga@webkit.org>
  17595. [CMake] Create JavaScriptCore ForwardingHeaders
  17596. https://bugs.webkit.org/show_bug.cgi?id=92665
  17597. Reviewed by Brent Fulgham.
  17598. When using CMake to build the Windows port, we need
  17599. to generate the forwarding headers with it too.
  17600. * CMakeLists.txt:
  17601. 2012-11-19 Kihong Kwon <kihong.kwon@samsung.com>
  17602. Add PROXIMITY_EVENTS feature
  17603. https://bugs.webkit.org/show_bug.cgi?id=102658
  17604. Reviewed by Kentaro Hara.
  17605. Add PROXIMITY_EVENTS feature to xcode project for JavaScriptCore.
  17606. * Configurations/FeatureDefines.xcconfig:
  17607. 2012-11-18 Dan Bernstein <mitz@apple.com>
  17608. Try to fix the DFG build after r135099.
  17609. * dfg/DFGCommon.h:
  17610. (JSC::DFG::shouldShowDisassembly):
  17611. 2012-11-18 Filip Pizlo <fpizlo@apple.com>
  17612. Unreviewed, build fix for !ENABLE(DFG_JIT).
  17613. * dfg/DFGCommon.h:
  17614. (JSC::DFG::shouldShowDisassembly):
  17615. (DFG):
  17616. 2012-11-18 Filip Pizlo <fpizlo@apple.com>
  17617. JSC should have more logging in structure-related code
  17618. https://bugs.webkit.org/show_bug.cgi?id=102630
  17619. Reviewed by Simon Fraser.
  17620. - JSValue::description() now tells you if something is a structure, and if so,
  17621. what kind of structure it is.
  17622. - Jettisoning logic now tells you why things are being jettisoned.
  17623. - It's now possible to turn off GC-triggered jettisoning entirely.
  17624. * bytecode/CodeBlock.cpp:
  17625. (JSC::CodeBlock::finalizeUnconditionally):
  17626. (JSC::CodeBlock::reoptimize):
  17627. (JSC::ProgramCodeBlock::jettison):
  17628. (JSC::EvalCodeBlock::jettison):
  17629. (JSC::FunctionCodeBlock::jettison):
  17630. * bytecode/CodeBlock.h:
  17631. (JSC::CodeBlock::shouldImmediatelyAssumeLivenessDuringScan):
  17632. * runtime/JSValue.cpp:
  17633. (JSC::JSValue::description):
  17634. * runtime/Options.h:
  17635. (JSC):
  17636. 2012-11-18 Filip Pizlo <fpizlo@apple.com>
  17637. DFG constant folding phase should say 'changed = true' whenever it changes the graph
  17638. https://bugs.webkit.org/show_bug.cgi?id=102550
  17639. Rubber stamped by Mark Hahnenberg.
  17640. * dfg/DFGConstantFoldingPhase.cpp:
  17641. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  17642. 2012-11-17 Elliott Sprehn <esprehn@chromium.org>
  17643. Expose JSObject removeDirect and PrivateName to WebCore
  17644. https://bugs.webkit.org/show_bug.cgi?id=102546
  17645. Reviewed by Geoffrey Garen.
  17646. Export removeDirect for use in WebCore so JSDependentRetained works.
  17647. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  17648. 2012-11-16 Filip Pizlo <fpizlo@apple.com>
  17649. Given a PutById or GetById with a proven structure, the DFG should be able to emit a PutByOffset or GetByOffset instead
  17650. https://bugs.webkit.org/show_bug.cgi?id=102327
  17651. Reviewed by Mark Hahnenberg.
  17652. If the profiler tells us that a GetById or PutById may be polymorphic but our
  17653. control flow analysis proves that it isn't, we should trust the control flow
  17654. analysis over the profiler. This arises in cases where GetById or PutById were
  17655. inlined: the inlined function may have been called from other places that led
  17656. to polymorphism, but in the current inlined context, there is no polymorphism.
  17657. * bytecode/CodeBlock.cpp:
  17658. (JSC::CodeBlock::dump):
  17659. * bytecode/GetByIdStatus.cpp:
  17660. (JSC::GetByIdStatus::computeFor):
  17661. (JSC):
  17662. * bytecode/GetByIdStatus.h:
  17663. (JSC::GetByIdStatus::GetByIdStatus):
  17664. (GetByIdStatus):
  17665. * bytecode/PutByIdStatus.cpp:
  17666. (JSC::PutByIdStatus::computeFor):
  17667. (JSC):
  17668. * bytecode/PutByIdStatus.h:
  17669. (JSC):
  17670. (JSC::PutByIdStatus::PutByIdStatus):
  17671. (PutByIdStatus):
  17672. * dfg/DFGAbstractState.cpp:
  17673. (JSC::DFG::AbstractState::execute):
  17674. * dfg/DFGAbstractValue.h:
  17675. (JSC::DFG::AbstractValue::bestProvenStructure):
  17676. (AbstractValue):
  17677. * dfg/DFGConstantFoldingPhase.cpp:
  17678. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  17679. (JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck):
  17680. (ConstantFoldingPhase):
  17681. * dfg/DFGNode.h:
  17682. (JSC::DFG::Node::convertToGetByOffset):
  17683. (Node):
  17684. (JSC::DFG::Node::convertToPutByOffset):
  17685. (JSC::DFG::Node::hasStorageResult):
  17686. * runtime/JSGlobalObject.h:
  17687. (JSC::Structure::prototypeChain):
  17688. (JSC):
  17689. (JSC::Structure::isValid):
  17690. * runtime/Operations.h:
  17691. (JSC::isPrototypeChainNormalized):
  17692. (JSC):
  17693. * runtime/Structure.h:
  17694. (Structure):
  17695. (JSC::Structure::transitionDidInvolveSpecificValue):
  17696. 2012-11-16 Tony Chang <tony@chromium.org>
  17697. Remove ENABLE_CSS_HIERARCHIES since it's no longer in use
  17698. https://bugs.webkit.org/show_bug.cgi?id=102554
  17699. Reviewed by Andreas Kling.
  17700. As mentioned in https://bugs.webkit.org/show_bug.cgi?id=79939#c41 ,
  17701. we're going to revist this feature once additional vendor support is
  17702. achieved.
  17703. * Configurations/FeatureDefines.xcconfig:
  17704. 2012-11-16 Patrick Gansterer <paroga@webkit.org>
  17705. Build fix for WinCE after r133688.
  17706. Use numeric_limits<uint32_t>::max() instead of UINT32_MAX.
  17707. * runtime/CodeCache.h:
  17708. (JSC::CacheMap::CacheMap):
  17709. 2012-11-15 Filip Pizlo <fpizlo@apple.com>
  17710. ClassInfo.h should have correct indentation.
  17711. Rubber stamped by Mark Hahnenberg.
  17712. ClassInfo.h had some true creativity in its use of whitespace. Some things within
  17713. the namespace were indented four spaces and others where not. One #define had its
  17714. contents indented four spaces, while another didn't. I applied the following rule:
  17715. - Non-macro things in the namespace should not be indented (that's our current
  17716. accepted practice).
  17717. - Macros should never be indented but if they are multi-line then their subsequent
  17718. bodies should be indented four spaces. I believe that is consistent with what we
  17719. do elsewhere.
  17720. * runtime/ClassInfo.h:
  17721. (JSC):
  17722. (MethodTable):
  17723. (ClassInfo):
  17724. (JSC::ClassInfo::propHashTable):
  17725. (JSC::ClassInfo::isSubClassOf):
  17726. (JSC::ClassInfo::hasStaticProperties):
  17727. 2012-11-15 Filip Pizlo <fpizlo@apple.com>
  17728. DFG should copy propagate trivially no-op ConvertThis
  17729. https://bugs.webkit.org/show_bug.cgi?id=102445
  17730. Reviewed by Oliver Hunt.
  17731. Copy propagation is always a good thing, since it reveals must-alias relationships
  17732. to the CFA and CSE. This accomplishes copy propagation for ConvertThis by first
  17733. converting it to an Identity node (which is done by the constant folder since it
  17734. has access to CFA results) and then performing substitution of references to
  17735. Identity with references to Identity's child in the CSE.
  17736. I'm not aiming for a big speed-up here; I just think that this will be useful for
  17737. the work on https://bugs.webkit.org/show_bug.cgi?id=102327.
  17738. * dfg/DFGAbstractState.cpp:
  17739. (JSC::DFG::AbstractState::execute):
  17740. * dfg/DFGCSEPhase.cpp:
  17741. (JSC::DFG::CSEPhase::performNodeCSE):
  17742. * dfg/DFGConstantFoldingPhase.cpp:
  17743. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  17744. * dfg/DFGNodeType.h:
  17745. (DFG):
  17746. * dfg/DFGPredictionPropagationPhase.cpp:
  17747. (JSC::DFG::PredictionPropagationPhase::propagate):
  17748. * dfg/DFGSpeculativeJIT32_64.cpp:
  17749. (JSC::DFG::SpeculativeJIT::compile):
  17750. * dfg/DFGSpeculativeJIT64.cpp:
  17751. (JSC::DFG::SpeculativeJIT::compile):
  17752. 2012-11-15 Filip Pizlo <fpizlo@apple.com>
  17753. CallData.h should have correct indentation.
  17754. Rubber stamped by Mark Hahneberg.
  17755. * runtime/CallData.h:
  17756. (JSC):
  17757. 2012-11-15 Filip Pizlo <fpizlo@apple.com>
  17758. Remove methodCallDummy since it is not used anymore.
  17759. Rubber stamped by Mark Hahnenberg.
  17760. * runtime/JSGlobalObject.cpp:
  17761. (JSC::JSGlobalObject::reset):
  17762. (JSC):
  17763. (JSC::JSGlobalObject::visitChildren):
  17764. * runtime/JSGlobalObject.h:
  17765. (JSGlobalObject):
  17766. 2012-11-14 Filip Pizlo <fpizlo@apple.com>
  17767. Structure should be able to easily tell if the prototype chain might intercept a store
  17768. https://bugs.webkit.org/show_bug.cgi?id=102326
  17769. Reviewed by Geoffrey Garen.
  17770. This improves our ability to reason about the correctness of the more optimized
  17771. prototype chain walk in JSObject::put(), while also making it straight forward to
  17772. check if the prototype chain will do strange things to a property store by just
  17773. looking at the structure.
  17774. * runtime/JSObject.cpp:
  17775. (JSC::JSObject::put):
  17776. * runtime/Structure.cpp:
  17777. (JSC::Structure::prototypeChainMayInterceptStoreTo):
  17778. (JSC):
  17779. * runtime/Structure.h:
  17780. (Structure):
  17781. 2012-11-15 Thiago Marcos P. Santos <thiago.santos@intel.com>
  17782. [CMake] Do not regenerate LLIntAssembly.h on every incremental build
  17783. https://bugs.webkit.org/show_bug.cgi?id=102248
  17784. Reviewed by Kenneth Rohde Christiansen.
  17785. Update LLIntAssembly.h's mtime after running asm.rb to make the build
  17786. system dependency tracking consistent.
  17787. * CMakeLists.txt:
  17788. 2012-11-15 Thiago Marcos P. Santos <thiago.santos@intel.com>
  17789. Fix compiler warnings about signed/unsigned comparison on i386
  17790. https://bugs.webkit.org/show_bug.cgi?id=102249
  17791. Reviewed by Kenneth Rohde Christiansen.
  17792. Add casting to unsigned to shut up gcc warnings. Build was broken on
  17793. JSVALUE32_64 ports compiling with -Werror.
  17794. * llint/LLIntData.cpp:
  17795. (JSC::LLInt::Data::performAssertions):
  17796. 2012-11-14 Brent Fulgham <bfulgham@webkit.org>
  17797. [Windows, WinCairo] Unreviewed build fix.
  17798. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  17799. Missed one of the exports that was part of the WebKit2.def.
  17800. 2012-11-14 Brent Fulgham <bfulgham@webkit.org>
  17801. [Windows, WinCairo] Correct build failure.
  17802. https://bugs.webkit.org/show_bug.cgi?id=102302
  17803. WebCore symbols were mistakenly added to the JavaScriptCore
  17804. library definition file.
  17805. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove
  17806. WebCore symbols that were incorrectly added to the export file.
  17807. 2012-11-14 Mark Lam <mark.lam@apple.com>
  17808. Change JSEventListener::m_jsFunction to be a weak ref.
  17809. https://bugs.webkit.org/show_bug.cgi?id=101989.
  17810. Reviewed by Geoffrey Garen.
  17811. Added infrastructure for scanning weak ref slots.
  17812. * heap/SlotVisitor.cpp: Added #include "SlotVisitorInlines.h".
  17813. * heap/SlotVisitor.h:
  17814. (SlotVisitor): Added SlotVisitor::appendUnbarrieredWeak().
  17815. * heap/SlotVisitorInlines.h: Added #include "Weak.h".
  17816. (JSC::SlotVisitor::appendUnbarrieredWeak): Added.
  17817. * heap/Weak.h:
  17818. (JSC::operator==): Added operator==() for Weak.
  17819. * runtime/JSCell.h: Removed #include "SlotVisitorInlines.h".
  17820. * runtime/JSObject.h: Added #include "SlotVisitorInlines.h".
  17821. 2012-11-14 Filip Pizlo <fpizlo@apple.com>
  17822. Read-only properties created with putDirect() should tell the structure that there are read-only properties
  17823. https://bugs.webkit.org/show_bug.cgi?id=102292
  17824. Reviewed by Gavin Barraclough.
  17825. This mostly affects things like function.length.
  17826. * runtime/JSObject.h:
  17827. (JSC::JSObject::putDirectInternal):
  17828. 2012-11-13 Filip Pizlo <fpizlo@apple.com>
  17829. Don't access Node& after adding nodes to the graph.
  17830. https://bugs.webkit.org/show_bug.cgi?id=102005
  17831. Reviewed by Oliver Hunt.
  17832. * dfg/DFGFixupPhase.cpp:
  17833. (JSC::DFG::FixupPhase::fixupNode):
  17834. 2012-11-14 Valery Ignatyev <valery.ignatyev@ispras.ru>
  17835. Replace (typeof(x) != <"object", "undefined", ...>) with
  17836. !(typeof(x) == <"object",..>). Later is_object, is_<...> bytecode operation
  17837. will be used.
  17838. https://bugs.webkit.org/show_bug.cgi?id=98893
  17839. Reviewed by Filip Pizlo.
  17840. This eliminates expensive typeof implementation and
  17841. allows to use DFG optimizations, which doesn't support 'typeof'.
  17842. * bytecompiler/NodesCodegen.cpp:
  17843. (JSC::BinaryOpNode::emitBytecode):
  17844. 2012-11-14 Peter Gal <galpeter@inf.u-szeged.hu>
  17845. [Qt][ARM]REGRESSION(r133985): It broke the build
  17846. https://bugs.webkit.org/show_bug.cgi?id=101740
  17847. Reviewed by Csaba Osztrogonác.
  17848. Changed the emitGenericContiguousPutByVal to accept the additional IndexingType argument.
  17849. This information was passed as a template parameter.
  17850. * jit/JIT.h:
  17851. (JSC::JIT::emitInt32PutByVal):
  17852. (JSC::JIT::emitDoublePutByVal):
  17853. (JSC::JIT::emitContiguousPutByVal):
  17854. (JIT):
  17855. * jit/JITPropertyAccess.cpp:
  17856. (JSC::JIT::emitGenericContiguousPutByVal):
  17857. * jit/JITPropertyAccess32_64.cpp:
  17858. (JSC::JIT::emitGenericContiguousPutByVal):
  17859. 2012-11-14 Peter Gal <galpeter@inf.u-szeged.hu>
  17860. Fix the MIPS build after r134332
  17861. https://bugs.webkit.org/show_bug.cgi?id=102227
  17862. Reviewed by Csaba Osztrogonác.
  17863. Added missing methods for the MacroAssemblerMIPS, based on the MacroAssemblerARMv7.
  17864. * assembler/MacroAssemblerMIPS.h:
  17865. (JSC::MacroAssemblerMIPS::canJumpReplacePatchableBranchPtrWithPatch):
  17866. (MacroAssemblerMIPS):
  17867. (JSC::MacroAssemblerMIPS::startOfPatchableBranchPtrWithPatch):
  17868. (JSC::MacroAssemblerMIPS::revertJumpReplacementToPatchableBranchPtrWithPatch):
  17869. 2012-11-14 Peter Gal <galpeter@inf.u-szeged.hu>
  17870. Fix the [-Wreturn-type] warning in JavaScriptCore/assembler/MacroAssemblerARM.h
  17871. https://bugs.webkit.org/show_bug.cgi?id=102206
  17872. Reviewed by Csaba Osztrogonác.
  17873. Add a return value for the function to suppress the warning.
  17874. * assembler/MacroAssemblerARM.h:
  17875. (JSC::MacroAssemblerARM::startOfPatchableBranchPtrWithPatch):
  17876. 2012-11-14 Sheriff Bot <webkit.review.bot@gmail.com>
  17877. Unreviewed, rolling out r134599.
  17878. http://trac.webkit.org/changeset/134599
  17879. https://bugs.webkit.org/show_bug.cgi?id=102225
  17880. It broke the 32 bit EFL build (Requested by Ossy on #webkit).
  17881. * jit/JITPropertyAccess.cpp:
  17882. * jit/JITPropertyAccess32_64.cpp:
  17883. (JSC):
  17884. (JSC::JIT::emitGenericContiguousPutByVal):
  17885. 2012-11-14 Balazs Kilvady <kilvadyb@homejinni.com>
  17886. [Qt][ARM]REGRESSION(r133985): It broke the build
  17887. https://bugs.webkit.org/show_bug.cgi?id=101740
  17888. Reviewed by Csaba Osztrogonác.
  17889. Template function body moved to fix VALUE_PROFILER disabled case.
  17890. * jit/JITPropertyAccess.cpp:
  17891. (JSC):
  17892. (JSC::JIT::emitGenericContiguousPutByVal):
  17893. * jit/JITPropertyAccess32_64.cpp:
  17894. 2012-11-13 Filip Pizlo <fpizlo@apple.com>
  17895. DFG CreateThis should be able to statically account for the structure of the object it creates, if profiling indicates that this structure is always the same
  17896. https://bugs.webkit.org/show_bug.cgi?id=102017
  17897. Reviewed by Geoffrey Garen.
  17898. This adds a watchpoint in JSFunction on the cached inheritor ID. It also changes
  17899. NewObject to take a structure as an operand (previously it implicitly used the owning
  17900. global object's empty object structure). Any GetCallee where the callee is predictable
  17901. is turned into a CheckFunction + WeakJSConstant, and any CreateThis on a WeakJSConstant
  17902. where the inheritor ID watchpoint is still valid is turned into an InheritorIDWatchpoint
  17903. followed by a NewObject. NewObject already accounts for the structure it uses for object
  17904. creation in the CFA.
  17905. * dfg/DFGAbstractState.cpp:
  17906. (JSC::DFG::AbstractState::execute):
  17907. * dfg/DFGByteCodeParser.cpp:
  17908. (JSC::DFG::ByteCodeParser::parseBlock):
  17909. * dfg/DFGCSEPhase.cpp:
  17910. (JSC::DFG::CSEPhase::checkFunctionElimination):
  17911. * dfg/DFGGraph.cpp:
  17912. (JSC::DFG::Graph::dump):
  17913. * dfg/DFGNode.h:
  17914. (JSC::DFG::Node::hasFunction):
  17915. (JSC::DFG::Node::function):
  17916. (JSC::DFG::Node::hasStructure):
  17917. * dfg/DFGNodeType.h:
  17918. (DFG):
  17919. * dfg/DFGOperations.cpp:
  17920. * dfg/DFGOperations.h:
  17921. * dfg/DFGPredictionPropagationPhase.cpp:
  17922. (JSC::DFG::PredictionPropagationPhase::propagate):
  17923. * dfg/DFGSpeculativeJIT.h:
  17924. (JSC::DFG::SpeculativeJIT::callOperation):
  17925. * dfg/DFGSpeculativeJIT32_64.cpp:
  17926. (JSC::DFG::SpeculativeJIT::compile):
  17927. * dfg/DFGSpeculativeJIT64.cpp:
  17928. (JSC::DFG::SpeculativeJIT::compile):
  17929. * runtime/Executable.h:
  17930. (JSC::JSFunction::JSFunction):
  17931. * runtime/JSBoundFunction.cpp:
  17932. (JSC):
  17933. * runtime/JSFunction.cpp:
  17934. (JSC::JSFunction::JSFunction):
  17935. (JSC::JSFunction::put):
  17936. (JSC::JSFunction::defineOwnProperty):
  17937. * runtime/JSFunction.h:
  17938. (JSC::JSFunction::tryGetKnownInheritorID):
  17939. (JSFunction):
  17940. (JSC::JSFunction::addInheritorIDWatchpoint):
  17941. 2012-11-13 Filip Pizlo <fpizlo@apple.com>
  17942. JSFunction and its descendants should be destructible
  17943. https://bugs.webkit.org/show_bug.cgi?id=102062
  17944. Reviewed by Mark Hahnenberg.
  17945. This will make it easy to place an InlineWatchpointSet inside JSFunction. In the
  17946. future, we could make JSFunction non-destructible again by making a version of
  17947. WatchpointSet that is entirely GC'd, but this seems like overkill for now.
  17948. This is performance-neutral.
  17949. * runtime/JSBoundFunction.cpp:
  17950. (JSC::JSBoundFunction::destroy):
  17951. (JSC):
  17952. * runtime/JSBoundFunction.h:
  17953. (JSBoundFunction):
  17954. * runtime/JSFunction.cpp:
  17955. (JSC):
  17956. (JSC::JSFunction::destroy):
  17957. * runtime/JSFunction.h:
  17958. (JSFunction):
  17959. 2012-11-13 Cosmin Truta <ctruta@rim.com>
  17960. Uninitialized fields in class JSLock
  17961. https://bugs.webkit.org/show_bug.cgi?id=101695
  17962. Reviewed by Mark Hahnenberg.
  17963. Initialize JSLock::m_ownerThread and JSLock::m_lockDropDepth.
  17964. * runtime/JSLock.cpp:
  17965. (JSC::JSLock::JSLock):
  17966. 2012-11-13 Peter Gal <galpeter@inf.u-szeged.hu>
  17967. Fix the ARM traditional build after r134332
  17968. https://bugs.webkit.org/show_bug.cgi?id=102044
  17969. Reviewed by Zoltan Herczeg.
  17970. Added missing methods for the MacroAssemblerARM, based on the MacroAssemblerARMv7.
  17971. * assembler/MacroAssemblerARM.h:
  17972. (JSC::MacroAssemblerARM::canJumpReplacePatchableBranchPtrWithPatch):
  17973. (MacroAssemblerARM):
  17974. (JSC::MacroAssemblerARM::startOfPatchableBranchPtrWithPatch):
  17975. (JSC::MacroAssemblerARM::revertJumpReplacementToPatchableBranchPtrWithPatch):
  17976. 2012-11-12 Filip Pizlo <fpizlo@apple.com>
  17977. op_get_callee should have value profiling
  17978. https://bugs.webkit.org/show_bug.cgi?id=102047
  17979. Reviewed by Sam Weinig.
  17980. This will allow us to detect if the callee is always the same, which is probably
  17981. the common case for a lot of constructors.
  17982. * bytecode/CodeBlock.cpp:
  17983. (JSC::CodeBlock::CodeBlock):
  17984. * bytecode/Opcode.h:
  17985. (JSC):
  17986. (JSC::padOpcodeName):
  17987. * bytecompiler/BytecodeGenerator.cpp:
  17988. (JSC::BytecodeGenerator::BytecodeGenerator):
  17989. * jit/JITOpcodes.cpp:
  17990. (JSC::JIT::emit_op_get_callee):
  17991. * jit/JITOpcodes32_64.cpp:
  17992. (JSC::JIT::emit_op_get_callee):
  17993. * llint/LowLevelInterpreter32_64.asm:
  17994. * llint/LowLevelInterpreter64.asm:
  17995. 2012-11-12 Filip Pizlo <fpizlo@apple.com>
  17996. The act of getting the callee during 'this' construction should be explicit in bytecode
  17997. https://bugs.webkit.org/show_bug.cgi?id=102016
  17998. Reviewed by Michael Saboff.
  17999. This is mostly a rollout of http://trac.webkit.org/changeset/116673, but also includes
  18000. changes to have create_this use the result of get_callee.
  18001. No performance or behavioral impact. This is just meant to allow us to profile
  18002. get_callee in the future.
  18003. * bytecode/CodeBlock.cpp:
  18004. (JSC::CodeBlock::dump):
  18005. * bytecode/Opcode.h:
  18006. (JSC):
  18007. (JSC::padOpcodeName):
  18008. * bytecompiler/BytecodeGenerator.cpp:
  18009. (JSC::BytecodeGenerator::BytecodeGenerator):
  18010. * dfg/DFGByteCodeParser.cpp:
  18011. (JSC::DFG::ByteCodeParser::parseBlock):
  18012. * dfg/DFGCapabilities.h:
  18013. (JSC::DFG::canCompileOpcode):
  18014. * jit/JIT.cpp:
  18015. (JSC::JIT::privateCompileMainPass):
  18016. * jit/JIT.h:
  18017. (JIT):
  18018. * jit/JITOpcodes.cpp:
  18019. (JSC::JIT::emit_op_get_callee):
  18020. (JSC):
  18021. (JSC::JIT::emit_op_create_this):
  18022. * jit/JITOpcodes32_64.cpp:
  18023. (JSC::JIT::emit_op_get_callee):
  18024. (JSC):
  18025. (JSC::JIT::emit_op_create_this):
  18026. * llint/LLIntSlowPaths.cpp:
  18027. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  18028. * llint/LowLevelInterpreter32_64.asm:
  18029. * llint/LowLevelInterpreter64.asm:
  18030. 2012-11-12 Filip Pizlo <fpizlo@apple.com>
  18031. Unreviewed, fix ARMv7 build.
  18032. * assembler/MacroAssemblerARMv7.h:
  18033. (JSC::MacroAssemblerARMv7::startOfPatchableBranchPtrWithPatch):
  18034. (JSC::MacroAssemblerARMv7::revertJumpReplacementToPatchableBranchPtrWithPatch):
  18035. 2012-11-12 Filip Pizlo <fpizlo@apple.com>
  18036. Patching of jumps to stubs should use jump replacement rather than branch destination overwrite
  18037. https://bugs.webkit.org/show_bug.cgi?id=101909
  18038. Reviewed by Geoffrey Garen.
  18039. This saves a few instructions in inline cases, on those architectures where it is
  18040. easy to figure out where to put the jump replacement. Sub-1% speed-up across the
  18041. board.
  18042. * assembler/MacroAssemblerARMv7.h:
  18043. (MacroAssemblerARMv7):
  18044. (JSC::MacroAssemblerARMv7::canJumpReplacePatchableBranchPtrWithPatch):
  18045. (JSC::MacroAssemblerARMv7::startOfPatchableBranchPtrWithPatch):
  18046. (JSC::MacroAssemblerARMv7::revertJumpReplacementToPatchableBranchPtrWithPatch):
  18047. * assembler/MacroAssemblerX86.h:
  18048. (JSC::MacroAssemblerX86::canJumpReplacePatchableBranchPtrWithPatch):
  18049. (MacroAssemblerX86):
  18050. (JSC::MacroAssemblerX86::startOfPatchableBranchPtrWithPatch):
  18051. (JSC::MacroAssemblerX86::revertJumpReplacementToPatchableBranchPtrWithPatch):
  18052. * assembler/MacroAssemblerX86_64.h:
  18053. (JSC::MacroAssemblerX86_64::canJumpReplacePatchableBranchPtrWithPatch):
  18054. (MacroAssemblerX86_64):
  18055. (JSC::MacroAssemblerX86_64::startOfPatchableBranchPtrWithPatch):
  18056. (JSC::MacroAssemblerX86_64::revertJumpReplacementToPatchableBranchPtrWithPatch):
  18057. * assembler/RepatchBuffer.h:
  18058. (JSC::RepatchBuffer::startOfPatchableBranchPtrWithPatch):
  18059. (RepatchBuffer):
  18060. (JSC::RepatchBuffer::replaceWithJump):
  18061. (JSC::RepatchBuffer::revertJumpReplacementToPatchableBranchPtrWithPatch):
  18062. * assembler/X86Assembler.h:
  18063. (X86Assembler):
  18064. (JSC::X86Assembler::revertJumpTo_movq_i64r):
  18065. (JSC::X86Assembler::revertJumpTo_cmpl_im_force32):
  18066. (X86InstructionFormatter):
  18067. * bytecode/StructureStubInfo.h:
  18068. * dfg/DFGRepatch.cpp:
  18069. (JSC::DFG::replaceWithJump):
  18070. (DFG):
  18071. (JSC::DFG::tryCacheGetByID):
  18072. (JSC::DFG::tryBuildGetByIDList):
  18073. (JSC::DFG::tryBuildGetByIDProtoList):
  18074. (JSC::DFG::tryCachePutByID):
  18075. (JSC::DFG::dfgResetGetByID):
  18076. (JSC::DFG::dfgResetPutByID):
  18077. 2012-11-11 Filip Pizlo <fpizlo@apple.com>
  18078. DFG ArithMul overflow check elimination is too aggressive
  18079. https://bugs.webkit.org/show_bug.cgi?id=101871
  18080. Reviewed by Oliver Hunt.
  18081. The code was ignoring the fact that ((a * b) | 0) == (((a | 0) * (b | 0)) | 0)
  18082. only holds if a * b < 2^53. So, I changed it to only enable the optimization
  18083. when a < 2^22 and b is an int32 (and vice versa), using a super trivial peephole
  18084. analysis to prove the inequality. I considered writing an epic forward flow
  18085. formulation that tracks the ranges of integer values but then I thought better
  18086. of it.
  18087. This also rewires the ArithMul integer speculation logic. Previously, we would
  18088. assume that an ArithMul was only UsedAsNumber if it escaped, and separately we
  18089. would decide whether to speculate integer based on a proof of the <2^22
  18090. inequality. Now, we treat the double rounding behavior of ArithMul as if the
  18091. result was UsedAsNumber even if it did not escape. Then we try to prove that
  18092. double rounding cannot happen by attemping to prove that a < 2^22. This then
  18093. feeds back into the decision of whether or not to speculate integer (if we fail
  18094. to prove a < 2^22 then we're UsedAsNumber, and if we're also MayOverflow then
  18095. that forces double speculation).
  18096. No performance impact. It just fixes a bug.
  18097. * dfg/DFGGraph.h:
  18098. (JSC::DFG::Graph::mulShouldSpeculateInteger):
  18099. * dfg/DFGPredictionPropagationPhase.cpp:
  18100. (PredictionPropagationPhase):
  18101. (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoForConstant):
  18102. (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoNonRecursive):
  18103. (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwo):
  18104. (JSC::DFG::PredictionPropagationPhase::propagate):
  18105. 2012-11-11 Filip Pizlo <fpizlo@apple.com>
  18106. DFG should not emit function checks if we've already proved that the operand is that exact function
  18107. https://bugs.webkit.org/show_bug.cgi?id=101885
  18108. Reviewed by Oliver Hunt.
  18109. * dfg/DFGAbstractState.cpp:
  18110. (JSC::DFG::AbstractState::execute):
  18111. * dfg/DFGAbstractValue.h:
  18112. (JSC::DFG::AbstractValue::filterByValue):
  18113. (AbstractValue):
  18114. * dfg/DFGConstantFoldingPhase.cpp:
  18115. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  18116. 2012-11-12 Kentaro Hara <haraken@chromium.org>
  18117. [V8][JSC] ScriptProfileNode::callUID needs not to be [Custom]
  18118. https://bugs.webkit.org/show_bug.cgi?id=101892
  18119. Reviewed by Adam Barth.
  18120. Added callUID(), which enables us to kill custom bindings for ScriptProfileNode::callUID.
  18121. * profiler/ProfileNode.h:
  18122. (JSC::ProfileNode::callUID):
  18123. 2012-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
  18124. Unreviewed. Fix make distcheck.
  18125. * GNUmakefile.list.am: Add missing header.
  18126. 2012-11-11 Michael Pruett <michael@68k.org>
  18127. Fix assertion failure in JSObject::tryGetIndexQuickly()
  18128. https://bugs.webkit.org/show_bug.cgi?id=101869
  18129. Reviewed by Filip Pizlo.
  18130. Currently JSObject::tryGetIndexQuickly() triggers an assertion
  18131. failure when the object has an undecided indexing type. This
  18132. case should be treated the same as a blank indexing type.
  18133. * runtime/JSObject.h:
  18134. (JSC::JSObject::tryGetIndexQuickly):
  18135. 2012-11-11 Filip Pizlo <fpizlo@apple.com>
  18136. DFG register allocation should be greedy rather than round-robin
  18137. https://bugs.webkit.org/show_bug.cgi?id=101870
  18138. Reviewed by Geoffrey Garen.
  18139. This simplifies the code, reduces some code duplication, and shows some slight
  18140. performance improvements in a few places, likely due to the fact that lower-numered
  18141. registers also typically have smaller encodings.
  18142. * dfg/DFGRegisterBank.h:
  18143. (JSC::DFG::RegisterBank::RegisterBank):
  18144. (JSC::DFG::RegisterBank::tryAllocate):
  18145. (JSC::DFG::RegisterBank::allocate):
  18146. (JSC::DFG::RegisterBank::allocateInternal):
  18147. (RegisterBank):
  18148. 2012-11-11 Kenichi Ishibashi <bashi@chromium.org>
  18149. WTFString::utf8() should have a mode of conversion to use replacement character
  18150. https://bugs.webkit.org/show_bug.cgi?id=101678
  18151. Reviewed by Alexey Proskuryakov.
  18152. Follow the change on String::utf8()
  18153. * runtime/JSGlobalObjectFunctions.cpp:
  18154. (JSC::encode): Pass String::StrictConversion instead of true to String::utf8().
  18155. 2012-11-10 Filip Pizlo <fpizlo@apple.com>
  18156. DFG should optimize out the NaN check on loads from double arrays if the array prototype chain is having a great time
  18157. https://bugs.webkit.org/show_bug.cgi?id=101718
  18158. Reviewed by Geoffrey Garen.
  18159. If we're reading from a JSArray in double mode, where the array's structure is
  18160. primordial (all aspects of the structure are unchanged except for indexing type),
  18161. and the result of the load is used in arithmetic that is known to not distinguish
  18162. between NaN and undefined, then we should not emit a NaN check. Looks like a 5%
  18163. win on navier-stokes.
  18164. Also fixed an OpInfo initialization goof for String ops that was revealed by this
  18165. change.
  18166. * dfg/DFGAbstractState.cpp:
  18167. (JSC::DFG::AbstractState::execute):
  18168. * dfg/DFGArrayMode.cpp:
  18169. (JSC::DFG::arraySpeculationToString):
  18170. * dfg/DFGArrayMode.h:
  18171. (JSC::DFG::ArrayMode::isSaneChain):
  18172. (ArrayMode):
  18173. (JSC::DFG::ArrayMode::isInBounds):
  18174. * dfg/DFGByteCodeParser.cpp:
  18175. (JSC::DFG::ByteCodeParser::handleIntrinsic):
  18176. * dfg/DFGFixupPhase.cpp:
  18177. (JSC::DFG::FixupPhase::fixupNode):
  18178. * dfg/DFGNodeFlags.cpp:
  18179. (JSC::DFG::nodeFlagsAsString):
  18180. * dfg/DFGNodeFlags.h:
  18181. (DFG):
  18182. * dfg/DFGPredictionPropagationPhase.cpp:
  18183. (JSC::DFG::PredictionPropagationPhase::propagate):
  18184. * dfg/DFGSpeculativeJIT32_64.cpp:
  18185. (JSC::DFG::SpeculativeJIT::compile):
  18186. * dfg/DFGSpeculativeJIT64.cpp:
  18187. (JSC::DFG::SpeculativeJIT::compile):
  18188. * runtime/JSGlobalObject.cpp:
  18189. (JSC::JSGlobalObject::arrayPrototypeChainIsSane):
  18190. (JSC):
  18191. * runtime/JSGlobalObject.h:
  18192. (JSGlobalObject):
  18193. 2012-11-10 Filip Pizlo <fpizlo@apple.com>
  18194. DFG constant folding and CFG simplification should be smart enough to know that if a logical op's operand is proven to have a non-masquerading structure then it always evaluates to true
  18195. https://bugs.webkit.org/show_bug.cgi?id=101511
  18196. Reviewed by Geoffrey Garen.
  18197. This is the second attempt at this patch, which fixes the !"" case.
  18198. To make life easier, this moves BranchDirection into BasicBlock so that after
  18199. running the CFA, we always know, for each block, what direction the CFA
  18200. proved. CFG simplification now both uses and preserves cfaBranchDirection in
  18201. its transformations.
  18202. Also made both LogicalNot and Branch check whether the operand is a known cell
  18203. with a known structure, and if so, made them do the appropriate folding.
  18204. 5% speed-up on V8/raytrace because it makes raytrace's own null checks
  18205. evaporate (i.e. idioms like 'if (!x) throw "unhappiness"') thanks to the fact
  18206. that we were already doing structure check hoisting.
  18207. * JavaScriptCore.xcodeproj/project.pbxproj:
  18208. * dfg/DFGAbstractState.cpp:
  18209. (JSC::DFG::AbstractState::endBasicBlock):
  18210. (JSC::DFG::AbstractState::execute):
  18211. (JSC::DFG::AbstractState::mergeToSuccessors):
  18212. * dfg/DFGAbstractState.h:
  18213. (AbstractState):
  18214. * dfg/DFGBasicBlock.h:
  18215. (JSC::DFG::BasicBlock::BasicBlock):
  18216. (BasicBlock):
  18217. * dfg/DFGBranchDirection.h: Added.
  18218. (DFG):
  18219. (JSC::DFG::branchDirectionToString):
  18220. (JSC::DFG::isKnownDirection):
  18221. (JSC::DFG::branchCondition):
  18222. * dfg/DFGCFGSimplificationPhase.cpp:
  18223. (JSC::DFG::CFGSimplificationPhase::run):
  18224. (JSC::DFG::CFGSimplificationPhase::mergeBlocks):
  18225. 2012-11-10 Sheriff Bot <webkit.review.bot@gmail.com>
  18226. Unreviewed, rolling out r133971.
  18227. http://trac.webkit.org/changeset/133971
  18228. https://bugs.webkit.org/show_bug.cgi?id=101839
  18229. Causes WebProcess to hang at 100% on www.apple.com (Requested
  18230. by kling on #webkit).
  18231. * JavaScriptCore.xcodeproj/project.pbxproj:
  18232. * dfg/DFGAbstractState.cpp:
  18233. (JSC::DFG::AbstractState::endBasicBlock):
  18234. (JSC::DFG::AbstractState::execute):
  18235. (JSC::DFG::AbstractState::mergeToSuccessors):
  18236. * dfg/DFGAbstractState.h:
  18237. (JSC::DFG::AbstractState::branchDirectionToString):
  18238. (AbstractState):
  18239. * dfg/DFGBasicBlock.h:
  18240. (JSC::DFG::BasicBlock::BasicBlock):
  18241. (BasicBlock):
  18242. * dfg/DFGBranchDirection.h: Removed.
  18243. * dfg/DFGCFGSimplificationPhase.cpp:
  18244. (JSC::DFG::CFGSimplificationPhase::run):
  18245. (JSC::DFG::CFGSimplificationPhase::mergeBlocks):
  18246. 2012-11-09 Filip Pizlo <fpizlo@apple.com>
  18247. If the DFG ArrayMode says that an access is on an OriginalArray, then the checks should always enforce this
  18248. https://bugs.webkit.org/show_bug.cgi?id=101720
  18249. Reviewed by Mark Hahnenberg.
  18250. Previously, "original" arrays was just a hint that we could find the structure
  18251. of the array if we needed to even if the array profile didn't have it due to
  18252. polymorphism. Now, "original" arrays are a property that is actually checked:
  18253. if an array access has ArrayMode::arrayClass() == Array::OriginalArray, then we
  18254. can be sure that the code performing the access is dealing with not just a
  18255. JSArray, but a JSArray that has no named properties, no indexed accessors, and
  18256. the ArrayPrototype as its prototype. This will be useful for optimizations that
  18257. are being done as part of https://bugs.webkit.org/show_bug.cgi?id=101720.
  18258. * dfg/DFGAbstractState.cpp:
  18259. (JSC::DFG::AbstractState::execute):
  18260. * dfg/DFGArrayMode.cpp:
  18261. (JSC::DFG::ArrayMode::originalArrayStructure):
  18262. (DFG):
  18263. (JSC::DFG::ArrayMode::alreadyChecked):
  18264. * dfg/DFGArrayMode.h:
  18265. (JSC):
  18266. (DFG):
  18267. (JSC::DFG::ArrayMode::withProfile):
  18268. (ArrayMode):
  18269. (JSC::DFG::ArrayMode::benefitsFromOriginalArray):
  18270. * dfg/DFGConstantFoldingPhase.cpp:
  18271. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  18272. * dfg/DFGFixupPhase.cpp:
  18273. (JSC::DFG::FixupPhase::checkArray):
  18274. * dfg/DFGSpeculativeJIT.cpp:
  18275. (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
  18276. (JSC::DFG::SpeculativeJIT::checkArray):
  18277. (JSC::DFG::SpeculativeJIT::compileGetByValOnString):
  18278. (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
  18279. (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
  18280. (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
  18281. (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments):
  18282. (JSC::DFG::SpeculativeJIT::compileGetArgumentsLength):
  18283. 2012-11-09 Filip Pizlo <fpizlo@apple.com>
  18284. Fix indentation of BooleanPrototype.h
  18285. Rubber stamped by Mark Hahnenberg.
  18286. * runtime/BooleanPrototype.h:
  18287. 2012-11-09 Filip Pizlo <fpizlo@apple.com>
  18288. Fix indentation of BooleanObject.h
  18289. Rubber stamped by Mark Hahnenberg.
  18290. * runtime/BooleanObject.h:
  18291. 2012-11-09 Filip Pizlo <fpizlo@apple.com>
  18292. Fix indentation of BooleanConstructor.h
  18293. Rubber stamped by Mark Hahnenberg.
  18294. * runtime/BooleanConstructor.h:
  18295. 2012-11-09 Filip Pizlo <fpizlo@apple.com>
  18296. Fix indentation of BatchedTransitionOptimizer.h
  18297. Rubber stamped by Mark Hahnenberg.
  18298. * runtime/BatchedTransitionOptimizer.h:
  18299. 2012-11-09 Oliver Hunt <oliver@apple.com>
  18300. So Thingy probably isn't the best name for a class, so
  18301. renamed to CacheMap.
  18302. RS=Geoff
  18303. * runtime/CodeCache.h:
  18304. (JSC::CacheMap::CacheMap):
  18305. 2012-11-09 Filip Pizlo <fpizlo@apple.com>
  18306. ArrayPrototype should start out with a blank indexing type
  18307. https://bugs.webkit.org/show_bug.cgi?id=101719
  18308. Reviewed by Mark Hahnenberg.
  18309. This allows us to track if the array prototype ever ends up with indexed
  18310. properties.
  18311. * runtime/ArrayPrototype.cpp:
  18312. (JSC::ArrayPrototype::create):
  18313. (JSC::ArrayPrototype::ArrayPrototype):
  18314. * runtime/ArrayPrototype.h:
  18315. (ArrayPrototype):
  18316. (JSC::ArrayPrototype::createStructure):
  18317. 2012-11-08 Mark Hahnenberg <mhahnenberg@apple.com>
  18318. MarkStackArray should use the BlockAllocator instead of the MarkStackSegmentAllocator
  18319. https://bugs.webkit.org/show_bug.cgi?id=101642
  18320. Reviewed by Filip Pizlo.
  18321. MarkStackSegmentAllocator is like a miniature version of the BlockAllocator. Now that the BlockAllocator has support
  18322. for a variety of block sizes, we should get rid of the MarkStackSegmentAllocator in favor of the BlockAllocator.
  18323. * heap/BlockAllocator.h: Add new specializations of regionSetFor for the new MarkStackSegments.
  18324. (JSC):
  18325. (JSC::MarkStackSegment):
  18326. * heap/GCThreadSharedData.cpp:
  18327. (JSC::GCThreadSharedData::GCThreadSharedData):
  18328. (JSC::GCThreadSharedData::reset):
  18329. * heap/GCThreadSharedData.h:
  18330. (GCThreadSharedData):
  18331. * heap/MarkStack.cpp:
  18332. (JSC::MarkStackArray::MarkStackArray): We now have a doubly linked list of MarkStackSegments, so we need to refactor
  18333. all the places that used the old custom tail/previous logic.
  18334. (JSC::MarkStackArray::~MarkStackArray):
  18335. (JSC::MarkStackArray::expand):
  18336. (JSC::MarkStackArray::refill):
  18337. (JSC::MarkStackArray::donateSomeCellsTo): Refactor to use the new linked list.
  18338. (JSC::MarkStackArray::stealSomeCellsFrom): Ditto.
  18339. * heap/MarkStack.h:
  18340. (JSC):
  18341. (MarkStackSegment):
  18342. (JSC::MarkStackSegment::MarkStackSegment):
  18343. (JSC::MarkStackSegment::sizeFromCapacity):
  18344. (MarkStackArray):
  18345. * heap/MarkStackInlines.h:
  18346. (JSC::MarkStackSegment::create):
  18347. (JSC):
  18348. (JSC::MarkStackArray::postIncTop):
  18349. (JSC::MarkStackArray::preDecTop):
  18350. (JSC::MarkStackArray::setTopForFullSegment):
  18351. (JSC::MarkStackArray::setTopForEmptySegment):
  18352. (JSC::MarkStackArray::top):
  18353. (JSC::MarkStackArray::validatePrevious):
  18354. (JSC::MarkStackArray::append):
  18355. (JSC::MarkStackArray::removeLast):
  18356. (JSC::MarkStackArray::isEmpty):
  18357. (JSC::MarkStackArray::size):
  18358. * heap/SlotVisitor.cpp:
  18359. (JSC::SlotVisitor::SlotVisitor):
  18360. 2012-11-09 Gabor Ballabas <gaborb@inf.u-szeged.hu>
  18361. [Qt] r133953 broke the ARM_TRADITIONAL build
  18362. https://bugs.webkit.org/show_bug.cgi?id=101706
  18363. Reviewed by Csaba Osztrogonác.
  18364. Fix for both hardfp and softfp.
  18365. * dfg/DFGCCallHelpers.h:
  18366. (CCallHelpers):
  18367. (JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
  18368. 2012-11-09 Sheriff Bot <webkit.review.bot@gmail.com>
  18369. Unreviewed, rolling out r134051.
  18370. http://trac.webkit.org/changeset/134051
  18371. https://bugs.webkit.org/show_bug.cgi?id=101757
  18372. It didn't fix the build (Requested by Ossy on #webkit).
  18373. * dfg/DFGCCallHelpers.h:
  18374. (JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
  18375. 2012-11-09 Gabor Ballabas <gaborb@inf.u-szeged.hu>
  18376. [Qt] r133953 broke the ARM_TRADITIONAL build
  18377. https://bugs.webkit.org/show_bug.cgi?id=101706
  18378. Reviewed by Csaba Osztrogonác.
  18379. Fix the ARM_TRADITIONAL build after r133953
  18380. * dfg/DFGCCallHelpers.h:
  18381. (JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
  18382. (CCallHelpers):
  18383. 2012-11-09 Csaba Osztrogonác <ossy@webkit.org>
  18384. [Qt] Fix the LLINT build from ARMv7 platform
  18385. https://bugs.webkit.org/show_bug.cgi?id=101712
  18386. Reviewed by Simon Hausmann.
  18387. Enable generating of LLIntAssembly.h on ARM platforms.
  18388. * DerivedSources.pri:
  18389. * JavaScriptCore.pro:
  18390. 2012-11-08 Filip Pizlo <fpizlo@apple.com>
  18391. ArrayPrototype.h should have correct indentation
  18392. Rubber stamped by Sam Weinig.
  18393. * runtime/ArrayPrototype.h:
  18394. 2012-11-08 Mark Lam <mark.lam@apple.com>
  18395. Renamed ...InlineMethods.h files to ...Inlines.h.
  18396. https://bugs.webkit.org/show_bug.cgi?id=101145.
  18397. Reviewed by Geoffrey Garen.
  18398. This is only a refactoring effort to rename the files. There are no
  18399. functionality changes.
  18400. * API/JSObjectRef.cpp:
  18401. * GNUmakefile.list.am:
  18402. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  18403. * JavaScriptCore.xcodeproj/project.pbxproj:
  18404. * bytecode/CodeBlock.cpp:
  18405. * dfg/DFGOperations.cpp:
  18406. * heap/ConservativeRoots.cpp:
  18407. * heap/CopiedBlock.h:
  18408. * heap/CopiedSpace.cpp:
  18409. * heap/CopiedSpaceInlineMethods.h: Removed.
  18410. * heap/CopiedSpaceInlines.h: Copied from Source/JavaScriptCore/heap/CopiedSpaceInlineMethods.h.
  18411. * heap/CopyVisitor.cpp:
  18412. * heap/CopyVisitorInlineMethods.h: Removed.
  18413. * heap/CopyVisitorInlines.h: Copied from Source/JavaScriptCore/heap/CopyVisitorInlineMethods.h.
  18414. * heap/GCThread.cpp:
  18415. * heap/GCThreadSharedData.cpp:
  18416. * heap/HandleStack.cpp:
  18417. * heap/Heap.cpp:
  18418. * heap/HeapRootVisitor.h:
  18419. * heap/MarkStack.cpp:
  18420. * heap/MarkStackInlineMethods.h: Removed.
  18421. * heap/MarkStackInlines.h: Copied from Source/JavaScriptCore/heap/MarkStackInlineMethods.h.
  18422. * heap/SlotVisitor.cpp:
  18423. * heap/SlotVisitor.h:
  18424. * heap/SlotVisitorInlineMethods.h: Removed.
  18425. * heap/SlotVisitorInlines.h: Copied from Source/JavaScriptCore/heap/SlotVisitorInlineMethods.h.
  18426. * jit/HostCallReturnValue.cpp:
  18427. * jit/JIT.cpp:
  18428. * jit/JITArithmetic.cpp:
  18429. * jit/JITArithmetic32_64.cpp:
  18430. * jit/JITCall.cpp:
  18431. * jit/JITCall32_64.cpp:
  18432. * jit/JITInlineMethods.h: Removed.
  18433. * jit/JITInlines.h: Copied from Source/JavaScriptCore/jit/JITInlineMethods.h.
  18434. * jit/JITOpcodes.cpp:
  18435. * jit/JITOpcodes32_64.cpp:
  18436. * jit/JITPropertyAccess.cpp:
  18437. * jit/JITPropertyAccess32_64.cpp:
  18438. * jsc.cpp:
  18439. * runtime/ArrayConstructor.cpp:
  18440. * runtime/ArrayPrototype.cpp:
  18441. * runtime/ButterflyInlineMethods.h: Removed.
  18442. * runtime/ButterflyInlines.h: Copied from Source/JavaScriptCore/runtime/ButterflyInlineMethods.h.
  18443. * runtime/IndexingHeaderInlineMethods.h: Removed.
  18444. * runtime/IndexingHeaderInlines.h: Copied from Source/JavaScriptCore/runtime/IndexingHeaderInlineMethods.h.
  18445. * runtime/JSActivation.h:
  18446. * runtime/JSArray.cpp:
  18447. * runtime/JSArray.h:
  18448. * runtime/JSCell.h:
  18449. * runtime/JSObject.cpp:
  18450. * runtime/JSValueInlineMethods.h: Removed.
  18451. * runtime/JSValueInlines.h: Copied from Source/JavaScriptCore/runtime/JSValueInlineMethods.h.
  18452. * runtime/LiteralParser.cpp:
  18453. * runtime/ObjectConstructor.cpp:
  18454. * runtime/Operations.h:
  18455. * runtime/RegExpMatchesArray.cpp:
  18456. * runtime/RegExpObject.cpp:
  18457. * runtime/StringPrototype.cpp:
  18458. 2012-11-08 Filip Pizlo <fpizlo@apple.com>
  18459. ArrayConstructor.h should have correct indentation
  18460. Rubber stamped by Sam Weinig.
  18461. * runtime/ArrayConstructor.h:
  18462. 2012-11-08 Filip Pizlo <fpizlo@apple.com>
  18463. DFG should know that int == null is always false
  18464. https://bugs.webkit.org/show_bug.cgi?id=101665
  18465. Reviewed by Oliver Hunt.
  18466. * dfg/DFGAbstractState.cpp:
  18467. (JSC::DFG::AbstractState::execute):
  18468. 2012-11-08 Filip Pizlo <fpizlo@apple.com>
  18469. Arguments.h should have correct indentation
  18470. Rubber stamped by Sam Weinig.
  18471. * runtime/Arguments.h:
  18472. 2012-11-08 Filip Pizlo <fpizlo@apple.com>
  18473. It should be possible to JIT compile get_by_vals and put_by_vals even if the DFG is disabled.
  18474. Reviewed by Oliver Hunt.
  18475. * jit/JITInlineMethods.h:
  18476. (JSC::JIT::chooseArrayMode):
  18477. 2012-11-08 Filip Pizlo <fpizlo@apple.com>
  18478. op_call should have LLInt call link info even if the DFG is disabled
  18479. https://bugs.webkit.org/show_bug.cgi?id=101672
  18480. Reviewed by Oliver Hunt.
  18481. Get rid of the evil uses of fall-through.
  18482. * bytecode/CodeBlock.cpp:
  18483. (JSC::CodeBlock::CodeBlock):
  18484. 2012-11-08 Oliver Hunt <oliver@apple.com>
  18485. Improve effectiveness of function-level caching
  18486. https://bugs.webkit.org/show_bug.cgi?id=101667
  18487. Reviewed by Filip Pizlo.
  18488. Added a random-eviction based cache for unlinked functions, and switch
  18489. UnlinkedFunctionExecutable's code references to Weak<>, thereby letting
  18490. us remove the explicit UnlinkedFunctionExecutable::clearCode() calls that
  18491. were being triggered by GC.
  18492. Refactored the random eviction part of the CodeCache into a separate data
  18493. structure so that I didn't have to duplicate the code again, and then used
  18494. that for the new function cache.
  18495. * bytecode/UnlinkedCodeBlock.cpp:
  18496. (JSC::UnlinkedFunctionExecutable::visitChildren):
  18497. (JSC::UnlinkedFunctionExecutable::codeBlockFor):
  18498. * bytecode/UnlinkedCodeBlock.h:
  18499. (JSC::UnlinkedFunctionExecutable::clearCodeForRecompilation):
  18500. (UnlinkedFunctionExecutable):
  18501. * debugger/Debugger.cpp:
  18502. * runtime/CodeCache.cpp:
  18503. (JSC::CodeCache::getCodeBlock):
  18504. (JSC::CodeCache::generateFunctionCodeBlock):
  18505. (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
  18506. (JSC::CodeCache::usedFunctionCode):
  18507. (JSC):
  18508. * runtime/Executable.cpp:
  18509. (JSC::FunctionExecutable::clearUnlinkedCodeForRecompilationIfNotCompiling):
  18510. (JSC::FunctionExecutable::clearCode):
  18511. * runtime/Executable.h:
  18512. (FunctionExecutable):
  18513. 2012-11-07 Filip Pizlo <fpizlo@apple.com>
  18514. DFG constant folding and CFG simplification should be smart enough to know that if a logical op's operand is proven to have a non-masquerading structure then it always evaluates to true
  18515. https://bugs.webkit.org/show_bug.cgi?id=101511
  18516. Reviewed by Oliver Hunt.
  18517. To make life easier, this moves BranchDirection into BasicBlock so that after
  18518. running the CFA, we always know, for each block, what direction the CFA
  18519. proved. CFG simplification now both uses and preserves cfaBranchDirection in
  18520. its transformations.
  18521. Also made both LogicalNot and Branch check whether the operand is a known cell
  18522. with a known structure, and if so, made them do the appropriate folding.
  18523. 5% speed-up on V8/raytrace because it makes raytrace's own null checks
  18524. evaporate (i.e. idioms like 'if (!x) throw "unhappiness"') thanks to the fact
  18525. that we were already doing structure check hoisting.
  18526. * JavaScriptCore.xcodeproj/project.pbxproj:
  18527. * dfg/DFGAbstractState.cpp:
  18528. (JSC::DFG::AbstractState::endBasicBlock):
  18529. (JSC::DFG::AbstractState::execute):
  18530. (JSC::DFG::AbstractState::mergeToSuccessors):
  18531. * dfg/DFGAbstractState.h:
  18532. (AbstractState):
  18533. * dfg/DFGBasicBlock.h:
  18534. (JSC::DFG::BasicBlock::BasicBlock):
  18535. (BasicBlock):
  18536. * dfg/DFGBranchDirection.h: Added.
  18537. (DFG):
  18538. (JSC::DFG::branchDirectionToString):
  18539. (JSC::DFG::isKnownDirection):
  18540. (JSC::DFG::branchCondition):
  18541. * dfg/DFGCFGSimplificationPhase.cpp:
  18542. (JSC::DFG::CFGSimplificationPhase::run):
  18543. (JSC::DFG::CFGSimplificationPhase::mergeBlocks):
  18544. 2012-11-08 Christophe Dumez <christophe.dumez@intel.com>
  18545. [JSC] HTML extensions to String.prototype should escape " as &quot; in argument values
  18546. https://bugs.webkit.org/show_bug.cgi?id=90667
  18547. Reviewed by Benjamin Poulain.
  18548. Escape quotation mark as &quot; in argument values to:
  18549. - String.prototype.anchor(name)
  18550. - String.prototype.fontcolor(color)
  18551. - String.prototype.fontsize(size)
  18552. - String.prototype.link(href)
  18553. This behavior matches Chromium/V8 and Firefox/Spidermonkey
  18554. implementations and is requited by:
  18555. http://mathias.html5.org/specs/javascript/#escapeattributevalue
  18556. This also fixes a potential security risk (XSS vector).
  18557. * runtime/StringPrototype.cpp:
  18558. (JSC::stringProtoFuncFontcolor):
  18559. (JSC::stringProtoFuncFontsize):
  18560. (JSC::stringProtoFuncAnchor):
  18561. (JSC::stringProtoFuncLink):
  18562. 2012-11-08 Anders Carlsson <andersca@apple.com>
  18563. HeapStatistics::s_pauseTimeStarts and s_pauseTimeEnds should be Vectors
  18564. https://bugs.webkit.org/show_bug.cgi?id=101651
  18565. Reviewed by Andreas Kling.
  18566. HeapStatistics uses Deques when Vectors would work just as good.
  18567. * heap/HeapStatistics.cpp:
  18568. * heap/HeapStatistics.h:
  18569. (HeapStatistics):
  18570. 2012-11-07 Filip Pizlo <fpizlo@apple.com>
  18571. DFG should not assume that something is a double just because it might be undefined
  18572. https://bugs.webkit.org/show_bug.cgi?id=101438
  18573. Reviewed by Oliver Hunt.
  18574. This changes all non-bitop arithmetic to (a) statically expect that variables are
  18575. defined prior to use in arithmetic and (b) not fall off into double paths just
  18576. because a value may not be a number. This is accomplished with two new notions of
  18577. speculation:
  18578. shouldSpeculateIntegerExpectingDefined: Should we speculate that the value is an
  18579. integer if we ignore undefined (i.e. SpecOther) predictions?
  18580. shouldSpeculateIntegerForArithmetic: Should we speculate that the value is an
  18581. integer if we ignore non-numeric predictions?
  18582. This is a ~2x speed-up on programs that seem to our prediction propagator to have
  18583. paths in which otherwise numeric variables are undefined.
  18584. * bytecode/SpeculatedType.h:
  18585. (JSC::isInt32SpeculationForArithmetic):
  18586. (JSC):
  18587. (JSC::isInt32SpeculationExpectingDefined):
  18588. (JSC::isDoubleSpeculationForArithmetic):
  18589. (JSC::isNumberSpeculationExpectingDefined):
  18590. * dfg/DFGAbstractState.cpp:
  18591. (JSC::DFG::AbstractState::execute):
  18592. * dfg/DFGFixupPhase.cpp:
  18593. (JSC::DFG::FixupPhase::fixupNode):
  18594. * dfg/DFGGraph.h:
  18595. (JSC::DFG::Graph::addShouldSpeculateInteger):
  18596. (JSC::DFG::Graph::mulShouldSpeculateInteger):
  18597. (JSC::DFG::Graph::negateShouldSpeculateInteger):
  18598. (JSC::DFG::Graph::addImmediateShouldSpeculateInteger):
  18599. (JSC::DFG::Graph::mulImmediateShouldSpeculateInteger):
  18600. * dfg/DFGNode.h:
  18601. (JSC::DFG::Node::shouldSpeculateIntegerForArithmetic):
  18602. (Node):
  18603. (JSC::DFG::Node::shouldSpeculateIntegerExpectingDefined):
  18604. (JSC::DFG::Node::shouldSpeculateDoubleForArithmetic):
  18605. (JSC::DFG::Node::shouldSpeculateNumberExpectingDefined):
  18606. * dfg/DFGPredictionPropagationPhase.cpp:
  18607. (JSC::DFG::PredictionPropagationPhase::propagate):
  18608. (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting):
  18609. * dfg/DFGSpeculativeJIT.cpp:
  18610. (JSC::DFG::SpeculativeJIT::compileAdd):
  18611. (JSC::DFG::SpeculativeJIT::compileArithMod):
  18612. * dfg/DFGSpeculativeJIT32_64.cpp:
  18613. (JSC::DFG::SpeculativeJIT::compile):
  18614. * dfg/DFGSpeculativeJIT64.cpp:
  18615. (JSC::DFG::SpeculativeJIT::compile):
  18616. * jit/JITArithmetic.cpp:
  18617. (JSC::JIT::emit_op_div):
  18618. 2012-11-06 Filip Pizlo <fpizlo@apple.com>
  18619. JSC should infer when indexed storage contains only integers or doubles
  18620. https://bugs.webkit.org/show_bug.cgi?id=98606
  18621. Reviewed by Oliver Hunt.
  18622. This adds two new indexing types: int32 and double. It also adds array allocation profiling,
  18623. which allows array allocations to converge to allocating arrays using those types to which
  18624. those arrays would have been converted.
  18625. 20% speed-up on navier-stokes. 40% speed-up on various Kraken DSP tests. Some slow-downs too,
  18626. but a performance win overall on all benchmarks we track.
  18627. * API/JSObjectRef.cpp:
  18628. (JSObjectMakeArray):
  18629. * CMakeLists.txt:
  18630. * GNUmakefile.list.am:
  18631. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  18632. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  18633. * JavaScriptCore.xcodeproj/project.pbxproj:
  18634. * Target.pri:
  18635. * assembler/AbstractMacroAssembler.h:
  18636. (JumpList):
  18637. (JSC::AbstractMacroAssembler::JumpList::JumpList):
  18638. * assembler/MacroAssemblerX86Common.h:
  18639. (JSC::MacroAssemblerX86Common::branchDouble):
  18640. * assembler/X86Assembler.h:
  18641. (JSC::X86Assembler::jnp):
  18642. (X86Assembler):
  18643. (JSC::X86Assembler::X86InstructionFormatter::emitRex):
  18644. * bytecode/ArrayAllocationProfile.cpp: Added.
  18645. (JSC):
  18646. (JSC::ArrayAllocationProfile::updateIndexingType):
  18647. * bytecode/ArrayAllocationProfile.h: Added.
  18648. (JSC):
  18649. (ArrayAllocationProfile):
  18650. (JSC::ArrayAllocationProfile::ArrayAllocationProfile):
  18651. (JSC::ArrayAllocationProfile::selectIndexingType):
  18652. (JSC::ArrayAllocationProfile::updateLastAllocation):
  18653. (JSC::ArrayAllocationProfile::selectIndexingTypeFor):
  18654. (JSC::ArrayAllocationProfile::updateLastAllocationFor):
  18655. * bytecode/ArrayProfile.cpp:
  18656. (JSC::ArrayProfile::updatedObservedArrayModes):
  18657. (JSC):
  18658. * bytecode/ArrayProfile.h:
  18659. (JSC):
  18660. (JSC::arrayModesInclude):
  18661. (JSC::shouldUseSlowPutArrayStorage):
  18662. (JSC::shouldUseFastArrayStorage):
  18663. (JSC::shouldUseContiguous):
  18664. (JSC::shouldUseDouble):
  18665. (JSC::shouldUseInt32):
  18666. (ArrayProfile):
  18667. * bytecode/ByValInfo.h:
  18668. (JSC::isOptimizableIndexingType):
  18669. (JSC::jitArrayModeForIndexingType):
  18670. * bytecode/CodeBlock.cpp:
  18671. (JSC::CodeBlock::dump):
  18672. (JSC::CodeBlock::CodeBlock):
  18673. (JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
  18674. (JSC):
  18675. (JSC::CodeBlock::updateAllValueProfilePredictions):
  18676. (JSC::CodeBlock::updateAllArrayPredictions):
  18677. (JSC::CodeBlock::updateAllPredictions):
  18678. (JSC::CodeBlock::shouldOptimizeNow):
  18679. * bytecode/CodeBlock.h:
  18680. (CodeBlock):
  18681. (JSC::CodeBlock::numberOfArrayAllocationProfiles):
  18682. (JSC::CodeBlock::addArrayAllocationProfile):
  18683. (JSC::CodeBlock::updateAllValueProfilePredictions):
  18684. (JSC::CodeBlock::updateAllArrayPredictions):
  18685. * bytecode/DFGExitProfile.h:
  18686. (JSC::DFG::exitKindToString):
  18687. * bytecode/Instruction.h:
  18688. (JSC):
  18689. (JSC::Instruction::Instruction):
  18690. * bytecode/Opcode.h:
  18691. (JSC):
  18692. (JSC::padOpcodeName):
  18693. * bytecode/SpeculatedType.h:
  18694. (JSC):
  18695. (JSC::isRealNumberSpeculation):
  18696. * bytecode/UnlinkedCodeBlock.cpp:
  18697. (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
  18698. * bytecode/UnlinkedCodeBlock.h:
  18699. (JSC):
  18700. (JSC::UnlinkedCodeBlock::addArrayAllocationProfile):
  18701. (JSC::UnlinkedCodeBlock::numberOfArrayAllocationProfiles):
  18702. (UnlinkedCodeBlock):
  18703. * bytecompiler/BytecodeGenerator.cpp:
  18704. (JSC::BytecodeGenerator::newArrayAllocationProfile):
  18705. (JSC):
  18706. (JSC::BytecodeGenerator::emitNewArray):
  18707. (JSC::BytecodeGenerator::emitExpectedFunctionSnippet):
  18708. * bytecompiler/BytecodeGenerator.h:
  18709. (BytecodeGenerator):
  18710. * dfg/DFGAbstractState.cpp:
  18711. (JSC::DFG::AbstractState::execute):
  18712. * dfg/DFGArrayMode.cpp:
  18713. (JSC::DFG::ArrayMode::fromObserved):
  18714. (JSC::DFG::ArrayMode::refine):
  18715. (DFG):
  18716. (JSC::DFG::ArrayMode::alreadyChecked):
  18717. (JSC::DFG::arrayTypeToString):
  18718. * dfg/DFGArrayMode.h:
  18719. (JSC::DFG::ArrayMode::withType):
  18720. (ArrayMode):
  18721. (JSC::DFG::ArrayMode::withTypeAndConversion):
  18722. (JSC::DFG::ArrayMode::usesButterfly):
  18723. (JSC::DFG::ArrayMode::isSpecific):
  18724. (JSC::DFG::ArrayMode::supportsLength):
  18725. (JSC::DFG::ArrayMode::arrayModesThatPassFiltering):
  18726. * dfg/DFGByteCodeParser.cpp:
  18727. (JSC::DFG::ByteCodeParser::getArrayMode):
  18728. (ByteCodeParser):
  18729. (JSC::DFG::ByteCodeParser::handleIntrinsic):
  18730. (JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
  18731. (JSC::DFG::ByteCodeParser::parseBlock):
  18732. * dfg/DFGCCallHelpers.h:
  18733. (JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
  18734. (CCallHelpers):
  18735. * dfg/DFGCallArrayAllocatorSlowPathGenerator.h:
  18736. (JSC::DFG::CallArrayAllocatorSlowPathGenerator::generateInternal):
  18737. (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::generateInternal):
  18738. * dfg/DFGFixupPhase.cpp:
  18739. (JSC::DFG::FixupPhase::fixupNode):
  18740. (JSC::DFG::FixupPhase::checkArray):
  18741. * dfg/DFGGraph.cpp:
  18742. (JSC::DFG::Graph::dump):
  18743. * dfg/DFGGraph.h:
  18744. (JSC::DFG::Graph::byValIsPure):
  18745. * dfg/DFGNode.h:
  18746. (NewArrayBufferData):
  18747. (JSC::DFG::Node::hasIndexingType):
  18748. (Node):
  18749. (JSC::DFG::Node::indexingType):
  18750. (JSC::DFG::Node::setIndexingType):
  18751. * dfg/DFGOperations.cpp:
  18752. * dfg/DFGOperations.h:
  18753. * dfg/DFGPredictionPropagationPhase.cpp:
  18754. (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting):
  18755. * dfg/DFGSpeculativeJIT.cpp:
  18756. (JSC::DFG::SpeculativeJIT::emitAllocateJSArray):
  18757. (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
  18758. (DFG):
  18759. (JSC::DFG::SpeculativeJIT::checkArray):
  18760. (JSC::DFG::SpeculativeJIT::arrayify):
  18761. (JSC::DFG::SpeculativeJIT::compileDoublePutByVal):
  18762. (JSC::DFG::SpeculativeJIT::compileGetArrayLength):
  18763. * dfg/DFGSpeculativeJIT.h:
  18764. (JSC::DFG::SpeculativeJIT::callOperation):
  18765. (SpeculativeJIT):
  18766. (SpeculateIntegerOperand):
  18767. (JSC::DFG::SpeculateIntegerOperand::use):
  18768. (SpeculateDoubleOperand):
  18769. (JSC::DFG::SpeculateDoubleOperand::use):
  18770. * dfg/DFGSpeculativeJIT32_64.cpp:
  18771. (DFG):
  18772. (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
  18773. (JSC::DFG::SpeculativeJIT::compile):
  18774. * dfg/DFGSpeculativeJIT64.cpp:
  18775. (JSC::DFG::SpeculativeJIT::compile):
  18776. * jit/JIT.h:
  18777. (JSC::JIT::emitInt32GetByVal):
  18778. (JIT):
  18779. (JSC::JIT::emitInt32PutByVal):
  18780. (JSC::JIT::emitDoublePutByVal):
  18781. (JSC::JIT::emitContiguousPutByVal):
  18782. * jit/JITExceptions.cpp:
  18783. (JSC::genericThrow):
  18784. * jit/JITInlineMethods.h:
  18785. (JSC::arrayProfileSaw):
  18786. (JSC::JIT::chooseArrayMode):
  18787. * jit/JITOpcodes.cpp:
  18788. (JSC::JIT::emit_op_new_array):
  18789. (JSC::JIT::emit_op_new_array_with_size):
  18790. (JSC::JIT::emit_op_new_array_buffer):
  18791. * jit/JITPropertyAccess.cpp:
  18792. (JSC::JIT::emit_op_get_by_val):
  18793. (JSC::JIT::emitDoubleGetByVal):
  18794. (JSC):
  18795. (JSC::JIT::emitContiguousGetByVal):
  18796. (JSC::JIT::emit_op_put_by_val):
  18797. (JSC::JIT::emitGenericContiguousPutByVal):
  18798. (JSC::JIT::emitSlow_op_put_by_val):
  18799. (JSC::JIT::privateCompileGetByVal):
  18800. (JSC::JIT::privateCompilePutByVal):
  18801. * jit/JITPropertyAccess32_64.cpp:
  18802. (JSC::JIT::emit_op_get_by_val):
  18803. (JSC::JIT::emitContiguousGetByVal):
  18804. (JSC::JIT::emitDoubleGetByVal):
  18805. (JSC):
  18806. (JSC::JIT::emit_op_put_by_val):
  18807. (JSC::JIT::emitGenericContiguousPutByVal):
  18808. (JSC::JIT::emitSlow_op_put_by_val):
  18809. * jit/JITStubs.cpp:
  18810. (JSC::DEFINE_STUB_FUNCTION):
  18811. * jit/JITStubs.h:
  18812. (JSC):
  18813. * jsc.cpp:
  18814. (GlobalObject::finishCreation):
  18815. * llint/LLIntSlowPaths.cpp:
  18816. (JSC::LLInt::jitCompileAndSetHeuristics):
  18817. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  18818. * llint/LowLevelInterpreter.asm:
  18819. * llint/LowLevelInterpreter32_64.asm:
  18820. * llint/LowLevelInterpreter64.asm:
  18821. * offlineasm/x86.rb:
  18822. * runtime/ArrayConstructor.cpp:
  18823. (JSC::constructArrayWithSizeQuirk):
  18824. * runtime/ArrayConstructor.h:
  18825. (JSC):
  18826. * runtime/ArrayPrototype.cpp:
  18827. (JSC::arrayProtoFuncConcat):
  18828. (JSC::arrayProtoFuncSlice):
  18829. (JSC::arrayProtoFuncSplice):
  18830. (JSC::arrayProtoFuncFilter):
  18831. (JSC::arrayProtoFuncMap):
  18832. * runtime/Butterfly.h:
  18833. (JSC::Butterfly::contiguousInt32):
  18834. (JSC::Butterfly::contiguousDouble):
  18835. (JSC::Butterfly::fromContiguous):
  18836. * runtime/ButterflyInlineMethods.h:
  18837. (JSC::Butterfly::createUninitializedDuringCollection):
  18838. * runtime/FunctionPrototype.cpp:
  18839. (JSC::functionProtoFuncBind):
  18840. * runtime/IndexingHeaderInlineMethods.h:
  18841. (JSC::IndexingHeader::indexingPayloadSizeInBytes):
  18842. * runtime/IndexingType.cpp:
  18843. (JSC::leastUpperBoundOfIndexingTypes):
  18844. (JSC):
  18845. (JSC::leastUpperBoundOfIndexingTypeAndType):
  18846. (JSC::leastUpperBoundOfIndexingTypeAndValue):
  18847. (JSC::indexingTypeToString):
  18848. * runtime/IndexingType.h:
  18849. (JSC):
  18850. (JSC::hasUndecided):
  18851. (JSC::hasInt32):
  18852. (JSC::hasDouble):
  18853. * runtime/JSArray.cpp:
  18854. (JSC::JSArray::setLength):
  18855. (JSC::JSArray::pop):
  18856. (JSC::JSArray::push):
  18857. (JSC::JSArray::shiftCountWithAnyIndexingType):
  18858. (JSC::JSArray::unshiftCountWithAnyIndexingType):
  18859. (JSC::compareNumbersForQSortWithInt32):
  18860. (JSC):
  18861. (JSC::compareNumbersForQSortWithDouble):
  18862. (JSC::JSArray::sortNumericVector):
  18863. (JSC::JSArray::sortNumeric):
  18864. (JSC::JSArray::sortCompactedVector):
  18865. (JSC::JSArray::sort):
  18866. (JSC::JSArray::sortVector):
  18867. (JSC::JSArray::fillArgList):
  18868. (JSC::JSArray::copyToArguments):
  18869. (JSC::JSArray::compactForSorting):
  18870. * runtime/JSArray.h:
  18871. (JSArray):
  18872. (JSC::createContiguousArrayButterfly):
  18873. (JSC::JSArray::create):
  18874. (JSC::JSArray::tryCreateUninitialized):
  18875. * runtime/JSGlobalObject.cpp:
  18876. (JSC::JSGlobalObject::reset):
  18877. (JSC):
  18878. (JSC::JSGlobalObject::haveABadTime):
  18879. (JSC::JSGlobalObject::visitChildren):
  18880. * runtime/JSGlobalObject.h:
  18881. (JSGlobalObject):
  18882. (JSC::JSGlobalObject::originalArrayStructureForIndexingType):
  18883. (JSC::JSGlobalObject::arrayStructureForIndexingTypeDuringAllocation):
  18884. (JSC::JSGlobalObject::arrayStructureForProfileDuringAllocation):
  18885. (JSC::JSGlobalObject::isOriginalArrayStructure):
  18886. (JSC::constructEmptyArray):
  18887. (JSC::constructArray):
  18888. * runtime/JSObject.cpp:
  18889. (JSC::JSObject::copyButterfly):
  18890. (JSC::JSObject::getOwnPropertySlotByIndex):
  18891. (JSC::JSObject::putByIndex):
  18892. (JSC::JSObject::enterDictionaryIndexingMode):
  18893. (JSC::JSObject::createInitialIndexedStorage):
  18894. (JSC):
  18895. (JSC::JSObject::createInitialUndecided):
  18896. (JSC::JSObject::createInitialInt32):
  18897. (JSC::JSObject::createInitialDouble):
  18898. (JSC::JSObject::createInitialContiguous):
  18899. (JSC::JSObject::convertUndecidedToInt32):
  18900. (JSC::JSObject::convertUndecidedToDouble):
  18901. (JSC::JSObject::convertUndecidedToContiguous):
  18902. (JSC::JSObject::constructConvertedArrayStorageWithoutCopyingElements):
  18903. (JSC::JSObject::convertUndecidedToArrayStorage):
  18904. (JSC::JSObject::convertInt32ToDouble):
  18905. (JSC::JSObject::convertInt32ToContiguous):
  18906. (JSC::JSObject::convertInt32ToArrayStorage):
  18907. (JSC::JSObject::convertDoubleToContiguous):
  18908. (JSC::JSObject::convertDoubleToArrayStorage):
  18909. (JSC::JSObject::convertContiguousToArrayStorage):
  18910. (JSC::JSObject::convertUndecidedForValue):
  18911. (JSC::JSObject::convertInt32ForValue):
  18912. (JSC::JSObject::setIndexQuicklyToUndecided):
  18913. (JSC::JSObject::convertInt32ToDoubleOrContiguousWhilePerformingSetIndex):
  18914. (JSC::JSObject::convertDoubleToContiguousWhilePerformingSetIndex):
  18915. (JSC::JSObject::ensureInt32Slow):
  18916. (JSC::JSObject::ensureDoubleSlow):
  18917. (JSC::JSObject::ensureContiguousSlow):
  18918. (JSC::JSObject::ensureArrayStorageSlow):
  18919. (JSC::JSObject::ensureArrayStorageExistsAndEnterDictionaryIndexingMode):
  18920. (JSC::JSObject::switchToSlowPutArrayStorage):
  18921. (JSC::JSObject::deletePropertyByIndex):
  18922. (JSC::JSObject::getOwnPropertyNames):
  18923. (JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes):
  18924. (JSC::JSObject::putByIndexBeyondVectorLength):
  18925. (JSC::JSObject::putDirectIndexBeyondVectorLength):
  18926. (JSC::JSObject::getNewVectorLength):
  18927. (JSC::JSObject::countElements):
  18928. (JSC::JSObject::ensureLengthSlow):
  18929. (JSC::JSObject::getOwnPropertyDescriptor):
  18930. * runtime/JSObject.h:
  18931. (JSC::JSObject::getArrayLength):
  18932. (JSC::JSObject::getVectorLength):
  18933. (JSC::JSObject::canGetIndexQuickly):
  18934. (JSC::JSObject::getIndexQuickly):
  18935. (JSC::JSObject::tryGetIndexQuickly):
  18936. (JSC::JSObject::canSetIndexQuickly):
  18937. (JSC::JSObject::canSetIndexQuicklyForPutDirect):
  18938. (JSC::JSObject::setIndexQuickly):
  18939. (JSC::JSObject::initializeIndex):
  18940. (JSC::JSObject::hasSparseMap):
  18941. (JSC::JSObject::inSparseIndexingMode):
  18942. (JSObject):
  18943. (JSC::JSObject::ensureInt32):
  18944. (JSC::JSObject::ensureDouble):
  18945. (JSC::JSObject::ensureLength):
  18946. (JSC::JSObject::indexingData):
  18947. (JSC::JSObject::currentIndexingData):
  18948. (JSC::JSObject::getHolyIndexQuickly):
  18949. (JSC::JSObject::relevantLength):
  18950. (JSC::JSObject::currentRelevantLength):
  18951. * runtime/JSValue.cpp:
  18952. (JSC::JSValue::description):
  18953. * runtime/LiteralParser.cpp:
  18954. (JSC::::parse):
  18955. * runtime/ObjectConstructor.cpp:
  18956. (JSC::objectConstructorGetOwnPropertyNames):
  18957. (JSC::objectConstructorKeys):
  18958. * runtime/StringPrototype.cpp:
  18959. (JSC::stringProtoFuncMatch):
  18960. (JSC::stringProtoFuncSplit):
  18961. * runtime/Structure.cpp:
  18962. (JSC::Structure::nonPropertyTransition):
  18963. * runtime/StructureTransitionTable.h:
  18964. (JSC::newIndexingType):
  18965. 2012-11-08 Balazs Kilvady <kilvadyb@homejinni.com>
  18966. ASSERT problem on MIPS
  18967. https://bugs.webkit.org/show_bug.cgi?id=100589
  18968. Reviewed by Oliver Hunt.
  18969. ASSERT fix for MIPS arch.
  18970. * jit/JITOpcodes.cpp:
  18971. (JSC::JIT::emit_resolve_operations):
  18972. 2012-11-08 Michael Saboff <msaboff@apple.com>
  18973. OpaqueJSClassContextData() should use StringImpl::isolatedCopy() to make string copies
  18974. https://bugs.webkit.org/show_bug.cgi?id=101507
  18975. Reviewed by Andreas Kling.
  18976. Changed to use isolatedCopy() for key Strings.
  18977. * API/JSClassRef.cpp:
  18978. (OpaqueJSClassContextData::OpaqueJSClassContextData):
  18979. 2012-11-07 Mark Hahnenberg <mhahnenberg@apple.com>
  18980. WeakBlocks should be HeapBlocks
  18981. https://bugs.webkit.org/show_bug.cgi?id=101411
  18982. Reviewed by Oliver Hunt.
  18983. Currently WeakBlocks use fastMalloc memory. They are very similar to the other HeapBlocks, however,
  18984. so we should change them to being allocated with the BlockAllocator.
  18985. * heap/BlockAllocator.cpp:
  18986. (JSC::BlockAllocator::BlockAllocator):
  18987. * heap/BlockAllocator.h: Added a new RegionSet for WeakBlocks.
  18988. (JSC):
  18989. (BlockAllocator):
  18990. (JSC::WeakBlock):
  18991. * heap/Heap.h: Friended WeakSet to allow access to the BlockAllocator.
  18992. (Heap):
  18993. * heap/WeakBlock.cpp:
  18994. (JSC::WeakBlock::create): Refactored to use HeapBlocks rather than fastMalloc.
  18995. (JSC::WeakBlock::WeakBlock):
  18996. * heap/WeakBlock.h: Changed the WeakBlock size to 4 KB so that it divides evenly into the Region size.
  18997. (JSC):
  18998. (WeakBlock):
  18999. * heap/WeakSet.cpp:
  19000. (JSC::WeakSet::~WeakSet):
  19001. (JSC::WeakSet::addAllocator):
  19002. 2012-11-07 Filip Pizlo <fpizlo@apple.com>
  19003. Indentation of ArgList.h is wrong
  19004. https://bugs.webkit.org/show_bug.cgi?id=101441
  19005. Reviewed by Andreas Kling.
  19006. Just unindented by 4 spaces.
  19007. * runtime/ArgList.h:
  19008. 2012-11-07 Gabor Ballabas <gaborb@inf.u-szeged.hu>
  19009. [Qt][ARM] REGRESSION(r133688): It made all JSC and layout tests crash on ARM traditional platform
  19010. https://bugs.webkit.org/show_bug.cgi?id=101465
  19011. Reviewed by Oliver Hunt.
  19012. Fix failing javascriptcore tests on ARM after r133688
  19013. * bytecode/CodeBlock.cpp:
  19014. (JSC::CodeBlock::CodeBlock):
  19015. 2012-11-06 Oliver Hunt <oliver@apple.com>
  19016. Reduce parser overhead in JSC
  19017. https://bugs.webkit.org/show_bug.cgi?id=101127
  19018. Reviewed by Filip Pizlo.
  19019. An exciting journey into the world of architecture in which our hero
  19020. adds yet another layer to JSC codegeneration.
  19021. This patch adds a marginally more compact form of bytecode that is
  19022. free from any data specific to a given execution context, and that
  19023. does store any data structures necessary for execution. To actually
  19024. execute this UnlinkedBytecode we still need to instantiate a real
  19025. CodeBlock, but this is a much faster linear time operation than any
  19026. of the earlier parsing or code generation passes.
  19027. As the unlinked code is context free we can then simply use a cache
  19028. from source to unlinked code mapping to completely avoid all of the
  19029. old parser overhead. The cache is currently very simple and memory
  19030. heavy, using the complete source text as a key (rather than SourceCode
  19031. or equivalent), and a random eviction policy.
  19032. This seems to produce a substantial win when loading identical content
  19033. in different contexts.
  19034. * API/tests/testapi.c:
  19035. (main):
  19036. * CMakeLists.txt:
  19037. * GNUmakefile.list.am:
  19038. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  19039. * JavaScriptCore.xcodeproj/project.pbxproj:
  19040. * bytecode/CodeBlock.cpp:
  19041. * bytecode/CodeBlock.h:
  19042. Moved a number of fields, and a bunch of logic to UnlinkedCodeBlock.h/cpp
  19043. * bytecode/Opcode.h:
  19044. Added a global const init no op instruction needed to get correct
  19045. behaviour without any associated semantics.
  19046. * bytecode/UnlinkedCodeBlock.cpp: Added.
  19047. * bytecode/UnlinkedCodeBlock.h: Added.
  19048. A fairly shallow, GC allocated version of the old CodeBlock
  19049. classes with a 32bit instruction size, and just metadata
  19050. size tracking.
  19051. * bytecompiler/BytecodeGenerator.cpp:
  19052. * bytecompiler/BytecodeGenerator.h:
  19053. Replace direct access to m_symbolTable with access through
  19054. symbolTable(). ProgramCode no longer has a symbol table at
  19055. all so some previously unconditional (and pointless) uses
  19056. of symbolTable get null checks.
  19057. A few other changes to deal with type changes due to us generating
  19058. unlinked code (eg. pointer free, so profile indices rather than
  19059. pointers).
  19060. * dfg/DFGByteCodeParser.cpp:
  19061. * dfg/DFGCapabilities.h:
  19062. Support global_init_nop
  19063. * interpreter/Interpreter.cpp:
  19064. Now get the ProgramExecutable to initialise new global properties
  19065. before starting execution.
  19066. * jit/JIT.cpp:
  19067. * jit/JITDriver.h:
  19068. * jit/JITStubs.cpp:
  19069. * llint/LLIntData.cpp:
  19070. * llint/LLIntSlowPaths.cpp:
  19071. * llint/LowLevelInterpreter.asm:
  19072. * llint/LowLevelInterpreter32_64.asm:
  19073. * llint/LowLevelInterpreter64.asm:
  19074. Adding init_global_const_nop everywhere else
  19075. * parser/Parser.h:
  19076. * parser/ParserModes.h: Added.
  19077. * parser/ParserTokens.h:
  19078. Parser no longer needs a global object or callframe to function
  19079. * runtime/CodeCache.cpp: Added.
  19080. * runtime/CodeCache.h: Added.
  19081. A simple, random eviction, Source->UnlinkedCode cache
  19082. * runtime/Executable.cpp:
  19083. * runtime/Executable.h:
  19084. Executables now reference their unlinked counterparts, and
  19085. request code specifically for the target global object.
  19086. * runtime/JSGlobalData.cpp:
  19087. * runtime/JSGlobalData.h:
  19088. GlobalData now owns a CodeCache and a set of new structures
  19089. for the unlinked code types.
  19090. * runtime/JSGlobalObject.cpp:
  19091. * runtime/JSGlobalObject.h:
  19092. Utility functions used by executables to perform compilation
  19093. * runtime/JSType.h:
  19094. Add new JSTypes for unlinked code
  19095. 2012-11-06 Michael Saboff <msaboff@apple.com>
  19096. JSStringCreateWithCFString() Should create an 8 bit String if possible
  19097. https://bugs.webkit.org/show_bug.cgi?id=101104
  19098. Reviewed by Darin Adler.
  19099. Try converting the CFString to an 8 bit string using CFStringGetBytes(...,
  19100. kCFStringEncodingISOLatin1, ...) and return the 8 bit string if successful.
  19101. If not proceed with 16 bit conversion.
  19102. * API/JSStringRefCF.cpp:
  19103. (JSStringCreateWithCFString):
  19104. 2012-11-06 Oliver Hunt <oliver@apple.com>
  19105. Reduce direct m_symbolTable usage in CodeBlock
  19106. https://bugs.webkit.org/show_bug.cgi?id=101391
  19107. Reviewed by Sam Weinig.
  19108. Simple refactoring.
  19109. * bytecode/CodeBlock.cpp:
  19110. (JSC::CodeBlock::dump):
  19111. (JSC::CodeBlock::dumpStatistics):
  19112. (JSC::CodeBlock::nameForRegister):
  19113. * bytecode/CodeBlock.h:
  19114. (JSC::CodeBlock::isCaptured):
  19115. 2012-11-06 Michael Saboff <msaboff@apple.com>
  19116. Lexer::scanRegExp, create 8 bit pattern and flag Identifiers from 16 bit source when possible
  19117. https://bugs.webkit.org/show_bug.cgi?id=101013
  19118. Reviewed by Darin Adler.
  19119. Changed scanRegExp so that it will create 8 bit identifiers from 8 bit sources and from 16 bit sources
  19120. whan all the characters are 8 bit. Using two templated helpers, the "is all 8 bit" check is only performed
  19121. on 16 bit sources. The first helper is orCharacter() that will accumulate the or value of all characters
  19122. only for 16 bit sources. Replaced the helper Lexer::makeIdentifierSameType() with Lexer::makeRightSizedIdentifier().
  19123. * parser/Lexer.cpp:
  19124. (JSC::orCharacter<LChar>): Explicit template that serves as a placeholder.
  19125. (JSC::orCharacter<UChar>): Explicit template that actually or accumulates characters.
  19126. (JSC::Lexer::scanRegExp):
  19127. * parser/Lexer.h:
  19128. (Lexer):
  19129. (JSC::Lexer::makeRightSizedIdentifier<LChar>): New template that always creates an 8 bit Identifier.
  19130. (JSC::Lexer::makeRightSizedIdentifier<UChar>): New template that creates an 8 bit Identifier for 8 bit
  19131. data in a 16 bit source.
  19132. 2012-11-06 Filip Pizlo <fpizlo@apple.com>
  19133. Indentation of JSCell.h is wrong
  19134. https://bugs.webkit.org/show_bug.cgi?id=101379
  19135. Rubber stamped by Alexey Proskuryakov.
  19136. Just removed four spaces on a bunch of lines.
  19137. * runtime/JSCell.h:
  19138. 2012-11-05 Filip Pizlo <fpizlo@apple.com>
  19139. Indentation of JSObject.h is wrong
  19140. https://bugs.webkit.org/show_bug.cgi?id=101313
  19141. Rubber stamped by Alexey Proskuryakov.
  19142. Just unindented code, since namespace bodies shouldn't be indented.
  19143. * runtime/JSObject.h:
  19144. 2012-11-05 Filip Pizlo <fpizlo@apple.com>
  19145. Indentation of JSArray.h is wrong
  19146. https://bugs.webkit.org/show_bug.cgi?id=101314
  19147. Rubber stamped by Alexey Proskuryakov.
  19148. Just removing the indentation inside the namespace body.
  19149. * runtime/JSArray.h:
  19150. 2012-11-05 Filip Pizlo <fpizlo@apple.com>
  19151. DFG should not fall down to patchable GetById just because a prototype had things added to it
  19152. https://bugs.webkit.org/show_bug.cgi?id=101299
  19153. Reviewed by Geoffrey Garen.
  19154. This looks like a slight win on V8v7 and SunSpider.
  19155. * bytecode/DFGExitProfile.h:
  19156. (JSC::DFG::exitKindToString):
  19157. * dfg/DFGSpeculativeJIT64.cpp:
  19158. (JSC::DFG::SpeculativeJIT::compile):
  19159. 2012-11-05 Filip Pizlo <fpizlo@apple.com>
  19160. Get rid of method_check
  19161. https://bugs.webkit.org/show_bug.cgi?id=101147
  19162. Reviewed by Geoffrey Garen.
  19163. op_method_check no longer buys us anything, since get_by_id proto caching
  19164. gives just as much profiling information and the DFG inlines monomorphic
  19165. proto accesses anyway.
  19166. This also has the potential for a speed-up since it makes parsing of
  19167. profiling data easier. No longer do we have to deal with the confusion of
  19168. the get_by_id portion of a method_check appearing monomorphic even though
  19169. we're really dealing with a bimorphic access (method_check specializes for
  19170. one case and get_by_id for another).
  19171. This looks like a 1% speed-up on both SunSpider and V8v7.
  19172. * CMakeLists.txt:
  19173. * GNUmakefile.list.am:
  19174. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  19175. * JavaScriptCore.xcodeproj/project.pbxproj:
  19176. * Target.pri:
  19177. * bytecode/CodeBlock.cpp:
  19178. (JSC::CodeBlock::printGetByIdCacheStatus):
  19179. (JSC::CodeBlock::dump):
  19180. (JSC::CodeBlock::finalizeUnconditionally):
  19181. (JSC::CodeBlock::shrinkToFit):
  19182. (JSC::CodeBlock::unlinkCalls):
  19183. * bytecode/CodeBlock.h:
  19184. (JSC::CodeBlock::getCallLinkInfo):
  19185. (JSC::CodeBlock::callLinkInfo):
  19186. (CodeBlock):
  19187. * bytecode/GetByIdStatus.cpp:
  19188. (JSC::GetByIdStatus::computeFromLLInt):
  19189. * bytecode/MethodCallLinkInfo.cpp: Removed.
  19190. * bytecode/MethodCallLinkInfo.h: Removed.
  19191. * bytecode/MethodCallLinkStatus.cpp: Removed.
  19192. * bytecode/MethodCallLinkStatus.h: Removed.
  19193. * bytecode/Opcode.h:
  19194. (JSC):
  19195. (JSC::padOpcodeName):
  19196. * bytecompiler/BytecodeGenerator.cpp:
  19197. (JSC):
  19198. * bytecompiler/BytecodeGenerator.h:
  19199. (BytecodeGenerator):
  19200. * bytecompiler/NodesCodegen.cpp:
  19201. (JSC::FunctionCallDotNode::emitBytecode):
  19202. * dfg/DFGByteCodeParser.cpp:
  19203. (JSC::DFG::ByteCodeParser::parseBlock):
  19204. * dfg/DFGCapabilities.h:
  19205. (JSC::DFG::canCompileOpcode):
  19206. * jit/JIT.cpp:
  19207. (JSC::JIT::privateCompileMainPass):
  19208. (JSC::JIT::privateCompileSlowCases):
  19209. (JSC::PropertyStubCompilationInfo::copyToStubInfo):
  19210. (JSC::JIT::privateCompile):
  19211. * jit/JIT.h:
  19212. (JSC::PropertyStubCompilationInfo::slowCaseInfo):
  19213. (PropertyStubCompilationInfo):
  19214. (JSC):
  19215. (JIT):
  19216. * jit/JITPropertyAccess.cpp:
  19217. (JSC):
  19218. (JSC::JIT::emitSlow_op_get_by_id):
  19219. (JSC::JIT::compileGetByIdSlowCase):
  19220. * jit/JITPropertyAccess32_64.cpp:
  19221. (JSC):
  19222. (JSC::JIT::compileGetByIdSlowCase):
  19223. * jit/JITStubs.cpp:
  19224. (JSC):
  19225. * jit/JITStubs.h:
  19226. * llint/LowLevelInterpreter.asm:
  19227. 2012-11-05 Yuqiang Xian <yuqiang.xian@intel.com>
  19228. Refactor LLInt64 to distinguish the pointer operations from the 64-bit integer operations
  19229. https://bugs.webkit.org/show_bug.cgi?id=100321
  19230. Reviewed by Filip Pizlo.
  19231. We have refactored the MacroAssembler and JIT compilers to distinguish
  19232. the pointer operations from the 64-bit integer operations (see bug #99154).
  19233. Now we want to do the similar work for LLInt, and the goal is same as
  19234. the one mentioned in 99154.
  19235. This is the second part of the modification: in the low level interpreter,
  19236. changing the operations on 64-bit integers to use the "<foo>q" instructions.
  19237. This also removes some unused/meaningless "<foo>p" instructions.
  19238. * llint/LowLevelInterpreter.asm:
  19239. * llint/LowLevelInterpreter.cpp:
  19240. (JSC::CLoop::execute):
  19241. * llint/LowLevelInterpreter64.asm:
  19242. * offlineasm/armv7.rb:
  19243. * offlineasm/cloop.rb:
  19244. * offlineasm/instructions.rb:
  19245. * offlineasm/x86.rb:
  19246. 2012-11-05 Filip Pizlo <fpizlo@apple.com>
  19247. Prototype chain caching should check that the path from the base object to the slot base involves prototype hops only
  19248. https://bugs.webkit.org/show_bug.cgi?id=101276
  19249. Reviewed by Gavin Barraclough.
  19250. Changed normalizePrototypeChain() to report an invalid prototype chain if any object is a proxy.
  19251. This catches cases where our prototype chain checks would have been insufficient to guard against
  19252. newly introduced properties, despecialized properties, or deleted properties in the chain of
  19253. objects involved in the access.
  19254. * dfg/DFGRepatch.cpp:
  19255. (JSC::DFG::tryCacheGetByID):
  19256. (JSC::DFG::tryBuildGetByIDProtoList):
  19257. (JSC::DFG::tryCachePutByID):
  19258. (JSC::DFG::tryBuildPutByIdList):
  19259. * jit/JITStubs.cpp:
  19260. (JSC::JITThunks::tryCachePutByID):
  19261. (JSC::JITThunks::tryCacheGetByID):
  19262. (JSC::DEFINE_STUB_FUNCTION):
  19263. * llint/LLIntSlowPaths.cpp:
  19264. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  19265. * runtime/Operations.h:
  19266. (JSC):
  19267. (JSC::normalizePrototypeChain):
  19268. 2012-11-05 Dima Gorbik <dgorbik@apple.com>
  19269. Back out controversial changes from Bug 98665.
  19270. https://bugs.webkit.org/show_bug.cgi?id=101244
  19271. Reviewed by David Kilzer.
  19272. Backing out changes from Bug 98665 until further discussions take place on rules for including Platform.h in Assertions.h.
  19273. * API/tests/minidom.c:
  19274. * API/tests/testapi.c:
  19275. 2012-11-04 Filip Pizlo <fpizlo@apple.com>
  19276. Reduce the verbosity of referring to QNaN in JavaScriptCore
  19277. https://bugs.webkit.org/show_bug.cgi?id=101174
  19278. Reviewed by Geoffrey Garen.
  19279. Introduces a #define QNaN in JSValue.h, and replaces all previous uses of
  19280. std::numeric_limits<double>::quiet_NaN() with QNaN.
  19281. * API/JSValueRef.cpp:
  19282. (JSValueMakeNumber):
  19283. (JSValueToNumber):
  19284. * dfg/DFGSpeculativeJIT.cpp:
  19285. (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
  19286. * jit/JITPropertyAccess.cpp:
  19287. (JSC::JIT::emitFloatTypedArrayGetByVal):
  19288. * runtime/CachedTranscendentalFunction.h:
  19289. (JSC::CachedTranscendentalFunction::initialize):
  19290. * runtime/DateConstructor.cpp:
  19291. (JSC::constructDate):
  19292. * runtime/DateInstanceCache.h:
  19293. (JSC::DateInstanceData::DateInstanceData):
  19294. (JSC::DateInstanceCache::reset):
  19295. * runtime/ExceptionHelpers.cpp:
  19296. (JSC::InterruptedExecutionError::defaultValue):
  19297. (JSC::TerminatedExecutionError::defaultValue):
  19298. * runtime/JSCell.h:
  19299. (JSC::JSValue::getPrimitiveNumber):
  19300. * runtime/JSDateMath.cpp:
  19301. (JSC::parseDateFromNullTerminatedCharacters):
  19302. * runtime/JSGlobalData.cpp:
  19303. (JSC::JSGlobalData::JSGlobalData):
  19304. (JSC::JSGlobalData::resetDateCache):
  19305. * runtime/JSGlobalObjectFunctions.cpp:
  19306. (JSC::parseInt):
  19307. (JSC::jsStrDecimalLiteral):
  19308. (JSC::toDouble):
  19309. (JSC::jsToNumber):
  19310. (JSC::parseFloat):
  19311. * runtime/JSValue.cpp:
  19312. (JSC::JSValue::toNumberSlowCase):
  19313. * runtime/JSValue.h:
  19314. (JSC):
  19315. * runtime/JSValueInlineMethods.h:
  19316. (JSC::jsNaN):
  19317. * runtime/MathObject.cpp:
  19318. (JSC::mathProtoFuncMax):
  19319. (JSC::mathProtoFuncMin):
  19320. 2012-11-03 Filip Pizlo <fpizlo@apple.com>
  19321. Baseline JIT should use structure watchpoints whenever possible
  19322. https://bugs.webkit.org/show_bug.cgi?id=101146
  19323. Reviewed by Sam Weinig.
  19324. No speed-up yet except on toy programs. I think that it will start to show
  19325. speed-ups with https://bugs.webkit.org/show_bug.cgi?id=101147, which this is
  19326. a step towards.
  19327. * jit/JIT.h:
  19328. (JIT):
  19329. * jit/JITPropertyAccess.cpp:
  19330. (JSC::JIT::privateCompilePutByIdTransition):
  19331. (JSC::JIT::privateCompileGetByIdProto):
  19332. (JSC::JIT::privateCompileGetByIdProtoList):
  19333. (JSC::JIT::privateCompileGetByIdChainList):
  19334. (JSC::JIT::privateCompileGetByIdChain):
  19335. (JSC::JIT::addStructureTransitionCheck):
  19336. (JSC):
  19337. (JSC::JIT::testPrototype):
  19338. * jit/JITPropertyAccess32_64.cpp:
  19339. (JSC::JIT::privateCompilePutByIdTransition):
  19340. (JSC::JIT::privateCompileGetByIdProto):
  19341. (JSC::JIT::privateCompileGetByIdProtoList):
  19342. (JSC::JIT::privateCompileGetByIdChainList):
  19343. (JSC::JIT::privateCompileGetByIdChain):
  19344. 2012-11-04 Csaba Osztrogonác <ossy@webkit.org>
  19345. [Qt] udis86_itab.c is always regenerated
  19346. https://bugs.webkit.org/show_bug.cgi?id=100756
  19347. Reviewed by Simon Hausmann.
  19348. * DerivedSources.pri: Generate sources to the generated directory.
  19349. * disassembler/udis86/differences.txt:
  19350. * disassembler/udis86/itab.py: Add --outputDir option.
  19351. (UdItabGenerator.__init__):
  19352. (genItabH):
  19353. (genItabC):
  19354. (main):
  19355. 2012-11-02 Filip Pizlo <fpizlo@apple.com>
  19356. LLInt 32-bit put_by_val ArrayStorage case should use the right register (t3, not t2) for the index in the publicLength updating path
  19357. https://bugs.webkit.org/show_bug.cgi?id=101118
  19358. Reviewed by Gavin Barraclough.
  19359. * llint/LowLevelInterpreter32_64.asm:
  19360. 2012-11-02 Filip Pizlo <fpizlo@apple.com>
  19361. DFG::Node::converToStructureTransitionWatchpoint should take kindly to ArrayifyToStructure
  19362. https://bugs.webkit.org/show_bug.cgi?id=101117
  19363. Reviewed by Gavin Barraclough.
  19364. We have logic to convert ArrayifyToStructure to StructureTransitionWatchpoint, which is awesome, except
  19365. that previously convertToStructureTransitionWatchpoint was (a) asserting that it never saw an
  19366. ArrayifyToStructure and (b) would incorrectly create a ForwardStructureTransitionWatchpoint if it did.
  19367. * dfg/DFGNode.h:
  19368. (JSC::DFG::Node::convertToStructureTransitionWatchpoint):
  19369. 2012-11-02 Filip Pizlo <fpizlo@apple.com>
  19370. DFG::SpeculativeJIT::typedArrayDescriptor should use the Float64Array descriptor for Float64Arrays
  19371. https://bugs.webkit.org/show_bug.cgi?id=101114
  19372. Reviewed by Gavin Barraclough.
  19373. As in https://bugs.webkit.org/show_bug.cgi?id=101112, this was only wrong when Float64Array descriptors
  19374. hadn't been initialized yet. That happens rarely, but when it does happen, we would crash.
  19375. This would also become much more wrong if we ever put type size info (num bytes, etc) in the descriptor
  19376. and used that directly. So it's good to fix it.
  19377. * dfg/DFGSpeculativeJIT.cpp:
  19378. (JSC::DFG::SpeculativeJIT::typedArrayDescriptor):
  19379. 2012-11-02 Filip Pizlo <fpizlo@apple.com>
  19380. JIT::privateCompileGetByVal should use the uint8ClampedArrayDescriptor for compiling accesses to Uint8ClampedArrays
  19381. https://bugs.webkit.org/show_bug.cgi?id=101112
  19382. Reviewed by Gavin Barraclough.
  19383. The only reason why the code was wrong to use uint8ArrayDescriptor instead is that if we're just using
  19384. Uint8ClampedArrays then the descriptor for Uint8Array may not have been initialized.
  19385. * jit/JITPropertyAccess.cpp:
  19386. (JSC::JIT::privateCompileGetByVal):
  19387. 2012-11-02 Mark Hahnenberg <mhahnenberg@apple.com>
  19388. MarkedBlocks should use something other than the mark bits to indicate liveness for newly allocated objects
  19389. https://bugs.webkit.org/show_bug.cgi?id=100877
  19390. Reviewed by Filip Pizlo.
  19391. Currently when we canonicalize cell liveness data in MarkedBlocks, we set the mark bit for every cell in the
  19392. block except for those in the free list. This allows us to consider objects that were allocated since the
  19393. previous collection to be considered live until they have a chance to be properly marked by the collector.
  19394. If we want to use the mark bits to signify other types of information, e.g. using sticky mark bits for generational
  19395. collection, we will have to keep track of newly allocated objects in a different fashion when we canonicalize cell liveness.
  19396. One method would be to allocate a separate set of bits while canonicalizing liveness data. These bits would
  19397. track the newly allocated objects in the block separately from those objects who had already been marked. We would
  19398. then check these bits, along with the mark bits, when determining liveness.
  19399. * heap/Heap.h:
  19400. (Heap):
  19401. (JSC::Heap::isLive): We now check for the presence of the newlyAllocated Bitmap.
  19402. (JSC):
  19403. * heap/MarkedBlock.cpp:
  19404. (JSC::MarkedBlock::specializedSweep): We clear the newlyAllocated Bitmap if we're creating a free list. This
  19405. will happen if we canonicalize liveness data for some other reason than collection (e.g. forEachCell) and
  19406. then start allocating again.
  19407. (JSC::SetNewlyAllocatedFunctor::SetNewlyAllocatedFunctor):
  19408. (SetNewlyAllocatedFunctor):
  19409. (JSC::SetNewlyAllocatedFunctor::operator()): We set the newlyAllocated bits for all the objects
  19410. that aren't already marked. We undo the bits for the objects in the free list later in canonicalizeCellLivenessData.
  19411. (JSC::MarkedBlock::canonicalizeCellLivenessData): We should never have a FreeListed block with a newlyAllocated Bitmap.
  19412. We allocate the new Bitmap, set the bits for all the objects that aren't already marked, and then unset all of the
  19413. bits for the items currently in the FreeList.
  19414. * heap/MarkedBlock.h:
  19415. (JSC::MarkedBlock::clearMarks): We clear the newlyAllocated bitmap if it exists because at this point we don't need it
  19416. any more.
  19417. (JSC::MarkedBlock::isEmpty): If we have some objects that are newlyAllocated, we are not empty.
  19418. (JSC::MarkedBlock::isNewlyAllocated):
  19419. (JSC):
  19420. (JSC::MarkedBlock::setNewlyAllocated):
  19421. (JSC::MarkedBlock::clearNewlyAllocated):
  19422. (JSC::MarkedBlock::isLive): We now check the newlyAllocated Bitmap, if it exists, when determining liveness of a cell in
  19423. a block that is Marked.
  19424. * heap/WeakBlock.cpp:
  19425. (JSC::WeakBlock::visit): We need to make sure we don't finalize objects that are in the newlyAllocated Bitmap.
  19426. (JSC::WeakBlock::reap): Ditto.
  19427. 2012-11-02 Filip Pizlo <fpizlo@apple.com>
  19428. JIT::privateCompileGetByVal should use MacroAssemblerCodePtr::createFromExecutableAddress like JIT::privateCompilePutByVal
  19429. https://bugs.webkit.org/show_bug.cgi?id=101109
  19430. Reviewed by Gavin Barraclough.
  19431. This fixes crashes on ARMv7 resulting from the return address already being tagged with the THUMB2 bit.
  19432. * jit/JITPropertyAccess.cpp:
  19433. (JSC::JIT::privateCompileGetByVal):
  19434. 2012-11-02 Simon Fraser <simon.fraser@apple.com>
  19435. Enable SUBPIXEL_LAYOUT on Mac
  19436. https://bugs.webkit.org/show_bug.cgi?id=101076
  19437. Reviewed by Dave Hyatt.
  19438. Define ENABLE_SUBPIXEL_LAYOUT and include it in FEATURE_DEFINES.
  19439. * Configurations/FeatureDefines.xcconfig:
  19440. 2012-11-02 Michael Saboff <msaboff@apple.com>
  19441. RegExp.prototype.toString Should Produce an 8 bit JSString if possible.
  19442. https://bugs.webkit.org/show_bug.cgi?id=101003
  19443. Reviewed by Geoffrey Garen.
  19444. Took the logic of regExpObjectSource() and created two templated helpers that uses the
  19445. source character type when appending to the StringBuilder.
  19446. * runtime/RegExpObject.cpp:
  19447. (JSC::appendLineTerminatorEscape): Checks line terminate type to come up with escaped version.
  19448. (JSC::regExpObjectSourceInternal): Templated version of original.
  19449. (JSC::regExpObjectSource): Wrapper function.
  19450. 2012-11-02 Adam Barth <abarth@webkit.org>
  19451. ENABLE(UNDO_MANAGER) is disabled everywhere and is not under active development
  19452. https://bugs.webkit.org/show_bug.cgi?id=100711
  19453. Reviewed by Eric Seidel.
  19454. * Configurations/FeatureDefines.xcconfig:
  19455. 2012-11-02 Simon Hausmann <simon.hausmann@digia.com>
  19456. [Qt] Fix build on Windows when Qt is configured with -release
  19457. https://bugs.webkit.org/show_bug.cgi?id=101041
  19458. Reviewed by Jocelyn Turcotte.
  19459. When Qt is configured with -debug or -release, the release/debug build of for example
  19460. QtCore is not available by default. For LLIntExtractor we always need to build debug
  19461. _and_ release versions, but we do not actually need any Qt libraries nor qtmain(d).lib.
  19462. Therefore we can disable all these features but need to keep $$QT.core.includes in the
  19463. INCLUDEPATH for some defines from qglobal.h.
  19464. * LLIntOffsetsExtractor.pro:
  19465. 2012-11-01 Mark Lam <mark.lam@apple.com>
  19466. A llint workaround for a toolchain issue.
  19467. https://bugs.webkit.org/show_bug.cgi?id=101012.
  19468. Reviewed by Michael Saboff.
  19469. * llint/LowLevelInterpreter.asm:
  19470. - use a local label to workaround the toolchain issue with undeclared
  19471. global labels.
  19472. 2012-11-01 Oliver Hunt <oliver@apple.com>
  19473. Remove GlobalObject constant register that is typically unused
  19474. https://bugs.webkit.org/show_bug.cgi?id=101005
  19475. Reviewed by Geoffrey Garen.
  19476. The GlobalObject constant register is frequently allocated even when it
  19477. is not used, it is also getting in the way of some other optimisations.
  19478. * bytecode/CodeBlock.cpp:
  19479. (JSC::CodeBlock::CodeBlock):
  19480. * bytecode/CodeBlock.h:
  19481. (CodeBlock):
  19482. * bytecompiler/BytecodeGenerator.cpp:
  19483. (JSC::BytecodeGenerator::BytecodeGenerator):
  19484. * dfg/DFGByteCodeParser.cpp:
  19485. (JSC::DFG::ByteCodeParser::parseResolveOperations):
  19486. 2012-10-31 Filip Pizlo <fpizlo@apple.com>
  19487. DFG optimized string access code should be enabled
  19488. https://bugs.webkit.org/show_bug.cgi?id=100825
  19489. Reviewed by Oliver Hunt.
  19490. - Removes prediction checks from the parser.
  19491. - Fixes the handling of array mode refinement for strings. I.e. we don't do
  19492. any refinement - we already know it's going to be a string. We could
  19493. revisit this in the future, but for now the DFG lacks the ability to
  19494. handle any array modes other than Array::String for string intrinsics, so
  19495. this is as good as it gets.
  19496. - Removes uses of isBlahSpeculation for checking if a mode is already
  19497. checked. isBlahSpeculation implicitly checks if the SpeculatedType is not
  19498. BOTTOM ("empty"), which breaks for checking if a mode is already checked
  19499. since a mode may already be "checked" in the sense that we've proven that
  19500. the code is unreachable.
  19501. ~1% speed-up on V8v7, mostly from a speed-up on crypto, which uses string
  19502. intrinsics in one of the hot functions.
  19503. * bytecode/SpeculatedType.h:
  19504. (JSC::speculationChecked):
  19505. (JSC):
  19506. * dfg/DFGArrayMode.cpp:
  19507. (JSC::DFG::ArrayMode::alreadyChecked):
  19508. * dfg/DFGByteCodeParser.cpp:
  19509. (JSC::DFG::ByteCodeParser::handleIntrinsic):
  19510. * dfg/DFGFixupPhase.cpp:
  19511. (JSC::DFG::FixupPhase::fixupNode):
  19512. * dfg/DFGSpeculativeJIT.cpp:
  19513. (JSC::DFG::SpeculativeJIT::compileGetCharCodeAt):
  19514. 2012-10-31 Filip Pizlo <fpizlo@apple.com>
  19515. Sparse array size threshold should be increased to 100000
  19516. https://bugs.webkit.org/show_bug.cgi?id=100827
  19517. Reviewed by Oliver Hunt.
  19518. This enables the use of contiguous arrays in programs that previously
  19519. couldn't use them. And I so far can't see any examples of this being
  19520. a downside. To the extent that there is a downside, it ought to be
  19521. addressed by GC: https://bugs.webkit.org/show_bug.cgi?id=100828
  19522. * runtime/ArrayConventions.h:
  19523. (JSC):
  19524. 2012-10-31 Mark Lam <mark.lam@apple.com>
  19525. C++ llint 64-bit backend needs to zero extend results of int32 operations.
  19526. https://bugs.webkit.org/show_bug.cgi?id=100899.
  19527. Reviewed by Filip Pizlo.
  19528. llint asm instructions ending in "i" for a 64-bit machine expects the
  19529. high 32-bit of registers to be zero'ed out when a 32-bit instruction
  19530. writes into a register. Fixed the C++ llint to honor this.
  19531. Fixed the index register used in BaseIndex addressing to be of size
  19532. intptr_t as expected.
  19533. Updated CLoopRegister to handle different endiannesss configurations.
  19534. * llint/LowLevelInterpreter.cpp:
  19535. (JSC::CLoopRegister::clearHighWord):
  19536. - new method to clear the high 32-bit of a 64-bit register.
  19537. It's a no-op for the 32-bit build.
  19538. (CLoopRegister):
  19539. - CLoopRegister now takes care of packing and byte endianness order.
  19540. (JSC::CLoop::execute): - Added an assert.
  19541. * offlineasm/cloop.rb:
  19542. - Add calls to clearHighWord() wherever needed.
  19543. 2012-10-31 Mark Lam <mark.lam@apple.com>
  19544. A JSC printf (support for %J+s and %b).
  19545. https://bugs.webkit.org/show_bug.cgi?id=100566.
  19546. Reviewed by Michael Saboff.
  19547. Added VMInspector::printf(), fprintf(), sprintf(), and snprintf().
  19548. - %b prints ints as boolean TRUE (non-zero) or FALSE (zero).
  19549. - %Js prints a WTF::String* like a %s prints a char*.
  19550. Also works for 16bit WTF::Strings (prints wchar_t* using %S).
  19551. - '+' is a modifier meaning 'use verbose mode', and %J+s is an example
  19552. of its use.
  19553. * JavaScriptCore.xcodeproj/project.pbxproj:
  19554. * interpreter/VMInspector.cpp:
  19555. (FormatPrinter):
  19556. (JSC::FormatPrinter::~FormatPrinter):
  19557. (JSC::FormatPrinter::print):
  19558. (JSC::FormatPrinter::printArg):
  19559. (JSC::FormatPrinter::printWTFString):
  19560. (JSC::FileFormatPrinter::FileFormatPrinter):
  19561. (JSC::FileFormatPrinter::printArg):
  19562. (JSC::StringFormatPrinter::StringFormatPrinter):
  19563. (JSC::StringFormatPrinter::printArg):
  19564. (JSC::StringNFormatPrinter::StringNFormatPrinter):
  19565. (JSC::StringNFormatPrinter::printArg):
  19566. (JSC::VMInspector::fprintf):
  19567. (JSC::VMInspector::printf):
  19568. (JSC::VMInspector::sprintf):
  19569. (JSC::VMInspector::snprintf):
  19570. * interpreter/VMInspector.h:
  19571. (VMInspector):
  19572. 2012-10-31 Mark Lam <mark.lam@apple.com>
  19573. 64-bit llint PC offset can be negative: using an unsigned shift is a bug.
  19574. https://bugs.webkit.org/show_bug.cgi?id=100896.
  19575. Reviewed by Filip Pizlo.
  19576. Fixed the PC offset divisions in the 64-bit llint asm to use rshift instead of urshift.
  19577. * llint/LowLevelInterpreter64.asm:
  19578. 2012-10-30 Yuqiang Xian <yuqiang.xian@intel.com>
  19579. glsl-function-atan.html WebGL conformance test fails after https://bugs.webkit.org/show_bug.cgi?id=99154
  19580. https://bugs.webkit.org/show_bug.cgi?id=100789
  19581. Reviewed by Filip Pizlo.
  19582. We accidently missed a bitwise double to int64 conversion.
  19583. * dfg/DFGSpeculativeJIT.h:
  19584. (JSC::DFG::SpeculativeJIT::silentFill):
  19585. 2012-10-30 Joseph Pecoraro <pecoraro@apple.com>
  19586. [Mac] Sync up FeatureDefine Configuration Files
  19587. https://bugs.webkit.org/show_bug.cgi?id=100171
  19588. Reviewed by David Kilzer.
  19589. Follow up to better coordinate with iOS feature defines. Make:
  19590. - ENABLE_FILTERS always on
  19591. - ENABLE_INPUT_* iphonesimulator values point to the iphoneos values
  19592. * Configurations/FeatureDefines.xcconfig:
  19593. 2012-10-30 Joseph Pecoraro <pecoraro@apple.com>
  19594. [Mac] Sync up FeatureDefine Configuration Files
  19595. https://bugs.webkit.org/show_bug.cgi?id=100171
  19596. Reviewed by David Kilzer.
  19597. Ensure an identical FeatureDefine files across all projects. Changes:
  19598. - ENABLE_CSS_BOX_DECORATION_BREAK should be in all
  19599. - ENABLE_PDFKIT_PLUGIN should be in all
  19600. - ENABLE_RESOLUTION_MEDIA_QUERY should be in all
  19601. - ENABLE_ENCRYPTED_MEDIA should be in all
  19602. - ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING with corrected value
  19603. - Some alphabetical ordering cleanup
  19604. * Configurations/FeatureDefines.xcconfig:
  19605. 2012-10-30 Mark Hahnenberg <mhahnenberg@apple.com>
  19606. Arrays can change IndexingType in the middle of sorting
  19607. https://bugs.webkit.org/show_bug.cgi?id=100773
  19608. Reviewed by Filip Pizlo.
  19609. Instead of giving up, we just fetch the appropriate vector based on the current
  19610. IndexingType of the array.
  19611. * runtime/JSArray.cpp:
  19612. (JSC::JSArray::sortVector):
  19613. * runtime/JSObject.h:
  19614. (JSObject):
  19615. (JSC::JSObject::currentIndexingData):
  19616. (JSC::JSObject::currentRelevantLength):
  19617. 2012-10-29 Anders Carlsson <andersca@apple.com>
  19618. Build WebKit as C++11 on Mac
  19619. https://bugs.webkit.org/show_bug.cgi?id=100720
  19620. Reviewed by Daniel Bates.
  19621. * Configurations/Base.xcconfig:
  19622. Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x.
  19623. * bytecompiler/BytecodeGenerator.cpp:
  19624. (JSC::BytecodeGenerator::generate):
  19625. (JSC::BytecodeGenerator::pushFinallyContext):
  19626. (JSC::BytecodeGenerator::beginSwitch):
  19627. * llint/LLIntOffsetsExtractor.cpp:
  19628. * runtime/Identifier.cpp:
  19629. (JSC::Identifier::add8):
  19630. * runtime/Identifier.h:
  19631. (JSC::Identifier::add):
  19632. * runtime/JSONObject.cpp:
  19633. (JSC::appendStringToStringBuilder):
  19634. * runtime/StringPrototype.cpp:
  19635. (JSC::replaceUsingStringSearch):
  19636. Add static_casts to prevent implicit type conversions in non-constant initializer lists.
  19637. 2012-10-28 Mark Rowe <mrowe@apple.com>
  19638. Simplify Xcode configuration settings that used to vary between OS versions.
  19639. Reviewed by Dan Bernstein.
  19640. * Configurations/Base.xcconfig:
  19641. * Configurations/DebugRelease.xcconfig:
  19642. * Configurations/JavaScriptCore.xcconfig:
  19643. 2012-10-28 Mark Rowe <mrowe@apple.com>
  19644. Remove references to unsupported OS and Xcode versions.
  19645. Reviewed by Anders Carlsson.
  19646. * Configurations/Base.xcconfig:
  19647. * Configurations/CompilerVersion.xcconfig: Removed.
  19648. * Configurations/DebugRelease.xcconfig:
  19649. * Configurations/Version.xcconfig:
  19650. * JavaScriptCore.xcodeproj/project.pbxproj:
  19651. 2012-10-29 Michael Saboff <msaboff@apple.com>
  19652. Non-special escape character sequences cause JSC::Lexer::parseString to create 16 bit strings
  19653. https://bugs.webkit.org/show_bug.cgi?id=100576
  19654. Reviewed by Darin Adler.
  19655. Changed singleEscape() processing to be based on a lookup of a static table. The table
  19656. covers ASCII characters SPACE through DEL. If a character can be a single character escape,
  19657. then the table provides the non-zero result of that escape. Updated the result of
  19658. singleEscape to be an LChar to make the table as small as possible.
  19659. Added a new test fast/js/normal-character-escapes-in-string-literals.html to validated
  19660. the behavior.
  19661. * parser/Lexer.cpp:
  19662. (JSC::singleEscape):
  19663. (JSC::Lexer::parseString):
  19664. (JSC::Lexer::parseStringSlowCase):
  19665. 2012-10-29 Enrica Casucci <enrica@apple.com>
  19666. Add ENABLE_USERSELECT_ALL feature flag.
  19667. https://bugs.webkit.org/show_bug.cgi?id=100559
  19668. Reviewed by Eric Seidel.
  19669. * Configurations/FeatureDefines.xcconfig:
  19670. 2012-10-28 Filip Pizlo <fpizlo@apple.com>
  19671. DFG should be able to emit effectful structure checks
  19672. https://bugs.webkit.org/show_bug.cgi?id=99260
  19673. Reviewed by Oliver Hunt.
  19674. This change allows us to find out if an array access that has gone polymorphic
  19675. is operating over known structures - i.e. the primordial array structures of the
  19676. global object that the code block containing the array access belongs to. We
  19677. term this state "OriginalArray" for short. The fact that the access has gone
  19678. polymorphic means that the array profile will not be able to report the set of
  19679. structures it had seen - but if it can tell us that all of the structures were
  19680. primordial then it just so happens that we can deduce what the structure set
  19681. would have been by just querying the code block's global object. This allows us
  19682. to emit an ArrayifyToStructure instead of an Arrayify if we find that we need to
  19683. do conversions. The fast path of an ArrayifyToStructure is exactly like the fast
  19684. path of a CheckStructure and is mostly subject to the same optimizations. It
  19685. also burns one fewer registers.
  19686. Essentially the notion of OriginalArray is a super cheap way of getting the
  19687. array profile to tell us a structure set instead of a singleton structure.
  19688. Currently, the array profile can only tell us the structure seen at an array
  19689. access if there was exactly one structure. If there were multiple structures, it
  19690. won't tell us anything other than the array modes and other auxiliary profiling
  19691. data (whether there were stores to holes, for example). With OriginalArray, we
  19692. cheaply get a structure set if all of the structures were primordial for the
  19693. code block's global object, since in that case the array mode set (ArrayModes)
  19694. can directly tell us the structure set. In the future, we might consider adding
  19695. complete structure sets to the array profiles, but I suspect that we would hit
  19696. diminishing returns if we did so - it would only help if we have array accesses
  19697. that are both polymorphic and are cross-global-object accesses (rare) or if the
  19698. arrays had named properties or other structure transitions that are unrelated to
  19699. indexing type (also rare).
  19700. This also does away with Arrayify (and the new ArrayifyToStructure) returning
  19701. the butterfly pointer. This turns out to be faster and easier to CSE.
  19702. And, this also changes constant folding to be able to eliminate CheckStructure,
  19703. ForwardCheckStructure, and ArrayifyToStructure in addition to being able to
  19704. transform them into structure transition watchpoints. This is great for
  19705. ArrayifyToStructure because then CSE and CFA know that there is no side effect.
  19706. Converting CheckStructure and ForwardCheckStructure to also behave this way is
  19707. just a matter of elegance.
  19708. This has no performance impact right now. It's intended to alleviate some of the
  19709. regressions seen in the early implementation of
  19710. https://bugs.webkit.org/show_bug.cgi?id=98606.
  19711. * bytecode/ArrayProfile.cpp:
  19712. (JSC::ArrayProfile::computeUpdatedPrediction):
  19713. * bytecode/ArrayProfile.h:
  19714. (JSC):
  19715. (JSC::ArrayProfile::ArrayProfile):
  19716. (ArrayProfile):
  19717. (JSC::ArrayProfile::usesOriginalArrayStructures):
  19718. * bytecode/CodeBlock.cpp:
  19719. (JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
  19720. * dfg/DFGAbstractState.cpp:
  19721. (JSC::DFG::AbstractState::execute):
  19722. * dfg/DFGArrayMode.cpp:
  19723. (JSC::DFG::ArrayMode::fromObserved):
  19724. (JSC::DFG::ArrayMode::alreadyChecked):
  19725. (JSC::DFG::arrayClassToString):
  19726. * dfg/DFGArrayMode.h:
  19727. (JSC::DFG::ArrayMode::withProfile):
  19728. (JSC::DFG::ArrayMode::isJSArray):
  19729. (ArrayMode):
  19730. (JSC::DFG::ArrayMode::isJSArrayWithOriginalStructure):
  19731. (JSC::DFG::ArrayMode::supportsLength):
  19732. (JSC::DFG::ArrayMode::arrayModesWithIndexingShape):
  19733. * dfg/DFGByteCodeParser.cpp:
  19734. (JSC::DFG::ByteCodeParser::getArrayMode):
  19735. (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks):
  19736. (JSC::DFG::ByteCodeParser::handleGetByOffset):
  19737. * dfg/DFGCSEPhase.cpp:
  19738. (JSC::DFG::CSEPhase::checkStructureElimination):
  19739. (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination):
  19740. (JSC::DFG::CSEPhase::getPropertyStorageLoadElimination):
  19741. (JSC::DFG::CSEPhase::checkArrayElimination):
  19742. (JSC::DFG::CSEPhase::getScopeRegistersLoadElimination):
  19743. * dfg/DFGConstantFoldingPhase.cpp:
  19744. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  19745. * dfg/DFGFixupPhase.cpp:
  19746. (JSC::DFG::FixupPhase::fixupNode):
  19747. (JSC::DFG::FixupPhase::checkArray):
  19748. * dfg/DFGNode.h:
  19749. (JSC::DFG::Node::hasStructure):
  19750. (JSC::DFG::Node::hasArrayMode):
  19751. (JSC::DFG::Node::arrayMode):
  19752. * dfg/DFGNodeType.h:
  19753. (DFG):
  19754. * dfg/DFGPredictionPropagationPhase.cpp:
  19755. (JSC::DFG::PredictionPropagationPhase::propagate):
  19756. * dfg/DFGSpeculativeJIT.cpp:
  19757. (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
  19758. (JSC::DFG::SpeculativeJIT::arrayify):
  19759. * dfg/DFGSpeculativeJIT.h:
  19760. (SpeculativeJIT):
  19761. * dfg/DFGSpeculativeJIT32_64.cpp:
  19762. (JSC::DFG::SpeculativeJIT::compile):
  19763. * dfg/DFGSpeculativeJIT64.cpp:
  19764. (JSC::DFG::SpeculativeJIT::compile):
  19765. * runtime/JSGlobalObject.h:
  19766. (JSC::JSGlobalObject::isOriginalArrayStructure):
  19767. * runtime/Structure.cpp:
  19768. (JSC::Structure::nonPropertyTransition):
  19769. 2012-10-28 Filip Pizlo <fpizlo@apple.com>
  19770. There should not be blind spots in array length array profiling
  19771. https://bugs.webkit.org/show_bug.cgi?id=100620
  19772. Reviewed by Oliver Hunt.
  19773. I don't think this has any performance impact. But it's good to not have random
  19774. programs occasionally emit a GetById for array length accesses.
  19775. * jit/JITPropertyAccess.cpp:
  19776. (JSC::JIT::compileGetByIdHotPath):
  19777. (JSC::JIT::privateCompilePatchGetArrayLength):
  19778. * jit/JITPropertyAccess32_64.cpp:
  19779. (JSC::JIT::compileGetByIdHotPath):
  19780. (JSC::JIT::privateCompilePatchGetArrayLength):
  19781. 2012-10-28 Filip Pizlo <fpizlo@apple.com>
  19782. Unreviewed, make always-true enum-to-int comparisons use casts.
  19783. * dfg/DFGFPRInfo.h:
  19784. (JSC::DFG::FPRInfo::debugName):
  19785. * dfg/DFGGPRInfo.h:
  19786. (JSC::DFG::JSValueSource::tagGPR):
  19787. (JSC::DFG::GPRInfo::toIndex):
  19788. (JSC::DFG::GPRInfo::debugName):
  19789. * runtime/JSTypeInfo.h:
  19790. (JSC::TypeInfo::TypeInfo):
  19791. 2012-10-27 Filip Pizlo <fpizlo@apple.com>
  19792. OSR exit compilation should defend against argument recoveries from code blocks that are no longer on the inline stack
  19793. https://bugs.webkit.org/show_bug.cgi?id=100601
  19794. Reviewed by Oliver Hunt.
  19795. This happened to me while I was fixing bugs for https://bugs.webkit.org/show_bug.cgi?id=100599.
  19796. I'm not sure how to reproduce this.
  19797. * dfg/DFGAssemblyHelpers.h:
  19798. (JSC::DFG::AssemblyHelpers::baselineCodeBlockFor):
  19799. (AssemblyHelpers):
  19800. * dfg/DFGOSRExitCompiler32_64.cpp:
  19801. (JSC::DFG::OSRExitCompiler::compileExit):
  19802. * dfg/DFGOSRExitCompiler64.cpp:
  19803. (JSC::DFG::OSRExitCompiler::compileExit):
  19804. 2012-10-27 Filip Pizlo <fpizlo@apple.com>
  19805. DFG::Array::Mode needs to be cleaned up
  19806. https://bugs.webkit.org/show_bug.cgi?id=100599
  19807. Reviewed by Oliver Hunt.
  19808. Turn the previous massive Array::Mode enum into a class that contains four
  19809. fields, the type, whether it's a JSArray, the level of speculation, and the
  19810. kind of conversion to perform.
  19811. No performance or behavioral change.
  19812. * dfg/DFGAbstractState.cpp:
  19813. (JSC::DFG::AbstractState::execute):
  19814. * dfg/DFGArgumentsSimplificationPhase.cpp:
  19815. (JSC::DFG::ArgumentsSimplificationPhase::run):
  19816. * dfg/DFGArrayMode.cpp:
  19817. (JSC::DFG::ArrayMode::fromObserved):
  19818. (JSC::DFG::ArrayMode::refine):
  19819. (JSC::DFG::ArrayMode::alreadyChecked):
  19820. (JSC::DFG::arrayTypeToString):
  19821. (JSC::DFG::arrayClassToString):
  19822. (DFG):
  19823. (JSC::DFG::arraySpeculationToString):
  19824. (JSC::DFG::arrayConversionToString):
  19825. (JSC::DFG::ArrayMode::toString):
  19826. * dfg/DFGArrayMode.h:
  19827. (DFG):
  19828. (ArrayMode):
  19829. (JSC::DFG::ArrayMode::ArrayMode):
  19830. (JSC::DFG::ArrayMode::type):
  19831. (JSC::DFG::ArrayMode::arrayClass):
  19832. (JSC::DFG::ArrayMode::speculation):
  19833. (JSC::DFG::ArrayMode::conversion):
  19834. (JSC::DFG::ArrayMode::asWord):
  19835. (JSC::DFG::ArrayMode::fromWord):
  19836. (JSC::DFG::ArrayMode::withSpeculation):
  19837. (JSC::DFG::ArrayMode::usesButterfly):
  19838. (JSC::DFG::ArrayMode::isJSArray):
  19839. (JSC::DFG::ArrayMode::isInBounds):
  19840. (JSC::DFG::ArrayMode::mayStoreToHole):
  19841. (JSC::DFG::ArrayMode::isOutOfBounds):
  19842. (JSC::DFG::ArrayMode::isSlowPut):
  19843. (JSC::DFG::ArrayMode::canCSEStorage):
  19844. (JSC::DFG::ArrayMode::lengthNeedsStorage):
  19845. (JSC::DFG::ArrayMode::modeForPut):
  19846. (JSC::DFG::ArrayMode::isSpecific):
  19847. (JSC::DFG::ArrayMode::supportsLength):
  19848. (JSC::DFG::ArrayMode::benefitsFromStructureCheck):
  19849. (JSC::DFG::ArrayMode::doesConversion):
  19850. (JSC::DFG::ArrayMode::arrayModesThatPassFiltering):
  19851. (JSC::DFG::ArrayMode::operator==):
  19852. (JSC::DFG::ArrayMode::operator!=):
  19853. (JSC::DFG::ArrayMode::arrayModesWithIndexingShape):
  19854. (JSC::DFG::canCSEStorage):
  19855. (JSC::DFG::lengthNeedsStorage):
  19856. * dfg/DFGByteCodeParser.cpp:
  19857. (JSC::DFG::ByteCodeParser::getArrayMode):
  19858. (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks):
  19859. (JSC::DFG::ByteCodeParser::handleIntrinsic):
  19860. (JSC::DFG::ByteCodeParser::parseBlock):
  19861. * dfg/DFGCSEPhase.cpp:
  19862. (JSC::DFG::CSEPhase::getArrayLengthElimination):
  19863. (JSC::DFG::CSEPhase::checkArrayElimination):
  19864. (JSC::DFG::CSEPhase::getIndexedPropertyStorageLoadElimination):
  19865. (JSC::DFG::CSEPhase::performNodeCSE):
  19866. * dfg/DFGConstantFoldingPhase.cpp:
  19867. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  19868. * dfg/DFGFixupPhase.cpp:
  19869. (JSC::DFG::FixupPhase::fixupNode):
  19870. (JSC::DFG::FixupPhase::checkArray):
  19871. (JSC::DFG::FixupPhase::blessArrayOperation):
  19872. * dfg/DFGGraph.cpp:
  19873. (JSC::DFG::Graph::dump):
  19874. * dfg/DFGGraph.h:
  19875. (JSC::DFG::Graph::byValIsPure):
  19876. * dfg/DFGNode.h:
  19877. (JSC::DFG::Node::arrayMode):
  19878. (JSC::DFG::Node::setArrayMode):
  19879. * dfg/DFGSpeculativeJIT.cpp:
  19880. (JSC::DFG::SpeculativeJIT::typedArrayDescriptor):
  19881. (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
  19882. (JSC::DFG::SpeculativeJIT::checkArray):
  19883. (JSC::DFG::SpeculativeJIT::arrayify):
  19884. (JSC::DFG::SpeculativeJIT::compileGetByValOnString):
  19885. (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
  19886. (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
  19887. (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
  19888. (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
  19889. (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments):
  19890. (JSC::DFG::SpeculativeJIT::compileGetArgumentsLength):
  19891. (JSC::DFG::SpeculativeJIT::compileGetArrayLength):
  19892. (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal):
  19893. * dfg/DFGSpeculativeJIT.h:
  19894. (JSC::DFG::SpeculativeJIT::putByValWillNeedExtraRegister):
  19895. (SpeculativeJIT):
  19896. * dfg/DFGSpeculativeJIT32_64.cpp:
  19897. (JSC::DFG::SpeculativeJIT::compile):
  19898. * dfg/DFGSpeculativeJIT64.cpp:
  19899. (JSC::DFG::SpeculativeJIT::compile):
  19900. 2012-10-27 Dan Bernstein <mitz@apple.com>
  19901. REAL_PLATFORM_NAME build setting is no longer needed
  19902. https://bugs.webkit.org/show_bug.cgi?id=100587
  19903. Reviewed by Mark Rowe.
  19904. Removed the definition of REAL_PLATFORM_NAME and replaced references to it with references
  19905. to PLATFORM_NAME.
  19906. * Configurations/Base.xcconfig:
  19907. * Configurations/CompilerVersion.xcconfig:
  19908. * Configurations/DebugRelease.xcconfig:
  19909. * Configurations/FeatureDefines.xcconfig:
  19910. * Configurations/JSC.xcconfig:
  19911. * Configurations/JavaScriptCore.xcconfig:
  19912. * Configurations/ToolExecutable.xcconfig:
  19913. 2012-10-25 Filip Pizlo <fpizlo@apple.com>
  19914. Forward OSR calculation is wrong in the presence of multiple SetLocals, or a mix of SetLocals and Phantoms
  19915. https://bugs.webkit.org/show_bug.cgi?id=100461
  19916. Reviewed by Oliver Hunt and Gavin Barraclough.
  19917. This does a couple of things. First, it removes the part of the change in r131822 that made the forward
  19918. OSR exit calculator capable of handling multiple SetLocals. That change was wrong, because it would
  19919. blindly assume that all SetLocals had the same ValueRecovery, and would ignore the possibility that if
  19920. there is no value recovery then a ForwardCheckStructure on the first SetLocal would not know how to
  19921. recover the state associated with the second SetLocal. Then, it introduces the invariant that any bytecode
  19922. op that decomposes into multiple SetLocals must first emit dead SetLocals as hints and then emit a second
  19923. set of SetLocals to actually do the setting of the locals. This means that if a ForwardCheckStructure (or
  19924. any other hoisted forward speculation) is inserted, it will always be inserted on the second set of
  19925. SetLocals (since hoisting only touches the live ones), at which point OSR will already know about the
  19926. mov hints implied by the first set of (dead) SetLocals. This gives us the behavior we wanted, namely, that
  19927. a ForwardCheckStructure applied to a variant set by a resolve_with_base-like operation can correctly do a
  19928. forward exit while also ensuring that prior to exiting we set the appropriate locals.
  19929. * dfg/DFGByteCodeParser.cpp:
  19930. (JSC::DFG::ByteCodeParser::parseBlock):
  19931. * dfg/DFGOSRExit.cpp:
  19932. (JSC::DFG::OSRExit::OSRExit):
  19933. * dfg/DFGOSRExit.h:
  19934. (OSRExit):
  19935. * dfg/DFGOSRExitCompiler.cpp:
  19936. * dfg/DFGOSRExitCompiler32_64.cpp:
  19937. (JSC::DFG::OSRExitCompiler::compileExit):
  19938. * dfg/DFGOSRExitCompiler64.cpp:
  19939. (JSC::DFG::OSRExitCompiler::compileExit):
  19940. * dfg/DFGSpeculativeJIT.cpp:
  19941. (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
  19942. 2012-10-26 Simon Hausmann <simon.hausmann@digia.com>
  19943. [Qt] Fix the LLInt build on Windows
  19944. https://bugs.webkit.org/show_bug.cgi?id=97648
  19945. Reviewed by Tor Arne Vestbø.
  19946. The main change for the port on Windows is changing the way offsets are extracted
  19947. and the LLIntAssembly.h is generated to accomodate release and debug configurations.
  19948. Firstly the LLIntOffsetsExtractor binary is now built as-is (no DESTDIR set) and
  19949. placed into debug\LLIntOffsetsExtractor.exe and release\LLIntOffsetsExtractor.exe
  19950. on Windows debug_and_release builds. On other patforms it remainds in the regular
  19951. out directory.
  19952. Secondly the LLIntAssembly.h files must be different for different build types,
  19953. so the LLIntAssembly.h generator in DerivedSources.pri operates no on the extractor
  19954. binary files as input. Using a simple exists() check we verify the presence of either
  19955. a regular, a debug\LLIntOffsetsExtractor and a release\LLIntOffsetsExtractor binary
  19956. and process all of them. The resulting assembly files consequently end up in
  19957. generated\debug\LLIntAssembly.h and generated\release\LLIntAssembly.h.
  19958. In Target.pri we have to also make sure that those directories are in the include
  19959. path according to the release or debug configuration.
  19960. Lastly a small tweak - swapping WTF.pri and JSC.pri inclusions - in the
  19961. LLIntOffsetsExtractor build was needed to make sure that we include
  19962. JavaScriptCore/config.h instead of WTF/config.h, required to fix the
  19963. build issues originally pasted in bug #97648.
  19964. * DerivedSources.pri:
  19965. * JavaScriptCore.pro:
  19966. * LLIntOffsetsExtractor.pro:
  19967. * Target.pri:
  19968. 2012-10-26 Gabor Ballabas <gaborb@inf.u-szeged.hu>
  19969. [Qt] Enable JSC's disassembler on x86, x86_64 Linux
  19970. https://bugs.webkit.org/show_bug.cgi?id=100386
  19971. Reviewed by Simon Hausmann.
  19972. It works fine on Linux x86, x86_64 just needs to be enabled in the
  19973. QtWebKit build system.
  19974. * DerivedSources.pri:
  19975. * JavaScriptCore.pri:
  19976. * Target.pri:
  19977. 2012-10-26 Thiago Marcos P. Santos <thiago.santos@intel.com>
  19978. Add feature flags for CSS Device Adaptation
  19979. https://bugs.webkit.org/show_bug.cgi?id=95960
  19980. Reviewed by Kenneth Rohde Christiansen.
  19981. * Configurations/FeatureDefines.xcconfig:
  19982. 2012-10-26 Simon Hausmann <simon.hausmann@digia.com>
  19983. [WIN] Make LLInt offsets extractor work on Windows
  19984. https://bugs.webkit.org/show_bug.cgi?id=100369
  19985. Reviewed by Kenneth Rohde Christiansen.
  19986. Open the input file explicitly in binary mode to prevent ruby/Windows from thinking that
  19987. it's a text mode file that needs even new line conversions. The binary mode parameter is
  19988. ignored on other platforms.
  19989. * offlineasm/offsets.rb:
  19990. 2012-10-25 Michael Saboff <msaboff@apple.com>
  19991. SymbolTableIndexHashTraits::needsDestruction should be set to true
  19992. https://bugs.webkit.org/show_bug.cgi?id=100437
  19993. Reviewed by Mark Hahnenberg.
  19994. For correctness, set SymbolTableIndexHashTraits::needsDestruction to true since SymbolTableEntry's do
  19995. need to have their destructor called due to the possibility of rare data.
  19996. * runtime/SymbolTable.h:
  19997. (SymbolTableIndexHashTraits):
  19998. 2012-10-25 Filip Pizlo <fpizlo@apple.com>
  19999. DFG Arrayify elimination should replace it with GetButterfly rather than Phantom
  20000. https://bugs.webkit.org/show_bug.cgi?id=100441
  20001. Reviewed by Oliver Hunt and Gavin Barraclough.
  20002. Made array profiler's to-string helper behave correctly.
  20003. Made Arrayify elimination do the right thing (convert to GetButterfly).
  20004. Made CFA's interference analysis track clobbered array modes correctly, mostly by
  20005. simplifying the machinery.
  20006. * bytecode/ArrayProfile.cpp:
  20007. (JSC::arrayModesToString):
  20008. * dfg/DFGAbstractState.cpp:
  20009. (JSC::DFG::AbstractState::execute):
  20010. * dfg/DFGAbstractValue.h:
  20011. (JSC::DFG::AbstractValue::clobberArrayModes):
  20012. (AbstractValue):
  20013. * dfg/DFGConstantFoldingPhase.cpp:
  20014. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  20015. 2012-10-25 Filip Pizlo <fpizlo@apple.com>
  20016. REGRESSION (r131793-r131826): Crash going to wikifonia.org
  20017. https://bugs.webkit.org/show_bug.cgi?id=100281
  20018. Reviewed by Oliver Hunt.
  20019. Restore something that got lost in the resolve refactoring: the ability to give up on life if
  20020. we see a resolve of 'arguments'.
  20021. * runtime/JSScope.cpp:
  20022. (JSC::JSScope::resolveContainingScopeInternal):
  20023. 2012-10-25 Dominik Röttsches <dominik.rottsches@intel.com>
  20024. Conditionalize XHR timeout support
  20025. https://bugs.webkit.org/show_bug.cgi?id=100356
  20026. Reviewed by Adam Barth.
  20027. Adding XHR_TIMEOUT feature to conditionalize this on ports without network backend support.
  20028. * Configurations/FeatureDefines.xcconfig:
  20029. 2012-10-25 Michael Saboff <msaboff@apple.com>
  20030. REGRESSION (r131836): failures in list styles tests on EFL, GTK
  20031. https://bugs.webkit.org/show_bug.cgi?id=99824
  20032. Reviewed by Oliver Hunt.
  20033. Saved start of string since it is modified by call convertUTF8ToUTF16().
  20034. * API/JSStringRef.cpp:
  20035. (JSStringCreateWithUTF8CString):
  20036. 2012-10-24 Filip Pizlo <fpizlo@apple.com>
  20037. DFG NewArrayBuffer node should keep its data in a structure on the side to free up one of the opInfos
  20038. https://bugs.webkit.org/show_bug.cgi?id=100328
  20039. Reviewed by Oliver Hunt.
  20040. * dfg/DFGByteCodeParser.cpp:
  20041. (JSC::DFG::ByteCodeParser::parseBlock):
  20042. * dfg/DFGGraph.h:
  20043. (Graph):
  20044. * dfg/DFGNode.h:
  20045. (NewArrayBufferData):
  20046. (DFG):
  20047. (JSC::DFG::Node::newArrayBufferData):
  20048. (Node):
  20049. (JSC::DFG::Node::startConstant):
  20050. (JSC::DFG::Node::numConstants):
  20051. 2012-10-25 Mark Lam <mark.lam@apple.com>
  20052. Update the C++ llint to work with the latest op_resolve... changes.
  20053. https://bugs.webkit.org/show_bug.cgi?id=100345.
  20054. Reviewed by Oliver Hunt.
  20055. * llint/LowLevelInterpreter.cpp:
  20056. (JSC::CLoop::execute):
  20057. - emit opcode name as label when not using COMPUTED_GOTOs. The new op_resolve
  20058. opcodes have jumps to these labels.
  20059. - declare all opcode labels as UNUSED_LABEL()s to keep the compiler happy
  20060. for opcodes that are not referenced by anyone.
  20061. * offlineasm/asm.rb:
  20062. - strip llint_ prefix from opcode names used as labels.
  20063. 2012-10-24 Yuqiang Xian <yuqiang.xian@intel.com>
  20064. Refactor LLInt64 to distinguish the pointer operations from the 64-bit integer operations
  20065. https://bugs.webkit.org/show_bug.cgi?id=100321
  20066. Reviewed by Filip Pizlo.
  20067. We have refactored the MacroAssembler and JIT compilers to distinguish
  20068. the pointer operations from the 64-bit integer operations (see bug #99154).
  20069. Now we want to do the similar work for LLInt, and the goal is same as
  20070. the one mentioned in 99154.
  20071. This is the first part of the modification: in the offline assembler,
  20072. adding the support of the "<foo>q" instructions which will be used for
  20073. 64-bit integer operations.
  20074. * llint/LowLevelInterpreter.cpp:
  20075. (JSC::CLoop::execute):
  20076. * offlineasm/cloop.rb:
  20077. * offlineasm/instructions.rb:
  20078. * offlineasm/x86.rb:
  20079. 2012-10-24 Filip Pizlo <fpizlo@apple.com>
  20080. DFG compileBlahBlahByVal methods for Contiguous and ArrayStorage have only one caller and should be removed
  20081. https://bugs.webkit.org/show_bug.cgi?id=100311
  20082. Reviewed by Mark Hahnenberg.
  20083. Just trying to simplify things before I make them more complicated again.
  20084. * dfg/DFGSpeculativeJIT.h:
  20085. (SpeculativeJIT):
  20086. (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal):
  20087. * dfg/DFGSpeculativeJIT32_64.cpp:
  20088. (DFG):
  20089. (JSC::DFG::SpeculativeJIT::compile):
  20090. * dfg/DFGSpeculativeJIT64.cpp:
  20091. (DFG):
  20092. (JSC::DFG::SpeculativeJIT::compile):
  20093. 2012-10-23 Andreas Kling <kling@webkit.org>
  20094. CodeBlock: Give m_putToBaseOperations an inline capacity.
  20095. <http://webkit.org/b/100190>
  20096. <rdar://problem/12562466>
  20097. Reviewed by Oliver Hunt.
  20098. Since the CodeBlock constructor always inserts a single PutToBaseOperation, but there's no
  20099. guarantee that more will follow, give the m_putToBaseOperations vector an inline capacity of 1.
  20100. There are 4009 of these Vectors on Membuster3, and only 126 of them have more than a single entry.
  20101. This change yields a 1.90MB reduction in memory usage.
  20102. * bytecode/CodeBlock.h:
  20103. (CodeBlock):
  20104. 2012-10-23 Christophe Dumez <christophe.dumez@intel.com>
  20105. Regression(r132143): Assertion hit in JSC::Interpreter::StackPolicy::StackPolicy(JSC::Interpreter&, const WTF::StackBounds&)
  20106. https://bugs.webkit.org/show_bug.cgi?id=100109
  20107. Reviewed by Oliver Hunt.
  20108. Fix possible integer overflow in StackPolicy constructor by
  20109. using size_t type instead of int for stack sizes. The value
  20110. returned by StackBounds::size() is of type size_t but was
  20111. assigned to an int, which may overflow.
  20112. * interpreter/Interpreter.cpp:
  20113. (JSC):
  20114. (JSC::Interpreter::StackPolicy::StackPolicy):
  20115. 2012-10-23 Carlos Garcia Campos <cgarcia@igalia.com>
  20116. Unreviewed. Fix make distcheck.
  20117. * GNUmakefile.list.am: Add missing header file.
  20118. 2012-10-23 Mark Lam <mark.lam@apple.com>
  20119. Make topCallFrame reliable.
  20120. https://bugs.webkit.org/show_bug.cgi?id=98928.
  20121. Reviewed by Geoffrey Garen.
  20122. - VM entry points and the GC now uses topCallFrame.
  20123. - The callerFrame value in CallFrames are now always the previous
  20124. frame on the stack, except for the first frame which has a
  20125. callerFrame of 0 (not counting the HostCallFrameFlag).
  20126. Hence, we can now traverse every frame on the stack all the way
  20127. back to the first frame.
  20128. - GlobalExec's will no longer be used as the callerFrame values in
  20129. call frames.
  20130. - Added fences and traps for debugging the JSStack in debug builds.
  20131. * bytecode/SamplingTool.h:
  20132. (SamplingTool):
  20133. (JSC::SamplingTool::CallRecord::CallRecord):
  20134. * dfg/DFGOperations.cpp:
  20135. - Fixed 2 DFG helper functions to flush topCallFrame as expected.
  20136. * dfg/DFGSpeculativeJIT.h:
  20137. (JSC::DFG::SpeculativeJIT::prepareForExternalCall):
  20138. * interpreter/CallFrame.h:
  20139. (JSC::ExecState::callerFrameNoFlags):
  20140. (ExecState):
  20141. (JSC::ExecState::argIndexForRegister):
  20142. (JSC::ExecState::getArgumentUnsafe):
  20143. * interpreter/CallFrameClosure.h:
  20144. (CallFrameClosure):
  20145. * interpreter/Interpreter.cpp:
  20146. (JSC):
  20147. (JSC::eval):
  20148. (JSC::Interpreter::Interpreter):
  20149. (JSC::Interpreter::throwException):
  20150. (JSC::Interpreter::execute):
  20151. (JSC::Interpreter::executeCall):
  20152. (JSC::Interpreter::executeConstruct):
  20153. (JSC::Interpreter::prepareForRepeatCall):
  20154. (JSC::Interpreter::endRepeatCall):
  20155. * interpreter/Interpreter.h:
  20156. (JSC):
  20157. (Interpreter):
  20158. * interpreter/JSStack.cpp:
  20159. (JSC::JSStack::JSStack):
  20160. (JSC::JSStack::gatherConservativeRoots):
  20161. (JSC::JSStack::disableErrorStackReserve):
  20162. * interpreter/JSStack.h:
  20163. (JSC):
  20164. (JSStack):
  20165. (JSC::JSStack::installFence):
  20166. (JSC::JSStack::validateFence):
  20167. (JSC::JSStack::installTrapsAfterFrame):
  20168. * interpreter/JSStackInlines.h: Added.
  20169. (JSC):
  20170. (JSC::JSStack::getTopOfFrame):
  20171. (JSC::JSStack::getTopOfStack):
  20172. (JSC::JSStack::getStartOfFrame):
  20173. (JSC::JSStack::pushFrame):
  20174. (JSC::JSStack::popFrame):
  20175. (JSC::JSStack::generateFenceValue):
  20176. (JSC::JSStack::installFence):
  20177. (JSC::JSStack::validateFence):
  20178. (JSC::JSStack::installTrapsAfterFrame):
  20179. * jit/JITStubs.cpp:
  20180. (JSC::jitCompileFor):
  20181. (JSC::lazyLinkFor):
  20182. - Set frame->codeBlock to 0 for both the above because they are called
  20183. with partially intitialized frames (cb uninitialized), but may
  20184. trigger a GC.
  20185. (JSC::DEFINE_STUB_FUNCTION):
  20186. * runtime/JSGlobalData.cpp:
  20187. (JSC::JSGlobalData::JSGlobalData):
  20188. 2012-10-22 Filip Pizlo <fpizlo@apple.com>
  20189. DFG::Array::Undecided should be called DFG::Array::SelectUsingPredictions
  20190. https://bugs.webkit.org/show_bug.cgi?id=100052
  20191. Reviewed by Oliver Hunt.
  20192. No functional change, just renaming. It's a clearer name that more accurately
  20193. reflects the meaning, and it eliminates the namespace confusion that will happen
  20194. with the Undecided indexing type in https://bugs.webkit.org/show_bug.cgi?id=98606
  20195. * dfg/DFGAbstractState.cpp:
  20196. (JSC::DFG::AbstractState::execute):
  20197. * dfg/DFGArrayMode.cpp:
  20198. (JSC::DFG::fromObserved):
  20199. (JSC::DFG::refineArrayMode):
  20200. (JSC::DFG::modeAlreadyChecked):
  20201. (JSC::DFG::modeToString):
  20202. * dfg/DFGArrayMode.h:
  20203. (JSC::DFG::canCSEStorage):
  20204. (JSC::DFG::modeIsSpecific):
  20205. (JSC::DFG::modeSupportsLength):
  20206. (JSC::DFG::benefitsFromStructureCheck):
  20207. * dfg/DFGFixupPhase.cpp:
  20208. (JSC::DFG::FixupPhase::fixupNode):
  20209. (JSC::DFG::FixupPhase::blessArrayOperation):
  20210. * dfg/DFGSpeculativeJIT.cpp:
  20211. (JSC::DFG::SpeculativeJIT::arrayify):
  20212. * dfg/DFGSpeculativeJIT32_64.cpp:
  20213. (JSC::DFG::SpeculativeJIT::compile):
  20214. * dfg/DFGSpeculativeJIT64.cpp:
  20215. (JSC::DFG::SpeculativeJIT::compile):
  20216. 2012-10-22 Mark Lam <mark.lam@apple.com>
  20217. Change stack recursion checks to be based on stack availability.
  20218. https://bugs.webkit.org/show_bug.cgi?id=99872.
  20219. Reviewed by Filip Pizlo and Geoffrey Garen.
  20220. - Remove m_reentryDepth, ThreadStackType which are now obsolete.
  20221. - Replaced the reentryDepth checks with a StackBounds check.
  20222. - Added the Interpreter::StackPolicy class to compute a reasonable
  20223. stack capacity requirement given the native stack that the
  20224. interpreter is executing on at that time.
  20225. - Reserved an amount of JSStack space for the use of error handling
  20226. and enable its use (using Interpreter::ErrorHandlingMode) when
  20227. we're about to throw or report an exception.
  20228. - Interpreter::StackPolicy also allows more native stack space
  20229. to be used when in ErrorHandlingMode. This is needed in the case
  20230. of native stack overflows.
  20231. - Fixed the parser so that it throws a StackOverflowError instead of
  20232. a SyntaxError when it encounters a stack overflow.
  20233. * API/JSContextRef.cpp:
  20234. (JSContextGroupCreate):
  20235. (JSGlobalContextCreateInGroup):
  20236. * JavaScriptCore.order:
  20237. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  20238. * interpreter/Interpreter.cpp:
  20239. (JSC::Interpreter::ErrorHandlingMode::ErrorHandlingMode):
  20240. (JSC):
  20241. (JSC::Interpreter::ErrorHandlingMode::~ErrorHandlingMode):
  20242. (JSC::Interpreter::StackPolicy::StackPolicy):
  20243. (JSC::Interpreter::Interpreter):
  20244. (JSC::Interpreter::execute):
  20245. (JSC::Interpreter::executeCall):
  20246. (JSC::Interpreter::executeConstruct):
  20247. (JSC::Interpreter::prepareForRepeatCall):
  20248. * interpreter/Interpreter.h:
  20249. (JSC):
  20250. (Interpreter):
  20251. (ErrorHandlingMode):
  20252. (StackPolicy):
  20253. (JSC::Interpreter::StackPolicy::requiredCapacity):
  20254. * interpreter/JSStack.cpp:
  20255. (JSC):
  20256. (JSC::JSStack::JSStack):
  20257. (JSC::JSStack::growSlowCase):
  20258. (JSC::JSStack::enableErrorStackReserve):
  20259. (JSC::JSStack::disableErrorStackReserve):
  20260. * interpreter/JSStack.h:
  20261. (JSStack):
  20262. (JSC::JSStack::reservationEnd):
  20263. (JSC):
  20264. * jsc.cpp:
  20265. (jscmain):
  20266. * parser/Parser.cpp:
  20267. (JSC::::Parser):
  20268. * parser/Parser.h:
  20269. (Parser):
  20270. (JSC::::parse):
  20271. * runtime/ExceptionHelpers.cpp:
  20272. (JSC::throwStackOverflowError):
  20273. * runtime/JSGlobalData.cpp:
  20274. (JSC::JSGlobalData::JSGlobalData):
  20275. (JSC::JSGlobalData::createContextGroup):
  20276. (JSC::JSGlobalData::create):
  20277. (JSC::JSGlobalData::createLeaked):
  20278. (JSC::JSGlobalData::sharedInstance):
  20279. * runtime/JSGlobalData.h:
  20280. (JSC):
  20281. (JSGlobalData):
  20282. * runtime/StringRecursionChecker.h:
  20283. (JSC::StringRecursionChecker::performCheck):
  20284. * testRegExp.cpp:
  20285. (realMain):
  20286. 2012-10-20 Martin Robinson <mrobinson@igalia.com>
  20287. Fix 'make dist' for the GTK+ port
  20288. * GNUmakefile.list.am: Add missing files to the source list.
  20289. 2012-10-21 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
  20290. [CMake][JSC] Depend on risc.rb to decide when to run the LLInt scripts.
  20291. https://bugs.webkit.org/show_bug.cgi?id=99917
  20292. Reviewed by Geoffrey Garen.
  20293. Depend on the newly-added risc.rb to make sure we always run the
  20294. LLInt scripts when one of them changes.
  20295. * CMakeLists.txt:
  20296. 2012-10-20 Filip Pizlo <fpizlo@apple.com>
  20297. LLInt backends of non-ARM RISC platforms should be able to share code with the existing ARMv7 backend
  20298. https://bugs.webkit.org/show_bug.cgi?id=99745
  20299. Reviewed by Geoffrey Garen.
  20300. This moves all of the things in armv7.rb that I thought are generally useful out
  20301. into risc.rb. It also separates some phases (branch ops is separated into one
  20302. phase that does sensible things, and another that does things that are painfully
  20303. ARM-specific), and removes ARM assumptions from others by using a callback to
  20304. drive exactly what lowering must happen. The goal here is to minimize the future
  20305. maintenance burden of LLInt by ensuring that the various platforms share as much
  20306. lowering code as possible.
  20307. * offlineasm/armv7.rb:
  20308. * offlineasm/risc.rb: Added.
  20309. 2012-10-19 Filip Pizlo <fpizlo@apple.com>
  20310. DFG should have some facility for recognizing redundant CheckArrays and Arrayifies
  20311. https://bugs.webkit.org/show_bug.cgi?id=99287
  20312. Reviewed by Mark Hahnenberg.
  20313. Adds reasoning about indexing type sets (i.e. ArrayModes) to AbstractValue, which
  20314. then enables us to fold away CheckArray's and Arrayify's that are redundant.
  20315. * bytecode/ArrayProfile.cpp:
  20316. (JSC::arrayModesToString):
  20317. (JSC):
  20318. * bytecode/ArrayProfile.h:
  20319. (JSC):
  20320. (JSC::mergeArrayModes):
  20321. (JSC::arrayModesAlreadyChecked):
  20322. * bytecode/StructureSet.h:
  20323. (JSC::StructureSet::arrayModesFromStructures):
  20324. (StructureSet):
  20325. * dfg/DFGAbstractState.cpp:
  20326. (JSC::DFG::AbstractState::execute):
  20327. * dfg/DFGAbstractValue.h:
  20328. (JSC::DFG::AbstractValue::AbstractValue):
  20329. (JSC::DFG::AbstractValue::clear):
  20330. (JSC::DFG::AbstractValue::isClear):
  20331. (JSC::DFG::AbstractValue::makeTop):
  20332. (JSC::DFG::AbstractValue::clobberStructures):
  20333. (AbstractValue):
  20334. (JSC::DFG::AbstractValue::setMostSpecific):
  20335. (JSC::DFG::AbstractValue::set):
  20336. (JSC::DFG::AbstractValue::operator==):
  20337. (JSC::DFG::AbstractValue::merge):
  20338. (JSC::DFG::AbstractValue::filter):
  20339. (JSC::DFG::AbstractValue::filterArrayModes):
  20340. (JSC::DFG::AbstractValue::validate):
  20341. (JSC::DFG::AbstractValue::checkConsistency):
  20342. (JSC::DFG::AbstractValue::dump):
  20343. (JSC::DFG::AbstractValue::clobberArrayModes):
  20344. (JSC::DFG::AbstractValue::clobberArrayModesSlow):
  20345. (JSC::DFG::AbstractValue::setFuturePossibleStructure):
  20346. (JSC::DFG::AbstractValue::filterFuturePossibleStructure):
  20347. * dfg/DFGArrayMode.cpp:
  20348. (JSC::DFG::modeAlreadyChecked):
  20349. * dfg/DFGArrayMode.h:
  20350. (JSC::DFG::arrayModesFor):
  20351. (DFG):
  20352. * dfg/DFGConstantFoldingPhase.cpp:
  20353. (JSC::DFG::ConstantFoldingPhase::foldConstants):
  20354. * dfg/DFGSpeculativeJIT.cpp:
  20355. (JSC::DFG::SpeculativeJIT::arrayify):
  20356. 2012-10-19 Filip Pizlo <fpizlo@apple.com>
  20357. Baseline JIT should not inline array allocations, to make them easier to instrument
  20358. https://bugs.webkit.org/show_bug.cgi?id=99905
  20359. Reviewed by Mark Hahnenberg.
  20360. This will make it easier to instrument array allocations for the purposes of profiling.
  20361. It also allows us to kill off a bunch of code. And, this doesn't appear to hurt
  20362. performance at all. That's expected because these days any hot allocation will end up
  20363. in the DFG JIT, which does inline these allocations.
  20364. * jit/JIT.cpp:
  20365. (JSC::JIT::privateCompileSlowCases):
  20366. * jit/JIT.h:
  20367. (JIT):
  20368. * jit/JITInlineMethods.h:
  20369. (JSC):
  20370. * jit/JITOpcodes.cpp:
  20371. (JSC::JIT::emit_op_new_array):
  20372. 2012-10-19 Oliver Hunt <oliver@apple.com>
  20373. Fix some of the regression cause by the non-local variable reworking
  20374. https://bugs.webkit.org/show_bug.cgi?id=99896
  20375. Reviewed by Filip Pizlo.
  20376. The non0local variable reworking led to some of the optimisations performed by
  20377. the bytecode generator being dropped. This in turn put more pressure on the DFG
  20378. optimisations. This exposed a short coming in our double speculation propogation.
  20379. Now we try to distinguish between places where we should SpecDoubleReal vs generic
  20380. SpecDouble.
  20381. * dfg/DFGPredictionPropagationPhase.cpp:
  20382. (PredictionPropagationPhase):
  20383. (JSC::DFG::PredictionPropagationPhase::speculatedDoubleTypeForPrediction):
  20384. (JSC::DFG::PredictionPropagationPhase::speculatedDoubleTypeForPredictions):
  20385. (JSC::DFG::PredictionPropagationPhase::propagate):
  20386. 2012-10-19 Michael Saboff <msaboff@apple.com>
  20387. Lexer should create 8 bit Identifiers for RegularExpressions and ASCII identifiers
  20388. https://bugs.webkit.org/show_bug.cgi?id=99855
  20389. Reviewed by Filip Pizlo.
  20390. Added makeIdentifier helpers that will always make an 8 bit Identifier or make an
  20391. Identifier that is the same size as the template parameter. Used the first in the fast
  20392. path when looking for a JS identifier and the second when scanning regular expressions.
  20393. * parser/Lexer.cpp:
  20394. (JSC::::scanRegExp):
  20395. * parser/Lexer.h:
  20396. (Lexer):
  20397. (JSC::::makeIdentifierSameType):
  20398. (JSC::::makeLCharIdentifier):
  20399. (JSC::::lexExpectIdentifier):
  20400. 2012-10-19 Mark Lam <mark.lam@apple.com>
  20401. Added WTF::StackStats mechanism.
  20402. https://bugs.webkit.org/show_bug.cgi?id=99805.
  20403. Reviewed by Geoffrey Garen.
  20404. Added StackStats checkpoints and probes.
  20405. * bytecompiler/BytecodeGenerator.h:
  20406. (JSC::BytecodeGenerator::emitNode):
  20407. (JSC::BytecodeGenerator::emitNodeInConditionContext):
  20408. * heap/SlotVisitor.cpp:
  20409. (JSC::SlotVisitor::append):
  20410. (JSC::visitChildren):
  20411. (JSC::SlotVisitor::donateKnownParallel):
  20412. (JSC::SlotVisitor::drain):
  20413. (JSC::SlotVisitor::drainFromShared):
  20414. (JSC::SlotVisitor::mergeOpaqueRoots):
  20415. (JSC::SlotVisitor::internalAppend):
  20416. (JSC::SlotVisitor::harvestWeakReferences):
  20417. (JSC::SlotVisitor::finalizeUnconditionalFinalizers):
  20418. * interpreter/Interpreter.cpp:
  20419. (JSC::Interpreter::execute):
  20420. (JSC::Interpreter::executeCall):
  20421. (JSC::Interpreter::executeConstruct):
  20422. (JSC::Interpreter::prepareForRepeatCall):
  20423. * parser/Parser.h:
  20424. (JSC::Parser::canRecurse):
  20425. * runtime/StringRecursionChecker.h:
  20426. (StringRecursionChecker):
  20427. 2012-10-19 Oliver Hunt <oliver@apple.com>
  20428. REGRESSION(r131822): It made 500+ tests crash on 32 bit platforms
  20429. https://bugs.webkit.org/show_bug.cgi?id=99814
  20430. Reviewed by Filip Pizlo.
  20431. Call the correct macro in 32bit.
  20432. * llint/LowLevelInterpreter.asm:
  20433. 2012-10-19 Dongwoo Joshua Im <dw.im@samsung.com>
  20434. Rename ENABLE_CSS3_TEXT_DECORATION to ENABLE_CSS3_TEXT
  20435. https://bugs.webkit.org/show_bug.cgi?id=99804
  20436. Reviewed by Julien Chaffraix.
  20437. CSS3 text related properties will be implemented under this flag,
  20438. including text decoration, text-align-last, and text-justify.
  20439. * Configurations/FeatureDefines.xcconfig:
  20440. 2012-10-18 Anders Carlsson <andersca@apple.com>
  20441. Clean up RegExpKey
  20442. https://bugs.webkit.org/show_bug.cgi?id=99798
  20443. Reviewed by Darin Adler.
  20444. RegExpHash doesn't need to be a class template specialization when the class template is specialized
  20445. for JSC::RegExpKey only. Make it a nested class of RegExp instead. Also, make operator== a friend function
  20446. so Hash::equal can see it.
  20447. * runtime/RegExpKey.h:
  20448. (JSC::RegExpKey::RegExpKey):
  20449. (JSC::RegExpKey::operator==):
  20450. (RegExpKey):
  20451. (JSC::RegExpKey::Hash::hash):
  20452. (JSC::RegExpKey::Hash::equal):
  20453. (Hash):
  20454. 2012-10-19 Mark Lam <mark.lam@apple.com>
  20455. Bot greening: Follow up to r131877 to fix the Windows build.
  20456. https://bugs.webkit.org/show_bug.cgi?id=99739.
  20457. Not reviewed.
  20458. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  20459. 2012-10-19 Mark Lam <mark.lam@apple.com>
  20460. Bot greening: Attempt to fix broken Window build after r131836.
  20461. https://bugs.webkit.org/show_bug.cgi?id=99739.
  20462. Not reviewed.
  20463. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  20464. 2012-10-19 Yuqiang Xian <yuqiang.xian@intel.com>
  20465. Unreviewed fix after r131868.
  20466. On JSVALUE64 platforms, JSValue constants can be Imm64 instead of ImmPtr for JIT compilers.
  20467. * dfg/DFGOSRExitCompiler64.cpp:
  20468. (JSC::DFG::OSRExitCompiler::compileExit):
  20469. 2012-10-18 Filip Pizlo <fpizlo@apple.com>
  20470. Baseline array profiling should be less accurate, and DFG OSR exit should update array profiles on CheckArray and CheckStructure failure
  20471. https://bugs.webkit.org/show_bug.cgi?id=99261
  20472. Reviewed by Oliver Hunt.
  20473. This makes array profiling stochastic, like value profiling. The point is to avoid
  20474. noticing one-off indexing types that we'll never see again, but instead to:
  20475. Notice the big ones: We want the DFG to compile based on the things that happen with
  20476. high probability. So, this change makes array profiling do like value profiling and
  20477. only notice a random subsampling of indexing types that flowed through an array
  20478. access. Prior to this patch array profiles noticed all indexing types and weighted
  20479. them identically.
  20480. Bias the recent: Often an array access will see awkward indexing types during the
  20481. first handful of executions because of artifacts of program startup. So, we want to
  20482. bias towards the indexing types that we saw most recently. With this change, array
  20483. profiling does like value profiling and usually tells use a random sampling that
  20484. is biased to what happened recently.
  20485. Have a backup plan: The above two things don't work by themselves because our
  20486. randomness is not that random (nor do we care enough to make it more random), and
  20487. because some procedures will have a <1/10 probability event that we must handle
  20488. without bailing because it dominates a hot loop. So, like value profiling, this
  20489. patch makes array profiling use OSR exits to tell us why we are bailing out, so
  20490. that we don't make the same mistake again in the future.
  20491. This change also makes the way that the 32-bit OSR exit compiler snatches scratch
  20492. registers more uniform. We don't need a scratch buffer when we can push and pop.
  20493. * bytecode/DFGExitProfile.h:
  20494. * dfg/DFGOSRExitCompiler32_64.cpp:
  20495. (JSC::DFG::OSRExitCompiler::compileExit):
  20496. * dfg/DFGOSRExitCompiler64.cpp:
  20497. (JSC::DFG::OSRExitCompiler::compileExit):
  20498. * dfg/DFGSpeculativeJIT.cpp:
  20499. (JSC::DFG::SpeculativeJIT::checkArray):
  20500. (JSC::DFG::SpeculativeJIT::arrayify):
  20501. * dfg/DFGSpeculativeJIT32_64.cpp:
  20502. (JSC::DFG::SpeculativeJIT::compile):
  20503. * dfg/DFGSpeculativeJIT64.cpp:
  20504. (JSC::DFG::SpeculativeJIT::compile):
  20505. * jit/JITInlineMethods.h:
  20506. (JSC::JIT::emitArrayProfilingSite):
  20507. * llint/LowLevelInterpreter.asm:
  20508. 2012-10-18 Yuqiang Xian <yuqiang.xian@intel.com>
  20509. [Qt] REGRESSION(r131858): It broke the ARM build
  20510. https://bugs.webkit.org/show_bug.cgi?id=99809
  20511. Reviewed by Csaba Osztrogonác.
  20512. * dfg/DFGCCallHelpers.h:
  20513. (CCallHelpers):
  20514. (JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
  20515. 2012-10-18 Yuqiang Xian <yuqiang.xian@intel.com>
  20516. Refactor MacroAssembler interfaces to differentiate the pointer operands from the 64-bit integer operands
  20517. https://bugs.webkit.org/show_bug.cgi?id=99154
  20518. Reviewed by Gavin Barraclough.
  20519. In current JavaScriptCore implementation for JSVALUE64 platform (i.e.,
  20520. the X64 platform), we assume that the JSValue size is same to the
  20521. pointer size, and thus EncodedJSValue is simply type defined as a
  20522. "void*". In the JIT compiler, we also take this assumption and invoke
  20523. the same macro assembler interfaces for both JSValue and pointer
  20524. operands. We need to differentiate the operations on pointers from the
  20525. operations on JSValues, and let them invoking different macro
  20526. assembler interfaces. For example, we now use the interface of
  20527. "loadPtr" to load either a pointer or a JSValue, and we need to switch
  20528. to using "loadPtr" to load a pointer and some new "load64" interface
  20529. to load a JSValue. This would help us supporting other JSVALUE64
  20530. platforms where pointer size is not necessarily 64-bits, for example
  20531. x32 (bug #99153).
  20532. The major modification I made is to introduce the "*64" interfaces in
  20533. the MacroAssembler for those operations on JSValues, keep the "*Ptr"
  20534. interfaces for those operations on real pointers, and go through all
  20535. the JIT compiler code to correct the usage.
  20536. This is the second part of the work, i.e, to correct the usage of the
  20537. new MacroAssembler interfaces in the JIT compilers, which also means
  20538. that now EncodedJSValue is defined as a 64-bit integer, and the "*64"
  20539. interfaces are used for it.
  20540. * assembler/MacroAssembler.h: JSValue immediates should be in Imm64 instead of ImmPtr.
  20541. (MacroAssembler):
  20542. (JSC::MacroAssembler::shouldBlind):
  20543. * dfg/DFGAssemblyHelpers.cpp: Correct the JIT compilers usage of the new interfaces.
  20544. (JSC::DFG::AssemblyHelpers::jitAssertIsInt32):
  20545. (JSC::DFG::AssemblyHelpers::jitAssertIsJSInt32):
  20546. (JSC::DFG::AssemblyHelpers::jitAssertIsJSNumber):
  20547. (JSC::DFG::AssemblyHelpers::jitAssertIsJSDouble):
  20548. (JSC::DFG::AssemblyHelpers::jitAssertIsCell):
  20549. * dfg/DFGAssemblyHelpers.h:
  20550. (JSC::DFG::AssemblyHelpers::emitPutToCallFrameHeader):
  20551. (JSC::DFG::AssemblyHelpers::branchIfNotCell):
  20552. (JSC::DFG::AssemblyHelpers::debugCall):
  20553. (JSC::DFG::AssemblyHelpers::boxDouble):
  20554. (JSC::DFG::AssemblyHelpers::unboxDouble):
  20555. (JSC::DFG::AssemblyHelpers::emitExceptionCheck):
  20556. * dfg/DFGCCallHelpers.h:
  20557. (JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
  20558. (CCallHelpers):
  20559. * dfg/DFGOSRExitCompiler64.cpp:
  20560. (JSC::DFG::OSRExitCompiler::compileExit):
  20561. * dfg/DFGRepatch.cpp:
  20562. (JSC::DFG::generateProtoChainAccessStub):
  20563. (JSC::DFG::tryCacheGetByID):
  20564. (JSC::DFG::tryBuildGetByIDList):
  20565. (JSC::DFG::emitPutReplaceStub):
  20566. (JSC::DFG::emitPutTransitionStub):
  20567. * dfg/DFGScratchRegisterAllocator.h:
  20568. (JSC::DFG::ScratchRegisterAllocator::preserveUsedRegistersToScratchBuffer):
  20569. (JSC::DFG::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBuffer):
  20570. * dfg/DFGSilentRegisterSavePlan.h:
  20571. * dfg/DFGSpeculativeJIT.cpp:
  20572. (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
  20573. (JSC::DFG::SpeculativeJIT::compileValueToInt32):
  20574. (JSC::DFG::SpeculativeJIT::compileInt32ToDouble):
  20575. (JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
  20576. (JSC::DFG::SpeculativeJIT::compileInstanceOf):
  20577. (JSC::DFG::SpeculativeJIT::compileStrictEqForConstant):
  20578. (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments):
  20579. * dfg/DFGSpeculativeJIT.h:
  20580. (SpeculativeJIT):
  20581. (JSC::DFG::SpeculativeJIT::silentSavePlanForGPR):
  20582. (JSC::DFG::SpeculativeJIT::silentSpill):
  20583. (JSC::DFG::SpeculativeJIT::silentFill):
  20584. (JSC::DFG::SpeculativeJIT::spill):
  20585. (JSC::DFG::SpeculativeJIT::valueOfJSConstantAsImm64):
  20586. (JSC::DFG::SpeculativeJIT::callOperation):
  20587. (JSC::DFG::SpeculativeJIT::branch64):
  20588. * dfg/DFGSpeculativeJIT64.cpp:
  20589. (JSC::DFG::SpeculativeJIT::fillInteger):
  20590. (JSC::DFG::SpeculativeJIT::fillDouble):
  20591. (JSC::DFG::SpeculativeJIT::fillJSValue):
  20592. (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
  20593. (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
  20594. (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
  20595. (JSC::DFG::SpeculativeJIT::cachedGetById):
  20596. (JSC::DFG::SpeculativeJIT::cachedPutById):
  20597. (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
  20598. (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
  20599. (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
  20600. (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
  20601. (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
  20602. (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
  20603. (JSC::DFG::SpeculativeJIT::emitCall):
  20604. (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
  20605. (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
  20606. (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
  20607. (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
  20608. (JSC::DFG::SpeculativeJIT::convertToDouble):
  20609. (JSC::DFG::SpeculativeJIT::compileObjectEquality):
  20610. (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
  20611. (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
  20612. (JSC::DFG::SpeculativeJIT::compileDoubleCompare):
  20613. (JSC::DFG::SpeculativeJIT::compileNonStringCellOrOtherLogicalNot):
  20614. (JSC::DFG::SpeculativeJIT::compileLogicalNot):
  20615. (JSC::DFG::SpeculativeJIT::emitNonStringCellOrOtherBranch):
  20616. (JSC::DFG::SpeculativeJIT::emitBranch):
  20617. (JSC::DFG::SpeculativeJIT::compileContiguousGetByVal):
  20618. (JSC::DFG::SpeculativeJIT::compileArrayStorageGetByVal):
  20619. (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
  20620. (JSC::DFG::SpeculativeJIT::compileArrayStoragePutByVal):
  20621. (JSC::DFG::SpeculativeJIT::compile):
  20622. * dfg/DFGThunks.cpp:
  20623. (JSC::DFG::osrExitGenerationThunkGenerator):
  20624. (JSC::DFG::throwExceptionFromCallSlowPathGenerator):
  20625. (JSC::DFG::slowPathFor):
  20626. (JSC::DFG::virtualForThunkGenerator):
  20627. * interpreter/Interpreter.cpp:
  20628. (JSC::Interpreter::dumpRegisters):
  20629. * jit/JIT.cpp:
  20630. (JSC::JIT::privateCompile):
  20631. * jit/JIT.h:
  20632. (JIT):
  20633. * jit/JITArithmetic.cpp:
  20634. (JSC::JIT::emit_op_negate):
  20635. (JSC::JIT::emitSlow_op_negate):
  20636. (JSC::JIT::emit_op_rshift):
  20637. (JSC::JIT::emitSlow_op_urshift):
  20638. (JSC::JIT::emit_compareAndJumpSlow):
  20639. (JSC::JIT::emit_op_bitand):
  20640. (JSC::JIT::compileBinaryArithOpSlowCase):
  20641. (JSC::JIT::emit_op_div):
  20642. * jit/JITCall.cpp:
  20643. (JSC::JIT::compileLoadVarargs):
  20644. (JSC::JIT::compileCallEval):
  20645. (JSC::JIT::compileCallEvalSlowCase):
  20646. (JSC::JIT::compileOpCall):
  20647. * jit/JITInlineMethods.h: Have some clean-up work as well.
  20648. (JSC):
  20649. (JSC::JIT::emitPutCellToCallFrameHeader):
  20650. (JSC::JIT::emitPutIntToCallFrameHeader):
  20651. (JSC::JIT::emitPutToCallFrameHeader):
  20652. (JSC::JIT::emitGetFromCallFrameHeader32):
  20653. (JSC::JIT::emitGetFromCallFrameHeader64):
  20654. (JSC::JIT::emitAllocateJSArray):
  20655. (JSC::JIT::emitValueProfilingSite):
  20656. (JSC::JIT::emitGetJITStubArg):
  20657. (JSC::JIT::emitGetVirtualRegister):
  20658. (JSC::JIT::emitPutVirtualRegister):
  20659. (JSC::JIT::emitInitRegister):
  20660. (JSC::JIT::emitJumpIfJSCell):
  20661. (JSC::JIT::emitJumpIfBothJSCells):
  20662. (JSC::JIT::emitJumpIfNotJSCell):
  20663. (JSC::JIT::emitLoadInt32ToDouble):
  20664. (JSC::JIT::emitJumpIfImmediateInteger):
  20665. (JSC::JIT::emitJumpIfNotImmediateInteger):
  20666. (JSC::JIT::emitJumpIfNotImmediateIntegers):
  20667. (JSC::JIT::emitFastArithReTagImmediate):
  20668. (JSC::JIT::emitFastArithIntToImmNoCheck):
  20669. * jit/JITOpcodes.cpp:
  20670. (JSC::JIT::privateCompileCTINativeCall):
  20671. (JSC::JIT::emit_op_mov):
  20672. (JSC::JIT::emit_op_instanceof):
  20673. (JSC::JIT::emit_op_is_undefined):
  20674. (JSC::JIT::emit_op_is_boolean):
  20675. (JSC::JIT::emit_op_is_number):
  20676. (JSC::JIT::emit_op_tear_off_activation):
  20677. (JSC::JIT::emit_op_not):
  20678. (JSC::JIT::emit_op_jfalse):
  20679. (JSC::JIT::emit_op_jeq_null):
  20680. (JSC::JIT::emit_op_jneq_null):
  20681. (JSC::JIT::emit_op_jtrue):
  20682. (JSC::JIT::emit_op_bitxor):
  20683. (JSC::JIT::emit_op_bitor):
  20684. (JSC::JIT::emit_op_get_pnames):
  20685. (JSC::JIT::emit_op_next_pname):
  20686. (JSC::JIT::compileOpStrictEq):
  20687. (JSC::JIT::emit_op_catch):
  20688. (JSC::JIT::emit_op_throw_static_error):
  20689. (JSC::JIT::emit_op_eq_null):
  20690. (JSC::JIT::emit_op_neq_null):
  20691. (JSC::JIT::emit_op_create_activation):
  20692. (JSC::JIT::emit_op_create_arguments):
  20693. (JSC::JIT::emit_op_init_lazy_reg):
  20694. (JSC::JIT::emitSlow_op_convert_this):
  20695. (JSC::JIT::emitSlow_op_not):
  20696. (JSC::JIT::emit_op_get_argument_by_val):
  20697. (JSC::JIT::emit_op_put_to_base):
  20698. (JSC::JIT::emit_resolve_operations):
  20699. * jit/JITPropertyAccess.cpp:
  20700. (JSC::JIT::emit_op_get_by_val):
  20701. (JSC::JIT::emitContiguousGetByVal):
  20702. (JSC::JIT::emitArrayStorageGetByVal):
  20703. (JSC::JIT::emitSlow_op_get_by_val):
  20704. (JSC::JIT::compileGetDirectOffset):
  20705. (JSC::JIT::emit_op_get_by_pname):
  20706. (JSC::JIT::emitContiguousPutByVal):
  20707. (JSC::JIT::emitArrayStoragePutByVal):
  20708. (JSC::JIT::compileGetByIdHotPath):
  20709. (JSC::JIT::emit_op_put_by_id):
  20710. (JSC::JIT::compilePutDirectOffset):
  20711. (JSC::JIT::emit_op_init_global_const):
  20712. (JSC::JIT::emit_op_init_global_const_check):
  20713. (JSC::JIT::emitIntTypedArrayGetByVal):
  20714. (JSC::JIT::emitFloatTypedArrayGetByVal):
  20715. (JSC::JIT::emitFloatTypedArrayPutByVal):
  20716. * jit/JITStubCall.h:
  20717. (JITStubCall):
  20718. (JSC::JITStubCall::JITStubCall):
  20719. (JSC::JITStubCall::addArgument):
  20720. (JSC::JITStubCall::call):
  20721. (JSC::JITStubCall::callWithValueProfiling):
  20722. * jit/JSInterfaceJIT.h:
  20723. (JSC::JSInterfaceJIT::emitJumpIfImmediateNumber):
  20724. (JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber):
  20725. (JSC::JSInterfaceJIT::emitLoadJSCell):
  20726. (JSC::JSInterfaceJIT::emitLoadInt32):
  20727. (JSC::JSInterfaceJIT::emitLoadDouble):
  20728. * jit/SpecializedThunkJIT.h:
  20729. (JSC::SpecializedThunkJIT::returnDouble):
  20730. (JSC::SpecializedThunkJIT::tagReturnAsInt32):
  20731. * runtime/JSValue.cpp:
  20732. (JSC::JSValue::description):
  20733. * runtime/JSValue.h: Define JSVALUE64 EncodedJSValue as int64_t, which is also unified with JSVALUE32_64.
  20734. (JSC):
  20735. * runtime/JSValueInlineMethods.h: New implementation of some JSValue methods to make them more conformant
  20736. with the new rule that "JSValue is a 64-bit integer rather than a pointer" for JSVALUE64 platforms.
  20737. (JSC):
  20738. (JSC::JSValue::JSValue):
  20739. (JSC::JSValue::operator bool):
  20740. (JSC::JSValue::operator==):
  20741. (JSC::JSValue::operator!=):
  20742. (JSC::reinterpretDoubleToInt64):
  20743. (JSC::reinterpretInt64ToDouble):
  20744. (JSC::JSValue::asDouble):
  20745. 2012-10-18 Michael Saboff <msaboff@apple.com>
  20746. convertUTF8ToUTF16() Should Check for ASCII Input
  20747. ihttps://bugs.webkit.org/show_bug.cgi?id=99739
  20748. Reviewed by Geoffrey Garen.
  20749. Using the updated convertUTF8ToUTF16() , we can determine if is makes more sense to
  20750. create a string using the 8 bit source. Added a new OpaqueJSString::create(LChar*, unsigned).
  20751. Had to add a cast n JSStringCreateWithCFString to differentiate which create() to call.
  20752. * API/JSStringRef.cpp:
  20753. (JSStringCreateWithUTF8CString):
  20754. * API/JSStringRefCF.cpp:
  20755. (JSStringCreateWithCFString):
  20756. * API/OpaqueJSString.h:
  20757. (OpaqueJSString::create):
  20758. (OpaqueJSString):
  20759. (OpaqueJSString::OpaqueJSString):
  20760. 2012-10-18 Oliver Hunt <oliver@apple.com>
  20761. Unbreak jsc tests. Last minute "clever"-ness is clearly just not
  20762. a good plan.
  20763. * dfg/DFGByteCodeParser.cpp:
  20764. (JSC::DFG::ByteCodeParser::parseBlock):
  20765. 2012-10-18 Oliver Hunt <oliver@apple.com>
  20766. Bytecode should not have responsibility for determining how to perform non-local resolves
  20767. https://bugs.webkit.org/show_bug.cgi?id=99349
  20768. Reviewed by Gavin Barraclough.
  20769. This patch removes lexical analysis from the bytecode generation. This allows
  20770. us to delay lookup of a non-local variables until the lookup is actually necessary,
  20771. and simplifies a lot of the resolve logic in BytecodeGenerator.
  20772. Once a lookup is performed we cache the lookup information in a set of out-of-line
  20773. buffers in CodeBlock. This allows subsequent lookups to avoid unnecessary hashing,
  20774. etc, and allows the respective JITs to recreated optimal lookup code.
  20775. This is currently still a performance regression in LLInt, but most of the remaining
  20776. regression is caused by a lot of indirection that I'll remove in future work, as well
  20777. as some work necessary to allow LLInt to perform in line instruction repatching.
  20778. We will also want to improve the behaviour of the baseline JIT for some of the lookup
  20779. operations, however this patch was getting quite large already so I'm landing it now
  20780. that we've reached the bar of "performance-neutral".
  20781. Basic browsing seems to work.
  20782. * GNUmakefile.list.am:
  20783. * JavaScriptCore.xcodeproj/project.pbxproj:
  20784. * bytecode/CodeBlock.cpp:
  20785. (JSC::CodeBlock::printStructures):
  20786. (JSC::CodeBlock::dump):
  20787. (JSC::CodeBlock::CodeBlock):
  20788. (JSC::CodeBlock::visitStructures):
  20789. (JSC):
  20790. (JSC::CodeBlock::finalizeUnconditionally):
  20791. (JSC::CodeBlock::shrinkToFit):
  20792. * bytecode/CodeBlock.h:
  20793. (JSC::CodeBlock::addResolve):
  20794. (JSC::CodeBlock::addPutToBase):
  20795. (CodeBlock):
  20796. (JSC::CodeBlock::resolveOperations):
  20797. (JSC::CodeBlock::putToBaseOperation):
  20798. (JSC::CodeBlock::numberOfResolveOperations):
  20799. (JSC::CodeBlock::numberOfPutToBaseOperations):
  20800. (JSC::CodeBlock::addPropertyAccessInstruction):
  20801. (JSC::CodeBlock::globalObjectConstant):
  20802. (JSC::CodeBlock::setGlobalObjectConstant):
  20803. * bytecode/Opcode.h:
  20804. (JSC):
  20805. (JSC::padOpcodeName):
  20806. * bytecode/ResolveGlobalStatus.cpp:
  20807. (JSC::computeForStructure):
  20808. (JSC::ResolveGlobalStatus::computeFor):
  20809. * bytecode/ResolveGlobalStatus.h:
  20810. (JSC):
  20811. (ResolveGlobalStatus):
  20812. * bytecompiler/BytecodeGenerator.cpp:
  20813. (JSC::ResolveResult::checkValidity):
  20814. (JSC):
  20815. (JSC::BytecodeGenerator::BytecodeGenerator):
  20816. (JSC::BytecodeGenerator::resolve):
  20817. (JSC::BytecodeGenerator::resolveConstDecl):
  20818. (JSC::BytecodeGenerator::shouldAvoidResolveGlobal):
  20819. (JSC::BytecodeGenerator::emitResolve):
  20820. (JSC::BytecodeGenerator::emitResolveBase):
  20821. (JSC::BytecodeGenerator::emitResolveBaseForPut):
  20822. (JSC::BytecodeGenerator::emitResolveWithBaseForPut):
  20823. (JSC::BytecodeGenerator::emitResolveWithThis):
  20824. (JSC::BytecodeGenerator::emitGetLocalVar):
  20825. (JSC::BytecodeGenerator::emitInitGlobalConst):
  20826. (JSC::BytecodeGenerator::emitPutToBase):
  20827. * bytecompiler/BytecodeGenerator.h:
  20828. (JSC::ResolveResult::registerResolve):
  20829. (JSC::ResolveResult::dynamicResolve):
  20830. (ResolveResult):
  20831. (JSC::ResolveResult::ResolveResult):
  20832. (JSC):
  20833. (NonlocalResolveInfo):
  20834. (JSC::NonlocalResolveInfo::NonlocalResolveInfo):
  20835. (JSC::NonlocalResolveInfo::~NonlocalResolveInfo):
  20836. (JSC::NonlocalResolveInfo::resolved):
  20837. (JSC::NonlocalResolveInfo::put):
  20838. (BytecodeGenerator):
  20839. (JSC::BytecodeGenerator::getResolveOperations):
  20840. (JSC::BytecodeGenerator::getResolveWithThisOperations):
  20841. (JSC::BytecodeGenerator::getResolveBaseOperations):
  20842. (JSC::BytecodeGenerator::getResolveBaseForPutOperations):
  20843. (JSC::BytecodeGenerator::getResolveWithBaseForPutOperations):
  20844. (JSC::BytecodeGenerator::getPutToBaseOperation):
  20845. * bytecompiler/NodesCodegen.cpp:
  20846. (JSC::ResolveNode::isPure):
  20847. (JSC::FunctionCallResolveNode::emitBytecode):
  20848. (JSC::PostfixNode::emitResolve):
  20849. (JSC::PrefixNode::emitResolve):
  20850. (JSC::ReadModifyResolveNode::emitBytecode):
  20851. (JSC::AssignResolveNode::emitBytecode):
  20852. (JSC::ConstDeclNode::emitCodeSingle):
  20853. (JSC::ForInNode::emitBytecode):
  20854. * dfg/DFGAbstractState.cpp:
  20855. (JSC::DFG::AbstractState::execute):
  20856. * dfg/DFGByteCodeParser.cpp:
  20857. (ByteCodeParser):
  20858. (InlineStackEntry):
  20859. (JSC::DFG::ByteCodeParser::handleGetByOffset):
  20860. (DFG):
  20861. (JSC::DFG::ByteCodeParser::parseResolveOperations):
  20862. (JSC::DFG::ByteCodeParser::parseBlock):
  20863. (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
  20864. * dfg/DFGCapabilities.h:
  20865. (JSC::DFG::canInlineResolveOperations):
  20866. (DFG):
  20867. (JSC::DFG::canCompileOpcode):
  20868. (JSC::DFG::canInlineOpcode):
  20869. * dfg/DFGGraph.h:
  20870. (ResolveGlobalData):
  20871. (ResolveOperationData):
  20872. (DFG):
  20873. (PutToBaseOperationData):
  20874. (Graph):
  20875. * dfg/DFGNode.h:
  20876. (JSC::DFG::Node::hasIdentifier):
  20877. (JSC::DFG::Node::resolveOperationsDataIndex):
  20878. (Node):
  20879. * dfg/DFGNodeType.h:
  20880. (DFG):
  20881. * dfg/DFGOSRExit.cpp:
  20882. (JSC::DFG::OSRExit::OSRExit):
  20883. * dfg/DFGOSRExit.h:
  20884. (OSRExit):
  20885. * dfg/DFGOSRExitCompiler.cpp:
  20886. * dfg/DFGOSRExitCompiler32_64.cpp:
  20887. (JSC::DFG::OSRExitCompiler::compileExit):
  20888. * dfg/DFGOSRExitCompiler64.cpp:
  20889. (JSC::DFG::OSRExitCompiler::compileExit):
  20890. * dfg/DFGOperations.cpp:
  20891. * dfg/DFGOperations.h:
  20892. * dfg/DFGPredictionPropagationPhase.cpp:
  20893. (JSC::DFG::PredictionPropagationPhase::propagate):
  20894. * dfg/DFGRepatch.cpp:
  20895. (JSC::DFG::tryCacheGetByID):
  20896. * dfg/DFGSpeculativeJIT.cpp:
  20897. (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
  20898. * dfg/DFGSpeculativeJIT.h:
  20899. (JSC::DFG::SpeculativeJIT::resolveOperations):
  20900. (SpeculativeJIT):
  20901. (JSC::DFG::SpeculativeJIT::putToBaseOperation):
  20902. (JSC::DFG::SpeculativeJIT::callOperation):
  20903. * dfg/DFGSpeculativeJIT32_64.cpp:
  20904. (JSC::DFG::SpeculativeJIT::compile):
  20905. * dfg/DFGSpeculativeJIT64.cpp:
  20906. (JSC::DFG::SpeculativeJIT::compile):
  20907. * dfg/DFGStructureCheckHoistingPhase.cpp:
  20908. (JSC::DFG::StructureCheckHoistingPhase::run):
  20909. * jit/JIT.cpp:
  20910. (JSC::JIT::privateCompileMainPass):
  20911. (JSC::JIT::privateCompileSlowCases):
  20912. * jit/JIT.h:
  20913. (JIT):
  20914. * jit/JITOpcodes.cpp:
  20915. (JSC::JIT::emit_op_put_to_base):
  20916. (JSC):
  20917. (JSC::JIT::emit_resolve_operations):
  20918. (JSC::JIT::emitSlow_link_resolve_operations):
  20919. (JSC::JIT::emit_op_resolve):
  20920. (JSC::JIT::emitSlow_op_resolve):
  20921. (JSC::JIT::emit_op_resolve_base):
  20922. (JSC::JIT::emitSlow_op_resolve_base):
  20923. (JSC::JIT::emit_op_resolve_with_base):
  20924. (JSC::JIT::emitSlow_op_resolve_with_base):
  20925. (JSC::JIT::emit_op_resolve_with_this):
  20926. (JSC::JIT::emitSlow_op_resolve_with_this):
  20927. (JSC::JIT::emitSlow_op_put_to_base):
  20928. * jit/JITOpcodes32_64.cpp:
  20929. (JSC::JIT::emit_op_put_to_base):
  20930. (JSC):
  20931. * jit/JITPropertyAccess.cpp:
  20932. (JSC::JIT::emit_op_init_global_const):
  20933. (JSC::JIT::emit_op_init_global_const_check):
  20934. (JSC::JIT::emitSlow_op_init_global_const_check):
  20935. * jit/JITPropertyAccess32_64.cpp:
  20936. (JSC::JIT::emit_op_init_global_const):
  20937. (JSC::JIT::emit_op_init_global_const_check):
  20938. (JSC::JIT::emitSlow_op_init_global_const_check):
  20939. * jit/JITStubs.cpp:
  20940. (JSC::DEFINE_STUB_FUNCTION):
  20941. (JSC):
  20942. * jit/JITStubs.h:
  20943. * llint/LLIntSlowPaths.cpp:
  20944. (LLInt):
  20945. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  20946. * llint/LLIntSlowPaths.h:
  20947. (LLInt):
  20948. * llint/LowLevelInterpreter.asm:
  20949. * llint/LowLevelInterpreter32_64.asm:
  20950. * llint/LowLevelInterpreter64.asm:
  20951. * runtime/JSScope.cpp:
  20952. (JSC::LookupResult::base):
  20953. (JSC::LookupResult::value):
  20954. (JSC::LookupResult::setBase):
  20955. (JSC::LookupResult::setValue):
  20956. (LookupResult):
  20957. (JSC):
  20958. (JSC::setPutPropertyAccessOffset):
  20959. (JSC::executeResolveOperations):
  20960. (JSC::JSScope::resolveContainingScopeInternal):
  20961. (JSC::JSScope::resolveContainingScope):
  20962. (JSC::JSScope::resolve):
  20963. (JSC::JSScope::resolveBase):
  20964. (JSC::JSScope::resolveWithBase):
  20965. (JSC::JSScope::resolveWithThis):
  20966. (JSC::JSScope::resolvePut):
  20967. (JSC::JSScope::resolveGlobal):
  20968. * runtime/JSScope.h:
  20969. (JSScope):
  20970. * runtime/JSVariableObject.cpp:
  20971. (JSC):
  20972. * runtime/JSVariableObject.h:
  20973. (JSVariableObject):
  20974. * runtime/Structure.h:
  20975. (JSC::Structure::propertyAccessesAreCacheable):
  20976. (Structure):
  20977. 2012-10-18 Mark Hahnenberg <mhahnenberg@apple.com>
  20978. Live oversize copied blocks should count toward overall heap fragmentation
  20979. https://bugs.webkit.org/show_bug.cgi?id=99548
  20980. Reviewed by Filip Pizlo.
  20981. The CopiedSpace uses overall heap fragmentation to determine whether or not it should do any copying.
  20982. Currently it doesn't include live oversize CopiedBlocks in the calculation, but it should. We should
  20983. treat them as 100% utilized, since running a copying phase won't be able to free/compact any of their
  20984. memory. We can also free any dead oversize CopiedBlocks while we're iterating over them, rather than
  20985. iterating over them again at the end of the copying phase.
  20986. * heap/CopiedSpace.cpp:
  20987. (JSC::CopiedSpace::doneFillingBlock):
  20988. (JSC::CopiedSpace::startedCopying):
  20989. (JSC::CopiedSpace::doneCopying): Also removed a branch when iterating over from-space at the end of
  20990. copying. Since we eagerly recycle blocks as soon as they're fully evacuated, we should see no
  20991. unpinned blocks in from-space at the end of copying.
  20992. * heap/CopiedSpaceInlineMethods.h:
  20993. (JSC::CopiedSpace::recycleBorrowedBlock):
  20994. * heap/CopyVisitorInlineMethods.h:
  20995. (JSC::CopyVisitor::checkIfShouldCopy):
  20996. 2012-10-18 Roger Fong <roger_fong@apple.com>
  20997. Unreviewed. Build fix after r131701 and r131777.
  20998. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  20999. 2012-10-18 Mark Hahnenberg <mhahnenberg@apple.com>
  21000. Race condition between GCThread and main thread during copying phase
  21001. https://bugs.webkit.org/show_bug.cgi?id=99641
  21002. Reviewed by Filip Pizlo.
  21003. When a GCThread returns from copyFromShared(), it then calls doneCopying(), which returns
  21004. its borrowed CopiedBlock to the CopiedSpace. This final block allows the CopiedSpace to
  21005. continue and finish the cleanup of the copying phase. However, the GCThread can loop back
  21006. around, see that m_currentPhase is still "Copy", and try to go through the copying phase again.
  21007. This can cause all sorts of issues. To fix this, we should add a cyclic barrier to GCThread::waitForNextPhase().
  21008. * heap/GCThread.cpp:
  21009. (JSC::GCThread::waitForNextPhase): All GCThreads will wait when they finish one iteration until the main thread
  21010. notifies them to move down to the second while loop, where they wait for the next GCPhase to start. They also
  21011. decrement the m_numberOfActiveGCThreads counter as they begin to wait for the next phase and increment it as
  21012. they enter the next phase. This allows the main thread to wait in endCurrentPhase() until all the threads have
  21013. finished the current phase and are waiting on the next phase to begin. Without the counter, there would be
  21014. no way to ensure that every thread was available for each GCPhase.
  21015. (JSC::GCThread::gcThreadMain): We now use the m_phaseLock to synchronize with the main thread when we're being created.
  21016. * heap/GCThreadSharedData.cpp:
  21017. (JSC::GCThreadSharedData::GCThreadSharedData): As we create each GCThread, we increment the m_numberOfActiveGCThreads
  21018. counter. When we are done creating the threads, we wait until they're all waiting for the next GCPhase. This prevents
  21019. us from leaving some GCThreads behind during the first GCPhase, which could hurt us on our very short-running
  21020. benchmarks (e.g. SunSpider).
  21021. (JSC::GCThreadSharedData::~GCThreadSharedData):
  21022. (JSC::GCThreadSharedData::startNextPhase): We atomically swap the two flags, m_gcThreadsShouldWait and m_currentPhase,
  21023. so that if the threads finish very quickly, they will wait until the main thread is ready to end the current phase.
  21024. (JSC::GCThreadSharedData::endCurrentPhase): Here atomically we swap the two flags again to allow the threads to
  21025. advance to waiting on the next GCPhase. We wait until all of the GCThreads have settled into the second wait loop
  21026. before allowing the main thread to continue. This prevents us from leaving one of the GCThreads stuck in the first
  21027. wait loop if we were to call startNextPhase() before it had time to wake up and move on to the second wait loop.
  21028. (JSC):
  21029. (JSC::GCThreadSharedData::didStartMarking): We now use startNextPhase() to properly swap the flags.
  21030. (JSC::GCThreadSharedData::didFinishMarking): Ditto for endCurrentPhase().
  21031. (JSC::GCThreadSharedData::didStartCopying): Ditto.
  21032. (JSC::GCThreadSharedData::didFinishCopying): Ditto.
  21033. * heap/GCThreadSharedData.h:
  21034. (GCThreadSharedData):
  21035. * heap/Heap.cpp:
  21036. (JSC::Heap::copyBackingStores): No reason to use the extra reference.
  21037. 2012-10-18 Pablo Flouret <pablof@motorola.com>
  21038. Implement css3-conditional's @supports rule
  21039. https://bugs.webkit.org/show_bug.cgi?id=86146
  21040. Reviewed by Antti Koivisto.
  21041. * Configurations/FeatureDefines.xcconfig:
  21042. Add an ENABLE_CSS3_CONDITIONAL_RULES flag.
  21043. 2012-10-18 Michael Saboff <msaboff@apple.com>
  21044. Make conversion between JSStringRef and WKStringRef work without character size conversions
  21045. https://bugs.webkit.org/show_bug.cgi?id=99727
  21046. Reviewed by Anders Carlsson.
  21047. Export the string() method for use in WebKit.
  21048. * API/OpaqueJSString.h:
  21049. (OpaqueJSString::string):
  21050. 2012-10-18 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
  21051. [CMake] Avoid unnecessarily running the LLInt generation commands.
  21052. https://bugs.webkit.org/show_bug.cgi?id=99708
  21053. Reviewed by Rob Buis.
  21054. As described in the comments in the change itself, in some cases
  21055. the Ruby generation scripts used when LLInt is on would each be
  21056. run twice in every build even if nothing had changed.
  21057. Fix that by not setting the OBJECT_DEPENDS property of some source
  21058. files to depend on the generated headers; instead, they are now
  21059. just part of the final binaries/libraries which use them.
  21060. * CMakeLists.txt:
  21061. 2012-10-17 Zoltan Horvath <zoltan@webkit.org>
  21062. Remove the JSHeap memory measurement of the PageLoad performacetests since it creates bogus JSGlobalDatas
  21063. https://bugs.webkit.org/show_bug.cgi?id=99609
  21064. Reviewed by Ryosuke Niwa.
  21065. Remove the implementation since it creates bogus JSGlobalDatas in the layout tests.
  21066. * heap/HeapStatistics.cpp:
  21067. (JSC):
  21068. * heap/HeapStatistics.h:
  21069. (HeapStatistics):
  21070. 2012-10-17 Sam Weinig <sam@webkit.org>
  21071. Attempt to fix the build.
  21072. * bytecode/GlobalResolveInfo.h: Copied from bytecode/GlobalResolveInfo.h.
  21073. 2012-10-17 Filip Pizlo <fpizlo@apple.com>
  21074. REGRESSION (r130826 or r130828): Twitter top bar is dysfunctional
  21075. https://bugs.webkit.org/show_bug.cgi?id=99577
  21076. <rdar://problem/12518883>
  21077. Reviewed by Mark Hahnenberg.
  21078. It turns out that it's a good idea to maintain the invariants of your object model, such as that
  21079. elements past publicLength should have the hole value.
  21080. * dfg/DFGGraph.cpp:
  21081. (JSC::DFG::Graph::dump):
  21082. * dfg/DFGSpeculativeJIT32_64.cpp:
  21083. (JSC::DFG::SpeculativeJIT::compile):
  21084. * dfg/DFGSpeculativeJIT64.cpp:
  21085. (JSC::DFG::SpeculativeJIT::compile):
  21086. 2012-10-17 Anders Carlsson <andersca@apple.com>
  21087. Clean up Vector.h
  21088. https://bugs.webkit.org/show_bug.cgi?id=99622
  21089. Reviewed by Benjamin Poulain.
  21090. Fix fallout from removing std::max and std::min using declarations.
  21091. * runtime/StringPrototype.cpp:
  21092. (JSC::jsSpliceSubstrings):
  21093. (JSC::jsSpliceSubstringsWithSeparators):
  21094. (JSC::stringProtoFuncIndexOf):
  21095. * yarr/YarrPattern.cpp:
  21096. (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):
  21097. 2012-10-17 Oliver Hunt <oliver@apple.com>
  21098. Committing new files is so overrated.
  21099. * bytecode/ResolveOperation.h: Added.
  21100. (JSC):
  21101. (JSC::ResolveOperation::getAndReturnScopedVar):
  21102. (JSC::ResolveOperation::checkForDynamicEntriesBeforeGlobalScope):
  21103. (ResolveOperation):
  21104. (JSC::ResolveOperation::getAndReturnGlobalVar):
  21105. (JSC::ResolveOperation::getAndReturnGlobalProperty):
  21106. (JSC::ResolveOperation::resolveFail):
  21107. (JSC::ResolveOperation::skipTopScopeNode):
  21108. (JSC::ResolveOperation::skipScopes):
  21109. (JSC::ResolveOperation::returnGlobalObjectAsBase):
  21110. (JSC::ResolveOperation::setBaseToGlobal):
  21111. (JSC::ResolveOperation::setBaseToUndefined):
  21112. (JSC::ResolveOperation::setBaseToScope):
  21113. (JSC::ResolveOperation::returnScopeAsBase):
  21114. (JSC::PutToBaseOperation::PutToBaseOperation):
  21115. 2012-10-17 Michael Saboff <msaboff@apple.com>
  21116. StringPrototype::jsSpliceSubstringsWithSeparators() doesn't optimally handle 8 bit strings
  21117. https://bugs.webkit.org/show_bug.cgi?id=99230
  21118. Reviewed by Geoffrey Garen.
  21119. Added code to select characters8() or characters16() on the not all 8 bit path for both the
  21120. processing of the source and the separators.
  21121. * runtime/StringPrototype.cpp:
  21122. (JSC::jsSpliceSubstringsWithSeparators):
  21123. 2012-10-17 Filip Pizlo <fpizlo@apple.com>
  21124. Array and object allocations via 'new Object' or 'new Array' should be inlined in bytecode to allow allocation site profiling
  21125. https://bugs.webkit.org/show_bug.cgi?id=99557
  21126. Reviewed by Geoffrey Garen.
  21127. Removed an inaccurate and misleading comment as per Geoff's review. (I forgot
  21128. to make this change as part of http://trac.webkit.org/changeset/131644).
  21129. * bytecompiler/NodesCodegen.cpp:
  21130. (JSC::FunctionCallResolveNode::emitBytecode):
  21131. 2012-10-17 Oliver Hunt <oliver@apple.com>
  21132. Bytecode should not have responsibility for determining how to perform non-local resolves
  21133. https://bugs.webkit.org/show_bug.cgi?id=99349
  21134. Reviewed by Gavin Barraclough.
  21135. This patch removes lexical analysis from the bytecode generation. This allows
  21136. us to delay lookup of a non-local variables until the lookup is actually necessary,
  21137. and simplifies a lot of the resolve logic in BytecodeGenerator.
  21138. Once a lookup is performed we cache the lookup information in a set of out-of-line
  21139. buffers in CodeBlock. This allows subsequent lookups to avoid unnecessary hashing,
  21140. etc, and allows the respective JITs to recreated optimal lookup code.
  21141. This is currently still a performance regression in LLInt, but most of the remaining
  21142. regression is caused by a lot of indirection that I'll remove in future work, as well
  21143. as some work necessary to allow LLInt to perform in line instruction repatching.
  21144. We will also want to improve the behaviour of the baseline JIT for some of the lookup
  21145. operations, however this patch was getting quite large already so I'm landing it now
  21146. that we've reached the bar of "performance-neutral".
  21147. * GNUmakefile.list.am:
  21148. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  21149. * JavaScriptCore.xcodeproj/project.pbxproj:
  21150. * bytecode/CodeBlock.cpp:
  21151. (JSC::CodeBlock::printStructures):
  21152. (JSC::CodeBlock::dump):
  21153. (JSC::CodeBlock::CodeBlock):
  21154. (JSC::CodeBlock::visitStructures):
  21155. (JSC):
  21156. (JSC::CodeBlock::finalizeUnconditionally):
  21157. (JSC::CodeBlock::shrinkToFit):
  21158. * bytecode/CodeBlock.h:
  21159. (JSC::CodeBlock::addResolve):
  21160. (JSC::CodeBlock::addPutToBase):
  21161. (CodeBlock):
  21162. (JSC::CodeBlock::resolveOperations):
  21163. (JSC::CodeBlock::putToBaseOperation):
  21164. (JSC::CodeBlock::numberOfResolveOperations):
  21165. (JSC::CodeBlock::numberOfPutToBaseOperations):
  21166. (JSC::CodeBlock::addPropertyAccessInstruction):
  21167. (JSC::CodeBlock::globalObjectConstant):
  21168. (JSC::CodeBlock::setGlobalObjectConstant):
  21169. * bytecode/GlobalResolveInfo.h: Removed.
  21170. * bytecode/Opcode.h:
  21171. (JSC):
  21172. (JSC::padOpcodeName):
  21173. * bytecode/ResolveGlobalStatus.cpp:
  21174. (JSC::computeForStructure):
  21175. (JSC::ResolveGlobalStatus::computeFor):
  21176. * bytecode/ResolveGlobalStatus.h:
  21177. (JSC):
  21178. (ResolveGlobalStatus):
  21179. * bytecode/ResolveOperation.h: Added.
  21180. The new types and logic we use to perform the cached lookups.
  21181. (JSC):
  21182. (ResolveOperation):
  21183. (JSC::ResolveOperation::getAndReturnScopedVar):
  21184. (JSC::ResolveOperation::checkForDynamicEntriesBeforeGlobalScope):
  21185. (JSC::ResolveOperation::getAndReturnGlobalVar):
  21186. (JSC::ResolveOperation::getAndReturnGlobalProperty):
  21187. (JSC::ResolveOperation::resolveFail):
  21188. (JSC::ResolveOperation::skipTopScopeNode):
  21189. (JSC::ResolveOperation::skipScopes):
  21190. (JSC::ResolveOperation::returnGlobalObjectAsBase):
  21191. (JSC::ResolveOperation::setBaseToGlobal):
  21192. (JSC::ResolveOperation::setBaseToUndefined):
  21193. (JSC::ResolveOperation::setBaseToScope):
  21194. (JSC::ResolveOperation::returnScopeAsBase):
  21195. (JSC::PutToBaseOperation::PutToBaseOperation):
  21196. * bytecompiler/BytecodeGenerator.cpp:
  21197. (JSC::ResolveResult::checkValidity):
  21198. (JSC):
  21199. (JSC::BytecodeGenerator::BytecodeGenerator):
  21200. (JSC::BytecodeGenerator::resolve):
  21201. (JSC::BytecodeGenerator::resolveConstDecl):
  21202. (JSC::BytecodeGenerator::shouldAvoidResolveGlobal):
  21203. (JSC::BytecodeGenerator::emitResolve):
  21204. (JSC::BytecodeGenerator::emitResolveBase):
  21205. (JSC::BytecodeGenerator::emitResolveBaseForPut):
  21206. (JSC::BytecodeGenerator::emitResolveWithBaseForPut):
  21207. (JSC::BytecodeGenerator::emitResolveWithThis):
  21208. (JSC::BytecodeGenerator::emitGetLocalVar):
  21209. (JSC::BytecodeGenerator::emitInitGlobalConst):
  21210. (JSC::BytecodeGenerator::emitPutToBase):
  21211. * bytecompiler/BytecodeGenerator.h:
  21212. (JSC::ResolveResult::registerResolve):
  21213. (JSC::ResolveResult::dynamicResolve):
  21214. (ResolveResult):
  21215. (JSC::ResolveResult::ResolveResult):
  21216. (JSC):
  21217. (NonlocalResolveInfo):
  21218. (JSC::NonlocalResolveInfo::NonlocalResolveInfo):
  21219. (JSC::NonlocalResolveInfo::~NonlocalResolveInfo):
  21220. (JSC::NonlocalResolveInfo::resolved):
  21221. (JSC::NonlocalResolveInfo::put):
  21222. (BytecodeGenerator):
  21223. (JSC::BytecodeGenerator::getResolveOperations):
  21224. (JSC::BytecodeGenerator::getResolveWithThisOperations):
  21225. (JSC::BytecodeGenerator::getResolveBaseOperations):
  21226. (JSC::BytecodeGenerator::getResolveBaseForPutOperations):
  21227. (JSC::BytecodeGenerator::getResolveWithBaseForPutOperations):
  21228. (JSC::BytecodeGenerator::getPutToBaseOperation):
  21229. * bytecompiler/NodesCodegen.cpp:
  21230. (JSC::ResolveNode::isPure):
  21231. (JSC::FunctionCallResolveNode::emitBytecode):
  21232. (JSC::PostfixNode::emitResolve):
  21233. (JSC::PrefixNode::emitResolve):
  21234. (JSC::ReadModifyResolveNode::emitBytecode):
  21235. (JSC::AssignResolveNode::emitBytecode):
  21236. (JSC::ConstDeclNode::emitCodeSingle):
  21237. (JSC::ForInNode::emitBytecode):
  21238. * dfg/DFGAbstractState.cpp:
  21239. (JSC::DFG::AbstractState::execute):
  21240. * dfg/DFGByteCodeParser.cpp:
  21241. (ByteCodeParser):
  21242. (InlineStackEntry):
  21243. (JSC::DFG::ByteCodeParser::handleGetByOffset):
  21244. (DFG):
  21245. (JSC::DFG::ByteCodeParser::parseResolveOperations):
  21246. (JSC::DFG::ByteCodeParser::parseBlock):
  21247. (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
  21248. * dfg/DFGCapabilities.h:
  21249. (JSC::DFG::canCompileResolveOperations):
  21250. (DFG):
  21251. (JSC::DFG::canCompilePutToBaseOperation):
  21252. (JSC::DFG::canCompileOpcode):
  21253. (JSC::DFG::canInlineOpcode):
  21254. * dfg/DFGGraph.h:
  21255. (ResolveGlobalData):
  21256. (ResolveOperationData):
  21257. (DFG):
  21258. (PutToBaseOperationData):
  21259. (Graph):
  21260. * dfg/DFGNode.h:
  21261. (JSC::DFG::Node::hasIdentifier):
  21262. (JSC::DFG::Node::resolveOperationsDataIndex):
  21263. (Node):
  21264. * dfg/DFGNodeType.h:
  21265. (DFG):
  21266. * dfg/DFGOSRExit.cpp:
  21267. (JSC::DFG::OSRExit::OSRExit):
  21268. * dfg/DFGOSRExit.h:
  21269. (OSRExit):
  21270. * dfg/DFGOSRExitCompiler.cpp:
  21271. * dfg/DFGOSRExitCompiler32_64.cpp:
  21272. (JSC::DFG::OSRExitCompiler::compileExit):
  21273. * dfg/DFGOSRExitCompiler64.cpp:
  21274. (JSC::DFG::OSRExitCompiler::compileExit):
  21275. * dfg/DFGOperations.cpp:
  21276. * dfg/DFGOperations.h:
  21277. * dfg/DFGPredictionPropagationPhase.cpp:
  21278. (JSC::DFG::PredictionPropagationPhase::propagate):
  21279. * dfg/DFGRepatch.cpp:
  21280. (JSC::DFG::tryCacheGetByID):
  21281. * dfg/DFGSpeculativeJIT.cpp:
  21282. (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
  21283. * dfg/DFGSpeculativeJIT.h:
  21284. (JSC::DFG::SpeculativeJIT::resolveOperations):
  21285. (SpeculativeJIT):
  21286. (JSC::DFG::SpeculativeJIT::putToBaseOperation):
  21287. (JSC::DFG::SpeculativeJIT::callOperation):
  21288. * dfg/DFGSpeculativeJIT32_64.cpp:
  21289. (JSC::DFG::SpeculativeJIT::compile):
  21290. * dfg/DFGSpeculativeJIT64.cpp:
  21291. (JSC::DFG::SpeculativeJIT::compile):
  21292. * dfg/DFGStructureCheckHoistingPhase.cpp:
  21293. (JSC::DFG::StructureCheckHoistingPhase::run):
  21294. * jit/JIT.cpp:
  21295. (JSC::JIT::privateCompileMainPass):
  21296. (JSC::JIT::privateCompileSlowCases):
  21297. * jit/JIT.h:
  21298. (JIT):
  21299. * jit/JITOpcodes.cpp:
  21300. (JSC::JIT::emit_op_put_to_base):
  21301. (JSC):
  21302. (JSC::JIT::emit_resolve_operations):
  21303. (JSC::JIT::emitSlow_link_resolve_operations):
  21304. (JSC::JIT::emit_op_resolve):
  21305. (JSC::JIT::emitSlow_op_resolve):
  21306. (JSC::JIT::emit_op_resolve_base):
  21307. (JSC::JIT::emitSlow_op_resolve_base):
  21308. (JSC::JIT::emit_op_resolve_with_base):
  21309. (JSC::JIT::emitSlow_op_resolve_with_base):
  21310. (JSC::JIT::emit_op_resolve_with_this):
  21311. (JSC::JIT::emitSlow_op_resolve_with_this):
  21312. (JSC::JIT::emitSlow_op_put_to_base):
  21313. * jit/JITOpcodes32_64.cpp:
  21314. (JSC::JIT::emit_op_put_to_base):
  21315. (JSC):
  21316. * jit/JITPropertyAccess.cpp:
  21317. (JSC::JIT::emit_op_init_global_const):
  21318. (JSC::JIT::emit_op_init_global_const_check):
  21319. (JSC::JIT::emitSlow_op_init_global_const_check):
  21320. * jit/JITPropertyAccess32_64.cpp:
  21321. (JSC::JIT::emit_op_init_global_const):
  21322. (JSC::JIT::emit_op_init_global_const_check):
  21323. (JSC::JIT::emitSlow_op_init_global_const_check):
  21324. * jit/JITStubs.cpp:
  21325. (JSC::DEFINE_STUB_FUNCTION):
  21326. (JSC):
  21327. * jit/JITStubs.h:
  21328. * llint/LLIntSlowPaths.cpp:
  21329. (LLInt):
  21330. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  21331. * llint/LLIntSlowPaths.h:
  21332. (LLInt):
  21333. * llint/LowLevelInterpreter.asm:
  21334. * llint/LowLevelInterpreter32_64.asm:
  21335. * llint/LowLevelInterpreter64.asm:
  21336. * runtime/JSScope.cpp:
  21337. (JSC::LookupResult::base):
  21338. (JSC::LookupResult::value):
  21339. (JSC::LookupResult::setBase):
  21340. (JSC::LookupResult::setValue):
  21341. (LookupResult):
  21342. (JSC):
  21343. (JSC::setPutPropertyAccessOffset):
  21344. (JSC::executeResolveOperations):
  21345. (JSC::JSScope::resolveContainingScopeInternal):
  21346. (JSC::JSScope::resolveContainingScope):
  21347. (JSC::JSScope::resolve):
  21348. (JSC::JSScope::resolveBase):
  21349. (JSC::JSScope::resolveWithBase):
  21350. (JSC::JSScope::resolveWithThis):
  21351. (JSC::JSScope::resolvePut):
  21352. (JSC::JSScope::resolveGlobal):
  21353. * runtime/JSScope.h:
  21354. (JSScope):
  21355. * runtime/JSVariableObject.cpp:
  21356. (JSC):
  21357. * runtime/JSVariableObject.h:
  21358. (JSVariableObject):
  21359. * runtime/Structure.h:
  21360. (JSC::Structure::propertyAccessesAreCacheable):
  21361. (Structure):
  21362. 2012-10-17 Filip Pizlo <fpizlo@apple.com>
  21363. Array and object allocations via 'new Object' or 'new Array' should be inlined in bytecode to allow allocation site profiling
  21364. https://bugs.webkit.org/show_bug.cgi?id=99557
  21365. Reviewed by Geoffrey Garen.
  21366. This uses the old jneq_ptr trick to allow for the bytecode to "see" that the
  21367. operation in question is what we almost certainly know it to be.
  21368. * bytecode/CodeBlock.cpp:
  21369. (JSC::CodeBlock::dump):
  21370. * bytecode/Opcode.h:
  21371. (JSC):
  21372. (JSC::padOpcodeName):
  21373. * bytecode/SpecialPointer.h:
  21374. * bytecompiler/BytecodeGenerator.cpp:
  21375. (JSC::BytecodeGenerator::emitCall):
  21376. (JSC::BytecodeGenerator::emitCallEval):
  21377. (JSC::BytecodeGenerator::expectedFunctionForIdentifier):
  21378. (JSC):
  21379. (JSC::BytecodeGenerator::emitExpectedFunctionSnippet):
  21380. (JSC::BytecodeGenerator::emitConstruct):
  21381. * bytecompiler/BytecodeGenerator.h:
  21382. (BytecodeGenerator):
  21383. * bytecompiler/NodesCodegen.cpp:
  21384. (JSC::NewExprNode::emitBytecode):
  21385. (JSC::FunctionCallValueNode::emitBytecode):
  21386. (JSC::FunctionCallResolveNode::emitBytecode):
  21387. (JSC::FunctionCallBracketNode::emitBytecode):
  21388. (JSC::FunctionCallDotNode::emitBytecode):
  21389. (JSC::CallFunctionCallDotNode::emitBytecode):
  21390. (JSC::ApplyFunctionCallDotNode::emitBytecode):
  21391. * dfg/DFGByteCodeParser.cpp:
  21392. (JSC::DFG::ByteCodeParser::parseBlock):
  21393. * dfg/DFGCapabilities.h:
  21394. (JSC::DFG::canCompileOpcode):
  21395. * jit/JIT.cpp:
  21396. (JSC::JIT::privateCompileMainPass):
  21397. * jit/JIT.h:
  21398. (JIT):
  21399. * jit/JITOpcodes.cpp:
  21400. (JSC::JIT::emit_op_new_array_with_size):
  21401. (JSC):
  21402. * jit/JITStubs.cpp:
  21403. (JSC::DEFINE_STUB_FUNCTION):
  21404. (JSC):
  21405. * jit/JITStubs.h:
  21406. * llint/LLIntSlowPaths.cpp:
  21407. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  21408. (LLInt):
  21409. * llint/LLIntSlowPaths.h:
  21410. (LLInt):
  21411. * llint/LowLevelInterpreter.asm:
  21412. * runtime/ArrayConstructor.cpp:
  21413. (JSC::constructArrayWithSizeQuirk):
  21414. (JSC):
  21415. * runtime/ArrayConstructor.h:
  21416. (JSC):
  21417. * runtime/CommonIdentifiers.h:
  21418. * runtime/JSGlobalObject.cpp:
  21419. (JSC::JSGlobalObject::reset):
  21420. (JSC):
  21421. 2012-10-17 Filip Pizlo <fpizlo@apple.com>
  21422. JIT op_get_by_pname should call cti_get_by_val_generic and not cti_get_by_val
  21423. https://bugs.webkit.org/show_bug.cgi?id=99631
  21424. <rdar://problem/12483221>
  21425. Reviewed by Mark Hahnenberg.
  21426. cti_get_by_val assumes that the return address has patching metadata associated with it, which won't
  21427. be true for op_get_by_pname. cti_get_by_val_generic makes no such assumptions.
  21428. * jit/JITPropertyAccess.cpp:
  21429. (JSC::JIT::emitSlow_op_get_by_pname):
  21430. * jit/JITPropertyAccess32_64.cpp:
  21431. (JSC::JIT::emitSlow_op_get_by_pname):
  21432. 2012-10-17 Mark Hahnenberg <mhahnenberg@apple.com>
  21433. Block freeing thread should sleep indefinitely when there's no work to do
  21434. https://bugs.webkit.org/show_bug.cgi?id=98084
  21435. Reviewed by Geoffrey Garen.
  21436. r130212 didn't fully fix the problem.
  21437. * heap/BlockAllocator.cpp:
  21438. (JSC::BlockAllocator::blockFreeingThreadMain): We would just continue to the next iteration if
  21439. we found that we had zero blocks to copy. We should move the indefinite wait up to where that
  21440. check is done so that we properly detect the "no more blocks to copy, wait for more" condition.
  21441. 2012-10-16 Csaba Osztrogonác <ossy@webkit.org>
  21442. Unreviewed, rolling out r131516 and r131550.
  21443. http://trac.webkit.org/changeset/131516
  21444. http://trac.webkit.org/changeset/131550
  21445. https://bugs.webkit.org/show_bug.cgi?id=99349
  21446. It caused zillion different problem on different platforms
  21447. * GNUmakefile.list.am:
  21448. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  21449. * JavaScriptCore.xcodeproj/project.pbxproj:
  21450. * bytecode/CodeBlock.cpp:
  21451. (JSC):
  21452. (JSC::isGlobalResolve):
  21453. (JSC::instructionOffsetForNth):
  21454. (JSC::printGlobalResolveInfo):
  21455. (JSC::CodeBlock::printStructures):
  21456. (JSC::CodeBlock::dump):
  21457. (JSC::CodeBlock::CodeBlock):
  21458. (JSC::CodeBlock::visitStructures):
  21459. (JSC::CodeBlock::finalizeUnconditionally):
  21460. (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
  21461. (JSC::CodeBlock::globalResolveInfoForBytecodeOffset):
  21462. (JSC::CodeBlock::shrinkToFit):
  21463. * bytecode/CodeBlock.h:
  21464. (CodeBlock):
  21465. (JSC::CodeBlock::addGlobalResolveInstruction):
  21466. (JSC::CodeBlock::addGlobalResolveInfo):
  21467. (JSC::CodeBlock::globalResolveInfo):
  21468. (JSC::CodeBlock::numberOfGlobalResolveInfos):
  21469. (JSC::CodeBlock::globalResolveInfoCount):
  21470. * bytecode/GlobalResolveInfo.h: Copied from Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp.
  21471. (JSC):
  21472. (JSC::GlobalResolveInfo::GlobalResolveInfo):
  21473. (GlobalResolveInfo):
  21474. (JSC::getGlobalResolveInfoBytecodeOffset):
  21475. * bytecode/Opcode.h:
  21476. (JSC):
  21477. (JSC::padOpcodeName):
  21478. * bytecode/ResolveGlobalStatus.cpp:
  21479. (JSC):
  21480. (JSC::computeForStructure):
  21481. (JSC::computeForLLInt):
  21482. (JSC::ResolveGlobalStatus::computeFor):
  21483. * bytecode/ResolveGlobalStatus.h:
  21484. (JSC):
  21485. (ResolveGlobalStatus):
  21486. * bytecode/ResolveOperation.h: Removed.
  21487. * bytecompiler/BytecodeGenerator.cpp:
  21488. (JSC::ResolveResult::checkValidity):
  21489. (JSC::ResolveResult::registerPointer):
  21490. (JSC):
  21491. (JSC::BytecodeGenerator::BytecodeGenerator):
  21492. (JSC::BytecodeGenerator::resolve):
  21493. (JSC::BytecodeGenerator::resolveConstDecl):
  21494. (JSC::BytecodeGenerator::shouldAvoidResolveGlobal):
  21495. (JSC::BytecodeGenerator::emitResolve):
  21496. (JSC::BytecodeGenerator::emitResolveBase):
  21497. (JSC::BytecodeGenerator::emitResolveBaseForPut):
  21498. (JSC::BytecodeGenerator::emitResolveWithBase):
  21499. (JSC::BytecodeGenerator::emitResolveWithThis):
  21500. (JSC::BytecodeGenerator::emitGetStaticVar):
  21501. (JSC::BytecodeGenerator::emitInitGlobalConst):
  21502. (JSC::BytecodeGenerator::emitPutStaticVar):
  21503. * bytecompiler/BytecodeGenerator.h:
  21504. (JSC::ResolveResult::registerResolve):
  21505. (JSC::ResolveResult::dynamicResolve):
  21506. (JSC::ResolveResult::lexicalResolve):
  21507. (JSC::ResolveResult::indexedGlobalResolve):
  21508. (JSC::ResolveResult::dynamicIndexedGlobalResolve):
  21509. (JSC::ResolveResult::globalResolve):
  21510. (JSC::ResolveResult::dynamicGlobalResolve):
  21511. (JSC::ResolveResult::type):
  21512. (JSC::ResolveResult::index):
  21513. (JSC::ResolveResult::depth):
  21514. (JSC::ResolveResult::globalObject):
  21515. (ResolveResult):
  21516. (JSC::ResolveResult::isStatic):
  21517. (JSC::ResolveResult::isIndexed):
  21518. (JSC::ResolveResult::isScoped):
  21519. (JSC::ResolveResult::isGlobal):
  21520. (JSC::ResolveResult::ResolveResult):
  21521. (BytecodeGenerator):
  21522. * bytecompiler/NodesCodegen.cpp:
  21523. (JSC::ResolveNode::isPure):
  21524. (JSC::FunctionCallResolveNode::emitBytecode):
  21525. (JSC::PostfixNode::emitResolve):
  21526. (JSC::PrefixNode::emitResolve):
  21527. (JSC::ReadModifyResolveNode::emitBytecode):
  21528. (JSC::AssignResolveNode::emitBytecode):
  21529. (JSC::ConstDeclNode::emitCodeSingle):
  21530. (JSC::ForInNode::emitBytecode):
  21531. * dfg/DFGAbstractState.cpp:
  21532. (JSC::DFG::AbstractState::execute):
  21533. * dfg/DFGByteCodeParser.cpp:
  21534. (ByteCodeParser):
  21535. (InlineStackEntry):
  21536. (JSC::DFG::ByteCodeParser::handleGetByOffset):
  21537. (JSC::DFG::ByteCodeParser::parseBlock):
  21538. (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
  21539. * dfg/DFGCapabilities.h:
  21540. (JSC::DFG::canCompileOpcode):
  21541. (JSC::DFG::canInlineOpcode):
  21542. * dfg/DFGGraph.h:
  21543. (ResolveGlobalData):
  21544. (DFG):
  21545. (Graph):
  21546. * dfg/DFGNode.h:
  21547. (JSC::DFG::Node::hasIdentifier):
  21548. * dfg/DFGNodeType.h:
  21549. (DFG):
  21550. * dfg/DFGOSRExit.cpp:
  21551. (JSC::DFG::OSRExit::OSRExit):
  21552. * dfg/DFGOSRExit.h:
  21553. (OSRExit):
  21554. * dfg/DFGOSRExitCompiler.cpp:
  21555. * dfg/DFGOSRExitCompiler32_64.cpp:
  21556. (JSC::DFG::OSRExitCompiler::compileExit):
  21557. * dfg/DFGOSRExitCompiler64.cpp:
  21558. (JSC::DFG::OSRExitCompiler::compileExit):
  21559. * dfg/DFGOperations.cpp:
  21560. * dfg/DFGOperations.h:
  21561. (JSC):
  21562. * dfg/DFGPredictionPropagationPhase.cpp:
  21563. (JSC::DFG::PredictionPropagationPhase::propagate):
  21564. * dfg/DFGRepatch.cpp:
  21565. (JSC::DFG::tryCacheGetByID):
  21566. * dfg/DFGSpeculativeJIT.cpp:
  21567. (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
  21568. * dfg/DFGSpeculativeJIT.h:
  21569. (JSC::DFG::SpeculativeJIT::callOperation):
  21570. * dfg/DFGSpeculativeJIT32_64.cpp:
  21571. (JSC::DFG::SpeculativeJIT::compile):
  21572. * dfg/DFGSpeculativeJIT64.cpp:
  21573. (JSC::DFG::SpeculativeJIT::compile):
  21574. * dfg/DFGStructureCheckHoistingPhase.cpp:
  21575. (JSC::DFG::StructureCheckHoistingPhase::run):
  21576. * jit/JIT.cpp:
  21577. (JSC::JIT::privateCompileMainPass):
  21578. (JSC::JIT::privateCompileSlowCases):
  21579. * jit/JIT.h:
  21580. (JIT):
  21581. (JSC::JIT::emit_op_get_global_var_watchable):
  21582. * jit/JITOpcodes.cpp:
  21583. (JSC::JIT::emit_op_resolve):
  21584. (JSC):
  21585. (JSC::JIT::emit_op_resolve_base):
  21586. (JSC::JIT::emit_op_resolve_skip):
  21587. (JSC::JIT::emit_op_resolve_global):
  21588. (JSC::JIT::emitSlow_op_resolve_global):
  21589. (JSC::JIT::emit_op_resolve_with_base):
  21590. (JSC::JIT::emit_op_resolve_with_this):
  21591. (JSC::JIT::emit_op_resolve_global_dynamic):
  21592. (JSC::JIT::emitSlow_op_resolve_global_dynamic):
  21593. * jit/JITOpcodes32_64.cpp:
  21594. (JSC::JIT::emit_op_resolve):
  21595. (JSC):
  21596. (JSC::JIT::emit_op_resolve_base):
  21597. (JSC::JIT::emit_op_resolve_skip):
  21598. (JSC::JIT::emit_op_resolve_global):
  21599. (JSC::JIT::emitSlow_op_resolve_global):
  21600. (JSC::JIT::emit_op_resolve_with_base):
  21601. (JSC::JIT::emit_op_resolve_with_this):
  21602. * jit/JITPropertyAccess.cpp:
  21603. (JSC::JIT::emit_op_get_scoped_var):
  21604. (JSC):
  21605. (JSC::JIT::emit_op_put_scoped_var):
  21606. (JSC::JIT::emit_op_get_global_var):
  21607. (JSC::JIT::emit_op_put_global_var):
  21608. (JSC::JIT::emit_op_put_global_var_check):
  21609. (JSC::JIT::emitSlow_op_put_global_var_check):
  21610. * jit/JITPropertyAccess32_64.cpp:
  21611. (JSC::JIT::emit_op_get_scoped_var):
  21612. (JSC):
  21613. (JSC::JIT::emit_op_put_scoped_var):
  21614. (JSC::JIT::emit_op_get_global_var):
  21615. (JSC::JIT::emit_op_put_global_var):
  21616. (JSC::JIT::emit_op_put_global_var_check):
  21617. (JSC::JIT::emitSlow_op_put_global_var_check):
  21618. * jit/JITStubs.cpp:
  21619. (JSC::DEFINE_STUB_FUNCTION):
  21620. (JSC):
  21621. * jit/JITStubs.h:
  21622. * llint/LLIntSlowPaths.cpp:
  21623. (LLInt):
  21624. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  21625. * llint/LLIntSlowPaths.h:
  21626. (LLInt):
  21627. * llint/LowLevelInterpreter.asm:
  21628. * llint/LowLevelInterpreter32_64.asm:
  21629. * llint/LowLevelInterpreter64.asm:
  21630. * runtime/JSScope.cpp:
  21631. (JSC::JSScope::resolve):
  21632. (JSC::JSScope::resolveSkip):
  21633. (JSC::JSScope::resolveGlobal):
  21634. (JSC::JSScope::resolveGlobalDynamic):
  21635. (JSC::JSScope::resolveBase):
  21636. (JSC::JSScope::resolveWithBase):
  21637. (JSC::JSScope::resolveWithThis):
  21638. * runtime/JSScope.h:
  21639. (JSScope):
  21640. * runtime/JSVariableObject.cpp:
  21641. * runtime/JSVariableObject.h:
  21642. * runtime/Structure.h:
  21643. 2012-10-16 Dongwoo Joshua Im <dw.im@samsung.com>
  21644. [GTK] Fix build break - ResolveOperations.h is not in WebKit.
  21645. https://bugs.webkit.org/show_bug.cgi?id=99538
  21646. Unreviewed build fix.
  21647. There are some files including ResolveOperations.h which is not exist at all.
  21648. * GNUmakefile.list.am: s/ResolveOperations.h/ResolveOperation.h/
  21649. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: s/ResolveOperations.h/ResolveOperation.h/
  21650. 2012-10-16 Jian Li <jianli@chromium.org>
  21651. Rename feature define ENABLE_WIDGET_REGION to ENABLE_DRAGGBALE_REGION
  21652. https://bugs.webkit.org/show_bug.cgi?id=98975
  21653. Reviewed by Adam Barth.
  21654. Renaming is needed to better match with the draggable region code.
  21655. * Configurations/FeatureDefines.xcconfig:
  21656. 2012-10-15 Oliver Hunt <oliver@apple.com>
  21657. Bytecode should not have responsibility for determining how to perform non-local resolves
  21658. https://bugs.webkit.org/show_bug.cgi?id=99349
  21659. Reviewed by Gavin Barraclough.
  21660. This patch removes lexical analysis from the bytecode generation. This allows
  21661. us to delay lookup of a non-local variables until the lookup is actually necessary,
  21662. and simplifies a lot of the resolve logic in BytecodeGenerator.
  21663. Once a lookup is performed we cache the lookup information in a set of out-of-line
  21664. buffers in CodeBlock. This allows subsequent lookups to avoid unnecessary hashing,
  21665. etc, and allows the respective JITs to recreated optimal lookup code.
  21666. This is currently still a performance regression in LLInt, but most of the remaining
  21667. regression is caused by a lot of indirection that I'll remove in future work, as well
  21668. as some work necessary to allow LLInt to perform in line instruction repatching.
  21669. We will also want to improve the behaviour of the baseline JIT for some of the lookup
  21670. operations, however this patch was getting quite large already so I'm landing it now
  21671. that we've reached the bar of "performance-neutral".
  21672. * GNUmakefile.list.am:
  21673. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  21674. * JavaScriptCore.xcodeproj/project.pbxproj:
  21675. * bytecode/CodeBlock.cpp:
  21676. (JSC::CodeBlock::printStructures):
  21677. (JSC::CodeBlock::dump):
  21678. (JSC::CodeBlock::CodeBlock):
  21679. (JSC::CodeBlock::visitStructures):
  21680. (JSC):
  21681. (JSC::CodeBlock::finalizeUnconditionally):
  21682. (JSC::CodeBlock::shrinkToFit):
  21683. * bytecode/CodeBlock.h:
  21684. (JSC::CodeBlock::addResolve):
  21685. (JSC::CodeBlock::addPutToBase):
  21686. (CodeBlock):
  21687. (JSC::CodeBlock::resolveOperations):
  21688. (JSC::CodeBlock::putToBaseOperation):
  21689. (JSC::CodeBlock::numberOfResolveOperations):
  21690. (JSC::CodeBlock::numberOfPutToBaseOperations):
  21691. (JSC::CodeBlock::addPropertyAccessInstruction):
  21692. (JSC::CodeBlock::globalObjectConstant):
  21693. (JSC::CodeBlock::setGlobalObjectConstant):
  21694. * bytecode/GlobalResolveInfo.h: Removed.
  21695. * bytecode/Opcode.h:
  21696. (JSC):
  21697. (JSC::padOpcodeName):
  21698. * bytecode/ResolveGlobalStatus.cpp:
  21699. (JSC::computeForStructure):
  21700. (JSC::ResolveGlobalStatus::computeFor):
  21701. * bytecode/ResolveGlobalStatus.h:
  21702. (JSC):
  21703. (ResolveGlobalStatus):
  21704. * bytecode/ResolveOperation.h: Added.
  21705. The new types and logic we use to perform the cached lookups.
  21706. (JSC):
  21707. (ResolveOperation):
  21708. (JSC::ResolveOperation::getAndReturnScopedVar):
  21709. (JSC::ResolveOperation::checkForDynamicEntriesBeforeGlobalScope):
  21710. (JSC::ResolveOperation::getAndReturnGlobalVar):
  21711. (JSC::ResolveOperation::getAndReturnGlobalProperty):
  21712. (JSC::ResolveOperation::resolveFail):
  21713. (JSC::ResolveOperation::skipTopScopeNode):
  21714. (JSC::ResolveOperation::skipScopes):
  21715. (JSC::ResolveOperation::returnGlobalObjectAsBase):
  21716. (JSC::ResolveOperation::setBaseToGlobal):
  21717. (JSC::ResolveOperation::setBaseToUndefined):
  21718. (JSC::ResolveOperation::setBaseToScope):
  21719. (JSC::ResolveOperation::returnScopeAsBase):
  21720. (JSC::PutToBaseOperation::PutToBaseOperation):
  21721. * bytecompiler/BytecodeGenerator.cpp:
  21722. (JSC::ResolveResult::checkValidity):
  21723. (JSC):
  21724. (JSC::BytecodeGenerator::BytecodeGenerator):
  21725. (JSC::BytecodeGenerator::resolve):
  21726. (JSC::BytecodeGenerator::resolveConstDecl):
  21727. (JSC::BytecodeGenerator::shouldAvoidResolveGlobal):
  21728. (JSC::BytecodeGenerator::emitResolve):
  21729. (JSC::BytecodeGenerator::emitResolveBase):
  21730. (JSC::BytecodeGenerator::emitResolveBaseForPut):
  21731. (JSC::BytecodeGenerator::emitResolveWithBaseForPut):
  21732. (JSC::BytecodeGenerator::emitResolveWithThis):
  21733. (JSC::BytecodeGenerator::emitGetLocalVar):
  21734. (JSC::BytecodeGenerator::emitInitGlobalConst):
  21735. (JSC::BytecodeGenerator::emitPutToBase):
  21736. * bytecompiler/BytecodeGenerator.h:
  21737. (JSC::ResolveResult::registerResolve):
  21738. (JSC::ResolveResult::dynamicResolve):
  21739. (ResolveResult):
  21740. (JSC::ResolveResult::ResolveResult):
  21741. (JSC):
  21742. (NonlocalResolveInfo):
  21743. (JSC::NonlocalResolveInfo::NonlocalResolveInfo):
  21744. (JSC::NonlocalResolveInfo::~NonlocalResolveInfo):
  21745. (JSC::NonlocalResolveInfo::resolved):
  21746. (JSC::NonlocalResolveInfo::put):
  21747. (BytecodeGenerator):
  21748. (JSC::BytecodeGenerator::getResolveOperations):
  21749. (JSC::BytecodeGenerator::getResolveWithThisOperations):
  21750. (JSC::BytecodeGenerator::getResolveBaseOperations):
  21751. (JSC::BytecodeGenerator::getResolveBaseForPutOperations):
  21752. (JSC::BytecodeGenerator::getResolveWithBaseForPutOperations):
  21753. (JSC::BytecodeGenerator::getPutToBaseOperation):
  21754. * bytecompiler/NodesCodegen.cpp:
  21755. (JSC::ResolveNode::isPure):
  21756. (JSC::FunctionCallResolveNode::emitBytecode):
  21757. (JSC::PostfixNode::emitResolve):
  21758. (JSC::PrefixNode::emitResolve):
  21759. (JSC::ReadModifyResolveNode::emitBytecode):
  21760. (JSC::AssignResolveNode::emitBytecode):
  21761. (JSC::ConstDeclNode::emitCodeSingle):
  21762. (JSC::ForInNode::emitBytecode):
  21763. * dfg/DFGAbstractState.cpp:
  21764. (JSC::DFG::AbstractState::execute):
  21765. * dfg/DFGByteCodeParser.cpp:
  21766. (ByteCodeParser):
  21767. (InlineStackEntry):
  21768. (JSC::DFG::ByteCodeParser::handleGetByOffset):
  21769. (DFG):
  21770. (JSC::DFG::ByteCodeParser::parseResolveOperations):
  21771. (JSC::DFG::ByteCodeParser::parseBlock):
  21772. (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
  21773. * dfg/DFGCapabilities.h:
  21774. (JSC::DFG::canCompileResolveOperations):
  21775. (DFG):
  21776. (JSC::DFG::canCompilePutToBaseOperation):
  21777. (JSC::DFG::canCompileOpcode):
  21778. (JSC::DFG::canInlineOpcode):
  21779. * dfg/DFGGraph.h:
  21780. (ResolveGlobalData):
  21781. (ResolveOperationData):
  21782. (DFG):
  21783. (PutToBaseOperationData):
  21784. (Graph):
  21785. * dfg/DFGNode.h:
  21786. (JSC::DFG::Node::hasIdentifier):
  21787. (JSC::DFG::Node::resolveOperationsDataIndex):
  21788. (Node):
  21789. * dfg/DFGNodeType.h:
  21790. (DFG):
  21791. * dfg/DFGOSRExit.cpp:
  21792. (JSC::DFG::OSRExit::OSRExit):
  21793. * dfg/DFGOSRExit.h:
  21794. (OSRExit):
  21795. * dfg/DFGOSRExitCompiler.cpp:
  21796. * dfg/DFGOSRExitCompiler32_64.cpp:
  21797. (JSC::DFG::OSRExitCompiler::compileExit):
  21798. * dfg/DFGOSRExitCompiler64.cpp:
  21799. (JSC::DFG::OSRExitCompiler::compileExit):
  21800. * dfg/DFGOperations.cpp:
  21801. * dfg/DFGOperations.h:
  21802. * dfg/DFGPredictionPropagationPhase.cpp:
  21803. (JSC::DFG::PredictionPropagationPhase::propagate):
  21804. * dfg/DFGRepatch.cpp:
  21805. (JSC::DFG::tryCacheGetByID):
  21806. * dfg/DFGSpeculativeJIT.cpp:
  21807. (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
  21808. * dfg/DFGSpeculativeJIT.h:
  21809. (JSC::DFG::SpeculativeJIT::resolveOperations):
  21810. (SpeculativeJIT):
  21811. (JSC::DFG::SpeculativeJIT::putToBaseOperation):
  21812. (JSC::DFG::SpeculativeJIT::callOperation):
  21813. * dfg/DFGSpeculativeJIT32_64.cpp:
  21814. (JSC::DFG::SpeculativeJIT::compile):
  21815. * dfg/DFGSpeculativeJIT64.cpp:
  21816. (JSC::DFG::SpeculativeJIT::compile):
  21817. * dfg/DFGStructureCheckHoistingPhase.cpp:
  21818. (JSC::DFG::StructureCheckHoistingPhase::run):
  21819. * jit/JIT.cpp:
  21820. (JSC::JIT::privateCompileMainPass):
  21821. (JSC::JIT::privateCompileSlowCases):
  21822. * jit/JIT.h:
  21823. (JIT):
  21824. * jit/JITOpcodes.cpp:
  21825. (JSC::JIT::emit_op_put_to_base):
  21826. (JSC):
  21827. (JSC::JIT::emit_resolve_operations):
  21828. (JSC::JIT::emitSlow_link_resolve_operations):
  21829. (JSC::JIT::emit_op_resolve):
  21830. (JSC::JIT::emitSlow_op_resolve):
  21831. (JSC::JIT::emit_op_resolve_base):
  21832. (JSC::JIT::emitSlow_op_resolve_base):
  21833. (JSC::JIT::emit_op_resolve_with_base):
  21834. (JSC::JIT::emitSlow_op_resolve_with_base):
  21835. (JSC::JIT::emit_op_resolve_with_this):
  21836. (JSC::JIT::emitSlow_op_resolve_with_this):
  21837. (JSC::JIT::emitSlow_op_put_to_base):
  21838. * jit/JITOpcodes32_64.cpp:
  21839. (JSC::JIT::emit_op_put_to_base):
  21840. (JSC):
  21841. * jit/JITPropertyAccess.cpp:
  21842. (JSC::JIT::emit_op_init_global_const):
  21843. (JSC::JIT::emit_op_init_global_const_check):
  21844. (JSC::JIT::emitSlow_op_init_global_const_check):
  21845. * jit/JITPropertyAccess32_64.cpp:
  21846. (JSC::JIT::emit_op_init_global_const):
  21847. (JSC::JIT::emit_op_init_global_const_check):
  21848. (JSC::JIT::emitSlow_op_init_global_const_check):
  21849. * jit/JITStubs.cpp:
  21850. (JSC::DEFINE_STUB_FUNCTION):
  21851. (JSC):
  21852. * jit/JITStubs.h:
  21853. * llint/LLIntSlowPaths.cpp:
  21854. (LLInt):
  21855. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  21856. * llint/LLIntSlowPaths.h:
  21857. (LLInt):
  21858. * llint/LowLevelInterpreter.asm:
  21859. * llint/LowLevelInterpreter32_64.asm:
  21860. * llint/LowLevelInterpreter64.asm:
  21861. * runtime/JSScope.cpp:
  21862. (JSC::LookupResult::base):
  21863. (JSC::LookupResult::value):
  21864. (JSC::LookupResult::setBase):
  21865. (JSC::LookupResult::setValue):
  21866. (LookupResult):
  21867. (JSC):
  21868. (JSC::setPutPropertyAccessOffset):
  21869. (JSC::executeResolveOperations):
  21870. (JSC::JSScope::resolveContainingScopeInternal):
  21871. (JSC::JSScope::resolveContainingScope):
  21872. (JSC::JSScope::resolve):
  21873. (JSC::JSScope::resolveBase):
  21874. (JSC::JSScope::resolveWithBase):
  21875. (JSC::JSScope::resolveWithThis):
  21876. (JSC::JSScope::resolvePut):
  21877. (JSC::JSScope::resolveGlobal):
  21878. * runtime/JSScope.h:
  21879. (JSScope):
  21880. * runtime/JSVariableObject.cpp:
  21881. (JSC):
  21882. * runtime/JSVariableObject.h:
  21883. (JSVariableObject):
  21884. * runtime/Structure.h:
  21885. (JSC::Structure::propertyAccessesAreCacheable):
  21886. (Structure):
  21887. 2012-10-16 Filip Pizlo <fpizlo@apple.com>
  21888. Accidental switch fall-through in DFG::FixupPhase
  21889. https://bugs.webkit.org/show_bug.cgi?id=96956
  21890. <rdar://problem/12313242>
  21891. Reviewed by Mark Hahnenberg.
  21892. * dfg/DFGFixupPhase.cpp:
  21893. (JSC::DFG::FixupPhase::fixupNode):
  21894. 2012-10-16 Filip Pizlo <fpizlo@apple.com>
  21895. GetScopedVar CSE matches dead GetScopedVar's leading to IR corruption
  21896. https://bugs.webkit.org/show_bug.cgi?id=99470
  21897. <rdar://problem/12363698>
  21898. Reviewed by Mark Hahnenberg.
  21899. All it takes is to follow the "if (!shouldGenerate) continue" idiom and everything will be OK.
  21900. * dfg/DFGCSEPhase.cpp:
  21901. (JSC::DFG::CSEPhase::globalVarLoadElimination):
  21902. (JSC::DFG::CSEPhase::scopedVarLoadElimination):
  21903. (JSC::DFG::CSEPhase::globalVarWatchpointElimination):
  21904. (JSC::DFG::CSEPhase::getByValLoadElimination):
  21905. (JSC::DFG::CSEPhase::checkStructureElimination):
  21906. (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination):
  21907. (JSC::DFG::CSEPhase::getByOffsetLoadElimination):
  21908. 2012-10-16 Dima Gorbik <dgorbik@apple.com>
  21909. Remove Platform.h include from the header files.
  21910. https://bugs.webkit.org/show_bug.cgi?id=98665
  21911. Reviewed by Eric Seidel.
  21912. We don't want other clients that include WebKit headers to know about Platform.h.
  21913. * API/tests/minidom.c:
  21914. * API/tests/testapi.c:
  21915. 2012-10-16 Balazs Kilvady <kilvadyb@homejinni.com>
  21916. Add missing MIPS functions to assembler.
  21917. https://bugs.webkit.org/show_bug.cgi?id=98856
  21918. Reviewed by Oliver Hunt.
  21919. Implement missing functions in MacroAssemblerMIPS and MIPSAssembler.
  21920. * assembler/MIPSAssembler.h:
  21921. (JSC::MIPSAssembler::lb):
  21922. (MIPSAssembler):
  21923. (JSC::MIPSAssembler::lh):
  21924. (JSC::MIPSAssembler::cvtds):
  21925. (JSC::MIPSAssembler::cvtsd):
  21926. (JSC::MIPSAssembler::vmov):
  21927. * assembler/MacroAssemblerMIPS.h:
  21928. (MacroAssemblerMIPS):
  21929. (JSC::MacroAssemblerMIPS::load8Signed):
  21930. (JSC::MacroAssemblerMIPS::load16Signed):
  21931. (JSC::MacroAssemblerMIPS::moveDoubleToInts):
  21932. (JSC::MacroAssemblerMIPS::moveIntsToDouble):
  21933. (JSC::MacroAssemblerMIPS::loadFloat):
  21934. (JSC::MacroAssemblerMIPS::loadDouble):
  21935. (JSC::MacroAssemblerMIPS::storeFloat):
  21936. (JSC::MacroAssemblerMIPS::storeDouble):
  21937. (JSC::MacroAssemblerMIPS::addDouble):
  21938. (JSC::MacroAssemblerMIPS::convertFloatToDouble):
  21939. (JSC::MacroAssemblerMIPS::convertDoubleToFloat):
  21940. 2012-10-16 Balazs Kilvady <kilvadyb@homejinni.com>
  21941. MIPS assembler coding-style fix.
  21942. https://bugs.webkit.org/show_bug.cgi?id=99359
  21943. Reviewed by Oliver Hunt.
  21944. Coding style fix of existing MIPS assembler header files.
  21945. * assembler/MIPSAssembler.h:
  21946. (JSC::MIPSAssembler::addiu):
  21947. (JSC::MIPSAssembler::addu):
  21948. (JSC::MIPSAssembler::subu):
  21949. (JSC::MIPSAssembler::mul):
  21950. (JSC::MIPSAssembler::andInsn):
  21951. (JSC::MIPSAssembler::andi):
  21952. (JSC::MIPSAssembler::nor):
  21953. (JSC::MIPSAssembler::orInsn):
  21954. (JSC::MIPSAssembler::ori):
  21955. (JSC::MIPSAssembler::xorInsn):
  21956. (JSC::MIPSAssembler::xori):
  21957. (JSC::MIPSAssembler::slt):
  21958. (JSC::MIPSAssembler::sltu):
  21959. (JSC::MIPSAssembler::sltiu):
  21960. (JSC::MIPSAssembler::sll):
  21961. (JSC::MIPSAssembler::sllv):
  21962. (JSC::MIPSAssembler::sra):
  21963. (JSC::MIPSAssembler::srav):
  21964. (JSC::MIPSAssembler::srl):
  21965. (JSC::MIPSAssembler::srlv):
  21966. (JSC::MIPSAssembler::lbu):
  21967. (JSC::MIPSAssembler::lw):
  21968. (JSC::MIPSAssembler::lwl):
  21969. (JSC::MIPSAssembler::lwr):
  21970. (JSC::MIPSAssembler::lhu):
  21971. (JSC::MIPSAssembler::sb):
  21972. (JSC::MIPSAssembler::sh):
  21973. (JSC::MIPSAssembler::sw):
  21974. (JSC::MIPSAssembler::addd):
  21975. (JSC::MIPSAssembler::subd):
  21976. (JSC::MIPSAssembler::muld):
  21977. (JSC::MIPSAssembler::divd):
  21978. (JSC::MIPSAssembler::lwc1):
  21979. (JSC::MIPSAssembler::ldc1):
  21980. (JSC::MIPSAssembler::swc1):
  21981. (JSC::MIPSAssembler::sdc1):
  21982. (MIPSAssembler):
  21983. (JSC::MIPSAssembler::relocateJumps):
  21984. (JSC::MIPSAssembler::linkWithOffset):
  21985. * assembler/MacroAssemblerMIPS.h:
  21986. (JSC::MacroAssemblerMIPS::add32):
  21987. (JSC::MacroAssemblerMIPS::and32):
  21988. (JSC::MacroAssemblerMIPS::sub32):
  21989. (MacroAssemblerMIPS):
  21990. (JSC::MacroAssemblerMIPS::load8):
  21991. (JSC::MacroAssemblerMIPS::load32):
  21992. (JSC::MacroAssemblerMIPS::load32WithUnalignedHalfWords):
  21993. (JSC::MacroAssemblerMIPS::load16):
  21994. (JSC::MacroAssemblerMIPS::store8):
  21995. (JSC::MacroAssemblerMIPS::store16):
  21996. (JSC::MacroAssemblerMIPS::store32):
  21997. (JSC::MacroAssemblerMIPS::nearCall):
  21998. (JSC::MacroAssemblerMIPS::test8):
  21999. (JSC::MacroAssemblerMIPS::test32):
  22000. 2012-10-16 Yuqiang Xian <yuqiang.xian@intel.com>
  22001. Refactor MacroAssembler interfaces to differentiate the pointer operands from the 64-bit integer operands
  22002. https://bugs.webkit.org/show_bug.cgi?id=99154
  22003. Reviewed by Gavin Barraclough.
  22004. In current JavaScriptCore implementation for JSVALUE64 platform (i.e.,
  22005. the X64 platform), we assume that the JSValue size is same to the
  22006. pointer size, and thus EncodedJSValue is simply type defined as a
  22007. "void*". In the JIT compiler, we also take this assumption and invoke
  22008. the same macro assembler interfaces for both JSValue and pointer
  22009. operands. We need to differentiate the operations on pointers from the
  22010. operations on JSValues, and let them invoking different macro
  22011. assembler interfaces. For example, we now use the interface of
  22012. "loadPtr" to load either a pointer or a JSValue, and we need to switch
  22013. to using "loadPtr" to load a pointer and some new "load64" interface
  22014. to load a JSValue. This would help us supporting other JSVALUE64
  22015. platforms where pointer size is not necessarily 64-bits, for example
  22016. x32 (bug #99153).
  22017. The major modification I made is to introduce the "*64" interfaces in
  22018. the MacroAssembler for those operations on JSValues, keep the "*Ptr"
  22019. interfaces for those operations on real pointers, and go through all
  22020. the JIT compiler code to correct the usage.
  22021. This is the first part of the work, i.e, to add the *64 interfaces to
  22022. the MacroAssembler.
  22023. * assembler/AbstractMacroAssembler.h: Add the Imm64 interfaces.
  22024. (AbstractMacroAssembler):
  22025. (JSC::AbstractMacroAssembler::TrustedImm64::TrustedImm64):
  22026. (TrustedImm64):
  22027. (JSC::AbstractMacroAssembler::Imm64::Imm64):
  22028. (Imm64):
  22029. (JSC::AbstractMacroAssembler::Imm64::asTrustedImm64):
  22030. * assembler/MacroAssembler.h: map <foo>Ptr methods to <foo>64 for X86_64.
  22031. (MacroAssembler):
  22032. (JSC::MacroAssembler::peek64):
  22033. (JSC::MacroAssembler::poke):
  22034. (JSC::MacroAssembler::poke64):
  22035. (JSC::MacroAssembler::addPtr):
  22036. (JSC::MacroAssembler::andPtr):
  22037. (JSC::MacroAssembler::negPtr):
  22038. (JSC::MacroAssembler::orPtr):
  22039. (JSC::MacroAssembler::rotateRightPtr):
  22040. (JSC::MacroAssembler::subPtr):
  22041. (JSC::MacroAssembler::xorPtr):
  22042. (JSC::MacroAssembler::loadPtr):
  22043. (JSC::MacroAssembler::loadPtrWithAddressOffsetPatch):
  22044. (JSC::MacroAssembler::loadPtrWithCompactAddressOffsetPatch):
  22045. (JSC::MacroAssembler::storePtr):
  22046. (JSC::MacroAssembler::storePtrWithAddressOffsetPatch):
  22047. (JSC::MacroAssembler::movePtrToDouble):
  22048. (JSC::MacroAssembler::moveDoubleToPtr):
  22049. (JSC::MacroAssembler::comparePtr):
  22050. (JSC::MacroAssembler::testPtr):
  22051. (JSC::MacroAssembler::branchPtr):
  22052. (JSC::MacroAssembler::branchTestPtr):
  22053. (JSC::MacroAssembler::branchAddPtr):
  22054. (JSC::MacroAssembler::branchSubPtr):
  22055. (JSC::MacroAssembler::shouldBlindDouble):
  22056. (JSC::MacroAssembler::shouldBlind):
  22057. (JSC::MacroAssembler::RotatedImm64::RotatedImm64):
  22058. (RotatedImm64):
  22059. (JSC::MacroAssembler::rotationBlindConstant):
  22060. (JSC::MacroAssembler::loadRotationBlindedConstant):
  22061. (JSC::MacroAssembler::move):
  22062. (JSC::MacroAssembler::and64):
  22063. (JSC::MacroAssembler::store64):
  22064. * assembler/MacroAssemblerX86Common.h:
  22065. (JSC::MacroAssemblerX86Common::shouldBlindForSpecificArch):
  22066. (MacroAssemblerX86Common):
  22067. (JSC::MacroAssemblerX86Common::move):
  22068. * assembler/MacroAssemblerX86_64.h: Add the <foo>64 methods for X86_64.
  22069. (JSC::MacroAssemblerX86_64::branchAdd32):
  22070. (JSC::MacroAssemblerX86_64::add64):
  22071. (MacroAssemblerX86_64):
  22072. (JSC::MacroAssemblerX86_64::and64):
  22073. (JSC::MacroAssemblerX86_64::neg64):
  22074. (JSC::MacroAssemblerX86_64::or64):
  22075. (JSC::MacroAssemblerX86_64::rotateRight64):
  22076. (JSC::MacroAssemblerX86_64::sub64):
  22077. (JSC::MacroAssemblerX86_64::xor64):
  22078. (JSC::MacroAssemblerX86_64::load64):
  22079. (JSC::MacroAssemblerX86_64::load64WithAddressOffsetPatch):
  22080. (JSC::MacroAssemblerX86_64::load64WithCompactAddressOffsetPatch):
  22081. (JSC::MacroAssemblerX86_64::store64):
  22082. (JSC::MacroAssemblerX86_64::store64WithAddressOffsetPatch):
  22083. (JSC::MacroAssemblerX86_64::move64ToDouble):
  22084. (JSC::MacroAssemblerX86_64::moveDoubleTo64):
  22085. (JSC::MacroAssemblerX86_64::compare64):
  22086. (JSC::MacroAssemblerX86_64::branch64):
  22087. (JSC::MacroAssemblerX86_64::branchTest64):
  22088. (JSC::MacroAssemblerX86_64::test64):
  22089. (JSC::MacroAssemblerX86_64::branchAdd64):
  22090. (JSC::MacroAssemblerX86_64::branchSub64):
  22091. (JSC::MacroAssemblerX86_64::branchPtrWithPatch):
  22092. (JSC::MacroAssemblerX86_64::storePtrWithPatch):
  22093. 2012-10-15 Mark Hahnenberg <mhahnenberg@apple.com>
  22094. Make CopiedSpace and MarkedSpace regions independent
  22095. https://bugs.webkit.org/show_bug.cgi?id=99222
  22096. Reviewed by Filip Pizlo.
  22097. Right now CopiedSpace and MarkedSpace have the same block size and share the same regions,
  22098. but there's no reason that they can't have different block sizes while still sharing the
  22099. same underlying regions. We should factor the two "used" lists of regions apart so that
  22100. MarkedBlocks and CopiedBlocks can be different sizes. Regions will still be a uniform size
  22101. so that when they become empty they may be shared between the CopiedSpace and the MarkedSpace,
  22102. since benchmarks indicate that sharing is a boon for performance.
  22103. * heap/BlockAllocator.cpp:
  22104. (JSC::BlockAllocator::BlockAllocator):
  22105. * heap/BlockAllocator.h:
  22106. (JSC):
  22107. (Region):
  22108. (JSC::Region::create): We now have a fixed size for Regions so that empty regions can continue to
  22109. be shared between the MarkedSpace and CopiedSpace. Once they are used for a specific type of block,
  22110. however, they can only be used for that type of block until they become empty again.
  22111. (JSC::Region::createCustomSize):
  22112. (JSC::Region::Region):
  22113. (JSC::Region::~Region):
  22114. (JSC::Region::reset):
  22115. (BlockAllocator):
  22116. (JSC::BlockAllocator::RegionSet::RegionSet):
  22117. (RegionSet):
  22118. (JSC::BlockAllocator::tryAllocateFromRegion): We change this function so that it correctly
  22119. moves blocks between empty, partial, and full lists.
  22120. (JSC::BlockAllocator::allocate):
  22121. (JSC::BlockAllocator::allocateCustomSize):
  22122. (JSC::BlockAllocator::deallocate): Ditto.
  22123. (JSC::CopiedBlock):
  22124. (JSC::MarkedBlock):
  22125. (JSC::BlockAllocator::regionSetFor): We use this so that we can use the same allocate/deallocate
  22126. functions with different RegionSets. We specialize the function for each type of block that we
  22127. want to allocate.
  22128. * heap/CopiedBlock.h:
  22129. (CopiedBlock):
  22130. * heap/CopiedSpace.h:
  22131. (CopiedSpace):
  22132. * heap/HeapBlock.h:
  22133. (HeapBlock):
  22134. * heap/MarkedBlock.cpp:
  22135. (JSC::MarkedBlock::MarkedBlock): For oversize MarkedBlocks, if the block size gets too big we can
  22136. underflow the endAtom, which will cause us to segfault when we try to sweep a block. If we're a
  22137. custom size MarkedBlock we need to calculate endAtom so it doesn't underflow.
  22138. 2012-10-14 Filip Pizlo <fpizlo@apple.com>
  22139. JIT::JIT fails to initialize all of its fields
  22140. https://bugs.webkit.org/show_bug.cgi?id=99283
  22141. Reviewed by Andreas Kling.
  22142. There were two groups of such fields, all of which are eventually initialized
  22143. prior to use inside of privateCompile(). But it's safer to make sure that they
  22144. are initialized in the constructor as well, since we may use the JIT to do a
  22145. stub compile without calling into privateCompile().
  22146. Unsigned index fields for dynamic repatching meta-data: this change
  22147. initializes them to UINT_MAX, so we should crash if we try to use those
  22148. indices without initializing them.
  22149. Boolean flags for value profiling: this change initializes them to false, so
  22150. we at worst turn off value profiling.
  22151. * jit/JIT.cpp:
  22152. (JSC::JIT::JIT):
  22153. 2012-10-15 Mark Hahnenberg <mhahnenberg@apple.com>
  22154. We should avoid weakCompareAndSwap when parallel GC is disabled
  22155. https://bugs.webkit.org/show_bug.cgi?id=99331
  22156. Reviewed by Filip Pizlo.
  22157. CopiedBlock::reportLiveBytes and didEvacuateBytes uses weakCompareAndSwap, which some platforms
  22158. don't support. For platforms that don't have parallel GC enabled, we should just use a normal store.
  22159. * heap/CopiedBlock.h:
  22160. (JSC::CopiedBlock::reportLiveBytes):
  22161. (JSC::CopiedBlock::didEvacuateBytes):
  22162. 2012-10-15 Carlos Garcia Campos <cgarcia@igalia.com>
  22163. Unreviewed. Fix make distcheck.
  22164. * GNUmakefile.list.am: Add missing header file.
  22165. 2012-10-14 Filip Pizlo <fpizlo@apple.com>
  22166. DFG should handle polymorphic array modes by eagerly transforming arrays into the most general applicable form
  22167. https://bugs.webkit.org/show_bug.cgi?id=99269
  22168. Reviewed by Geoffrey Garen.
  22169. This kills off a bunch of code for "polymorphic" array modes in the DFG. It should
  22170. also be a performance win for code that uses a lot of array storage arrays.
  22171. * dfg/DFGAbstractState.cpp:
  22172. (JSC::DFG::AbstractState::execute):
  22173. * dfg/DFGArrayMode.cpp:
  22174. (JSC::DFG::fromObserved):
  22175. (JSC::DFG::modeAlreadyChecked):
  22176. (JSC::DFG::modeToString):
  22177. * dfg/DFGArrayMode.h:
  22178. (DFG):
  22179. (JSC::DFG::modeUsesButterfly):
  22180. (JSC::DFG::modeIsJSArray):
  22181. (JSC::DFG::mayStoreToTail):
  22182. (JSC::DFG::mayStoreToHole):
  22183. (JSC::DFG::canCSEStorage):
  22184. (JSC::DFG::modeSupportsLength):
  22185. (JSC::DFG::benefitsFromStructureCheck):
  22186. * dfg/DFGFixupPhase.cpp:
  22187. (JSC::DFG::FixupPhase::checkArray):
  22188. (JSC::DFG::FixupPhase::blessArrayOperation):
  22189. * dfg/DFGGraph.h:
  22190. (JSC::DFG::Graph::byValIsPure):
  22191. * dfg/DFGSpeculativeJIT.cpp:
  22192. (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
  22193. (JSC::DFG::SpeculativeJIT::checkArray):
  22194. (JSC::DFG::SpeculativeJIT::arrayify):
  22195. (DFG):
  22196. (JSC::DFG::SpeculativeJIT::compileGetArrayLength):
  22197. * dfg/DFGSpeculativeJIT.h:
  22198. (JSC::DFG::SpeculativeJIT::putByValWillNeedExtraRegister):
  22199. (SpeculativeJIT):
  22200. * dfg/DFGSpeculativeJIT32_64.cpp:
  22201. (JSC::DFG::SpeculativeJIT::compile):
  22202. * dfg/DFGSpeculativeJIT64.cpp:
  22203. (JSC::DFG::SpeculativeJIT::compile):
  22204. 2012-10-14 Filip Pizlo <fpizlo@apple.com>
  22205. REGRESSION(126886): Fat binary builds don't know how to handle architecture variants to which the LLInt is agnostic
  22206. https://bugs.webkit.org/show_bug.cgi?id=99270
  22207. Reviewed by Geoffrey Garen.
  22208. The fix is to hash cons the offsets based on configuration index, not the offsets
  22209. themselves.
  22210. * offlineasm/offsets.rb:
  22211. 2012-10-13 Filip Pizlo <fpizlo@apple.com>
  22212. IndexingType should not have a bit for each type
  22213. https://bugs.webkit.org/show_bug.cgi?id=98997
  22214. Reviewed by Oliver Hunt.
  22215. Somewhat incidentally, the introduction of butterflies led to each indexing
  22216. type being represented by a unique bit. This is superficially nice since it
  22217. allows you to test if a structure corresponds to a particular indexing type
  22218. by saying !!(structure->indexingType() & TheType). But the downside is that
  22219. given the 8 bits we have for the m_indexingType field, that leaves only a
  22220. small number of possible indexing types if we have one per bit.
  22221. This changeset changes the indexing type to be:
  22222. Bit #1: Tells you if you're an array.
  22223. Bits #2 - #5: 16 possible indexing types, including the blank type for
  22224. objects that don't have indexed properties.
  22225. Bits #6-8: Auxiliary bits that we could use for other things. Currently we
  22226. just use one of those bits, for MayHaveIndexedAccessors.
  22227. This is performance-neutral, and is primarily intended to give us more
  22228. breathing room for introducing new inferred array modes.
  22229. * assembler/AbstractMacroAssembler.h:
  22230. (JSC::AbstractMacroAssembler::JumpList::jumps):
  22231. * assembler/MacroAssembler.h:
  22232. (MacroAssembler):
  22233. (JSC::MacroAssembler::patchableBranch32):
  22234. * assembler/MacroAssemblerARMv7.h:
  22235. (JSC::MacroAssemblerARMv7::patchableBranch32):
  22236. (MacroAssemblerARMv7):
  22237. * dfg/DFGArrayMode.cpp:
  22238. (JSC::DFG::modeAlreadyChecked):
  22239. * dfg/DFGRepatch.cpp:
  22240. (JSC::DFG::tryCacheGetByID):
  22241. * dfg/DFGSpeculativeJIT.cpp:
  22242. (JSC::DFG::SpeculativeJIT::speculationCheck):
  22243. (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck):
  22244. (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
  22245. (DFG):
  22246. (JSC::DFG::SpeculativeJIT::checkArray):
  22247. (JSC::DFG::SpeculativeJIT::arrayify):
  22248. * dfg/DFGSpeculativeJIT.h:
  22249. (SpeculativeJIT):
  22250. * dfg/DFGSpeculativeJIT32_64.cpp:
  22251. (JSC::DFG::SpeculativeJIT::compile):
  22252. * dfg/DFGSpeculativeJIT64.cpp:
  22253. (JSC::DFG::SpeculativeJIT::compile):
  22254. * jit/JITInlineMethods.h:
  22255. (JSC::JIT::emitAllocateJSArray):
  22256. (JSC::JIT::chooseArrayMode):
  22257. * jit/JITPropertyAccess.cpp:
  22258. (JSC::JIT::emit_op_get_by_val):
  22259. (JSC::JIT::emitContiguousGetByVal):
  22260. (JSC::JIT::emitArrayStorageGetByVal):
  22261. (JSC::JIT::emit_op_put_by_val):
  22262. (JSC::JIT::emitContiguousPutByVal):
  22263. (JSC::JIT::emitArrayStoragePutByVal):
  22264. (JSC::JIT::privateCompilePatchGetArrayLength):
  22265. * jit/JITPropertyAccess32_64.cpp:
  22266. (JSC::JIT::emit_op_get_by_val):
  22267. (JSC::JIT::emitContiguousGetByVal):
  22268. (JSC::JIT::emitArrayStorageGetByVal):
  22269. (JSC::JIT::emit_op_put_by_val):
  22270. (JSC::JIT::emitContiguousPutByVal):
  22271. (JSC::JIT::emitArrayStoragePutByVal):
  22272. (JSC::JIT::privateCompilePatchGetArrayLength):
  22273. * llint/LowLevelInterpreter.asm:
  22274. * llint/LowLevelInterpreter32_64.asm:
  22275. * llint/LowLevelInterpreter64.asm:
  22276. * runtime/IndexingType.h:
  22277. (JSC):
  22278. (JSC::hasIndexedProperties):
  22279. (JSC::hasContiguous):
  22280. (JSC::hasFastArrayStorage):
  22281. (JSC::hasArrayStorage):
  22282. (JSC::shouldUseSlowPut):
  22283. * runtime/JSGlobalObject.cpp:
  22284. (JSC):
  22285. * runtime/StructureTransitionTable.h:
  22286. (JSC::newIndexingType):
  22287. 2012-10-14 Filip Pizlo <fpizlo@apple.com>
  22288. DFG structure check hoisting should attempt to ignore side effects and make transformations that are sound even in their presence
  22289. https://bugs.webkit.org/show_bug.cgi?id=99262
  22290. Reviewed by Oliver Hunt.
  22291. This hugely simplifies the structure check hoisting phase. It will no longer be necessary
  22292. to modify it when the effectfulness of operations changes. This also enables the hoister
  22293. to hoist effectful things in the future.
  22294. The downside is that the hoister may end up adding strictly more checks than were present
  22295. in the original code, if the code truly has a lot of side-effects. I don't see evidence
  22296. of this happening. This patch does have some speed-ups and some slow-downs, but is
  22297. neutral in the average, and the slow-downs do not appear to have more structure checks
  22298. than ToT.
  22299. * dfg/DFGStructureCheckHoistingPhase.cpp:
  22300. (JSC::DFG::StructureCheckHoistingPhase::run):
  22301. (JSC::DFG::StructureCheckHoistingPhase::noticeStructureCheck):
  22302. (StructureCheckHoistingPhase):
  22303. (CheckData):
  22304. (JSC::DFG::StructureCheckHoistingPhase::CheckData::CheckData):
  22305. 2012-10-14 Filip Pizlo <fpizlo@apple.com>
  22306. Fix the build of universal binary with ARMv7s of JavaScriptCore
  22307. * llint/LLIntOfflineAsmConfig.h:
  22308. * llint/LowLevelInterpreter.asm:
  22309. 2012-10-13 Filip Pizlo <fpizlo@apple.com>
  22310. Array length array profiling is broken in the baseline JIT
  22311. https://bugs.webkit.org/show_bug.cgi?id=99258
  22312. Reviewed by Oliver Hunt.
  22313. The code generator for array length stubs calls into
  22314. emitArrayProfilingSiteForBytecodeIndex(), which emits profiling only if
  22315. canBeOptimized() returns true. But m_canBeOptimized is only initialized during
  22316. full method compiles, so in a stub compile it may (or may not) be false, meaning
  22317. that we may, or may not, get meaningful profiling info.
  22318. This appeared to not affect too many programs since the LLInt has good array
  22319. length array profiling.
  22320. * jit/JIT.h:
  22321. (JSC::JIT::compilePatchGetArrayLength):
  22322. 2012-10-14 Patrick Gansterer <paroga@webkit.org>
  22323. Build fix for WinCE after r131089.
  22324. WinCE does not support getenv().
  22325. * runtime/Options.cpp:
  22326. (JSC::overrideOptionWithHeuristic):
  22327. 2012-10-12 Kangil Han <kangil.han@samsung.com>
  22328. Fix build error on DFGSpeculativeJIT32_64.cpp
  22329. https://bugs.webkit.org/show_bug.cgi?id=99234
  22330. Reviewed by Anders Carlsson.
  22331. Seems BUG 98608 causes build error on 32bit machine so fix it.
  22332. * dfg/DFGSpeculativeJIT32_64.cpp:
  22333. (JSC::DFG::SpeculativeJIT::compile):
  22334. 2012-10-12 Filip Pizlo <fpizlo@apple.com>
  22335. Contiguous array allocation should always be inlined
  22336. https://bugs.webkit.org/show_bug.cgi?id=98608
  22337. Reviewed by Oliver Hunt and Mark Hahnenberg.
  22338. This inlines contiguous array allocation in the most obvious way possible.
  22339. * JavaScriptCore.xcodeproj/project.pbxproj:
  22340. * assembler/MacroAssembler.h:
  22341. (JSC::MacroAssembler::branchSubPtr):
  22342. (MacroAssembler):
  22343. * assembler/MacroAssemblerX86_64.h:
  22344. (JSC::MacroAssemblerX86_64::branchSubPtr):
  22345. (MacroAssemblerX86_64):
  22346. * dfg/DFGAbstractState.cpp:
  22347. (JSC::DFG::AbstractState::execute):
  22348. * dfg/DFGCCallHelpers.h:
  22349. (JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
  22350. (CCallHelpers):
  22351. * dfg/DFGCallArrayAllocatorSlowPathGenerator.h: Added.
  22352. (DFG):
  22353. (CallArrayAllocatorSlowPathGenerator):
  22354. (JSC::DFG::CallArrayAllocatorSlowPathGenerator::CallArrayAllocatorSlowPathGenerator):
  22355. (JSC::DFG::CallArrayAllocatorSlowPathGenerator::generateInternal):
  22356. (CallArrayAllocatorWithVariableSizeSlowPathGenerator):
  22357. (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::CallArrayAllocatorWithVariableSizeSlowPathGenerator):
  22358. (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::generateInternal):
  22359. * dfg/DFGSpeculativeJIT.cpp:
  22360. (JSC::DFG::SpeculativeJIT::emitAllocateJSArray):
  22361. (DFG):
  22362. (JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
  22363. (JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):
  22364. * dfg/DFGSpeculativeJIT.h:
  22365. (JSC::DFG::SpeculativeJIT::callOperation):
  22366. (SpeculativeJIT):
  22367. (JSC::DFG::SpeculativeJIT::emitAllocateBasicStorage):
  22368. (JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject):
  22369. (JSC::DFG::SpeculativeJIT::emitAllocateJSFinalObject):
  22370. * dfg/DFGSpeculativeJIT32_64.cpp:
  22371. (JSC::DFG::SpeculativeJIT::compile):
  22372. * dfg/DFGSpeculativeJIT64.cpp:
  22373. (JSC::DFG::SpeculativeJIT::compile):
  22374. 2012-10-12 Mark Hahnenberg <mhahnenberg@apple.com>
  22375. Race condition during CopyingPhase can lead to deadlock
  22376. https://bugs.webkit.org/show_bug.cgi?id=99226
  22377. Reviewed by Filip Pizlo.
  22378. The main thread calls startCopying() for each of the GCThreads at the beginning of the copy phase.
  22379. It then proceeds to start copying. If copying completes before one of the GCThreads wakes up, the
  22380. main thread will set m_currentPhase back to NoPhase, the GCThread will wake up, see that there's
  22381. nothing to do, and then it will go back to sleep without ever calling CopyVisitor::doneCopying()
  22382. to return its borrowed block to the CopiedSpace. CopiedSpace::doneCopying() will then sleep forever
  22383. waiting on the block.
  22384. The fix for this is to make sure we call CopiedSpace::doneCopying() on the main thread before we
  22385. call GCThreadSharedData::didFinishCopying(), which sets the m_currentPhase flag to NoPhase. This
  22386. way we will wait until all threads have woken up and given back their borrowed blocks before
  22387. clearing the flag.
  22388. * heap/Heap.cpp:
  22389. (JSC::Heap::copyBackingStores):
  22390. 2012-10-12 Anders Carlsson <andersca@apple.com>
  22391. Move macros from Parser.h to Parser.cpp
  22392. https://bugs.webkit.org/show_bug.cgi?id=99217
  22393. Reviewed by Andreas Kling.
  22394. There are a bunch of macros in Parser.h that are only used in Parser.cpp. Move them to Parser.cpp
  22395. so they won't pollute the global namespace.
  22396. * parser/Parser.cpp:
  22397. * parser/Parser.h:
  22398. (JSC):
  22399. 2012-10-12 Mark Hahnenberg <mhahnenberg@apple.com>
  22400. Another build fix after r131213
  22401. Added some symbol magic to placate the linker on some platforms.
  22402. * JavaScriptCore.order:
  22403. 2012-10-12 Mark Hahnenberg <mhahnenberg@apple.com>
  22404. Build fix after r131213
  22405. Removed an unused variable that was making compilers unhappy.
  22406. * heap/GCThread.cpp:
  22407. (JSC::GCThread::GCThread):
  22408. * heap/GCThread.h:
  22409. (GCThread):
  22410. * heap/GCThreadSharedData.cpp:
  22411. (JSC::GCThreadSharedData::GCThreadSharedData):
  22412. 2012-10-09 Mark Hahnenberg <mhahnenberg@apple.com>
  22413. Copying collection shouldn't require O(live bytes) memory overhead
  22414. https://bugs.webkit.org/show_bug.cgi?id=98792
  22415. Reviewed by Filip Pizlo.
  22416. Currently our copying collection occurs simultaneously with the marking phase. We'd like
  22417. to be able to reuse CopiedBlocks as soon as they become fully evacuated, but this is not
  22418. currently possible because we don't know the liveness statistics of each old CopiedBlock
  22419. until marking/copying has already finished. Instead, we have to allocate additional memory
  22420. from the OS to use as our working set of CopiedBlocks while copying. We then return the
  22421. fully evacuated old CopiedBlocks back to the block allocator, thus giving our copying phase
  22422. an O(live bytes) overhead.
  22423. To fix this, we should instead split the copying phase apart from the marking phase. This
  22424. way we have full liveness data for each CopiedBlock during the copying phase so that we
  22425. can reuse them the instant they become fully evacuated. With the additional liveness data
  22426. that each CopiedBlock accumulates, we can add some additional heuristics to the collector.
  22427. For example, we can calculate our global Heap fragmentation and only choose to do a copying
  22428. phase if that fragmentation exceeds some limit. As another example, we can skip copying
  22429. blocks that are already above a particular fragmentation limit, which allows older objects
  22430. to coalesce into blocks that are rarely copied.
  22431. * JavaScriptCore.xcodeproj/project.pbxproj:
  22432. * heap/CopiedBlock.h:
  22433. (CopiedBlock):
  22434. (JSC::CopiedBlock::CopiedBlock): Added support for tracking live bytes in a CopiedBlock in a
  22435. thread-safe fashion.
  22436. (JSC::CopiedBlock::reportLiveBytes): Adds a number of live bytes to the block in a thread-safe
  22437. fashion using compare and swap.
  22438. (JSC):
  22439. (JSC::CopiedBlock::didSurviveGC): Called when a block survives a single GC without being
  22440. evacuated. This could be called for a couple reasons: (a) the block was pinned or (b) we
  22441. decided not to do any copying. A block can become pinned for a few reasons: (1) a pointer into
  22442. the block was found during the conservative scan. (2) the block was deemed full enough to
  22443. not warrant any copying. (3) The block is oversize and was found to be live.
  22444. (JSC::CopiedBlock::didEvacuateBytes): Called when some number of bytes are copied from this
  22445. block. If the number of live bytes ever hits zero, the block will return itself to the
  22446. BlockAllocator to be recycled.
  22447. (JSC::CopiedBlock::canBeRecycled): Indicates that a block has no live bytes and can be
  22448. immediately recycled. This is used for blocks that are found to have zero live bytes at the
  22449. beginning of the copying phase.
  22450. (JSC::CopiedBlock::shouldEvacuate): This function returns true if the current fragmentation
  22451. of the block is above our fragmentation threshold, and false otherwise.
  22452. (JSC::CopiedBlock::isPinned): Added an accessor for the pinned flag
  22453. (JSC::CopiedBlock::liveBytes):
  22454. * heap/CopiedSpace.cpp:
  22455. (JSC::CopiedSpace::CopiedSpace):
  22456. (JSC::CopiedSpace::doneFillingBlock): Changed so that we can exchange our filled block for a
  22457. fresh block. This avoids the situation where a thread returns its borrowed block, it's the last
  22458. borrowed block, so CopiedSpace thinks that copying has completed, and it starts doing all of the
  22459. copying phase cleanup. In actuality, the thread wanted another block after returning the current
  22460. block. So we allow the thread to atomically exchange its block for another block.
  22461. (JSC::CopiedSpace::startedCopying): Added the calculation of global Heap fragmentation to
  22462. determine if the copying phase should commence. We include the MarkedSpace in our fragmentation
  22463. calculation by assuming that the MarkedSpace is 0% fragmented since we can reuse any currently
  22464. free memory in it (i.e. we ignore any internal fragmentation in the MarkedSpace). While we're
  22465. calculating the fragmentation of CopiedSpace, we also return any free blocks we find along the
  22466. way (meaning liveBytes() == 0).
  22467. (JSC):
  22468. (JSC::CopiedSpace::doneCopying): We still have to iterate over all the blocks, regardless of
  22469. whether the copying phase took place or not so that we can reset all of the live bytes counters
  22470. and un-pin any pinned blocks.
  22471. * heap/CopiedSpace.h:
  22472. (CopiedSpace):
  22473. (JSC::CopiedSpace::shouldDoCopyPhase):
  22474. * heap/CopiedSpaceInlineMethods.h:
  22475. (JSC::CopiedSpace::recycleEvacuatedBlock): This function is distinct from recycling a borrowed block
  22476. because a borrowed block hasn't been added to the CopiedSpace yet, but an evacuated block is still
  22477. currently in CopiedSpace, so we have to make sure we properly remove all traces of the block from
  22478. CopiedSpace before returning it to BlockAllocator.
  22479. (JSC::CopiedSpace::recycleBorrowedBlock): Renamed to indicate the distinction mentioned above.
  22480. * heap/CopyVisitor.cpp: Added.
  22481. (JSC):
  22482. (JSC::CopyVisitor::CopyVisitor):
  22483. (JSC::CopyVisitor::copyFromShared): Main function for any thread participating in the copying phase.
  22484. Grabs chunks of MarkedBlocks from the shared list and copies the backing store of anybody who needs
  22485. it until there are no more chunks to copy.
  22486. * heap/CopyVisitor.h: Added.
  22487. (JSC):
  22488. (CopyVisitor):
  22489. * heap/CopyVisitorInlineMethods.h: Added.
  22490. (JSC):
  22491. (GCCopyPhaseFunctor):
  22492. (JSC::GCCopyPhaseFunctor::GCCopyPhaseFunctor):
  22493. (JSC::GCCopyPhaseFunctor::operator()):
  22494. (JSC::CopyVisitor::checkIfShouldCopy): We don't have to check shouldEvacuate() because all of those
  22495. checks are done during the marking phase.
  22496. (JSC::CopyVisitor::allocateNewSpace):
  22497. (JSC::CopyVisitor::allocateNewSpaceSlow):
  22498. (JSC::CopyVisitor::startCopying): Initialization function for a thread that is about to start copying.
  22499. (JSC::CopyVisitor::doneCopying):
  22500. (JSC::CopyVisitor::didCopy): This callback is called by an object that has just successfully copied its
  22501. backing store. It indicates to the CopiedBlock that somebody has just finished evacuating some number of
  22502. bytes from it, and, if the CopiedBlock now has no more live bytes, can be recycled immediately.
  22503. * heap/GCThread.cpp: Added.
  22504. (JSC):
  22505. (JSC::GCThread::GCThread): This is a new class that encapsulates a single thread responsible for participating
  22506. in a specific set of GC phases. Currently, that set of phases includes Mark, Copy, and Exit. Each thread
  22507. monitors a shared variable in its associated GCThreadSharedData. The main thread updates this m_currentPhase
  22508. variable as collection progresses through the various phases. Parallel marking still works exactly like it
  22509. has. In other words, the "run loop" for each of the GC threads sits above any individual phase, thus keeping
  22510. the separate phases of the collector orthogonal.
  22511. (JSC::GCThread::threadID):
  22512. (JSC::GCThread::initializeThreadID):
  22513. (JSC::GCThread::slotVisitor):
  22514. (JSC::GCThread::copyVisitor):
  22515. (JSC::GCThread::waitForNextPhase):
  22516. (JSC::GCThread::gcThreadMain):
  22517. (JSC::GCThread::gcThreadStartFunc):
  22518. * heap/GCThread.h: Added.
  22519. (JSC):
  22520. (GCThread):
  22521. * heap/GCThreadSharedData.cpp: The GCThreadSharedData now has a list of GCThread objects rather than raw
  22522. ThreadIdentifiers.
  22523. (JSC::GCThreadSharedData::resetChildren):
  22524. (JSC::GCThreadSharedData::childVisitCount):
  22525. (JSC::GCThreadSharedData::GCThreadSharedData):
  22526. (JSC::GCThreadSharedData::~GCThreadSharedData):
  22527. (JSC::GCThreadSharedData::reset):
  22528. (JSC::GCThreadSharedData::didStartMarking): Callback to let the GCThreadSharedData know that marking has
  22529. started and updates the m_currentPhase variable and notifies the GCThreads accordingly.
  22530. (JSC::GCThreadSharedData::didFinishMarking): Ditto for finishing marking.
  22531. (JSC::GCThreadSharedData::didStartCopying): Ditto for starting the copying phase.
  22532. (JSC::GCThreadSharedData::didFinishCopying): Ditto for finishing copying.
  22533. * heap/GCThreadSharedData.h:
  22534. (JSC):
  22535. (GCThreadSharedData):
  22536. (JSC::GCThreadSharedData::getNextBlocksToCopy): Atomically gets the next chunk of work for a copying thread.
  22537. * heap/Heap.cpp:
  22538. (JSC::Heap::Heap):
  22539. (JSC::Heap::markRoots):
  22540. (JSC):
  22541. (JSC::Heap::copyBackingStores): Responsible for setting up the copying phase, notifying the copying threads,
  22542. and doing any copying work if necessary.
  22543. (JSC::Heap::collect):
  22544. * heap/Heap.h:
  22545. (Heap):
  22546. (JSC):
  22547. (JSC::CopyFunctor::CopyFunctor):
  22548. (CopyFunctor):
  22549. (JSC::CopyFunctor::operator()):
  22550. * heap/IncrementalSweeper.cpp: Changed the incremental sweeper to have a reference to the list of MarkedBlocks
  22551. that need sweeping, since this now resides in the Heap so that it can be easily shared by the GCThreads.
  22552. (JSC::IncrementalSweeper::IncrementalSweeper):
  22553. (JSC::IncrementalSweeper::startSweeping):
  22554. * heap/IncrementalSweeper.h:
  22555. (JSC):
  22556. (IncrementalSweeper):
  22557. * heap/SlotVisitor.cpp:
  22558. (JSC::SlotVisitor::setup):
  22559. (JSC::SlotVisitor::drainFromShared): We no longer do any copying-related work here.
  22560. (JSC):
  22561. * heap/SlotVisitor.h:
  22562. (SlotVisitor):
  22563. * heap/SlotVisitorInlineMethods.h:
  22564. (JSC):
  22565. (JSC::SlotVisitor::copyLater): Notifies the CopiedBlock that there are some live bytes that may need
  22566. to be copied.
  22567. * runtime/Butterfly.h:
  22568. (JSC):
  22569. (Butterfly):
  22570. * runtime/ButterflyInlineMethods.h:
  22571. (JSC::Butterfly::createUninitializedDuringCollection): Uses the new CopyVisitor.
  22572. * runtime/ClassInfo.h:
  22573. (MethodTable): Added new "virtual" function copyBackingStore to method table.
  22574. (JSC):
  22575. * runtime/JSCell.cpp:
  22576. (JSC::JSCell::copyBackingStore): Default implementation that does nothing.
  22577. (JSC):
  22578. * runtime/JSCell.h:
  22579. (JSC):
  22580. (JSCell):
  22581. * runtime/JSObject.cpp:
  22582. (JSC::JSObject::copyButterfly): Does the actual copying of the butterfly.
  22583. (JSC):
  22584. (JSC::JSObject::visitButterfly): Calls copyLater for the butterfly.
  22585. (JSC::JSObject::copyBackingStore):
  22586. * runtime/JSObject.h:
  22587. (JSObject):
  22588. (JSC::JSCell::methodTable):
  22589. (JSC::JSCell::inherits):
  22590. * runtime/Options.h: Added two new constants, minHeapUtilization and minCopiedBlockUtilization,
  22591. to govern the amount of fragmentation we allow before doing copying.
  22592. (JSC):
  22593. 2012-10-12 Filip Pizlo <fpizlo@apple.com>
  22594. DFG array allocation calls should not return an encoded JSValue
  22595. https://bugs.webkit.org/show_bug.cgi?id=99196
  22596. Reviewed by Mark Hahnenberg.
  22597. The array allocation operations now return a pointer instead. This makes it
  22598. easier to share code between 32-bit and 64-bit.
  22599. * dfg/DFGOperations.cpp:
  22600. * dfg/DFGOperations.h:
  22601. * dfg/DFGSpeculativeJIT.h:
  22602. (JSC::DFG::SpeculativeJIT::callOperation):
  22603. * dfg/DFGSpeculativeJIT32_64.cpp:
  22604. (JSC::DFG::SpeculativeJIT::compile):
  22605. 2012-10-01 Jer Noble <jer.noble@apple.com>
  22606. Enable ENCRYPTED_MEDIA support on Mac.
  22607. https://bugs.webkit.org/show_bug.cgi?id=98044
  22608. Reviewed by Anders Carlsson.
  22609. Enable the ENCRYPTED_MEDIA flag.
  22610. * Configurations/FeatureDefines.xcconfig:
  22611. 2012-10-12 Filip Pizlo <fpizlo@apple.com>
  22612. Unreviewed. It should be possible to build JSC on ARMv7.
  22613. * assembler/MacroAssemblerARMv7.h:
  22614. (JSC::MacroAssemblerARMv7::patchableBranchPtr):
  22615. 2012-10-11 Mark Hahnenberg <mhahnenberg@apple.com>
  22616. BlockAllocator should use regions as its VM allocation abstraction
  22617. https://bugs.webkit.org/show_bug.cgi?id=99107
  22618. Reviewed by Geoffrey Garen.
  22619. Currently the BlockAllocator allocates a single block at a time directly from the OS. Our block
  22620. allocations are on the large-ish side (64 KB) to amortize across many allocations the expense of
  22621. mapping new virtual memory from the OS. These large blocks are then shared between the MarkedSpace
  22622. and the CopiedSpace. This design makes it difficult to vary the size of the blocks in different
  22623. parts of the Heap while still allowing us to amortize the VM allocation costs.
  22624. We should redesign the BlockAllocator so that it has a layer of indirection between blocks that are
  22625. used by the allocator/collector and our primary unit of VM allocation from the OS. In particular,
  22626. the BlockAllocator should allocate Regions of virtual memory from the OS, which are then subdivided
  22627. into one or more Blocks to be used in our custom allocators. This design has the following nice properties:
  22628. 1) We can remove the knowledge of PageAllocationAligned from HeapBlocks. Each HeapBlock will now
  22629. only know what Region it belongs to. The Region maintains all the metadata for how to allocate
  22630. and deallocate virtual memory from the OS.
  22631. 2) We can easily allocate in larger chunks than we need to satisfy a particular request for a Block.
  22632. We can then continue to amortize our VM allocation costs while allowing for smaller block sizes,
  22633. which should increase locality in the mutator when allocating, lazy sweeping, etc.
  22634. 3) By encapsulating the logic of where our memory comes from inside of the Region class, we can more
  22635. easily transition over to allocating VM from a specific range of pre-reserved address space. This
  22636. will be a necessary step along the way to 32-bit pointers.
  22637. This particular patch will not change the size of MarkedBlocks or CopiedBlocks, nor will it change how
  22638. much VM we allocate per failed Block request. It only sets up the data structures that we need to make
  22639. these changes in future patches.
  22640. Most of the changes in this patch relate to the addition of the Region class to be used by the
  22641. BlockAllocator and the threading of changes made to BlockAllocator's interface through to the call sites.
  22642. * heap/BlockAllocator.cpp: The BlockAllocator now has three lists that track the three disjoint sets of
  22643. Regions that it cares about: empty regions, partially full regions, and completely full regions.
  22644. Empty regions have no blocks currently in use and can be freed immediately if the freeing thread
  22645. determines they should be. Partial regions have some blocks used, but aren't completely in use yet.
  22646. These regions are preferred for recycling before empty regions to mitigate fragmentation within regions.
  22647. Completely full regions are no longer able to be used for allocations. Regions move between these
  22648. three lists as they are created and their constituent blocks are allocated and deallocated.
  22649. (JSC::BlockAllocator::BlockAllocator):
  22650. (JSC::BlockAllocator::~BlockAllocator):
  22651. (JSC::BlockAllocator::releaseFreeRegions):
  22652. (JSC::BlockAllocator::waitForRelativeTimeWhileHoldingLock):
  22653. (JSC::BlockAllocator::waitForRelativeTime):
  22654. (JSC::BlockAllocator::blockFreeingThreadMain):
  22655. * heap/BlockAllocator.h:
  22656. (JSC):
  22657. (DeadBlock):
  22658. (JSC::DeadBlock::DeadBlock):
  22659. (Region):
  22660. (JSC::Region::blockSize):
  22661. (JSC::Region::isFull):
  22662. (JSC::Region::isEmpty):
  22663. (JSC::Region::create): This function is responsible for doing the actual VM allocation. This should be the
  22664. only function in the entire JSC object runtime that calls out the OS for virtual memory allocation.
  22665. (JSC::Region::Region):
  22666. (JSC::Region::~Region):
  22667. (JSC::Region::allocate):
  22668. (JSC::Region::deallocate):
  22669. (BlockAllocator):
  22670. (JSC::BlockAllocator::tryAllocateFromRegion): Helper function that encapsulates checking a particular list
  22671. of regions for a free block.
  22672. (JSC::BlockAllocator::allocate):
  22673. (JSC::BlockAllocator::allocateCustomSize): This function is responsible for allocating one-off custom size
  22674. regions for use in oversize allocations in both the MarkedSpace and the CopiedSpace. These regions are not
  22675. tracked by the BlockAllocator. The only pointer to them is in the HeapBlock that is returned. These regions
  22676. contain exactly one block.
  22677. (JSC::BlockAllocator::deallocate):
  22678. (JSC::BlockAllocator::deallocateCustomSize): This function is responsible for deallocating one-off custom size
  22679. regions. The regions are deallocated back to the OS eagerly.
  22680. * heap/CopiedBlock.h: Re-worked CopiedBlocks to use Regions instead of PageAllocationAligned.
  22681. (CopiedBlock):
  22682. (JSC::CopiedBlock::createNoZeroFill):
  22683. (JSC::CopiedBlock::create):
  22684. (JSC::CopiedBlock::CopiedBlock):
  22685. (JSC::CopiedBlock::payloadEnd):
  22686. (JSC::CopiedBlock::capacity):
  22687. * heap/CopiedSpace.cpp:
  22688. (JSC::CopiedSpace::~CopiedSpace):
  22689. (JSC::CopiedSpace::tryAllocateOversize):
  22690. (JSC::CopiedSpace::tryReallocateOversize):
  22691. (JSC::CopiedSpace::doneCopying):
  22692. * heap/CopiedSpaceInlineMethods.h:
  22693. (JSC::CopiedSpace::allocateBlockForCopyingPhase):
  22694. (JSC::CopiedSpace::allocateBlock):
  22695. * heap/HeapBlock.h:
  22696. (JSC::HeapBlock::destroy):
  22697. (JSC::HeapBlock::HeapBlock):
  22698. (JSC::HeapBlock::region):
  22699. (HeapBlock):
  22700. * heap/MarkedAllocator.cpp:
  22701. (JSC::MarkedAllocator::allocateBlock):
  22702. * heap/MarkedBlock.cpp:
  22703. (JSC::MarkedBlock::create):
  22704. (JSC::MarkedBlock::MarkedBlock):
  22705. * heap/MarkedBlock.h:
  22706. (JSC::MarkedBlock::capacity):
  22707. * heap/MarkedSpace.cpp:
  22708. (JSC::MarkedSpace::freeBlock):
  22709. 2012-10-11 Filip Pizlo <fpizlo@apple.com>
  22710. UInt32ToNumber and OSR exit should be aware of copy propagation and correctly recover both versions of a variable that was subject to a UInt32ToNumber cast
  22711. https://bugs.webkit.org/show_bug.cgi?id=99100
  22712. <rdar://problem/12480955>
  22713. Reviewed by Michael Saboff and Mark Hahnenberg.
  22714. Fixed by forcing UInt32ToNumber to use a different register. This "undoes" the copy propagation that we
  22715. would have been doing, since it has no performance effect in this case and has the benefit of making the
  22716. OSR exit compiler a lot simpler.
  22717. * dfg/DFGSpeculativeJIT.cpp:
  22718. (JSC::DFG::SpeculativeJIT::compileUInt32ToNumber):
  22719. 2012-10-11 Geoffrey Garen <ggaren@apple.com>
  22720. Removed some more static assumptions about inline object capacity
  22721. https://bugs.webkit.org/show_bug.cgi?id=98603
  22722. Reviewed by Filip Pizlo.
  22723. * dfg/DFGSpeculativeJIT.h:
  22724. (JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject): Use JSObject::allocationSize()
  22725. for a little more flexibility. We still pass it a constant inline capacity
  22726. because the JIT doesn't have a strategy for selecting a size class based
  22727. on non-constant capacity yet. "INLINE_STORAGE_CAPACITY" is a marker for
  22728. code that makes static assumptions about object size.
  22729. * jit/JITInlineMethods.h:
  22730. (JSC::JIT::emitAllocateBasicJSObject):
  22731. * llint/LLIntData.cpp:
  22732. (JSC::LLInt::Data::performAssertions):
  22733. * llint/LowLevelInterpreter32_64.asm:
  22734. * llint/LowLevelInterpreter64.asm: Ditto for the rest of our many execution engines.
  22735. * runtime/JSObject.h:
  22736. (JSC::JSObject::allocationSize):
  22737. (JSC::JSFinalObject::finishCreation):
  22738. (JSC::JSFinalObject::create): New helper function for computing object
  22739. size dynamically, since we plan to have objects of different sizes.
  22740. (JSC::JSFinalObject::JSFinalObject): Note that our m_inlineStorage used
  22741. to auto-generate an implicit C++ constructor with default null initialization.
  22742. This memory is not observed in its uninitialized state, and our LLInt and
  22743. JIT allocators do not initialize it, so I did not add any explicit code
  22744. to do so, now that the implicit code is gone.
  22745. (JSC::JSObject::offsetOfInlineStorage): Changed the math here to match
  22746. inlineStorageUnsafe(), since we can rely on an explicit data member anymore.
  22747. 2012-10-11 Geoffrey Garen <ggaren@apple.com>
  22748. Enable RUNTIME_HEURISTICS all the time, for easier testing
  22749. https://bugs.webkit.org/show_bug.cgi?id=99090
  22750. Reviewed by Filip Pizlo.
  22751. I find myself using this a lot, and there doesn't seem to be an obvious
  22752. reason to compile it out, since it only runs once at startup.
  22753. * runtime/Options.cpp:
  22754. (JSC::overrideOptionWithHeuristic):
  22755. (JSC::Options::initialize):
  22756. * runtime/Options.h: Removed the #ifdef.
  22757. 2012-10-11 Geoffrey Garen <ggaren@apple.com>
  22758. Removed ASSERT_CLASS_FITS_IN_CELL
  22759. https://bugs.webkit.org/show_bug.cgi?id=97634
  22760. Reviewed by Mark Hahnenberg.
  22761. Our collector now supports arbitrarily sized objects, so the ASSERT is not needed.
  22762. * API/JSCallbackFunction.cpp:
  22763. * API/JSCallbackObject.cpp:
  22764. * heap/MarkedSpace.h:
  22765. * jsc.cpp:
  22766. * runtime/Arguments.cpp:
  22767. * runtime/ArrayConstructor.cpp:
  22768. * runtime/ArrayPrototype.cpp:
  22769. * runtime/BooleanConstructor.cpp:
  22770. * runtime/BooleanObject.cpp:
  22771. * runtime/BooleanPrototype.cpp:
  22772. * runtime/DateConstructor.cpp:
  22773. * runtime/DatePrototype.cpp:
  22774. * runtime/Error.cpp:
  22775. * runtime/ErrorConstructor.cpp:
  22776. * runtime/ErrorPrototype.cpp:
  22777. * runtime/FunctionConstructor.cpp:
  22778. * runtime/FunctionPrototype.cpp:
  22779. * runtime/InternalFunction.cpp:
  22780. * runtime/JSActivation.cpp:
  22781. * runtime/JSArray.cpp:
  22782. * runtime/JSBoundFunction.cpp:
  22783. * runtime/JSFunction.cpp:
  22784. * runtime/JSGlobalObject.cpp:
  22785. * runtime/JSGlobalThis.cpp:
  22786. * runtime/JSNameScope.cpp:
  22787. * runtime/JSNotAnObject.cpp:
  22788. * runtime/JSONObject.cpp:
  22789. * runtime/JSObject.cpp:
  22790. * runtime/JSPropertyNameIterator.cpp:
  22791. * runtime/JSScope.cpp:
  22792. * runtime/JSWithScope.cpp:
  22793. * runtime/JSWrapperObject.cpp:
  22794. * runtime/MathObject.cpp:
  22795. * runtime/NameConstructor.cpp:
  22796. * runtime/NamePrototype.cpp:
  22797. * runtime/NativeErrorConstructor.cpp:
  22798. * runtime/NativeErrorPrototype.cpp:
  22799. * runtime/NumberConstructor.cpp:
  22800. * runtime/NumberObject.cpp:
  22801. * runtime/NumberPrototype.cpp:
  22802. * runtime/ObjectConstructor.cpp:
  22803. * runtime/ObjectPrototype.cpp:
  22804. * runtime/RegExpConstructor.cpp:
  22805. * runtime/RegExpMatchesArray.cpp:
  22806. * runtime/RegExpObject.cpp:
  22807. * runtime/RegExpPrototype.cpp:
  22808. * runtime/StringConstructor.cpp:
  22809. * runtime/StringObject.cpp:
  22810. * runtime/StringPrototype.cpp:
  22811. * testRegExp.cpp: Removed the ASSERT.
  22812. 2012-10-11 Filip Pizlo <fpizlo@apple.com>
  22813. DFG should inline code blocks that use new_array_buffer
  22814. https://bugs.webkit.org/show_bug.cgi?id=98996
  22815. Reviewed by Geoffrey Garen.
  22816. This adds plumbing to drop in constant buffers from the inlinees to the inliner.
  22817. It's smart about not duplicating buffers needlessly but doesn't try to completely
  22818. hash-cons them, either.
  22819. * bytecode/CodeBlock.h:
  22820. (JSC::CodeBlock::numberOfConstantBuffers):
  22821. (JSC::CodeBlock::addConstantBuffer):
  22822. (JSC::CodeBlock::constantBufferAsVector):
  22823. (JSC::CodeBlock::constantBuffer):
  22824. * dfg/DFGAbstractState.cpp:
  22825. (JSC::DFG::AbstractState::execute):
  22826. * dfg/DFGByteCodeParser.cpp:
  22827. (ConstantBufferKey):
  22828. (JSC::DFG::ConstantBufferKey::ConstantBufferKey):
  22829. (JSC::DFG::ConstantBufferKey::operator==):
  22830. (JSC::DFG::ConstantBufferKey::hash):
  22831. (JSC::DFG::ConstantBufferKey::isHashTableDeletedValue):
  22832. (JSC::DFG::ConstantBufferKey::codeBlock):
  22833. (JSC::DFG::ConstantBufferKey::index):
  22834. (DFG):
  22835. (JSC::DFG::ConstantBufferKeyHash::hash):
  22836. (JSC::DFG::ConstantBufferKeyHash::equal):
  22837. (ConstantBufferKeyHash):
  22838. (WTF):
  22839. (ByteCodeParser):
  22840. (InlineStackEntry):
  22841. (JSC::DFG::ByteCodeParser::parseBlock):
  22842. (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
  22843. * dfg/DFGCapabilities.h:
  22844. (JSC::DFG::canInlineOpcode):
  22845. * dfg/DFGOperations.cpp:
  22846. * dfg/DFGOperations.h:
  22847. * dfg/DFGSpeculativeJIT.h:
  22848. (JSC::DFG::SpeculativeJIT::callOperation):
  22849. * dfg/DFGSpeculativeJIT32_64.cpp:
  22850. (JSC::DFG::SpeculativeJIT::compile):
  22851. * dfg/DFGSpeculativeJIT64.cpp:
  22852. (JSC::DFG::SpeculativeJIT::compile):
  22853. 2012-10-10 Zoltan Horvath <zoltan@webkit.org>
  22854. Pageload tests should measure memory usage
  22855. https://bugs.webkit.org/show_bug.cgi?id=93958
  22856. Reviewed by Ryosuke Niwa.
  22857. Add JS Heap and Heap memory measurement to PageLoad tests.
  22858. * heap/HeapStatistics.cpp:
  22859. (JSC::HeapStatistics::usedJSHeap): Add new private function to expose the used JS Heap size.
  22860. (JSC):
  22861. * heap/HeapStatistics.h:
  22862. (HeapStatistics): Add new private function to expose the used JS Heap size.
  22863. 2012-10-10 Balazs Kilvady <kilvadyb@homejinni.com>
  22864. RegisterFile to JSStack rename fix for a struct member.
  22865. Compilation problem in debug build on MIPS
  22866. https://bugs.webkit.org/show_bug.cgi?id=98808
  22867. Reviewed by Alexey Proskuryakov.
  22868. In ASSERT conditions structure field name "registerFile" was replaced
  22869. with type name "JSStack" and it should be "stack".
  22870. * jit/JITStubs.cpp:
  22871. (JSC::JITThunks::JITThunks): structure member name fix.
  22872. 2012-10-10 Michael Saboff <msaboff@apple.com>
  22873. After r130344, OpaqueJSString::string() shouldn't directly return the wrapped String
  22874. https://bugs.webkit.org/show_bug.cgi?id=98801
  22875. Reviewed by Geoffrey Garen.
  22876. Return a copy of the wrapped String so that the wrapped string cannot be turned into
  22877. an Identifier.
  22878. * API/OpaqueJSString.cpp:
  22879. (OpaqueJSString::string):
  22880. * API/OpaqueJSString.h:
  22881. (OpaqueJSString):
  22882. 2012-10-10 Peter Gal <galpeter@inf.u-szeged.hu>
  22883. Add moveDoubleToInts and moveIntsToDouble to MacroAssemblerARM
  22884. https://bugs.webkit.org/show_bug.cgi?id=98855
  22885. Reviewed by Filip Pizlo.
  22886. Implement the missing moveDoubleToInts and moveIntsToDouble
  22887. methods in the MacroAssemblerARM after r130839.
  22888. * assembler/MacroAssemblerARM.h:
  22889. (JSC::MacroAssemblerARM::moveDoubleToInts):
  22890. (MacroAssemblerARM):
  22891. (JSC::MacroAssemblerARM::moveIntsToDouble):
  22892. 2012-10-09 Filip Pizlo <fpizlo@apple.com>
  22893. Typed arrays should not be 20x slower in the baseline JIT than in the DFG JIT
  22894. https://bugs.webkit.org/show_bug.cgi?id=98605
  22895. Reviewed by Oliver Hunt and Gavin Barraclough.
  22896. This adds typed array get_by_val/put_by_val patching to the baseline JIT. It's
  22897. a big (~40%) win on benchmarks that have trouble staying in the DFG JIT. Even
  22898. if we fix those benchmarks, this functionality gives us the insurance that we
  22899. typically desire with all speculative optimizations: even if we bail to
  22900. baseline, we're still reasonably performant.
  22901. * CMakeLists.txt:
  22902. * GNUmakefile.list.am:
  22903. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  22904. * JavaScriptCore.xcodeproj/project.pbxproj:
  22905. * Target.pri:
  22906. * assembler/MacroAssembler.cpp: Added.
  22907. (JSC):
  22908. * assembler/MacroAssembler.h:
  22909. (MacroAssembler):
  22910. (JSC::MacroAssembler::patchableBranchPtr):
  22911. * assembler/MacroAssemblerARMv7.h:
  22912. (MacroAssemblerARMv7):
  22913. (JSC::MacroAssemblerARMv7::moveDoubleToInts):
  22914. (JSC::MacroAssemblerARMv7::moveIntsToDouble):
  22915. (JSC::MacroAssemblerARMv7::patchableBranchPtr):
  22916. * assembler/MacroAssemblerX86.h:
  22917. (MacroAssemblerX86):
  22918. (JSC::MacroAssemblerX86::moveDoubleToInts):
  22919. (JSC::MacroAssemblerX86::moveIntsToDouble):
  22920. * bytecode/ByValInfo.h:
  22921. (JSC::hasOptimizableIndexingForClassInfo):
  22922. (JSC):
  22923. (JSC::hasOptimizableIndexing):
  22924. (JSC::jitArrayModeForClassInfo):
  22925. (JSC::jitArrayModeForStructure):
  22926. (JSC::ByValInfo::ByValInfo):
  22927. (ByValInfo):
  22928. * dfg/DFGAssemblyHelpers.cpp:
  22929. (DFG):
  22930. * dfg/DFGAssemblyHelpers.h:
  22931. (AssemblyHelpers):
  22932. (JSC::DFG::AssemblyHelpers::boxDouble):
  22933. (JSC::DFG::AssemblyHelpers::unboxDouble):
  22934. * dfg/DFGSpeculativeJIT.cpp:
  22935. (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
  22936. (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
  22937. * dfg/DFGSpeculativeJIT.h:
  22938. (SpeculativeJIT):
  22939. * jit/JIT.h:
  22940. (JIT):
  22941. * jit/JITPropertyAccess.cpp:
  22942. (JSC::JIT::emit_op_get_by_val):
  22943. (JSC::JIT::emit_op_put_by_val):
  22944. (JSC::JIT::privateCompileGetByVal):
  22945. (JSC::JIT::privateCompilePutByVal):
  22946. (JSC::JIT::emitIntTypedArrayGetByVal):
  22947. (JSC):
  22948. (JSC::JIT::emitFloatTypedArrayGetByVal):
  22949. (JSC::JIT::emitIntTypedArrayPutByVal):
  22950. (JSC::JIT::emitFloatTypedArrayPutByVal):
  22951. * jit/JITPropertyAccess32_64.cpp:
  22952. (JSC::JIT::emit_op_get_by_val):
  22953. (JSC::JIT::emit_op_put_by_val):
  22954. * jit/JITStubs.cpp:
  22955. (JSC::DEFINE_STUB_FUNCTION):
  22956. * runtime/JSCell.h:
  22957. * runtime/JSGlobalData.h:
  22958. (JSGlobalData):
  22959. (JSC::JSGlobalData::typedArrayDescriptor):
  22960. * runtime/TypedArrayDescriptor.h: Added.
  22961. (JSC):
  22962. (JSC::TypedArrayDescriptor::TypedArrayDescriptor):
  22963. (TypedArrayDescriptor):
  22964. 2012-10-09 Michael Saboff <msaboff@apple.com>
  22965. Add tests to testapi for null OpaqueJSStrings
  22966. https://bugs.webkit.org/show_bug.cgi?id=98805
  22967. Reviewed by Geoffrey Garen.
  22968. Added tests that check that OpaqueJSString, which is wrapped via JSStringRef, properly returns
  22969. null strings and that a null string in a JSStringRef will return a NULL JSChar* and 0 length
  22970. via the JSStringGetCharactersPtr() and JSStringGetLength() APIs respectively. Added a check that
  22971. JSValueMakeFromJSONString() properly handles a null string as well.
  22972. * API/tests/testapi.c:
  22973. (main):
  22974. 2012-10-09 Jian Li <jianli@chromium.org>
  22975. Update the CSS property used to support draggable regions.
  22976. https://bugs.webkit.org/show_bug.cgi?id=97156
  22977. Reviewed by Adam Barth.
  22978. The CSS property to support draggable regions, guarded under
  22979. WIDGET_REGION is now disabled from Mac WebKit, in order not to cause
  22980. confusion with DASHBOARD_SUPPORT feature.
  22981. * Configurations/FeatureDefines.xcconfig: Disable WIDGET_REGION feature.
  22982. 2012-10-09 Filip Pizlo <fpizlo@apple.com>
  22983. Unreviewed, adding forgotten files.
  22984. * bytecode/ByValInfo.h: Added.
  22985. (JSC):
  22986. (JSC::isOptimizableIndexingType):
  22987. (JSC::jitArrayModeForIndexingType):
  22988. (JSC::ByValInfo::ByValInfo):
  22989. (ByValInfo):
  22990. (JSC::getByValInfoBytecodeIndex):
  22991. * runtime/IndexingType.cpp: Added.
  22992. (JSC):
  22993. (JSC::indexingTypeToString):
  22994. 2012-10-08 Filip Pizlo <fpizlo@apple.com>
  22995. JSC should infer when indexed storage is contiguous, and optimize for it
  22996. https://bugs.webkit.org/show_bug.cgi?id=97288
  22997. Reviewed by Mark Hahnenberg.
  22998. This introduces a new kind of indexed property storage called Contiguous,
  22999. which has the following properties:
  23000. - No header bits beyond IndexedHeader. This results in a 16 byte reduction
  23001. in memory usage per array versus an ArrayStorage array. It also means
  23002. that the total memory usage for an empty array is now just 3 * 8 on both
  23003. 32-bit and 64-bit. Of that, only 8 bytes are array-specific; the rest is
  23004. our standard object header overhead.
  23005. - No need for hole checks on store. This results in a ~4% speed-up on
  23006. Kraken and a ~1% speed-up on V8v7.
  23007. - publicLength <= vectorLength. This means that doing new Array(blah)
  23008. immediately allocates room for blah elements.
  23009. - No sparse map or index bias.
  23010. If you ever do things to an array that would require publicLength >
  23011. vectorLength, a sparse map, or index bias, then we switch to ArrayStorage
  23012. mode. This seems to never happen in any benchmark we track, and is unlikely
  23013. to happen very frequently on any website.
  23014. * CMakeLists.txt:
  23015. * GNUmakefile.list.am:
  23016. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  23017. * JavaScriptCore.xcodeproj/project.pbxproj:
  23018. * Target.pri:
  23019. * assembler/AbstractMacroAssembler.h:
  23020. (JSC::AbstractMacroAssembler::JumpList::append):
  23021. * assembler/MacroAssembler.h:
  23022. (MacroAssembler):
  23023. (JSC::MacroAssembler::patchableBranchTest32):
  23024. * bytecode/ByValInfo.h: Added.
  23025. (JSC):
  23026. (JSC::isOptimizableIndexingType):
  23027. (JSC::jitArrayModeForIndexingType):
  23028. (JSC::ByValInfo::ByValInfo):
  23029. (ByValInfo):
  23030. (JSC::getByValInfoBytecodeIndex):
  23031. * bytecode/CodeBlock.h:
  23032. (CodeBlock):
  23033. (JSC::CodeBlock::getByValInfo):
  23034. (JSC::CodeBlock::setNumberOfByValInfos):
  23035. (JSC::CodeBlock::numberOfByValInfos):
  23036. (JSC::CodeBlock::byValInfo):
  23037. * bytecode/SamplingTool.h:
  23038. * dfg/DFGAbstractState.cpp:
  23039. (JSC::DFG::AbstractState::execute):
  23040. * dfg/DFGArrayMode.cpp:
  23041. (JSC::DFG::fromObserved):
  23042. (JSC::DFG::modeAlreadyChecked):
  23043. (JSC::DFG::modeToString):
  23044. * dfg/DFGArrayMode.h:
  23045. (DFG):
  23046. (JSC::DFG::modeUsesButterfly):
  23047. (JSC::DFG::modeIsJSArray):
  23048. (JSC::DFG::isInBoundsAccess):
  23049. (JSC::DFG::mayStoreToTail):
  23050. (JSC::DFG::mayStoreToHole):
  23051. (JSC::DFG::modeIsPolymorphic):
  23052. (JSC::DFG::polymorphicIncludesContiguous):
  23053. (JSC::DFG::polymorphicIncludesArrayStorage):
  23054. (JSC::DFG::canCSEStorage):
  23055. (JSC::DFG::modeSupportsLength):
  23056. (JSC::DFG::benefitsFromStructureCheck):
  23057. (JSC::DFG::isEffectful):
  23058. * dfg/DFGByteCodeParser.cpp:
  23059. (JSC::DFG::ByteCodeParser::handleIntrinsic):
  23060. * dfg/DFGCSEPhase.cpp:
  23061. (JSC::DFG::CSEPhase::getArrayLengthElimination):
  23062. (JSC::DFG::CSEPhase::getByValLoadElimination):
  23063. (JSC::DFG::CSEPhase::performNodeCSE):
  23064. * dfg/DFGFixupPhase.cpp:
  23065. (JSC::DFG::FixupPhase::fixupNode):
  23066. (JSC::DFG::FixupPhase::checkArray):
  23067. (JSC::DFG::FixupPhase::blessArrayOperation):
  23068. * dfg/DFGGraph.h:
  23069. (JSC::DFG::Graph::byValIsPure):
  23070. * dfg/DFGOperations.cpp:
  23071. * dfg/DFGOperations.h:
  23072. * dfg/DFGRepatch.cpp:
  23073. (JSC::DFG::tryCacheGetByID):
  23074. * dfg/DFGSpeculativeJIT.cpp:
  23075. (JSC::DFG::SpeculativeJIT::checkArray):
  23076. (JSC::DFG::SpeculativeJIT::arrayify):
  23077. (JSC::DFG::SpeculativeJIT::compileGetArrayLength):
  23078. (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal):
  23079. (DFG):
  23080. * dfg/DFGSpeculativeJIT.h:
  23081. (DFG):
  23082. (JSC::DFG::SpeculativeJIT::callOperation):
  23083. (SpeculativeJIT):
  23084. (JSC::DFG::SpeculativeJIT::putByValWillNeedExtraRegister):
  23085. (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal):
  23086. * dfg/DFGSpeculativeJIT32_64.cpp:
  23087. (JSC::DFG::SpeculativeJIT::compileContiguousGetByVal):
  23088. (DFG):
  23089. (JSC::DFG::SpeculativeJIT::compileArrayStorageGetByVal):
  23090. (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
  23091. (JSC::DFG::SpeculativeJIT::compileArrayStoragePutByVal):
  23092. (JSC::DFG::SpeculativeJIT::compile):
  23093. * dfg/DFGSpeculativeJIT64.cpp:
  23094. (JSC::DFG::SpeculativeJIT::compileContiguousGetByVal):
  23095. (DFG):
  23096. (JSC::DFG::SpeculativeJIT::compileArrayStorageGetByVal):
  23097. (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
  23098. (JSC::DFG::SpeculativeJIT::compileArrayStoragePutByVal):
  23099. (JSC::DFG::SpeculativeJIT::compile):
  23100. * interpreter/Interpreter.cpp:
  23101. (SamplingScope):
  23102. (JSC::SamplingScope::SamplingScope):
  23103. (JSC::SamplingScope::~SamplingScope):
  23104. (JSC):
  23105. (JSC::Interpreter::execute):
  23106. * jit/JIT.cpp:
  23107. (JSC::JIT::privateCompileSlowCases):
  23108. (JSC::JIT::privateCompile):
  23109. * jit/JIT.h:
  23110. (JSC::ByValCompilationInfo::ByValCompilationInfo):
  23111. (ByValCompilationInfo):
  23112. (JSC):
  23113. (JIT):
  23114. (JSC::JIT::compileGetByVal):
  23115. (JSC::JIT::compilePutByVal):
  23116. * jit/JITInlineMethods.h:
  23117. (JSC::JIT::emitAllocateJSArray):
  23118. (JSC::JIT::emitArrayProfileStoreToHoleSpecialCase):
  23119. (JSC):
  23120. (JSC::arrayProfileSaw):
  23121. (JSC::JIT::chooseArrayMode):
  23122. * jit/JITOpcodes.cpp:
  23123. (JSC::JIT::emitSlow_op_get_argument_by_val):
  23124. (JSC::JIT::emit_op_new_array):
  23125. (JSC::JIT::emitSlow_op_new_array):
  23126. * jit/JITOpcodes32_64.cpp:
  23127. (JSC::JIT::emitSlow_op_get_argument_by_val):
  23128. * jit/JITPropertyAccess.cpp:
  23129. (JSC::JIT::emit_op_get_by_val):
  23130. (JSC):
  23131. (JSC::JIT::emitContiguousGetByVal):
  23132. (JSC::JIT::emitArrayStorageGetByVal):
  23133. (JSC::JIT::emitSlow_op_get_by_val):
  23134. (JSC::JIT::emit_op_put_by_val):
  23135. (JSC::JIT::emitContiguousPutByVal):
  23136. (JSC::JIT::emitArrayStoragePutByVal):
  23137. (JSC::JIT::emitSlow_op_put_by_val):
  23138. (JSC::JIT::privateCompilePatchGetArrayLength):
  23139. (JSC::JIT::privateCompileGetByVal):
  23140. (JSC::JIT::privateCompilePutByVal):
  23141. * jit/JITPropertyAccess32_64.cpp:
  23142. (JSC::JIT::emit_op_get_by_val):
  23143. (JSC):
  23144. (JSC::JIT::emitContiguousGetByVal):
  23145. (JSC::JIT::emitArrayStorageGetByVal):
  23146. (JSC::JIT::emitSlow_op_get_by_val):
  23147. (JSC::JIT::emit_op_put_by_val):
  23148. (JSC::JIT::emitContiguousPutByVal):
  23149. (JSC::JIT::emitArrayStoragePutByVal):
  23150. (JSC::JIT::emitSlow_op_put_by_val):
  23151. * jit/JITStubs.cpp:
  23152. (JSC::getByVal):
  23153. (JSC):
  23154. (JSC::DEFINE_STUB_FUNCTION):
  23155. (JSC::putByVal):
  23156. * jit/JITStubs.h:
  23157. * llint/LowLevelInterpreter.asm:
  23158. * llint/LowLevelInterpreter32_64.asm:
  23159. * llint/LowLevelInterpreter64.asm:
  23160. * runtime/ArrayConventions.h:
  23161. (JSC::isDenseEnoughForVector):
  23162. * runtime/ArrayPrototype.cpp:
  23163. (JSC):
  23164. (JSC::shift):
  23165. (JSC::unshift):
  23166. (JSC::arrayProtoFuncPush):
  23167. (JSC::arrayProtoFuncShift):
  23168. (JSC::arrayProtoFuncSplice):
  23169. (JSC::arrayProtoFuncUnShift):
  23170. * runtime/Butterfly.h:
  23171. (Butterfly):
  23172. (JSC::Butterfly::fromPointer):
  23173. (JSC::Butterfly::pointer):
  23174. (JSC::Butterfly::publicLength):
  23175. (JSC::Butterfly::vectorLength):
  23176. (JSC::Butterfly::setPublicLength):
  23177. (JSC::Butterfly::setVectorLength):
  23178. (JSC::Butterfly::contiguous):
  23179. (JSC::Butterfly::fromContiguous):
  23180. * runtime/ButterflyInlineMethods.h:
  23181. (JSC::Butterfly::unshift):
  23182. (JSC::Butterfly::shift):
  23183. * runtime/IndexingHeaderInlineMethods.h:
  23184. (JSC::IndexingHeader::indexingPayloadSizeInBytes):
  23185. * runtime/IndexingType.cpp: Added.
  23186. (JSC):
  23187. (JSC::indexingTypeToString):
  23188. * runtime/IndexingType.h:
  23189. (JSC):
  23190. (JSC::hasContiguous):
  23191. * runtime/JSArray.cpp:
  23192. (JSC::JSArray::setLengthWithArrayStorage):
  23193. (JSC::JSArray::setLength):
  23194. (JSC):
  23195. (JSC::JSArray::pop):
  23196. (JSC::JSArray::push):
  23197. (JSC::JSArray::shiftCountWithArrayStorage):
  23198. (JSC::JSArray::shiftCountWithAnyIndexingType):
  23199. (JSC::JSArray::unshiftCountWithArrayStorage):
  23200. (JSC::JSArray::unshiftCountWithAnyIndexingType):
  23201. (JSC::JSArray::sortNumericVector):
  23202. (JSC::JSArray::sortNumeric):
  23203. (JSC::JSArray::sortCompactedVector):
  23204. (JSC::JSArray::sort):
  23205. (JSC::JSArray::sortVector):
  23206. (JSC::JSArray::fillArgList):
  23207. (JSC::JSArray::copyToArguments):
  23208. (JSC::JSArray::compactForSorting):
  23209. * runtime/JSArray.h:
  23210. (JSC::JSArray::shiftCountForShift):
  23211. (JSC::JSArray::shiftCountForSplice):
  23212. (JSArray):
  23213. (JSC::JSArray::shiftCount):
  23214. (JSC::JSArray::unshiftCountForShift):
  23215. (JSC::JSArray::unshiftCountForSplice):
  23216. (JSC::JSArray::unshiftCount):
  23217. (JSC::JSArray::isLengthWritable):
  23218. (JSC::createContiguousArrayButterfly):
  23219. (JSC):
  23220. (JSC::JSArray::create):
  23221. (JSC::JSArray::tryCreateUninitialized):
  23222. * runtime/JSGlobalObject.cpp:
  23223. (JSC::JSGlobalObject::reset):
  23224. (JSC):
  23225. (JSC::JSGlobalObject::haveABadTime):
  23226. (JSC::JSGlobalObject::visitChildren):
  23227. * runtime/JSGlobalObject.h:
  23228. (JSGlobalObject):
  23229. (JSC::JSGlobalObject::arrayStructureWithArrayStorage):
  23230. (JSC::JSGlobalObject::addressOfArrayStructureWithArrayStorage):
  23231. (JSC::constructEmptyArray):
  23232. * runtime/JSObject.cpp:
  23233. (JSC::JSObject::visitButterfly):
  23234. (JSC::JSObject::getOwnPropertySlotByIndex):
  23235. (JSC::JSObject::putByIndex):
  23236. (JSC::JSObject::enterDictionaryIndexingMode):
  23237. (JSC::JSObject::createInitialContiguous):
  23238. (JSC):
  23239. (JSC::JSObject::createArrayStorage):
  23240. (JSC::JSObject::convertContiguousToArrayStorage):
  23241. (JSC::JSObject::ensureContiguousSlow):
  23242. (JSC::JSObject::ensureArrayStorageSlow):
  23243. (JSC::JSObject::ensureIndexedStorageSlow):
  23244. (JSC::JSObject::ensureArrayStorageExistsAndEnterDictionaryIndexingMode):
  23245. (JSC::JSObject::switchToSlowPutArrayStorage):
  23246. (JSC::JSObject::setPrototype):
  23247. (JSC::JSObject::deletePropertyByIndex):
  23248. (JSC::JSObject::getOwnPropertyNames):
  23249. (JSC::JSObject::defineOwnIndexedProperty):
  23250. (JSC::JSObject::putByIndexBeyondVectorLengthContiguousWithoutAttributes):
  23251. (JSC::JSObject::putByIndexBeyondVectorLength):
  23252. (JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):
  23253. (JSC::JSObject::putDirectIndexBeyondVectorLength):
  23254. (JSC::JSObject::getNewVectorLength):
  23255. (JSC::JSObject::countElementsInContiguous):
  23256. (JSC::JSObject::increaseVectorLength):
  23257. (JSC::JSObject::ensureContiguousLengthSlow):
  23258. (JSC::JSObject::getOwnPropertyDescriptor):
  23259. * runtime/JSObject.h:
  23260. (JSC::JSObject::getArrayLength):
  23261. (JSC::JSObject::getVectorLength):
  23262. (JSC::JSObject::canGetIndexQuickly):
  23263. (JSC::JSObject::getIndexQuickly):
  23264. (JSC::JSObject::tryGetIndexQuickly):
  23265. (JSC::JSObject::canSetIndexQuickly):
  23266. (JSC::JSObject::canSetIndexQuicklyForPutDirect):
  23267. (JSC::JSObject::setIndexQuickly):
  23268. (JSC::JSObject::initializeIndex):
  23269. (JSC::JSObject::hasSparseMap):
  23270. (JSC::JSObject::inSparseIndexingMode):
  23271. (JSObject):
  23272. (JSC::JSObject::ensureContiguous):
  23273. (JSC::JSObject::ensureIndexedStorage):
  23274. (JSC::JSObject::ensureContiguousLength):
  23275. (JSC::JSObject::indexingData):
  23276. (JSC::JSObject::relevantLength):
  23277. * runtime/JSValue.cpp:
  23278. (JSC::JSValue::description):
  23279. * runtime/Options.cpp:
  23280. (JSC::Options::initialize):
  23281. * runtime/Structure.cpp:
  23282. (JSC::Structure::needsSlowPutIndexing):
  23283. (JSC):
  23284. (JSC::Structure::suggestedArrayStorageTransition):
  23285. * runtime/Structure.h:
  23286. (Structure):
  23287. * runtime/StructureTransitionTable.h:
  23288. (JSC::newIndexingType):
  23289. 2012-10-09 Michael Saboff <msaboff@apple.com>
  23290. After r130344, OpaqueJSString::identifier() adds wrapped String to identifier table
  23291. https://bugs.webkit.org/show_bug.cgi?id=98693
  23292. REGRESSION (r130344): Install failed in Install Environment
  23293. <rdar://problem/12450118>
  23294. Reviewed by Mark Rowe.
  23295. Use Identifier(LChar*, length) or Identifier(UChar*, length) constructors so that we don't
  23296. add the String instance in the OpaqueJSString to any identifier tables.
  23297. * API/OpaqueJSString.cpp:
  23298. (OpaqueJSString::identifier):
  23299. 2012-10-08 Mark Lam <mark.lam@apple.com>
  23300. Renamed RegisterFile to JSStack, and removed prototype of the
  23301. previously deleted Interpreter::privateExecute().
  23302. https://bugs.webkit.org/show_bug.cgi?id=98717.
  23303. Reviewed by Filip Pizlo.
  23304. * CMakeLists.txt:
  23305. * GNUmakefile.list.am:
  23306. * JavaScriptCore.order:
  23307. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  23308. * JavaScriptCore.xcodeproj/project.pbxproj:
  23309. * Target.pri:
  23310. * bytecode/BytecodeConventions.h:
  23311. * bytecode/CodeBlock.cpp:
  23312. (JSC::CodeBlock::nameForRegister):
  23313. * bytecode/CodeBlock.h:
  23314. (CodeBlock):
  23315. * bytecode/ValueRecovery.h:
  23316. (JSC::ValueRecovery::alreadyInJSStack):
  23317. (JSC::ValueRecovery::alreadyInJSStackAsUnboxedInt32):
  23318. (JSC::ValueRecovery::alreadyInJSStackAsUnboxedCell):
  23319. (JSC::ValueRecovery::alreadyInJSStackAsUnboxedBoolean):
  23320. (JSC::ValueRecovery::alreadyInJSStackAsUnboxedDouble):
  23321. (JSC::ValueRecovery::displacedInJSStack):
  23322. (JSC::ValueRecovery::isAlreadyInJSStack):
  23323. (JSC::ValueRecovery::virtualRegister):
  23324. (JSC::ValueRecovery::dump):
  23325. * bytecompiler/BytecodeGenerator.cpp:
  23326. (JSC::BytecodeGenerator::resolveCallee):
  23327. (JSC::BytecodeGenerator::emitCall):
  23328. (JSC::BytecodeGenerator::emitConstruct):
  23329. * bytecompiler/BytecodeGenerator.h:
  23330. (JSC::BytecodeGenerator::registerFor):
  23331. * dfg/DFGAbstractState.h:
  23332. (AbstractState):
  23333. * dfg/DFGAssemblyHelpers.h:
  23334. (JSC::DFG::AssemblyHelpers::emitGetFromCallFrameHeaderPtr):
  23335. (JSC::DFG::AssemblyHelpers::emitPutToCallFrameHeader):
  23336. (JSC::DFG::AssemblyHelpers::emitPutImmediateToCallFrameHeader):
  23337. * dfg/DFGByteCodeParser.cpp:
  23338. (JSC::DFG::ByteCodeParser::getDirect):
  23339. (JSC::DFG::ByteCodeParser::findArgumentPositionForLocal):
  23340. (JSC::DFG::ByteCodeParser::addCall):
  23341. (JSC::DFG::ByteCodeParser::InlineStackEntry::remapOperand):
  23342. (JSC::DFG::ByteCodeParser::handleInlining):
  23343. (JSC::DFG::ByteCodeParser::parseBlock):
  23344. (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
  23345. * dfg/DFGGenerationInfo.h:
  23346. (GenerationInfo):
  23347. (JSC::DFG::GenerationInfo::needsSpill):
  23348. * dfg/DFGGraph.h:
  23349. * dfg/DFGJITCompiler.cpp:
  23350. (JSC::DFG::JITCompiler::compileEntry):
  23351. (JSC::DFG::JITCompiler::compileFunction):
  23352. * dfg/DFGJITCompiler.h:
  23353. (JSC::DFG::JITCompiler::beginCall):
  23354. * dfg/DFGOSREntry.cpp:
  23355. (JSC::DFG::prepareOSREntry):
  23356. * dfg/DFGOSRExitCompiler32_64.cpp:
  23357. (JSC::DFG::OSRExitCompiler::compileExit):
  23358. * dfg/DFGOSRExitCompiler64.cpp:
  23359. (JSC::DFG::OSRExitCompiler::compileExit):
  23360. * dfg/DFGRepatch.cpp:
  23361. (JSC::DFG::tryBuildGetByIDList):
  23362. * dfg/DFGSpeculativeJIT.cpp:
  23363. (JSC::DFG::SpeculativeJIT::compile):
  23364. (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
  23365. (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):
  23366. * dfg/DFGSpeculativeJIT.h:
  23367. (SpeculativeJIT):
  23368. (JSC::DFG::SpeculativeJIT::spill):
  23369. * dfg/DFGSpeculativeJIT32_64.cpp:
  23370. (JSC::DFG::SpeculativeJIT::emitCall):
  23371. (JSC::DFG::SpeculativeJIT::compile):
  23372. * dfg/DFGSpeculativeJIT64.cpp:
  23373. (JSC::DFG::SpeculativeJIT::fillInteger):
  23374. (JSC::DFG::SpeculativeJIT::emitCall):
  23375. (JSC::DFG::SpeculativeJIT::compile):
  23376. * dfg/DFGThunks.cpp:
  23377. (JSC::DFG::throwExceptionFromCallSlowPathGenerator):
  23378. (JSC::DFG::slowPathFor):
  23379. (JSC::DFG::virtualForThunkGenerator):
  23380. * dfg/DFGValueSource.cpp:
  23381. (JSC::DFG::ValueSource::dump):
  23382. * dfg/DFGValueSource.h:
  23383. (JSC::DFG::dataFormatToValueSourceKind):
  23384. (JSC::DFG::valueSourceKindToDataFormat):
  23385. (JSC::DFG::isInJSStack):
  23386. (JSC::DFG::ValueSource::forSpeculation):
  23387. (JSC::DFG::ValueSource::isInJSStack):
  23388. (JSC::DFG::ValueSource::valueRecovery):
  23389. * dfg/DFGVariableEventStream.cpp:
  23390. (JSC::DFG::VariableEventStream::reconstruct):
  23391. * heap/Heap.cpp:
  23392. (JSC::Heap::stack):
  23393. (JSC::Heap::getConservativeRegisterRoots):
  23394. (JSC::Heap::markRoots):
  23395. * heap/Heap.h:
  23396. (JSC):
  23397. (Heap):
  23398. * interpreter/CallFrame.cpp:
  23399. (JSC::CallFrame::stack):
  23400. * interpreter/CallFrame.h:
  23401. (JSC::ExecState::calleeAsValue):
  23402. (JSC::ExecState::callee):
  23403. (JSC::ExecState::codeBlock):
  23404. (JSC::ExecState::scope):
  23405. (JSC::ExecState::callerFrame):
  23406. (JSC::ExecState::returnPC):
  23407. (JSC::ExecState::hasReturnPC):
  23408. (JSC::ExecState::clearReturnPC):
  23409. (JSC::ExecState::bytecodeOffsetForNonDFGCode):
  23410. (JSC::ExecState::setBytecodeOffsetForNonDFGCode):
  23411. (JSC::ExecState::inlineCallFrame):
  23412. (JSC::ExecState::codeOriginIndexForDFG):
  23413. (JSC::ExecState::currentVPC):
  23414. (JSC::ExecState::setCurrentVPC):
  23415. (JSC::ExecState::setCallerFrame):
  23416. (JSC::ExecState::setScope):
  23417. (JSC::ExecState::init):
  23418. (JSC::ExecState::argumentCountIncludingThis):
  23419. (JSC::ExecState::offsetFor):
  23420. (JSC::ExecState::setArgumentCountIncludingThis):
  23421. (JSC::ExecState::setCallee):
  23422. (JSC::ExecState::setCodeBlock):
  23423. (JSC::ExecState::setReturnPC):
  23424. (JSC::ExecState::setInlineCallFrame):
  23425. (ExecState):
  23426. * interpreter/Interpreter.cpp:
  23427. (JSC::Interpreter::slideRegisterWindowForCall):
  23428. (JSC::eval):
  23429. (JSC::loadVarargs):
  23430. (JSC::Interpreter::dumpRegisters):
  23431. (JSC::Interpreter::throwException):
  23432. (JSC::Interpreter::execute):
  23433. (JSC::Interpreter::executeCall):
  23434. (JSC::Interpreter::executeConstruct):
  23435. (JSC::Interpreter::prepareForRepeatCall):
  23436. (JSC::Interpreter::endRepeatCall):
  23437. * interpreter/Interpreter.h:
  23438. (JSC::Interpreter::stack):
  23439. (Interpreter):
  23440. (JSC::Interpreter::execute):
  23441. (JSC):
  23442. * interpreter/JSStack.cpp: Copied from Source/JavaScriptCore/interpreter/RegisterFile.cpp.
  23443. (JSC::stackStatisticsMutex):
  23444. (JSC::JSStack::~JSStack):
  23445. (JSC::JSStack::growSlowCase):
  23446. (JSC::JSStack::gatherConservativeRoots):
  23447. (JSC::JSStack::releaseExcessCapacity):
  23448. (JSC::JSStack::initializeThreading):
  23449. (JSC::JSStack::committedByteCount):
  23450. (JSC::JSStack::addToCommittedByteCount):
  23451. * interpreter/JSStack.h: Copied from Source/JavaScriptCore/interpreter/RegisterFile.h.
  23452. (JSStack):
  23453. (JSC::JSStack::JSStack):
  23454. (JSC::JSStack::shrink):
  23455. (JSC::JSStack::grow):
  23456. * interpreter/RegisterFile.cpp: Removed.
  23457. * interpreter/RegisterFile.h: Removed.
  23458. * interpreter/VMInspector.cpp:
  23459. (JSC::VMInspector::dumpFrame):
  23460. * jit/JIT.cpp:
  23461. (JSC::JIT::JIT):
  23462. (JSC::JIT::privateCompile):
  23463. * jit/JIT.h:
  23464. (JSC):
  23465. (JIT):
  23466. * jit/JITCall.cpp:
  23467. (JSC::JIT::compileLoadVarargs):
  23468. (JSC::JIT::compileCallEval):
  23469. (JSC::JIT::compileCallEvalSlowCase):
  23470. (JSC::JIT::compileOpCall):
  23471. * jit/JITCall32_64.cpp:
  23472. (JSC::JIT::emit_op_ret):
  23473. (JSC::JIT::emit_op_ret_object_or_this):
  23474. (JSC::JIT::compileLoadVarargs):
  23475. (JSC::JIT::compileCallEval):
  23476. (JSC::JIT::compileCallEvalSlowCase):
  23477. (JSC::JIT::compileOpCall):
  23478. * jit/JITCode.h:
  23479. (JSC):
  23480. (JSC::JITCode::execute):
  23481. * jit/JITInlineMethods.h:
  23482. (JSC::JIT::emitPutToCallFrameHeader):
  23483. (JSC::JIT::emitPutCellToCallFrameHeader):
  23484. (JSC::JIT::emitPutIntToCallFrameHeader):
  23485. (JSC::JIT::emitPutImmediateToCallFrameHeader):
  23486. (JSC::JIT::emitGetFromCallFrameHeaderPtr):
  23487. (JSC::JIT::emitGetFromCallFrameHeader32):
  23488. (JSC::JIT::updateTopCallFrame):
  23489. (JSC::JIT::unmap):
  23490. * jit/JITOpcodes.cpp:
  23491. (JSC::JIT::privateCompileCTIMachineTrampolines):
  23492. (JSC::JIT::privateCompileCTINativeCall):
  23493. (JSC::JIT::emit_op_end):
  23494. (JSC::JIT::emit_op_ret):
  23495. (JSC::JIT::emit_op_ret_object_or_this):
  23496. (JSC::JIT::emit_op_create_this):
  23497. (JSC::JIT::emit_op_get_arguments_length):
  23498. (JSC::JIT::emit_op_get_argument_by_val):
  23499. (JSC::JIT::emit_op_resolve_global_dynamic):
  23500. * jit/JITOpcodes32_64.cpp:
  23501. (JSC::JIT::privateCompileCTIMachineTrampolines):
  23502. (JSC::JIT::privateCompileCTINativeCall):
  23503. (JSC::JIT::emit_op_end):
  23504. (JSC::JIT::emit_op_create_this):
  23505. (JSC::JIT::emit_op_get_arguments_length):
  23506. (JSC::JIT::emit_op_get_argument_by_val):
  23507. * jit/JITPropertyAccess.cpp:
  23508. (JSC::JIT::emit_op_get_scoped_var):
  23509. (JSC::JIT::emit_op_put_scoped_var):
  23510. * jit/JITPropertyAccess32_64.cpp:
  23511. (JSC::JIT::emit_op_get_scoped_var):
  23512. (JSC::JIT::emit_op_put_scoped_var):
  23513. * jit/JITStubs.cpp:
  23514. (JSC::ctiTrampoline):
  23515. (JSC::JITThunks::JITThunks):
  23516. (JSC):
  23517. (JSC::DEFINE_STUB_FUNCTION):
  23518. * jit/JITStubs.h:
  23519. (JSC):
  23520. (JITStackFrame):
  23521. * jit/JSInterfaceJIT.h:
  23522. * jit/SpecializedThunkJIT.h:
  23523. (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
  23524. (JSC::SpecializedThunkJIT::returnJSValue):
  23525. (JSC::SpecializedThunkJIT::returnDouble):
  23526. (JSC::SpecializedThunkJIT::returnInt32):
  23527. (JSC::SpecializedThunkJIT::returnJSCell):
  23528. * llint/LLIntData.cpp:
  23529. (JSC::LLInt::Data::performAssertions):
  23530. * llint/LLIntOffsetsExtractor.cpp:
  23531. * llint/LLIntSlowPaths.cpp:
  23532. (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  23533. (JSC::LLInt::genericCall):
  23534. * llint/LLIntSlowPaths.h:
  23535. (LLInt):
  23536. * llint/LowLevelInterpreter.asm:
  23537. * runtime/Arguments.cpp:
  23538. (JSC::Arguments::tearOffForInlineCallFrame):
  23539. * runtime/CommonSlowPaths.h:
  23540. (JSC::CommonSlowPaths::arityCheckFor):
  23541. * runtime/InitializeThreading.cpp:
  23542. (JSC::initializeThreadingOnce):
  23543. * runtime/JSActivation.cpp:
  23544. (JSC::JSActivation::visitChildren):
  23545. * runtime/JSGlobalObject.cpp:
  23546. (JSC::JSGlobalObject::globalExec):
  23547. * runtime/JSGlobalObject.h:
  23548. (JSC):
  23549. (JSGlobalObject):
  23550. * runtime/JSLock.cpp:
  23551. (JSC):
  23552. * runtime/JSVariableObject.h:
  23553. (JSVariableObject):
  23554. * runtime/MemoryStatistics.cpp:
  23555. (JSC::globalMemoryStatistics):
  23556. 2012-10-08 Kiran Muppala <cmuppala@apple.com>
  23557. Throttle DOM timers on hidden pages.
  23558. https://bugs.webkit.org/show_bug.cgi?id=98474
  23559. Reviewed by Maciej Stachowiak.
  23560. Add HIDDEN_PAGE_DOM_TIMER_THROTTLING feature define.
  23561. * Configurations/FeatureDefines.xcconfig:
  23562. 2012-10-08 Michael Saboff <msaboff@apple.com>
  23563. After r130344, OpaqueJSString() creates an empty string which should be a null string
  23564. https://bugs.webkit.org/show_bug.cgi?id=98417
  23565. Reviewed by Sam Weinig.
  23566. Changed create() of a null string to return 0. This is the same behavior as before r130344.
  23567. * API/OpaqueJSString.cpp:
  23568. (OpaqueJSString::create):
  23569. 2012-10-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
  23570. Rename first/second to key/value in HashMap iterators
  23571. https://bugs.webkit.org/show_bug.cgi?id=82784
  23572. Reviewed by Eric Seidel.
  23573. * API/JSCallbackObject.h:
  23574. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
  23575. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
  23576. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
  23577. * API/JSCallbackObjectFunctions.h:
  23578. (JSC::::getOwnNonIndexPropertyNames):
  23579. * API/JSClassRef.cpp:
  23580. (OpaqueJSClass::~OpaqueJSClass):
  23581. (OpaqueJSClassContextData::OpaqueJSClassContextData):
  23582. (OpaqueJSClass::contextData):
  23583. * bytecode/CodeBlock.cpp:
  23584. (JSC::CodeBlock::dump):
  23585. (JSC::EvalCodeCache::visitAggregate):
  23586. (JSC::CodeBlock::nameForRegister):
  23587. * bytecode/JumpTable.h:
  23588. (JSC::StringJumpTable::offsetForValue):
  23589. (JSC::StringJumpTable::ctiForValue):
  23590. * bytecode/LazyOperandValueProfile.cpp:
  23591. (JSC::LazyOperandValueProfileParser::getIfPresent):
  23592. * bytecode/SamplingTool.cpp:
  23593. (JSC::SamplingTool::dump):
  23594. * bytecompiler/BytecodeGenerator.cpp:
  23595. (JSC::BytecodeGenerator::addVar):
  23596. (JSC::BytecodeGenerator::addGlobalVar):
  23597. (JSC::BytecodeGenerator::addConstant):
  23598. (JSC::BytecodeGenerator::addConstantValue):
  23599. (JSC::BytecodeGenerator::emitLoad):
  23600. (JSC::BytecodeGenerator::addStringConstant):
  23601. (JSC::BytecodeGenerator::emitLazyNewFunction):
  23602. * bytecompiler/NodesCodegen.cpp:
  23603. (JSC::PropertyListNode::emitBytecode):
  23604. * debugger/Debugger.cpp:
  23605. * dfg/DFGArgumentsSimplificationPhase.cpp:
  23606. (JSC::DFG::ArgumentsSimplificationPhase::run):
  23607. (JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUse):
  23608. (JSC::DFG::ArgumentsSimplificationPhase::observeProperArgumentsUse):
  23609. (JSC::DFG::ArgumentsSimplificationPhase::isOKToOptimize):
  23610. (JSC::DFG::ArgumentsSimplificationPhase::removeArgumentsReferencingPhantomChild):
  23611. * dfg/DFGAssemblyHelpers.cpp:
  23612. (JSC::DFG::AssemblyHelpers::decodedCodeMapFor):
  23613. * dfg/DFGByteCodeCache.h:
  23614. (JSC::DFG::ByteCodeCache::~ByteCodeCache):
  23615. (JSC::DFG::ByteCodeCache::get):
  23616. * dfg/DFGByteCodeParser.cpp:
  23617. (JSC::DFG::ByteCodeParser::cellConstant):
  23618. (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
  23619. * dfg/DFGStructureCheckHoistingPhase.cpp:
  23620. (JSC::DFG::StructureCheckHoistingPhase::run):
  23621. (JSC::DFG::StructureCheckHoistingPhase::noticeStructureCheck):
  23622. (JSC::DFG::StructureCheckHoistingPhase::noticeClobber):
  23623. * heap/Heap.cpp:
  23624. (JSC::Heap::markProtectedObjects):
  23625. * heap/Heap.h:
  23626. (JSC::Heap::forEachProtectedCell):
  23627. * heap/JITStubRoutineSet.cpp:
  23628. (JSC::JITStubRoutineSet::markSlow):
  23629. (JSC::JITStubRoutineSet::deleteUnmarkedJettisonedStubRoutines):
  23630. * heap/SlotVisitor.cpp:
  23631. (JSC::SlotVisitor::internalAppend):
  23632. * heap/Weak.h:
  23633. (JSC::weakRemove):
  23634. * jit/JIT.cpp:
  23635. (JSC::JIT::privateCompile):
  23636. * jit/JITStubs.cpp:
  23637. (JSC::JITThunks::ctiStub):
  23638. * parser/Parser.cpp:
  23639. (JSC::::parseStrictObjectLiteral):
  23640. * profiler/Profile.cpp:
  23641. (JSC::functionNameCountPairComparator):
  23642. (JSC::Profile::debugPrintDataSampleStyle):
  23643. * runtime/Identifier.cpp:
  23644. (JSC::Identifier::add):
  23645. * runtime/JSActivation.cpp:
  23646. (JSC::JSActivation::getOwnNonIndexPropertyNames):
  23647. (JSC::JSActivation::symbolTablePutWithAttributes):
  23648. * runtime/JSArray.cpp:
  23649. (JSC::JSArray::setLength):
  23650. * runtime/JSObject.cpp:
  23651. (JSC::JSObject::getOwnPropertySlotByIndex):
  23652. (JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists):
  23653. (JSC::JSObject::deletePropertyByIndex):
  23654. (JSC::JSObject::getOwnPropertyNames):
  23655. (JSC::JSObject::defineOwnIndexedProperty):
  23656. (JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype):
  23657. (JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage):
  23658. (JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):
  23659. (JSC::JSObject::getOwnPropertyDescriptor):
  23660. * runtime/JSSymbolTableObject.cpp:
  23661. (JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):
  23662. * runtime/JSSymbolTableObject.h:
  23663. (JSC::symbolTableGet):
  23664. (JSC::symbolTablePut):
  23665. (JSC::symbolTablePutWithAttributes):
  23666. * runtime/RegExpCache.cpp:
  23667. (JSC::RegExpCache::invalidateCode):
  23668. * runtime/SparseArrayValueMap.cpp:
  23669. (JSC::SparseArrayValueMap::putEntry):
  23670. (JSC::SparseArrayValueMap::putDirect):
  23671. (JSC::SparseArrayValueMap::visitChildren):
  23672. * runtime/WeakGCMap.h:
  23673. (JSC::WeakGCMap::clear):
  23674. (JSC::WeakGCMap::set):
  23675. * tools/ProfileTreeNode.h:
  23676. (JSC::ProfileTreeNode::sampleChild):
  23677. (JSC::ProfileTreeNode::childCount):
  23678. (JSC::ProfileTreeNode::dumpInternal):
  23679. (JSC::ProfileTreeNode::compareEntries):
  23680. 2012-10-05 Mark Hahnenberg <mhahnenberg@apple.com>
  23681. JSC should have a way to gather and log Heap memory use and pause times
  23682. https://bugs.webkit.org/show_bug.cgi?id=98431
  23683. Reviewed by Geoffrey Garen.
  23684. In order to improve our infrastructure for benchmark-driven development, we should
  23685. have a centralized method of gathering and logging various statistics about the state
  23686. of the JS heap. This would allow us to create and to use other tools to analyze the
  23687. output of the VM after running various workloads.
  23688. The first two statistics that might be interesting is memory use by JSC and GC pause
  23689. times. We can control whether this recording happens through the use of the Options
  23690. class, allowing us to either use environment variables or command line flags.
  23691. * JavaScriptCore.xcodeproj/project.pbxproj:
  23692. * heap/Heap.cpp:
  23693. (JSC::Heap::collect): If we finish a collection and are still over our set GC heap size,
  23694. we end the program immediately and report an error. Also added recording of pause times.
  23695. * heap/Heap.h:
  23696. (Heap):
  23697. (JSC::Heap::shouldCollect): When we set a specific GC heap size through Options, we
  23698. ignore all other heuristics on when we should collect and instead only ask if we're
  23699. greater than the amount specified in the Option value. This allows us to view time/memory
  23700. tradeoffs more clearly.
  23701. * heap/HeapStatistics.cpp: Added.
  23702. (JSC):
  23703. (JSC::HeapStatistics::initialize):
  23704. (JSC::HeapStatistics::recordGCPauseTime):
  23705. (JSC::HeapStatistics::logStatistics):
  23706. (JSC::HeapStatistics::exitWithFailure):
  23707. (JSC::HeapStatistics::reportSuccess):
  23708. (JSC::HeapStatistics::parseMemoryAmount):
  23709. (StorageStatistics):
  23710. (JSC::StorageStatistics::StorageStatistics):
  23711. (JSC::StorageStatistics::operator()):
  23712. (JSC::StorageStatistics::objectWithOutOfLineStorageCount):
  23713. (JSC::StorageStatistics::objectCount):
  23714. (JSC::StorageStatistics::storageSize):
  23715. (JSC::StorageStatistics::storageCapacity):
  23716. (JSC::HeapStatistics::showObjectStatistics): Moved the old showHeapStatistics (renamed to showObjectStatistics)
  23717. to try to start collecting our various memory statistics gathering/reporting mechanisms scattered throughout the
  23718. codebase into one place.
  23719. * heap/HeapStatistics.h: Added.
  23720. (JSC):
  23721. (HeapStatistics):
  23722. * jsc.cpp:
  23723. (main):
  23724. * runtime/InitializeThreading.cpp:
  23725. (JSC::initializeThreadingOnce): We need to initialize our data structures for recording
  23726. statistics if necessary.
  23727. * runtime/Options.cpp: Add new Options for the various types of statistics we'll be gathering.
  23728. (JSC::parse):
  23729. (JSC):
  23730. (JSC::Options::initialize): Initialize the various new options using environment variables.
  23731. (JSC::Options::dumpOption):
  23732. * runtime/Options.h:
  23733. (JSC):
  23734. 2012-10-04 Rik Cabanier <cabanier@adobe.com>
  23735. Turn Compositing on by default in WebKit build
  23736. https://bugs.webkit.org/show_bug.cgi?id=98315
  23737. Reviewed by Simon Fraser.
  23738. enable -webkit-blend-mode on trunk.
  23739. * Configurations/FeatureDefines.xcconfig:
  23740. 2012-10-04 Michael Saboff <msaboff@apple.com>
  23741. Crash in Safari at com.apple.JavaScriptCore: WTF::StringImpl::is8Bit const + 12
  23742. https://bugs.webkit.org/show_bug.cgi?id=98433
  23743. Reviewed by Jessie Berlin.
  23744. The problem is due to a String with a null StringImpl (i.e. a null string).
  23745. Added a length check before the is8Bit() check since length() checks for a null StringImpl. Changed the
  23746. characters16() call to characters() since it can handle a null StringImpl as well.
  23747. * API/JSValueRef.cpp:
  23748. (JSValueMakeFromJSONString):
  23749. 2012-10-04 Benjamin Poulain <bpoulain@apple.com>
  23750. Use copyLCharsFromUCharSource() for IdentifierLCharFromUCharTranslator translation
  23751. https://bugs.webkit.org/show_bug.cgi?id=98335
  23752. Reviewed by Michael Saboff.
  23753. Michael Saboff added an optimized version of UChar->LChar conversion in r125846.
  23754. Use this function in JSC::Identifier.
  23755. * runtime/Identifier.cpp:
  23756. (JSC::IdentifierLCharFromUCharTranslator::translate):
  23757. 2012-10-04 Michael Saboff <msaboff@apple.com>
  23758. After r130344, OpaqueJSString() creates a empty string which should be a null string
  23759. https://bugs.webkit.org/show_bug.cgi?id=98417
  23760. Reviewed by Alexey Proskuryakov.
  23761. Removed the setting of enclosed string to an empty string from default constructor.
  23762. Before changeset r130344, the semantic was the default constructor produced a null
  23763. string.
  23764. * API/OpaqueJSString.h:
  23765. (OpaqueJSString::OpaqueJSString):
  23766. 2012-10-04 Csaba Osztrogonác <ossy@webkit.org>
  23767. [Qt] Add missing LLInt dependencies to the build system
  23768. https://bugs.webkit.org/show_bug.cgi?id=98394
  23769. Reviewed by Geoffrey Garen.
  23770. * DerivedSources.pri:
  23771. * LLIntOffsetsExtractor.pro:
  23772. 2012-10-03 Geoffrey Garen <ggaren@apple.com>
  23773. Next step toward fixing Windows: add new symbol.
  23774. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  23775. 2012-10-03 Geoffrey Garen <ggaren@apple.com>
  23776. First step toward fixing Windows: remove old symbol.
  23777. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  23778. 2012-10-03 Geoffrey Garen <ggaren@apple.com>
  23779. Removed the assumption that "final" objects have a fixed number of inline slots
  23780. https://bugs.webkit.org/show_bug.cgi?id=98332
  23781. Reviewed by Filip Pizlo.
  23782. This is a step toward object size inference.
  23783. I replaced the inline storage capacity constant with a data member per
  23784. structure, set the the maximum supported value for the constant to 100,
  23785. then fixed what broke. (Note that even though this patch increases the
  23786. theoretical maximum inline capacity, it doesn't change any actual inline
  23787. capacity.)
  23788. * dfg/DFGSpeculativeJIT32_64.cpp:
  23789. (JSC::DFG::SpeculativeJIT::compile):
  23790. * dfg/DFGSpeculativeJIT64.cpp:
  23791. (JSC::DFG::SpeculativeJIT::compile):
  23792. * jit/JITPropertyAccess.cpp:
  23793. (JSC::JIT::compileGetDirectOffset): These functions just get a rename:
  23794. the constant they need is the first out of line offset along the offset
  23795. number line, which is not necessarily the same thing (and is, in this
  23796. patch, never the same thing) as the inline capacity of any given object.
  23797. (JSC::JIT::emit_op_get_by_pname):
  23798. * jit/JITPropertyAccess32_64.cpp: This function changes functionality,
  23799. since it needs to convert from the abstract offset number line to an
  23800. actual offset in memory, and it can't assume that inline and out-of-line
  23801. offsets are contiguous on the number line.
  23802. (JSC::JIT::compileGetDirectOffset): Updated for rename.
  23803. (JSC::JIT::emit_op_get_by_pname): Same as emit_op_get_by_pname above.
  23804. * llint/LowLevelInterpreter.asm: Updated to mirror changes in PropertyOffset.h,
  23805. since we duplicate values from there.
  23806. * llint/LowLevelInterpreter32_64.asm:
  23807. * llint/LowLevelInterpreter64.asm: Just like the JIT, most things are just
  23808. renames, and get_by_pname changes to do more math. I also standardized
  23809. offset calculations to use a hard-coded "-2", to match the JIT. This
  23810. isn't really better, but it makes global search and replace easier,
  23811. should we choose to refactor this code not to hard-code constants.
  23812. I also renamed loadPropertyAtVariableOffsetKnownNotFinal to
  23813. loadPropertyAtVariableOffsetKnownNotInline in order to sever the assumption
  23814. that inline capacity is tied to object type, and I changed the 64bit LLInt
  23815. to use this -- not using this previously seems to have been an oversight.
  23816. * runtime/JSObject.cpp:
  23817. (JSC::JSObject::visitChildren):
  23818. (JSC::JSFinalObject::visitChildren):
  23819. * runtime/JSObject.h:
  23820. (JSC::JSObject::offsetForLocation):
  23821. (JSNonFinalObject):
  23822. (JSC::JSFinalObject::createStructure):
  23823. (JSFinalObject):
  23824. (JSC::JSFinalObject::finishCreation): Updated for above changes.
  23825. * runtime/JSPropertyNameIterator.h:
  23826. (JSPropertyNameIterator):
  23827. (JSC::JSPropertyNameIterator::finishCreation): Store the inline capacity
  23828. of our object, since it's not a constant.
  23829. (JSC::JSPropertyNameIterator::getOffset): Removed. This function was
  23830. wrong. Luckily, it was also unused, since the C++ interpreter is gone.
  23831. * runtime/PropertyMapHashTable.h:
  23832. (PropertyTable): Use a helper function instead of hard-coding assumptions
  23833. about object types.
  23834. (JSC::PropertyTable::nextOffset):
  23835. * runtime/PropertyOffset.h:
  23836. (JSC):
  23837. (JSC::checkOffset):
  23838. (JSC::validateOffset):
  23839. (JSC::isInlineOffset):
  23840. (JSC::numberOfSlotsForLastOffset):
  23841. (JSC::propertyOffsetFor): Refactored these functions to take inline capacity
  23842. as an argument, since it's not fixed at compile time anymore.
  23843. * runtime/Structure.cpp:
  23844. (JSC::Structure::Structure):
  23845. (JSC::Structure::flattenDictionaryStructure):
  23846. (JSC::Structure::putSpecificValue):
  23847. * runtime/Structure.h:
  23848. (Structure):
  23849. (JSC::Structure::outOfLineCapacity):
  23850. (JSC::Structure::hasInlineStorage):
  23851. (JSC::Structure::inlineCapacity):
  23852. (JSC::Structure::inlineSize):
  23853. (JSC::Structure::firstValidOffset):
  23854. (JSC::Structure::lastValidOffset):
  23855. (JSC::Structure::create): Removed some hard-coded assumptions about inline
  23856. capacity and object type, and replaced with more liberal use of helper functions.
  23857. 2012-10-03 Michael Saboff <msaboff@apple.com>
  23858. OpaqueJSString doesn't optimally handle 8 bit strings
  23859. https://bugs.webkit.org/show_bug.cgi?id=98300
  23860. Reviewed by Geoffrey Garen.
  23861. Change OpaqueJSString to store and manage a String instead of a UChar buffer.
  23862. The member string is a copy of any string used during creation.
  23863. * API/OpaqueJSString.cpp:
  23864. (OpaqueJSString::create):
  23865. (OpaqueJSString::identifier):
  23866. * API/OpaqueJSString.h:
  23867. (OpaqueJSString::characters):
  23868. (OpaqueJSString::length):
  23869. (OpaqueJSString::string):
  23870. (OpaqueJSString::OpaqueJSString):
  23871. (OpaqueJSString):
  23872. 2012-10-03 Filip Pizlo <fpizlo@apple.com>
  23873. Array.splice should be fast when it is used to remove elements other than the very first
  23874. https://bugs.webkit.org/show_bug.cgi?id=98236
  23875. Reviewed by Michael Saboff.
  23876. Applied the same technique that was used to optimize the unshift case of splice in
  23877. http://trac.webkit.org/changeset/129676. This is a >20x speed-up on programs that
  23878. use splice for element removal.
  23879. * runtime/ArrayPrototype.cpp:
  23880. (JSC::shift):
  23881. * runtime/JSArray.cpp:
  23882. (JSC::JSArray::shiftCount):
  23883. * runtime/JSArray.h:
  23884. (JSArray):
  23885. 2012-09-16 Mark Hahnenberg <mhahnenberg@apple.com>
  23886. Delayed structure sweep can leak structures without bound
  23887. https://bugs.webkit.org/show_bug.cgi?id=96546
  23888. Reviewed by Geoffrey Garen.
  23889. This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only
  23890. allocators. We now have separate allocators for our three types of objects: those objects with no destructors,
  23891. those objects with destructors and with immortal structures, and those objects with destructors that don't have
  23892. immortal structures. All of the objects of the third type (destructors without immortal structures) now
  23893. inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores
  23894. the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction.
  23895. * API/JSCallbackConstructor.cpp: Use JSDestructibleObject for JSCallbackConstructor.
  23896. (JSC):
  23897. (JSC::JSCallbackConstructor::JSCallbackConstructor):
  23898. * API/JSCallbackConstructor.h:
  23899. (JSCallbackConstructor):
  23900. * API/JSCallbackObject.cpp: Inherit from JSDestructibleObject for normal JSCallbackObjects and use a finalizer for
  23901. JSCallbackObject<JSGlobalObject>, since JSGlobalObject also uses a finalizer.
  23902. (JSC):
  23903. (JSC::::create): We need to move the create function for JSCallbackObject<JSGlobalObject> out of line so we can add
  23904. the finalizer for it. We don't want to add the finalizer is something like finishCreation in case somebody decides
  23905. to subclass this. We use this same technique for many other subclasses of JSGlobalObject.
  23906. (JSC::::createStructure):
  23907. * API/JSCallbackObject.h:
  23908. (JSCallbackObject):
  23909. (JSC):
  23910. * API/JSClassRef.cpp: Change all the JSCallbackObject<JSNonFinalObject> to use JSDestructibleObject instead.
  23911. (OpaqueJSClass::prototype):
  23912. * API/JSObjectRef.cpp: Ditto.
  23913. (JSObjectMake):
  23914. (JSObjectGetPrivate):
  23915. (JSObjectSetPrivate):
  23916. (JSObjectGetPrivateProperty):
  23917. (JSObjectSetPrivateProperty):
  23918. (JSObjectDeletePrivateProperty):
  23919. * API/JSValueRef.cpp: Ditto.
  23920. (JSValueIsObjectOfClass):
  23921. * API/JSWeakObjectMapRefPrivate.cpp: Ditto.
  23922. * JSCTypedArrayStubs.h:
  23923. (JSC):
  23924. * JavaScriptCore.xcodeproj/project.pbxproj:
  23925. * dfg/DFGSpeculativeJIT.h: Use the proper allocator type when doing inline allocation in the DFG.
  23926. (JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject):
  23927. (JSC::DFG::SpeculativeJIT::emitAllocateJSFinalObject):
  23928. * heap/Heap.cpp:
  23929. (JSC):
  23930. * heap/Heap.h: Add accessors for the various types of allocators now. Also remove the isSafeToSweepStructures function
  23931. since it's always safe to sweep Structures now.
  23932. (JSC::Heap::allocatorForObjectWithNormalDestructor):
  23933. (JSC::Heap::allocatorForObjectWithImmortalStructureDestructor):
  23934. (Heap):
  23935. (JSC::Heap::allocateWithNormalDestructor):
  23936. (JSC):
  23937. (JSC::Heap::allocateWithImmortalStructureDestructor):
  23938. * heap/IncrementalSweeper.cpp: Remove all the logic to detect when it's safe to sweep Structures from the
  23939. IncrementalSweeper since it's always safe to sweep Structures now.
  23940. (JSC::IncrementalSweeper::IncrementalSweeper):
  23941. (JSC::IncrementalSweeper::sweepNextBlock):
  23942. (JSC::IncrementalSweeper::startSweeping):
  23943. (JSC::IncrementalSweeper::willFinishSweeping):
  23944. (JSC):
  23945. * heap/IncrementalSweeper.h:
  23946. (IncrementalSweeper):
  23947. * heap/MarkedAllocator.cpp: Remove the logic that was preventing us from sweeping Structures if it wasn't safe. Add
  23948. tracking of the specific destructor type of allocator.
  23949. (JSC::MarkedAllocator::tryAllocateHelper):
  23950. (JSC::MarkedAllocator::allocateBlock):
  23951. * heap/MarkedAllocator.h:
  23952. (JSC::MarkedAllocator::destructorType):
  23953. (MarkedAllocator):
  23954. (JSC::MarkedAllocator::MarkedAllocator):
  23955. (JSC::MarkedAllocator::init):
  23956. * heap/MarkedBlock.cpp: Add all the destructor type stuff to MarkedBlocks so that we do the right thing when sweeping.
  23957. We also use the stored destructor type to determine the right thing to do in all JSCell::classInfo() calls.
  23958. (JSC::MarkedBlock::create):
  23959. (JSC::MarkedBlock::MarkedBlock):
  23960. (JSC):
  23961. (JSC::MarkedBlock::specializedSweep):
  23962. (JSC::MarkedBlock::sweep):
  23963. (JSC::MarkedBlock::sweepHelper):
  23964. * heap/MarkedBlock.h:
  23965. (JSC):
  23966. (JSC::MarkedBlock::allocator):
  23967. (JSC::MarkedBlock::destructorType):
  23968. * heap/MarkedSpace.cpp: Add the new destructor allocators to MarkedSpace.
  23969. (JSC::MarkedSpace::MarkedSpace):
  23970. (JSC::MarkedSpace::resetAllocators):
  23971. (JSC::MarkedSpace::canonicalizeCellLivenessData):
  23972. (JSC::MarkedSpace::isPagedOut):
  23973. (JSC::MarkedSpace::freeBlock):
  23974. * heap/MarkedSpace.h:
  23975. (MarkedSpace):
  23976. (JSC::MarkedSpace::immortalStructureDestructorAllocatorFor):
  23977. (JSC::MarkedSpace::normalDestructorAllocatorFor):
  23978. (JSC::MarkedSpace::allocateWithImmortalStructureDestructor):
  23979. (JSC::MarkedSpace::allocateWithNormalDestructor):
  23980. (JSC::MarkedSpace::forEachBlock):
  23981. * heap/SlotVisitor.cpp: Add include because the symbol was needed in an inlined function.
  23982. * jit/JIT.h: Make sure we use the correct allocator when doing inline allocations in the baseline JIT.
  23983. * jit/JITInlineMethods.h:
  23984. (JSC::JIT::emitAllocateBasicJSObject):
  23985. (JSC::JIT::emitAllocateJSFinalObject):
  23986. (JSC::JIT::emitAllocateJSArray):
  23987. * jsc.cpp:
  23988. (GlobalObject::create): Add finalizer here since JSGlobalObject needs to use a finalizer instead of inheriting from
  23989. JSDestructibleObject.
  23990. * runtime/Arguments.cpp: Inherit from JSDestructibleObject.
  23991. (JSC):
  23992. * runtime/Arguments.h:
  23993. (Arguments):
  23994. (JSC::Arguments::Arguments):
  23995. * runtime/ErrorPrototype.cpp: Added an assert to make sure we have a trivial destructor.
  23996. (JSC):
  23997. * runtime/Executable.h: Indicate that all of the Executable* classes have immortal Structures.
  23998. (JSC):
  23999. * runtime/InternalFunction.cpp: Inherit from JSDestructibleObject.
  24000. (JSC):
  24001. (JSC::InternalFunction::InternalFunction):
  24002. * runtime/InternalFunction.h:
  24003. (InternalFunction):
  24004. * runtime/JSCell.h: Added two static bools, needsDestruction and hasImmortalStructure, that classes can override
  24005. to indicate at compile time which part of the heap they should be allocated in.
  24006. (JSC::allocateCell): Use the appropriate allocator depending on the destructor type.
  24007. * runtime/JSDestructibleObject.h: Added. New class that stores the ClassInfo of any subclass so that it can be
  24008. accessed safely when the object is being destroyed.
  24009. (JSC):
  24010. (JSDestructibleObject):
  24011. (JSC::JSDestructibleObject::classInfo):
  24012. (JSC::JSDestructibleObject::JSDestructibleObject):
  24013. (JSC::JSCell::classInfo): Checks the current MarkedBlock to see where it should get the ClassInfo from so that it's always safe.
  24014. * runtime/JSGlobalObject.cpp: JSGlobalObject now uses a finalizer instead of a destructor so that it can avoid forcing all
  24015. of its relatives in the inheritance hierarchy (e.g. JSScope) to use destructors as well.
  24016. (JSC::JSGlobalObject::reset):
  24017. * runtime/JSGlobalObject.h:
  24018. (JSGlobalObject):
  24019. (JSC::JSGlobalObject::createRareDataIfNeeded): Since we always create a finalizer now, we don't have to worry about adding one
  24020. for the m_rareData field when it's created.
  24021. (JSC::JSGlobalObject::create):
  24022. (JSC):
  24023. * runtime/JSGlobalThis.h: Inherit from JSDestructibleObject.
  24024. (JSGlobalThis):
  24025. (JSC::JSGlobalThis::JSGlobalThis):
  24026. * runtime/JSPropertyNameIterator.h: Has an immortal Structure.
  24027. (JSC):
  24028. * runtime/JSScope.cpp:
  24029. (JSC):
  24030. * runtime/JSString.h: Has an immortal Structure.
  24031. (JSC):
  24032. * runtime/JSWrapperObject.h: Inherit from JSDestructibleObject.
  24033. (JSWrapperObject):
  24034. (JSC::JSWrapperObject::JSWrapperObject):
  24035. * runtime/MathObject.cpp: Cleaning up some of the inheritance stuff.
  24036. (JSC):
  24037. * runtime/NameInstance.h: Inherit from JSDestructibleObject.
  24038. (NameInstance):
  24039. * runtime/RegExp.h: Has immortal Structure.
  24040. (JSC):
  24041. * runtime/RegExpObject.cpp: Inheritance cleanup.
  24042. (JSC):
  24043. * runtime/SparseArrayValueMap.h: Has immortal Structure.
  24044. (JSC):
  24045. * runtime/Structure.h: Has immortal Structure.
  24046. (JSC):
  24047. * runtime/StructureChain.h: Ditto.
  24048. (JSC):
  24049. * runtime/SymbolTable.h: Ditto.
  24050. (SharedSymbolTable):
  24051. (JSC):
  24052. == Rolled over to ChangeLog-2012-10-02 ==