ChangeLog-2011-02-16 938 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629
  1. 2011-02-15 Gavin Barraclough <barraclough@apple.com>
  2. Reviewed by Geoff Garen.
  3. Bug 54524 - Allow JSObject to fully utilize cell's capacity for inline storage.
  4. Currently JSObject is both directly instantiated for regular JS objects, and
  5. derived to implement subtypes. A consequence of this is that we need to ensure
  6. that sufficient space from the cell is left unused and available for any data
  7. members that will be introduced by subclasses of JSObject. By restructuring
  8. the internal storage array out of JSObject we can increase the size in the
  9. internal storage for regular objects.
  10. Add classes JSFinalObject and JSNonFinalObject. JSNonFinalObject retains as
  11. much additional capacity as is currently available to allow for data members
  12. in subclasses. JSFinalObject utilizes all available space for internal storage,
  13. and only allows construction through JSFinalObject::create().
  14. The additional storage made available in the JSObject means that we need no
  15. longer rely on a union of the internal storage with a pointer to storage that
  16. is only valid for external storage. This means we can go back to always having
  17. a valid pointer to property storage, regardless of whether this is internal or
  18. external. This simplifies some cases of access to the array from C code, and
  19. significantly simplifies JIT access, since repatching no longer needs to be
  20. able to change between a load of the storage pointer / a LEA of the internal
  21. storage.
  22. * API/JSObjectRef.cpp:
  23. (JSObjectMake):
  24. * assembler/ARMAssembler.h:
  25. * assembler/ARMv7Assembler.h:
  26. * assembler/AbstractMacroAssembler.h:
  27. (JSC::AbstractMacroAssembler::repatchPointer):
  28. * assembler/MIPSAssembler.h:
  29. * assembler/MacroAssemblerARM.h:
  30. * assembler/MacroAssemblerARMv7.h:
  31. * assembler/MacroAssemblerMIPS.h:
  32. * assembler/MacroAssemblerX86.h:
  33. * assembler/MacroAssemblerX86_64.h:
  34. * assembler/RepatchBuffer.h:
  35. * assembler/X86Assembler.h:
  36. * debugger/DebuggerActivation.cpp:
  37. (JSC::DebuggerActivation::DebuggerActivation):
  38. * debugger/DebuggerActivation.h:
  39. * interpreter/Interpreter.cpp:
  40. (JSC::Interpreter::privateExecute):
  41. * jit/JIT.h:
  42. * jit/JITOpcodes.cpp:
  43. (JSC::JIT::emit_op_resolve_global):
  44. * jit/JITOpcodes32_64.cpp:
  45. (JSC::JIT::emit_op_resolve_global):
  46. * jit/JITPropertyAccess.cpp:
  47. (JSC::JIT::compileGetDirectOffset):
  48. (JSC::JIT::emit_op_get_by_pname):
  49. (JSC::JIT::compileGetByIdHotPath):
  50. (JSC::JIT::emit_op_put_by_id):
  51. (JSC::JIT::compilePutDirectOffset):
  52. (JSC::JIT::patchGetByIdSelf):
  53. (JSC::JIT::patchPutByIdReplace):
  54. (JSC::JIT::privateCompileGetByIdProto):
  55. (JSC::JIT::privateCompileGetByIdSelfList):
  56. (JSC::JIT::privateCompileGetByIdProtoList):
  57. (JSC::JIT::privateCompileGetByIdChainList):
  58. (JSC::JIT::privateCompileGetByIdChain):
  59. * jit/JITPropertyAccess32_64.cpp:
  60. (JSC::JIT::compileGetByIdHotPath):
  61. (JSC::JIT::emit_op_put_by_id):
  62. (JSC::JIT::compilePutDirectOffset):
  63. (JSC::JIT::compileGetDirectOffset):
  64. (JSC::JIT::patchGetByIdSelf):
  65. (JSC::JIT::patchPutByIdReplace):
  66. (JSC::JIT::privateCompileGetByIdProto):
  67. (JSC::JIT::privateCompileGetByIdSelfList):
  68. (JSC::JIT::privateCompileGetByIdProtoList):
  69. (JSC::JIT::privateCompileGetByIdChainList):
  70. (JSC::JIT::privateCompileGetByIdChain):
  71. (JSC::JIT::emit_op_get_by_pname):
  72. * jit/JITStubs.cpp:
  73. (JSC::DEFINE_STUB_FUNCTION):
  74. * runtime/Arguments.h:
  75. (JSC::Arguments::Arguments):
  76. * runtime/ErrorInstance.cpp:
  77. (JSC::ErrorInstance::ErrorInstance):
  78. * runtime/ErrorInstance.h:
  79. * runtime/ExceptionHelpers.cpp:
  80. (JSC::InterruptedExecutionError::InterruptedExecutionError):
  81. (JSC::TerminatedExecutionError::TerminatedExecutionError):
  82. * runtime/JSArray.cpp:
  83. (JSC::JSArray::JSArray):
  84. * runtime/JSArray.h:
  85. * runtime/JSByteArray.cpp:
  86. (JSC::JSByteArray::JSByteArray):
  87. * runtime/JSByteArray.h:
  88. (JSC::JSByteArray::JSByteArray):
  89. * runtime/JSFunction.cpp:
  90. (JSC::JSFunction::getOwnPropertySlot):
  91. * runtime/JSGlobalData.cpp:
  92. (JSC::JSGlobalData::JSGlobalData):
  93. * runtime/JSGlobalObject.h:
  94. (JSC::constructEmptyObject):
  95. * runtime/JSNotAnObject.h:
  96. (JSC::JSNotAnObject::JSNotAnObject):
  97. * runtime/JSObject.cpp:
  98. (JSC::JSObject::createInheritorID):
  99. (JSC::JSObject::allocatePropertyStorage):
  100. * runtime/JSObject.h:
  101. (JSC::JSObject::propertyStorage):
  102. (JSC::JSNonFinalObject::JSNonFinalObject):
  103. (JSC::JSNonFinalObject::createStructure):
  104. (JSC::JSFinalObject::create):
  105. (JSC::JSFinalObject::createStructure):
  106. (JSC::JSFinalObject::JSFinalObject):
  107. (JSC::JSObject::offsetOfInlineStorage):
  108. (JSC::constructEmptyObject):
  109. (JSC::createEmptyObjectStructure):
  110. (JSC::JSObject::JSObject):
  111. (JSC::JSObject::~JSObject):
  112. (JSC::Structure::isUsingInlineStorage):
  113. * runtime/JSObjectWithGlobalObject.cpp:
  114. (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
  115. * runtime/JSObjectWithGlobalObject.h:
  116. (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
  117. * runtime/JSTypeInfo.h:
  118. (JSC::TypeInfo::TypeInfo):
  119. (JSC::TypeInfo::isVanilla):
  120. * runtime/JSVariableObject.h:
  121. (JSC::JSVariableObject::JSVariableObject):
  122. * runtime/JSWrapperObject.h:
  123. (JSC::JSWrapperObject::JSWrapperObject):
  124. * runtime/ObjectConstructor.cpp:
  125. (JSC::constructObject):
  126. * runtime/ObjectPrototype.cpp:
  127. (JSC::ObjectPrototype::ObjectPrototype):
  128. * runtime/ObjectPrototype.h:
  129. * runtime/StrictEvalActivation.cpp:
  130. (JSC::StrictEvalActivation::StrictEvalActivation):
  131. * runtime/StrictEvalActivation.h:
  132. * runtime/Structure.cpp:
  133. (JSC::Structure::Structure):
  134. (JSC::Structure::growPropertyStorageCapacity):
  135. 2011-02-16 Oliver Hunt <oliver@apple.com>
  136. Reviewed by Geoff Garen.
  137. Incorrect handling of global writes in dynamic contexts
  138. https://bugs.webkit.org/show_bug.cgi?id=49383
  139. * interpreter/Interpreter.cpp:
  140. (JSC::Interpreter::privateExecute):
  141. Can't use the existing callframe to return an uncaught exception
  142. as by definition that callframe has already been torn down.
  143. * parser/ASTBuilder.h:
  144. (JSC::ASTBuilder::ASTBuilder):
  145. (JSC::ASTBuilder::varDeclarations):
  146. (JSC::ASTBuilder::funcDeclarations):
  147. (JSC::ASTBuilder::features):
  148. (JSC::ASTBuilder::numConstants):
  149. (JSC::ASTBuilder::createFuncDeclStatement):
  150. (JSC::ASTBuilder::addVar):
  151. (JSC::ASTBuilder::incConstants):
  152. (JSC::ASTBuilder::usesThis):
  153. (JSC::ASTBuilder::usesCatch):
  154. (JSC::ASTBuilder::usesClosures):
  155. (JSC::ASTBuilder::usesArguments):
  156. (JSC::ASTBuilder::usesAssignment):
  157. (JSC::ASTBuilder::usesWith):
  158. (JSC::ASTBuilder::usesEval):
  159. Don't need a vector of scopes in the ASTBuilder
  160. * runtime/Operations.h:
  161. (JSC::resolveBase):
  162. In strict mode the optimisation that we use to skip a lookup
  163. on the global object is incorrect and lead to us always
  164. disallowing global writes when we needed to do a dynamic slot
  165. lookup. Now the strict mode path actually checks for the
  166. property.
  167. 2011-02-15 Jon Honeycutt <jhoneycutt@apple.com>
  168. Windows build fix for
  169. https://bugs.webkit.org/show_bug.cgi?id=54415
  170. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  171. Remove deleted files.
  172. 2011-02-15 Oliver Hunt <oliver@apple.com>
  173. Fix EFL build for
  174. https://bugs.webkit.org/show_bug.cgi?id=54415
  175. * CMakeLists.txt:
  176. 2011-02-14 Oliver Hunt <oliver@apple.com>
  177. Reviewed by Gavin Barraclough and Geoff Garen.
  178. Refactor handles and weak pointers to become nicer and more automatic
  179. https://bugs.webkit.org/show_bug.cgi?id=54415
  180. Move to a true handle based mechanism for GC value protection. This
  181. also allows us to switch to a more sensible behaviour for weak pointers
  182. in which weak pointers are automatically updated.
  183. This allows us to remove the old (and convoluted) that required all
  184. objects that may be held by a weak reference to be aware of the reference
  185. and manually clear them in their destructors.
  186. This also adds a few new data types to JSC that we use to efficiently
  187. allocate and return the underlying handle storage.
  188. This patch is largely renaming and removing now unnecessary destructors
  189. from objects.
  190. * API/JSClassRef.cpp:
  191. (OpaqueJSClass::create):
  192. (OpaqueJSClassContextData::OpaqueJSClassContextData):
  193. (OpaqueJSClass::contextData):
  194. (OpaqueJSClass::prototype):
  195. * API/JSClassRef.h:
  196. * CMakeLists.txt:
  197. * GNUmakefile.am:
  198. * JavaScriptCore.exp:
  199. * JavaScriptCore.gypi:
  200. * JavaScriptCore.pro:
  201. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  202. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  203. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  204. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
  205. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  206. * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
  207. * JavaScriptCore.xcodeproj/project.pbxproj:
  208. * collector/handles/Global.h: Added.
  209. New Global handle type used to keep gc objects live, even if they're not
  210. marked.
  211. (JSC::Global::Global):
  212. (JSC::Global::~Global):
  213. (JSC::Global::set):
  214. We can only assign directly to a global from another global.
  215. In all other cases we need the JSGlobalData to be provided
  216. explicitly so we use a set function.
  217. (JSC::Global::operator=):
  218. (JSC::Global::clear):
  219. (JSC::Global::isHashTableDeletedValue):
  220. (JSC::Global::internalSet):
  221. * collector/handles/Handle.h: Added.
  222. Root "Handle" type used for immutable handles and to provide the basic
  223. APIs needed for pointer-like behaviour.
  224. (JSC::HandleBase::operator!):
  225. (JSC::HandleBase::operator UnspecifiedBoolType*):
  226. (JSC::HandleBase::isEmpty):
  227. (JSC::HandleBase::HandleBase):
  228. (JSC::HandleBase::slot):
  229. (JSC::HandleBase::invalidate):
  230. (JSC::HandleBase::setSlot):
  231. (JSC::HandleTypes::getFromSlot):
  232. (JSC::HandleTypes::toJSValue):
  233. (JSC::HandleTypes::validateUpcast):
  234. (JSC::HandleConverter::operator->):
  235. (JSC::HandleConverter::operator*):
  236. (JSC::Handle::Handle):
  237. (JSC::Handle::get):
  238. (JSC::Handle::wrapSlot):
  239. (JSC::operator==):
  240. (JSC::operator!=):
  241. * collector/handles/HandleHeap.cpp: Added.
  242. New heap for global handles.
  243. (JSC::HandleHeap::HandleHeap):
  244. (JSC::HandleHeap::grow):
  245. (JSC::HandleHeap::markStrongHandles):
  246. (JSC::HandleHeap::updateAfterMark):
  247. (JSC::HandleHeap::clearWeakPointers):
  248. (JSC::HandleHeap::writeBarrier):
  249. * collector/handles/HandleHeap.h: Added.
  250. (JSC::HandleHeap::heapFor):
  251. (JSC::HandleHeap::toHandle):
  252. (JSC::HandleHeap::toNode):
  253. (JSC::HandleHeap::allocate):
  254. (JSC::HandleHeap::deallocate):
  255. (JSC::HandleHeap::makeWeak):
  256. Convert a hard handle into weak handle that does not
  257. protect the object it points to.
  258. (JSC::HandleHeap::makeSelfDestroying):
  259. Converts a handle to a weak handle that will be returned
  260. to the free list when the referenced object dies.
  261. (JSC::HandleHeap::Node::Node):
  262. (JSC::HandleHeap::Node::slot):
  263. (JSC::HandleHeap::Node::handleHeap):
  264. (JSC::HandleHeap::Node::setFinalizer):
  265. (JSC::HandleHeap::Node::makeWeak):
  266. (JSC::HandleHeap::Node::isWeak):
  267. (JSC::HandleHeap::Node::makeSelfDestroying):
  268. (JSC::HandleHeap::Node::isSelfDestroying):
  269. (JSC::HandleHeap::Node::finalizer):
  270. (JSC::HandleHeap::Node::setPrev):
  271. (JSC::HandleHeap::Node::prev):
  272. (JSC::HandleHeap::Node::setNext):
  273. (JSC::HandleHeap::Node::next):
  274. * interpreter/Interpreter.cpp:
  275. (JSC::Interpreter::Interpreter):
  276. * interpreter/Interpreter.h:
  277. * interpreter/RegisterFile.cpp:
  278. (JSC::RegisterFile::globalObjectCollected):
  279. * interpreter/RegisterFile.h:
  280. (JSC::RegisterFile::RegisterFile):
  281. * runtime/GCHandle.cpp: Removed.
  282. * runtime/GCHandle.h: Removed.
  283. * runtime/Heap.cpp:
  284. (JSC::Heap::Heap):
  285. (JSC::Heap::destroy):
  286. (JSC::Heap::markRoots):
  287. * runtime/Heap.h:
  288. (JSC::Heap::allocateGlobalHandle):
  289. (JSC::Heap::reportExtraMemoryCost):
  290. * runtime/JSGlobalData.cpp:
  291. (JSC::JSGlobalData::JSGlobalData):
  292. * runtime/JSGlobalData.h:
  293. (JSC::JSGlobalData::allocateGlobalHandle):
  294. * runtime/JSGlobalObject.cpp:
  295. (JSC::JSGlobalObject::~JSGlobalObject):
  296. * runtime/JSPropertyNameIterator.cpp:
  297. (JSC::JSPropertyNameIterator::create):
  298. (JSC::JSPropertyNameIterator::~JSPropertyNameIterator):
  299. * runtime/JSPropertyNameIterator.h:
  300. (JSC::JSPropertyNameIterator::createStructure):
  301. (JSC::Structure::setEnumerationCache):
  302. (JSC::Structure::clearEnumerationCache):
  303. * runtime/Protect.h:
  304. * runtime/Structure.cpp:
  305. (JSC::Structure::~Structure):
  306. * runtime/Structure.h:
  307. * runtime/WeakGCPtr.h:
  308. (JSC::WeakGCPtrBase::get):
  309. (JSC::WeakGCPtrBase::clear):
  310. (JSC::WeakGCPtrBase::operator!):
  311. (JSC::WeakGCPtrBase::operator UnspecifiedBoolType*):
  312. (JSC::WeakGCPtrBase::~WeakGCPtrBase):
  313. (JSC::WeakGCPtrBase::WeakGCPtrBase):
  314. (JSC::WeakGCPtrBase::internalSet):
  315. (JSC::LazyWeakGCPtr::LazyWeakGCPtr):
  316. (JSC::LazyWeakGCPtr::set):
  317. (JSC::WeakGCPtr::WeakGCPtr):
  318. (JSC::WeakGCPtr::operator=):
  319. * runtime/WriteBarrier.h:
  320. * wtf/BlockStack.h: Added.
  321. (WTF::::BlockStack):
  322. (WTF::::~BlockStack):
  323. (WTF::::blocks):
  324. (WTF::::grow):
  325. (WTF::::shrink):
  326. * wtf/SentinelLinkedList.h: Added.
  327. (WTF::::SentinelLinkedList):
  328. (WTF::::begin):
  329. (WTF::::end):
  330. (WTF::::push):
  331. (WTF::::remove):
  332. * wtf/SinglyLinkedList.h: Added.
  333. (WTF::::SinglyLinkedList):
  334. (WTF::::isEmpty):
  335. (WTF::::push):
  336. (WTF::::pop):
  337. 2011-02-15 Pratik Solanki <psolanki@apple.com>
  338. Move WTF_USE_CFNETWORK to Platform.h
  339. https://bugs.webkit.org/show_bug.cgi?id=54168
  340. Reviewed by Darin Adler.
  341. * wtf/Platform.h: Define WTF_USE_CFNETWORK for Windows builds.
  342. 2011-02-15 Geoffrey Garen <ggaren@apple.com>
  343. Reviewed by Darin Adler.
  344. Moved MarkedBlock data members to the head of the block
  345. https://bugs.webkit.org/show_bug.cgi?id=54482
  346. This allows for a variable-sized tail, to accommodate oversized blocks.
  347. SunSpider reports no change.
  348. * runtime/JSCell.h:
  349. (JSC::JSCell::MarkedBlock::allocate):
  350. * runtime/MarkedBlock.cpp:
  351. (JSC::MarkedBlock::destroy):
  352. (JSC::MarkedBlock::MarkedBlock):
  353. (JSC::MarkedBlock::sweep):
  354. * runtime/MarkedBlock.h: Added missing element to the CELLS_PER_BLOCK
  355. calculation. This kind of error is why we want to migrate to the system
  356. described below.
  357. (JSC::roundUpToMultipleOf):
  358. (JSC::MarkedBlock::firstCell):
  359. (JSC::MarkedBlock::cells):
  360. (JSC::MarkedBlock::cellNumber): Use subtraction instead of masking to
  361. calculate cell number. The mask is no longer correct because the first
  362. cell is not at the head of the block.
  363. (JSC::MarkedBlock::forEach): Replaced m_cells data member with a cells()
  364. accessor. We want to use sizeof(MarkedBlock) to calculate the size of the
  365. block header, so we can't have an explicit data member to represent the block tail.
  366. Also replaced iteration from zero with iteration from startCell(), since
  367. the first N cells are now occupied by the header.
  368. * runtime/MarkedSpace.cpp:
  369. (JSC::MarkedSpace::MarkedSpace):
  370. (JSC::MarkedSpace::reset): Replaced iteration from zero as above.
  371. 2011-02-15 Chris Rogers <crogers@google.com>
  372. Reviewed by Alexey Proskuryakov.
  373. Fix Mutex::tryLock() on Windows to work properly with PlatformCondition::timedWait()
  374. https://bugs.webkit.org/show_bug.cgi?id=54408
  375. * wtf/ThreadingWin.cpp:
  376. (WTF::PlatformCondition::timedWait):
  377. 2011-02-15 Xan Lopez <xlopez@igalia.com>
  378. Reviewed by Martin Robinson.
  379. Remove some dead code in ARMv7
  380. https://bugs.webkit.org/show_bug.cgi?id=54461
  381. * assembler/ARMv7Assembler.h: remove dead code.
  382. 2011-02-14 Geoffrey Garen <ggaren@apple.com>
  383. Rubber-stamped by Gavin Barraclough.
  384. Some MarkedBlock refactoring.
  385. Made cells private.
  386. Renamed cells => m_cells
  387. marked => m_marks.
  388. * runtime/JSCell.h:
  389. (JSC::JSCell::MarkedBlock::allocate):
  390. * runtime/MarkedBlock.cpp:
  391. (JSC::MarkedBlock::destroy):
  392. (JSC::MarkedBlock::MarkedBlock):
  393. (JSC::MarkedBlock::sweep):
  394. * runtime/MarkedBlock.h:
  395. (JSC::MarkedBlock::isEmpty):
  396. (JSC::MarkedBlock::clearMarks):
  397. (JSC::MarkedBlock::markCount):
  398. (JSC::MarkedBlock::isMarked):
  399. (JSC::MarkedBlock::testAndSetMarked):
  400. (JSC::MarkedBlock::setMarked):
  401. (JSC::MarkedBlock::forEach):
  402. 2011-02-14 Adam Barth <abarth@webkit.org>
  403. Reviewed by Eric Seidel.
  404. Add basic parser for Content Security Policy
  405. https://bugs.webkit.org/show_bug.cgi?id=54379
  406. Add a constructor for copying a Vector into a String. I suspect there
  407. are a number of call sites that are doing this manually that would
  408. benefit from being moved to this API.
  409. * wtf/text/WTFString.h:
  410. (WTF::String::String):
  411. 2011-02-14 Pavel Podivilov <podivilov@chromium.org>
  412. Reviewed by Yury Semikhatsky.
  413. Web Inspector: use call frame column to determine execution line in source frame.
  414. https://bugs.webkit.org/show_bug.cgi?id=54001
  415. * wtf/text/TextPosition.h:
  416. (WTF::ZeroBasedNumber::convertAsOneBasedInt):
  417. 2011-02-13 Jeremy Moskovich <jeremy@chromium.org>
  418. Reviewed by Adam Barth.
  419. Add a compile-time option to completely disable WebArchive support.
  420. https://bugs.webkit.org/show_bug.cgi?id=52712
  421. Add an ENABLE(WEB_ARCHIVE) compile-time setting and use it for all WebArchive code.
  422. Ports Affected:
  423. WebArchive support is currently enabled for all ports that define PLATFORM(CF) apart from Qt.
  424. This patch preserves this behavior except that it also disables support in the Chromium port.
  425. * wtf/Platform.h: Add ENABLE_WEB_ARCHIVE definition and turn it off explicitly for Qt & Chromium ports.
  426. 2011-02-13 Cameron Zwarich <zwarich@apple.com>
  427. Reviewed by Dan Bernstein.
  428. Bug 53760 - JSC fails to build with TOT Clang
  429. https://bugs.webkit.org/show_bug.cgi?id=53760
  430. Fix -Woverloaded-virtual warnings. This is also a 6% speedup on the v8 raytrace
  431. benchmark; it is nothing-to-noise on everything else.
  432. * API/JSCallbackObject.h: Remove pointlessly overloaded method.
  433. * API/JSCallbackObjectFunctions.h: Ditto.
  434. * runtime/Arguments.cpp:
  435. (JSC::Arguments::put): Change signature to match the base class. This implementation
  436. was no longer being called by anyone. This wasn't noticed because it is merely an
  437. optimization of the base class' implementation.
  438. * runtime/Arguments.h: Ditto.
  439. 2011-02-12 Adam Barth <abarth@webkit.org>
  440. Reviewed by Mark Rowe.
  441. Use /dev/urandom as the OSRandomSource on OS(DARWIN)
  442. https://bugs.webkit.org/show_bug.cgi?id=54279
  443. I'm not sure it makes much of a difference whether we use arc4random or
  444. /dev/urandom on Mac. However, there's some aesthetic benefit to using
  445. the same underlying API on as many platforms as reasonable.
  446. * config.h:
  447. * wtf/OSRandomSource.cpp:
  448. (WTF::cryptographicallyRandomValuesFromOS):
  449. 2011-02-12 Adam Barth <abarth@webkit.org>
  450. Reviewed by Kenneth Russell.
  451. Enable ArrayBuffers by default
  452. https://bugs.webkit.org/show_bug.cgi?id=54310
  453. Export the required functions.
  454. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  455. 2011-02-11 Daniel Bates <dbates@rim.com>
  456. Reviewed by Geoffrey Garen.
  457. Remove explicit disable ENABLE_ASSEMBLER_WX_EXCLUSIVE on non-iOS ports
  458. https://bugs.webkit.org/show_bug.cgi?id=54107
  459. It is unnecessary to explicitly disable ENABLE_ASSEMBLER_WX_EXCLUSIVE
  460. by the definition of ENABLE().
  461. * wtf/Platform.h:
  462. 2011-02-11 Geoffrey Garen <ggaren@apple.com>
  463. Not reviewed.
  464. Randomly touch some build files in the hopes of fixing the Qt build.
  465. * JavaScriptCore.gypi:
  466. * JavaScriptCore.pri:
  467. * JavaScriptCore.pro:
  468. 2011-02-11 Geoffrey Garen <ggaren@apple.com>
  469. Reviewed by Sam Weinig.
  470. Garbage collection timer cycles forever, even when nothing is happening
  471. https://bugs.webkit.org/show_bug.cgi?id=54320
  472. (Rolling back in r78386 with the build fixed.)
  473. * runtime/GCActivityCallbackCF.cpp:
  474. (JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make
  475. our timer inert after forcing a GC, to avoid GC'ing repeatedly.
  476. 2011-02-11 Geoffrey Garen <ggaren@apple.com>
  477. Not reviewed.
  478. Used svn merge -r78386:78385 to roll out r78386 because it broke the build.
  479. * runtime/GCActivityCallbackCF.cpp:
  480. (JSC::DefaultGCActivityCallbackPlatformData::trigger):
  481. 2011-02-11 Geoffrey Garen <ggaren@apple.com>
  482. Reviewed by Sam Weinig.
  483. Garbage collection timer cycles forever, even when nothing is happening
  484. https://bugs.webkit.org/show_bug.cgi?id=54320
  485. * runtime/GCActivityCallbackCF.cpp:
  486. (JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make
  487. our timer inert after forcing a GC, to avoid GC'ing repeatedly.
  488. 2011-02-11 Geoffrey Garen <ggaren@apple.com>
  489. Try to fix the Windows build: added an exported symbol.
  490. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  491. 2011-02-11 Geoffrey Garen <ggaren@apple.com>
  492. Reviewed by Oliver Hunt.
  493. A little more encapsulation for the heap: Removed CollectorHeapIterator
  494. https://bugs.webkit.org/show_bug.cgi?id=54298
  495. CollectorHeapIterator is a God object that knows the internals of each
  496. of the pieces of the heap. This undermines the encapsulation I'm trying
  497. to achieve by splitting concepts into different classes.
  498. As an alternative, I've given each class a forEach iteration function,
  499. which takes a functor as an argument. Now, each class just needs to
  500. know how to iterate the things it knows about.
  501. * GNUmakefile.am:
  502. * JavaScriptCore.exp:
  503. * JavaScriptCore.gypi:
  504. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed CollectorHeapIterator.
  505. * debugger/Debugger.cpp:
  506. (JSC::Recompiler::Recompiler):
  507. (JSC::Recompiler::~Recompiler):
  508. (JSC::Recompiler::operator()):
  509. (JSC::Debugger::recompileAllJSFunctions): Updated to use forEach interface
  510. instead of an iterator.
  511. * runtime/CollectorHeapIterator.h: Removed.
  512. * runtime/Heap.cpp:
  513. (JSC::TypeCounter::TypeCounter):
  514. (JSC::TypeCounter::typeName):
  515. (JSC::TypeCounter::operator()):
  516. (JSC::TypeCounter::take):
  517. (JSC::Heap::protectedObjectTypeCounts):
  518. (JSC::Heap::objectTypeCounts): Added forEach and removed iterator.
  519. * runtime/Heap.h:
  520. (JSC::Heap::forEach):
  521. * runtime/JSGlobalData.cpp:
  522. (JSC::Recompiler::operator()):
  523. (JSC::JSGlobalData::recompileAllJSFunctions):
  524. * runtime/MarkedBlock.h:
  525. (JSC::MarkedBlock::forEach): Added forEach. Removed friend declaration
  526. for CollectorHeapIterator. Now, we can make all our data private and
  527. change it without breaking any other classes.
  528. * runtime/MarkedSpace.cpp:
  529. * runtime/MarkedSpace.h:
  530. (JSC::MarkedSpace::forEach): Added forEach and removed iterator.
  531. 2011-02-11 Adam Barth <abarth@webkit.org>
  532. Reviewed by Andreas Kling.
  533. CryptographicRandomNumber has its threading ifdefs backwards
  534. https://bugs.webkit.org/show_bug.cgi?id=54280
  535. Turns out we want the mutex when thread is enabled. :)
  536. * wtf/CryptographicallyRandomNumber.cpp:
  537. (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
  538. (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
  539. 2011-02-10 Adam Barth <abarth@webkit.org>
  540. Reviewed by Eric Seidel.
  541. WebKit should have a cryptographic RNG
  542. https://bugs.webkit.org/show_bug.cgi?id=22049
  543. Teach JavaScriptCore how to export this function.
  544. * JavaScriptCore.exp:
  545. * JavaScriptCore.xcodeproj/project.pbxproj:
  546. 2011-02-10 Geoffrey Garen <ggaren@apple.com>
  547. Reviewed by Sam Weinig.
  548. A little more encapsulation for MarkedBlock: Made all constants private
  549. so clients don't know whether allocations are fixed-sized or not
  550. https://bugs.webkit.org/show_bug.cgi?id=54270
  551. SunSpider reports no change.
  552. * runtime/CollectorHeapIterator.h:
  553. (JSC::CollectorHeapIterator::advance): Updated for removal of HeapConstants.
  554. * runtime/Error.cpp: Switched to using ASSERT_CLASS_FITS_IN_CELL, like
  555. all other classes.
  556. * runtime/Heap.cpp:
  557. (JSC::Heap::allocate): Updated for removal of HeapConstants.
  558. (JSC::Heap::reset): Updated to use size(), instead of calculating size
  559. on our own.
  560. * runtime/Heap.h: Moved the ASSERT here to MarkedBlock, since it enforces
  561. on special knowledge of fixed-sizery, which only MarkedBlock is supposed
  562. to know about.
  563. * runtime/JSCell.h:
  564. (JSC::JSCell::MarkedBlock::allocate): Updated for removal of HeapConstants.
  565. Also changed to reset nextCell to 0 at the end of a block, since that
  566. seems more consistent.
  567. * runtime/JSGlobalData.cpp:
  568. (JSC::JSGlobalData::storeVPtrs): Changed to use a fixed array of char.
  569. This hard-coded size is a little wonky, but the compiler will tell us
  570. if it's ever wrong, so I think it's OK.
  571. * runtime/MarkedBlock.cpp:
  572. (JSC::MarkedBlock::destroy):
  573. (JSC::MarkedBlock::MarkedBlock):
  574. (JSC::MarkedBlock::sweep): Updated for removal of HeapConstants.
  575. * runtime/MarkedBlock.h:
  576. (JSC::MarkedBlock::isEmpty):
  577. (JSC::MarkedBlock::clearMarks):
  578. (JSC::MarkedBlock::size):
  579. (JSC::MarkedBlock::capacity): Made constants private to this class.
  580. Removed HeapConstants. Added size() and capacity() functions.
  581. * runtime/MarkedSpace.cpp:
  582. (JSC::MarkedSpace::allocate):
  583. (JSC::MarkedSpace::objectCount):
  584. (JSC::MarkedSpace::size):
  585. (JSC::MarkedSpace::capacity):
  586. * runtime/MarkedSpace.h: Use MarkedBlock helper functions instead of
  587. direct knowledge of MarkedBlock internals.
  588. 2011-02-10 Geoffrey Garen <ggaren@apple.com>
  589. Reviewed by Sam Weinig.
  590. A little more encapsulation for MarkedBlock: Made mark bits private
  591. https://bugs.webkit.org/show_bug.cgi?id=54264
  592. SunSpider reports no change.
  593. * runtime/Heap.cpp:
  594. (JSC::Heap::markRoots):
  595. (JSC::Heap::reset): Renamed clearMarkBits => clearMarks, since clients
  596. don't need to know that marks are represented as bits. Renamed
  597. markedCells => markCount, since clients don't need to know that blocks
  598. are split into cells.
  599. * runtime/MarkedBlock.h:
  600. (JSC::MarkedBlock::isEmpty):
  601. (JSC::MarkedBlock::clearMarks):
  602. (JSC::MarkedBlock::markCount): New helper functions for encapsulating
  603. the information clients actually need.
  604. * runtime/MarkedSpace.cpp:
  605. (JSC::MarkedSpace::destroy):
  606. (JSC::MarkedSpace::shrink):
  607. (JSC::MarkedSpace::clearMarks):
  608. (JSC::MarkedSpace::markCount):
  609. (JSC::MarkedSpace::objectCount):
  610. * runtime/MarkedSpace.h: Use new helper functions instead of accessing
  611. MarkedBlock data directly.
  612. 2011-02-10 Michael Saboff <msaboff@apple.com>
  613. Reviewed by Geoffrey Garen.
  614. Cached JavaScript Parser Data Being Left in Memory Cache
  615. https://bugs.webkit.org/show_bug.cgi?id=54245
  616. Added clear method which removes SourceProviderCache items.
  617. Cleaned up extraneous whitespace.
  618. * JavaScriptCore.exp:
  619. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  620. * parser/SourceProviderCache.cpp:
  621. (JSC::SourceProviderCache::~SourceProviderCache):
  622. (JSC::SourceProviderCache::clear):
  623. (JSC::SourceProviderCache::byteSize):
  624. (JSC::SourceProviderCache::add):
  625. * parser/SourceProviderCache.h:
  626. 2011-02-10 Joseph Pecoraro <joepeck@webkit.org>
  627. Follow-up fix to r78291. I should pass (int) 0, not '0' to memset.
  628. * runtime/GCActivityCallbackCF.cpp:
  629. (JSC::DefaultGCActivityCallback::commonConstructor): fix mistaken post-review change.
  630. 2011-02-10 Joseph Pecoraro <joepeck@webkit.org>
  631. Reviewed by Geoffrey Garen.
  632. Make DefaultGCActivityCallback for PLATFORM(CF) Easier to Subclass
  633. https://bugs.webkit.org/show_bug.cgi?id=54257
  634. A subclass may want to specify the CFRunLoop that the Garbage Collection
  635. will happen on. It was difficult to manipulate this in a subclass because
  636. the current DefaultGCActivityCallback class does this in its constructor.
  637. This patch generalizes things a bit more so that a specific run loop can
  638. be passed in to the constructor. This makes it so all run loop management
  639. can stay in DefaultGCActivityCallback and a subclass can specify any runloop.
  640. * runtime/GCActivityCallback.h: expose a PLATFORM(CF) constructor that can
  641. specify the runloop GC can be scheduled on.
  642. * runtime/GCActivityCallbackCF.cpp:
  643. (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): two constructors,
  644. one that specifies the run loop and passes that on to commonConstructor and
  645. the old constructor defaults to the current run loop.
  646. (JSC::DefaultGCActivityCallback::commonConstructor): do normal construction,
  647. adding the timer to the given runloop.
  648. 2011-02-10 Geoffrey Garen <ggaren@apple.com>
  649. Reviewed by Oliver Hunt.
  650. A little more encapsulation for MarkedBlock: Moved allocate() and sweep() into MarkedBlock
  651. https://bugs.webkit.org/show_bug.cgi?id=54253
  652. SunSpider reports no change.
  653. * runtime/CollectorHeapIterator.h: Removed DeadObjectIterator, since it
  654. is now unused.
  655. * runtime/Heap.cpp:
  656. (JSC::Heap::reset): Moved the call to shrink() here, since it seems a
  657. little more clear for MarkedSpace's client to tell it explicitly when to
  658. shrink.
  659. * runtime/JSCell.h:
  660. (JSC::JSCell::MarkedBlock::allocate): Split out from MarkedSpace::allocate.
  661. * runtime/MarkedBlock.cpp:
  662. (JSC::MarkedBlock::sweep): Split out from MarkedSpace::sweep, and
  663. converted to more directly iterate a MarkedBlock based on knowing its
  664. internal structure.
  665. * runtime/MarkedBlock.h:
  666. * runtime/MarkedSpace.cpp:
  667. (JSC::MarkedSpace::allocate):
  668. (JSC::MarkedSpace::sweep):
  669. * runtime/MarkedSpace.h: Split out the code mentioned above.
  670. 2011-02-10 Patrick Gansterer <paroga@webkit.org>
  671. Reviewed by Andreas Kling.
  672. Fix compilation error on OpenBSD
  673. https://bugs.webkit.org/show_bug.cgi?id=53766
  674. Add a HAVE_STRNSTR in Platform.h and define it only on Darwin and FreeBSD.
  675. * wtf/Platform.h:
  676. * wtf/StringExtras.h: Use HAVE(STRNSTR) now.
  677. 2011-02-10 Adam Roben <aroben@apple.com>
  678. Print locations of assertions and logs in a way that Visual Studio understands
  679. With this change, double-clicking one of these locations in Visual Studio's Output Window
  680. will focus that line of code in the editor.
  681. Fixes <http://webkit.org/b/54208> Double-clicking locations of assertions/logs in Visual
  682. Studio's Output Window does nothing
  683. Reviewed by Alexey Proskuryakov.
  684. * wtf/Assertions.cpp:
  685. (printCallSite): Use OS(WINDOWS) instead of the meaningless OS(WIN). When we aren't using
  686. the debug CRT (and thus can't call _CrtDbgReport), print the file and line number using the
  687. same format that cl.exe uses when it prints compiler errors.
  688. 2011-02-10 Dan Bernstein <mitz@apple.com>
  689. LLVM Compiler build fix.
  690. * runtime/MarkedBlock.cpp:
  691. (JSC::MarkedBlock::create):
  692. 2011-02-10 Peter Varga <pvarga@webkit.org>
  693. Reviewed by Csaba Osztrogonác.
  694. Remove PCRE source from trunk
  695. https://bugs.webkit.org/show_bug.cgi?id=54188
  696. * Android.mk:
  697. * Android.v8.wtf.mk:
  698. * CMakeLists.txt:
  699. * DerivedSources.make:
  700. * DerivedSources.pro:
  701. * GNUmakefile.am:
  702. * JavaScriptCore.gypi:
  703. * JavaScriptCore.order:
  704. * JavaScriptCore.pri:
  705. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  706. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  707. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
  708. * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
  709. * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
  710. * JavaScriptCore.xcodeproj/project.pbxproj:
  711. * pcre/AUTHORS: Removed.
  712. * pcre/COPYING: Removed.
  713. * pcre/dftables: Removed.
  714. * pcre/pcre.h: Removed.
  715. * pcre/pcre.pri: Removed.
  716. * pcre/pcre_compile.cpp: Removed.
  717. * pcre/pcre_exec.cpp: Removed.
  718. * pcre/pcre_internal.h: Removed.
  719. * pcre/pcre_tables.cpp: Removed.
  720. * pcre/pcre_ucp_searchfuncs.cpp: Removed.
  721. * pcre/pcre_xclass.cpp: Removed.
  722. * pcre/ucpinternal.h: Removed.
  723. * pcre/ucptable.cpp: Removed.
  724. * wscript:
  725. 2011-02-10 Patrick Gansterer <paroga@webkit.org>
  726. Reviewed by Adam Barth.
  727. Add randomValuesFromOS for OS(WINDOWS)
  728. https://bugs.webkit.org/show_bug.cgi?id=54155
  729. Use CryptGenRandom for generating cryptographically secure random numbers.
  730. This will work on WinCE and MinGW too.
  731. * config.h:
  732. * wtf/OSRandomSource.cpp:
  733. (WTF::randomValuesFromOS):
  734. 2011-02-10 Jarred Nicholls <jarred@sencha.com>
  735. Reviewed by Adam Barth.
  736. REGRESSION(r78149): Return value of read() shouldn't be ignored.
  737. https://bugs.webkit.org/show_bug.cgi?id=54167
  738. stdio read should have its return value handled. Build error in gcc 4.4.5.
  739. * wtf/OSRandomSource.cpp:
  740. (WTF::randomValuesFromOS):
  741. 2011-02-10 Patrick Gansterer <paroga@webkit.org>
  742. Reviewed by Adam Barth.
  743. Rename randomValuesFromOS to cryptographicallyRandomValuesFromOS
  744. https://bugs.webkit.org/show_bug.cgi?id=54156
  745. randomValuesFromOS generates random numbers of cryptographic quality.
  746. Make this clear by adding "cryptographically" to the function name.
  747. * wtf/CryptographicallyRandomNumber.cpp:
  748. (WTF::ARC4Stream::ARC4RandomNumberGenerator::stir):
  749. * wtf/OSRandomSource.cpp:
  750. (WTF::cryptographicallyRandomValuesFromOS):
  751. * wtf/OSRandomSource.h:
  752. 2011-02-09 Mark Rowe <mrowe@apple.com>
  753. Reviewed by Sam Weinig.
  754. <rdar://problem/8805364> Malloc zone enumeration code should be safe in the face of errors from the memory reader.
  755. * wtf/FastMalloc.cpp:
  756. (WTF::PageHeapAllocator::recordAdministrativeRegions): Use the new helper function to walk the linked list safely.
  757. (WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Ditto.
  758. (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Ditto.
  759. (WTF::TCMallocStats::PageMapFreeObjectFinder::visit): Bail out if the span could not be read.
  760. (WTF::TCMallocStats::PageMapMemoryUsageRecorder::visit): Ditto.
  761. * wtf/MallocZoneSupport.h:
  762. (WTF::RemoteMemoryReader::operator()): Remove an assert that is not valid.
  763. (WTF::RemoteMemoryReader::nextEntryInLinkedList): Add a helper function for retrieving the next entry in
  764. a linked list. It maps a failed read of the remote memory in to a null pointer, which all callers can
  765. handle gracefully.
  766. 2011-02-09 Gavin Barraclough <barraclough@apple.com>
  767. Reviewed by Sam Weinig.
  768. Bug 54164 - Optimize global_var accesses on JSVALUE64
  769. Directly embed the pointer to d->registers, optimize out the load
  770. from the variable object, as we do already in JSVALUE32_64.
  771. This is a ~1.5% win on sunspidey.
  772. * jit/JIT.cpp:
  773. * jit/JIT.h:
  774. * jit/JITOpcodes.cpp:
  775. (JSC::JIT::emit_op_get_global_var):
  776. (JSC::JIT::emit_op_put_global_var):
  777. (JSC::JIT::emit_op_get_scoped_var):
  778. (JSC::JIT::emit_op_put_scoped_var):
  779. 2011-02-09 Geoffrey Garen <ggaren@apple.com>
  780. Reviewed by Oliver Hunt.
  781. A little more encapsulation for MarkedBlock: Made MarkedBlock responsible
  782. for its own initialization and destruction
  783. https://bugs.webkit.org/show_bug.cgi?id=54137
  784. * runtime/CollectorHeapIterator.h: Removed ObjectIterator since it is
  785. now unused.
  786. * runtime/JSCell.h: Maded MarkedBlock a friend so it can construct and
  787. destruct JSCells.
  788. * runtime/MarkedBlock.cpp:
  789. (JSC::MarkedBlock::create):
  790. (JSC::MarkedBlock::destroy):
  791. (JSC::MarkedBlock::MarkedBlock): Migrated initialization and destruction
  792. code from MarkedSpace, updating it not to use ObjectIterator. We don't
  793. want to use an abstract iterator since iteration will be unique to each
  794. block in the future.
  795. * runtime/MarkedBlock.h: Made the consructor private and moved it into
  796. the .cpp file because it's big now.
  797. * runtime/MarkedSpace.cpp:
  798. (JSC::MarkedSpace::allocateBlock):
  799. (JSC::MarkedSpace::freeBlock): Migrated code.
  800. * runtime/MarkedSpace.h:
  801. (JSC::CollectorHeap::collectorBlock): Keep a vector of MarkedBlock
  802. pointers instead of aligned allocations -- how MarkedBlocks are allocated
  803. is now an implementation detail of MarkedBlock.
  804. 2011-02-09 Adam Barth <abarth@webkit.org>
  805. Another attempt to fix the Qt Windows build.
  806. * config.h:
  807. * wtf/OSRandomSource.cpp:
  808. (WTF::randomValuesFromOS):
  809. 2011-02-09 Adam Barth <abarth@webkit.org>
  810. Attempt to fix the Qt Windows build.
  811. * wtf/OSRandomSource.cpp:
  812. (WTF::randomValuesFromOS):
  813. 2011-02-09 Adam Barth <abarth@webkit.org>
  814. Reviewed by Eric Seidel.
  815. Add WTF::cryptographicallyRandomNumber
  816. https://bugs.webkit.org/show_bug.cgi?id=54083
  817. Introduce a cryptographically strong random number generator to WTF.
  818. The random number generator is based on arc4random as found in:
  819. http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/crypt/arc4random.c?rev=1.22
  820. I've changed to source to WebKit style and abstracted the operating
  821. system interaction to OSRandomSource. We'll use this functionality to
  822. expose a cryptographically strong random number generator to
  823. JavaScript.
  824. * Android.mk:
  825. * Android.v8.wtf.mk:
  826. * GNUmakefile.am:
  827. * JavaScriptCore.gypi:
  828. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  829. * JavaScriptCore.xcodeproj/project.pbxproj:
  830. * config.h:
  831. * wtf/CMakeLists.txt:
  832. * wtf/CryptographicallyRandomNumber.cpp: Added.
  833. (WTF::initMutexIfNeeded):
  834. (WTF::init):
  835. (WTF::addRandomData):
  836. (WTF::stir):
  837. (WTF::stirIfNeeded):
  838. (WTF::getByte):
  839. (WTF::getWord):
  840. (WTF::cryptographicallyRandomNumber):
  841. (WTF::cryptographicallyRandomValues):
  842. * wtf/CryptographicallyRandomNumber.h: Added.
  843. * wtf/OSRandomSource.cpp: Added.
  844. (WTF::randomValuesFromOS):
  845. * wtf/OSRandomSource.h: Added.
  846. * wtf/wtf.pri:
  847. 2011-02-09 Geoffrey Garen <ggaren@apple.com>
  848. Try to fix the build.
  849. * wtf/Bitmap.h: Include string.h for memset. Not sure why this started
  850. failing now.
  851. 2011-02-09 Geoffrey Garen <ggaren@apple.com>
  852. Reviewed by Sam Weinig.
  853. A tiny bit of encapsulation for MarkedBlock: made its heap data member private
  854. https://bugs.webkit.org/show_bug.cgi?id=54129
  855. * runtime/MarkedBlock.h:
  856. (JSC::MarkedBlock::isCellAligned):
  857. (JSC::MarkedBlock::MarkedBlock):
  858. (JSC::MarkedBlock::heap): Made the heap data member private, and provided
  859. a constructor and an accessor.
  860. * runtime/MarkedSpace.cpp:
  861. (JSC::MarkedSpace::allocateBlock):
  862. * runtime/MarkedSpace.h:
  863. (JSC::MarkedSpace::heap): Use the constructor and accessor.
  864. 2011-02-09 Peter Varga <pvarga@webkit.org>
  865. Reviewed by Gavin Barraclough.
  866. Replace PCRE with Yarr in WebCore
  867. https://bugs.webkit.org/show_bug.cgi?id=53496
  868. * JavaScriptCore.exp:
  869. * JavaScriptCore.gyp/JavaScriptCore.gyp:
  870. * JavaScriptCore.gypi:
  871. * JavaScriptCore.pro:
  872. * JavaScriptCore.xcodeproj/project.pbxproj:
  873. * create_regex_tables:
  874. * runtime/RegExp.cpp:
  875. * wtf/Platform.h:
  876. * yarr/Yarr.h:
  877. * yarr/YarrJIT.cpp:
  878. * yarr/YarrJIT.h:
  879. * yarr/YarrParser.h:
  880. * yarr/YarrPattern.h:
  881. * yarr/YarrSyntaxChecker.h:
  882. * yarr/yarr.pri: Added.
  883. 2011-02-08 Geoffrey Garen <ggaren@apple.com>
  884. Reviewed by Sam Weinig.
  885. Removed some dead code from Heap
  886. https://bugs.webkit.org/show_bug.cgi?id=54064
  887. * runtime/MarkedSpace.cpp: Removed some now-unused constants and
  888. declarations.
  889. (JSC::MarkedSpace::allocate): Removed some ASSERTs that are also ASSERTed
  890. by our caller. Removed redundant typedefs.
  891. 2011-02-08 Geoffrey Garen <ggaren@apple.com>
  892. Reviewed by Sam Weinig.
  893. Use a vector to track blocks in the Heap, instead of hand-rolled vector-like code
  894. https://bugs.webkit.org/show_bug.cgi?id=54062
  895. SunSpider reports no change.
  896. * runtime/CollectorHeapIterator.h:
  897. (JSC::CollectorHeapIterator::isValid):
  898. (JSC::CollectorHeapIterator::isLive): Updated for new mark invariant: To
  899. know if an object is live, you just need to test its mark bit.
  900. * runtime/MarkedSpace.cpp:
  901. (JSC::MarkedSpace::MarkedSpace): Moved waterMark and highWaterMark from
  902. CollectorHeap into MarkedSpace, since they're global state. Removed call
  903. to memset since CollectorHeap is a true class with its own constructor now.
  904. (JSC::MarkedSpace::destroy): Change uses of m_heap.usedBlocks to
  905. m_heap.blocks.size(), and m_heap.numBlocks to m_heap.blocks.capacity().
  906. (JSC::MarkedSpace::allocateBlock):
  907. (JSC::MarkedSpace::freeBlock): No need to manage our vector manually anymore.
  908. (JSC::MarkedSpace::allocate):
  909. (JSC::MarkedSpace::shrink):
  910. (JSC::MarkedSpace::clearMarkBits):
  911. (JSC::MarkedSpace::markedCells):
  912. (JSC::MarkedSpace::sweep):
  913. (JSC::MarkedSpace::objectCount):
  914. (JSC::MarkedSpace::capacity):
  915. (JSC::MarkedSpace::reset):
  916. (JSC::MarkedSpace::primaryHeapEnd):
  917. * runtime/MarkedSpace.h:
  918. (JSC::CollectorHeap::CollectorHeap):
  919. (JSC::MarkedSpace::highWaterMark):
  920. (JSC::MarkedSpace::setHighWaterMark):
  921. (JSC::MarkedSpace::contains): Same as above.
  922. 2011-02-08 Geoffrey Garen <ggaren@apple.com>
  923. Reviewed by Darin Adler.
  924. Give each MarkedBlock enough mark bits to cover the whole block
  925. https://bugs.webkit.org/show_bug.cgi?id=54029
  926. SunSpider reports no change.
  927. This simplifies access to mark bits, since any cell-aligned pointer
  928. into a block now has a valid mark bit to test.
  929. * runtime/MarkedBlock.h: Changed CELLS_PER_BLOCK to account for the extra
  930. mark bits. This happens not to change its actual value.
  931. (JSC::MarkedBlock::cellNumber):
  932. (JSC::MarkedBlock::isMarked):
  933. (JSC::MarkedBlock::testAndSetMarked):
  934. (JSC::MarkedBlock::setMarked): Changed const JSCell* to const void* to
  935. remove a cast from our caller, and to more accurately reflect the fact
  936. that MarkedBlock is agnostic about the types pointed to by the pointers
  937. you pass to it.
  938. (JSC::MarkedBlock::isPossibleCell): Removed a null check. We now consider
  939. the null pointer to be a possible cell with a 0 (impossible) block. This
  940. removes a null check from marking.
  941. * runtime/MarkedSpace.cpp:
  942. * runtime/MarkedSpace.h:
  943. (JSC::MarkedSpace::contains): Simplified the contains check, and inlined
  944. the whole thing, now that it's so simple.
  945. 2011-02-08 Daniel Bates <dbates@rim.com>
  946. Rubber-stamped by Martin Robinson.
  947. Rename enum ProtectionSeting [sic] to ProtectionSetting.
  948. * jit/ExecutableAllocator.cpp:
  949. (JSC::ExecutableAllocator::reprotectRegion):
  950. * jit/ExecutableAllocator.h:
  951. 2011-02-08 Balazs Kelemen <kbalazs@webkit.org>
  952. Reviewed by Andreas Kling.
  953. [Qt] Should not always define USE_SYSTEM_MALLOC
  954. https://bugs.webkit.org/show_bug.cgi?id=54007
  955. * wtf/Platform.h:
  956. 2011-02-08 Dan Bernstein <mitz@apple.com>
  957. Reviewed by Maciej Stachowiak.
  958. LLVM Compiler build fix.
  959. * runtime/WriteBarrier.h:
  960. (JSC::WriteBarrier::WriteBarrier):
  961. 2011-02-07 Ryosuke Niwa <rniwa@webkit.org>
  962. Reviewed by Darin Adler.
  963. JSVariableObject::setRegisters should take PassOwnArrayPtr for registersArray.
  964. https://bugs.webkit.org/show_bug.cgi?id=53902
  965. * runtime/Arguments.h:
  966. (JSC::JSActivation::copyRegisters): Uses OwnArrayPtr<Register> instead of Register*.
  967. * runtime/JSGlobalObject.cpp:
  968. (JSC::JSGlobalObject::copyGlobalsFrom): Ditto.
  969. * runtime/JSGlobalObject.h:
  970. (JSC::JSGlobalObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register*
  971. for registerArray.
  972. * runtime/JSVariableObject.h:
  973. (JSC::JSVariableObject::copyRegisterArray): Returns PassOwnArrayPtr<Register> instead of Register*.
  974. (JSC::JSVariableObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register*
  975. for registerArray.
  976. 2011-02-07 Geoffrey Garen <ggaren@apple.com>
  977. Reviewed by Sam Weinig.
  978. Removed some dead code from Heap
  979. https://bugs.webkit.org/show_bug.cgi?id=53969
  980. SunSpider reports no change.
  981. * runtime/MarkedSpace.cpp:
  982. (JSC::MarkedSpace::shrink):
  983. (JSC::MarkedSpace::sweep):
  984. * runtime/MarkedSpace.h: Removed resizeBlocks and growBlocks, and
  985. renamed shrinkBlocks to shrink, making it unconditionally shrink as
  986. much as possible.
  987. 2011-02-07 Geoffrey Garen <ggaren@apple.com>
  988. Reviewed by Oliver Hunt.
  989. Simplified the marked space's mark invariant
  990. https://bugs.webkit.org/show_bug.cgi?id=53968
  991. SunSpider reports no change.
  992. * runtime/MarkedSpace.cpp:
  993. (JSC::MarkedSpace::allocate): Mark objects when allocating them. This
  994. means that, at all times other than the mark phase, an object is live
  995. if and only if it is marked.
  996. (JSC::MarkedSpace::containsSlowCase): Use the new mark invariant to
  997. simplify testing whether an object is live.
  998. 2011-02-07 Beth Dakin <bdakin@apple.com>
  999. Reviewed by Eric Seidel.
  1000. Fix for https://bugs.webkit.org/show_bug.cgi?id=53950
  1001. USE_WK_SCROLLBAR_PAINTER in ScrollbarThemeMac should be in
  1002. Platform.h instead
  1003. * wtf/Platform.h:
  1004. 2011-02-07 Darin Adler <darin@apple.com>
  1005. Reviewed by Antti Koivisto.
  1006. Add built-in decoder for UTF-8 for improved performance
  1007. https://bugs.webkit.org/show_bug.cgi?id=53898
  1008. * wtf/unicode/UnicodeMacrosFromICU.h: Added U8_MAX_LENGTH and
  1009. U8_APPEND_UNSAFE. Also fixed header.
  1010. 2011-02-07 Adam Roben <aroben@apple.com>
  1011. Delete precompiled headers whenever any .vsprops file changes
  1012. Precompiled headers need to be rebuilt if, e.g., an ENABLE_* macro is changed in one of our
  1013. .vsprops files. Unfortunately, Visual Studio isn't smart enough to figure this out, so we
  1014. give it some assistance by deleting the precompiled headers whenever any .vsprops file
  1015. changes.
  1016. I also made some drive-by fixes while I was in the area.
  1017. Fixes <http://webkit.org/b/53826> react-to-vsprops-changes.py doesn't force precompiled
  1018. headers to be rebuilt, but should
  1019. Reviewed by David Kilzer.
  1020. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stop ignoring the
  1021. return code from react-to-vsprops-changes.py so we will notice when errors are introduced.
  1022. But skip the script entirely in production builds, where it is both unnecessary and can't
  1023. function correctly (due to not having the entire source tree available to it).
  1024. * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
  1025. (main): Removed an extra '*' in the glob for finding manifest files. The extra '*' was
  1026. leftover from before we rearranged WebKitBuild in r75138. Moved code to delete an old file
  1027. to the new delete_if_older_than function. Added code to delete any precompiled headers older
  1028. than the newest .vsprops file.
  1029. (delete_if_older_than): Added. Code came from main.
  1030. 2011-02-07 Antti Koivisto <antti@apple.com>
  1031. Not reviewed.
  1032. ASSERTS_DISABLED -> ASSERT_DISABLED
  1033. * wtf/BloomFilter.h:
  1034. 2011-02-06 Ryosuke Niwa <rniwa@webkit.org>
  1035. Unreviewed; speculative Qt build fix.
  1036. * JavaScriptCore.pro:
  1037. 2011-02-06 Ryosuke Niwa <rniwa@webkit.org>
  1038. Reviewed by Darin Adler.
  1039. OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
  1040. https://bugs.webkit.org/show_bug.cgi?id=52867
  1041. Removed LOOSE_OWN_ARRAY_PTR and OwnArrayPtr<T>::set. Replaced all calls to OwnArrayPtr::set
  1042. and loose instantiation of OwnArrayPtr by calls to operator= and adoptArrayPtr. Also removed
  1043. OwnArrayPtrCommon.h since PassOwnArrayPtr.h needs to include OwnArrayPtr.h and there is
  1044. no point in putting deleteOwnedArrayPtr into a separate header.
  1045. Note: if this patch breaks build, the code is either instiantiating OwnArrayPtr
  1046. without calling adoptArrayPtr or calling set on ArrayOwnPtr instead of operator=.
  1047. No tests are added since this is a refactoring.
  1048. * API/JSStringRefCF.cpp:
  1049. (JSStringCreateWithCFString): Calls adoptArrayPtr.
  1050. * GNUmakefile.am: Removed OwnArrayPtrCommon.h
  1051. * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
  1052. * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
  1053. * runtime/Arguments.cpp:
  1054. (JSC::Arguments::deleteProperty): Calls adoptArrayPtr.
  1055. * runtime/Arguments.h:
  1056. (JSC::Arguments::copyRegisters): Ditto.
  1057. * runtime/JSPropertyNameIterator.cpp:
  1058. (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Ditto.
  1059. * runtime/JSVariableObject.h:
  1060. (JSC::JSVariableObject::setRegisters): Calls operator= instead of set.
  1061. * runtime/StructureChain.cpp:
  1062. (JSC::StructureChain::StructureChain): Ditto.
  1063. * wtf/CMakeLists.txt:
  1064. * wtf/DateMath.h:
  1065. (JSC::GregorianDateTime::GregorianDateTime): No longer instnatiates OwnArrayPtr
  1066. with a null pointer.
  1067. * wtf/OwnArrayPtr.h:
  1068. * wtf/OwnArrayPtrCommon.h: Removed.
  1069. * wtf/PassOwnArrayPtr.h: No longer includes OwnArrayCommon.h
  1070. (WTF::deleteOwnedArrayPtr): Moved from OwnArrayPtrCommon.h
  1071. 2011-02-06 Antti Koivisto <antti@apple.com>
  1072. Reviewed by Maciej Stachowiak.
  1073. Use bloom filter for descendant selector filtering
  1074. https://bugs.webkit.org/show_bug.cgi?id=53880
  1075. Implement a bloom filter with k=2 and 8 bit counting.
  1076. * GNUmakefile.am:
  1077. * JavaScriptCore.gypi:
  1078. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  1079. * JavaScriptCore.xcodeproj/project.pbxproj:
  1080. * wtf/BloomFilter.h: Added.
  1081. (WTF::BloomFilter::maximumCount):
  1082. (WTF::BloomFilter::BloomFilter):
  1083. (WTF::BloomFilter::mayContain):
  1084. (WTF::BloomFilter::add):
  1085. (WTF::BloomFilter::remove):
  1086. (WTF::BloomFilter::firstSlot):
  1087. (WTF::BloomFilter::secondSlot):
  1088. (WTF::::add):
  1089. (WTF::::remove):
  1090. (WTF::::clear):
  1091. (WTF::::likelyEmpty):
  1092. (WTF::::isClear):
  1093. 2011-02-04 Geoffrey Garen <ggaren@apple.com>
  1094. Reviewed by Oliver Hunt.
  1095. Rolled back in r77612 with ASSERT/crash fixed.
  1096. https://bugs.webkit.org/show_bug.cgi?id=53759
  1097. Don't shrink the heap to 0 unconditionally. Instead, shrink to 1 if
  1098. necessary. For now, the heap assumes that it always has at least one
  1099. block live.
  1100. * runtime/Heap.cpp:
  1101. (JSC::Heap::Heap):
  1102. (JSC::Heap::reset):
  1103. * runtime/Heap.h:
  1104. * runtime/MarkedSpace.cpp:
  1105. (JSC::MarkedSpace::allocate):
  1106. (JSC::MarkedSpace::shrinkBlocks):
  1107. (JSC::MarkedSpace::sweep):
  1108. (JSC::MarkedSpace::reset):
  1109. * runtime/MarkedSpace.h:
  1110. (JSC::MarkedSpace::highWaterMark):
  1111. (JSC::MarkedSpace::setHighWaterMark):
  1112. 2011-02-04 David Kilzer <ddkilzer@apple.com>
  1113. BUILD FIX: REALLY remove the last vestiges of JSVALUE32!
  1114. <rdar://problem/8957409> Remove last vestiges of JSVALUE32
  1115. <http://webkit.org/b/53779>
  1116. * DerivedSources.make: Removed dependency on
  1117. JavaScriptCore.JSVALUE32.exp.
  1118. 2011-02-04 David Kilzer <ddkilzer@apple.com>
  1119. <rdar://problem/8957409> Remove last vestiges of JSVALUE32
  1120. <http://webkit.org/b/53779>
  1121. Reviewed by Darin Adler.
  1122. Support for JSVALUE32 was originaly removed in r70111.
  1123. * Configurations/JavaScriptCore.xcconfig: Changed armv6 to use
  1124. JavaScriptCore.JSVALUE32_64.exp and ppc64 to use
  1125. JavaScriptCore.JSVALUE64.exp to match Platform.h.
  1126. * DerivedSources.make: Removed rule for
  1127. JavaScriptCore.JSVALUE32.exp.
  1128. * JavaScriptCore.JSVALUE32only.exp: Removed.
  1129. * JavaScriptCore.xcodeproj/project.pbxproj: Removed references
  1130. to JavaScriptCore.JSVALUE32only.exp.
  1131. 2011-02-04 David Kilzer <ddkilzer@apple.com>
  1132. Use static_cast and other style cleanup in YarrInterpreter.cpp
  1133. <http://webkit.org/b/53772>
  1134. Reviewed by John Sullivan.
  1135. * yarr/YarrInterpreter.cpp:
  1136. (JSC::Yarr::Interpreter::InputStream::readChecked): Use
  1137. static_cast.
  1138. (JSC::Yarr::Interpreter::InputStream::checkInput): Remove
  1139. unnecessary else block.
  1140. (JSC::Yarr::Interpreter::matchAssertionEOL): Ditto.
  1141. (JSC::Yarr::Interpreter::backtrackBackReference): Ditto.
  1142. (JSC::Yarr::ByteCompiler::emitDisjunction): Use static_cast.
  1143. 2011-02-04 Sheriff Bot <webkit.review.bot@gmail.com>
  1144. Unreviewed, rolling out r77625 and r77626.
  1145. http://trac.webkit.org/changeset/77625
  1146. http://trac.webkit.org/changeset/77626
  1147. https://bugs.webkit.org/show_bug.cgi?id=53765
  1148. It broke Windows builds (Requested by Ossy_ on #webkit).
  1149. * JavaScriptCore.exp:
  1150. * JavaScriptCore.gyp/JavaScriptCore.gyp:
  1151. * JavaScriptCore.gypi:
  1152. * JavaScriptCore.pro:
  1153. * JavaScriptCore.xcodeproj/project.pbxproj:
  1154. * create_regex_tables:
  1155. * runtime/RegExp.cpp:
  1156. * wtf/Platform.h:
  1157. * yarr/Yarr.h:
  1158. * yarr/YarrJIT.cpp:
  1159. * yarr/YarrJIT.h:
  1160. * yarr/YarrParser.h:
  1161. * yarr/YarrPattern.h:
  1162. * yarr/YarrSyntaxChecker.h:
  1163. * yarr/yarr.pri: Removed.
  1164. 2011-02-04 Jessie Berlin <jberlin@apple.com>
  1165. Windows build fix. Unreviewed.
  1166. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
  1167. 2011-02-04 Peter Varga <pvarga@webkit.org>
  1168. Reviewed by Gavin Barraclough.
  1169. Replace PCRE with Yarr in WebCore
  1170. https://bugs.webkit.org/show_bug.cgi?id=53496
  1171. * JavaScriptCore.exp:
  1172. * JavaScriptCore.gyp/JavaScriptCore.gyp:
  1173. * JavaScriptCore.gypi:
  1174. * JavaScriptCore.pro:
  1175. * JavaScriptCore.xcodeproj/project.pbxproj:
  1176. * create_regex_tables:
  1177. * runtime/RegExp.cpp:
  1178. * wtf/Platform.h:
  1179. * yarr/Yarr.h:
  1180. * yarr/YarrJIT.cpp:
  1181. * yarr/YarrJIT.h:
  1182. * yarr/YarrParser.h:
  1183. * yarr/YarrPattern.h:
  1184. * yarr/YarrSyntaxChecker.h:
  1185. * yarr/yarr.pri: Added.
  1186. 2011-02-04 Ilya Tikhonovsky <loislo@chromium.org>
  1187. Unreviewed rollout two patches r77614 and r77612.
  1188. REGRESSION: Snow Leopard Intel Release anumber of failing tests.
  1189. * runtime/Heap.cpp:
  1190. (JSC::Heap::Heap):
  1191. (JSC::Heap::reset):
  1192. * runtime/Heap.h:
  1193. * runtime/MarkedSpace.cpp:
  1194. (JSC::MarkedSpace::allocate):
  1195. (JSC::MarkedSpace::sweep):
  1196. (JSC::MarkedSpace::reset):
  1197. * runtime/MarkedSpace.h:
  1198. 2011-02-04 Geoffrey Garen <ggaren@apple.com>
  1199. Try to fix 32bit build.
  1200. * runtime/Heap.cpp:
  1201. (JSC::Heap::reset): Use an explicit cast to avoid shortening warnings,
  1202. since 1.5 is double (64bit), and the result is size_t (32bit).
  1203. 2011-02-03 Geoffrey Garen <ggaren@apple.com>
  1204. Reviewed by Cameron Zwarich.
  1205. Changed MarkedSpace to delegate grow/shrink decisions to Heap
  1206. https://bugs.webkit.org/show_bug.cgi?id=53759
  1207. SunSpider reports no change.
  1208. * runtime/Heap.cpp:
  1209. (JSC::Heap::Heap):
  1210. (JSC::Heap::reset):
  1211. * runtime/Heap.h: Reorganized a few data members for better cache locality.
  1212. Added a grow policy.
  1213. * runtime/MarkedSpace.cpp:
  1214. (JSC::MarkedSpace::allocate):
  1215. (JSC::MarkedSpace::sweep):
  1216. (JSC::MarkedSpace::reset): Don't shrink automatically. Instead, wait for
  1217. the heap to make an explicit sweep call.
  1218. * runtime/MarkedSpace.h:
  1219. (JSC::MarkedSpace::highWaterMark):
  1220. (JSC::MarkedSpace::setHighWaterMark): Use a watermark to determine how
  1221. many bytes to allocate before failing and giving the heap an opportunity
  1222. to collect garbage. This also means that we allocate blocks on demand,
  1223. instead of ahead of time.
  1224. 2011-02-03 James Kozianski <koz@chromium.org>
  1225. Reviewed by Dimitri Glazkov.
  1226. Add navigator.registerProtocolHandler behind a flag.
  1227. https://bugs.webkit.org/show_bug.cgi?id=52609
  1228. * Configurations/FeatureDefines.xcconfig:
  1229. 2011-02-03 Geoffrey Garen <ggaren@apple.com>
  1230. Reviewed by Oliver Hunt.
  1231. Not all blocks are freed when the heap is freed (counting is hard!)
  1232. https://bugs.webkit.org/show_bug.cgi?id=53732
  1233. * runtime/MarkedSpace.cpp:
  1234. (JSC::MarkedSpace::destroy): Freeing a block compacts the list, so just
  1235. keep freeing block 0 until there are no blocks left.
  1236. 2011-02-03 Geoffrey Garen <ggaren@apple.com>
  1237. Try to fix the Mac build.
  1238. * JavaScriptCore.xcodeproj/project.pbxproj: The new MarkedBlock.h header
  1239. needs to be private, not project, so other projects can include headers
  1240. that depend on it.
  1241. 2011-02-03 Geoffrey Garen <ggaren@apple.com>
  1242. Reviewed by Sam Weinig.
  1243. Start using MarkedBlock instead of CollectorBlock
  1244. https://bugs.webkit.org/show_bug.cgi?id=53693
  1245. SunSpider reports no change.
  1246. * runtime/MarkedBlock.h:
  1247. (JSC::MarkedBlock::blockFor):
  1248. (JSC::MarkedBlock::setMarked):
  1249. (JSC::MarkedBlock::isCellAligned):
  1250. (JSC::MarkedBlock::isPossibleCell): Updated for const-ness.
  1251. * runtime/MarkedSpace.cpp:
  1252. (JSC::MarkedSpace::allocateBlock):
  1253. (JSC::MarkedSpace::containsSlowCase):
  1254. (JSC::MarkedSpace::clearMarkBits): Updated for const-ness.
  1255. * runtime/MarkedSpace.h:
  1256. (JSC::CollectorHeap::collectorBlock):
  1257. (JSC::MarkedSpace::heap):
  1258. (JSC::MarkedSpace::isMarked):
  1259. (JSC::MarkedSpace::testAndSetMarked):
  1260. (JSC::MarkedSpace::setMarked):
  1261. (JSC::MarkedSpace::contains): Switched from CollectorBlock to MarkedBlock,
  1262. and deleted dead CollectorBlock-related code.
  1263. 2011-02-03 Patrick Gansterer <paroga@webkit.org>
  1264. Reviewed by Darin Adler.
  1265. Avoid strlen() in AtomicString::fromUTF8
  1266. https://bugs.webkit.org/show_bug.cgi?id=50516
  1267. Add an overload to calculateStringHashFromUTF8 to get
  1268. strlen() of the input data with only one call.
  1269. This change shows about 3% performance win on the xml-parser benchmark.
  1270. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  1271. * wtf/text/AtomicString.cpp:
  1272. (WTF::AtomicString::fromUTF8):
  1273. * wtf/unicode/UTF8.cpp:
  1274. (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
  1275. (WTF::Unicode::calculateStringHashFromUTF8):
  1276. (WTF::Unicode::calculateStringHashAndLengthFromUTF8):
  1277. * wtf/unicode/UTF8.h:
  1278. 2011-02-02 Gavin Barraclough <barraclough@apple.com>
  1279. Windows build fix.
  1280. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  1281. 2011-02-02 Gavin Barraclough <barraclough@apple.com>
  1282. oops, build fix!
  1283. * wtf/Assertions.cpp:
  1284. 2011-02-02 Gavin Barraclough <barraclough@apple.com>
  1285. Reviewed by Sam Weinig.
  1286. Bug 53650 - Add a BACKTRACE macro to Assertions.h
  1287. Add a BACKTRACE macro to Assertions.h, which will print a backtrace on
  1288. debug Mac builds, make CRASH (and thus ASSERT) automatically call this.
  1289. * JavaScriptCore.exp:
  1290. * wtf/Assertions.cpp:
  1291. * wtf/Assertions.h:
  1292. 2011-02-02 Michael Saboff <msaboff@apple.com>
  1293. Reviewed by Gavin Barraclough.
  1294. Improper backtrack of nested non-capturing greedy paren to prior paren
  1295. https://bugs.webkit.org/show_bug.cgi?id=53261
  1296. A paren that follows a non-capturing greedy paren nested within a
  1297. non-capturing fixed paren was back tracking to the last paren
  1298. processed instead of the immediately prior paren.
  1299. Refactored default backtracking of parens to prior paren to work for
  1300. both nested (within) and immediately prior (after) parens.
  1301. * yarr/YarrJIT.cpp:
  1302. (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
  1303. (JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState):
  1304. (JSC::Yarr::YarrGenerator::TermGenerationState::setJumpListToPriorParen):
  1305. (JSC::Yarr::YarrGenerator::TermGenerationState::getJumpListToPriorParen):
  1306. (JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail):
  1307. (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
  1308. (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction):
  1309. (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
  1310. (JSC::Yarr::YarrGenerator::generateDisjunction):
  1311. 2011-02-02 Jeff Miller <jeffm@apple.com>
  1312. Reviewed by Darin Adler and Steve Falkenburg.
  1313. Add DerivedSources.make to some Visual Studio projects
  1314. https://bugs.webkit.org/show_bug.cgi?id=53607
  1315. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Add DerivedSources.make.
  1316. 2011-02-02 Steve Lacey <sjl@chromium.org>
  1317. Reviewed by Eric Carlson.
  1318. Implement basic media statistics on media elements.
  1319. https://bugs.webkit.org/show_bug.cgi?id=53322
  1320. * Configurations/FeatureDefines.xcconfig:
  1321. 2011-02-02 Kevin Ollivier <kevino@theolliviers.com>
  1322. [wx] Build fixes for wxWebKit.
  1323. * wtf/wx/StringWx.cpp:
  1324. (WTF::String::String):
  1325. 2011-02-01 Geoffrey Garen <ggaren@apple.com>
  1326. Reviewed by Sam Weinig.
  1327. A little more Heap refactoring
  1328. https://bugs.webkit.org/show_bug.cgi?id=53577
  1329. SunSpider reports no change.
  1330. Split out MarkedBlock into its own file / class.
  1331. Did the following renames:
  1332. isCellMarked => isMarked
  1333. checkMarkCell => testAndSetMarked
  1334. markCell => setMarked
  1335. cellOffset => cellNumber
  1336. collectorBlock => blockFor
  1337. * Android.mk:
  1338. * CMakeLists.txt:
  1339. * GNUmakefile.am:
  1340. * JavaScriptCore.gypi:
  1341. * JavaScriptCore.pro:
  1342. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  1343. * JavaScriptCore.xcodeproj/project.pbxproj:
  1344. * runtime/Heap.cpp:
  1345. (JSC::WeakGCHandlePool::update):
  1346. * runtime/Heap.h:
  1347. (JSC::Heap::isMarked):
  1348. (JSC::Heap::testAndSetMarked):
  1349. (JSC::Heap::setMarked):
  1350. * runtime/JSArray.h:
  1351. (JSC::MarkStack::markChildren):
  1352. (JSC::MarkStack::drain):
  1353. * runtime/JSCell.h:
  1354. (JSC::JSCell::MarkStack::internalAppend):
  1355. * runtime/MarkedBlock.cpp: Added.
  1356. * runtime/MarkedBlock.h: Added.
  1357. (JSC::MarkedBlock::blockFor):
  1358. (JSC::MarkedBlock::cellNumber):
  1359. (JSC::MarkedBlock::isMarked):
  1360. (JSC::MarkedBlock::testAndSetMarked):
  1361. (JSC::MarkedBlock::setMarked):
  1362. (JSC::MarkedBlock::isCellAligned):
  1363. (JSC::MarkedBlock::isPossibleCell):
  1364. * runtime/MarkedSpace.h:
  1365. (JSC::MarkedSpace::isMarked):
  1366. (JSC::MarkedSpace::testAndSetMarked):
  1367. (JSC::MarkedSpace::setMarked):
  1368. * runtime/SmallStrings.cpp:
  1369. (JSC::isMarked):
  1370. * runtime/WeakGCMap.h:
  1371. (JSC::WeakGCMap::isValid):
  1372. (JSC::::get):
  1373. (JSC::::take):
  1374. (JSC::::set):
  1375. 2011-02-02 Sam Weinig <sam@webkit.org>
  1376. Fix windows clean build.
  1377. * DerivedSources.make:
  1378. 2011-02-02 Alejandro G. Castro <alex@igalia.com>
  1379. Reviewed by Martin Robinson.
  1380. [GTK] Fix dist compilation
  1381. https://bugs.webkit.org/show_bug.cgi?id=53579
  1382. * GNUmakefile.am: Added WriteBarrier.h to the sources, it was
  1383. added in r77151
  1384. 2011-02-01 Sheriff Bot <webkit.review.bot@gmail.com>
  1385. Unreviewed, rolling out r77297.
  1386. http://trac.webkit.org/changeset/77297
  1387. https://bugs.webkit.org/show_bug.cgi?id=53538
  1388. caused leopard crashes (Requested by paroga on #webkit).
  1389. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  1390. * wtf/text/AtomicString.cpp:
  1391. (WTF::AtomicString::fromUTF8):
  1392. * wtf/unicode/UTF8.cpp:
  1393. (WTF::Unicode::calculateStringHashFromUTF8):
  1394. * wtf/unicode/UTF8.h:
  1395. 2011-02-01 Sam Weinig <sam@webkit.org>
  1396. Fix Mac production builds.
  1397. * JavaScriptCore.xcodeproj/project.pbxproj:
  1398. 2011-02-01 Sam Weinig <sam@webkit.org>
  1399. Try to fix the windows build.
  1400. * DerivedSources.make:
  1401. 2011-02-01 Patrick Gansterer <paroga@webkit.org>
  1402. Reviewed by Darin Adler.
  1403. Avoid strlen() in AtomicString::fromUTF8
  1404. https://bugs.webkit.org/show_bug.cgi?id=50516
  1405. Add an overload to calculateStringHashFromUTF8 to get
  1406. strlen() of the input data with only one call.
  1407. This change shows about 3% performance win on the xml-parser benchmark.
  1408. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  1409. * wtf/text/AtomicString.cpp:
  1410. (WTF::AtomicString::fromUTF8):
  1411. * wtf/unicode/UTF8.cpp:
  1412. (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
  1413. (WTF::Unicode::calculateStringHashFromUTF8):
  1414. (WTF::Unicode::calculateStringHashAndLengthFromUTF8):
  1415. * wtf/unicode/UTF8.h:
  1416. 2011-02-01 Sam Weinig <sam@webkit.org>
  1417. Reviewed by Beth Dakin.
  1418. Part 2 for <rdar://problem/8492788>
  1419. Adopt WKScrollbarPainterController
  1420. Use header detection to define scrollbar painting controller #define.
  1421. * DerivedSources.make:
  1422. * JavaScriptCore.xcodeproj/project.pbxproj:
  1423. 2011-02-01 Geoffrey Garen <ggaren@apple.com>
  1424. Reviewed by Oliver Hunt.
  1425. Refactor JSGlobalObject-related tear-down
  1426. https://bugs.webkit.org/show_bug.cgi?id=53478
  1427. While investigating crashes caused by r77082, I noticed some strange
  1428. destructor-time behaviors. This patch makes them less strange.
  1429. * bytecode/CodeBlock.cpp:
  1430. (JSC::CodeBlock::CodeBlock):
  1431. (JSC::CodeBlock::markAggregate):
  1432. * bytecode/CodeBlock.h:
  1433. (JSC::CodeBlock::globalObject):
  1434. (JSC::GlobalCodeBlock::GlobalCodeBlock):
  1435. (JSC::GlobalCodeBlock::~GlobalCodeBlock): Store the set of global code
  1436. blocks on the Heap, instead of on independent global objects. The heap
  1437. is guaranteed to outlast any GC-owned data structure. The heap is also
  1438. a natural place to store objects that needs out-of-band marking, since
  1439. the heap is responsible for marking all roots.
  1440. * runtime/Heap.cpp:
  1441. (JSC::Heap::markRoots):
  1442. (JSC::Heap::globalObjectCount):
  1443. (JSC::Heap::protectedGlobalObjectCount):
  1444. * runtime/Heap.h:
  1445. (JSC::Heap::codeBlocks):
  1446. * runtime/JSGlobalData.cpp:
  1447. (JSC::JSGlobalData::JSGlobalData):
  1448. * runtime/JSGlobalData.h:
  1449. * runtime/JSGlobalObject.cpp:
  1450. (JSC::JSGlobalObject::~JSGlobalObject):
  1451. (JSC::JSGlobalObject::init):
  1452. (JSC::JSGlobalObject::markChildren):
  1453. * runtime/JSGlobalObject.h:
  1454. * runtime/MarkedSpace.cpp: Store the set of global objects in a weak map
  1455. owned by JSGlobalData, instead of an instrusive circular linked list.
  1456. This is simpler, and it avoids destructor-time access between garbage
  1457. collected objects, which is hard to get right.
  1458. (JSC::MarkedSpace::destroy): Make sure to clear mark bits before tearing
  1459. everything down. Otherwise, weak data structures will incorrectly report
  1460. that objects pending destruction are still alive.
  1461. 2011-02-01 Geoffrey Garen <ggaren@apple.com>
  1462. Reviewed by Oliver Hunt.
  1463. REGRESSION(77082): GC-related crashes seen: on WebKit2 bot; on GTK 32bit
  1464. bot; loading trac pages; typing in search field
  1465. https://bugs.webkit.org/show_bug.cgi?id=53519
  1466. The crashes were all caused by failure to run an object's destructor.
  1467. * runtime/CollectorHeapIterator.h:
  1468. (JSC::ObjectIterator::ObjectIterator): Don't skip forward upon
  1469. construction. The iterator class used to do that when it was designed
  1470. for prior-to-beginning initialization. I forgot to remove this line
  1471. of code when I changed the iterator to normal initialization.
  1472. Skipping forward upon construction was causing the heap to skip running
  1473. the destructor for the very first object in a block when destroying the
  1474. block. This usually did not crash, since block destruction is rare and
  1475. most objects have pretty trivial destructors. However, in the rare case
  1476. when the heap would destroy a block whose first object was a global
  1477. object or a DOM node, BOOM.
  1478. 2011-01-31 Oliver Hunt <oliver@apple.com>
  1479. Reviewed by Geoffrey Garen.
  1480. Update JSObject storage for new marking API
  1481. https://bugs.webkit.org/show_bug.cgi?id=53467
  1482. JSObject no longer uses EncodedJSValue for its property storage.
  1483. This produces a stream of mechanical changes to PropertySlot and
  1484. anonymous storage APIs.
  1485. * JavaScriptCore.exp:
  1486. * runtime/ArrayPrototype.cpp:
  1487. (JSC::ArrayPrototype::ArrayPrototype):
  1488. * runtime/BooleanConstructor.cpp:
  1489. (JSC::constructBoolean):
  1490. (JSC::constructBooleanFromImmediateBoolean):
  1491. * runtime/BooleanObject.cpp:
  1492. (JSC::BooleanObject::BooleanObject):
  1493. * runtime/BooleanObject.h:
  1494. * runtime/BooleanPrototype.cpp:
  1495. (JSC::BooleanPrototype::BooleanPrototype):
  1496. * runtime/DateInstance.cpp:
  1497. (JSC::DateInstance::DateInstance):
  1498. * runtime/DatePrototype.cpp:
  1499. (JSC::DatePrototype::DatePrototype):
  1500. * runtime/JSActivation.cpp:
  1501. (JSC::JSActivation::getOwnPropertySlot):
  1502. * runtime/JSArray.cpp:
  1503. (JSC::JSArray::getOwnPropertySlot):
  1504. * runtime/JSFunction.cpp:
  1505. (JSC::JSFunction::getOwnPropertySlot):
  1506. * runtime/JSGlobalObject.h:
  1507. (JSC::JSGlobalObject::JSGlobalObject):
  1508. * runtime/JSObject.cpp:
  1509. (JSC::JSObject::fillGetterPropertySlot):
  1510. * runtime/JSObject.h:
  1511. (JSC::JSObject::getDirectLocation):
  1512. (JSC::JSObject::offsetForLocation):
  1513. (JSC::JSObject::putAnonymousValue):
  1514. (JSC::JSObject::clearAnonymousValue):
  1515. (JSC::JSObject::getAnonymousValue):
  1516. (JSC::JSObject::putThisToAnonymousValue):
  1517. (JSC::JSObject::locationForOffset):
  1518. (JSC::JSObject::inlineGetOwnPropertySlot):
  1519. * runtime/JSObjectWithGlobalObject.cpp:
  1520. (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
  1521. * runtime/JSWrapperObject.h:
  1522. (JSC::JSWrapperObject::JSWrapperObject):
  1523. (JSC::JSWrapperObject::setInternalValue):
  1524. * runtime/Lookup.cpp:
  1525. (JSC::setUpStaticFunctionSlot):
  1526. * runtime/NumberConstructor.cpp:
  1527. (JSC::constructWithNumberConstructor):
  1528. * runtime/NumberObject.cpp:
  1529. (JSC::NumberObject::NumberObject):
  1530. (JSC::constructNumber):
  1531. * runtime/NumberObject.h:
  1532. * runtime/NumberPrototype.cpp:
  1533. (JSC::NumberPrototype::NumberPrototype):
  1534. * runtime/PropertySlot.h:
  1535. (JSC::PropertySlot::getValue):
  1536. (JSC::PropertySlot::setValue):
  1537. (JSC::PropertySlot::setRegisterSlot):
  1538. * runtime/StringObject.cpp:
  1539. (JSC::StringObject::StringObject):
  1540. * runtime/StringPrototype.cpp:
  1541. (JSC::StringPrototype::StringPrototype):
  1542. * runtime/WriteBarrier.h:
  1543. (JSC::WriteBarrierBase::setWithoutWriteBarrier):
  1544. 2011-02-01 Daniel Bates <dbates@rim.com>
  1545. Reviewed by Antonio Gomes.
  1546. Modify RandomNumberSeed.h to use USE(MERSENNE_TWISTER_19937)
  1547. https://bugs.webkit.org/show_bug.cgi?id=53506
  1548. Currently, use of the Mersenne Twister pseudorandom number generator
  1549. is hardcoded to the Windows CE port. With the passing of bug #53253,
  1550. we can generalize support for this PRNG to all ports that use srand(3)
  1551. and rand(3), including Windows CE.
  1552. * wtf/RandomNumberSeed.h:
  1553. (WTF::initializeRandomNumberGenerator):
  1554. 2011-02-01 Dave Tapuska <dtapuska@rim.com>
  1555. Reviewed by Gavin Barraclough.
  1556. MacroAssemblerARM would generate code that did 32bit loads
  1557. on addresses that were not aligned. More specifically it would
  1558. generate a ldr r8,[r1, #7] which isn't valid on ARMv5 and lower.
  1559. The intended instruction really is ldrb r8,[r1, #7]; ensure we
  1560. call load8 instead of load32.
  1561. https://bugs.webkit.org/show_bug.cgi?id=46095
  1562. * assembler/MacroAssemblerARM.h:
  1563. (JSC::MacroAssemblerARM::set32Test32):
  1564. (JSC::MacroAssemblerARM::set32Test8):
  1565. 2011-02-01 Darin Fisher <darin@chromium.org>
  1566. Reviewed by Eric Seidel.
  1567. Fix some Visual Studio compiler warnings.
  1568. https://bugs.webkit.org/show_bug.cgi?id=53476
  1569. * wtf/MathExtras.h:
  1570. (clampToInteger):
  1571. (clampToPositiveInteger):
  1572. * wtf/ThreadingWin.cpp:
  1573. (WTF::absoluteTimeToWaitTimeoutInterval):
  1574. 2011-01-31 Oliver Hunt <oliver@apple.com>
  1575. Reviewed by Sam Weinig.
  1576. Bogus callframe during stack unwinding
  1577. https://bugs.webkit.org/show_bug.cgi?id=53454
  1578. Trying to access a callframe's globalData after destroying its
  1579. ScopeChain is not a good thing. While we could access the
  1580. globalData directly through the (known valid) scopechain we're
  1581. holding on to, it feels fragile. Instead we push the valid
  1582. ScopeChain onto the callframe again to ensure that the callframe
  1583. itself remains valid.
  1584. * interpreter/Interpreter.cpp:
  1585. (JSC::Interpreter::unwindCallFrame):
  1586. 2011-01-31 Michael Saboff <msaboff@apple.com>
  1587. Reviewed by Geoffrey Garen.
  1588. Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
  1589. https://bugs.webkit.org/show_bug.cgi?id=53271
  1590. Reapplying this change again.
  1591. Changed isValid() to use .get() as a result of change r77151.
  1592. Added new isValid() methods to check if a contained object in
  1593. a WeakGCMap is valid when using an unchecked iterator.
  1594. * runtime/WeakGCMap.h:
  1595. (JSC::WeakGCMap::isValid):
  1596. 2011-01-31 Oliver Hunt <oliver@apple.com>
  1597. Convert markstack to a slot visitor API
  1598. https://bugs.webkit.org/show_bug.cgi?id=53219
  1599. rolling r77098, r77099, r77100, r77109, and
  1600. r77111 back in, along with a few more Qt fix attempts.
  1601. * API/JSCallbackObject.h:
  1602. (JSC::JSCallbackObjectData::setPrivateProperty):
  1603. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
  1604. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
  1605. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
  1606. (JSC::JSCallbackObject::setPrivateProperty):
  1607. * API/JSCallbackObjectFunctions.h:
  1608. (JSC::::put):
  1609. (JSC::::staticFunctionGetter):
  1610. * API/JSObjectRef.cpp:
  1611. (JSObjectMakeConstructor):
  1612. (JSObjectSetPrivateProperty):
  1613. * API/JSWeakObjectMapRefInternal.h:
  1614. * JavaScriptCore.exp:
  1615. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  1616. * JavaScriptCore.xcodeproj/project.pbxproj:
  1617. * bytecode/CodeBlock.cpp:
  1618. (JSC::CodeBlock::markAggregate):
  1619. * bytecode/CodeBlock.h:
  1620. (JSC::CodeBlock::globalObject):
  1621. * bytecompiler/BytecodeGenerator.cpp:
  1622. (JSC::BytecodeGenerator::BytecodeGenerator):
  1623. (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
  1624. (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
  1625. (JSC::BytecodeGenerator::findScopedProperty):
  1626. * debugger/Debugger.cpp:
  1627. (JSC::evaluateInGlobalCallFrame):
  1628. * debugger/DebuggerActivation.cpp:
  1629. (JSC::DebuggerActivation::DebuggerActivation):
  1630. (JSC::DebuggerActivation::markChildren):
  1631. * debugger/DebuggerActivation.h:
  1632. * debugger/DebuggerCallFrame.cpp:
  1633. (JSC::DebuggerCallFrame::evaluate):
  1634. * interpreter/CallFrame.h:
  1635. (JSC::ExecState::exception):
  1636. * interpreter/Interpreter.cpp:
  1637. (JSC::Interpreter::resolve):
  1638. (JSC::Interpreter::resolveSkip):
  1639. (JSC::Interpreter::resolveGlobal):
  1640. (JSC::Interpreter::resolveGlobalDynamic):
  1641. (JSC::Interpreter::resolveBaseAndProperty):
  1642. (JSC::Interpreter::unwindCallFrame):
  1643. (JSC::appendSourceToError):
  1644. (JSC::Interpreter::execute):
  1645. (JSC::Interpreter::tryCacheGetByID):
  1646. (JSC::Interpreter::privateExecute):
  1647. * jit/JITStubs.cpp:
  1648. (JSC::JITThunks::tryCacheGetByID):
  1649. (JSC::DEFINE_STUB_FUNCTION):
  1650. * jsc.cpp:
  1651. (GlobalObject::GlobalObject):
  1652. * runtime/ArgList.cpp:
  1653. (JSC::MarkedArgumentBuffer::markLists):
  1654. * runtime/Arguments.cpp:
  1655. (JSC::Arguments::markChildren):
  1656. (JSC::Arguments::getOwnPropertySlot):
  1657. (JSC::Arguments::getOwnPropertyDescriptor):
  1658. (JSC::Arguments::put):
  1659. * runtime/Arguments.h:
  1660. (JSC::Arguments::setActivation):
  1661. (JSC::Arguments::Arguments):
  1662. * runtime/ArrayConstructor.cpp:
  1663. (JSC::ArrayConstructor::ArrayConstructor):
  1664. (JSC::constructArrayWithSizeQuirk):
  1665. * runtime/ArrayPrototype.cpp:
  1666. (JSC::arrayProtoFuncSplice):
  1667. * runtime/BatchedTransitionOptimizer.h:
  1668. (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
  1669. (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
  1670. * runtime/BooleanConstructor.cpp:
  1671. (JSC::BooleanConstructor::BooleanConstructor):
  1672. (JSC::constructBoolean):
  1673. (JSC::constructBooleanFromImmediateBoolean):
  1674. * runtime/BooleanPrototype.cpp:
  1675. (JSC::BooleanPrototype::BooleanPrototype):
  1676. * runtime/ConservativeSet.cpp:
  1677. (JSC::ConservativeSet::grow):
  1678. * runtime/ConservativeSet.h:
  1679. (JSC::ConservativeSet::~ConservativeSet):
  1680. (JSC::ConservativeSet::mark):
  1681. * runtime/DateConstructor.cpp:
  1682. (JSC::DateConstructor::DateConstructor):
  1683. * runtime/DateInstance.cpp:
  1684. (JSC::DateInstance::DateInstance):
  1685. * runtime/DatePrototype.cpp:
  1686. (JSC::dateProtoFuncSetTime):
  1687. (JSC::setNewValueFromTimeArgs):
  1688. (JSC::setNewValueFromDateArgs):
  1689. (JSC::dateProtoFuncSetYear):
  1690. * runtime/ErrorConstructor.cpp:
  1691. (JSC::ErrorConstructor::ErrorConstructor):
  1692. * runtime/ErrorInstance.cpp:
  1693. (JSC::ErrorInstance::ErrorInstance):
  1694. * runtime/ErrorPrototype.cpp:
  1695. (JSC::ErrorPrototype::ErrorPrototype):
  1696. * runtime/FunctionConstructor.cpp:
  1697. (JSC::FunctionConstructor::FunctionConstructor):
  1698. * runtime/FunctionPrototype.cpp:
  1699. (JSC::FunctionPrototype::FunctionPrototype):
  1700. * runtime/GetterSetter.cpp:
  1701. (JSC::GetterSetter::markChildren):
  1702. * runtime/GetterSetter.h:
  1703. (JSC::GetterSetter::GetterSetter):
  1704. (JSC::GetterSetter::getter):
  1705. (JSC::GetterSetter::setGetter):
  1706. (JSC::GetterSetter::setter):
  1707. (JSC::GetterSetter::setSetter):
  1708. * runtime/GlobalEvalFunction.cpp:
  1709. (JSC::GlobalEvalFunction::GlobalEvalFunction):
  1710. (JSC::GlobalEvalFunction::markChildren):
  1711. * runtime/GlobalEvalFunction.h:
  1712. (JSC::GlobalEvalFunction::cachedGlobalObject):
  1713. * runtime/Heap.cpp:
  1714. (JSC::Heap::markProtectedObjects):
  1715. (JSC::Heap::markTempSortVectors):
  1716. (JSC::Heap::markRoots):
  1717. * runtime/InternalFunction.cpp:
  1718. (JSC::InternalFunction::InternalFunction):
  1719. * runtime/JSAPIValueWrapper.h:
  1720. (JSC::JSAPIValueWrapper::value):
  1721. (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
  1722. * runtime/JSActivation.cpp:
  1723. (JSC::JSActivation::markChildren):
  1724. (JSC::JSActivation::put):
  1725. * runtime/JSArray.cpp:
  1726. (JSC::JSArray::JSArray):
  1727. (JSC::JSArray::getOwnPropertySlot):
  1728. (JSC::JSArray::getOwnPropertyDescriptor):
  1729. (JSC::JSArray::put):
  1730. (JSC::JSArray::putSlowCase):
  1731. (JSC::JSArray::deleteProperty):
  1732. (JSC::JSArray::increaseVectorLength):
  1733. (JSC::JSArray::setLength):
  1734. (JSC::JSArray::pop):
  1735. (JSC::JSArray::push):
  1736. (JSC::JSArray::unshiftCount):
  1737. (JSC::JSArray::sort):
  1738. (JSC::JSArray::fillArgList):
  1739. (JSC::JSArray::copyToRegisters):
  1740. (JSC::JSArray::compactForSorting):
  1741. * runtime/JSArray.h:
  1742. (JSC::JSArray::getIndex):
  1743. (JSC::JSArray::setIndex):
  1744. (JSC::JSArray::uncheckedSetIndex):
  1745. (JSC::JSArray::markChildrenDirect):
  1746. * runtime/JSByteArray.cpp:
  1747. (JSC::JSByteArray::JSByteArray):
  1748. * runtime/JSCell.h:
  1749. (JSC::JSCell::MarkStack::append):
  1750. (JSC::JSCell::MarkStack::internalAppend):
  1751. (JSC::JSCell::MarkStack::deprecatedAppend):
  1752. * runtime/JSFunction.cpp:
  1753. (JSC::JSFunction::JSFunction):
  1754. (JSC::JSFunction::getOwnPropertySlot):
  1755. * runtime/JSGlobalData.h:
  1756. * runtime/JSGlobalObject.cpp:
  1757. (JSC::markIfNeeded):
  1758. (JSC::JSGlobalObject::reset):
  1759. (JSC::JSGlobalObject::resetPrototype):
  1760. (JSC::JSGlobalObject::markChildren):
  1761. * runtime/JSGlobalObject.h:
  1762. (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
  1763. (JSC::JSGlobalObject::regExpConstructor):
  1764. (JSC::JSGlobalObject::errorConstructor):
  1765. (JSC::JSGlobalObject::evalErrorConstructor):
  1766. (JSC::JSGlobalObject::rangeErrorConstructor):
  1767. (JSC::JSGlobalObject::referenceErrorConstructor):
  1768. (JSC::JSGlobalObject::syntaxErrorConstructor):
  1769. (JSC::JSGlobalObject::typeErrorConstructor):
  1770. (JSC::JSGlobalObject::URIErrorConstructor):
  1771. (JSC::JSGlobalObject::evalFunction):
  1772. (JSC::JSGlobalObject::objectPrototype):
  1773. (JSC::JSGlobalObject::functionPrototype):
  1774. (JSC::JSGlobalObject::arrayPrototype):
  1775. (JSC::JSGlobalObject::booleanPrototype):
  1776. (JSC::JSGlobalObject::stringPrototype):
  1777. (JSC::JSGlobalObject::numberPrototype):
  1778. (JSC::JSGlobalObject::datePrototype):
  1779. (JSC::JSGlobalObject::regExpPrototype):
  1780. (JSC::JSGlobalObject::methodCallDummy):
  1781. (JSC::Structure::prototypeForLookup):
  1782. (JSC::constructArray):
  1783. * runtime/JSONObject.cpp:
  1784. (JSC::Stringifier::Holder::object):
  1785. (JSC::Stringifier::Holder::objectSlot):
  1786. (JSC::Stringifier::markAggregate):
  1787. (JSC::Stringifier::stringify):
  1788. (JSC::Stringifier::Holder::appendNextProperty):
  1789. (JSC::Walker::callReviver):
  1790. (JSC::Walker::walk):
  1791. * runtime/JSObject.cpp:
  1792. (JSC::JSObject::defineGetter):
  1793. (JSC::JSObject::defineSetter):
  1794. (JSC::JSObject::removeDirect):
  1795. (JSC::JSObject::putDirectFunction):
  1796. (JSC::JSObject::putDirectFunctionWithoutTransition):
  1797. (JSC::putDescriptor):
  1798. (JSC::JSObject::defineOwnProperty):
  1799. * runtime/JSObject.h:
  1800. (JSC::JSObject::getDirectOffset):
  1801. (JSC::JSObject::putDirectOffset):
  1802. (JSC::JSObject::putUndefinedAtDirectOffset):
  1803. (JSC::JSObject::flattenDictionaryObject):
  1804. (JSC::JSObject::putDirectInternal):
  1805. (JSC::JSObject::putDirect):
  1806. (JSC::JSObject::putDirectFunction):
  1807. (JSC::JSObject::putDirectWithoutTransition):
  1808. (JSC::JSObject::putDirectFunctionWithoutTransition):
  1809. (JSC::JSValue::putDirect):
  1810. (JSC::JSObject::allocatePropertyStorageInline):
  1811. (JSC::JSObject::markChildrenDirect):
  1812. * runtime/JSPropertyNameIterator.cpp:
  1813. (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
  1814. (JSC::JSPropertyNameIterator::get):
  1815. * runtime/JSPropertyNameIterator.h:
  1816. * runtime/JSStaticScopeObject.cpp:
  1817. (JSC::JSStaticScopeObject::markChildren):
  1818. * runtime/JSString.cpp:
  1819. (JSC::StringObject::create):
  1820. * runtime/JSValue.h:
  1821. * runtime/JSWrapperObject.cpp:
  1822. (JSC::JSWrapperObject::markChildren):
  1823. * runtime/JSWrapperObject.h:
  1824. (JSC::JSWrapperObject::internalValue):
  1825. (JSC::JSWrapperObject::setInternalValue):
  1826. * runtime/LiteralParser.cpp:
  1827. (JSC::LiteralParser::parse):
  1828. * runtime/Lookup.cpp:
  1829. (JSC::setUpStaticFunctionSlot):
  1830. * runtime/Lookup.h:
  1831. (JSC::lookupPut):
  1832. * runtime/MarkStack.h:
  1833. (JSC::MarkStack::MarkStack):
  1834. (JSC::MarkStack::deprecatedAppendValues):
  1835. (JSC::MarkStack::appendValues):
  1836. * runtime/MathObject.cpp:
  1837. (JSC::MathObject::MathObject):
  1838. * runtime/NativeErrorConstructor.cpp:
  1839. (JSC::NativeErrorConstructor::NativeErrorConstructor):
  1840. * runtime/NativeErrorPrototype.cpp:
  1841. (JSC::NativeErrorPrototype::NativeErrorPrototype):
  1842. * runtime/NumberConstructor.cpp:
  1843. (JSC::NumberConstructor::NumberConstructor):
  1844. (JSC::constructWithNumberConstructor):
  1845. * runtime/NumberObject.cpp:
  1846. (JSC::constructNumber):
  1847. * runtime/NumberPrototype.cpp:
  1848. (JSC::NumberPrototype::NumberPrototype):
  1849. * runtime/ObjectConstructor.cpp:
  1850. (JSC::ObjectConstructor::ObjectConstructor):
  1851. (JSC::objectConstructorGetOwnPropertyDescriptor):
  1852. * runtime/Operations.h:
  1853. (JSC::normalizePrototypeChain):
  1854. (JSC::resolveBase):
  1855. * runtime/PrototypeFunction.cpp:
  1856. (JSC::PrototypeFunction::PrototypeFunction):
  1857. * runtime/PutPropertySlot.h:
  1858. (JSC::PutPropertySlot::setExistingProperty):
  1859. (JSC::PutPropertySlot::setNewProperty):
  1860. (JSC::PutPropertySlot::base):
  1861. * runtime/RegExpConstructor.cpp:
  1862. (JSC::RegExpConstructor::RegExpConstructor):
  1863. * runtime/ScopeChain.cpp:
  1864. (JSC::ScopeChainNode::print):
  1865. * runtime/ScopeChain.h:
  1866. (JSC::ScopeChainNode::~ScopeChainNode):
  1867. (JSC::ScopeChainIterator::operator*):
  1868. (JSC::ScopeChainIterator::operator->):
  1869. (JSC::ScopeChain::top):
  1870. * runtime/ScopeChainMark.h:
  1871. (JSC::ScopeChain::markAggregate):
  1872. * runtime/SmallStrings.cpp:
  1873. (JSC::isMarked):
  1874. (JSC::SmallStrings::markChildren):
  1875. * runtime/SmallStrings.h:
  1876. (JSC::SmallStrings::emptyString):
  1877. (JSC::SmallStrings::singleCharacterString):
  1878. (JSC::SmallStrings::singleCharacterStrings):
  1879. * runtime/StringConstructor.cpp:
  1880. (JSC::StringConstructor::StringConstructor):
  1881. * runtime/StringObject.cpp:
  1882. (JSC::StringObject::StringObject):
  1883. * runtime/StringObject.h:
  1884. * runtime/StringPrototype.cpp:
  1885. (JSC::StringPrototype::StringPrototype):
  1886. * runtime/Structure.cpp:
  1887. (JSC::Structure::Structure):
  1888. (JSC::Structure::addPropertyTransition):
  1889. (JSC::Structure::toDictionaryTransition):
  1890. (JSC::Structure::flattenDictionaryStructure):
  1891. * runtime/Structure.h:
  1892. (JSC::Structure::storedPrototype):
  1893. (JSC::Structure::storedPrototypeSlot):
  1894. * runtime/WeakGCMap.h:
  1895. (JSC::WeakGCMap::uncheckedGet):
  1896. (JSC::WeakGCMap::uncheckedGetSlot):
  1897. (JSC::::get):
  1898. (JSC::::take):
  1899. (JSC::::set):
  1900. (JSC::::uncheckedRemove):
  1901. * runtime/WriteBarrier.h: Added.
  1902. (JSC::DeprecatedPtr::DeprecatedPtr):
  1903. (JSC::DeprecatedPtr::get):
  1904. (JSC::DeprecatedPtr::operator*):
  1905. (JSC::DeprecatedPtr::operator->):
  1906. (JSC::DeprecatedPtr::slot):
  1907. (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
  1908. (JSC::DeprecatedPtr::operator!):
  1909. (JSC::WriteBarrierBase::set):
  1910. (JSC::WriteBarrierBase::get):
  1911. (JSC::WriteBarrierBase::operator*):
  1912. (JSC::WriteBarrierBase::operator->):
  1913. (JSC::WriteBarrierBase::clear):
  1914. (JSC::WriteBarrierBase::slot):
  1915. (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
  1916. (JSC::WriteBarrierBase::operator!):
  1917. (JSC::WriteBarrier::WriteBarrier):
  1918. (JSC::operator==):
  1919. 2011-01-31 Dan Winship <danw@gnome.org>
  1920. Reviewed by Gustavo Noronha Silva.
  1921. wss (websockets ssl) support for gtk via new gio TLS support
  1922. https://bugs.webkit.org/show_bug.cgi?id=50344
  1923. Add a GPollableOutputStream typedef for TLS WebSockets support
  1924. * wtf/gobject/GTypedefs.h:
  1925. 2011-01-31 Gavin Barraclough <barraclough@apple.com>
  1926. Reviewed by Geoff Garen.
  1927. https://bugs.webkit.org/show_bug.cgi?id=53352
  1928. Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
  1929. The FixedVMPoolAllocator currently uses a best fix policy -
  1930. switch to first fit, this is less prone to external fragmentation.
  1931. * jit/ExecutableAllocatorFixedVMPool.cpp:
  1932. (JSC::AllocationTableSizeClass::AllocationTableSizeClass):
  1933. (JSC::AllocationTableSizeClass::blockSize):
  1934. (JSC::AllocationTableSizeClass::blockCount):
  1935. (JSC::AllocationTableSizeClass::blockAlignment):
  1936. (JSC::AllocationTableSizeClass::size):
  1937. (JSC::AllocationTableLeaf::AllocationTableLeaf):
  1938. (JSC::AllocationTableLeaf::~AllocationTableLeaf):
  1939. (JSC::AllocationTableLeaf::allocate):
  1940. (JSC::AllocationTableLeaf::free):
  1941. (JSC::AllocationTableLeaf::isEmpty):
  1942. (JSC::AllocationTableLeaf::isFull):
  1943. (JSC::AllocationTableLeaf::size):
  1944. (JSC::AllocationTableLeaf::classForSize):
  1945. (JSC::AllocationTableLeaf::dump):
  1946. (JSC::LazyAllocationTable::LazyAllocationTable):
  1947. (JSC::LazyAllocationTable::~LazyAllocationTable):
  1948. (JSC::LazyAllocationTable::allocate):
  1949. (JSC::LazyAllocationTable::free):
  1950. (JSC::LazyAllocationTable::isEmpty):
  1951. (JSC::LazyAllocationTable::isFull):
  1952. (JSC::LazyAllocationTable::size):
  1953. (JSC::LazyAllocationTable::dump):
  1954. (JSC::LazyAllocationTable::classForSize):
  1955. (JSC::AllocationTableDirectory::AllocationTableDirectory):
  1956. (JSC::AllocationTableDirectory::~AllocationTableDirectory):
  1957. (JSC::AllocationTableDirectory::allocate):
  1958. (JSC::AllocationTableDirectory::free):
  1959. (JSC::AllocationTableDirectory::isEmpty):
  1960. (JSC::AllocationTableDirectory::isFull):
  1961. (JSC::AllocationTableDirectory::size):
  1962. (JSC::AllocationTableDirectory::classForSize):
  1963. (JSC::AllocationTableDirectory::dump):
  1964. (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
  1965. (JSC::FixedVMPoolAllocator::alloc):
  1966. (JSC::FixedVMPoolAllocator::free):
  1967. (JSC::FixedVMPoolAllocator::allocated):
  1968. (JSC::FixedVMPoolAllocator::isValid):
  1969. (JSC::FixedVMPoolAllocator::classForSize):
  1970. (JSC::FixedVMPoolAllocator::offsetToPointer):
  1971. (JSC::FixedVMPoolAllocator::pointerToOffset):
  1972. (JSC::ExecutableAllocator::committedByteCount):
  1973. (JSC::ExecutableAllocator::isValid):
  1974. (JSC::ExecutableAllocator::underMemoryPressure):
  1975. (JSC::ExecutablePool::systemAlloc):
  1976. (JSC::ExecutablePool::systemRelease):
  1977. * wtf/PageReservation.h:
  1978. (WTF::PageReservation::PageReservation):
  1979. (WTF::PageReservation::commit):
  1980. (WTF::PageReservation::decommit):
  1981. (WTF::PageReservation::committed):
  1982. 2011-01-31 Sheriff Bot <webkit.review.bot@gmail.com>
  1983. Unreviewed, rolling out r76969.
  1984. http://trac.webkit.org/changeset/76969
  1985. https://bugs.webkit.org/show_bug.cgi?id=53418
  1986. "It is causing crashes in GTK+ and Leopard bots" (Requested by
  1987. alexg__ on #webkit).
  1988. * runtime/WeakGCMap.h:
  1989. 2011-01-30 Csaba Osztrogonác <ossy@webkit.org>
  1990. Unreviewed, rolling out r77098, r77099, r77100, r77109, and
  1991. r77111.
  1992. http://trac.webkit.org/changeset/77098
  1993. http://trac.webkit.org/changeset/77099
  1994. http://trac.webkit.org/changeset/77100
  1995. http://trac.webkit.org/changeset/77109
  1996. http://trac.webkit.org/changeset/77111
  1997. https://bugs.webkit.org/show_bug.cgi?id=53219
  1998. Qt build is broken
  1999. * API/JSCallbackObject.h:
  2000. (JSC::JSCallbackObjectData::setPrivateProperty):
  2001. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
  2002. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
  2003. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
  2004. (JSC::JSCallbackObject::setPrivateProperty):
  2005. * API/JSCallbackObjectFunctions.h:
  2006. (JSC::::put):
  2007. (JSC::::staticFunctionGetter):
  2008. * API/JSObjectRef.cpp:
  2009. (JSObjectMakeConstructor):
  2010. (JSObjectSetPrivateProperty):
  2011. * API/JSWeakObjectMapRefInternal.h:
  2012. * JavaScriptCore.exp:
  2013. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  2014. * JavaScriptCore.xcodeproj/project.pbxproj:
  2015. * bytecode/CodeBlock.cpp:
  2016. (JSC::CodeBlock::markAggregate):
  2017. * bytecode/CodeBlock.h:
  2018. (JSC::CodeBlock::globalObject):
  2019. * bytecompiler/BytecodeGenerator.cpp:
  2020. (JSC::BytecodeGenerator::BytecodeGenerator):
  2021. (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
  2022. (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
  2023. (JSC::BytecodeGenerator::findScopedProperty):
  2024. * debugger/Debugger.cpp:
  2025. (JSC::evaluateInGlobalCallFrame):
  2026. * debugger/DebuggerActivation.cpp:
  2027. (JSC::DebuggerActivation::DebuggerActivation):
  2028. (JSC::DebuggerActivation::markChildren):
  2029. * debugger/DebuggerActivation.h:
  2030. * debugger/DebuggerCallFrame.cpp:
  2031. (JSC::DebuggerCallFrame::evaluate):
  2032. * interpreter/CallFrame.h:
  2033. (JSC::ExecState::exception):
  2034. * interpreter/Interpreter.cpp:
  2035. (JSC::Interpreter::resolve):
  2036. (JSC::Interpreter::resolveSkip):
  2037. (JSC::Interpreter::resolveGlobal):
  2038. (JSC::Interpreter::resolveGlobalDynamic):
  2039. (JSC::Interpreter::resolveBaseAndProperty):
  2040. (JSC::Interpreter::unwindCallFrame):
  2041. (JSC::appendSourceToError):
  2042. (JSC::Interpreter::execute):
  2043. (JSC::Interpreter::tryCacheGetByID):
  2044. (JSC::Interpreter::privateExecute):
  2045. * jit/JITStubs.cpp:
  2046. (JSC::JITThunks::tryCacheGetByID):
  2047. (JSC::DEFINE_STUB_FUNCTION):
  2048. * jsc.cpp:
  2049. (GlobalObject::GlobalObject):
  2050. * runtime/ArgList.cpp:
  2051. (JSC::MarkedArgumentBuffer::markLists):
  2052. * runtime/Arguments.cpp:
  2053. (JSC::Arguments::markChildren):
  2054. (JSC::Arguments::getOwnPropertySlot):
  2055. (JSC::Arguments::getOwnPropertyDescriptor):
  2056. (JSC::Arguments::put):
  2057. * runtime/Arguments.h:
  2058. (JSC::Arguments::setActivation):
  2059. (JSC::Arguments::Arguments):
  2060. * runtime/ArrayConstructor.cpp:
  2061. (JSC::ArrayConstructor::ArrayConstructor):
  2062. (JSC::constructArrayWithSizeQuirk):
  2063. * runtime/ArrayPrototype.cpp:
  2064. (JSC::arrayProtoFuncSplice):
  2065. * runtime/BatchedTransitionOptimizer.h:
  2066. (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
  2067. (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
  2068. * runtime/BooleanConstructor.cpp:
  2069. (JSC::BooleanConstructor::BooleanConstructor):
  2070. (JSC::constructBoolean):
  2071. (JSC::constructBooleanFromImmediateBoolean):
  2072. * runtime/BooleanPrototype.cpp:
  2073. (JSC::BooleanPrototype::BooleanPrototype):
  2074. * runtime/ConservativeSet.cpp:
  2075. (JSC::ConservativeSet::grow):
  2076. * runtime/ConservativeSet.h:
  2077. (JSC::ConservativeSet::~ConservativeSet):
  2078. (JSC::ConservativeSet::mark):
  2079. * runtime/DateConstructor.cpp:
  2080. (JSC::DateConstructor::DateConstructor):
  2081. * runtime/DateInstance.cpp:
  2082. (JSC::DateInstance::DateInstance):
  2083. * runtime/DatePrototype.cpp:
  2084. (JSC::dateProtoFuncSetTime):
  2085. (JSC::setNewValueFromTimeArgs):
  2086. (JSC::setNewValueFromDateArgs):
  2087. (JSC::dateProtoFuncSetYear):
  2088. * runtime/ErrorConstructor.cpp:
  2089. (JSC::ErrorConstructor::ErrorConstructor):
  2090. * runtime/ErrorInstance.cpp:
  2091. (JSC::ErrorInstance::ErrorInstance):
  2092. * runtime/ErrorPrototype.cpp:
  2093. (JSC::ErrorPrototype::ErrorPrototype):
  2094. * runtime/FunctionConstructor.cpp:
  2095. (JSC::FunctionConstructor::FunctionConstructor):
  2096. * runtime/FunctionPrototype.cpp:
  2097. (JSC::FunctionPrototype::FunctionPrototype):
  2098. * runtime/GetterSetter.cpp:
  2099. (JSC::GetterSetter::markChildren):
  2100. * runtime/GetterSetter.h:
  2101. (JSC::GetterSetter::GetterSetter):
  2102. (JSC::GetterSetter::getter):
  2103. (JSC::GetterSetter::setGetter):
  2104. (JSC::GetterSetter::setter):
  2105. (JSC::GetterSetter::setSetter):
  2106. * runtime/GlobalEvalFunction.cpp:
  2107. (JSC::GlobalEvalFunction::GlobalEvalFunction):
  2108. (JSC::GlobalEvalFunction::markChildren):
  2109. * runtime/GlobalEvalFunction.h:
  2110. (JSC::GlobalEvalFunction::cachedGlobalObject):
  2111. * runtime/Heap.cpp:
  2112. (JSC::Heap::markProtectedObjects):
  2113. (JSC::Heap::markTempSortVectors):
  2114. (JSC::Heap::markRoots):
  2115. * runtime/InternalFunction.cpp:
  2116. (JSC::InternalFunction::InternalFunction):
  2117. * runtime/JSAPIValueWrapper.h:
  2118. (JSC::JSAPIValueWrapper::value):
  2119. (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
  2120. * runtime/JSActivation.cpp:
  2121. (JSC::JSActivation::markChildren):
  2122. (JSC::JSActivation::put):
  2123. * runtime/JSArray.cpp:
  2124. (JSC::JSArray::JSArray):
  2125. (JSC::JSArray::getOwnPropertySlot):
  2126. (JSC::JSArray::getOwnPropertyDescriptor):
  2127. (JSC::JSArray::put):
  2128. (JSC::JSArray::putSlowCase):
  2129. (JSC::JSArray::deleteProperty):
  2130. (JSC::JSArray::increaseVectorLength):
  2131. (JSC::JSArray::setLength):
  2132. (JSC::JSArray::pop):
  2133. (JSC::JSArray::push):
  2134. (JSC::JSArray::unshiftCount):
  2135. (JSC::JSArray::sort):
  2136. (JSC::JSArray::fillArgList):
  2137. (JSC::JSArray::copyToRegisters):
  2138. (JSC::JSArray::compactForSorting):
  2139. * runtime/JSArray.h:
  2140. (JSC::JSArray::getIndex):
  2141. (JSC::JSArray::setIndex):
  2142. (JSC::JSArray::uncheckedSetIndex):
  2143. (JSC::JSArray::markChildrenDirect):
  2144. * runtime/JSByteArray.cpp:
  2145. (JSC::JSByteArray::JSByteArray):
  2146. * runtime/JSCell.h:
  2147. (JSC::JSCell::JSValue::toThisObject):
  2148. (JSC::JSCell::MarkStack::append):
  2149. * runtime/JSFunction.cpp:
  2150. (JSC::JSFunction::JSFunction):
  2151. (JSC::JSFunction::getOwnPropertySlot):
  2152. * runtime/JSGlobalData.h:
  2153. * runtime/JSGlobalObject.cpp:
  2154. (JSC::markIfNeeded):
  2155. (JSC::JSGlobalObject::reset):
  2156. (JSC::JSGlobalObject::resetPrototype):
  2157. (JSC::JSGlobalObject::markChildren):
  2158. * runtime/JSGlobalObject.h:
  2159. (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
  2160. (JSC::JSGlobalObject::regExpConstructor):
  2161. (JSC::JSGlobalObject::errorConstructor):
  2162. (JSC::JSGlobalObject::evalErrorConstructor):
  2163. (JSC::JSGlobalObject::rangeErrorConstructor):
  2164. (JSC::JSGlobalObject::referenceErrorConstructor):
  2165. (JSC::JSGlobalObject::syntaxErrorConstructor):
  2166. (JSC::JSGlobalObject::typeErrorConstructor):
  2167. (JSC::JSGlobalObject::URIErrorConstructor):
  2168. (JSC::JSGlobalObject::evalFunction):
  2169. (JSC::JSGlobalObject::objectPrototype):
  2170. (JSC::JSGlobalObject::functionPrototype):
  2171. (JSC::JSGlobalObject::arrayPrototype):
  2172. (JSC::JSGlobalObject::booleanPrototype):
  2173. (JSC::JSGlobalObject::stringPrototype):
  2174. (JSC::JSGlobalObject::numberPrototype):
  2175. (JSC::JSGlobalObject::datePrototype):
  2176. (JSC::JSGlobalObject::regExpPrototype):
  2177. (JSC::JSGlobalObject::methodCallDummy):
  2178. (JSC::Structure::prototypeForLookup):
  2179. (JSC::constructArray):
  2180. * runtime/JSONObject.cpp:
  2181. (JSC::Stringifier::Holder::object):
  2182. (JSC::Stringifier::markAggregate):
  2183. (JSC::Stringifier::stringify):
  2184. (JSC::Stringifier::Holder::appendNextProperty):
  2185. (JSC::Walker::callReviver):
  2186. (JSC::Walker::walk):
  2187. * runtime/JSObject.cpp:
  2188. (JSC::JSObject::defineGetter):
  2189. (JSC::JSObject::defineSetter):
  2190. (JSC::JSObject::removeDirect):
  2191. (JSC::JSObject::putDirectFunction):
  2192. (JSC::JSObject::putDirectFunctionWithoutTransition):
  2193. (JSC::putDescriptor):
  2194. (JSC::JSObject::defineOwnProperty):
  2195. * runtime/JSObject.h:
  2196. (JSC::JSObject::getDirectOffset):
  2197. (JSC::JSObject::putDirectOffset):
  2198. (JSC::JSObject::flattenDictionaryObject):
  2199. (JSC::JSObject::putDirectInternal):
  2200. (JSC::JSObject::putDirect):
  2201. (JSC::JSObject::putDirectFunction):
  2202. (JSC::JSObject::putDirectWithoutTransition):
  2203. (JSC::JSObject::putDirectFunctionWithoutTransition):
  2204. (JSC::JSValue::putDirect):
  2205. (JSC::JSObject::allocatePropertyStorageInline):
  2206. (JSC::JSObject::markChildrenDirect):
  2207. * runtime/JSPropertyNameIterator.cpp:
  2208. (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
  2209. (JSC::JSPropertyNameIterator::get):
  2210. * runtime/JSPropertyNameIterator.h:
  2211. * runtime/JSStaticScopeObject.cpp:
  2212. (JSC::JSStaticScopeObject::markChildren):
  2213. * runtime/JSString.cpp:
  2214. (JSC::StringObject::create):
  2215. * runtime/JSValue.h:
  2216. * runtime/JSWrapperObject.cpp:
  2217. (JSC::JSWrapperObject::markChildren):
  2218. * runtime/JSWrapperObject.h:
  2219. (JSC::JSWrapperObject::internalValue):
  2220. (JSC::JSWrapperObject::setInternalValue):
  2221. * runtime/LiteralParser.cpp:
  2222. (JSC::LiteralParser::parse):
  2223. * runtime/Lookup.cpp:
  2224. (JSC::setUpStaticFunctionSlot):
  2225. * runtime/Lookup.h:
  2226. (JSC::lookupPut):
  2227. * runtime/MarkStack.h:
  2228. (JSC::MarkStack::appendValues):
  2229. * runtime/MathObject.cpp:
  2230. (JSC::MathObject::MathObject):
  2231. * runtime/NativeErrorConstructor.cpp:
  2232. (JSC::NativeErrorConstructor::NativeErrorConstructor):
  2233. * runtime/NativeErrorPrototype.cpp:
  2234. (JSC::NativeErrorPrototype::NativeErrorPrototype):
  2235. * runtime/NumberConstructor.cpp:
  2236. (JSC::NumberConstructor::NumberConstructor):
  2237. (JSC::constructWithNumberConstructor):
  2238. * runtime/NumberObject.cpp:
  2239. (JSC::constructNumber):
  2240. * runtime/NumberPrototype.cpp:
  2241. (JSC::NumberPrototype::NumberPrototype):
  2242. * runtime/ObjectConstructor.cpp:
  2243. (JSC::ObjectConstructor::ObjectConstructor):
  2244. (JSC::objectConstructorGetOwnPropertyDescriptor):
  2245. * runtime/Operations.h:
  2246. (JSC::normalizePrototypeChain):
  2247. (JSC::resolveBase):
  2248. * runtime/PrototypeFunction.cpp:
  2249. (JSC::PrototypeFunction::PrototypeFunction):
  2250. * runtime/PutPropertySlot.h:
  2251. (JSC::PutPropertySlot::setExistingProperty):
  2252. (JSC::PutPropertySlot::setNewProperty):
  2253. (JSC::PutPropertySlot::base):
  2254. * runtime/RegExpConstructor.cpp:
  2255. (JSC::RegExpConstructor::RegExpConstructor):
  2256. * runtime/ScopeChain.cpp:
  2257. (JSC::ScopeChainNode::print):
  2258. * runtime/ScopeChain.h:
  2259. (JSC::ScopeChainNode::~ScopeChainNode):
  2260. (JSC::ScopeChainIterator::operator*):
  2261. (JSC::ScopeChainIterator::operator->):
  2262. (JSC::ScopeChain::top):
  2263. * runtime/ScopeChainMark.h:
  2264. (JSC::ScopeChain::markAggregate):
  2265. * runtime/SmallStrings.cpp:
  2266. (JSC::isMarked):
  2267. (JSC::SmallStrings::markChildren):
  2268. * runtime/SmallStrings.h:
  2269. (JSC::SmallStrings::emptyString):
  2270. (JSC::SmallStrings::singleCharacterString):
  2271. (JSC::SmallStrings::singleCharacterStrings):
  2272. * runtime/StringConstructor.cpp:
  2273. (JSC::StringConstructor::StringConstructor):
  2274. * runtime/StringObject.cpp:
  2275. (JSC::StringObject::StringObject):
  2276. * runtime/StringObject.h:
  2277. * runtime/StringPrototype.cpp:
  2278. (JSC::StringPrototype::StringPrototype):
  2279. * runtime/Structure.cpp:
  2280. (JSC::Structure::Structure):
  2281. (JSC::Structure::addPropertyTransition):
  2282. (JSC::Structure::toDictionaryTransition):
  2283. (JSC::Structure::flattenDictionaryStructure):
  2284. * runtime/Structure.h:
  2285. (JSC::Structure::storedPrototype):
  2286. * runtime/WeakGCMap.h:
  2287. (JSC::WeakGCMap::uncheckedGet):
  2288. (JSC::WeakGCMap::isValid):
  2289. (JSC::::get):
  2290. (JSC::::take):
  2291. (JSC::::set):
  2292. (JSC::::uncheckedRemove):
  2293. * runtime/WriteBarrier.h: Removed.
  2294. 2011-01-30 Simon Fraser <simon.fraser@apple.com>
  2295. Build fix the build fix. I assume Oliver meant m_cell, not m_value.
  2296. * runtime/WriteBarrier.h:
  2297. (JSC::WriteBarrierBase::clear):
  2298. 2011-01-30 Oliver Hunt <oliver@apple.com>
  2299. More Qt build fixes
  2300. * runtime/WriteBarrier.h:
  2301. (JSC::WriteBarrierBase::clear):
  2302. 2011-01-30 Oliver Hunt <oliver@apple.com>
  2303. Convert markstack to a slot visitor API
  2304. https://bugs.webkit.org/show_bug.cgi?id=53219
  2305. rolling r77006 and r77020 back in.
  2306. * API/JSCallbackObject.h:
  2307. (JSC::JSCallbackObjectData::setPrivateProperty):
  2308. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
  2309. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
  2310. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
  2311. (JSC::JSCallbackObject::setPrivateProperty):
  2312. * API/JSCallbackObjectFunctions.h:
  2313. (JSC::::put):
  2314. (JSC::::staticFunctionGetter):
  2315. * API/JSObjectRef.cpp:
  2316. (JSObjectMakeConstructor):
  2317. (JSObjectSetPrivateProperty):
  2318. * API/JSWeakObjectMapRefInternal.h:
  2319. * JavaScriptCore.exp:
  2320. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  2321. * JavaScriptCore.xcodeproj/project.pbxproj:
  2322. * bytecode/CodeBlock.cpp:
  2323. (JSC::CodeBlock::markAggregate):
  2324. * bytecode/CodeBlock.h:
  2325. (JSC::CodeBlock::globalObject):
  2326. * bytecompiler/BytecodeGenerator.cpp:
  2327. (JSC::BytecodeGenerator::BytecodeGenerator):
  2328. (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
  2329. (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
  2330. (JSC::BytecodeGenerator::findScopedProperty):
  2331. * debugger/Debugger.cpp:
  2332. (JSC::evaluateInGlobalCallFrame):
  2333. * debugger/DebuggerActivation.cpp:
  2334. (JSC::DebuggerActivation::DebuggerActivation):
  2335. (JSC::DebuggerActivation::markChildren):
  2336. * debugger/DebuggerActivation.h:
  2337. * debugger/DebuggerCallFrame.cpp:
  2338. (JSC::DebuggerCallFrame::evaluate):
  2339. * interpreter/CallFrame.h:
  2340. (JSC::ExecState::exception):
  2341. * interpreter/Interpreter.cpp:
  2342. (JSC::Interpreter::resolve):
  2343. (JSC::Interpreter::resolveSkip):
  2344. (JSC::Interpreter::resolveGlobal):
  2345. (JSC::Interpreter::resolveGlobalDynamic):
  2346. (JSC::Interpreter::resolveBaseAndProperty):
  2347. (JSC::Interpreter::unwindCallFrame):
  2348. (JSC::appendSourceToError):
  2349. (JSC::Interpreter::execute):
  2350. (JSC::Interpreter::tryCacheGetByID):
  2351. (JSC::Interpreter::privateExecute):
  2352. * jit/JITStubs.cpp:
  2353. (JSC::JITThunks::tryCacheGetByID):
  2354. (JSC::DEFINE_STUB_FUNCTION):
  2355. * jsc.cpp:
  2356. (GlobalObject::GlobalObject):
  2357. * runtime/ArgList.cpp:
  2358. (JSC::MarkedArgumentBuffer::markLists):
  2359. * runtime/Arguments.cpp:
  2360. (JSC::Arguments::markChildren):
  2361. (JSC::Arguments::getOwnPropertySlot):
  2362. (JSC::Arguments::getOwnPropertyDescriptor):
  2363. (JSC::Arguments::put):
  2364. * runtime/Arguments.h:
  2365. (JSC::Arguments::setActivation):
  2366. (JSC::Arguments::Arguments):
  2367. * runtime/ArrayConstructor.cpp:
  2368. (JSC::ArrayConstructor::ArrayConstructor):
  2369. (JSC::constructArrayWithSizeQuirk):
  2370. * runtime/ArrayPrototype.cpp:
  2371. (JSC::arrayProtoFuncSplice):
  2372. * runtime/BatchedTransitionOptimizer.h:
  2373. (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
  2374. (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
  2375. * runtime/BooleanConstructor.cpp:
  2376. (JSC::BooleanConstructor::BooleanConstructor):
  2377. (JSC::constructBoolean):
  2378. (JSC::constructBooleanFromImmediateBoolean):
  2379. * runtime/BooleanPrototype.cpp:
  2380. (JSC::BooleanPrototype::BooleanPrototype):
  2381. * runtime/ConservativeSet.cpp:
  2382. (JSC::ConservativeSet::grow):
  2383. * runtime/ConservativeSet.h:
  2384. (JSC::ConservativeSet::~ConservativeSet):
  2385. (JSC::ConservativeSet::mark):
  2386. * runtime/DateConstructor.cpp:
  2387. (JSC::DateConstructor::DateConstructor):
  2388. * runtime/DateInstance.cpp:
  2389. (JSC::DateInstance::DateInstance):
  2390. * runtime/DatePrototype.cpp:
  2391. (JSC::dateProtoFuncSetTime):
  2392. (JSC::setNewValueFromTimeArgs):
  2393. (JSC::setNewValueFromDateArgs):
  2394. (JSC::dateProtoFuncSetYear):
  2395. * runtime/ErrorConstructor.cpp:
  2396. (JSC::ErrorConstructor::ErrorConstructor):
  2397. * runtime/ErrorInstance.cpp:
  2398. (JSC::ErrorInstance::ErrorInstance):
  2399. * runtime/ErrorPrototype.cpp:
  2400. (JSC::ErrorPrototype::ErrorPrototype):
  2401. * runtime/FunctionConstructor.cpp:
  2402. (JSC::FunctionConstructor::FunctionConstructor):
  2403. * runtime/FunctionPrototype.cpp:
  2404. (JSC::FunctionPrototype::FunctionPrototype):
  2405. * runtime/GetterSetter.cpp:
  2406. (JSC::GetterSetter::markChildren):
  2407. * runtime/GetterSetter.h:
  2408. (JSC::GetterSetter::GetterSetter):
  2409. (JSC::GetterSetter::getter):
  2410. (JSC::GetterSetter::setGetter):
  2411. (JSC::GetterSetter::setter):
  2412. (JSC::GetterSetter::setSetter):
  2413. * runtime/GlobalEvalFunction.cpp:
  2414. (JSC::GlobalEvalFunction::GlobalEvalFunction):
  2415. (JSC::GlobalEvalFunction::markChildren):
  2416. * runtime/GlobalEvalFunction.h:
  2417. (JSC::GlobalEvalFunction::cachedGlobalObject):
  2418. * runtime/Heap.cpp:
  2419. (JSC::Heap::markProtectedObjects):
  2420. (JSC::Heap::markTempSortVectors):
  2421. (JSC::Heap::markRoots):
  2422. * runtime/InternalFunction.cpp:
  2423. (JSC::InternalFunction::InternalFunction):
  2424. * runtime/JSAPIValueWrapper.h:
  2425. (JSC::JSAPIValueWrapper::value):
  2426. (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
  2427. * runtime/JSActivation.cpp:
  2428. (JSC::JSActivation::markChildren):
  2429. (JSC::JSActivation::put):
  2430. * runtime/JSArray.cpp:
  2431. (JSC::JSArray::JSArray):
  2432. (JSC::JSArray::getOwnPropertySlot):
  2433. (JSC::JSArray::getOwnPropertyDescriptor):
  2434. (JSC::JSArray::put):
  2435. (JSC::JSArray::putSlowCase):
  2436. (JSC::JSArray::deleteProperty):
  2437. (JSC::JSArray::increaseVectorLength):
  2438. (JSC::JSArray::setLength):
  2439. (JSC::JSArray::pop):
  2440. (JSC::JSArray::push):
  2441. (JSC::JSArray::unshiftCount):
  2442. (JSC::JSArray::sort):
  2443. (JSC::JSArray::fillArgList):
  2444. (JSC::JSArray::copyToRegisters):
  2445. (JSC::JSArray::compactForSorting):
  2446. * runtime/JSArray.h:
  2447. (JSC::JSArray::getIndex):
  2448. (JSC::JSArray::setIndex):
  2449. (JSC::JSArray::uncheckedSetIndex):
  2450. (JSC::JSArray::markChildrenDirect):
  2451. * runtime/JSByteArray.cpp:
  2452. (JSC::JSByteArray::JSByteArray):
  2453. * runtime/JSCell.h:
  2454. (JSC::JSCell::MarkStack::append):
  2455. (JSC::JSCell::MarkStack::internalAppend):
  2456. (JSC::JSCell::MarkStack::deprecatedAppend):
  2457. * runtime/JSFunction.cpp:
  2458. (JSC::JSFunction::JSFunction):
  2459. (JSC::JSFunction::getOwnPropertySlot):
  2460. * runtime/JSGlobalData.h:
  2461. * runtime/JSGlobalObject.cpp:
  2462. (JSC::markIfNeeded):
  2463. (JSC::JSGlobalObject::reset):
  2464. (JSC::JSGlobalObject::resetPrototype):
  2465. (JSC::JSGlobalObject::markChildren):
  2466. * runtime/JSGlobalObject.h:
  2467. (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
  2468. (JSC::JSGlobalObject::regExpConstructor):
  2469. (JSC::JSGlobalObject::errorConstructor):
  2470. (JSC::JSGlobalObject::evalErrorConstructor):
  2471. (JSC::JSGlobalObject::rangeErrorConstructor):
  2472. (JSC::JSGlobalObject::referenceErrorConstructor):
  2473. (JSC::JSGlobalObject::syntaxErrorConstructor):
  2474. (JSC::JSGlobalObject::typeErrorConstructor):
  2475. (JSC::JSGlobalObject::URIErrorConstructor):
  2476. (JSC::JSGlobalObject::evalFunction):
  2477. (JSC::JSGlobalObject::objectPrototype):
  2478. (JSC::JSGlobalObject::functionPrototype):
  2479. (JSC::JSGlobalObject::arrayPrototype):
  2480. (JSC::JSGlobalObject::booleanPrototype):
  2481. (JSC::JSGlobalObject::stringPrototype):
  2482. (JSC::JSGlobalObject::numberPrototype):
  2483. (JSC::JSGlobalObject::datePrototype):
  2484. (JSC::JSGlobalObject::regExpPrototype):
  2485. (JSC::JSGlobalObject::methodCallDummy):
  2486. (JSC::Structure::prototypeForLookup):
  2487. (JSC::constructArray):
  2488. * runtime/JSONObject.cpp:
  2489. (JSC::Stringifier::Holder::object):
  2490. (JSC::Stringifier::Holder::objectSlot):
  2491. (JSC::Stringifier::markAggregate):
  2492. (JSC::Stringifier::stringify):
  2493. (JSC::Stringifier::Holder::appendNextProperty):
  2494. (JSC::Walker::callReviver):
  2495. (JSC::Walker::walk):
  2496. * runtime/JSObject.cpp:
  2497. (JSC::JSObject::defineGetter):
  2498. (JSC::JSObject::defineSetter):
  2499. (JSC::JSObject::removeDirect):
  2500. (JSC::JSObject::putDirectFunction):
  2501. (JSC::JSObject::putDirectFunctionWithoutTransition):
  2502. (JSC::putDescriptor):
  2503. (JSC::JSObject::defineOwnProperty):
  2504. * runtime/JSObject.h:
  2505. (JSC::JSObject::getDirectOffset):
  2506. (JSC::JSObject::putDirectOffset):
  2507. (JSC::JSObject::putUndefinedAtDirectOffset):
  2508. (JSC::JSObject::flattenDictionaryObject):
  2509. (JSC::JSObject::putDirectInternal):
  2510. (JSC::JSObject::putDirect):
  2511. (JSC::JSObject::putDirectFunction):
  2512. (JSC::JSObject::putDirectWithoutTransition):
  2513. (JSC::JSObject::putDirectFunctionWithoutTransition):
  2514. (JSC::JSValue::putDirect):
  2515. (JSC::JSObject::allocatePropertyStorageInline):
  2516. (JSC::JSObject::markChildrenDirect):
  2517. * runtime/JSPropertyNameIterator.cpp:
  2518. (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
  2519. (JSC::JSPropertyNameIterator::get):
  2520. * runtime/JSPropertyNameIterator.h:
  2521. * runtime/JSStaticScopeObject.cpp:
  2522. (JSC::JSStaticScopeObject::markChildren):
  2523. * runtime/JSString.cpp:
  2524. (JSC::StringObject::create):
  2525. * runtime/JSValue.h:
  2526. * runtime/JSWrapperObject.cpp:
  2527. (JSC::JSWrapperObject::markChildren):
  2528. * runtime/JSWrapperObject.h:
  2529. (JSC::JSWrapperObject::internalValue):
  2530. (JSC::JSWrapperObject::setInternalValue):
  2531. * runtime/LiteralParser.cpp:
  2532. (JSC::LiteralParser::parse):
  2533. * runtime/Lookup.cpp:
  2534. (JSC::setUpStaticFunctionSlot):
  2535. * runtime/Lookup.h:
  2536. (JSC::lookupPut):
  2537. * runtime/MarkStack.h:
  2538. (JSC::MarkStack::MarkStack):
  2539. (JSC::MarkStack::deprecatedAppendValues):
  2540. (JSC::MarkStack::appendValues):
  2541. * runtime/MathObject.cpp:
  2542. (JSC::MathObject::MathObject):
  2543. * runtime/NativeErrorConstructor.cpp:
  2544. (JSC::NativeErrorConstructor::NativeErrorConstructor):
  2545. * runtime/NativeErrorPrototype.cpp:
  2546. (JSC::NativeErrorPrototype::NativeErrorPrototype):
  2547. * runtime/NumberConstructor.cpp:
  2548. (JSC::NumberConstructor::NumberConstructor):
  2549. (JSC::constructWithNumberConstructor):
  2550. * runtime/NumberObject.cpp:
  2551. (JSC::constructNumber):
  2552. * runtime/NumberPrototype.cpp:
  2553. (JSC::NumberPrototype::NumberPrototype):
  2554. * runtime/ObjectConstructor.cpp:
  2555. (JSC::ObjectConstructor::ObjectConstructor):
  2556. (JSC::objectConstructorGetOwnPropertyDescriptor):
  2557. * runtime/Operations.h:
  2558. (JSC::normalizePrototypeChain):
  2559. (JSC::resolveBase):
  2560. * runtime/PrototypeFunction.cpp:
  2561. (JSC::PrototypeFunction::PrototypeFunction):
  2562. * runtime/PutPropertySlot.h:
  2563. (JSC::PutPropertySlot::setExistingProperty):
  2564. (JSC::PutPropertySlot::setNewProperty):
  2565. (JSC::PutPropertySlot::base):
  2566. * runtime/RegExpConstructor.cpp:
  2567. (JSC::RegExpConstructor::RegExpConstructor):
  2568. * runtime/ScopeChain.cpp:
  2569. (JSC::ScopeChainNode::print):
  2570. * runtime/ScopeChain.h:
  2571. (JSC::ScopeChainNode::~ScopeChainNode):
  2572. (JSC::ScopeChainIterator::operator*):
  2573. (JSC::ScopeChainIterator::operator->):
  2574. (JSC::ScopeChain::top):
  2575. * runtime/ScopeChainMark.h:
  2576. (JSC::ScopeChain::markAggregate):
  2577. * runtime/SmallStrings.cpp:
  2578. (JSC::isMarked):
  2579. (JSC::SmallStrings::markChildren):
  2580. * runtime/SmallStrings.h:
  2581. (JSC::SmallStrings::emptyString):
  2582. (JSC::SmallStrings::singleCharacterString):
  2583. (JSC::SmallStrings::singleCharacterStrings):
  2584. * runtime/StringConstructor.cpp:
  2585. (JSC::StringConstructor::StringConstructor):
  2586. * runtime/StringObject.cpp:
  2587. (JSC::StringObject::StringObject):
  2588. * runtime/StringObject.h:
  2589. * runtime/StringPrototype.cpp:
  2590. (JSC::StringPrototype::StringPrototype):
  2591. * runtime/Structure.cpp:
  2592. (JSC::Structure::Structure):
  2593. (JSC::Structure::addPropertyTransition):
  2594. (JSC::Structure::toDictionaryTransition):
  2595. (JSC::Structure::flattenDictionaryStructure):
  2596. * runtime/Structure.h:
  2597. (JSC::Structure::storedPrototype):
  2598. (JSC::Structure::storedPrototypeSlot):
  2599. * runtime/WeakGCMap.h:
  2600. (JSC::WeakGCMap::uncheckedGet):
  2601. (JSC::WeakGCMap::uncheckedGetSlot):
  2602. (JSC::WeakGCMap::isValid):
  2603. (JSC::::get):
  2604. (JSC::::take):
  2605. (JSC::::set):
  2606. (JSC::::uncheckedRemove):
  2607. * runtime/WriteBarrier.h: Added.
  2608. (JSC::DeprecatedPtr::DeprecatedPtr):
  2609. (JSC::DeprecatedPtr::get):
  2610. (JSC::DeprecatedPtr::operator*):
  2611. (JSC::DeprecatedPtr::operator->):
  2612. (JSC::DeprecatedPtr::slot):
  2613. (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
  2614. (JSC::DeprecatedPtr::operator!):
  2615. (JSC::WriteBarrierBase::set):
  2616. (JSC::WriteBarrierBase::get):
  2617. (JSC::WriteBarrierBase::operator*):
  2618. (JSC::WriteBarrierBase::operator->):
  2619. (JSC::WriteBarrierBase::slot):
  2620. (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
  2621. (JSC::WriteBarrierBase::operator!):
  2622. (JSC::WriteBarrier::WriteBarrier):
  2623. (JSC::operator==):
  2624. 2011-01-30 Geoffrey Garen <ggaren@apple.com>
  2625. Reviewed by Oliver Hunt.
  2626. Filter all Heap collection through a common reset function, in
  2627. preparation for adding features triggered by collection.
  2628. https://bugs.webkit.org/show_bug.cgi?id=53396
  2629. SunSpider reports no change.
  2630. * runtime/Heap.cpp:
  2631. (JSC::Heap::reportExtraMemoryCostSlowCase): When we're over the extraCost
  2632. limit, just call collectAllGarbage() instead of rolling our own special
  2633. way of resetting the heap. In theory, this may be slower in some cases,
  2634. but it also fixes cases of pathological heap growth that we've seen,
  2635. where the only objects being allocated are temporary and huge
  2636. (<rdar://problem/8885843>).
  2637. (JSC::Heap::allocate):
  2638. (JSC::Heap::collectAllGarbage): Use the shared reset function.
  2639. (JSC::Heap::reset):
  2640. * runtime/Heap.h: Carved a new shared reset function out of the old
  2641. collectAllGarbage.
  2642. 2011-01-30 Sheriff Bot <webkit.review.bot@gmail.com>
  2643. Unreviewed, rolling out r77025.
  2644. http://trac.webkit.org/changeset/77025
  2645. https://bugs.webkit.org/show_bug.cgi?id=53401
  2646. It made js1_5/Regress/regress-159334.js fail on 64 bit Linux
  2647. (Requested by Ossy on #webkit).
  2648. * jit/ExecutableAllocatorFixedVMPool.cpp:
  2649. (JSC::FreeListEntry::FreeListEntry):
  2650. (JSC::AVLTreeAbstractorForFreeList::get_less):
  2651. (JSC::AVLTreeAbstractorForFreeList::set_less):
  2652. (JSC::AVLTreeAbstractorForFreeList::get_greater):
  2653. (JSC::AVLTreeAbstractorForFreeList::set_greater):
  2654. (JSC::AVLTreeAbstractorForFreeList::get_balance_factor):
  2655. (JSC::AVLTreeAbstractorForFreeList::set_balance_factor):
  2656. (JSC::AVLTreeAbstractorForFreeList::null):
  2657. (JSC::AVLTreeAbstractorForFreeList::compare_key_key):
  2658. (JSC::AVLTreeAbstractorForFreeList::compare_key_node):
  2659. (JSC::AVLTreeAbstractorForFreeList::compare_node_node):
  2660. (JSC::reverseSortFreeListEntriesByPointer):
  2661. (JSC::reverseSortCommonSizedAllocations):
  2662. (JSC::FixedVMPoolAllocator::release):
  2663. (JSC::FixedVMPoolAllocator::reuse):
  2664. (JSC::FixedVMPoolAllocator::addToFreeList):
  2665. (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
  2666. (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
  2667. (JSC::FixedVMPoolAllocator::alloc):
  2668. (JSC::FixedVMPoolAllocator::free):
  2669. (JSC::FixedVMPoolAllocator::isValid):
  2670. (JSC::FixedVMPoolAllocator::allocInternal):
  2671. (JSC::FixedVMPoolAllocator::isWithinVMPool):
  2672. (JSC::FixedVMPoolAllocator::addToCommittedByteCount):
  2673. (JSC::ExecutableAllocator::committedByteCount):
  2674. (JSC::maybeModifyVMPoolSize):
  2675. (JSC::ExecutableAllocator::isValid):
  2676. (JSC::ExecutableAllocator::underMemoryPressure):
  2677. (JSC::ExecutablePool::systemAlloc):
  2678. (JSC::ExecutablePool::systemRelease):
  2679. * wtf/PageReservation.h:
  2680. (WTF::PageReservation::PageReservation):
  2681. (WTF::PageReservation::commit):
  2682. (WTF::PageReservation::decommit):
  2683. 2011-01-30 Leo Yang <leo.yang@torchmobile.com.cn>
  2684. Reviewed by Daniel Bates.
  2685. Code style issue in JavaScriptCore/wtf/CurrentTime.h
  2686. https://bugs.webkit.org/show_bug.cgi?id=53394
  2687. According to rule #3 at http://webkit.org/coding/coding-style.html,
  2688. This patch fix style issue in CurrentTime.h.
  2689. No functionality change, no new tests.
  2690. * wtf/CurrentTime.h:
  2691. (WTF::currentTimeMS):
  2692. (WTF::getLocalTime):
  2693. 2011-01-30 Benjamin Poulain <ikipou@gmail.com>
  2694. Reviewed by Kenneth Rohde Christiansen.
  2695. [Qt] JavaScriptCore does not link on Mac if building WebKit 2
  2696. https://bugs.webkit.org/show_bug.cgi?id=53377
  2697. The option "-whole-archive" is not availabe with the libtool of Mac OS X,
  2698. instead, we can use "-all_load" on Mac.
  2699. * JavaScriptCore.pri:
  2700. 2011-01-29 Geoffrey Garen <ggaren@apple.com>
  2701. Sorry Leopard bot -- I committed a change by accident.
  2702. * JavaScriptCore.exp: You may have your symbols back now.
  2703. 2011-01-29 Geoffrey Garen <ggaren@apple.com>
  2704. Reviewed by Cameron Zwarich.
  2705. Simplified Heap iteration
  2706. https://bugs.webkit.org/show_bug.cgi?id=53393
  2707. * runtime/CollectorHeapIterator.h:
  2708. (JSC::CollectorHeapIterator::isValid):
  2709. (JSC::CollectorHeapIterator::isLive):
  2710. (JSC::CollectorHeapIterator::advance): Removed "max" argument to
  2711. advance because it's a constant.
  2712. (JSC::LiveObjectIterator::LiveObjectIterator):
  2713. (JSC::LiveObjectIterator::operator++):
  2714. (JSC::DeadObjectIterator::DeadObjectIterator):
  2715. (JSC::DeadObjectIterator::operator++):
  2716. (JSC::ObjectIterator::ObjectIterator):
  2717. (JSC::ObjectIterator::operator++): Factored out common checks into
  2718. two helper functions -- isValid() for "Am I past the end?" and isLive()
  2719. for "Is the cell I'm pointing to live?".
  2720. * runtime/MarkedSpace.cpp:
  2721. (JSC::MarkedSpace::freeBlock):
  2722. (JSC::MarkedSpace::sweep): Always sweep from the beginning of the heap
  2723. to the end, to avoid making sweep subtly reliant on internal Heap state.
  2724. (JSC::MarkedSpace::primaryHeapBegin):
  2725. (JSC::MarkedSpace::primaryHeapEnd): Always be explicit about where
  2726. iteration begins.
  2727. 2011-01-29 Geoffrey Garen <ggaren@apple.com>
  2728. Reviewed by Cameron Zwarich.
  2729. Simplified heap destruction
  2730. https://bugs.webkit.org/show_bug.cgi?id=53392
  2731. * JavaScriptCore.exp:
  2732. * runtime/Heap.cpp:
  2733. (JSC::Heap::destroy):
  2734. * runtime/Heap.h:
  2735. * runtime/MarkedSpace.cpp:
  2736. (JSC::MarkedSpace::destroy):
  2737. * runtime/MarkedSpace.h: Don't go out of our way to destroy GC-protected
  2738. cells last -- the difficult contortions required to do so just don't seem
  2739. justified. We make no guarantees about GC protection after the client
  2740. throws away JSGlobalData, and it doesn't seem like any meaningful
  2741. guarantee is even possible.
  2742. 2011-01-29 Geoffrey Garen <ggaren@apple.com>
  2743. Reviewed by Maciej Stachowiak.
  2744. Switched heap to use the Bitmap class and removed CollectorBitmap
  2745. https://bugs.webkit.org/show_bug.cgi?id=53391
  2746. SunSpider says 1.005x as fast. Seems like a fluke.
  2747. * runtime/MarkedSpace.cpp:
  2748. (JSC::MarkedSpace::allocate): Updated for rename and returning a value
  2749. rather than taking a value by reference.
  2750. * runtime/MarkedSpace.h: Code reuse is good.
  2751. * wtf/Bitmap.h:
  2752. (WTF::::testAndSet): Added, since this is the one thing Bitmap was missing
  2753. which CollectorBitmap had. (Renamed from the less conventional "getset".)
  2754. (WTF::::nextPossiblyUnset): Renamed and changed to return a value for
  2755. clarity. It's all the same with inlining.
  2756. 2011-01-28 Geoffrey Garen <ggaren@apple.com>
  2757. Reviewed by Maciej Stachowiak.
  2758. Some more Heap cleanup.
  2759. https://bugs.webkit.org/show_bug.cgi?id=53357
  2760. * JavaScriptCore.exp:
  2761. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated exported symbols.
  2762. * runtime/Heap.cpp:
  2763. (JSC::Heap::reportExtraMemoryCostSlowCase): Renamed recordExtraCost to
  2764. reportExtraMemoryCostSlowCase to match our naming conventions.
  2765. (JSC::Heap::capacity): Renamed size to capacity because this function
  2766. returns the capacity of the heap, including unused portions.
  2767. * runtime/Heap.h:
  2768. (JSC::Heap::globalData):
  2769. (JSC::Heap::markedSpace):
  2770. (JSC::Heap::machineStackMarker):
  2771. (JSC::Heap::reportExtraMemoryCost): Moved statics to the top of the file.
  2772. Moved ctor and dtor to the beginning of the class definition. Grouped
  2773. functions by purpose.
  2774. * runtime/MarkedSpace.cpp:
  2775. (JSC::MarkedSpace::capacity): Renamed size to capacity because this
  2776. function returns the capacity of the heap, including unused portions.
  2777. * runtime/MarkedSpace.h: Removed statistics and the Statistics class because
  2778. the same information can be gotten just by calling size() and capacity().
  2779. * runtime/MemoryStatistics.cpp:
  2780. * runtime/MemoryStatistics.h: Ditto.
  2781. 2011-01-29 Daniel Bates <dbates@rim.com>
  2782. Reviewed by Eric Seidel.
  2783. Move wince/mt19937ar.c to ThirdParty and make it a policy choice
  2784. https://bugs.webkit.org/show_bug.cgi?id=53253
  2785. Make inclusion of MT19937 a policy decision.
  2786. Currently, we hardcoded to use MT19937 when building for
  2787. Windows CE. Instead, we should make this a policy decision
  2788. with the Windows CE port using this by default.
  2789. * JavaScriptCore.pri: Append Source/ThirdParty to the end
  2790. of the list include directories.
  2791. * wtf/CMakeLists.txt: Ditto.
  2792. * wtf/Platform.h: Defined WTF_USE_MERSENNE_TWISTER_19937 when
  2793. building for Windows CE.
  2794. * wtf/RandomNumber.cpp:
  2795. (WTF::randomNumber): Substituted USE(MERSENNE_TWISTER_19937) for OS(WINCE).
  2796. 2011-01-29 Cameron Zwarich <zwarich@apple.com>
  2797. Reviewed by David Kilzer.
  2798. Bug 53374 - Remove uses of unsafe string functions in debugging code
  2799. https://bugs.webkit.org/show_bug.cgi?id=53374
  2800. * runtime/RegExp.cpp:
  2801. (JSC::RegExp::printTraceData):
  2802. 2011-01-29 Cameron Zwarich <zwarich@apple.com>
  2803. Reviewed by Oliver Hunt.
  2804. JavaScriptCoreUseJIT environment variable broken
  2805. https://bugs.webkit.org/show_bug.cgi?id=53372
  2806. * runtime/JSGlobalData.cpp:
  2807. (JSC::JSGlobalData::JSGlobalData): Check the actual value in the string returned
  2808. by getenv() rather than just doing a NULL check on the return value.
  2809. 2011-01-29 Patrick Gansterer <paroga@webkit.org>
  2810. Reviewed by David Kilzer.
  2811. Move CharacterNames.h into WTF directory
  2812. https://bugs.webkit.org/show_bug.cgi?id=49618
  2813. * GNUmakefile.am:
  2814. * JavaScriptCore.gypi:
  2815. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  2816. * JavaScriptCore.xcodeproj/project.pbxproj:
  2817. * wtf/CMakeLists.txt:
  2818. * wtf/unicode/CharacterNames.h: Renamed from WebCore/platform/text/CharacterNames.h.
  2819. * wtf/unicode/UTF8.cpp:
  2820. 2011-01-28 Simon Fraser <simon.fraser@apple.com>
  2821. Reviewed by Gavin Barraclough.
  2822. Add various clampToInt() methods to MathExtras.h
  2823. https://bugs.webkit.org/show_bug.cgi?id=52910
  2824. Add functions for clamping doubles and floats to valid int
  2825. ranges, for signed and positive integers.
  2826. * wtf/MathExtras.h:
  2827. (clampToInteger):
  2828. (clampToPositiveInteger):
  2829. 2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com>
  2830. Unreviewed, rolling out r77006 and r77020.
  2831. http://trac.webkit.org/changeset/77006
  2832. http://trac.webkit.org/changeset/77020
  2833. https://bugs.webkit.org/show_bug.cgi?id=53360
  2834. "Broke Windows tests" (Requested by rniwa on #webkit).
  2835. * API/JSCallbackObject.h:
  2836. (JSC::JSCallbackObjectData::setPrivateProperty):
  2837. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
  2838. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
  2839. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
  2840. (JSC::JSCallbackObject::setPrivateProperty):
  2841. * API/JSCallbackObjectFunctions.h:
  2842. (JSC::::put):
  2843. (JSC::::staticFunctionGetter):
  2844. * API/JSObjectRef.cpp:
  2845. (JSObjectMakeConstructor):
  2846. (JSObjectSetPrivateProperty):
  2847. * API/JSWeakObjectMapRefInternal.h:
  2848. * JavaScriptCore.exp:
  2849. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  2850. * JavaScriptCore.xcodeproj/project.pbxproj:
  2851. * bytecode/CodeBlock.cpp:
  2852. (JSC::CodeBlock::markAggregate):
  2853. * bytecode/CodeBlock.h:
  2854. (JSC::CodeBlock::globalObject):
  2855. * bytecompiler/BytecodeGenerator.cpp:
  2856. (JSC::BytecodeGenerator::BytecodeGenerator):
  2857. (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
  2858. (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
  2859. (JSC::BytecodeGenerator::findScopedProperty):
  2860. * debugger/Debugger.cpp:
  2861. (JSC::evaluateInGlobalCallFrame):
  2862. * debugger/DebuggerActivation.cpp:
  2863. (JSC::DebuggerActivation::DebuggerActivation):
  2864. (JSC::DebuggerActivation::markChildren):
  2865. * debugger/DebuggerActivation.h:
  2866. * debugger/DebuggerCallFrame.cpp:
  2867. (JSC::DebuggerCallFrame::evaluate):
  2868. * interpreter/CallFrame.h:
  2869. (JSC::ExecState::exception):
  2870. * interpreter/Interpreter.cpp:
  2871. (JSC::Interpreter::resolve):
  2872. (JSC::Interpreter::resolveSkip):
  2873. (JSC::Interpreter::resolveGlobal):
  2874. (JSC::Interpreter::resolveGlobalDynamic):
  2875. (JSC::Interpreter::resolveBaseAndProperty):
  2876. (JSC::Interpreter::unwindCallFrame):
  2877. (JSC::appendSourceToError):
  2878. (JSC::Interpreter::execute):
  2879. (JSC::Interpreter::tryCacheGetByID):
  2880. (JSC::Interpreter::privateExecute):
  2881. * jit/JITStubs.cpp:
  2882. (JSC::JITThunks::tryCacheGetByID):
  2883. (JSC::DEFINE_STUB_FUNCTION):
  2884. * jsc.cpp:
  2885. (GlobalObject::GlobalObject):
  2886. * runtime/ArgList.cpp:
  2887. (JSC::MarkedArgumentBuffer::markLists):
  2888. * runtime/Arguments.cpp:
  2889. (JSC::Arguments::markChildren):
  2890. (JSC::Arguments::getOwnPropertySlot):
  2891. (JSC::Arguments::getOwnPropertyDescriptor):
  2892. (JSC::Arguments::put):
  2893. * runtime/Arguments.h:
  2894. (JSC::Arguments::setActivation):
  2895. (JSC::Arguments::Arguments):
  2896. * runtime/ArrayConstructor.cpp:
  2897. (JSC::ArrayConstructor::ArrayConstructor):
  2898. (JSC::constructArrayWithSizeQuirk):
  2899. * runtime/ArrayPrototype.cpp:
  2900. (JSC::arrayProtoFuncSplice):
  2901. * runtime/BatchedTransitionOptimizer.h:
  2902. (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
  2903. (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
  2904. * runtime/BooleanConstructor.cpp:
  2905. (JSC::BooleanConstructor::BooleanConstructor):
  2906. (JSC::constructBoolean):
  2907. (JSC::constructBooleanFromImmediateBoolean):
  2908. * runtime/BooleanPrototype.cpp:
  2909. (JSC::BooleanPrototype::BooleanPrototype):
  2910. * runtime/ConservativeSet.cpp:
  2911. (JSC::ConservativeSet::grow):
  2912. * runtime/ConservativeSet.h:
  2913. (JSC::ConservativeSet::~ConservativeSet):
  2914. (JSC::ConservativeSet::mark):
  2915. * runtime/DateConstructor.cpp:
  2916. (JSC::DateConstructor::DateConstructor):
  2917. * runtime/DateInstance.cpp:
  2918. (JSC::DateInstance::DateInstance):
  2919. * runtime/DatePrototype.cpp:
  2920. (JSC::dateProtoFuncSetTime):
  2921. (JSC::setNewValueFromTimeArgs):
  2922. (JSC::setNewValueFromDateArgs):
  2923. (JSC::dateProtoFuncSetYear):
  2924. * runtime/ErrorConstructor.cpp:
  2925. (JSC::ErrorConstructor::ErrorConstructor):
  2926. * runtime/ErrorInstance.cpp:
  2927. (JSC::ErrorInstance::ErrorInstance):
  2928. * runtime/ErrorPrototype.cpp:
  2929. (JSC::ErrorPrototype::ErrorPrototype):
  2930. * runtime/FunctionConstructor.cpp:
  2931. (JSC::FunctionConstructor::FunctionConstructor):
  2932. * runtime/FunctionPrototype.cpp:
  2933. (JSC::FunctionPrototype::FunctionPrototype):
  2934. * runtime/GetterSetter.cpp:
  2935. (JSC::GetterSetter::markChildren):
  2936. * runtime/GetterSetter.h:
  2937. (JSC::GetterSetter::GetterSetter):
  2938. (JSC::GetterSetter::getter):
  2939. (JSC::GetterSetter::setGetter):
  2940. (JSC::GetterSetter::setter):
  2941. (JSC::GetterSetter::setSetter):
  2942. * runtime/GlobalEvalFunction.cpp:
  2943. (JSC::GlobalEvalFunction::GlobalEvalFunction):
  2944. (JSC::GlobalEvalFunction::markChildren):
  2945. * runtime/GlobalEvalFunction.h:
  2946. (JSC::GlobalEvalFunction::cachedGlobalObject):
  2947. * runtime/Heap.cpp:
  2948. (JSC::Heap::markProtectedObjects):
  2949. (JSC::Heap::markTempSortVectors):
  2950. (JSC::Heap::markRoots):
  2951. * runtime/InternalFunction.cpp:
  2952. (JSC::InternalFunction::InternalFunction):
  2953. * runtime/JSAPIValueWrapper.h:
  2954. (JSC::JSAPIValueWrapper::value):
  2955. (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
  2956. * runtime/JSActivation.cpp:
  2957. (JSC::JSActivation::markChildren):
  2958. (JSC::JSActivation::put):
  2959. * runtime/JSArray.cpp:
  2960. (JSC::JSArray::JSArray):
  2961. (JSC::JSArray::getOwnPropertySlot):
  2962. (JSC::JSArray::getOwnPropertyDescriptor):
  2963. (JSC::JSArray::put):
  2964. (JSC::JSArray::putSlowCase):
  2965. (JSC::JSArray::deleteProperty):
  2966. (JSC::JSArray::increaseVectorLength):
  2967. (JSC::JSArray::setLength):
  2968. (JSC::JSArray::pop):
  2969. (JSC::JSArray::push):
  2970. (JSC::JSArray::unshiftCount):
  2971. (JSC::JSArray::sort):
  2972. (JSC::JSArray::fillArgList):
  2973. (JSC::JSArray::copyToRegisters):
  2974. (JSC::JSArray::compactForSorting):
  2975. * runtime/JSArray.h:
  2976. (JSC::JSArray::getIndex):
  2977. (JSC::JSArray::setIndex):
  2978. (JSC::JSArray::uncheckedSetIndex):
  2979. (JSC::JSArray::markChildrenDirect):
  2980. * runtime/JSByteArray.cpp:
  2981. (JSC::JSByteArray::JSByteArray):
  2982. * runtime/JSCell.h:
  2983. (JSC::JSCell::JSValue::toThisObject):
  2984. (JSC::JSCell::MarkStack::append):
  2985. * runtime/JSFunction.cpp:
  2986. (JSC::JSFunction::JSFunction):
  2987. (JSC::JSFunction::getOwnPropertySlot):
  2988. * runtime/JSGlobalData.h:
  2989. * runtime/JSGlobalObject.cpp:
  2990. (JSC::markIfNeeded):
  2991. (JSC::JSGlobalObject::reset):
  2992. (JSC::JSGlobalObject::resetPrototype):
  2993. (JSC::JSGlobalObject::markChildren):
  2994. * runtime/JSGlobalObject.h:
  2995. (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
  2996. (JSC::JSGlobalObject::regExpConstructor):
  2997. (JSC::JSGlobalObject::errorConstructor):
  2998. (JSC::JSGlobalObject::evalErrorConstructor):
  2999. (JSC::JSGlobalObject::rangeErrorConstructor):
  3000. (JSC::JSGlobalObject::referenceErrorConstructor):
  3001. (JSC::JSGlobalObject::syntaxErrorConstructor):
  3002. (JSC::JSGlobalObject::typeErrorConstructor):
  3003. (JSC::JSGlobalObject::URIErrorConstructor):
  3004. (JSC::JSGlobalObject::evalFunction):
  3005. (JSC::JSGlobalObject::objectPrototype):
  3006. (JSC::JSGlobalObject::functionPrototype):
  3007. (JSC::JSGlobalObject::arrayPrototype):
  3008. (JSC::JSGlobalObject::booleanPrototype):
  3009. (JSC::JSGlobalObject::stringPrototype):
  3010. (JSC::JSGlobalObject::numberPrototype):
  3011. (JSC::JSGlobalObject::datePrototype):
  3012. (JSC::JSGlobalObject::regExpPrototype):
  3013. (JSC::JSGlobalObject::methodCallDummy):
  3014. (JSC::Structure::prototypeForLookup):
  3015. (JSC::constructArray):
  3016. * runtime/JSONObject.cpp:
  3017. (JSC::Stringifier::Holder::object):
  3018. (JSC::Stringifier::markAggregate):
  3019. (JSC::Stringifier::stringify):
  3020. (JSC::Stringifier::Holder::appendNextProperty):
  3021. (JSC::Walker::callReviver):
  3022. (JSC::Walker::walk):
  3023. * runtime/JSObject.cpp:
  3024. (JSC::JSObject::defineGetter):
  3025. (JSC::JSObject::defineSetter):
  3026. (JSC::JSObject::removeDirect):
  3027. (JSC::JSObject::putDirectFunction):
  3028. (JSC::JSObject::putDirectFunctionWithoutTransition):
  3029. (JSC::putDescriptor):
  3030. (JSC::JSObject::defineOwnProperty):
  3031. * runtime/JSObject.h:
  3032. (JSC::JSObject::getDirectOffset):
  3033. (JSC::JSObject::putDirectOffset):
  3034. (JSC::JSObject::flattenDictionaryObject):
  3035. (JSC::JSObject::putDirectInternal):
  3036. (JSC::JSObject::putDirect):
  3037. (JSC::JSObject::putDirectFunction):
  3038. (JSC::JSObject::putDirectWithoutTransition):
  3039. (JSC::JSObject::putDirectFunctionWithoutTransition):
  3040. (JSC::JSValue::putDirect):
  3041. (JSC::JSObject::allocatePropertyStorageInline):
  3042. (JSC::JSObject::markChildrenDirect):
  3043. * runtime/JSPropertyNameIterator.cpp:
  3044. (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
  3045. (JSC::JSPropertyNameIterator::get):
  3046. * runtime/JSPropertyNameIterator.h:
  3047. * runtime/JSStaticScopeObject.cpp:
  3048. (JSC::JSStaticScopeObject::markChildren):
  3049. * runtime/JSString.cpp:
  3050. (JSC::StringObject::create):
  3051. * runtime/JSValue.h:
  3052. * runtime/JSWrapperObject.cpp:
  3053. (JSC::JSWrapperObject::markChildren):
  3054. * runtime/JSWrapperObject.h:
  3055. (JSC::JSWrapperObject::internalValue):
  3056. (JSC::JSWrapperObject::setInternalValue):
  3057. * runtime/LiteralParser.cpp:
  3058. (JSC::LiteralParser::parse):
  3059. * runtime/Lookup.cpp:
  3060. (JSC::setUpStaticFunctionSlot):
  3061. * runtime/Lookup.h:
  3062. (JSC::lookupPut):
  3063. * runtime/MarkStack.h:
  3064. (JSC::MarkStack::appendValues):
  3065. * runtime/MathObject.cpp:
  3066. (JSC::MathObject::MathObject):
  3067. * runtime/NativeErrorConstructor.cpp:
  3068. (JSC::NativeErrorConstructor::NativeErrorConstructor):
  3069. * runtime/NativeErrorPrototype.cpp:
  3070. (JSC::NativeErrorPrototype::NativeErrorPrototype):
  3071. * runtime/NumberConstructor.cpp:
  3072. (JSC::NumberConstructor::NumberConstructor):
  3073. (JSC::constructWithNumberConstructor):
  3074. * runtime/NumberObject.cpp:
  3075. (JSC::constructNumber):
  3076. * runtime/NumberPrototype.cpp:
  3077. (JSC::NumberPrototype::NumberPrototype):
  3078. * runtime/ObjectConstructor.cpp:
  3079. (JSC::ObjectConstructor::ObjectConstructor):
  3080. (JSC::objectConstructorGetOwnPropertyDescriptor):
  3081. * runtime/Operations.h:
  3082. (JSC::normalizePrototypeChain):
  3083. (JSC::resolveBase):
  3084. * runtime/PrototypeFunction.cpp:
  3085. (JSC::PrototypeFunction::PrototypeFunction):
  3086. * runtime/PutPropertySlot.h:
  3087. (JSC::PutPropertySlot::setExistingProperty):
  3088. (JSC::PutPropertySlot::setNewProperty):
  3089. (JSC::PutPropertySlot::base):
  3090. * runtime/RegExpConstructor.cpp:
  3091. (JSC::RegExpConstructor::RegExpConstructor):
  3092. * runtime/ScopeChain.cpp:
  3093. (JSC::ScopeChainNode::print):
  3094. * runtime/ScopeChain.h:
  3095. (JSC::ScopeChainNode::~ScopeChainNode):
  3096. (JSC::ScopeChainIterator::operator*):
  3097. (JSC::ScopeChainIterator::operator->):
  3098. (JSC::ScopeChain::top):
  3099. * runtime/ScopeChainMark.h:
  3100. (JSC::ScopeChain::markAggregate):
  3101. * runtime/SmallStrings.cpp:
  3102. (JSC::isMarked):
  3103. (JSC::SmallStrings::markChildren):
  3104. * runtime/SmallStrings.h:
  3105. (JSC::SmallStrings::emptyString):
  3106. (JSC::SmallStrings::singleCharacterString):
  3107. (JSC::SmallStrings::singleCharacterStrings):
  3108. * runtime/StringConstructor.cpp:
  3109. (JSC::StringConstructor::StringConstructor):
  3110. * runtime/StringObject.cpp:
  3111. (JSC::StringObject::StringObject):
  3112. * runtime/StringObject.h:
  3113. * runtime/StringPrototype.cpp:
  3114. (JSC::StringPrototype::StringPrototype):
  3115. * runtime/Structure.cpp:
  3116. (JSC::Structure::Structure):
  3117. (JSC::Structure::addPropertyTransition):
  3118. (JSC::Structure::toDictionaryTransition):
  3119. (JSC::Structure::flattenDictionaryStructure):
  3120. * runtime/Structure.h:
  3121. (JSC::Structure::storedPrototype):
  3122. * runtime/WeakGCMap.h:
  3123. (JSC::WeakGCMap::uncheckedGet):
  3124. (JSC::WeakGCMap::isValid):
  3125. (JSC::::get):
  3126. (JSC::::take):
  3127. (JSC::::set):
  3128. (JSC::::uncheckedRemove):
  3129. * runtime/WriteBarrier.h: Removed.
  3130. 2011-01-28 Gavin Barraclough <barraclough@apple.com>
  3131. Reviewed by Geoff Garen.
  3132. https://bugs.webkit.org/show_bug.cgi?id=53352
  3133. Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
  3134. The FixedVMPoolAllocator currently uses a best fix policy -
  3135. switch to first fit, this is less prone to external fragmentation.
  3136. * jit/ExecutableAllocatorFixedVMPool.cpp:
  3137. (JSC::AllocationTableSizeClass::AllocationTableSizeClass):
  3138. (JSC::AllocationTableSizeClass::blockSize):
  3139. (JSC::AllocationTableSizeClass::blockCount):
  3140. (JSC::AllocationTableSizeClass::blockAlignment):
  3141. (JSC::AllocationTableSizeClass::size):
  3142. (JSC::AllocationTableLeaf::AllocationTableLeaf):
  3143. (JSC::AllocationTableLeaf::~AllocationTableLeaf):
  3144. (JSC::AllocationTableLeaf::allocate):
  3145. (JSC::AllocationTableLeaf::free):
  3146. (JSC::AllocationTableLeaf::isEmpty):
  3147. (JSC::AllocationTableLeaf::isFull):
  3148. (JSC::AllocationTableLeaf::size):
  3149. (JSC::AllocationTableLeaf::classForSize):
  3150. (JSC::AllocationTableLeaf::dump):
  3151. (JSC::LazyAllocationTable::LazyAllocationTable):
  3152. (JSC::LazyAllocationTable::~LazyAllocationTable):
  3153. (JSC::LazyAllocationTable::allocate):
  3154. (JSC::LazyAllocationTable::free):
  3155. (JSC::LazyAllocationTable::isEmpty):
  3156. (JSC::LazyAllocationTable::isFull):
  3157. (JSC::LazyAllocationTable::size):
  3158. (JSC::LazyAllocationTable::dump):
  3159. (JSC::LazyAllocationTable::classForSize):
  3160. (JSC::AllocationTableDirectory::AllocationTableDirectory):
  3161. (JSC::AllocationTableDirectory::~AllocationTableDirectory):
  3162. (JSC::AllocationTableDirectory::allocate):
  3163. (JSC::AllocationTableDirectory::free):
  3164. (JSC::AllocationTableDirectory::isEmpty):
  3165. (JSC::AllocationTableDirectory::isFull):
  3166. (JSC::AllocationTableDirectory::size):
  3167. (JSC::AllocationTableDirectory::classForSize):
  3168. (JSC::AllocationTableDirectory::dump):
  3169. (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
  3170. (JSC::FixedVMPoolAllocator::alloc):
  3171. (JSC::FixedVMPoolAllocator::free):
  3172. (JSC::FixedVMPoolAllocator::allocated):
  3173. (JSC::FixedVMPoolAllocator::isValid):
  3174. (JSC::FixedVMPoolAllocator::classForSize):
  3175. (JSC::FixedVMPoolAllocator::offsetToPointer):
  3176. (JSC::FixedVMPoolAllocator::pointerToOffset):
  3177. (JSC::ExecutableAllocator::committedByteCount):
  3178. (JSC::ExecutableAllocator::isValid):
  3179. (JSC::ExecutableAllocator::underMemoryPressure):
  3180. (JSC::ExecutablePool::systemAlloc):
  3181. (JSC::ExecutablePool::systemRelease):
  3182. * wtf/PageReservation.h:
  3183. (WTF::PageReservation::PageReservation):
  3184. (WTF::PageReservation::commit):
  3185. (WTF::PageReservation::decommit):
  3186. (WTF::PageReservation::committed):
  3187. 2011-01-27 Oliver Hunt <oliver@apple.com>
  3188. Reviewed by Geoffrey Garen.
  3189. Convert markstack to a slot visitor API
  3190. https://bugs.webkit.org/show_bug.cgi?id=53219
  3191. Move the MarkStack over to a slot based marking API.
  3192. In order to avoiding aliasing concerns there are two new types
  3193. that need to be used when holding on to JSValues and JSCell that
  3194. need to be marked: WriteBarrier and DeprecatedPtr. WriteBarrier
  3195. is expected to be used for any JSValue or Cell that's lifetime and
  3196. marking is controlled by another GC object. DeprecatedPtr is used
  3197. for any value that we need to rework ownership for.
  3198. The change over to this model has produced a large amount of
  3199. code changes, but they are mostly mechanical (forwarding JSGlobalData,
  3200. etc).
  3201. * API/JSCallbackObject.h:
  3202. (JSC::JSCallbackObjectData::setPrivateProperty):
  3203. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
  3204. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
  3205. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
  3206. (JSC::JSCallbackObject::setPrivateProperty):
  3207. * API/JSCallbackObjectFunctions.h:
  3208. (JSC::::put):
  3209. (JSC::::staticFunctionGetter):
  3210. * API/JSObjectRef.cpp:
  3211. (JSObjectMakeConstructor):
  3212. (JSObjectSetPrivateProperty):
  3213. * API/JSWeakObjectMapRefInternal.h:
  3214. * JavaScriptCore.exp:
  3215. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  3216. * JavaScriptCore.xcodeproj/project.pbxproj:
  3217. * bytecode/CodeBlock.cpp:
  3218. (JSC::CodeBlock::markAggregate):
  3219. * bytecode/CodeBlock.h:
  3220. (JSC::CodeBlock::globalObject):
  3221. * bytecompiler/BytecodeGenerator.cpp:
  3222. (JSC::BytecodeGenerator::BytecodeGenerator):
  3223. (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
  3224. (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
  3225. (JSC::BytecodeGenerator::findScopedProperty):
  3226. * debugger/DebuggerActivation.cpp:
  3227. (JSC::DebuggerActivation::DebuggerActivation):
  3228. (JSC::DebuggerActivation::markChildren):
  3229. * debugger/DebuggerActivation.h:
  3230. * interpreter/Interpreter.cpp:
  3231. (JSC::Interpreter::resolve):
  3232. (JSC::Interpreter::resolveSkip):
  3233. (JSC::Interpreter::resolveGlobalDynamic):
  3234. (JSC::Interpreter::resolveBaseAndProperty):
  3235. (JSC::Interpreter::unwindCallFrame):
  3236. (JSC::appendSourceToError):
  3237. (JSC::Interpreter::execute):
  3238. (JSC::Interpreter::privateExecute):
  3239. * interpreter/Register.h:
  3240. (JSC::Register::jsValueSlot):
  3241. * jit/JITStubs.cpp:
  3242. (JSC::JITThunks::tryCacheGetByID):
  3243. (JSC::DEFINE_STUB_FUNCTION):
  3244. * jsc.cpp:
  3245. (GlobalObject::GlobalObject):
  3246. * runtime/Arguments.cpp:
  3247. (JSC::Arguments::markChildren):
  3248. (JSC::Arguments::getOwnPropertySlot):
  3249. (JSC::Arguments::getOwnPropertyDescriptor):
  3250. (JSC::Arguments::put):
  3251. * runtime/Arguments.h:
  3252. (JSC::Arguments::setActivation):
  3253. (JSC::Arguments::Arguments):
  3254. * runtime/ArrayConstructor.cpp:
  3255. (JSC::ArrayConstructor::ArrayConstructor):
  3256. (JSC::constructArrayWithSizeQuirk):
  3257. * runtime/ArrayPrototype.cpp:
  3258. (JSC::arrayProtoFuncSplice):
  3259. * runtime/BatchedTransitionOptimizer.h:
  3260. (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
  3261. (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
  3262. * runtime/BooleanConstructor.cpp:
  3263. (JSC::BooleanConstructor::BooleanConstructor):
  3264. (JSC::constructBoolean):
  3265. (JSC::constructBooleanFromImmediateBoolean):
  3266. * runtime/BooleanPrototype.cpp:
  3267. (JSC::BooleanPrototype::BooleanPrototype):
  3268. * runtime/ConservativeSet.h:
  3269. (JSC::ConservativeSet::mark):
  3270. * runtime/DateConstructor.cpp:
  3271. (JSC::DateConstructor::DateConstructor):
  3272. * runtime/DateInstance.cpp:
  3273. (JSC::DateInstance::DateInstance):
  3274. * runtime/DatePrototype.cpp:
  3275. (JSC::dateProtoFuncSetTime):
  3276. (JSC::setNewValueFromTimeArgs):
  3277. (JSC::setNewValueFromDateArgs):
  3278. (JSC::dateProtoFuncSetYear):
  3279. * runtime/ErrorConstructor.cpp:
  3280. (JSC::ErrorConstructor::ErrorConstructor):
  3281. * runtime/ErrorInstance.cpp:
  3282. (JSC::ErrorInstance::ErrorInstance):
  3283. * runtime/ErrorPrototype.cpp:
  3284. (JSC::ErrorPrototype::ErrorPrototype):
  3285. * runtime/FunctionConstructor.cpp:
  3286. (JSC::FunctionConstructor::FunctionConstructor):
  3287. * runtime/FunctionPrototype.cpp:
  3288. (JSC::FunctionPrototype::FunctionPrototype):
  3289. * runtime/GetterSetter.cpp:
  3290. (JSC::GetterSetter::markChildren):
  3291. * runtime/GetterSetter.h:
  3292. (JSC::GetterSetter::GetterSetter):
  3293. (JSC::GetterSetter::getter):
  3294. (JSC::GetterSetter::setGetter):
  3295. (JSC::GetterSetter::setter):
  3296. (JSC::GetterSetter::setSetter):
  3297. * runtime/GlobalEvalFunction.cpp:
  3298. (JSC::GlobalEvalFunction::GlobalEvalFunction):
  3299. (JSC::GlobalEvalFunction::markChildren):
  3300. * runtime/GlobalEvalFunction.h:
  3301. (JSC::GlobalEvalFunction::cachedGlobalObject):
  3302. * runtime/Heap.cpp:
  3303. (JSC::Heap::markProtectedObjects):
  3304. (JSC::Heap::markTempSortVectors):
  3305. (JSC::Heap::markRoots):
  3306. * runtime/InternalFunction.cpp:
  3307. (JSC::InternalFunction::InternalFunction):
  3308. * runtime/JSAPIValueWrapper.h:
  3309. (JSC::JSAPIValueWrapper::value):
  3310. (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
  3311. * runtime/JSActivation.cpp:
  3312. (JSC::JSActivation::put):
  3313. * runtime/JSArray.cpp:
  3314. (JSC::JSArray::JSArray):
  3315. (JSC::JSArray::getOwnPropertySlot):
  3316. (JSC::JSArray::getOwnPropertyDescriptor):
  3317. (JSC::JSArray::put):
  3318. (JSC::JSArray::putSlowCase):
  3319. (JSC::JSArray::deleteProperty):
  3320. (JSC::JSArray::increaseVectorLength):
  3321. (JSC::JSArray::setLength):
  3322. (JSC::JSArray::pop):
  3323. (JSC::JSArray::push):
  3324. (JSC::JSArray::unshiftCount):
  3325. (JSC::JSArray::sort):
  3326. (JSC::JSArray::fillArgList):
  3327. (JSC::JSArray::copyToRegisters):
  3328. (JSC::JSArray::compactForSorting):
  3329. * runtime/JSArray.h:
  3330. (JSC::JSArray::getIndex):
  3331. (JSC::JSArray::setIndex):
  3332. (JSC::JSArray::uncheckedSetIndex):
  3333. (JSC::JSArray::markChildrenDirect):
  3334. * runtime/JSByteArray.cpp:
  3335. (JSC::JSByteArray::JSByteArray):
  3336. * runtime/JSCell.h:
  3337. (JSC::JSCell::MarkStack::append):
  3338. (JSC::JSCell::MarkStack::appendCell):
  3339. * runtime/JSFunction.cpp:
  3340. (JSC::JSFunction::JSFunction):
  3341. (JSC::JSFunction::getOwnPropertySlot):
  3342. * runtime/JSGlobalObject.cpp:
  3343. (JSC::markIfNeeded):
  3344. (JSC::JSGlobalObject::reset):
  3345. (JSC::JSGlobalObject::resetPrototype):
  3346. (JSC::JSGlobalObject::markChildren):
  3347. * runtime/JSGlobalObject.h:
  3348. (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
  3349. (JSC::JSGlobalObject::regExpConstructor):
  3350. (JSC::JSGlobalObject::errorConstructor):
  3351. (JSC::JSGlobalObject::evalErrorConstructor):
  3352. (JSC::JSGlobalObject::rangeErrorConstructor):
  3353. (JSC::JSGlobalObject::referenceErrorConstructor):
  3354. (JSC::JSGlobalObject::syntaxErrorConstructor):
  3355. (JSC::JSGlobalObject::typeErrorConstructor):
  3356. (JSC::JSGlobalObject::URIErrorConstructor):
  3357. (JSC::JSGlobalObject::evalFunction):
  3358. (JSC::JSGlobalObject::objectPrototype):
  3359. (JSC::JSGlobalObject::functionPrototype):
  3360. (JSC::JSGlobalObject::arrayPrototype):
  3361. (JSC::JSGlobalObject::booleanPrototype):
  3362. (JSC::JSGlobalObject::stringPrototype):
  3363. (JSC::JSGlobalObject::numberPrototype):
  3364. (JSC::JSGlobalObject::datePrototype):
  3365. (JSC::JSGlobalObject::regExpPrototype):
  3366. (JSC::JSGlobalObject::methodCallDummy):
  3367. (JSC::constructArray):
  3368. * runtime/JSONObject.cpp:
  3369. (JSC::Stringifier::Holder::object):
  3370. (JSC::Stringifier::Holder::objectSlot):
  3371. (JSC::Stringifier::markAggregate):
  3372. (JSC::Stringifier::stringify):
  3373. (JSC::Stringifier::Holder::appendNextProperty):
  3374. (JSC::Walker::callReviver):
  3375. (JSC::Walker::walk):
  3376. * runtime/JSObject.cpp:
  3377. (JSC::JSObject::defineGetter):
  3378. (JSC::JSObject::defineSetter):
  3379. (JSC::JSObject::removeDirect):
  3380. (JSC::JSObject::putDirectFunction):
  3381. (JSC::JSObject::putDirectFunctionWithoutTransition):
  3382. (JSC::putDescriptor):
  3383. (JSC::JSObject::defineOwnProperty):
  3384. * runtime/JSObject.h:
  3385. (JSC::JSObject::putDirectOffset):
  3386. (JSC::JSObject::putUndefinedAtDirectOffset):
  3387. (JSC::JSObject::flattenDictionaryObject):
  3388. (JSC::JSObject::putDirectInternal):
  3389. (JSC::JSObject::putDirect):
  3390. (JSC::JSObject::putDirectFunction):
  3391. (JSC::JSObject::putDirectWithoutTransition):
  3392. (JSC::JSObject::putDirectFunctionWithoutTransition):
  3393. (JSC::JSValue::putDirect):
  3394. (JSC::JSObject::allocatePropertyStorageInline):
  3395. (JSC::JSObject::markChildrenDirect):
  3396. * runtime/JSStaticScopeObject.cpp:
  3397. (JSC::JSStaticScopeObject::markChildren):
  3398. * runtime/JSString.cpp:
  3399. (JSC::StringObject::create):
  3400. * runtime/JSValue.h:
  3401. * runtime/JSWrapperObject.cpp:
  3402. (JSC::JSWrapperObject::markChildren):
  3403. * runtime/JSWrapperObject.h:
  3404. (JSC::JSWrapperObject::internalValue):
  3405. (JSC::JSWrapperObject::setInternalValue):
  3406. * runtime/LiteralParser.cpp:
  3407. (JSC::LiteralParser::parse):
  3408. * runtime/Lookup.cpp:
  3409. (JSC::setUpStaticFunctionSlot):
  3410. * runtime/Lookup.h:
  3411. (JSC::lookupPut):
  3412. * runtime/MarkStack.h:
  3413. * runtime/MathObject.cpp:
  3414. (JSC::MathObject::MathObject):
  3415. * runtime/NativeErrorConstructor.cpp:
  3416. (JSC::NativeErrorConstructor::NativeErrorConstructor):
  3417. * runtime/NativeErrorPrototype.cpp:
  3418. (JSC::NativeErrorPrototype::NativeErrorPrototype):
  3419. * runtime/NumberConstructor.cpp:
  3420. (JSC::NumberConstructor::NumberConstructor):
  3421. (JSC::constructWithNumberConstructor):
  3422. * runtime/NumberObject.cpp:
  3423. (JSC::constructNumber):
  3424. * runtime/NumberPrototype.cpp:
  3425. (JSC::NumberPrototype::NumberPrototype):
  3426. * runtime/ObjectConstructor.cpp:
  3427. (JSC::ObjectConstructor::ObjectConstructor):
  3428. (JSC::objectConstructorGetOwnPropertyDescriptor):
  3429. * runtime/Operations.h:
  3430. (JSC::normalizePrototypeChain):
  3431. (JSC::resolveBase):
  3432. * runtime/PrototypeFunction.cpp:
  3433. (JSC::PrototypeFunction::PrototypeFunction):
  3434. * runtime/PutPropertySlot.h:
  3435. (JSC::PutPropertySlot::setExistingProperty):
  3436. (JSC::PutPropertySlot::setNewProperty):
  3437. (JSC::PutPropertySlot::base):
  3438. * runtime/RegExpConstructor.cpp:
  3439. (JSC::RegExpConstructor::RegExpConstructor):
  3440. * runtime/ScopeChain.cpp:
  3441. (JSC::ScopeChainNode::print):
  3442. * runtime/ScopeChain.h:
  3443. (JSC::ScopeChainNode::~ScopeChainNode):
  3444. (JSC::ScopeChainIterator::operator*):
  3445. (JSC::ScopeChainIterator::operator->):
  3446. (JSC::ScopeChain::top):
  3447. * runtime/ScopeChainMark.h:
  3448. (JSC::ScopeChain::markAggregate):
  3449. * runtime/SmallStrings.cpp:
  3450. (JSC::isMarked):
  3451. (JSC::SmallStrings::markChildren):
  3452. * runtime/SmallStrings.h:
  3453. (JSC::SmallStrings::emptyString):
  3454. (JSC::SmallStrings::singleCharacterString):
  3455. (JSC::SmallStrings::singleCharacterStrings):
  3456. * runtime/StringConstructor.cpp:
  3457. (JSC::StringConstructor::StringConstructor):
  3458. * runtime/StringObject.cpp:
  3459. (JSC::StringObject::StringObject):
  3460. * runtime/StringObject.h:
  3461. * runtime/StringPrototype.cpp:
  3462. (JSC::StringPrototype::StringPrototype):
  3463. * runtime/Structure.cpp:
  3464. (JSC::Structure::flattenDictionaryStructure):
  3465. * runtime/Structure.h:
  3466. (JSC::Structure::storedPrototypeSlot):
  3467. * runtime/WeakGCMap.h:
  3468. (JSC::WeakGCMap::uncheckedGet):
  3469. (JSC::WeakGCMap::uncheckedGetSlot):
  3470. (JSC::::get):
  3471. (JSC::::take):
  3472. (JSC::::set):
  3473. (JSC::::uncheckedRemove):
  3474. * runtime/WriteBarrier.h: Added.
  3475. (JSC::DeprecatedPtr::DeprecatedPtr):
  3476. (JSC::DeprecatedPtr::get):
  3477. (JSC::DeprecatedPtr::operator*):
  3478. (JSC::DeprecatedPtr::operator->):
  3479. (JSC::DeprecatedPtr::slot):
  3480. (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
  3481. (JSC::DeprecatedPtr::operator!):
  3482. (JSC::WriteBarrierBase::set):
  3483. (JSC::WriteBarrierBase::get):
  3484. (JSC::WriteBarrierBase::operator*):
  3485. (JSC::WriteBarrierBase::operator->):
  3486. (JSC::WriteBarrierBase::slot):
  3487. (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
  3488. (JSC::WriteBarrierBase::operator!):
  3489. (JSC::WriteBarrier::WriteBarrier):
  3490. (JSC::operator==):
  3491. 2011-01-28 Adam Roben <aroben@apple.com>
  3492. Chromium build fix after r76967
  3493. * wtf/ThreadingPrimitives.h: Use OS(WINDOWS) instead of PLATFORM(WIN), to match other
  3494. similar macros in this file.
  3495. 2011-01-28 Michael Saboff <msaboff@apple.com>
  3496. Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
  3497. https://bugs.webkit.org/show_bug.cgi?id=53271
  3498. Reapplying this this change. No change from prior patch in
  3499. JavaScriptCore.
  3500. Added new isValid() methods to check if a contained object in
  3501. a WeakGCMap is valid when using an unchecked iterator.
  3502. * runtime/WeakGCMap.h:
  3503. (JSC::WeakGCMap::isValid):
  3504. 2011-01-27 Adam Roben <aroben@apple.com>
  3505. Extract code to convert a WTF absolute time to a Win32 wait interval into a separate
  3506. function
  3507. Fixes <http://webkit.org/b/53208> <rdar://problem/8922490> BinarySemaphore should wrap a
  3508. Win32 event
  3509. Reviewed by Dave Hyatt.
  3510. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new function.
  3511. * wtf/ThreadingPrimitives.h: Declare the new function.
  3512. * wtf/ThreadingWin.cpp:
  3513. (WTF::ThreadCondition::timedWait): Moved code to convert the absolute time to a wait
  3514. interval from here...
  3515. (WTF::absoluteTimeToWaitTimeoutInterval): ...to here.
  3516. 2011-01-28 Sam Weinig <sam@webkit.org>
  3517. Reviewed by Maciej Stachowiak.
  3518. Add basic rubber banding support
  3519. <rdar://problem/8219429>
  3520. https://bugs.webkit.org/show_bug.cgi?id=53277
  3521. * wtf/Platform.h: Add ENABLE for rubber banding.
  3522. 2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com>
  3523. Unreviewed, rolling out r76893.
  3524. http://trac.webkit.org/changeset/76893
  3525. https://bugs.webkit.org/show_bug.cgi?id=53287
  3526. It made some tests crash on GTK and Qt debug bots (Requested
  3527. by Ossy on #webkit).
  3528. * runtime/WeakGCMap.h:
  3529. 2011-01-27 Adam Barth <abarth@webkit.org>
  3530. Reviewed by Eric Seidel.
  3531. Add WTFString method to compare equality with Vector<UChar>
  3532. https://bugs.webkit.org/show_bug.cgi?id=53266
  3533. I'm planning to use this method in the new XSS filter implementation,
  3534. but it seems generally useful.
  3535. * wtf/text/StringImpl.h:
  3536. (WTF::equalIgnoringNullity):
  3537. * wtf/text/WTFString.h:
  3538. (WTF::equalIgnoringNullity):
  3539. 2011-01-27 Michael Saboff <msaboff@apple.com>
  3540. Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
  3541. https://bugs.webkit.org/show_bug.cgi?id=53271
  3542. Added new isValid() methods to check if a contained object in
  3543. a WeakGCMap is valid when using an unchecked iterator.
  3544. * runtime/WeakGCMap.h:
  3545. (JSC::WeakGCMap::isValid):
  3546. 2011-01-26 Sam Weinig <sam@webkit.org>
  3547. Reviewed by Maciej Stachowiak.
  3548. Add events to represent the start/end of a gesture scroll
  3549. https://bugs.webkit.org/show_bug.cgi?id=53215
  3550. * wtf/Platform.h: Add ENABLE for gesture events.
  3551. 2011-01-26 Yael Aharon <yael.aharon@nokia.com>
  3552. Reviewed by Laszlo Gombos.
  3553. [Qt][Symbian] Fix --minimal build
  3554. https://bugs.webkit.org/show_bug.cgi?id=52839
  3555. Move definition of USE_SYSTEM_MALLOC out of pri file.
  3556. Put it in platform.h instead.
  3557. * wtf/Platform.h:
  3558. * wtf/TCSystemAlloc.cpp:
  3559. * wtf/wtf.pri:
  3560. 2011-01-26 Patrick Gansterer <paroga@webkit.org>
  3561. Reviewed by Andreas Kling.
  3562. [WINCE] Add JIT support to build system
  3563. https://bugs.webkit.org/show_bug.cgi?id=53079
  3564. * CMakeListsWinCE.txt:
  3565. 2011-01-25 Adam Roben <aroben@apple.com>
  3566. Windows Production build fix
  3567. Reviewed by Steve Falkenburg.
  3568. * JavaScriptCore.vcproj/JavaScriptCore.make: Set BUILDSTYLE to Release_PGO at the very start
  3569. of the file so that ConfigurationBuildDir takes that into account. Also set it the right way
  3570. (by redefining the macro) rather than the wrong way (by modifying the environment variable).
  3571. 2011-01-25 Steve Falkenburg <sfalken@apple.com>
  3572. Rubber-stamped by Adam Roben.
  3573. Windows production build fix.
  3574. Use correct environment variable escaping
  3575. * JavaScriptCore.vcproj/JavaScriptCore.make:
  3576. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
  3577. 2011-01-25 Oliver Hunt <oliver@apple.com>
  3578. Reviewed by Gavin Barraclough.
  3579. JSON.stringify processing time exponentially grows with size of object
  3580. https://bugs.webkit.org/show_bug.cgi?id=51922
  3581. Remove last use of reserveCapacity from JSON stringification, as it results
  3582. in appalling append behaviour when there are a large number of property names
  3583. and nothing else.
  3584. * runtime/JSONObject.cpp:
  3585. (JSC::Stringifier::appendQuotedString):
  3586. 2011-01-25 Antti Koivisto <antti@apple.com>
  3587. Not reviewed.
  3588. Try to fix windows build.
  3589. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  3590. 2011-01-25 Antti Koivisto <antti@apple.com>
  3591. Reviewed by Oliver Hunt.
  3592. REGRESSION: Leak in JSParser::Scope::copyCapturedVariablesToVector()
  3593. https://bugs.webkit.org/show_bug.cgi?id=53061
  3594. Cache did not know about the subclass so failed to fully delete the items.
  3595. Got rid of the subclass and moved the classes to separate files.
  3596. * CMakeLists.txt:
  3597. * GNUmakefile.am:
  3598. * JavaScriptCore.exp:
  3599. * JavaScriptCore.gypi:
  3600. * JavaScriptCore.pro:
  3601. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  3602. * JavaScriptCore.xcodeproj/project.pbxproj:
  3603. * parser/JSParser.cpp:
  3604. (JSC::JSParser::Scope::saveFunctionInfo):
  3605. (JSC::JSParser::Scope::restoreFunctionInfo):
  3606. (JSC::JSParser::findCachedFunctionInfo):
  3607. (JSC::JSParser::parseFunctionInfo):
  3608. * parser/SourceProvider.h:
  3609. * parser/SourceProviderCache.cpp: Added.
  3610. (JSC::SourceProviderCache::~SourceProviderCache):
  3611. (JSC::SourceProviderCache::byteSize):
  3612. * parser/SourceProviderCache.h: Added.
  3613. (JSC::SourceProviderCache::SourceProviderCache):
  3614. (JSC::SourceProviderCache::add):
  3615. (JSC::SourceProviderCache::get):
  3616. * parser/SourceProviderCacheItem.h: Added.
  3617. (JSC::SourceProviderCacheItem::SourceProviderCacheItem):
  3618. (JSC::SourceProviderCacheItem::approximateByteSize):
  3619. (JSC::SourceProviderCacheItem::closeBraceToken):
  3620. 2011-01-25 Marcilio Mendonca <mamendonca@rim.com>
  3621. Reviewed by Darin Adler.
  3622. Bug 53087: Refactoring: replaced a hanging "else" with a "return"
  3623. statement
  3624. https://bugs.webkit.org/show_bug.cgi?id=53087.
  3625. Refactoring work: Replaced a hanging "else" within an #if PLATFORM(M
  3626. with a "return" so that the code is more readable and less error pro
  3627. (e.g., "else" doesn't use braces so adding extra lines to the else
  3628. block won't have any effect; even worse, code still compiles
  3629. successfully.
  3630. * wtf/Assertions.cpp:
  3631. 2011-01-24 Chris Marrin <cmarrin@apple.com>
  3632. Reviewed by Eric Seidel.
  3633. Change ENABLE_3D_CANVAS to ENABLE_WEBGL
  3634. https://bugs.webkit.org/show_bug.cgi?id=53041
  3635. * Configurations/FeatureDefines.xcconfig:
  3636. 2011-01-25 Adam Roben <aroben@apple.com>
  3637. Windows Production build fix
  3638. * JavaScriptCore.vcproj/JavaScriptCore.make: Added a missing "set".
  3639. 2011-01-25 Patrick Gansterer <paroga@webkit.org>
  3640. Reviewed by Eric Seidel.
  3641. Add missing defines for COMPILER(RVCT) && CPU(ARM_THUMB2)
  3642. https://bugs.webkit.org/show_bug.cgi?id=52949
  3643. * jit/JITStubs.cpp:
  3644. 2011-01-24 Adam Roben <aroben@apple.com>
  3645. Windows Production build fix
  3646. * JavaScriptCore.vcproj/JavaScriptCore.make: Update for move of JavaScriptCore into Source.
  3647. 2011-01-24 Peter Varga <pvarga@webkit.org>
  3648. Reviewed by Oliver Hunt.
  3649. Optimize regex patterns which contain empty alternatives
  3650. https://bugs.webkit.org/show_bug.cgi?id=51395
  3651. Eliminate the empty alternatives from the regex pattern and convert it to do
  3652. the matching in an easier way.
  3653. * yarr/YarrPattern.cpp:
  3654. (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
  3655. 2011-01-24 Andras Becsi <abecsi@webkit.org>
  3656. Reviewed by Csaba Osztrogonác.
  3657. [Qt] Move project files into Source
  3658. https://bugs.webkit.org/show_bug.cgi?id=52891
  3659. * JavaScriptCore.pri:
  3660. * JavaScriptCore.pro:
  3661. * jsc.pro:
  3662. 2011-01-23 Mark Rowe <mrowe@apple.com>
  3663. Follow-up to r76477.
  3664. Fix the scripts that detect problematic code such as static initializers
  3665. and destructors, weak vtables, inappropriate files in the framework wrappers,
  3666. and public headers including private headers. These had all been broken
  3667. since the projects were moved in to the Source directory as the paths to the
  3668. scripts were not updated at that time.
  3669. * JavaScriptCore.xcodeproj/project.pbxproj:
  3670. 2011-01-23 Patrick Gansterer <paroga@webkit.org>
  3671. Reviewed by Darin Adler.
  3672. Use WTF::StringHasher in WebCore
  3673. https://bugs.webkit.org/show_bug.cgi?id=52934
  3674. Add an additional function to calculate the hash
  3675. of data with a runtimedependent size.
  3676. * wtf/StringHasher.h:
  3677. (WTF::StringHasher::createBlobHash):
  3678. 2011-01-23 Patrick Gansterer <paroga@webkit.org>
  3679. Reviewed by David Kilzer.
  3680. Fix comment in String::ascii()
  3681. https://bugs.webkit.org/show_bug.cgi?id=52980
  3682. * wtf/text/WTFString.cpp:
  3683. (WTF::String::ascii):
  3684. 2011-01-23 Patrick Gansterer <paroga@webkit.org>
  3685. Reviewed by David Kilzer.
  3686. Add String::containsOnlyLatin1()
  3687. https://bugs.webkit.org/show_bug.cgi?id=52979
  3688. * wtf/text/WTFString.h:
  3689. (WTF::String::containsOnlyLatin1):
  3690. (WTF::charactersAreAllLatin1):
  3691. 2011-01-23 Patrick Gansterer <paroga@webkit.org>
  3692. Reviewed by Oliver Hunt.
  3693. Remove obsolete JSVALUE32 code
  3694. https://bugs.webkit.org/show_bug.cgi?id=52948
  3695. r70111 removed support for JSVALUE32.
  3696. ARM, MIPS and X86 support JSVALUE32_64 only.
  3697. * jit/JITStubs.cpp:
  3698. 2011-01-22 Geoffrey Garen <ggaren@apple.com>
  3699. Reviewed by Dan Bernstein.
  3700. ASSERT running run-webkit-tests --threaded.
  3701. https://bugs.webkit.org/show_bug.cgi?id=52971
  3702. SunSpider and v8 report no change.
  3703. * runtime/ConservativeSet.cpp:
  3704. (JSC::ConservativeSet::grow):
  3705. (JSC::ConservativeSet::add):
  3706. * runtime/ConservativeSet.h: Tweaked the inline capacity to 128, and
  3707. the growth policy to 2X, to make SunSpider and v8 happy.
  3708. (JSC::ConservativeSet::ConservativeSet):
  3709. (JSC::ConservativeSet::~ConservativeSet):
  3710. (JSC::ConservativeSet::mark): Use OSAllocator directly, instead of malloc.
  3711. Malloc is forbidden during a multi-threaded mark phase because it can
  3712. cause deadlock.
  3713. 2011-01-22 Geoffrey Garen <ggaren@apple.com>
  3714. Reviewed by Geoffrey Garen.
  3715. Rubber-stamped by Maciej Stachowiak.
  3716. A few of Maciej's review suggestions for my last patch.
  3717. https://bugs.webkit.org/show_bug.cgi?id=52946
  3718. SunSpider reports no change.
  3719. * Android.mk:
  3720. * CMakeLists.txt:
  3721. * GNUmakefile.am:
  3722. * JavaScriptCore.gypi:
  3723. * JavaScriptCore.pro:
  3724. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  3725. * JavaScriptCore.xcodeproj/project.pbxproj: Updated build systems.
  3726. * runtime/ConservativeSet.cpp: Added.
  3727. (JSC::isPointerAligned):
  3728. (JSC::ConservativeSet::add):
  3729. * runtime/ConservativeSet.h: Added.
  3730. (JSC::ConservativeSet::ConservativeSet):
  3731. (JSC::ConservativeSet::mark): Split ConservativeSet out into its own
  3732. file, and moved the conservative check into ConservativeSet::add, making
  3733. ConservativeSet's responsibility clearer.
  3734. * runtime/Heap.cpp:
  3735. (JSC::Heap::markRoots):
  3736. * runtime/MachineStackMarker.cpp:
  3737. (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
  3738. (JSC::MachineStackMarker::markOtherThreadConservatively):
  3739. * runtime/MachineStackMarker.h:
  3740. * runtime/MarkStack.h: Updated for changes above.
  3741. 2011-01-22 Patrick Gansterer <paroga@webkit.org>
  3742. Unreviewed WinCE build fix for r76430.
  3743. * runtime/MachineStackMarker.cpp:
  3744. (JSC::swapIfBackwards):
  3745. 2011-01-21 Geoffrey Garen <ggaren@apple.com>
  3746. Reviewed by Beth Dakin.
  3747. Reorganized MarkedSpace, making many of its functions private.
  3748. * runtime/JSCell.h:
  3749. (JSC::JSCell::Heap::heap):
  3750. * runtime/MarkedSpace.h:
  3751. (JSC::MarkedSpace::globalData):
  3752. (JSC::MarkedSpace::heap):
  3753. 2011-01-21 Geoffrey Garen <ggaren@apple.com>
  3754. Try to fix build: moved helper function out of #ifdef.
  3755. * runtime/MachineStackMarker.cpp:
  3756. (JSC::swapIfBackwards):
  3757. 2011-01-21 Geoffrey Garen <ggaren@apple.com>
  3758. Rubber-stamped by Maciej Stachowiak.
  3759. A few of Maciej's review suggestions for my last patch.
  3760. https://bugs.webkit.org/show_bug.cgi?id=52946
  3761. SunSpider reports no change.
  3762. * runtime/MachineStackMarker.cpp:
  3763. (JSC::swapIfBackwards): Added a helper function for handling platforms
  3764. where the stack can grow in any direction.
  3765. (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
  3766. (JSC::MachineStackMarker::markOtherThreadConservatively): Use the helper
  3767. function.
  3768. (JSC::isPointerAligned): Use "!" instead of "==0" because a robot told me to.
  3769. (JSC::MachineStackMarker::markConservatively): Changed to use a more
  3770. standard looping idiom, and to use the helper function above.
  3771. * runtime/MarkedSpace.h:
  3772. (JSC::MarkedSpace::isCellAligned): Use "!" instead of "==0" because a robot told me to.
  3773. 2011-01-21 Geoffrey Garen <ggaren@apple.com>
  3774. Reviewed by Maciej Stachowiak.
  3775. Cleaned up some conservative marking code.
  3776. https://bugs.webkit.org/show_bug.cgi?id=52946
  3777. SunSpider reports no change.
  3778. * interpreter/RegisterFile.h: No need for a special marking function,
  3779. since we already expose a start() and end().
  3780. * runtime/Heap.cpp:
  3781. (JSC::Heap::registerFile):
  3782. (JSC::Heap::markRoots):
  3783. * runtime/Heap.h:
  3784. (JSC::Heap::contains): Migrated markConservatively() to the machine stack
  3785. marker class. Now, Heap just provides a contains() function, which the
  3786. machine stack marker uses for checking whether a pointer points into the heap.
  3787. * runtime/MachineStackMarker.cpp:
  3788. (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
  3789. (JSC::MachineStackMarker::markOtherThreadConservatively):
  3790. (JSC::isPointerAligned):
  3791. (JSC::MachineStackMarker::markConservatively):
  3792. * runtime/MachineStackMarker.h: Move the conservative marking code here.
  3793. * runtime/MarkStack.h:
  3794. (JSC::ConservativeSet::add):
  3795. (JSC::ConservativeSet::mark): Changed to using a vector instead of hash
  3796. set. Vector seems to be a bit faster, and it generates smaller code.
  3797. * runtime/MarkedSpace.cpp:
  3798. (JSC::MarkedSpace::containsSlowCase):
  3799. * runtime/MarkedSpace.h:
  3800. (JSC::MarkedSpace::isCellAligned):
  3801. (JSC::MarkedSpace::isPossibleCell):
  3802. (JSC::MarkedSpace::contains): Kept the code for determining whether a
  3803. pointer pointed into marked space, and moved the code for marking
  3804. a set of conservative pointers into the machine stack marker.
  3805. * wtf/HashSet.h:
  3806. (WTF::::add): Added two missing inlines that I noticed while testing
  3807. vector vs hash set.
  3808. 2011-01-21 Mark Rowe <mrowe@apple.com>
  3809. Reviewed by Sam Weinig.
  3810. Work around a Clang bug <rdar://problem/8876150> that leads to it incorrectly emitting an access
  3811. control warning when a client tries to use operator bool exposed above via "using PageBlock::operator bool".
  3812. * wtf/PageAllocation.h:
  3813. (WTF::PageAllocation::operator bool):
  3814. * wtf/PageReservation.h:
  3815. (WTF::PageReservation::operator bool):
  3816. 2011-01-21 Michael Saboff <msaboff@apple.com>
  3817. Reviewed by Oliver Hunt.
  3818. [RegexFuzz] Hang with forward assertion
  3819. https://bugs.webkit.org/show_bug.cgi?id=52825
  3820. <rdar://problem/8894332>
  3821. The backtrackTo label from the first term in a list of terms is
  3822. being overwritten by processing of subsequent terms. Changed
  3823. copyBacktrackToLabel() to check for an existing bcaktrackTo label
  3824. before copying and renamed it to propagateBacktrackToLabel() since
  3825. it no longer copies.
  3826. * yarr/YarrJIT.cpp:
  3827. (JSC::Yarr::YarrGenerator::BacktrackDestination::propagateBacktrackToLabel):
  3828. (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
  3829. 2011-01-21 Geoffrey Garen <ggaren@apple.com>
  3830. Reviewed by Sam Weinig.
  3831. Moved the mark stack from global data to the heap, since it pertains
  3832. to the heap, and not the virtual machine as a whole.
  3833. https://bugs.webkit.org/show_bug.cgi?id=52930
  3834. SunSpider reports no change.
  3835. * runtime/Heap.cpp:
  3836. (JSC::Heap::Heap):
  3837. (JSC::Heap::markRoots):
  3838. * runtime/Heap.h:
  3839. * runtime/JSGlobalData.cpp:
  3840. (JSC::JSGlobalData::JSGlobalData):
  3841. * runtime/JSGlobalData.h:
  3842. 2011-01-21 Peter Gal <galpeter@inf.u-szeged.hu>
  3843. Reviewed by Darin Adler.
  3844. REGRESSION(r76177): All JavaScriptCore tests fail on ARM
  3845. https://bugs.webkit.org/show_bug.cgi?id=52814
  3846. Get the approximateByteSize value before releasing the OwnPtr.
  3847. * parser/JSParser.cpp:
  3848. (JSC::JSParser::parseFunctionInfo):
  3849. 2011-01-21 Xan Lopez <xlopez@igalia.com>
  3850. Reviewed by Martin Robinson.
  3851. Remove unnecessary <stdio.h> include
  3852. https://bugs.webkit.org/show_bug.cgi?id=52884
  3853. * jit/JIT.cpp: remove unnecessary include.
  3854. 2011-01-20 Ryosuke Niwa <rniwa@webkit.org>
  3855. Reviewed by Maciej Stachowiak.
  3856. Added OwnPtrCommon.h because OwnArrayPtr::set calls deleteOwnedPtr.
  3857. * wtf/OwnArrayPtr.h:
  3858. 2011-01-20 Patrick Gansterer <paroga@webkit.org>
  3859. Reviewed by Oliver Hunt.
  3860. [WINCE] Remove obsolete JSVALUE32 code
  3861. https://bugs.webkit.org/show_bug.cgi?id=52450
  3862. Remove the "offset hack" in create_jit_stubs, since we
  3863. only support JSVALUE32_64 in the meantime.
  3864. * create_jit_stubs: Removed offset argument
  3865. * jit/JITStubs.cpp:
  3866. 2011-01-20 Geoffrey Garen <ggaren@apple.com>
  3867. Reviewed by Oliver Hunt.
  3868. When marking conservatively, guard against reviving dead objects.
  3869. https://bugs.webkit.org/show_bug.cgi?id=52840
  3870. SunSpider and v8 say no change.
  3871. * interpreter/RegisterFile.h:
  3872. (JSC::RegisterFile::markCallFrames): Updated to use the ConservativeSet API.
  3873. * runtime/Heap.cpp:
  3874. (JSC::Heap::recordExtraCost): No need to guard against conservative
  3875. marking reviving dead objects anymore, since the conservative marking
  3876. mechanism guards against this now.
  3877. (JSC::Heap::markConservatively):
  3878. (JSC::Heap::markProtectedObjects):
  3879. (JSC::Heap::markTempSortVectors): Don't drain the mark stack inside a
  3880. marking function. We want to establish a separation of concerns between
  3881. visiting roots and draining the mark stack.
  3882. (JSC::Heap::markRoots): Gather the set of conservative references before
  3883. clearning mark bits, because conservative marking now uses the mark bits
  3884. to determine if a reference is valid, and avoid reviving dead objects.
  3885. (JSC::Heap::collectAllGarbage): No need to guard against conservative
  3886. marking reviving dead objects anymore, since the conservative marking
  3887. mechanism guards against this now.
  3888. * runtime/Heap.h: Updated to use the ConservativeSet API.
  3889. * runtime/MachineStackMarker.cpp:
  3890. (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
  3891. (JSC::MachineStackMarker::markCurrentThreadConservatively):
  3892. (JSC::MachineStackMarker::markOtherThreadConservatively):
  3893. (JSC::MachineStackMarker::markMachineStackConservatively):
  3894. * runtime/MachineStackMarker.h: Ditto.
  3895. * runtime/MarkStack.h:
  3896. (JSC::ConservativeSet::add):
  3897. (JSC::ConservativeSet::mark): Added ConservativeSet, for gathering the
  3898. set of conservative references. This is different from MarkStack, since
  3899. we don't mark the set until it is completely gathered.
  3900. * runtime/MarkedSpace.cpp:
  3901. (JSC::MarkedSpace::freeBlock):
  3902. (JSC::MarkedSpace::resizeBlocks):
  3903. (JSC::MarkedSpace::markConservatively):
  3904. * runtime/MarkedSpace.h: When marking conservatively, guard against
  3905. reviving dead objects.
  3906. 2011-01-20 Siddharth Mathur <siddharth.mathur@nokia.com>
  3907. Reviewed by Geoffrey Garen.
  3908. [Symbian] Fix StackBounds::initialize()
  3909. https://bugs.webkit.org/show_bug.cgi?id=52842
  3910. * wtf/StackBounds.cpp:
  3911. (WTF::StackBounds::initialize): Use TThreadStackInfo.iLimit for stack limit
  3912. 2011-01-20 Michael Saboff <msaboff@apple.com>
  3913. Reviewed by Oliver Hunt.
  3914. <rdar://problem/8890203> [RegexFuzz] Crash in generated code (52773)
  3915. https://bugs.webkit.org/show_bug.cgi?id=52773
  3916. Fixed case where an existing DataLabelPtr is overwritten. The
  3917. replacing DataLabelPtr is now resolved immediately in
  3918. linkDataLabelToBacktrackIfExists(). Cleanup - eliminated bool
  3919. return value for the routine as it was never used.
  3920. * yarr/YarrJIT.cpp:
  3921. (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
  3922. 2011-01-20 Andras Becsi <abecsi@webkit.org>
  3923. Reviewed by Csaba Osztrogonác.
  3924. [Qt][WK2] WebKit2 enabled build fails to link
  3925. Work around undefined reference linking issues until the buildsystem gets redesigned.
  3926. These issues first occured in minimal builds (see BUG 50519).
  3927. * JavaScriptCore.pri: link as whole-archive for WebKit2 builds
  3928. 2011-01-20 Zoltan Horvath <zoltan@webkit.org>
  3929. Reviewed by Csaba Osztrogonác.
  3930. Refactoring of the custom allocation framework
  3931. https://bugs.webkit.org/show_bug.cgi?id=49897
  3932. Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
  3933. The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
  3934. equivalent macro implementation at the necessary places.
  3935. * wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro.
  3936. 2011-01-20 Mark Rowe <mrowe@apple.com>
  3937. Reviewed by Maciej Stachowiak.
  3938. Follow-up to r75766 / <rdar://problem/5469576>.
  3939. We were failing to initialize the key, causing all sorts of unexpected behavior.
  3940. * wtf/FastMalloc.cpp:
  3941. (WTF::setThreadHeap):
  3942. (WTF::TCMalloc_ThreadCache::GetThreadHeap):
  3943. (WTF::TCMalloc_ThreadCache::InitTSD): Ensure that the key is initialized.
  3944. 2011-01-18 Geoffrey Garen <ggaren@apple.com>
  3945. Reviewed by Darin Adler.
  3946. Rolled back in r76078, with crash fixed.
  3947. https://bugs.webkit.org/show_bug.cgi?id=52668
  3948. * runtime/JSGlobalObject.cpp:
  3949. (JSC::JSGlobalObject::markChildren): Account for the fact that the global
  3950. object moves its variables into and out of the register file. While out
  3951. of the register file, the symbol table's size is not an accurate count
  3952. for the size of the register array, since the BytecodeGenerator might
  3953. be compiling, adding items to the symbol table.
  3954. 2011-01-18 Darin Adler <darin@apple.com>
  3955. Reviewed by Geoffrey Garen.
  3956. Stack overflow when converting an Error object to string
  3957. https://bugs.webkit.org/show_bug.cgi?id=46410
  3958. * Android.mk: Added StringRecursionChecker.cpp and
  3959. StringRecursionChecker.h.
  3960. * CMakeLists.txt: Ditto.
  3961. * GNUmakefile.am: Ditto.
  3962. * JavaScriptCore.gypi: Ditto.
  3963. * JavaScriptCore.pro: Ditto.
  3964. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
  3965. * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
  3966. * runtime/ArrayPrototype.cpp:
  3967. (JSC::arrayProtoFuncToString): Use StringRecursionChecker instead
  3968. of the older hand-written code to do the same thing.
  3969. (JSC::arrayProtoFuncToLocaleString): Ditto.
  3970. (JSC::arrayProtoFuncJoin): Ditto.
  3971. * runtime/ErrorPrototype.cpp:
  3972. (JSC::errorProtoFuncToString): Use StringRecursionChecker.
  3973. * runtime/JSGlobalData.h: Renamed arrayVisitedElements to
  3974. stringRecursionCheckVisitedObjects.
  3975. * runtime/RegExpPrototype.cpp:
  3976. (JSC::regExpProtoFuncToString): Use StringRecursionChecker.
  3977. * runtime/StringRecursionChecker.cpp: Added.
  3978. * runtime/StringRecursionChecker.h: Added.
  3979. 2011-01-19 Oliver Hunt <oliver@apple.com>
  3980. Reviewed by Gavin Barraclough.
  3981. Remove non-spec support for callable RegExp
  3982. https://bugs.webkit.org/show_bug.cgi?id=28285
  3983. Remove support for callable regexps. If it breaks sites we can
  3984. just roll this out.
  3985. * runtime/RegExpObject.cpp:
  3986. * runtime/RegExpObject.h:
  3987. * tests/mozilla/expected.html: update results.
  3988. 2011-01-19 Antti Koivisto <antti@apple.com>
  3989. Reviewed by Oliver Hunt.
  3990. Cache function offsets to speed up javascript parsing
  3991. https://bugs.webkit.org/show_bug.cgi?id=52622
  3992. Use cache to save function offsets and some other info.
  3993. This avoids quite a bit of work when reparsing the source.
  3994. * parser/ASTBuilder.h:
  3995. * parser/JSParser.cpp:
  3996. (JSC::JSParser::CachedFunctionInfo::CachedFunctionInfo):
  3997. (JSC::JSParser::CachedFunctionInfo::approximateByteSize):
  3998. (JSC::JSParser::CachedFunctionInfo::closeBraceToken):
  3999. (JSC::JSParser::Scope::copyCapturedVariablesToVector):
  4000. (JSC::JSParser::Scope::saveFunctionInfo):
  4001. (JSC::JSParser::Scope::restoreFunctionInfo):
  4002. (JSC::JSParser::findCachedFunctionInfo):
  4003. (JSC::JSParser::JSParser):
  4004. (JSC::JSParser::parseProgram):
  4005. (JSC::JSParser::parseFunctionInfo):
  4006. * parser/Lexer.h:
  4007. (JSC::Lexer::setOffset):
  4008. (JSC::Lexer::setLineNumber):
  4009. (JSC::Lexer::sourceProvider):
  4010. * parser/SourceProvider.h:
  4011. (JSC::SourceProviderCache::SourceProviderCache):
  4012. (JSC::SourceProviderCache::~SourceProviderCache):
  4013. (JSC::SourceProviderCache::byteSize):
  4014. (JSC::SourceProviderCache::add):
  4015. (JSC::SourceProviderCache::get):
  4016. (JSC::SourceProvider::SourceProvider):
  4017. (JSC::SourceProvider::~SourceProvider):
  4018. (JSC::SourceProvider::cache):
  4019. (JSC::SourceProvider::notifyCacheSizeChanged):
  4020. (JSC::SourceProvider::cacheSizeChanged):
  4021. * parser/SyntaxChecker.h:
  4022. 2011-01-19 Mark Rowe <mrowe@apple.com>
  4023. Reviewed by Darin Adler.
  4024. Follow-up to r75766 / <rdar://problem/5469576>.
  4025. * DerivedSources.make: Evaluate the SDKROOT variable correctly.
  4026. 2011-01-19 Oliver Hunt <oliver@apple.com>
  4027. Reviewed by Gavin Barraclough.
  4028. [jsfunfuzz] Defining a function called __proto__ inside an eval triggers an assertion
  4029. https://bugs.webkit.org/show_bug.cgi?id=52672
  4030. Rather than coming up with a somewhat convoluted mechanism to ensure that
  4031. developers can override the global objects prototype with a function named
  4032. __proto__ and expect it to work, we just disallow it at the syntax level.
  4033. * parser/JSParser.cpp:
  4034. (JSC::JSParser::parseFunctionInfo):
  4035. 2011-01-19 Michael Saboff <msaboff@apple.com>
  4036. Reviewed by Darin Adler.
  4037. <rdar://problem/8882994> Regression: Simple nested backtrack hangs
  4038. https://bugs.webkit.org/show_bug.cgi?id=52675
  4039. The changeset (r76076) for https://bugs.webkit.org/show_bug.cgi?id=52540
  4040. broke simple backtracking in some cases. Reworked that change to
  4041. link both jumps and labels.
  4042. * yarr/YarrJIT.cpp:
  4043. (JSC::Yarr::YarrGenerator::BacktrackDestination::hasBacktrackToLabel):
  4044. (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
  4045. (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
  4046. 2011-01-19 Pavel Podivilov <podivilov@chromium.org>
  4047. Reviewed by Yury Semikhatsky.
  4048. Web Inspector: [JSC] scripts have incorrect starting line (always 1).
  4049. https://bugs.webkit.org/show_bug.cgi?id=52721
  4050. * debugger/Debugger.cpp:
  4051. (JSC::Debugger::recompileAllJSFunctions):
  4052. * debugger/Debugger.h:
  4053. * parser/Parser.h:
  4054. (JSC::Parser::parse):
  4055. * parser/SourceCode.h:
  4056. (JSC::SourceCode::SourceCode):
  4057. * parser/SourceProvider.h:
  4058. (JSC::SourceProvider::startPosition):
  4059. 2011-01-19 Csaba Osztrogonác <ossy@webkit.org>
  4060. Reviewed by Laszlo Gombos and Tor Arne Vestbø.
  4061. [Qt] Remove unnecessary "../Source" from paths
  4062. after moving source files into Source is finished.
  4063. * JavaScriptCore.pri:
  4064. 2011-01-19 Benjamin Kalman <kalman@chromium.org>
  4065. Reviewed by Darin Adler.
  4066. Don't return void from void function String::split
  4067. https://bugs.webkit.org/show_bug.cgi?id=52684
  4068. * wtf/text/WTFString.cpp:
  4069. (WTF::String::split):
  4070. 2011-01-18 Kenneth Russell <kbr@google.com>
  4071. Unreviewed, rolling out r76078.
  4072. http://trac.webkit.org/changeset/76078
  4073. https://bugs.webkit.org/show_bug.cgi?id=52668
  4074. Caused crashes of fast/canvas/webgl/constants.html,
  4075. fast/canvas/webgl/gl-enum-tests.html, and possibly other layout
  4076. test crashes in Release mode. WebGL crashes were observed with
  4077. "run-webkit-tests fast/canvas/webgl". It was necessary to run
  4078. multiple tests to provoke the crash.
  4079. * interpreter/RegisterFile.h:
  4080. (JSC::RegisterFile::markGlobals):
  4081. * runtime/JSActivation.cpp:
  4082. (JSC::JSActivation::markChildren):
  4083. * runtime/JSGlobalObject.cpp:
  4084. (JSC::JSGlobalObject::markChildren):
  4085. 2011-01-18 Oliver Hunt <oliver@apple.com>
  4086. Reviewed by Gavin Barraclough.
  4087. [jsfunfuzz] Assertion asking activation for arguments when arguments is overridden
  4088. https://bugs.webkit.org/show_bug.cgi?id=52690
  4089. Clean up code to retrieve arguments from activation and function objects.
  4090. Remove the incorrect assertion from JSActivation's argumentsGetter.
  4091. * interpreter/Interpreter.cpp:
  4092. (JSC::Interpreter::retrieveArguments):
  4093. * runtime/JSActivation.cpp:
  4094. (JSC::JSActivation::argumentsGetter):
  4095. 2011-01-18 Geoffrey Garen <ggaren@apple.com>
  4096. Reviewed by Darin Adler.
  4097. Removed RegisterFile::markGlobals because it was obtuse, and it
  4098. unnecessarily relied on conservative marking.
  4099. https://bugs.webkit.org/show_bug.cgi?id=52668
  4100. * interpreter/RegisterFile.h: Removed markGlobals.
  4101. * runtime/JSActivation.cpp:
  4102. (JSC::JSActivation::markChildren): Added a comment explaning why some
  4103. JSActivations don't always mark their registers arrays.
  4104. * runtime/JSGlobalObject.cpp:
  4105. (JSC::JSGlobalObject::markChildren): Instead of calling markGlobals, mark
  4106. the registers array directly.
  4107. 2011-01-18 Michael Saboff <msaboff@apple.com>
  4108. Reviewed by Oliver Hunt.
  4109. <rdar://problem/8875432> Regression: Some text-only e-mails cause hang beneath RegExp::match (52540)
  4110. https://bugs.webkit.org/show_bug.cgi?id=52540
  4111. https://bugs.webkit.org/show_bug.cgi?id=52662
  4112. Directly use backtrack label with parentheses nested under a
  4113. non-capturing parentheses. Also linked current parentheses
  4114. tail code object for possible parens nested within a non-capturing
  4115. parentheses.
  4116. * yarr/YarrJIT.cpp:
  4117. (JSC::Yarr::YarrGenerator::BacktrackDestination::linkBacktrackToLabel):
  4118. (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
  4119. 2011-01-18 Daniel Bates <dbates@rim.com>
  4120. Reviewed by Gavin Barraclough.
  4121. Only use moving memory model assumption in ExecutableAllocator::intializePageSize() for Symbian OS
  4122. https://bugs.webkit.org/show_bug.cgi?id=52517
  4123. Patch by David Tapuska
  4124. Currently, we compile code with respect to the Symbian-specific moving memory model
  4125. assumption for all ARMv5 or lower architectures. Instead, we should only compile
  4126. such code when building for Symbian OS on those architectures because this model
  4127. is Symbian-specific.
  4128. * jit/ExecutableAllocator.cpp:
  4129. (JSC::ExecutableAllocator::intializePageSize):
  4130. 2011-01-18 Dimitry Andric <dim@freebsd.org>
  4131. Reviewed by Andreas Kling.
  4132. Fix linking JavaScriptCore on FreeBSD/amd64
  4133. https://bugs.webkit.org/show_bug.cgi?id=52591
  4134. Linking of JavaScriptCore on FreeBSD/amd64 fails, for the same reason as
  4135. in bug 28422: cti_vm_throw needs a "@plt" suffix, otherwise the linker
  4136. complains about the relocation type.
  4137. * jit/JITStubs.cpp: use @plt suffix on x86_64 platforms, for both Linux
  4138. and FreeBSD.
  4139. 2011-01-18 Oliver Hunt <oliver@apple.com>
  4140. Reviewed by Antti Koivisto.
  4141. [jsfunfuzz] Assertion in codegen for array of NaN constants
  4142. https://bugs.webkit.org/show_bug.cgi?id=52643
  4143. Don't cache NaN literals in the code generator, as NaN doesn't compare
  4144. as equal to itself it causes problems when rehashing the number cache.
  4145. * bytecompiler/BytecodeGenerator.cpp:
  4146. (JSC::BytecodeGenerator::emitLoad):
  4147. 2011-01-17 Jarred Nicholls <jarred@sencha.com>
  4148. Reviewed by Csaba Osztrogonác.
  4149. REGRESSION(r75709): Return value of fscanf() shouldn't be ignored.
  4150. https://bugs.webkit.org/show_bug.cgi?id=52585
  4151. gcc 4.4.4+ has warn_unused_value attribute on fscanf, so we should check
  4152. the return value to get around the gcc warning
  4153. * jit/ExecutableAllocatorFixedVMPool.cpp:
  4154. (JSC::maybeModifyVMPoolSize):
  4155. 2011-01-17 Michael Saboff <msaboff@apple.com>
  4156. Reviewed by Oliver Hunt.
  4157. [regexfuzz] Crash running regex with lookahead
  4158. https://bugs.webkit.org/show_bug.cgi?id=52548
  4159. Eliminated agressive chaining of backtracks. This code was overwriting
  4160. already valid backtrack information.
  4161. * yarr/YarrJIT.cpp:
  4162. (JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
  4163. 2011-01-17 Tony Gentilcore <tonyg@chromium.org>
  4164. Reviewed by Alexey Proskuryakov.
  4165. Fix some headers with missing or misspelled #ifndef guards
  4166. https://bugs.webkit.org/show_bug.cgi?id=52545
  4167. * wtf/RefPtrHashMap.h:
  4168. 2011-01-17 Dan Bernstein <mitz@apple.com>
  4169. Rubber-stamped by Mark Rowe.
  4170. Update xcodeproj svn:ignore to include xcuserdata.
  4171. * JavaScriptCore.xcodeproj: Modified property svn:ignore.
  4172. 2011-01-16 Adam Barth <abarth@webkit.org>
  4173. Rubber-stamped by Eric Seidel.
  4174. Move WebKit into Source
  4175. https://bugs.webkit.org/show_bug.cgi?id=52530
  4176. * JavaScriptCore.gyp/JavaScriptCore.gyp:
  4177. 2011-01-16 Oliver Hunt <oliver@apple.com>
  4178. Reviewed by Sam Weinig.
  4179. [jsfunfuzz] Parser doesn't correctly validate for-loop syntax
  4180. https://bugs.webkit.org/show_bug.cgi?id=52516
  4181. Ensure that we always check for a semicolon after encountering
  4182. multiple declarations in the initialiser portion of a for-loop.
  4183. * parser/JSParser.cpp:
  4184. (JSC::JSParser::parseForStatement):
  4185. 2011-01-16 Oliver Hunt <oliver@apple.com>
  4186. Reviewed by Geoffrey Garen.
  4187. Strict mode restrictions on arguments and eval usage aren't complete
  4188. https://bugs.webkit.org/show_bug.cgi?id=52528
  4189. Fix a few bugs in strict mode where we incorrect allow mutation of
  4190. arguments and eval in the parser.
  4191. Alas the "optimisation" used by the syntax checker for validating
  4192. binary and unary expressions was too aggressive: we do actually need
  4193. a stack for operations and operands although it needn't be as complete
  4194. as that used for the full AST builder.
  4195. Also disallow assignment to arguments in all cases as allowing arguments
  4196. to be assignable is always an error in strict mode, regardless of context.
  4197. * parser/ASTBuilder.h:
  4198. (JSC::ASTBuilder::BinaryExprContext::BinaryExprContext):
  4199. (JSC::ASTBuilder::UnaryExprContext::UnaryExprContext):
  4200. * parser/JSParser.cpp:
  4201. (JSC::JSParser::parseAssignmentExpression):
  4202. (JSC::JSParser::parseBinaryExpression):
  4203. (JSC::JSParser::parseUnaryExpression):
  4204. * parser/SyntaxChecker.h:
  4205. (JSC::SyntaxChecker::BinaryExprContext::BinaryExprContext):
  4206. (JSC::SyntaxChecker::BinaryExprContext::~BinaryExprContext):
  4207. (JSC::SyntaxChecker::UnaryExprContext::UnaryExprContext):
  4208. (JSC::SyntaxChecker::UnaryExprContext::~UnaryExprContext):
  4209. (JSC::SyntaxChecker::appendBinaryExpressionInfo):
  4210. (JSC::SyntaxChecker::operatorStackPop):
  4211. 2011-01-15 Geoffrey Garen <ggaren@apple.com>
  4212. Reviewed by Oliver Hunt.
  4213. Rolled back in r75886.
  4214. https://bugs.webkit.org/show_bug.cgi?id=52527
  4215. r75886 broke the GTK Linux bot because Linux was -- quite surprisingly --
  4216. set up to use the constants for embedded devices.
  4217. * jit/ExecutableAllocatorFixedVMPool.cpp:
  4218. (JSC::maybeModifyVMPoolSize): Separated Linux constants from embedded
  4219. constants.
  4220. 2011-01-15 Sheriff Bot <webkit.review.bot@gmail.com>
  4221. Unreviewed, rolling out r75886.
  4222. http://trac.webkit.org/changeset/75886
  4223. https://bugs.webkit.org/show_bug.cgi?id=52526
  4224. "Broke GTK+ 64bit" (Requested by xan_ on #webkit).
  4225. * jit/ExecutableAllocatorFixedVMPool.cpp:
  4226. 2011-01-15 Geoffrey Garen <ggaren@apple.com>
  4227. Reviewed by Sam Weinig.
  4228. <rdar://problem/8870429> Shrink the executable pool on embedded devices
  4229. * jit/ExecutableAllocatorFixedVMPool.cpp: Dropped the pool size from 32MB
  4230. to 16MB.
  4231. 2011-01-15 Oliver Hunt <oliver@apple.com>
  4232. Reviewed by Maciej Stachowiak.
  4233. Incorrect behavior changing attributes of an accessor
  4234. https://bugs.webkit.org/show_bug.cgi?id=52515
  4235. defineProperty doesn't correctly handle changing attributes of an accessor
  4236. property. This is because we don't pass the full descriptor to the
  4237. putDescriptor helper function, which means we have insufficient information
  4238. to do the right thing. Once that's passed the correct behavior is relatively
  4239. simple to implement.
  4240. * runtime/JSObject.cpp:
  4241. (JSC::putDescriptor):
  4242. (JSC::JSObject::defineOwnProperty):
  4243. 2011-01-14 Oliver Hunt <oliver@apple.com>
  4244. Reviewed by Maciej Stachowiak.
  4245. [jsfunfuzz] Incorrect handling of consecutive duplicate labels
  4246. https://bugs.webkit.org/show_bug.cgi?id=52505
  4247. Compare StringImpl*'s instead of Identifier*'s when looking for duplicate
  4248. labels.
  4249. * parser/JSParser.cpp:
  4250. (JSC::JSParser::parseExpressionOrLabelStatement):
  4251. 2011-01-14 Simon Fraser <simon.fraser@apple.com>
  4252. No review.
  4253. Initialize m_operationInProgress after r75855.
  4254. * runtime/Heap.cpp:
  4255. (JSC::Heap::Heap):
  4256. 2011-01-14 Geoffrey Garen <ggaren@apple.com>
  4257. Reverted accidentally committed code from my last checkin.
  4258. * runtime/Heap.cpp:
  4259. (JSC::Heap::markRoots):
  4260. 2011-01-14 Geoffrey Garen <ggaren@apple.com>
  4261. Reviewed by Sam Weinig.
  4262. Try to fix the GTK bot.
  4263. * runtime/Heap.cpp:
  4264. (JSC::Heap::Heap):
  4265. (JSC::Heap::markRoots): Kids, remember to initialize your data members.
  4266. Knowing is half the battle.
  4267. 2011-01-14 Oliver Hunt <oliver@apple.com>
  4268. Reviewed by Stephanie Lewis.
  4269. [jsfunfuzz] We should be clearing the lexers temporary character buffers when switching to strict mode
  4270. https://bugs.webkit.org/show_bug.cgi?id=52501
  4271. Clear the temporary character buffers used for reading escaped characters and
  4272. numbers.
  4273. * parser/Lexer.h:
  4274. (JSC::Lexer::setOffset):
  4275. 2011-01-14 Geoffrey Garen <ggaren@apple.com>
  4276. Try to fix non-Dtrace builds: #include Tracing.h instead of TracingDtrace.h.
  4277. * runtime/Heap.cpp:
  4278. 2011-01-13 Geoffrey Garen <ggaren@apple.com>
  4279. Reviewed by Oliver Hunt.
  4280. Split out a MarkedSpace strategy object from Heap.
  4281. https://bugs.webkit.org/show_bug.cgi?id=52421
  4282. SunSpider reports no change.
  4283. * Android.mk:
  4284. * CMakeLists.txt:
  4285. * GNUmakefile.am:
  4286. * JavaScriptCore.gypi:
  4287. * JavaScriptCore.pro:
  4288. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  4289. * JavaScriptCore.xcodeproj/project.pbxproj: Updated our 7 build systems. Which is cool.
  4290. * runtime/Heap.cpp:
  4291. (JSC::Heap::Heap):
  4292. (JSC::Heap::destroy):
  4293. (JSC::Heap::recordExtraCost):
  4294. (JSC::Heap::allocate):
  4295. (JSC::Heap::markConservatively):
  4296. (JSC::Heap::markRoots):
  4297. (JSC::Heap::objectCount):
  4298. (JSC::Heap::statistics):
  4299. (JSC::Heap::size):
  4300. (JSC::Heap::isBusy):
  4301. (JSC::Heap::collectAllGarbage):
  4302. (JSC::Heap::primaryHeapBegin):
  4303. (JSC::Heap::primaryHeapEnd):
  4304. * runtime/Heap.h:
  4305. (JSC::Heap::globalData):
  4306. (JSC::Heap::markedSpace):
  4307. (JSC::Heap::isCellMarked):
  4308. (JSC::Heap::checkMarkCell):
  4309. (JSC::Heap::markCell): Moved all code pertaining to managing chunks of
  4310. collector memory out of this class. Heap now just delegates to MarkedSpace.
  4311. * runtime/JSCell.h:
  4312. (JSC::JSCell::Heap::heap): Updated for MarkedSpace delegation.
  4313. * runtime/JSValue.h: Moved the ValueStringPair typedef to help with #includes.
  4314. * runtime/MarkedSpace.cpp: Copied from runtime/Heap.cpp.
  4315. (JSC::MarkedSpace::MarkedSpace):
  4316. (JSC::MarkedSpace::destroy):
  4317. (JSC::MarkedSpace::allocateBlock):
  4318. (JSC::MarkedSpace::freeBlock):
  4319. (JSC::MarkedSpace::allocate):
  4320. (JSC::MarkedSpace::resizeBlocks):
  4321. (JSC::MarkedSpace::growBlocks):
  4322. (JSC::MarkedSpace::shrinkBlocks):
  4323. (JSC::MarkedSpace::markConservatively):
  4324. (JSC::MarkedSpace::clearMarkBits):
  4325. (JSC::MarkedSpace::markedCells):
  4326. (JSC::MarkedSpace::sweep):
  4327. (JSC::MarkedSpace::objectCount):
  4328. (JSC::MarkedSpace::addToStatistics):
  4329. (JSC::MarkedSpace::statistics):
  4330. (JSC::MarkedSpace::size):
  4331. (JSC::MarkedSpace::reset):
  4332. (JSC::MarkedSpace::primaryHeapBegin):
  4333. (JSC::MarkedSpace::primaryHeapEnd):
  4334. * runtime/MarkedSpace.h: Copied from runtime/Heap.h.
  4335. (JSC::MarkedSpace::globalData):
  4336. (JSC::MarkedSpace::didShrink):
  4337. (JSC::MarkedSpace::cellBlock):
  4338. (JSC::MarkedSpace::cellOffset):
  4339. (JSC::MarkedSpace::isCellMarked):
  4340. (JSC::MarkedSpace::checkMarkCell):
  4341. (JSC::MarkedSpace::markCell): Moved all code pertaining to managing chunks of
  4342. collector memory into this class.
  4343. * runtime/MemoryStatistics.cpp:
  4344. (JSC::heapStatistics):
  4345. * runtime/MemoryStatistics.h: Updated for MarkedSpace delegation.
  4346. 2011-01-14 Oliver Hunt <oliver@apple.com>
  4347. Reviewed by Gavin Barraclough.
  4348. [jsfunfuzz] parser doesn't enforce continue restrictions correctly.
  4349. https://bugs.webkit.org/show_bug.cgi?id=52493
  4350. This patch reworks handling of break, continue and label statements
  4351. to correctly handle all the valid and invalid cases. Previously certain
  4352. errors would be missed by the parser in strict mode, but the bytecode
  4353. generator needed to handle those cases for non-strict code so nothing
  4354. failed, it simply became non-standard behaviour.
  4355. Now that we treat break and continue errors as early faults in non-strict
  4356. mode as well that safety net has been removed so the parser bugs result in
  4357. crashes at codegen time.
  4358. * parser/JSParser.cpp:
  4359. (JSC::JSParser::ScopeLabelInfo::ScopeLabelInfo):
  4360. (JSC::JSParser::next):
  4361. (JSC::JSParser::nextTokenIsColon):
  4362. (JSC::JSParser::continueIsValid):
  4363. Continue is only valid in loops so we can't use breakIsValid()
  4364. (JSC::JSParser::pushLabel):
  4365. We now track whether the label is for a loop (and is therefore a
  4366. valid target for continue.
  4367. (JSC::JSParser::popLabel):
  4368. (JSC::JSParser::getLabel):
  4369. Replace hasLabel with getLabel so that we can validate the target
  4370. when parsing continue statements.
  4371. (JSC::JSParser::Scope::continueIsValid):
  4372. (JSC::JSParser::Scope::pushLabel):
  4373. (JSC::JSParser::Scope::getLabel):
  4374. (JSC::JSParser::JSParser):
  4375. (JSC::JSParser::parseBreakStatement):
  4376. (JSC::JSParser::parseContinueStatement):
  4377. (JSC::LabelInfo::LabelInfo):
  4378. (JSC::JSParser::parseExpressionOrLabelStatement):
  4379. Consecutive labels now get handled iteratively so that we can determine
  4380. whether they're valid targets for continue.
  4381. * parser/Lexer.cpp:
  4382. (JSC::Lexer::nextTokenIsColon):
  4383. * parser/Lexer.h:
  4384. (JSC::Lexer::setOffset):
  4385. 2011-01-14 Patrick Gansterer <paroga@webkit.org>
  4386. Reviewed by Adam Roben.
  4387. Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
  4388. https://bugs.webkit.org/show_bug.cgi?id=45186
  4389. * wtf/FastMalloc.cpp:
  4390. (WTF::TCMalloc_PageHeap::scheduleScavenger): Added missing this pointer to CreateTimerQueueTimer().
  4391. 2011-01-14 Patrick Gansterer <paroga@webkit.org>
  4392. Reviewed by Adam Roben.
  4393. Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
  4394. https://bugs.webkit.org/show_bug.cgi?id=45186
  4395. r75819 accidentally changed the initial state of the scavenge timer.
  4396. * wtf/FastMalloc.cpp:
  4397. (WTF::TCMalloc_PageHeap::initializeScavenger): Changed initial state of m_scavengingSuspended to true.
  4398. 2011-01-14 Patrick Gansterer <paroga@webkit.org>
  4399. Unreviewed Windows Release build fix.
  4400. * wtf/FastMalloc.cpp:
  4401. (WTF::TCMalloc_PageHeap::scavengerTimerFired):
  4402. 2011-01-14 Patrick Gansterer <paroga@webkit.org>
  4403. Unreviewed Windows Release build fix.
  4404. * wtf/FastMalloc.cpp:
  4405. (WTF::TCMalloc_PageHeap::scavengerTimerFired):
  4406. 2011-01-14 Patrick Gansterer <paroga@webkit.org>
  4407. Reviewed by Adam Roben.
  4408. Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
  4409. https://bugs.webkit.org/show_bug.cgi?id=45186
  4410. Use CreateTimerQueueTimer() to start periodicScavenge() and stop it with DeleteTimerQueueTimer().
  4411. * wtf/FastMalloc.cpp:
  4412. (WTF::TCMalloc_PageHeap::initializeScavenger):
  4413. (WTF::TCMalloc_PageHeap::isScavengerSuspended):
  4414. (WTF::TCMalloc_PageHeap::scheduleScavenger):
  4415. (WTF::TCMalloc_PageHeap::rescheduleScavenger):
  4416. (WTF::TCMalloc_PageHeap::suspendScavenger):
  4417. (WTF::scavengerTimerFired):
  4418. (WTF::TCMalloc_PageHeap::periodicScavenge):
  4419. (WTF::TCMalloc_PageHeap::signalScavenger):
  4420. 2011-01-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
  4421. Reviewed by Kenneth Rohde Christiansen.
  4422. Align import/export directives
  4423. https://bugs.webkit.org/show_bug.cgi?id=52208
  4424. * API/JSBase.h: Align import/export directives with
  4425. WebKit2/Shared/API/c/WKBase.h
  4426. 2011-01-14 Michael Saboff <msaboff@apple.com>
  4427. Reviewed by Oliver Hunt.
  4428. Incorrect backtracking for nested alternatives
  4429. https://bugs.webkit.org/show_bug.cgi?id=52387
  4430. In the process of propigating a datalabel it wasn't getting connected
  4431. to a destination when the destination was an indirect jump. Added
  4432. code to recognize a direct backtrack destination that was an indirect
  4433. jump and added mechanism to associate DataLabelPtrs with indirect
  4434. jump entries.
  4435. Removed dead method
  4436. BacktrackDestination::linkDataLabelToHereIfExists()
  4437. * yarr/YarrJIT.cpp:
  4438. (JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry):
  4439. (JSC::Yarr::YarrGenerator::IndirectJumpEntry::addDataLabel):
  4440. (JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry):
  4441. (JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable):
  4442. Changes to link indirect jumps with DataLabelPtr's.
  4443. (JSC::Yarr::YarrGenerator::BacktrackDestination::clearSubDataLabelPtr):
  4444. (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
  4445. Updated to handle immediate linking of indirect jumps to
  4446. DataLabelPtr.
  4447. (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction): Changed to
  4448. reflect updated linkDataLabelToBacktrackIfExists().
  4449. 2011-01-14 Pavel Podivilov <podivilov@chromium.org>
  4450. Reviewed by Yury Semikhatsky.
  4451. Web Inspector: provide script column offset to frontend.
  4452. https://bugs.webkit.org/show_bug.cgi?id=52377
  4453. * parser/SourceCode.h:
  4454. (JSC::SourceCode::SourceCode):
  4455. (JSC::SourceCode::firstColumn):
  4456. 2011-01-13 Darin Adler <darin@apple.com>
  4457. Reviewed by Geoff Garen.
  4458. <rdar://problem/5469576> Use __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 if available.
  4459. * DerivedSources.make: Create a header file, HeaderDetection.h, that tells
  4460. us whether pthread_machdep.h is available.
  4461. * wtf/FastMalloc.cpp: If __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 is available, then
  4462. don't do the pthread_getspecific_function_pointer trick.
  4463. (WTF::setThreadHeap): Ditto, but set thread-specific data.
  4464. (WTF::TCMalloc_ThreadCache::GetThreadHeap): Ditto, but get rather than set.
  4465. 2011-01-13 Xan Lopez <xlopez@igalia.com>
  4466. Reviewed by Gavin Barraclough.
  4467. JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
  4468. https://bugs.webkit.org/show_bug.cgi?id=42756
  4469. The FixedVMPool Allocator does not work well on systems where
  4470. allocating very large amounts of memory upfront is not reasonable,
  4471. like Linux without overcommit enabled. As a workaround, on Linux,
  4472. default to the values used in embedded environments (in the MB
  4473. range), and only jump to the GB range if we detect at runtime that
  4474. overcommit is enabled. Should fix crashes on Linux/x86_64 with
  4475. less than 3 or 4GB of RAM.
  4476. * jit/ExecutableAllocatorFixedVMPool.cpp:
  4477. (JSC::FixedVMPoolAllocator::free): use new variables for VM pool
  4478. size and coalesce limit.
  4479. (JSC::ExecutableAllocator::isValid): swap the variables from
  4480. embedded to generic values at runtime, on linux, if overcommit is
  4481. enabled.
  4482. (JSC::ExecutableAllocator::underMemoryPressure): use new variables
  4483. for VM pool size and coalesce limit.
  4484. 2011-01-12 Xan Lopez <xlopez@igalia.com>
  4485. Reviewed by Martin Robinson.
  4486. Add new Yarr.h header to the list file.
  4487. * GNUmakefile.am: ditto.
  4488. 2011-01-12 Martin Robinson <mrobinson@igalia.com>
  4489. Missing Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h in WebKitGtk tarball
  4490. https://bugs.webkit.org/show_bug.cgi?id=52299
  4491. * GNUmakefile.am: Fix the GTK+ build on ARMv7 by including missing source
  4492. files in the source list.
  4493. 2011-01-12 Peter Varga <pvarga@webkit.org>
  4494. Reviewed by Gavin Barraclough.
  4495. Add Yarr.h to YARR
  4496. https://bugs.webkit.org/show_bug.cgi?id=51021
  4497. Move other common constants and functions from YARR's different files
  4498. to Yarr.h.
  4499. Use Yarr.h header instead of including other YARR headers where it
  4500. is possible.
  4501. * JavaScriptCore.gypi:
  4502. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  4503. * JavaScriptCore.xcodeproj/project.pbxproj:
  4504. * runtime/RegExp.cpp:
  4505. * yarr/Yarr.h: Added.
  4506. * yarr/YarrInterpreter.cpp:
  4507. * yarr/YarrInterpreter.h:
  4508. * yarr/YarrJIT.cpp:
  4509. (JSC::Yarr::jitCompile):
  4510. (JSC::Yarr::execute):
  4511. * yarr/YarrJIT.h:
  4512. * yarr/YarrParser.h:
  4513. * yarr/YarrPattern.cpp:
  4514. (JSC::Yarr::YarrPattern::compile):
  4515. (JSC::Yarr::YarrPattern::YarrPattern):
  4516. * yarr/YarrPattern.h:
  4517. 2011-01-12 Sheriff Bot <webkit.review.bot@gmail.com>
  4518. Unreviewed, rolling out r75595.
  4519. http://trac.webkit.org/changeset/75595
  4520. https://bugs.webkit.org/show_bug.cgi?id=52286
  4521. It broke fast/regex/pcre-test-1.html (Requested by Ossy on
  4522. #webkit).
  4523. * JavaScriptCore.gypi:
  4524. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  4525. * JavaScriptCore.xcodeproj/project.pbxproj:
  4526. * runtime/RegExp.cpp:
  4527. * yarr/Yarr.h: Removed.
  4528. * yarr/YarrInterpreter.cpp:
  4529. * yarr/YarrInterpreter.h:
  4530. * yarr/YarrJIT.cpp:
  4531. (JSC::Yarr::jitCompile):
  4532. * yarr/YarrJIT.h:
  4533. (JSC::Yarr::execute):
  4534. * yarr/YarrParser.h:
  4535. * yarr/YarrPattern.cpp:
  4536. (JSC::Yarr::compile):
  4537. (JSC::Yarr::YarrPattern::YarrPattern):
  4538. * yarr/YarrPattern.h:
  4539. 2011-01-12 Peter Varga <pvarga@webkit.org>
  4540. Reviewed by Gavin Barraclough.
  4541. Add Yarr.h to YARR
  4542. https://bugs.webkit.org/show_bug.cgi?id=51021
  4543. Move other common constants and functions from YARR's different files
  4544. to Yarr.h.
  4545. Use Yarr.h header instead of including other YARR headers where it
  4546. is possible.
  4547. * JavaScriptCore.gypi:
  4548. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  4549. * JavaScriptCore.xcodeproj/project.pbxproj:
  4550. * runtime/RegExp.cpp:
  4551. * yarr/Yarr.h: Added.
  4552. * yarr/YarrInterpreter.cpp:
  4553. * yarr/YarrInterpreter.h:
  4554. * yarr/YarrJIT.cpp:
  4555. (JSC::Yarr::jitCompile):
  4556. (JSC::Yarr::execute):
  4557. * yarr/YarrJIT.h:
  4558. * yarr/YarrParser.h:
  4559. * yarr/YarrPattern.cpp:
  4560. (JSC::Yarr::YarrPattern::compile):
  4561. (JSC::Yarr::YarrPattern::YarrPattern):
  4562. * yarr/YarrPattern.h:
  4563. 2011-01-11 Michael Saboff <msaboff@apple.com>
  4564. Reviewed by Geoffrey Garen.
  4565. Missing call to popTempSortVector() for exception case in JSArray::sort.
  4566. https://bugs.webkit.org/show_bug.cgi?id=50718
  4567. Fix to patch of 50718 that added pushTempSortVector() and
  4568. popTempSortVector() to JSArray::sort() to mark elements during sort.
  4569. Need to add popTempSortVector() for the return case if toString()
  4570. had an exception.
  4571. * runtime/JSArray.cpp:
  4572. (JSC::JSArray::sort): Added popTempSortVector()
  4573. 2011-01-11 Xan Lopez <xlopez@igalia.com>
  4574. Reviewed by Darin Adler.
  4575. Microoptimization in ~JSString
  4576. https://bugs.webkit.org/show_bug.cgi?id=52222
  4577. The case where m_fibers is 0 seems to be the most common one
  4578. (almost 1/2 of the time, followed at some distance by m_fibers = 1
  4579. in 1/4 of the cases in a typical SunSpider execution). We can save
  4580. one comparison in this common case by doing a bit of refactoring
  4581. in the JSString destructor; overall a 0.3% progression, but only
  4582. the string tests show improvement.
  4583. * runtime/JSString.h:
  4584. (JSC::RopeBuilder::~JSString):
  4585. 2011-01-10 Michael Saboff <msaboff@apple.com>
  4586. Reviewed by Geoffrey Garen.
  4587. ASSERTION Failure in JSC::binaryChop
  4588. https://bugs.webkit.org/show_bug.cgi?id=25614
  4589. Changed JITStubs::cti_register_file_check() to use the current stack's
  4590. return PC to find the bytecode for handling the exception in the prior
  4591. frame. Also added the appropriate arrity check routine call to the
  4592. JIT to bytecode vector (m_callReturnIndexVector) in the CodeBlock.
  4593. * jit/JIT.cpp:
  4594. (JSC::JIT::privateCompile): Changed the arrity check call location
  4595. so that it gets added to the m_calls list so that it's included in
  4596. CodeBlock::m_callReturnIndexVector.
  4597. * jit/JITStubs.cpp:
  4598. (JSC::DEFINE_STUB_FUNCTION): Use the current call frame's return PC.
  4599. 2011-01-10 Daniel Bates <dbates@rim.com>
  4600. Reviewed by Martin Robinson.
  4601. Remove extraneous COMPILER(GCC) condition when checking GCC_VERSION_AT_LEAST()
  4602. https://bugs.webkit.org/show_bug.cgi?id=52178
  4603. It is sufficient to test GCC_VERSION_AT_LEAST() instead of both COMPILER(GCC) and
  4604. GCC_VERSION_AT_LEAST(). Notice GCC_VERSION_AT_LEAST() is defined to be 0 when we
  4605. are not compiling with GCC.
  4606. Fixes style issues at the callsites (i.e. replace comma with comma-space in
  4607. macro function argument list). Also, makes a spelling correction in a comment.
  4608. * jit/ExecutableAllocator.h:
  4609. (JSC::ExecutableAllocator::cacheFlush):
  4610. * wtf/Platform.h:
  4611. 2011-01-10 Geoffrey Garen <ggaren@apple.com>
  4612. Build fix: removed some uses of nextNumber that I missed last time.
  4613. * runtime/Heap.cpp:
  4614. (JSC::Heap::reset):
  4615. (JSC::Heap::collectAllGarbage):
  4616. 2011-01-10 Daniel Bates <dbates@rim.com>
  4617. Reviewed by Darin Adler.
  4618. Use __builtin_expect when compiling using RVCT in GNU mode
  4619. https://bugs.webkit.org/show_bug.cgi?id=51866
  4620. We should only use __builtin_expect if we are compiling with GCC or RVCT 3 or higher in GNU mode
  4621. as pointed out by Siddharth Mathur per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0202h/Cjabddedbde.html>.
  4622. * wtf/AlwaysInline.h:
  4623. * wtf/Platform.h: Removed define WTF_COMPILER_RVCT4_OR_GREATER. Instead added macro
  4624. function RVCT_VERSION_AT_LEAST so that we can test for an arbitrary minimum RVCT
  4625. version.
  4626. 2011-01-10 Geoffrey Garen <ggaren@apple.com>
  4627. Reviewed by Oliver Hunt.
  4628. Moved Collector.* => Heap.*, since the file contains a class named "Heap".
  4629. * API/JSCallbackObject.cpp:
  4630. * Android.mk:
  4631. * CMakeLists.txt:
  4632. * GNUmakefile.am:
  4633. * JavaScriptCore.gypi:
  4634. * JavaScriptCore.pro:
  4635. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  4636. * JavaScriptCore.xcodeproj/project.pbxproj:
  4637. * interpreter/Interpreter.cpp:
  4638. * interpreter/RegisterFile.h:
  4639. * jit/JITStubs.cpp:
  4640. * runtime/Collector.cpp: Removed.
  4641. * runtime/Collector.h: Removed.
  4642. * runtime/CollectorHeapIterator.h:
  4643. * runtime/GCActivityCallbackCF.cpp:
  4644. * runtime/Heap.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
  4645. * runtime/Heap.h: Copied from JavaScriptCore/runtime/Collector.h.
  4646. * runtime/InitializeThreading.cpp:
  4647. * runtime/JSCell.h:
  4648. * runtime/JSGlobalData.cpp:
  4649. * runtime/JSGlobalData.h:
  4650. * runtime/JSLock.cpp:
  4651. * runtime/JSNumberCell.h:
  4652. * runtime/MachineStackMarker.cpp:
  4653. * runtime/MemoryStatistics.h:
  4654. * runtime/Protect.h:
  4655. * runtime/UString.cpp:
  4656. * runtime/WeakGCMap.h:
  4657. * runtime/WeakGCPtr.h:
  4658. 2011-01-10 Xan Lopez <xlopez@igalia.com>
  4659. Reviewed by Gavin Barraclough.
  4660. Remove unused isString() case in JSString::toPrimitiveString()
  4661. https://bugs.webkit.org/show_bug.cgi?id=52167
  4662. We never call toPrimitiveString() with strings, so remove the
  4663. check and add an ASSERT ensuring this never happens. 0.7% overall
  4664. progression in sunspider, since one of the call sites is very hot.
  4665. * runtime/JSString.h:
  4666. (JSC::JSValue::toPrimitiveString):
  4667. 2011-01-10 Peter Varga <pvarga@inf.u-szeged.hu>
  4668. Reviewed by Gavin Barraclough.
  4669. Rename the existing YARR files and classes
  4670. https://bugs.webkit.org/show_bug.cgi?id=51872
  4671. Replace the "Regex" prefix with "Yarr" in the name of YARR files and classes.
  4672. * Android.mk:
  4673. * CMakeLists.txt:
  4674. * GNUmakefile.am:
  4675. * JavaScriptCore.gypi:
  4676. * JavaScriptCore.pro:
  4677. * JavaScriptCore.xcodeproj/project.pbxproj:
  4678. * runtime/RegExp.cpp:
  4679. (JSC::RegExp::compile):
  4680. (JSC::RegExp::match):
  4681. (JSC::RegExp::printTraceData):
  4682. * yarr/YarrInterpreter.cpp: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.cpp.
  4683. (JSC::Yarr::Interpreter::appendParenthesesDisjunctionContext):
  4684. (JSC::Yarr::Interpreter::popParenthesesDisjunctionContext):
  4685. (JSC::Yarr::Interpreter::DisjunctionContext::DisjunctionContext):
  4686. (JSC::Yarr::Interpreter::DisjunctionContext::operator new):
  4687. (JSC::Yarr::Interpreter::allocDisjunctionContext):
  4688. (JSC::Yarr::Interpreter::freeDisjunctionContext):
  4689. (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext):
  4690. (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::operator new):
  4691. (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::restoreOutput):
  4692. (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::getDisjunctionContext):
  4693. (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
  4694. (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
  4695. (JSC::Yarr::Interpreter::InputStream::InputStream):
  4696. (JSC::Yarr::Interpreter::InputStream::next):
  4697. (JSC::Yarr::Interpreter::InputStream::rewind):
  4698. (JSC::Yarr::Interpreter::InputStream::read):
  4699. (JSC::Yarr::Interpreter::InputStream::readPair):
  4700. (JSC::Yarr::Interpreter::InputStream::readChecked):
  4701. (JSC::Yarr::Interpreter::InputStream::reread):
  4702. (JSC::Yarr::Interpreter::InputStream::prev):
  4703. (JSC::Yarr::Interpreter::InputStream::getPos):
  4704. (JSC::Yarr::Interpreter::InputStream::setPos):
  4705. (JSC::Yarr::Interpreter::InputStream::atStart):
  4706. (JSC::Yarr::Interpreter::InputStream::atEnd):
  4707. (JSC::Yarr::Interpreter::InputStream::checkInput):
  4708. (JSC::Yarr::Interpreter::InputStream::uncheckInput):
  4709. (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
  4710. (JSC::Yarr::Interpreter::testCharacterClass):
  4711. (JSC::Yarr::Interpreter::checkCharacter):
  4712. (JSC::Yarr::Interpreter::checkCasedCharacter):
  4713. (JSC::Yarr::Interpreter::checkCharacterClass):
  4714. (JSC::Yarr::Interpreter::tryConsumeBackReference):
  4715. (JSC::Yarr::Interpreter::matchAssertionBOL):
  4716. (JSC::Yarr::Interpreter::matchAssertionEOL):
  4717. (JSC::Yarr::Interpreter::matchAssertionWordBoundary):
  4718. (JSC::Yarr::Interpreter::backtrackPatternCharacter):
  4719. (JSC::Yarr::Interpreter::backtrackPatternCasedCharacter):
  4720. (JSC::Yarr::Interpreter::matchCharacterClass):
  4721. (JSC::Yarr::Interpreter::backtrackCharacterClass):
  4722. (JSC::Yarr::Interpreter::matchBackReference):
  4723. (JSC::Yarr::Interpreter::backtrackBackReference):
  4724. (JSC::Yarr::Interpreter::recordParenthesesMatch):
  4725. (JSC::Yarr::Interpreter::resetMatches):
  4726. (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
  4727. (JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
  4728. (JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
  4729. (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
  4730. (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
  4731. (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
  4732. (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
  4733. (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
  4734. (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
  4735. (JSC::Yarr::Interpreter::matchParentheticalAssertionBegin):
  4736. (JSC::Yarr::Interpreter::matchParentheticalAssertionEnd):
  4737. (JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin):
  4738. (JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd):
  4739. (JSC::Yarr::Interpreter::matchParentheses):
  4740. (JSC::Yarr::Interpreter::backtrackParentheses):
  4741. (JSC::Yarr::Interpreter::lookupForBeginChars):
  4742. (JSC::Yarr::Interpreter::matchDisjunction):
  4743. (JSC::Yarr::Interpreter::matchNonZeroDisjunction):
  4744. (JSC::Yarr::Interpreter::interpret):
  4745. (JSC::Yarr::Interpreter::Interpreter):
  4746. (JSC::Yarr::ByteCompiler::ParenthesesStackEntry::ParenthesesStackEntry):
  4747. (JSC::Yarr::ByteCompiler::ByteCompiler):
  4748. (JSC::Yarr::ByteCompiler::compile):
  4749. (JSC::Yarr::ByteCompiler::checkInput):
  4750. (JSC::Yarr::ByteCompiler::assertionBOL):
  4751. (JSC::Yarr::ByteCompiler::assertionEOL):
  4752. (JSC::Yarr::ByteCompiler::assertionWordBoundary):
  4753. (JSC::Yarr::ByteCompiler::atomPatternCharacter):
  4754. (JSC::Yarr::ByteCompiler::atomCharacterClass):
  4755. (JSC::Yarr::ByteCompiler::atomBackReference):
  4756. (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
  4757. (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
  4758. (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
  4759. (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
  4760. (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
  4761. (JSC::Yarr::ByteCompiler::popParenthesesStack):
  4762. (JSC::Yarr::ByteCompiler::dumpDisjunction):
  4763. (JSC::Yarr::ByteCompiler::closeAlternative):
  4764. (JSC::Yarr::ByteCompiler::closeBodyAlternative):
  4765. (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
  4766. (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
  4767. (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
  4768. (JSC::Yarr::ByteCompiler::regexBegin):
  4769. (JSC::Yarr::ByteCompiler::regexEnd):
  4770. (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
  4771. (JSC::Yarr::ByteCompiler::alternativeDisjunction):
  4772. (JSC::Yarr::ByteCompiler::emitDisjunction):
  4773. (JSC::Yarr::byteCompile):
  4774. (JSC::Yarr::interpret):
  4775. * yarr/YarrInterpreter.h: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.h.
  4776. (JSC::Yarr::ByteTerm::ByteTerm):
  4777. (JSC::Yarr::ByteTerm::BOL):
  4778. (JSC::Yarr::ByteTerm::CheckInput):
  4779. (JSC::Yarr::ByteTerm::EOL):
  4780. (JSC::Yarr::ByteTerm::WordBoundary):
  4781. (JSC::Yarr::ByteTerm::BackReference):
  4782. (JSC::Yarr::ByteTerm::BodyAlternativeBegin):
  4783. (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
  4784. (JSC::Yarr::ByteTerm::BodyAlternativeEnd):
  4785. (JSC::Yarr::ByteTerm::AlternativeBegin):
  4786. (JSC::Yarr::ByteTerm::AlternativeDisjunction):
  4787. (JSC::Yarr::ByteTerm::AlternativeEnd):
  4788. (JSC::Yarr::ByteTerm::SubpatternBegin):
  4789. (JSC::Yarr::ByteTerm::SubpatternEnd):
  4790. (JSC::Yarr::ByteTerm::invert):
  4791. (JSC::Yarr::ByteTerm::capture):
  4792. (JSC::Yarr::ByteDisjunction::ByteDisjunction):
  4793. (JSC::Yarr::BytecodePattern::BytecodePattern):
  4794. (JSC::Yarr::BytecodePattern::~BytecodePattern):
  4795. * yarr/YarrJIT.cpp: Renamed from Source/JavaScriptCore/yarr/RegexJIT.cpp.
  4796. (JSC::Yarr::YarrGenerator::optimizeAlternative):
  4797. (JSC::Yarr::YarrGenerator::matchCharacterClassRange):
  4798. (JSC::Yarr::YarrGenerator::matchCharacterClass):
  4799. (JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput):
  4800. (JSC::Yarr::YarrGenerator::jumpIfAvailableInput):
  4801. (JSC::Yarr::YarrGenerator::checkInput):
  4802. (JSC::Yarr::YarrGenerator::atEndOfInput):
  4803. (JSC::Yarr::YarrGenerator::notAtEndOfInput):
  4804. (JSC::Yarr::YarrGenerator::jumpIfCharEquals):
  4805. (JSC::Yarr::YarrGenerator::jumpIfCharNotEquals):
  4806. (JSC::Yarr::YarrGenerator::readCharacter):
  4807. (JSC::Yarr::YarrGenerator::storeToFrame):
  4808. (JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
  4809. (JSC::Yarr::YarrGenerator::loadFromFrame):
  4810. (JSC::Yarr::YarrGenerator::loadFromFrameAndJump):
  4811. (JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry):
  4812. (JSC::Yarr::YarrGenerator::IndirectJumpEntry::addJump):
  4813. (JSC::Yarr::YarrGenerator::AlternativeBacktrackRecord::AlternativeBacktrackRecord):
  4814. (JSC::Yarr::YarrGenerator::GenerationState::GenerationState):
  4815. (JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry):
  4816. (JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable):
  4817. (JSC::Yarr::YarrGenerator::GenerationState::incrementParenNestingLevel):
  4818. (JSC::Yarr::YarrGenerator::GenerationState::decrementParenNestingLevel):
  4819. (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
  4820. (JSC::Yarr::YarrGenerator::GenerationState::emitParenthesesTail):
  4821. (JSC::Yarr::YarrGenerator::GenerationState::addJumpToNextInteration):
  4822. (JSC::Yarr::YarrGenerator::GenerationState::addJumpsToNextInteration):
  4823. (JSC::Yarr::YarrGenerator::GenerationState::addDataLabelToNextIteration):
  4824. (JSC::Yarr::YarrGenerator::GenerationState::linkToNextIteration):
  4825. (JSC::Yarr::YarrGenerator::BacktrackDestination::BacktrackDestination):
  4826. (JSC::Yarr::YarrGenerator::BacktrackDestination::clear):
  4827. (JSC::Yarr::YarrGenerator::BacktrackDestination::clearDataLabel):
  4828. (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDestination):
  4829. (JSC::Yarr::YarrGenerator::BacktrackDestination::isStackOffset):
  4830. (JSC::Yarr::YarrGenerator::BacktrackDestination::isLabel):
  4831. (JSC::Yarr::YarrGenerator::BacktrackDestination::isJumpList):
  4832. (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDataLabel):
  4833. (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTarget):
  4834. (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTo):
  4835. (JSC::Yarr::YarrGenerator::BacktrackDestination::addBacktrackJump):
  4836. (JSC::Yarr::YarrGenerator::BacktrackDestination::setStackOffset):
  4837. (JSC::Yarr::YarrGenerator::BacktrackDestination::setLabel):
  4838. (JSC::Yarr::YarrGenerator::BacktrackDestination::setNextBacktrackLabel):
  4839. (JSC::Yarr::YarrGenerator::BacktrackDestination::copyBacktrackToLabel):
  4840. (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackToLabel):
  4841. (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackJumpList):
  4842. (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackSourceLabel):
  4843. (JSC::Yarr::YarrGenerator::BacktrackDestination::setDataLabel):
  4844. (JSC::Yarr::YarrGenerator::BacktrackDestination::setSubDataLabelPtr):
  4845. (JSC::Yarr::YarrGenerator::BacktrackDestination::linkToNextBacktrack):
  4846. (JSC::Yarr::YarrGenerator::BacktrackDestination::getStackOffset):
  4847. (JSC::Yarr::YarrGenerator::BacktrackDestination::getLabel):
  4848. (JSC::Yarr::YarrGenerator::BacktrackDestination::getBacktrackJumps):
  4849. (JSC::Yarr::YarrGenerator::BacktrackDestination::getDataLabel):
  4850. (JSC::Yarr::YarrGenerator::BacktrackDestination::jumpToBacktrack):
  4851. (JSC::Yarr::YarrGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
  4852. (JSC::Yarr::YarrGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
  4853. (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracks):
  4854. (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
  4855. (JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState):
  4856. (JSC::Yarr::YarrGenerator::TermGenerationState::resetAlternative):
  4857. (JSC::Yarr::YarrGenerator::TermGenerationState::alternativeValid):
  4858. (JSC::Yarr::YarrGenerator::TermGenerationState::nextAlternative):
  4859. (JSC::Yarr::YarrGenerator::TermGenerationState::alternative):
  4860. (JSC::Yarr::YarrGenerator::TermGenerationState::isLastAlternative):
  4861. (JSC::Yarr::YarrGenerator::TermGenerationState::resetTerm):
  4862. (JSC::Yarr::YarrGenerator::TermGenerationState::termValid):
  4863. (JSC::Yarr::YarrGenerator::TermGenerationState::nextTerm):
  4864. (JSC::Yarr::YarrGenerator::TermGenerationState::term):
  4865. (JSC::Yarr::YarrGenerator::TermGenerationState::isLastTerm):
  4866. (JSC::Yarr::YarrGenerator::TermGenerationState::getSubParenNum):
  4867. (JSC::Yarr::YarrGenerator::TermGenerationState::isMainDisjunction):
  4868. (JSC::Yarr::YarrGenerator::TermGenerationState::setParenthesesTail):
  4869. (JSC::Yarr::YarrGenerator::TermGenerationState::getParenthesesTail):
  4870. (JSC::Yarr::YarrGenerator::TermGenerationState::lookaheadTerm):
  4871. (JSC::Yarr::YarrGenerator::TermGenerationState::isSinglePatternCharacterLookaheadTerm):
  4872. (JSC::Yarr::YarrGenerator::TermGenerationState::inputOffset):
  4873. (JSC::Yarr::YarrGenerator::TermGenerationState::clearBacktrack):
  4874. (JSC::Yarr::YarrGenerator::TermGenerationState::jumpToBacktrack):
  4875. (JSC::Yarr::YarrGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
  4876. (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
  4877. (JSC::Yarr::YarrGenerator::TermGenerationState::addBacktrackJump):
  4878. (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackDataLabel):
  4879. (JSC::Yarr::YarrGenerator::TermGenerationState::setBackTrackStackOffset):
  4880. (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLabel):
  4881. (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracks):
  4882. (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracksTo):
  4883. (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLink):
  4884. (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktracks):
  4885. (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktrackJumps):
  4886. (JSC::Yarr::YarrGenerator::TermGenerationState::getBacktrackDestination):
  4887. (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
  4888. (JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail):
  4889. (JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
  4890. (JSC::Yarr::YarrGenerator::ParenthesesTail::setNextIteration):
  4891. (JSC::Yarr::YarrGenerator::ParenthesesTail::addAfterParenJump):
  4892. (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
  4893. (JSC::Yarr::YarrGenerator::generateAssertionBOL):
  4894. (JSC::Yarr::YarrGenerator::generateAssertionEOL):
  4895. (JSC::Yarr::YarrGenerator::matchAssertionWordchar):
  4896. (JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
  4897. (JSC::Yarr::YarrGenerator::generatePatternCharacterSingle):
  4898. (JSC::Yarr::YarrGenerator::generatePatternCharacterPair):
  4899. (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
  4900. (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
  4901. (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
  4902. (JSC::Yarr::YarrGenerator::generateCharacterClassSingle):
  4903. (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
  4904. (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
  4905. (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
  4906. (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction):
  4907. (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
  4908. (JSC::Yarr::YarrGenerator::generateParenthesesGreedyNoBacktrack):
  4909. (JSC::Yarr::YarrGenerator::generateParentheticalAssertion):
  4910. (JSC::Yarr::YarrGenerator::generateTerm):
  4911. (JSC::Yarr::YarrGenerator::generateDisjunction):
  4912. (JSC::Yarr::YarrGenerator::generateEnter):
  4913. (JSC::Yarr::YarrGenerator::generateReturn):
  4914. (JSC::Yarr::YarrGenerator::YarrGenerator):
  4915. (JSC::Yarr::YarrGenerator::generate):
  4916. (JSC::Yarr::YarrGenerator::compile):
  4917. (JSC::Yarr::jitCompile):
  4918. * yarr/YarrJIT.h: Renamed from Source/JavaScriptCore/yarr/RegexJIT.h.
  4919. (JSC::Yarr::YarrCodeBlock::YarrCodeBlock):
  4920. (JSC::Yarr::YarrCodeBlock::~YarrCodeBlock):
  4921. (JSC::Yarr::YarrCodeBlock::setFallBack):
  4922. (JSC::Yarr::YarrCodeBlock::isFallBack):
  4923. (JSC::Yarr::YarrCodeBlock::set):
  4924. (JSC::Yarr::YarrCodeBlock::execute):
  4925. (JSC::Yarr::YarrCodeBlock::getAddr):
  4926. (JSC::Yarr::execute):
  4927. * yarr/YarrParser.h: Renamed from Source/JavaScriptCore/yarr/RegexParser.h.
  4928. (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
  4929. (JSC::Yarr::Parser::CharacterClassParserDelegate::begin):
  4930. (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
  4931. (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
  4932. (JSC::Yarr::Parser::CharacterClassParserDelegate::end):
  4933. (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary):
  4934. (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference):
  4935. (JSC::Yarr::Parser::Parser):
  4936. (JSC::Yarr::Parser::parseEscape):
  4937. (JSC::Yarr::Parser::parseAtomEscape):
  4938. (JSC::Yarr::Parser::parseCharacterClassEscape):
  4939. (JSC::Yarr::Parser::parseCharacterClass):
  4940. (JSC::Yarr::Parser::parseParenthesesBegin):
  4941. (JSC::Yarr::Parser::parseParenthesesEnd):
  4942. (JSC::Yarr::Parser::parseQuantifier):
  4943. (JSC::Yarr::Parser::parseTokens):
  4944. (JSC::Yarr::Parser::parse):
  4945. (JSC::Yarr::Parser::saveState):
  4946. (JSC::Yarr::Parser::restoreState):
  4947. (JSC::Yarr::Parser::atEndOfPattern):
  4948. (JSC::Yarr::Parser::peek):
  4949. (JSC::Yarr::Parser::peekIsDigit):
  4950. (JSC::Yarr::Parser::peekDigit):
  4951. (JSC::Yarr::Parser::consume):
  4952. (JSC::Yarr::Parser::consumeDigit):
  4953. (JSC::Yarr::Parser::consumeNumber):
  4954. (JSC::Yarr::Parser::consumeOctal):
  4955. (JSC::Yarr::Parser::tryConsume):
  4956. (JSC::Yarr::Parser::tryConsumeHex):
  4957. (JSC::Yarr::parse):
  4958. * yarr/YarrPattern.cpp: Renamed from Source/JavaScriptCore/yarr/RegexPattern.cpp.
  4959. (JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor):
  4960. (JSC::Yarr::CharacterClassConstructor::reset):
  4961. (JSC::Yarr::CharacterClassConstructor::append):
  4962. (JSC::Yarr::CharacterClassConstructor::putChar):
  4963. (JSC::Yarr::CharacterClassConstructor::isUnicodeUpper):
  4964. (JSC::Yarr::CharacterClassConstructor::isUnicodeLower):
  4965. (JSC::Yarr::CharacterClassConstructor::putRange):
  4966. (JSC::Yarr::CharacterClassConstructor::charClass):
  4967. (JSC::Yarr::CharacterClassConstructor::addSorted):
  4968. (JSC::Yarr::CharacterClassConstructor::addSortedRange):
  4969. (JSC::Yarr::BeginCharHelper::BeginCharHelper):
  4970. (JSC::Yarr::BeginCharHelper::addBeginChar):
  4971. (JSC::Yarr::BeginCharHelper::merge):
  4972. (JSC::Yarr::BeginCharHelper::addCharacter):
  4973. (JSC::Yarr::BeginCharHelper::linkHotTerms):
  4974. (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
  4975. (JSC::Yarr::YarrPatternConstructor::~YarrPatternConstructor):
  4976. (JSC::Yarr::YarrPatternConstructor::reset):
  4977. (JSC::Yarr::YarrPatternConstructor::assertionBOL):
  4978. (JSC::Yarr::YarrPatternConstructor::assertionEOL):
  4979. (JSC::Yarr::YarrPatternConstructor::assertionWordBoundary):
  4980. (JSC::Yarr::YarrPatternConstructor::atomPatternCharacter):
  4981. (JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):
  4982. (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBegin):
  4983. (JSC::Yarr::YarrPatternConstructor::atomCharacterClassAtom):
  4984. (JSC::Yarr::YarrPatternConstructor::atomCharacterClassRange):
  4985. (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn):
  4986. (JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd):
  4987. (JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin):
  4988. (JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin):
  4989. (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
  4990. (JSC::Yarr::YarrPatternConstructor::atomBackReference):
  4991. (JSC::Yarr::YarrPatternConstructor::copyDisjunction):
  4992. (JSC::Yarr::YarrPatternConstructor::copyTerm):
  4993. (JSC::Yarr::YarrPatternConstructor::quantifyAtom):
  4994. (JSC::Yarr::YarrPatternConstructor::disjunction):
  4995. (JSC::Yarr::YarrPatternConstructor::regexBegin):
  4996. (JSC::Yarr::YarrPatternConstructor::regexEnd):
  4997. (JSC::Yarr::YarrPatternConstructor::regexError):
  4998. (JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets):
  4999. (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):
  5000. (JSC::Yarr::YarrPatternConstructor::setupOffsets):
  5001. (JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
  5002. (JSC::Yarr::YarrPatternConstructor::optimizeBOL):
  5003. (JSC::Yarr::YarrPatternConstructor::addBeginTerm):
  5004. (JSC::Yarr::YarrPatternConstructor::setupDisjunctionBeginTerms):
  5005. (JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms):
  5006. (JSC::Yarr::YarrPatternConstructor::setupBeginChars):
  5007. (JSC::Yarr::compile):
  5008. (JSC::Yarr::YarrPattern::YarrPattern):
  5009. * yarr/YarrPattern.h: Renamed from Source/JavaScriptCore/yarr/RegexPattern.h.
  5010. (JSC::Yarr::CharacterRange::CharacterRange):
  5011. (JSC::Yarr::CharacterClassTable::create):
  5012. (JSC::Yarr::CharacterClassTable::CharacterClassTable):
  5013. (JSC::Yarr::CharacterClass::CharacterClass):
  5014. (JSC::Yarr::PatternTerm::PatternTerm):
  5015. (JSC::Yarr::PatternTerm::ForwardReference):
  5016. (JSC::Yarr::PatternTerm::BOL):
  5017. (JSC::Yarr::PatternTerm::EOL):
  5018. (JSC::Yarr::PatternTerm::WordBoundary):
  5019. (JSC::Yarr::PatternTerm::invert):
  5020. (JSC::Yarr::PatternTerm::capture):
  5021. (JSC::Yarr::PatternTerm::quantify):
  5022. (JSC::Yarr::PatternAlternative::PatternAlternative):
  5023. (JSC::Yarr::PatternAlternative::lastTerm):
  5024. (JSC::Yarr::PatternAlternative::removeLastTerm):
  5025. (JSC::Yarr::PatternAlternative::setOnceThrough):
  5026. (JSC::Yarr::PatternAlternative::onceThrough):
  5027. (JSC::Yarr::PatternDisjunction::PatternDisjunction):
  5028. (JSC::Yarr::PatternDisjunction::~PatternDisjunction):
  5029. (JSC::Yarr::PatternDisjunction::addNewAlternative):
  5030. (JSC::Yarr::TermChain::TermChain):
  5031. (JSC::Yarr::BeginChar::BeginChar):
  5032. (JSC::Yarr::YarrPattern::~YarrPattern):
  5033. (JSC::Yarr::YarrPattern::reset):
  5034. (JSC::Yarr::YarrPattern::containsIllegalBackReference):
  5035. (JSC::Yarr::YarrPattern::newlineCharacterClass):
  5036. (JSC::Yarr::YarrPattern::digitsCharacterClass):
  5037. (JSC::Yarr::YarrPattern::spacesCharacterClass):
  5038. (JSC::Yarr::YarrPattern::wordcharCharacterClass):
  5039. (JSC::Yarr::YarrPattern::nondigitsCharacterClass):
  5040. (JSC::Yarr::YarrPattern::nonspacesCharacterClass):
  5041. (JSC::Yarr::YarrPattern::nonwordcharCharacterClass):
  5042. 2011-01-10 Gavin Barraclough <barraclough@apple.com>
  5043. Windows build fix.
  5044. * parser/SyntaxChecker.h:
  5045. 2011-01-10 Dave Tapuska <dtapuska@rim.com>
  5046. Reviewed by Gavin Barraclough.
  5047. Add CTI ASM versions for RVCT ARM THUMB2 mode.
  5048. https://bugs.webkit.org/show_bug.cgi?id=52154
  5049. * jit/JITStubs.cpp:
  5050. (JSC::ctiTrampoline):
  5051. (JSC::ctiVMThrowTrampoline):
  5052. (JSC::ctiOpThrowNotCaught):
  5053. 2011-01-10 Gavin Barraclough <barraclough@apple.com>
  5054. Qt build fix.
  5055. * JavaScriptCore.pro:
  5056. 2011-01-10 Gavin Barraclough <barraclough@apple.com>
  5057. Reviewed by Oliver Hunt.
  5058. Bug 52079 - Syntax errors should be early errors.
  5059. From chapter 16 the spec:
  5060. An implementation must report most errors at the time the relevant ECMAScript language construct is
  5061. evaluated. An early error is an error that can be detected and reported prior to the evaluation of
  5062. any construct in the Program containing the error. An implementation must report early errors in a
  5063. Program prior to the first evaluation of that Program. Early errors in eval code are reported at
  5064. the time eval is called but prior to evaluation of any construct within the eval code. All errors
  5065. that are not early errors are runtime errors.
  5066. An implementation must treat any instance of the following kinds of errors as an early error:
  5067. * Any syntax error."
  5068. * JavaScriptCore.xcodeproj/project.pbxproj:
  5069. Added new files.
  5070. * bytecode/CodeBlock.cpp:
  5071. Removed op_throw_syntax_error.
  5072. * bytecode/Opcode.h:
  5073. Removed op_throw_syntax_error.
  5074. * bytecompiler/BytecodeGenerator.cpp:
  5075. (JSC::BytecodeGenerator::generate):
  5076. If m_expressionTooDeep then throw a runtime error.
  5077. (JSC::BytecodeGenerator::BytecodeGenerator):
  5078. Initialize m_expressionTooDeep.
  5079. (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
  5080. Sets m_expressionTooDeep.
  5081. * bytecompiler/BytecodeGenerator.h:
  5082. Added m_expressionTooDeep, removed emitThrowSyntaxError.
  5083. * bytecompiler/NodesCodegen.cpp:
  5084. (JSC::RegExpNode::emitBytecode):
  5085. (JSC::ContinueNode::emitBytecode):
  5086. (JSC::BreakNode::emitBytecode):
  5087. (JSC::ReturnNode::emitBytecode):
  5088. (JSC::LabelNode::emitBytecode):
  5089. Conditions that threw syntax error are now handled during parsing;
  5090. during bytecompilation these are now just ASSERTs.
  5091. * interpreter/Interpreter.cpp:
  5092. (JSC::Interpreter::privateExecute):
  5093. * jit/JIT.cpp:
  5094. (JSC::JIT::privateCompileMainPass):
  5095. * jit/JIT.h:
  5096. * jit/JITOpcodes.cpp:
  5097. * jit/JITOpcodes32_64.cpp:
  5098. * jit/JITStubs.cpp:
  5099. * jit/JITStubs.h:
  5100. Removed op_throw_syntax_error.
  5101. * parser/ASTBuilder.h:
  5102. (JSC::ASTBuilder::createRegExp):
  5103. Renamed; added syntax check.
  5104. * parser/JSParser.cpp:
  5105. (JSC::JSParser::breakIsValid):
  5106. (JSC::JSParser::hasLabel):
  5107. (JSC::JSParser::Scope::Scope):
  5108. (JSC::JSParser::Scope::setIsFunction):
  5109. (JSC::JSParser::Scope::isFunctionBoundary):
  5110. (JSC::JSParser::ScopeRef::hasContainingScope):
  5111. (JSC::JSParser::ScopeRef::containingScope):
  5112. (JSC::JSParser::AutoPopScopeRef::AutoPopScopeRef):
  5113. (JSC::JSParser::AutoPopScopeRef::~AutoPopScopeRef):
  5114. (JSC::JSParser::AutoPopScopeRef::setPopped):
  5115. (JSC::JSParser::popScopeInternal):
  5116. (JSC::JSParser::popScope):
  5117. (JSC::jsParse):
  5118. (JSC::JSParser::JSParser):
  5119. (JSC::JSParser::parseProgram):
  5120. (JSC::JSParser::parseBreakStatement):
  5121. (JSC::JSParser::parseContinueStatement):
  5122. (JSC::JSParser::parseReturnStatement):
  5123. (JSC::JSParser::parseTryStatement):
  5124. (JSC::JSParser::parseFunctionInfo):
  5125. (JSC::JSParser::parseExpressionOrLabelStatement):
  5126. (JSC::JSParser::parsePrimaryExpression):
  5127. * parser/JSParser.h:
  5128. * parser/Nodes.h:
  5129. * parser/Parser.cpp:
  5130. (JSC::Parser::parse):
  5131. * parser/SyntaxChecker.h:
  5132. (JSC::SyntaxChecker::createRegExp):
  5133. Renamed; added syntax check.
  5134. * runtime/ExceptionHelpers.cpp:
  5135. (JSC::createOutOfMemoryError):
  5136. (JSC::throwOutOfMemoryError):
  5137. * runtime/ExceptionHelpers.h:
  5138. Broke out createOutOfMemoryError.
  5139. * runtime/Executable.cpp:
  5140. (JSC::EvalExecutable::compileInternal):
  5141. (JSC::ProgramExecutable::compileInternal):
  5142. (JSC::FunctionExecutable::compileForCallInternal):
  5143. (JSC::FunctionExecutable::compileForConstructInternal):
  5144. Add check for exception after bytecode generation.
  5145. * runtime/RegExpConstructor.cpp:
  5146. (JSC::constructRegExp):
  5147. * runtime/RegExpPrototype.cpp:
  5148. (JSC::regExpProtoFuncCompile):
  5149. RegExp error prefixes not included in error string.
  5150. * yarr/RegexParser.h:
  5151. (JSC::Yarr::Parser::parse):
  5152. Removed regexBegin/regexEnd/regexError.
  5153. * yarr/RegexPattern.cpp:
  5154. (JSC::Yarr::RegexPatternConstructor::regexBegin):
  5155. Removed regexEnd/regexError.
  5156. (JSC::Yarr::compileRegex):
  5157. Add call to regexBegin (no longer called from the parser).
  5158. * yarr/YarrSyntaxChecker.cpp: Added.
  5159. (JSC::Yarr::SyntaxChecker::assertionBOL):
  5160. (JSC::Yarr::SyntaxChecker::assertionEOL):
  5161. (JSC::Yarr::SyntaxChecker::assertionWordBoundary):
  5162. (JSC::Yarr::SyntaxChecker::atomPatternCharacter):
  5163. (JSC::Yarr::SyntaxChecker::atomBuiltInCharacterClass):
  5164. (JSC::Yarr::SyntaxChecker::atomCharacterClassBegin):
  5165. (JSC::Yarr::SyntaxChecker::atomCharacterClassAtom):
  5166. (JSC::Yarr::SyntaxChecker::atomCharacterClassRange):
  5167. (JSC::Yarr::SyntaxChecker::atomCharacterClassBuiltIn):
  5168. (JSC::Yarr::SyntaxChecker::atomCharacterClassEnd):
  5169. (JSC::Yarr::SyntaxChecker::atomParenthesesSubpatternBegin):
  5170. (JSC::Yarr::SyntaxChecker::atomParentheticalAssertionBegin):
  5171. (JSC::Yarr::SyntaxChecker::atomParenthesesEnd):
  5172. (JSC::Yarr::SyntaxChecker::atomBackReference):
  5173. (JSC::Yarr::SyntaxChecker::quantifyAtom):
  5174. (JSC::Yarr::SyntaxChecker::disjunction):
  5175. (JSC::Yarr::checkSyntax):
  5176. * yarr/YarrSyntaxChecker.h: Added.
  5177. Check RegExp syntax.
  5178. 2011-01-10 Adam Roben <aroben@apple.com>
  5179. Roll out r75289
  5180. It was causing assertion failures. See <http://webkit.org/b/52156>.
  5181. * wtf/StackBounds.cpp:
  5182. (WTF::StackBounds::initialize):
  5183. 2011-01-08 Patrick Gansterer <paroga@webkit.org>
  5184. Reviewed by Darin Adler.
  5185. Unify string table adding in AtomicString
  5186. https://bugs.webkit.org/show_bug.cgi?id=51927
  5187. Move code for adding a string into a separate function.
  5188. This removes multiple occurrence of the same logic.
  5189. * wtf/text/AtomicString.cpp:
  5190. (WTF::addToStringTable): Added.
  5191. (WTF::AtomicString::add): Use addToStringTable().
  5192. (WTF::AtomicString::fromUTF8): Ditto.
  5193. 2011-01-07 Geoffrey Garen <ggaren@apple.com>
  5194. Reviewed by Gavin Barraclough.
  5195. Split machine stack marking functions into their own class (MachineStackMarker)
  5196. https://bugs.webkit.org/show_bug.cgi?id=52088
  5197. * API/APIShims.h:
  5198. (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Moved registerThread()
  5199. call behind an #ifdef because we shouldn't be registering threads at all
  5200. if we don't support usage on multiple threads.
  5201. * Android.mk:
  5202. * CMakeLists.txt:
  5203. * GNUmakefile.am:
  5204. * JavaScriptCore.gypi:
  5205. * JavaScriptCore.pro:
  5206. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  5207. * JavaScriptCore.xcodeproj/project.pbxproj: Updated projects.
  5208. * runtime/Collector.cpp:
  5209. (JSC::Heap::Heap):
  5210. (JSC::Heap::destroy):
  5211. (JSC::Heap::markRoots):
  5212. * runtime/Collector.h:
  5213. (JSC::Heap::machineStackMarker): Moved code to machineStackMarker.
  5214. * runtime/JSGlobalData.h:
  5215. (JSC::JSGlobalData::makeUsableFromMultipleThreads): Removed an unnecessary
  5216. level of indirection, to make Heap less of a God class.
  5217. * runtime/MachineStackMarker.h: Copied from Source/JavaScriptCore/runtime/Collector.h.
  5218. * runtime/MachineStackMarker.cpp: Copied from Source/JavaScriptCore/runtime/Collector.cpp.
  5219. (JSC::MachineStackMarker::MachineStackMarker):
  5220. (JSC::MachineStackMarker::~MachineStackMarker):
  5221. (JSC::MachineStackMarker::makeUsableFromMultipleThreads):
  5222. (JSC::MachineStackMarker::registerThread):
  5223. (JSC::MachineStackMarker::unregisterThread):
  5224. (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
  5225. (JSC::MachineStackMarker::markCurrentThreadConservatively):
  5226. (JSC::MachineStackMarker::markOtherThreadConservatively):
  5227. (JSC::MachineStackMarker::markMachineStackConservatively): Moved code from Heap.
  5228. 2011-01-07 Gavin Barraclough <barraclough@apple.com>
  5229. Reviewed by Geoff Garen.
  5230. Bug 26276 - Need a mechanism to determine stack extent on WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE platforms
  5231. Fix for win32. The base of the stack is stored in the "deallocation stack" field of the
  5232. Thread Information Block - see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block
  5233. for more information!
  5234. * wtf/StackBounds.cpp:
  5235. (WTF::StackBounds::initialize):
  5236. 2011-01-07 Adam Roben <aroben@apple.com>
  5237. Update react-to-vsprops-changes.py after r74855
  5238. * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
  5239. 2011-01-07 Carlos Garcia Campos <cgarcia@igalia.com>
  5240. Reviewed by Martin Robinson.
  5241. [GTK] Port scrollbar painting to GtkStyleContext
  5242. https://bugs.webkit.org/show_bug.cgi?id=52051
  5243. * wtf/gobject/GTypedefs.h: Add GtkStyleContext forward
  5244. declaration.
  5245. 2011-01-07 Daniel Bates <dbates@rim.com>
  5246. Reviewed by Martin Robinson.
  5247. Enable PCRE computed gotos when compiling with RCVT 4.0 or greater in GNU mode
  5248. https://bugs.webkit.org/show_bug.cgi?id=52034
  5249. Derived from a patch by Eli Fidler.
  5250. RVCT 4 or greater in GNU mode supports the computed goto GNU language extension
  5251. as per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/ch03s07s12.html>.
  5252. * pcre/pcre_exec.cpp: Modified to check for feature, HAVE(COMPUTED_GOTO), instead
  5253. of hardcoding the GCC compiler.
  5254. * wtf/Platform.h: Define WTF_COMPILER_RVCT4_OR_GREATER if __ARMCC_VERSION >= 400000.
  5255. 2011-01-06 Gavin Barraclough <barraclough@apple.com>
  5256. Reviewed by Geoff Garen.
  5257. Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
  5258. The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
  5259. destructor early, in order to release wrappers once we know we no longer intend to use them.
  5260. Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
  5261. lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
  5262. A sequence of events that triggers the bug would look like this:
  5263. (1) Create a DOMWrapperWorld.
  5264. (2) Register a timer in the world.
  5265. (3) Call unregisterWorld() on the world.
  5266. (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
  5267. (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
  5268. called forgetWorld() none exists.
  5269. (6) Attempt to add a wrapper to a NULL map.
  5270. Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
  5271. * runtime/WeakGCMap.h:
  5272. (JSC::WeakGCMap::clear):
  5273. 2011-01-06 Gavin Barraclough <barraclough@apple.com>
  5274. Reviewed by Darin Adler.
  5275. Bug 52021 - zeroDouble broken on ARMv7
  5276. The bug here is that zeroDouble was working incorrectly,
  5277. leading to op_loop_if_true failing - specifically in the
  5278. case where the value being checked is 0.0 encoded as a
  5279. double (rather than an integer immediate).
  5280. Additionally this patch removes a redundant duplicate compare
  5281. in some (many) case.
  5282. * assembler/ARMv7Assembler.h:
  5283. (JSC::ARMv7Assembler::vcmp_F64):
  5284. (JSC::ARMv7Assembler::vcmpz_F64):
  5285. * assembler/MacroAssemblerARM.h:
  5286. (JSC::MacroAssemblerARM::branchDoubleNonZero):
  5287. (JSC::MacroAssemblerARM::branchDoubleZeroOrNaN):
  5288. * assembler/MacroAssemblerARMv7.h:
  5289. (JSC::MacroAssemblerARMv7::branchDouble):
  5290. (JSC::MacroAssemblerARMv7::branchDoubleNonZero):
  5291. (JSC::MacroAssemblerARMv7::branchDoubleZeroOrNaN):
  5292. (JSC::MacroAssemblerARMv7::compare32):
  5293. * assembler/MacroAssemblerMIPS.h:
  5294. (JSC::MacroAssemblerMIPS::branchDoubleNonZero):
  5295. (JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN):
  5296. * assembler/MacroAssemblerX86Common.h:
  5297. (JSC::MacroAssemblerX86Common::branchDoubleNonZero):
  5298. (JSC::MacroAssemblerX86Common::branchDoubleZeroOrNaN):
  5299. * jit/JITOpcodes32_64.cpp:
  5300. (JSC::JIT::emit_op_jfalse):
  5301. (JSC::JIT::emit_op_jtrue):
  5302. 2011-01-06 Michael Saboff <msaboff@apple.com>
  5303. Reviewed by Gavin Barraclough.
  5304. Added debug code to compare the results of JIT regexp with
  5305. interpreted regexp and displays discrepencies. This debug code is
  5306. controlled by the ENABLE_YARR_JIT_DEBUG macro in wtf/Platform.h and
  5307. is only valid if ENABLE_YARR_JIT is enabled.
  5308. Fixed a discovered problem in RegExp::printTraceData, changing
  5309. m_pattern to the getter pattern().
  5310. Also deleted an extraneous semicolon.
  5311. Enhancement: Add Regexp Debug Compare between JIT and Interpreter
  5312. https://bugs.webkit.org/show_bug.cgi?id=51834
  5313. * runtime/RegExp.cpp:
  5314. (JSC::RegExp::compile):
  5315. (JSC::RegExp::match):
  5316. (JSC::RegExp::printTraceData):
  5317. * wtf/Platform.h:
  5318. 2011-01-06 Patrick Gansterer <paroga@webkit.org>
  5319. Reviewed by Eric Seidel.
  5320. [WINCE] Remove JSC::g_stackBase
  5321. https://bugs.webkit.org/show_bug.cgi?id=51779
  5322. * wtf/StackBounds.cpp:
  5323. 2011-01-06 Joone Hur <joone.hur@collabora.co.uk>
  5324. Reviewed by Eric Seidel.
  5325. WML Parser should treat line/column number in a consistent way
  5326. https://bugs.webkit.org/show_bug.cgi?id=51601
  5327. Add the equality operators to TextPosition class.
  5328. * wtf/text/TextPosition.h:
  5329. (WTF::TextPosition::operator==): Added.
  5330. (WTF::TextPosition::operator!=): Added.
  5331. (WTF::TextPosition::belowRangePosition): Use belowBase() instead of base().
  5332. (WTF::ZeroBasedNumber::operator==): Added.
  5333. (WTF::ZeroBasedNumber::operator!=): Added.
  5334. (WTF::OneBasedNumber::operator==): Added.
  5335. (WTF::OneBasedNumber::operator!=): Added.
  5336. 2011-01-06 Patrick Gansterer <paroga@webkit.org>
  5337. Reviewed by Gavin Barraclough.
  5338. [WINCE] Determine stack extent
  5339. https://bugs.webkit.org/show_bug.cgi?id=26276
  5340. Scan the stack for writeable pages and use the limits.
  5341. * wtf/StackBounds.cpp:
  5342. (WTF::detectGrowingDownward):
  5343. (WTF::isPageWritable):
  5344. (WTF::getLowerStackBound):
  5345. (WTF::getUpperStackBound):
  5346. (WTF::StackBounds::initialize):
  5347. 2011-01-05 Steve Falkenburg <sfalken@apple.com>
  5348. Windows build fix.
  5349. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Revert change to additional library search path needed to find ICU.
  5350. 2011-01-05 Steve Falkenburg <sfalken@apple.com>
  5351. Reviewed by Darin Adler.
  5352. Debug and Release builds on Windows clobber each other
  5353. https://bugs.webkit.org/show_bug.cgi?id=49185
  5354. Changes the structure of WebKitBuild build products directory so we
  5355. completely separate each build configuration into independent directories.
  5356. Although we previously had per-configuration directories for obj, this change adds
  5357. per-configuration directories for bin, lib, obj, and include. Each configuration's
  5358. build products are stored within a directory inside of WebKitBuild.
  5359. Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir),
  5360. defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName).
  5361. For PGO, $(ConfigurationBuildDir) points to the same directory (Release_PGO) to allow
  5362. for proper operation of the instrumentation/optimization scripts.
  5363. * JavaScriptCore.vcproj/JavaScriptCore.make:
  5364. * JavaScriptCore.vcproj/JavaScriptCore.sln:
  5365. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  5366. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  5367. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
  5368. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
  5369. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops:
  5370. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops: Added.
  5371. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
  5372. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
  5373. * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
  5374. * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
  5375. * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
  5376. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  5377. * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
  5378. * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
  5379. * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
  5380. * JavaScriptCore.vcproj/jsc/jsc.vcproj:
  5381. * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
  5382. * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
  5383. * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
  5384. * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
  5385. * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
  5386. * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
  5387. 2011-01-05 Brent Fulgham <bfulgham@webkit.org>
  5388. Unreviewed build fix.
  5389. * wtf/Encoder.h: Add <stdint.h> include for systems that
  5390. do not natively know about uint8_t, etc.
  5391. 2011-01-05 Patrick Gansterer <paroga@webkit.org>
  5392. Reviewed by Andreas Kling.
  5393. [CMake] Fix the usage of SOURCE_GROUP
  5394. https://bugs.webkit.org/show_bug.cgi?id=51739
  5395. * CMakeLists.txt:
  5396. 2011-01-05 Andras Becsi <abecsi@webkit.org>
  5397. Reviewed by Csaba Osztrogonác.
  5398. [Qt][V8] Fix the build after recent changes.
  5399. * pcre/pcre.pri: Correct the path after Source was introduced.
  5400. 2011-01-04 Steve Falkenburg <sfalken@apple.com>
  5401. Build fix. Update path to FindSafari after source code reorganization.
  5402. * JavaScriptCore.vcproj/JavaScriptCore.sln:
  5403. 2011-01-04 Daniel Bates <dbates@rim.com>
  5404. Fix the Android build after changeset 74975 <http://trac.webkit.org/changeset/74975>
  5405. (https://bugs.webkit.org/show_bug.cgi?id=51855).
  5406. * wtf/ThreadingPthreads.cpp: Add include of PassOwnPtr.h.
  5407. (WTF::runThreadWithRegistration): Use -> instead of . to dereference pointer.
  5408. 2011-01-04 Martin Robinson <mrobinson@igalia.com>
  5409. Try to fix the EFL build.
  5410. * wtf/CMakeLists.txt: Remove PlatformRefPtr from the CMake source list.
  5411. 2011-01-04 James Robinson <jamesr@chromium.org>
  5412. Reviewed by Darin Adler.
  5413. StackBounds initialization in WTFThreadData should be guarded by #if USE(JSC)
  5414. https://bugs.webkit.org/show_bug.cgi?id=51881
  5415. The StackBounds class is only used by JavaScriptCore.
  5416. * wtf/WTFThreadData.cpp:
  5417. (WTF::WTFThreadData::WTFThreadData):
  5418. * wtf/WTFThreadData.h:
  5419. (WTF::WTFThreadData::resetCurrentIdentifierTable):
  5420. 2011-01-03 Martin Robinson <mrobinson@igalia.com>
  5421. Reviewed by Darin Adler.
  5422. Remove the last non-GObject usage of PlatformRefPtr and move the code to GRefPtr
  5423. https://bugs.webkit.org/show_bug.cgi?id=51846
  5424. * GNUmakefile.am: Remove PlatformRefPtr.h from the sources list.
  5425. * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
  5426. * jit/ExecutableAllocator.h: Change references to PlatformRefPtr to RefPtr.
  5427. (JSC::ExecutableAllocator::cacheFlush): Ditto.
  5428. * wtf/PlatformRefPtr.h: Removed.
  5429. * wtf/RandomNumber.cpp: Change references to PlatformRefPtr to RefPtr.
  5430. (WTF::randomNumber): Ditto.
  5431. * wtf/brew/RefPtrBrew.h: Ditto.
  5432. (WTF::refIfNotNull): Added.
  5433. (WTF::derefIfNotNull): Added.
  5434. * wtf/brew/ShellBrew.h: Change references to PlatformRefPtr to RefPtr.
  5435. (WTF::createRefPtrInstance): Modified to return a RefPtr.
  5436. * wtf/gobject/GRefPtr.cpp:
  5437. (WTF::refGPtr): Moved from PlatformRefPtr here.
  5438. (WTF::derefGPtr): Ditto.
  5439. * wtf/gobject/GRefPtr.h: Ditto.
  5440. (WTF::GRefPtr::GRefPtr): Ditto.
  5441. (WTF::GRefPtr::~GRefPtr): Ditto.
  5442. (WTF::GRefPtr::clear): Ditto.
  5443. (WTF::GRefPtr::isHashTableDeletedValue): Ditto.
  5444. (WTF::GRefPtr::get): Ditto.
  5445. (WTF::GRefPtr::operator*): Ditto.
  5446. (WTF::GRefPtr::operator->): Ditto.
  5447. (WTF::GRefPtr::operator!): Ditto.
  5448. (WTF::GRefPtr::operator UnspecifiedBoolType): Ditto.
  5449. (WTF::GRefPtr::hashTableDeletedValue): Ditto.
  5450. (WTF::::operator): Ditto.
  5451. (WTF::::swap): Ditto.
  5452. (WTF::swap): Ditto.
  5453. (WTF::operator==): Ditto.
  5454. (WTF::operator!=): Ditto.
  5455. (WTF::static_pointer_cast): Ditto.
  5456. (WTF::const_pointer_cast): Ditto.
  5457. (WTF::getPtr): Ditto.
  5458. (WTF::adoptGRef): Ditto.
  5459. (WTF::refGPtr): Ditto.
  5460. (WTF::derefGPtr): Ditto.
  5461. 2011-01-04 Daniel Bates <dbates@rim.com>
  5462. Reviewed by Adam Roben.
  5463. LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails
  5464. https://bugs.webkit.org/show_bug.cgi?id=51860
  5465. * wtf/ThreadingWin.cpp:
  5466. (WTF::createThreadInternal):
  5467. 2011-01-04 Laszlo Gombos <laszlo.1.gombos@nokia.com>
  5468. Reviewed by Ariya Hidayat.
  5469. [Qt][Symbian] Make sure that WebKit headers are included before platform headers on Symbian
  5470. https://bugs.webkit.org/show_bug.cgi?id=31273
  5471. On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
  5472. are included before platform headers. On all other platforms continue to use
  5473. INCLUDEPATH (as before). This is a continuation of r65877.
  5474. No new tests as there is no new functionality.
  5475. * JavaScriptCore.pri:
  5476. 2011-01-04 Darin Adler <darin@apple.com>
  5477. Try to fix Windows build.
  5478. * wtf/ThreadingWin.cpp: Added include of PassOwnPtr.h. Fixed paragraphing
  5479. of conditional includes.
  5480. (WTF::wtfThreadEntryPoint): Use -> instead of . to dereference pointer.
  5481. (WTF::createThreadInternal): Tweaked #if to not need separate macro.
  5482. 2011-01-04 Daniel Bates <dbates@rim.com>
  5483. Reviewed by Adam Roben.
  5484. Extract ThreadFunctionInvocation into separate file and share between Apple Windows and Android
  5485. https://bugs.webkit.org/show_bug.cgi?id=51855
  5486. Both the Apple Windows and Android ports implement a similar adapter structure,
  5487. called ThreadFunctionInvocation and ThreadData respectively, as part of
  5488. their thread creation process. Instead, we should share such an adapter
  5489. structure and remove duplicate code.
  5490. * JavaScriptCore.gypi: Added header wtf/ThreadFunctionInvocation.h.
  5491. * wtf/ThreadFunctionInvocation.h: Added.
  5492. (WTF::ThreadFunctionInvocation::ThreadFunctionInvocation):
  5493. * wtf/ThreadingPthreads.cpp: Removed Android-specific structure ThreadData; Instead, use ThreadFunctionInvocation.
  5494. (WTF::runThreadWithRegistration):
  5495. (WTF::createThreadInternal):
  5496. * wtf/ThreadingWin.cpp: Moved structure ThreadFunctionInvocation to its own file so that
  5497. it can be shared with the Android implementation of createThreadInternal().
  5498. (WTF::wtfThreadEntryPoint): Use OwnPtr to hold passed instance of ThreadFunctionInvocation.
  5499. 2011-01-04 Daniel Bates <dbates@rim.com>
  5500. Reviewed by Darin Adler.
  5501. Use __builtin_expect when compiling using RVCT in GNU mode
  5502. https://bugs.webkit.org/show_bug.cgi?id=51866
  5503. Derived from a patch by Dave Tapuska.
  5504. * wtf/AlwaysInline.h:
  5505. 2011-01-03 Darin Adler <darin@apple.com>
  5506. Reviewed by Brady Eidson.
  5507. * wtf/Forward.h: Added Decoder and Encoder.
  5508. 2011-01-03 Brady Eidson <beidson@apple.com>
  5509. Reviewed by Darin Adler.
  5510. Add Encode/Decode machinery Darin and I plan to work with for back/forward stuff in WebKit2.
  5511. Starting out with a pure virtual interface to be implemented in WK2, but we might change that later.
  5512. * GNUmakefile.am:
  5513. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  5514. * JavaScriptCore.xcodeproj/project.pbxproj:
  5515. * wtf/CMakeLists.txt:
  5516. * wtf/Decoder.h: Added.
  5517. * wtf/Encoder.h: Added.
  5518. 2011-01-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
  5519. Unreviewed build fix.
  5520. [Qt] Add NullPtr.cpp introduced in r71155 to the Qt build system.
  5521. This fix is required for builds where HAVE(NULLPTR) is false
  5522. (e.g. some MSVC and Symbian builds).
  5523. * wtf/wtf.pri:
  5524. 2011-01-02 Dan Bernstein <mitz@apple.com>
  5525. Rubber-stamped by Simon Fraser.
  5526. <rdar://problem/8812159> Update copyright strings
  5527. * Info.plist:
  5528. 2011-01-02 Csaba Osztrogonác <ossy@webkit.org>
  5529. Fix GTK+ build after r74855.
  5530. Reviewed by Xan Lopez.
  5531. * GNUmakefile.am: Fix include pathes.
  5532. 2011-01-02 Adam Barth <abarth@webkit.org>
  5533. One more .. missing in the Qt build.
  5534. * jsc.pro:
  5535. 2011-01-02 Xan Lopez <xlopez@igalia.com>
  5536. Fix GTK+ build.
  5537. * GNUmakefile.am: add -I$(srcdir)/Source to the JSC cppflags so
  5538. that anyone can include its headers without adding the prefix
  5539. 'Source/'.
  5540. 2011-01-02 Carl Lobo <carllobo@gmail.com>
  5541. Reviewed by Adam Barth.
  5542. Fix Windows Build for non-production where VSPropsRedirectionDir is not defined.
  5543. https://bugs.webkit.org/show_bug.cgi?id=51797
  5544. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  5545. * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
  5546. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  5547. * JavaScriptCore.vcproj/jsc/jsc.vcproj:
  5548. * JavaScriptCore.vcproj/testapi/testapi.vcproj:
  5549. 2011-01-01 Adam Barth <abarth@webkit.org>
  5550. Fix relative include paths in an attempt to fix the Qt build.
  5551. * JavaScriptCore.pri:
  5552. * JavaScriptCore.pro:
  5553. 2011-01-01 Adam Barth <abarth@webkit.org>
  5554. Another speculative build fix for GTK.
  5555. * GNUmakefile.am:
  5556. 2011-01-01 Adam Barth <abarth@webkit.org>
  5557. Speculative build fix for GTK. Update the paths in GNUmakefile to
  5558. include "Source".
  5559. * GNUmakefile.am:
  5560. 2011-01-01 Adam Barth <abarth@webkit.org>
  5561. Update relative paths in JavaScriptCore.gyp to account for the extra
  5562. level of directories.
  5563. * JavaScriptCore.gyp/JavaScriptCore.gyp:
  5564. 2010-12-31 Patrick Gansterer <paroga@webkit.org>
  5565. Reviewed by Darin Adler.
  5566. Add a fast case for ASCII strings in HashAndUTF8CharactersTranslator::equal
  5567. https://bugs.webkit.org/show_bug.cgi?id=50517
  5568. This change shows about 2% performance win on the xml-parser benchmark.
  5569. * wtf/text/AtomicString.cpp:
  5570. (WTF::HashAndUTF8CharactersTranslator::equal):
  5571. 2010-12-30 Patrick Gansterer <paroga@webkit.org>
  5572. Reviewed by Ariya Hidayat.
  5573. [CMake] Add WTF_HEADERS
  5574. https://bugs.webkit.org/show_bug.cgi?id=51741
  5575. Add the WTF headers to show them in Visual Studio.
  5576. * wtf/CMakeLists.txt:
  5577. * wtf/CMakeListsWinCE.txt:
  5578. 2010-12-30 Konstantin Tokarev <annulen@yandex.ru>
  5579. Reviewed by David Kilzer.
  5580. [Qt] Don't build wtf/TCSystemAlloc.cpp if --system-malloc option is
  5581. used
  5582. https://bugs.webkit.org/show_bug.cgi?id=51672
  5583. * wtf/wtf.pri: Replaced USE_SYSTEM_MALLOC with USE_SYSTEM_MALLOC=1
  5584. 2010-12-30 Patrick Gansterer <paroga@webkit.org>
  5585. Reviewed by Darin Adler.
  5586. Use OS(WINDOWS) instead of COMPILER(MSVC) in FastMalloc.cpp
  5587. https://bugs.webkit.org/show_bug.cgi?id=51743
  5588. Most of the ifdefs belong to windows and not to the MSVC compiler.
  5589. * wtf/FastMalloc.cpp:
  5590. 2010-12-29 Gavin Barraclough <barraclough@apple.com>
  5591. Reviewed by Sam Weinig.
  5592. Bug 51724 - In strict mode string literals should allow \0, but disallow \8 and \9.
  5593. * parser/Lexer.cpp:
  5594. (JSC::Lexer::parseString):
  5595. 2010-12-29 Helder Correia <helder@sencha.com>
  5596. Reviewed by Eric Seidel.
  5597. <VT> and <FF> are not valid JSON whitespace characters
  5598. https://bugs.webkit.org/show_bug.cgi?id=51671
  5599. Vertical Tab and Form Feed are not allowed white spaces by the JSON
  5600. RFC 4627: http://www.ietf.org/rfc/rfc4627.txt (2. JSON Grammar).
  5601. Tests: ietestcenter/Javascript/15.12.1.1-0-2.html
  5602. ietestcenter/Javascript/15.12.1.1-0-3.html
  5603. * runtime/LiteralParser.cpp:
  5604. (JSC::isJSONWhiteSpace):
  5605. (JSC::LiteralParser::Lexer::lex):
  5606. 2010-12-28 Helder Correia <helder@sencha.com>
  5607. Reviewed by Eric Seidel.
  5608. JSON.stringify must exist as a function taking 3 parameters
  5609. https://bugs.webkit.org/show_bug.cgi?id=51667
  5610. The reported function length is 1 instead.
  5611. Test: ietestcenter/Javascript/15.12.3-0-2.html
  5612. * runtime/JSONObject.cpp:
  5613. 2010-12-28 Helder Correia <helder@sencha.com>
  5614. Reviewed by Sam Weinig.
  5615. JSON.parse must exist as a function taking 2 parameters
  5616. https://bugs.webkit.org/show_bug.cgi?id=51666
  5617. Support for revivers was introduced in bug 26591, but the function
  5618. length has since remained unchanged.
  5619. Test: ietestcenter/Javascript/15.12.2-0-2.html
  5620. * runtime/JSONObject.cpp:
  5621. 2010-12-27 Jake Helfert <jake@jakeonthenet.com>
  5622. Reviewed and reworked by Darin Adler.
  5623. Building WebKit with Visual Studio 2010 fails due
  5624. to ambiguous assignment operator errors.
  5625. https://bugs.webkit.org/show_bug.cgi?id=51116
  5626. * wtf/NullPtr.h: Added a HAVE(NULLPTR) definition for use with
  5627. Platform.h HAVE macro, and included the Visual Studio 2010 compiler
  5628. as one of the ones that has nullptr.
  5629. * wtf/NullPtr.cpp: Updated condition to match.
  5630. * wtf/PassOwnArrayPtr.h: Don't include the operator=(nullptr_t)
  5631. overload if we are compiling in loose mode and the compiler has
  5632. nullptr, because assignment of 0 will otherwise encounter
  5633. ambiguitity with this overload and the overload for loose mode
  5634. that takes a raw pointer. The conditional can be removed when we
  5635. get rid of loose mode.
  5636. * wtf/PassOwnPtr.h: Ditto.
  5637. * wtf/PassRefPtr.h: Don't include the operator=(nullptr_t) overload
  5638. if the compiler has nullptr, because assignment of 0 would be
  5639. ambiguous with the overload that takes a raw pointer. The conditional
  5640. can be removed if we ever decide we no longer need to support
  5641. assigning 0, but might need a way to catch that usage on older compilers.
  5642. * wtf/RefPtr.h: Ditto.
  5643. * wtf/RetainPtr.h: Ditto
  5644. * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp,
  5645. accidentally omitted when the file was first added.
  5646. 2010-12-26 Xan Lopez <xlopez@igalia.com>
  5647. Reviewed by Eric Seidel.
  5648. [GTK] Add standalone target for JSC
  5649. https://bugs.webkit.org/show_bug.cgi?id=51607
  5650. * GNUmakefile.am: add convenience target to only build jsc and its
  5651. dependencies.
  5652. 2010-12-24 Patrick Gansterer <paroga@webkit.org>
  5653. Reviewed by Eric Seidel.
  5654. [WINCE] Add CPU(MIPS) detection
  5655. https://bugs.webkit.org/show_bug.cgi?id=51342
  5656. WinCE usually defines MIPS and _MIPS_.
  5657. * wtf/Platform.h:
  5658. 2010-12-23 Gavin Barraclough <barraclough@apple.com>
  5659. Reviewed by Sam Weinig.
  5660. Rename RegexCompiler.cpp to RegexPattern.cpp.
  5661. Implicitly call compileRegex from RegexPattern's constructor.
  5662. * Android.mk:
  5663. * CMakeLists.txt:
  5664. * GNUmakefile.am:
  5665. * JavaScriptCore.gypi:
  5666. * JavaScriptCore.pro:
  5667. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  5668. * JavaScriptCore.xcodeproj/project.pbxproj:
  5669. * runtime/RegExp.cpp:
  5670. (JSC::RegExp::compile):
  5671. * yarr/RegexCompiler.cpp: Removed.
  5672. * yarr/RegexCompiler.h: Removed.
  5673. * yarr/RegexInterpreter.cpp:
  5674. * yarr/RegexJIT.cpp:
  5675. * yarr/RegexPattern.cpp: Copied from JavaScriptCore/yarr/RegexCompiler.cpp.
  5676. (JSC::Yarr::compileRegex):
  5677. (JSC::Yarr::RegexPattern::RegexPattern):
  5678. * yarr/RegexPattern.h:
  5679. 2010-12-23 Patrick Gansterer <paroga@webkit.org>
  5680. Unreviewed build fix for WinCE after r74360.
  5681. Move the OS(WINDOWS) section after the OS(WINCE) section
  5682. and add missing argument to the getStackMax call.
  5683. * wtf/StackBounds.cpp:
  5684. (WTF::StackBounds::initialize):
  5685. 2010-12-22 Laszlo Gombos <laszlo.1.gombos@nokia.com>
  5686. Unreviewed build fix.
  5687. [Symbian] Make sure OSAllocatorSymbian builds
  5688. This patch only addresses the build problem.
  5689. https://bugs.webkit.org/show_bug.cgi?id=51128 tracks the full
  5690. (re)implementation of the Symbian allocator.
  5691. * wtf/OSAllocatorSymbian.cpp:
  5692. (WTF::OSAllocator::reserveUncommitted):
  5693. (WTF::OSAllocator::reserveAndCommit):
  5694. (WTF::OSAllocator::commit):
  5695. 2010-12-22 Dan Bernstein <mitz@apple.com>
  5696. Changed WebKitTools to Tools.
  5697. * JavaScriptCore.vcproj/JavaScriptCore.sln:
  5698. 2010-12-22 Dan Bernstein <mitz@apple.com>
  5699. Rubber-stamped by Mark Rowe.
  5700. Changed WebKitTools to Tools in script build phases.
  5701. * JavaScriptCore.xcodeproj/project.pbxproj:
  5702. 2010-12-22 Andrei Popescu <andreip@google.com>
  5703. Unreviewed build fix.
  5704. Fix Chromium Linux shared library build.
  5705. [Chromium] r74431 broke the Chromium Linux shared library build
  5706. https://bugs.webkit.org/show_bug.cgi?id=51462
  5707. * JavaScriptCore.gyp/JavaScriptCore.gyp:
  5708. * JavaScriptCore.gypi:
  5709. 2010-12-21 Sheriff Bot <webkit.review.bot@gmail.com>
  5710. Unreviewed, rolling out r74462.
  5711. http://trac.webkit.org/changeset/74462
  5712. https://bugs.webkit.org/show_bug.cgi?id=51449
  5713. broke chromium win (Requested by tonyg-cr on #webkit).
  5714. * JavaScriptCore.gypi:
  5715. 2010-12-21 Tony Gentilcore <tonyg@chromium.org>
  5716. Unreviewed build fix.
  5717. [chromium] Build fix after r74431
  5718. https://bugs.webkit.org/show_bug.cgi?id=51447
  5719. * JavaScriptCore.gypi:
  5720. 2010-12-21 Gavin Barraclough <barraclough@apple.com>
  5721. Windows build fix.
  5722. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  5723. 2010-12-21 Gavin Barraclough <barraclough@apple.com>
  5724. Windows build fix.
  5725. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  5726. 2010-12-21 Gavin Barraclough <barraclough@apple.com>
  5727. Speculative build fix.
  5728. * jit/ExecutableAllocator.cpp:
  5729. (JSC::ExecutableAllocator::underMemoryPressure):
  5730. 2010-12-21 Gavin Barraclough <barraclough@apple.com>
  5731. Reviewed by Oliver Hunt.
  5732. Bug 26276 - Need a mechanism to determine stack extent
  5733. This patch adds accurate stack size calculation for:
  5734. DARWIN, QNX, UNIX
  5735. We still need to fix:
  5736. WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
  5737. * wtf/StackBounds.cpp:
  5738. (WTF::StackBounds::initialize):
  5739. 2010-12-21 Gavin Barraclough <barraclough@apple.com>
  5740. Reviewed by Geoff Garen.
  5741. <rdar://problem/8765333> CRASH running out of executable memory, loading io9.com
  5742. https://bugs.webkit.org/show_bug.cgi?id=51443
  5743. The problem here is that each page uses a reasonable amount of memory, (~4Mb),
  5744. and that when miultiple pages are open we keep all JIT code for all functions
  5745. in all pages alive.
  5746. Add a check to detect high memory pressure situations in the executable allocator
  5747. (>50% of available memory allocated), and upon a top level entry into JSC (no code
  5748. running on the stack) in this situation throw away all JIT code.
  5749. * JavaScriptCore.exp:
  5750. * debugger/Debugger.cpp:
  5751. (JSC::Debugger::recompileAllJSFunctions): stop passing exec to recompile.
  5752. * jit/ExecutableAllocator.h:
  5753. * jit/ExecutableAllocatorFixedVMPool.cpp:
  5754. (JSC::ExecutablePool::systemAlloc): Count allocations.
  5755. (JSC::ExecutablePool::systemRelease): Count deallocations.
  5756. (JSC::ExecutablePool::underMemoryPressure): Check memory pressure.
  5757. * jit/ExecutableAllocatorPosix.cpp:
  5758. (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
  5759. * jit/ExecutableAllocatorWin.cpp:
  5760. (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
  5761. * runtime/Executable.cpp:
  5762. (JSC::FunctionExecutable::recompile): Remove ExecState argument to recompile.
  5763. * runtime/Executable.h:
  5764. * runtime/JSGlobalData.cpp:
  5765. (JSC::JSGlobalData::recompileAllJSFunctions): throws away all JIT code.
  5766. * runtime/JSGlobalData.h:
  5767. * runtime/JSGlobalObject.h:
  5768. (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): add check / call to throw away.
  5769. 2010-12-21 Gavin Barraclough <barraclough@apple.com>
  5770. Reviewed by Geoff Garen.
  5771. <rdar://problem/8241425> JIT executable memory excessive usage due to regex caching
  5772. https://bugs.webkit.org/show_bug.cgi?id=51434
  5773. Reduce the amount of memory the RegExpCache can hold on to on iOS.
  5774. Currently the RegExpCache can hold 256 RegExp objects. If each falls into a separate
  5775. ExecutablePool, with a common size of 16Kb, this means we end up holding onto 4Mb of
  5776. memory. Firstly, we can reduce this by simply reducing the size of the cache to 32
  5777. entries. Secondly, we can use a separate set of ExecutablePools for JIT code generated
  5778. from RegExp objects. This helps in two ways (1) it increases the probability that
  5779. RegExps in the cache share the same pool, and (2) it means that a RegExp can't end
  5780. up holding on to a large ExecutablePool containing a translation of JS code.
  5781. (A RegExp could end up keeping a larger RegExp alive that happened to be sharing the
  5782. same pool, but large RegExp patterns are less common).
  5783. * runtime/JSGlobalData.h:
  5784. * runtime/RegExpCache.h:
  5785. * yarr/RegexJIT.cpp:
  5786. (JSC::Yarr::RegexGenerator::compile):
  5787. 2010-12-21 Gavin Barraclough <barraclough@apple.com>
  5788. Windows build fix.
  5789. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  5790. 2010-12-21 Gavin Barraclough <barraclough@apple.com>
  5791. Eeeep! build fix!
  5792. * wtf/OSAllocator.h:
  5793. (WTF::OSAllocator::decommitAndRelease):
  5794. 2010-12-21 Gavin Barraclough <barraclough@apple.com>
  5795. Ooops, fixed typo in comment.
  5796. * wtf/OSAllocator.h:
  5797. 2010-12-21 Geoffrey Garen <ggaren@apple.com>
  5798. Reviewed by Gavin Barraclough & Oliver Hunt.
  5799. Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
  5800. https://bugs.webkit.org/show_bug.cgi?id=51359
  5801. I think this patch fixes <rdar://problem/8107952> [5.0.1] WER crash in
  5802. Heap::allocateBlock (1902752929), and some other leaks and crashes as well.
  5803. * Android.mk:
  5804. * CMakeLists.txt:
  5805. * GNUmakefile.am:
  5806. * JavaScriptCore.gypi:
  5807. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  5808. * JavaScriptCore.xcodeproj/project.pbxproj: Updated build files.
  5809. * runtime/AlignedMemoryAllocator.h: Removed. Supplanted by
  5810. PageAllocationAligned.
  5811. * runtime/Collector.cpp:
  5812. (JSC::Heap::destroy):
  5813. (JSC::Heap::allocateBlock):
  5814. (JSC::Heap::freeBlock):
  5815. (JSC::Heap::addWeakGCHandle):
  5816. * runtime/Collector.h: Switched from AlignedMemoryAllocator to
  5817. PageAllocationAligned.
  5818. * runtime/GCHandle.cpp:
  5819. * runtime/GCHandle.h: Ditto.
  5820. * wtf/PageAllocation.h:
  5821. (WTF::PageAllocation::PageAllocation): Removed aligned memory allocation
  5822. functions. Supplanted by PageAllocationAligned.
  5823. * wtf/PageAllocationAligned.cpp: Added.
  5824. (WTF::PageAllocationAligned::allocate):
  5825. (WTF::PageAllocationAligned::deallocate):
  5826. * wtf/PageAllocationAligned.h: Added.
  5827. (WTF::PageAllocationAligned::PageAllocationAligned): New cross-platform
  5828. class for doing aligned memory allocation. This class properly matches
  5829. allocation and deallocation library calls, fixing a long-standing bug
  5830. in PageAllocation.
  5831. * wtf/Platform.h: Removed some defunction VM platform defines.
  5832. * wtf/wtf.pri: Updated build files.
  5833. 2010-12-21 Oliver Hunt <oliver@apple.com>
  5834. Reviewed by Gavin Barraclough.
  5835. ASSERTION FAILED: base->index() == m_codeBlock->argumentsRegister() while loading taobao.com
  5836. https://bugs.webkit.org/show_bug.cgi?id=49006
  5837. This problem was caused by having a parameter named 'arguments'.
  5838. The fix is to treat parameters named 'arguments' as shadowing
  5839. the actual arguments property, and so logically turn the function
  5840. into one that doesn't "use" arguments.
  5841. This required a bit of fiddling in the parser to ensure we correctly
  5842. propagate the 'feature' of shadowing is set correctly.
  5843. * bytecompiler/BytecodeGenerator.cpp:
  5844. (JSC::BytecodeGenerator::createArgumentsIfNecessary):
  5845. Change assertion to an early return as we may now reference
  5846. a property named 'arguments' without being in a function that
  5847. has the ArgumentsFeature
  5848. * parser/JSParser.cpp:
  5849. (JSC::JSParser::Scope::Scope):
  5850. (JSC::JSParser::Scope::declareParameter):
  5851. (JSC::JSParser::Scope::shadowsArguments):
  5852. (JSC::JSParser::parseProgram):
  5853. (JSC::JSParser::parseFormalParameters):
  5854. (JSC::JSParser::parseFunctionInfo):
  5855. * parser/Nodes.h:
  5856. (JSC::ScopeNode::usesArguments):
  5857. 2010-12-21 Daniel Bates <dbates@rim.com>
  5858. Reviewed by Eric Seidel and Darin Adler.
  5859. Deallocate GregorianDateTime.timeZone (if allocated) when copying so that we don't leak memory.
  5860. https://bugs.webkit.org/show_bug.cgi?id=51367
  5861. Inspired by a patch by George Staikos.
  5862. * wtf/DateMath.cpp:
  5863. (JSC::msToGregorianDateTime): Modified to set timeZone to nullptr since timeZone is now
  5864. of type OwnPtrArray<char>.
  5865. * wtf/DateMath.h: Change timeZone to type OwnArrayPtr<char>; Removed destructor since it is no longer needed.
  5866. (JSC::GregorianDateTime::GregorianDateTime): Modified to use OwnPtrArray semantics for timeZone.
  5867. (JSC::GregorianDateTime::operator tm): Ditto.
  5868. (JSC::GregorianDateTime::copyFrom): Ditto.
  5869. 2010-12-21 Sheriff Bot <webkit.review.bot@gmail.com>
  5870. Unreviewed, rolling out r74402.
  5871. http://trac.webkit.org/changeset/74402
  5872. https://bugs.webkit.org/show_bug.cgi?id=51402
  5873. This patch broke the Windows 7 Release Layout Tests (Requested
  5874. by jessieberlin on #webkit).
  5875. * wtf/StackBounds.cpp:
  5876. (WTF::estimateStackBound):
  5877. (WTF::StackBounds::initialize):
  5878. 2010-12-21 Peter Varga <pvarga@inf.u-szeged.hu>
  5879. Reviewed by Csaba Osztrogonác.
  5880. Unify the name of parentheses in YARR: rename parenthesis to
  5881. parentheses.
  5882. * yarr/RegexCompiler.cpp:
  5883. (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
  5884. 2010-12-21 Laszlo Gombos <laszlo.1.gombos@nokia.com>
  5885. Reviewed by Andreas Kling.
  5886. [Qt] Set BUILDING_QT__ consistently
  5887. https://bugs.webkit.org/show_bug.cgi?id=51341
  5888. * JavaScriptCore.pri: Remove the definition of BUILDING_QT__ as it
  5889. is already defined in WebKit.pri.
  5890. 2010-12-20 Gavin Barraclough <barraclough@apple.com>
  5891. Reviewed by Oliver Hunt.
  5892. Bug 26276 - Need a mechanism to determine stack extent
  5893. This patch adds accurate stack size calculation for:
  5894. DARWIN, WINDOWS, QNX, UNIX
  5895. We still need to fix:
  5896. SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
  5897. * wtf/StackBounds.cpp:
  5898. (WTF::StackBounds::initialize):
  5899. 2010-12-20 Gavin Barraclough <barraclough@apple.com>
  5900. PPC build fix; stop using std::swap on PageAllocation/PageReservation,
  5901. this was failing on some compilers since the lack of default construction
  5902. for the m_executable/m_writable fields meant the value being swapped may
  5903. not have been fully initialized.
  5904. * wtf/PageAllocation.h:
  5905. (WTF::PageAllocation::deallocate):
  5906. * wtf/PageBlock.h:
  5907. * wtf/PageReservation.h:
  5908. (WTF::PageReservation::deallocate):
  5909. 2010-12-20 Oliver Hunt <oliver@apple.com>
  5910. Reviewed by Geoffrey Garen.
  5911. |delete name| in strict mode code should be an early error
  5912. https://bugs.webkit.org/show_bug.cgi?id=50431
  5913. Disallow the |delete IDENTIFIER| production in strict mode, and removed
  5914. a bunch of now unnecessary code.
  5915. * parser/JSParser.cpp:
  5916. (JSC::JSParser::Scope::collectFreeVariables):
  5917. (JSC::jsParse):
  5918. (JSC::JSParser::parseProgram):
  5919. (JSC::JSParser::parseUnaryExpression):
  5920. * parser/JSParser.h:
  5921. * parser/Parser.cpp:
  5922. (JSC::Parser::parse):
  5923. * parser/Parser.h:
  5924. (JSC::Parser::parse):
  5925. 2010-12-20 Gavin Barraclough <barraclough@apple.com>
  5926. Reviewed by Olver Hunt.
  5927. Bug 51358 - Should check stack depth rather than using recursion limits in byte compilation
  5928. The current implementation of recursion limit checking is not safe on smaller stacks.
  5929. Switch to using a common mechanism, shared with the parser, to check recursion limits.
  5930. Make bytecompiler use StackBounds. Empirical testing shows emitStrcat to have the largest
  5931. footprint on the stack, at just under 1k on x86-64. Given this, the default recursion
  5932. check (requiring 4k of available space to recurse) seems reasonable.
  5933. * bytecompiler/BytecodeGenerator.cpp:
  5934. (JSC::BytecodeGenerator::BytecodeGenerator):
  5935. * bytecompiler/BytecodeGenerator.h:
  5936. (JSC::BytecodeGenerator::emitNode):
  5937. (JSC::BytecodeGenerator::emitNodeInConditionContext):
  5938. * bytecompiler/NodesCodegen.cpp:
  5939. (JSC::BinaryOpNode::emitStrcat):
  5940. 2010-12-20 Tony Gentilcore <tonyg@chromium.org>
  5941. Unreviewed build fix.
  5942. Include pthread to fix chromium mac build (broken by r74360)
  5943. https://bugs.webkit.org/show_bug.cgi?id=51356
  5944. * wtf/StackBounds.cpp:
  5945. 2010-12-20 Xan Lopez <xlopez@igalia.com>
  5946. Reviewed by Gustavo Noronha.
  5947. * GNUmakefile.am: add missing files.
  5948. 2010-12-18 Gavin Barraclough <barraclough@apple.com>
  5949. Reviewed by Oliver Hunt.
  5950. Bug 26276 - Need a mechanism to determine stack extent
  5951. This patch adds a class 'StackBounds', to hold information about the machine stack.
  5952. The implementation of this class broadly adheres to the current implmentation of
  5953. stack limit checking, and as such does not solve the problem of determining stack
  5954. extent, but gives us a common place to do so.
  5955. Currently two mechanism are provided to determine the stack origin (the point the
  5956. stack is growing away from). currentThreadStackBase() in Collector provides a
  5957. more accurate determination of the stack origin, so use this to calculate
  5958. StackBounds::m_origin; WTFThreadData::approximatedStackStart is less accurate, and
  5959. as such can be removed. Cache the StackBounds on WTFThreadData such that they
  5960. need only be determined once per thread, and for non-API contexts cache this
  5961. information in JSGlobalData, to save a thread-specific access.
  5962. For the time being retain the estimate of stack size used by JSC's parser
  5963. (128 * sizeof(void*) * 1024), with a view to replacing this with something more
  5964. accurate in the near future.
  5965. * parser/JSParser.cpp:
  5966. (JSC::JSParser::canRecurse):
  5967. (JSC::JSParser::JSParser):
  5968. Change to use StackBounds.
  5969. * runtime/Collector.cpp:
  5970. (JSC::Heap::registerThread):
  5971. (JSC::Heap::markCurrentThreadConservativelyInternal):
  5972. Change to use StackBounds, cached on JSGlobalData.
  5973. * runtime/JSGlobalData.cpp:
  5974. (JSC::JSGlobalData::JSGlobalData):
  5975. * runtime/JSGlobalData.h:
  5976. (JSC::JSGlobalData::stack):
  5977. Add a cached copy of StackBounds.
  5978. * wtf/StackBounds.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
  5979. (WTF::estimateStackBound):
  5980. (WTF::StackBounds::initialize):
  5981. (WTF::getStackMax):
  5982. Copy code from Collector.cpp to determine stack origin.
  5983. * wtf/StackBounds.h: Added.
  5984. (WTF::StackBounds::StackBounds):
  5985. No argument constructor; returns a null StackBounds.
  5986. (WTF::StackBounds::currentThreadStackBounds):
  5987. Returns a StackBounds object representing the stack limits
  5988. of the current thread.
  5989. (WTF::StackBounds::origin):
  5990. Returns to stack origin (the point the stack is growing away
  5991. from; the highest extent of the stack on machines where the
  5992. stack grows downwards.
  5993. (WTF::StackBounds::recursionLimit):
  5994. Returns a limit value that is 'a comfortable distance from
  5995. the end of the stack'. Our concept of this is currently 1 page
  5996. away from the end, however the default value may be tuned in
  5997. the future, and clients may override passing a larger delta;
  5998. should only be called on StackBounds object representing the
  5999. stack of the thread this method is called on (checked by
  6000. checkConsistency).
  6001. (WTF::StackBounds::recursionCheck):
  6002. Checks whether we are currently 'a comfortable distance from
  6003. the end of the stack'. Our concept of this is currently 1 page
  6004. away from the end, however the default value may be tuned in
  6005. the future, and clients may override passing a larger delta
  6006. to apply when checking, if they wish to do so. This method
  6007. should only be called on StackBounds object representing the
  6008. stack of the thread this method is called on (checked by
  6009. checkConsistency).
  6010. (WTF::StackBounds::current):
  6011. Approximate current stack position. On machines where the stack
  6012. is growing downwards this is the lowest address that might need
  6013. conservative collection.
  6014. (WTF::StackBounds::isGrowingDownward):
  6015. True for all platforms other than WINCE, which has to check.
  6016. (WTF::StackBounds::checkConsistency):
  6017. This is called in methods that shoulds only be operating on a
  6018. valid set of bounds; as such we expect m_origin != m_bounds
  6019. (i.e. stack size != zero) - we're really testing that this
  6020. object is not null (the constructor initializes both fields
  6021. to zero). Also checks that current() is within the stack's
  6022. bounds.
  6023. * wtf/WTFThreadData.cpp:
  6024. (WTF::WTFThreadData::WTFThreadData):
  6025. * wtf/WTFThreadData.h:
  6026. (WTF::WTFThreadData::stack):
  6027. Add the StackBounds member variable.
  6028. 2010-12-17 Geoffrey Garen <ggaren@apple.com>
  6029. Reviewed by Sam Weinig.
  6030. Factored common page set management into a new PageBlock base class
  6031. https://bugs.webkit.org/show_bug.cgi?id=51285
  6032. * Android.mk:
  6033. * CMakeLists.txt:
  6034. * GNUmakefile.am:
  6035. * JavaScriptCore.gypi:
  6036. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  6037. * JavaScriptCore.xcodeproj/project.pbxproj:
  6038. * interpreter/RegisterFile.h:
  6039. (JSC::RegisterFile::RegisterFile):
  6040. * jit/ExecutableAllocator.cpp:
  6041. (JSC::ExecutableAllocator::intializePageSize):
  6042. * wtf/PageAllocation.cpp: Removed.
  6043. * wtf/PageAllocation.h:
  6044. (WTF::PageAllocation::deallocate):
  6045. (WTF::PageAllocation::PageAllocation):
  6046. * wtf/PageReservation.h:
  6047. (WTF::PageReservation::commit):
  6048. (WTF::PageReservation::decommit):
  6049. (WTF::PageReservation::deallocate):
  6050. (WTF::PageReservation::PageReservation):
  6051. * wtf/wtf.pri:
  6052. 2010-12-17 Michael Saboff <msaboff@apple.com>
  6053. Reviewed by Oliver Hunt.
  6054. RegExp Jit'ed expression crashes clicking link on yelp.com
  6055. https://bugs.webkit.org/show_bug.cgi?id=51284
  6056. When transitioning between an non-repeating beginning of line
  6057. anchored expression and the remaining refactored repeating
  6058. expression, we should not clear any residual datalabel in
  6059. state's m_backtrack. It will be resolved and cleared in subsequent
  6060. code when linkAlternativeBacktracks() is called for the repeating
  6061. alternative(s).
  6062. * yarr/RegexJIT.cpp:
  6063. (JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
  6064. (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
  6065. 2010-12-17 Dan Bernstein <mitz@apple.com>
  6066. Rubber-stamped by Mark Rowe.
  6067. Updated for the renaming of WebKitTools to Tools
  6068. * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
  6069. 2010-12-17 Ariya Hidayat <ariya@sencha.com>
  6070. Reviewed by Oliver Hunt.
  6071. [JSC] parseAssignmentExpression should use TreeBuilder::CreatesAST
  6072. https://bugs.webkit.org/show_bug.cgi?id=51268
  6073. * parser/JSParser.cpp:
  6074. (JSC::JSParser::parseAssignmentExpression):
  6075. 2010-12-17 Geoffrey Garen <ggaren@apple.com>
  6076. Reviewed by Oliver Hunt.
  6077. Removed RChunk from PageAllocation/PageReservation, since it's now unused.
  6078. https://bugs.webkit.org/show_bug.cgi?id=51276
  6079. * wtf/PageAllocation.h:
  6080. (WTF::PageAllocation::PageAllocation):
  6081. * wtf/PageReservation.h:
  6082. (WTF::PageReservation::PageReservation):
  6083. 2010-12-17 Oliver Hunt <oliver@apple.com>
  6084. Reviewed by Gavin Barraclough.
  6085. Incorrect encoding of some constants in ARMv7 JIT
  6086. https://bugs.webkit.org/show_bug.cgi?id=51273
  6087. <rdar://problem/8650210>
  6088. When using immediate encoding 3 we need to write the byte
  6089. that holds a duplicated value.
  6090. * assembler/ARMv7Assembler.h:
  6091. (JSC::ARMThumbImmediate::makeEncodedImm):
  6092. 2010-12-16 Evan Martin <evan@chromium.org>
  6093. Reviewed by Darin Fisher.
  6094. [chromium] useless warnings when building on Windows
  6095. https://bugs.webkit.org/show_bug.cgi?id=50985
  6096. Disable some compiler warnings that aren't indicative of real problems.
  6097. * JavaScriptCore.gyp/JavaScriptCore.gyp:
  6098. 2010-12-16 Pratik Solanki <psolanki@apple.com>
  6099. Reviewed by Geoffrey Garen.
  6100. https://bugs.webkit.org/show_bug.cgi?id=51166
  6101. ExecutableAllocator::cacheFlush should call sys_cache_control
  6102. * jit/ExecutableAllocator.h:
  6103. (JSC::ExecutableAllocator::cacheFlush): Use the more correct and forward looking API -
  6104. sys_cache_control(kCacheFunctionPrepareForExecution,...).
  6105. 2010-12-16 Ariya Hidayat <ariya@sencha.com>
  6106. Reviewed by Andreas Kling.
  6107. [JSC] Const correctness in ASTBuilder and SyntaxChecker
  6108. https://bugs.webkit.org/show_bug.cgi?id=51141
  6109. * parser/ASTBuilder.h:
  6110. (JSC::ASTBuilder::getName):
  6111. (JSC::ASTBuilder::getType):
  6112. (JSC::ASTBuilder::isResolve):
  6113. * parser/SyntaxChecker.h:
  6114. (JSC::SyntaxChecker::operatorStackPop):
  6115. 2010-12-15 Kenneth Russell <kbr@google.com>
  6116. Reviewed by James Robinson.
  6117. Web Audio API: port FFTFrame to MKL
  6118. https://bugs.webkit.org/show_bug.cgi?id=50986
  6119. Fixed bug in log2 emulation function provided for Windows port of
  6120. Web Audio API.
  6121. * wtf/MathExtras.h:
  6122. (log2):
  6123. 2010-12-14 Mark Rowe <mrowe@apple.com>
  6124. Reviewed by Sam Weinig.
  6125. <http://webkit.org/b/51064> Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading <video>
  6126. * wtf/text/WTFString.h: Prevent String from being implicitly convertable to bool.
  6127. It was previously implicitly convertible to bool on Mac via operator NSString*,
  6128. but since that always has a non-zero return value it would give unexpected results.
  6129. 2010-12-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
  6130. Reviewed by Eric Seidel.
  6131. [Qt] [Symbian] Do not use pkg-config on Symbian as it is not supported
  6132. https://bugs.webkit.org/show_bug.cgi?id=50231
  6133. Guard CONFIG+=link_pkgconfig with !symbian.
  6134. * jsc.pro:
  6135. 2010-12-14 Cameron Zwarich <zwarich@apple.com>
  6136. Not reviewed.
  6137. Revert accidental change disabling the JIT for most platforms.
  6138. * wtf/Platform.h:
  6139. 2010-12-13 Cameron Zwarich <zwarich@apple.com>
  6140. Reviewed by Eric Seidel.
  6141. Clang fails to build the JSC interpreter
  6142. https://bugs.webkit.org/show_bug.cgi?id=51016
  6143. Clang does not allow indirect gotos out of scopes with cleanup. GCC 4.2 allows
  6144. them, but it does not correctly generate the cleanup, causing a leak if the
  6145. cleanup decrements a reference count.
  6146. * interpreter/Interpreter.cpp:
  6147. (JSC::Interpreter::privateExecute): Put an Identifier into its own scope.
  6148. 2010-12-14 Carlos Garcia Campos <cgarcia@igalia.com>
  6149. Reviewed by Martin Robinson.
  6150. [GTK] Simplify context-menu handling code
  6151. https://bugs.webkit.org/show_bug.cgi?id=49658
  6152. * wtf/PlatformRefPtr.h: Add leakRef()
  6153. 2010-12-13 Cameron Zwarich <zwarich@apple.com>
  6154. Reviewed by Gavin Barraclough.
  6155. JavaScriptCore should not use "asm volatile" outside of a function
  6156. https://bugs.webkit.org/show_bug.cgi?id=50991
  6157. * jit/JITStubs.cpp: Remove the volatile keyword from asm statements.
  6158. 2010-12-13 Steve Falkenburg <sfalken@apple.com>
  6159. Windows production build fix.
  6160. Try copying ICU 4.6 in addition to 4.4 and 4.2.
  6161. * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
  6162. 2010-12-13 Michael Saboff <msaboff@apple.com>
  6163. Reviewed by Oliver Hunt.
  6164. REGRESSION: mobileme mail viewing is broken
  6165. https://bugs.webkit.org/show_bug.cgi?id=50884
  6166. Fixed problem where simple parenthesis (those without capture and
  6167. with a fixed count) where not propagating backtrack to labels for
  6168. nested parentheses. Also added the nesting level for the parentheses
  6169. state created in that case as well.
  6170. * yarr/RegexJIT.cpp:
  6171. (JSC::Yarr::RegexGenerator::BacktrackDestination::copyBacktrackToLabel):
  6172. (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
  6173. (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
  6174. (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
  6175. 2010-12-13 Peter Varga <pvarga@inf.u-szeged.hu>
  6176. Reviewed by Gavin Barraclough.
  6177. Reduce the size of the RegexStackSpaceForBackTrackInfoParentheses in YARR
  6178. https://bugs.webkit.org/show_bug.cgi?id=49385
  6179. Remove the BackTrackInfoParentheses struct prevBegin and prevEnd members.
  6180. * yarr/RegexInterpreter.cpp:
  6181. (JSC::Yarr::Interpreter::matchParentheses):
  6182. (JSC::Yarr::Interpreter::backtrackParentheses):
  6183. * yarr/RegexPattern.h:
  6184. 2010-12-10 Michael Saboff <msaboff@apple.com>
  6185. Reviewed by Gavin Barraclough.
  6186. REGRESSION Hang inside Yarr::RegexCodeBlock::execute when visiting
  6187. bugs.webkit.org
  6188. https://bugs.webkit.org/show_bug.cgi?id=50816
  6189. First nested parentheses of the second or greater alternative
  6190. where backtracking to the prior parentheses. Changed the default
  6191. handling of initial parentheses for all alternatives to go back
  6192. to the immediate outer paren.
  6193. * yarr/RegexJIT.cpp:
  6194. (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
  6195. (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
  6196. (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
  6197. (JSC::Yarr::RegexGenerator::TermGenerationState::getTermIndex):
  6198. (JSC::Yarr::RegexGenerator::TermGenerationState::setParenthesesTail):
  6199. (JSC::Yarr::RegexGenerator::TermGenerationState::getParenthesesTail):
  6200. (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
  6201. (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
  6202. (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
  6203. (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
  6204. 2010-12-11 Patrick Gansterer <paroga@webkit.org>
  6205. Reviewed by Darin Adler.
  6206. Add an overload to makeString for Vector<char>
  6207. https://bugs.webkit.org/show_bug.cgi?id=50123
  6208. Also cleanup StringTypeAdapter.
  6209. * wtf/text/StringConcatenate.h:
  6210. 2010-12-10 Siddharth Mathur <siddharth.mathur@nokia.com>
  6211. Reviewed by Eric Seidel.
  6212. [Qt] Build fix for Symbian: don't compile POSIX memory management implementation
  6213. https://bugs.webkit.org/show_bug.cgi?id=50707
  6214. * wtf/wtf.pri:
  6215. 2010-12-10 Steve Falkenburg <sfalken@apple.com>
  6216. Windows production build fix.
  6217. Don't stop if react-to-vsprops-changes.py exits with an error,
  6218. since this will occur in production builds.
  6219. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
  6220. 2010-12-10 Brian Weinstein <bweinstein@apple.com>
  6221. Reviewed by Adam Roben.
  6222. Turn on USE(CROSS_PLATFORM_CONTEXT_MENUS) for Windows.
  6223. * wtf/Platform.h:
  6224. 2010-12-10 Martin Robinson <mrobinson@igalia.com>
  6225. Unreviewed, rolling out r73703.
  6226. http://trac.webkit.org/changeset/73703
  6227. https://bugs.webkit.org/show_bug.cgi?id=49658
  6228. This patch is causing crashes on the GTK+ bots.
  6229. * wtf/PlatformRefPtr.h:
  6230. 2010-12-10 Patrick Gansterer <paroga@webkit.org>
  6231. Reviewed by Eric Seidel.
  6232. Cleanup StringWx.cpp
  6233. https://bugs.webkit.org/show_bug.cgi?id=50525
  6234. Use StringImpl::createUninitialized to avoid memcpy and fix style issues.
  6235. * wtf/wx/StringWx.cpp:
  6236. (WTF::String::String):
  6237. 2010-12-10 Carlos Garcia Campos <cgarcia@igalia.com>
  6238. Reviewed by Martin Robinson.
  6239. [GTK] Simplify context-menu handling code
  6240. https://bugs.webkit.org/show_bug.cgi?id=49658
  6241. * wtf/PlatformRefPtr.h:
  6242. 2010-12-09 Michael Saboff <msaboff@apple.com>
  6243. Reviewed by Gavin Barraclough.
  6244. REGRESSION (r73065?): A regex no longer works
  6245. https://bugs.webkit.org/show_bug.cgi?id=50570
  6246. Changed the handling of adjacent parentheses backtracks in two ways.
  6247. First, only outer most paren backtracks default to back tracking
  6248. to the "next character" looping code. Second, added a jump around
  6249. backtracks that fall through to the next backtrack where the
  6250. second backtrack has some greedy processing before the backtracking
  6251. from outside the parentheses code.
  6252. Also cleaned up extraneous white spce, removing white space at the
  6253. end of or that makes up a whole line.
  6254. * yarr/RegexJIT.cpp:
  6255. (JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
  6256. (JSC::Yarr::RegexGenerator::GenerationState::incrementParenNestingLevel):
  6257. (JSC::Yarr::RegexGenerator::GenerationState::decrementParenNestingLevel):
  6258. (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
  6259. (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
  6260. (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
  6261. (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
  6262. (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
  6263. (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
  6264. 2010-12-09 Michael Saboff <msaboff@apple.com>
  6265. Reviewed by Geoffrey Garen.
  6266. Addressed the "FIXME" issues in array sort for toString() methods that
  6267. mutate the array in either size or contents. The change is to mark
  6268. the temporary array contents so that they are not garbage collected
  6269. and to make sure the array is large enough to hold the contents
  6270. of the sorted temporary vector.
  6271. https://bugs.webkit.org/show_bug.cgi?id=50718
  6272. * runtime/Collector.cpp:
  6273. (JSC::Heap::addTempSortVector):
  6274. (JSC::Heap::removeTempSortVector):
  6275. (JSC::Heap::markTempSortVectors):
  6276. (JSC::Heap::markRoots):
  6277. * runtime/Collector.h:
  6278. * runtime/JSArray.cpp:
  6279. (JSC::JSArray::sort):
  6280. * runtime/JSValue.h:
  6281. 2010-12-09 Michael Saboff <msaboff@apple.com>
  6282. Reviewed by Darin Adler.
  6283. Changed setting of backtrack labels to not overwrite a prior
  6284. label. Where losing prior labe which then reverted back to
  6285. next character label.
  6286. https://bugs.webkit.org/show_bug.cgi?id=50579
  6287. * yarr/RegexJIT.cpp:
  6288. (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
  6289. 2010-12-08 Gavin Barraclough <barraclough@apple.com>
  6290. Reviewed by Sam Weinig.
  6291. Permit Character Class Escape in CharacterRange in Character Class.
  6292. https://bugs.webkit.org/show_bug.cgi?id=50483
  6293. https://bugs.webkit.org/show_bug.cgi?id=50538
  6294. https://bugs.webkit.org/show_bug.cgi?id=50654
  6295. https://bugs.webkit.org/show_bug.cgi?id=50646
  6296. We recently tightened up our spec conformance in generating syntax
  6297. error in these cases, however testing in the wild has shown this
  6298. to be problematic. This reverts the previous change in allowing
  6299. class escapes (e.g. \d) in ranges in character classes ([]), but
  6300. does retain some closer conformance to the spec in only allowing
  6301. ranges that would be permitted per the grammar rules in the spec
  6302. (e.g. in /[\d-a-z]/ "a-z" cannot be considered as a range).
  6303. * yarr/RegexParser.h:
  6304. (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
  6305. (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
  6306. (JSC::Yarr::Parser::parse):
  6307. 2010-12-08 Geoffrey Garen <ggaren@apple.com>
  6308. Reviewed by Sam Weinig.
  6309. Try to fix crash-on-launch seen on Windows builder.
  6310. * wtf/OSAllocatorWin.cpp:
  6311. (WTF::OSAllocator::release): Disabled an ASSERT, because it checks for
  6312. a bug that hasn't been fixed yet.
  6313. 2010-12-08 Geoffrey Garen <ggaren@apple.com>
  6314. Try to fix Windows build.
  6315. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
  6316. 2010-12-08 Geoffrey Garen <ggaren@apple.com>
  6317. Try to fix Windows build.
  6318. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def
  6319. file to remove a symbol -- the next build failure will say which symbol
  6320. to add back.
  6321. 2010-12-08 Geoffrey Garen <ggaren@apple.com>
  6322. Try to fix Windows build.
  6323. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
  6324. 2010-12-08 Geoffrey Garen <ggaren@apple.com>
  6325. Try to fix GTK Linux build.
  6326. * jit/ExecutableAllocator.cpp:
  6327. (JSC::ExecutablePool::systemAlloc):
  6328. * runtime/AlignedMemoryAllocator.h:
  6329. (JSC::::AlignedMemoryAllocator): Updated for Usage enum moving to OSAllocator.
  6330. 2010-12-07 Geoffrey Garen <ggaren@apple.com>
  6331. Reviewed by Sam Weinig.
  6332. Migrated OS-specific allocation code from PageReservation and PageAllocation to OSAllocator
  6333. https://bugs.webkit.org/show_bug.cgi?id=50653
  6334. * JavaScriptCore.exp: Updated for new function signature.
  6335. * interpreter/RegisterFile.h:
  6336. (JSC::RegisterFile::RegisterFile):
  6337. (JSC::RegisterFile::grow):
  6338. * jit/ExecutableAllocatorFixedVMPool.cpp:
  6339. (JSC::FixedVMPoolAllocator::reuse):
  6340. (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): Removed checkAllocatedOkay.
  6341. OSAllocator is now the central location for verifying that allocation succeeds.
  6342. This allowed me to remove some complicating cross-platform cruft.
  6343. * runtime/AlignedMemoryAllocator.h:
  6344. (JSC::::allocate): Updated for code motion.
  6345. * wtf/OSAllocator.h: Added Usage, writable, and executable parameters, to
  6346. support VM features required by clients of PageAllocation and PageReservation.
  6347. * wtf/OSAllocatorPosix.cpp:
  6348. (WTF::OSAllocator::reserve):
  6349. (WTF::OSAllocator::reserveAndCommit):
  6350. (WTF::OSAllocator::commit): Moved PageAllocation support for randomizing
  6351. executable memory here.
  6352. * wtf/OSAllocatorSymbian.cpp:
  6353. (WTF::OSAllocator::reserve):
  6354. (WTF::OSAllocator::reserveAndCommit):
  6355. (WTF::OSAllocator::commit): Updated for new function signatures.
  6356. * wtf/OSAllocatorWin.cpp:
  6357. (WTF::protection):
  6358. (WTF::OSAllocator::reserve):
  6359. (WTF::OSAllocator::reserveAndCommit):
  6360. (WTF::OSAllocator::commit):
  6361. (WTF::OSAllocator::release): Updated for new function signatures. Moved
  6362. some protection-related and WINCE-related code from PageAllocation here.
  6363. * wtf/PageAllocation.cpp: Nixed cross-platform lastError abstraction, since
  6364. it was only used by checkAllocatedOkay, which is now gone.
  6365. * wtf/PageAllocation.h:
  6366. (WTF::PageAllocation::allocate):
  6367. (WTF::PageAllocation::allocateAligned):
  6368. (WTF::PageAllocation::deallocate):
  6369. (WTF::PageAllocation::isPowerOfTwo):
  6370. (WTF::PageAllocation::systemAllocateAligned): Removed system* functions,
  6371. and replaced calls to them with calls to OSAllocator.
  6372. * wtf/PageReservation.h:
  6373. (WTF::PageReservation::commit):
  6374. (WTF::PageReservation::decommit):
  6375. (WTF::PageReservation::reserve):
  6376. (WTF::PageReservation::deallocate):
  6377. (WTF::PageReservation::PageReservation): Ditto. Added m_writable and
  6378. m_executable because these flags are now required when committing memory.
  6379. 2010-12-08 Chris Rogers <crogers@google.com>
  6380. Reviewed by Kenneth Russell.
  6381. Add web audio files to mac port Xcode projects
  6382. https://bugs.webkit.org/show_bug.cgi?id=50721
  6383. * JavaScriptCore.xcodeproj/project.pbxproj:
  6384. 2010-12-08 Oliver Hunt <oliver@apple.com>
  6385. Reviewed by Gavin Barraclough.
  6386. Marking the active global object re-enters through markConservatively
  6387. https://bugs.webkit.org/show_bug.cgi?id=50711
  6388. draining of the MarkStack is not allowed to be re-entrant, we got away
  6389. with this simply due to the logic in MarkStack::drain implicitly handling
  6390. changes that could be triggered by the re-entry.
  6391. Just to be safe this patch removes the re-entry through markConservatively
  6392. so we don't accidentally introduce such an issue in future. I've also
  6393. added an assertion to catch such errors.
  6394. * runtime/Collector.cpp:
  6395. (JSC::Heap::markConservatively):
  6396. (JSC::Heap::markCurrentThreadConservativelyInternal):
  6397. (JSC::Heap::markOtherThreadConservatively):
  6398. * runtime/JSArray.h:
  6399. (JSC::MarkStack::drain):
  6400. * runtime/MarkStack.h:
  6401. (JSC::MarkStack::MarkStack):
  6402. 2010-12-08 Chris Marrin <cmarrin@apple.com>
  6403. Reviewed by Simon Fraser.
  6404. Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
  6405. https://bugs.webkit.org/show_bug.cgi?id=49388
  6406. Added a WTF_PLATFORM_CA flag. Set when platform is MAC or IOS or (WINDOWS AND CG)
  6407. which was decided was the best way to identify a build with CoreAnimation
  6408. * wtf/Platform.h:
  6409. 2010-12-07 Anders Carlsson <andersca@apple.com>
  6410. Build fix follow up build fix.
  6411. * pcre/pcre_ucp_searchfuncs.cpp:
  6412. (jsc_pcre_ucp_othercase):
  6413. 2010-12-07 Anders Carlsson <andersca@apple.com>
  6414. Reviewed by Darin Adler.
  6415. Fix clang++ build
  6416. https://bugs.webkit.org/show_bug.cgi?id=50645
  6417. Explicitly cast offset to int.
  6418. * pcre/pcre_ucp_searchfuncs.cpp:
  6419. (jsc_pcre_ucp_othercase):
  6420. 2010-12-07 Kenneth Russell <kbr@google.com>
  6421. Reviewed by David Levin.
  6422. Fix compilation of core web audio files on Windows
  6423. https://bugs.webkit.org/show_bug.cgi?id=50603
  6424. Added log2 definition to MathExtras.h on Windows platform.
  6425. * wtf/MathExtras.h:
  6426. (log2):
  6427. 2010-12-07 Antti Koivisto <antti@apple.com>
  6428. Reviewed by Gavin Barraclough.
  6429. https://bugs.webkit.org/show_bug.cgi?id=50412
  6430. http://www.wunderground.com/US/CA/Hayward.html causes big memory spike during page loading
  6431. Creating a substring caused the original string be flattened if it was in the rope form. This could use
  6432. significant amount of memory by reducing buffer sharing between strings.
  6433. Add a rope specific substring function that constructs the substring by reusing the rope fibers
  6434. instead of flattening the rope.
  6435. No change observed in SunSpider.
  6436. * runtime/JSString.cpp:
  6437. (JSC::JSString::substringFromRope):
  6438. * runtime/JSString.h:
  6439. (JSC::jsSubstring):
  6440. * runtime/StringPrototype.cpp:
  6441. (JSC::stringProtoFuncSubstr):
  6442. (JSC::stringProtoFuncSubstring):
  6443. 2010-12-06 Geoffrey Garen <ggaren@apple.com>
  6444. Reviewed by Gavin Barraclough.
  6445. Simplified some ASLR-related code in PageAllocation/Reservation
  6446. https://bugs.webkit.org/show_bug.cgi?id=50599
  6447. Removed reserveAt, allocateAt, and friends, since they all existed to
  6448. serve one feature: ASLR for executable memory on x86_64 on Mac. Moved
  6449. ASLR code down into systemAllocate -- now, any time you allocate
  6450. executable memory on a supporting platform, the memory's location is
  6451. randomized.
  6452. * jit/ExecutableAllocatorFixedVMPool.cpp:
  6453. (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): No need for the caller
  6454. to randomize anything.
  6455. * wtf/PageAllocation.h:
  6456. (WTF::PageAllocation::systemAllocate): Removed some *At() functions, and
  6457. beefed up executable allocation with randomization.
  6458. * wtf/PageReservation.h:
  6459. (WTF::PageReservation::systemReserve): Removed some *At() functions.
  6460. 2010-12-06 Geoffrey Garen <ggaren@apple.com>
  6461. Reviewed by Maciej Stachowiak.
  6462. reserveAndCommit doesn't commit on MADVISE_FREE_REUSE systems
  6463. https://bugs.webkit.org/show_bug.cgi?id=50588
  6464. * wtf/OSAllocatorPosix.cpp:
  6465. (WTF::OSAllocator::reserve):
  6466. (WTF::OSAllocator::reserveAndCommit):
  6467. (WTF::OSAllocator::commit): Tightened up some comments. Changed
  6468. reserveAndCommit to actually commit on MADVISE_FREE_REUSE systems.
  6469. 2010-12-06 Patrick Gansterer <paroga@webkit.org>
  6470. Reviewed by Andreas Kling.
  6471. [WINCE] Add build system
  6472. https://bugs.webkit.org/show_bug.cgi?id=50522
  6473. * CMakeListsWinCE.txt: Added.
  6474. * shell/CMakeListsWinCE.txt: Added.
  6475. * wtf/CMakeListsWinCE.txt: Added.
  6476. 2010-12-06 John Tantalo <john.tantalo@gmail.com>
  6477. Reviewed by Geoffrey Garen.
  6478. jsc does not ignore shebang
  6479. https://bugs.webkit.org/show_bug.cgi?id=49576
  6480. * jsc.cpp:
  6481. (fillBufferWithContentsOfFile):
  6482. - translate shebang into a valid JavaScript comment so the lexer ignores it
  6483. 2010-12-05 Adam Roben <aroben@apple.com>
  6484. Windows production build fix
  6485. Put spaces after trailing backslashes when setting
  6486. %WebKitVSPropsRedirectionDir%. According to MSDN
  6487. <http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>:
  6488. A backslash ( \ ) followed by a newline character is interpreted as
  6489. a space in the command; use a backslash at the end of a line to
  6490. continue a command onto the next line. NMAKE interprets the
  6491. backslash literally if any other character, including a space or
  6492. tab, follows the backslash.
  6493. * JavaScriptCore.vcproj/JavaScriptCore.make:
  6494. 2010-12-04 Patrick Gansterer <paroga@webkit.org>
  6495. Unreviewed, build fix after r69132.
  6496. * shell/CMakeLists.txt: Fix directory name (jsc -> shell).
  6497. 2010-12-04 Xan Lopez <xlopez@igalia.com>
  6498. Reviewed by Martin Robinson.
  6499. [GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow
  6500. https://bugs.webkit.org/show_bug.cgi?id=50451
  6501. * wtf/gobject/GTypedefs.h: add GdkWindow defines.
  6502. 2010-12-03 Gavin Barraclough <barraclough@apple.com>
  6503. Rubber stamped by Oliver Hunt.
  6504. Bug 50509 - set* methods on MacroAssembler are awfully named.
  6505. Methods set32 and setTest32 compare 32-bit operands, and set a 32-bit results based on the comparison.
  6506. set8 compares 32-bit operands, and sets an 8-bit result based on the comparison.
  6507. setTest8 compares 8-bit operands, and sets a 32-bit result based on the comparison.
  6508. Rename to clarify.
  6509. set32 -> set32Compare32
  6510. setTest32 -> set32Test32
  6511. set8 -> set8Compare32
  6512. setTest8 -> set32Test8
  6513. * assembler/MacroAssembler.h:
  6514. (JSC::MacroAssembler::setPtr):
  6515. * assembler/MacroAssemblerARM.h:
  6516. (JSC::MacroAssemblerARM::set32Compare32):
  6517. (JSC::MacroAssemblerARM::set8Compare32):
  6518. (JSC::MacroAssemblerARM::set32Test32):
  6519. (JSC::MacroAssemblerARM::set32Test8):
  6520. * assembler/MacroAssemblerARMv7.h:
  6521. (JSC::MacroAssemblerARMv7::set32Compare32):
  6522. (JSC::MacroAssemblerARMv7::set8Compare32):
  6523. (JSC::MacroAssemblerARMv7::set32Test32):
  6524. (JSC::MacroAssemblerARMv7::set32Test8):
  6525. * assembler/MacroAssemblerMIPS.h:
  6526. (JSC::MacroAssemblerMIPS::set8Compare32):
  6527. (JSC::MacroAssemblerMIPS::set32Compare32):
  6528. (JSC::MacroAssemblerMIPS::set32Test8):
  6529. (JSC::MacroAssemblerMIPS::set32Test32):
  6530. * assembler/MacroAssemblerX86Common.h:
  6531. (JSC::MacroAssemblerX86Common::set8Compare32):
  6532. (JSC::MacroAssemblerX86Common::set32Compare32):
  6533. (JSC::MacroAssemblerX86Common::set32Test8):
  6534. (JSC::MacroAssemblerX86Common::set32Test32):
  6535. * jit/JITOpcodes.cpp:
  6536. (JSC::JIT::emit_op_eq):
  6537. (JSC::JIT::emit_op_neq):
  6538. (JSC::JIT::compileOpStrictEq):
  6539. (JSC::JIT::emit_op_eq_null):
  6540. (JSC::JIT::emit_op_neq_null):
  6541. * jit/JITOpcodes32_64.cpp:
  6542. (JSC::JIT::emit_op_eq):
  6543. (JSC::JIT::emit_op_neq):
  6544. (JSC::JIT::compileOpStrictEq):
  6545. (JSC::JIT::emit_op_eq_null):
  6546. (JSC::JIT::emit_op_neq_null):
  6547. 2010-12-03 Oliver Hunt <oliver@apple.com>
  6548. Reviewed by Geoff Garen.
  6549. Incorrect logic for returning memory at the end of linking.
  6550. Reviewed by Geoff Garen.
  6551. At the end of linking we return any space at the end of the
  6552. allocated executable region that was saved due to branch
  6553. compaction. This is currently by done by subtracting the
  6554. different from the m_freePtr in the allocation pool. This
  6555. can be incorrect if your allocation was made from a new
  6556. page that was not selected for subsequent allocations.
  6557. This patch corrects this behaviour by verifying that the
  6558. memory being returned actually comes from the current
  6559. allocation pool.
  6560. * assembler/LinkBuffer.h:
  6561. (JSC::LinkBuffer::linkCode):
  6562. * jit/ExecutableAllocator.h:
  6563. (JSC::ExecutablePool::tryShrink):
  6564. 2010-12-03 Michael Saboff <msaboff@apple.com>
  6565. Reviewed by Gavin Barraclough
  6566. Changes to significantly reduce branches to branches in JIT'ed
  6567. parentheses backtrack processing. The changes include the following:
  6568. - Taking the backtracking processing out of line and adding it as
  6569. code at the end of the JIT'ed routine.
  6570. - Allow backtracks to be direct via an indirect branch for an address
  6571. pushed onto the stack. If the use of an indirect branch is from a
  6572. conditional jump, then we emit a trampoline at the end of the
  6573. routine.
  6574. - Propogate backtracks instead of adding trampolines. Backtracks are
  6575. propogated to where they are used. This change also eliminated
  6576. trampoline branch code that aren't used.
  6577. - Added global expression state to keep track of parentheses tail
  6578. code and indirect branches.
  6579. Other changes made to support these changes.
  6580. - Split invertOrCapture flag on Patterns to two separate flags. Added
  6581. getters for these flags. Rippled these changes to both the JIT
  6582. and interpreter code.
  6583. - Split BacktrackDestination out off TermGenerationState struct.
  6584. This is done to hold references to a backtrack for later code
  6585. generation.
  6586. https://bugs.webkit.org/show_bug.cgi?id=50295
  6587. * assembler/ARMAssembler.h:
  6588. (JSC::ARMAssembler::JmpDst::isSet):
  6589. * assembler/ARMv7Assembler.h:
  6590. (JSC::ARMv7Assembler::JmpDst::isSet):
  6591. * assembler/AbstractMacroAssembler.h:
  6592. (JSC::AbstractMacroAssembler::Label::isSet):
  6593. (JSC::AbstractMacroAssembler::DataLabelPtr::isUsed):
  6594. (JSC::AbstractMacroAssembler::DataLabelPtr::used):
  6595. (JSC::AbstractMacroAssembler::JumpList::clear):
  6596. * assembler/MIPSAssembler.h:
  6597. (JSC::MIPSAssembler::JmpDst::isSet):
  6598. * assembler/X86Assembler.h:
  6599. (JSC::X86Assembler::JmpDst::isSet):
  6600. * yarr/RegexCompiler.cpp:
  6601. (JSC::Yarr::RegexPatternConstructor::atomParenthesesSubpatternBegin):
  6602. (JSC::Yarr::RegexPatternConstructor::atomParentheticalAssertionBegin):
  6603. (JSC::Yarr::RegexPatternConstructor::atomBackReference):
  6604. (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
  6605. * yarr/RegexInterpreter.cpp:
  6606. (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
  6607. (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
  6608. (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
  6609. (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
  6610. (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
  6611. (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
  6612. (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
  6613. (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
  6614. (JSC::Yarr::ByteCompiler::emitDisjunction):
  6615. * yarr/RegexInterpreter.h:
  6616. (JSC::Yarr::ByteTerm::ByteTerm):
  6617. (JSC::Yarr::ByteTerm::BackReference):
  6618. (JSC::Yarr::ByteTerm::invert):
  6619. (JSC::Yarr::ByteTerm::capture):
  6620. * yarr/RegexJIT.cpp:
  6621. (JSC::Yarr::RegexGenerator::IndirectJumpEntry::IndirectJumpEntry):
  6622. (JSC::Yarr::RegexGenerator::IndirectJumpEntry::addJump):
  6623. (JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
  6624. (JSC::Yarr::RegexGenerator::GenerationState::addIndirectJumpEntry):
  6625. (JSC::Yarr::RegexGenerator::GenerationState::emitIndirectJumpTable):
  6626. (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
  6627. (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
  6628. (JSC::Yarr::RegexGenerator::GenerationState::addJumpToNextInteration):
  6629. (JSC::Yarr::RegexGenerator::GenerationState::addJumpsToNextInteration):
  6630. (JSC::Yarr::RegexGenerator::GenerationState::addDataLabelToNextIteration):
  6631. (JSC::Yarr::RegexGenerator::GenerationState::linkToNextIteration):
  6632. (JSC::Yarr::RegexGenerator::BacktrackDestination::BacktrackDestination):
  6633. (JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
  6634. (JSC::Yarr::RegexGenerator::BacktrackDestination::clearDataLabel):
  6635. (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDestination):
  6636. (JSC::Yarr::RegexGenerator::BacktrackDestination::isStackOffset):
  6637. (JSC::Yarr::RegexGenerator::BacktrackDestination::isLabel):
  6638. (JSC::Yarr::RegexGenerator::BacktrackDestination::isJumpList):
  6639. (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDataLabel):
  6640. (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTarget):
  6641. (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTo):
  6642. (JSC::Yarr::RegexGenerator::BacktrackDestination::addBacktrackJump):
  6643. (JSC::Yarr::RegexGenerator::BacktrackDestination::setStackOffset):
  6644. (JSC::Yarr::RegexGenerator::BacktrackDestination::setLabel):
  6645. (JSC::Yarr::RegexGenerator::BacktrackDestination::setNextBacktrackLabel):
  6646. (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
  6647. (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackJumpList):
  6648. (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackSourceLabel):
  6649. (JSC::Yarr::RegexGenerator::BacktrackDestination::setDataLabel):
  6650. (JSC::Yarr::RegexGenerator::BacktrackDestination::setSubDataLabelPtr):
  6651. (JSC::Yarr::RegexGenerator::BacktrackDestination::linkToNextBacktrack):
  6652. (JSC::Yarr::RegexGenerator::BacktrackDestination::getStackOffset):
  6653. (JSC::Yarr::RegexGenerator::BacktrackDestination::getLabel):
  6654. (JSC::Yarr::RegexGenerator::BacktrackDestination::getBacktrackJumps):
  6655. (JSC::Yarr::RegexGenerator::BacktrackDestination::getDataLabel):
  6656. (JSC::Yarr::RegexGenerator::BacktrackDestination::jumpToBacktrack):
  6657. (JSC::Yarr::RegexGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
  6658. (JSC::Yarr::RegexGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
  6659. (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracks):
  6660. (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
  6661. (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
  6662. (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative):
  6663. (JSC::Yarr::RegexGenerator::TermGenerationState::isLastAlternative):
  6664. (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
  6665. (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack):
  6666. (JSC::Yarr::RegexGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
  6667. (JSC::Yarr::RegexGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
  6668. (JSC::Yarr::RegexGenerator::TermGenerationState::addBacktrackJump):
  6669. (JSC::Yarr::RegexGenerator::TermGenerationState::setDataLabelPtr):
  6670. (JSC::Yarr::RegexGenerator::TermGenerationState::setBackTrackStackOffset):
  6671. (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLabel):
  6672. (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracks):
  6673. (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracksTo):
  6674. (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLink):
  6675. (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktracks):
  6676. (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktrackJumps):
  6677. (JSC::Yarr::RegexGenerator::TermGenerationState::getBacktrackDestination):
  6678. (JSC::Yarr::RegexGenerator::TermGenerationState::propagateBacktrackingFrom):
  6679. (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
  6680. (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
  6681. (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
  6682. (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
  6683. (JSC::Yarr::RegexGenerator::generateAssertionBOL):
  6684. (JSC::Yarr::RegexGenerator::generateAssertionEOL):
  6685. (JSC::Yarr::RegexGenerator::generateAssertionWordBoundary):
  6686. (JSC::Yarr::RegexGenerator::generatePatternCharacterSingle):
  6687. (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
  6688. (JSC::Yarr::RegexGenerator::generatePatternCharacterFixed):
  6689. (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
  6690. (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
  6691. (JSC::Yarr::RegexGenerator::generateCharacterClassSingle):
  6692. (JSC::Yarr::RegexGenerator::generateCharacterClassFixed):
  6693. (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
  6694. (JSC::Yarr::RegexGenerator::generateCharacterClassNonGreedy):
  6695. (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction):
  6696. (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
  6697. (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
  6698. (JSC::Yarr::RegexGenerator::generateParentheticalAssertion):
  6699. (JSC::Yarr::RegexGenerator::generateDisjunction):
  6700. (JSC::Yarr::RegexGenerator::compile):
  6701. * yarr/RegexPattern.h:
  6702. (JSC::Yarr::PatternTerm::PatternTerm):
  6703. (JSC::Yarr::PatternTerm::invert):
  6704. (JSC::Yarr::PatternTerm::capture):
  6705. 2010-12-03 Chris Rogers <crogers@google.com>
  6706. Reviewed by Kenneth Russell.
  6707. First steps to adding web audio files to build systems
  6708. https://bugs.webkit.org/show_bug.cgi?id=49952
  6709. * wtf/Complex.h:
  6710. 2010-12-03 Patrick Gansterer <paroga@webkit.org>
  6711. Reviewed by Andreas Kling.
  6712. Move StringWx.cpp into wtf directory
  6713. https://bugs.webkit.org/show_bug.cgi?id=50060
  6714. * wtf/wx/StringWx.cpp: Renamed from WebCore/platform/text/wx/StringWx.cpp.
  6715. (WTF::String::String):
  6716. 2010-12-03 Patrick Gansterer <paroga@webkit.org>
  6717. Reviewed by Andreas Kling.
  6718. Move StringBrew.cpp into wtf directory
  6719. https://bugs.webkit.org/show_bug.cgi?id=50058
  6720. * wtf/brew/StringBrew.cpp: Renamed from WebCore/platform/text/brew/StringBrew.cpp.
  6721. (WTF::String::String):
  6722. 2010-12-03 Patrick Gansterer <paroga@webkit.org>
  6723. Reviewed by Andreas Kling.
  6724. Move StringHaiku.cpp into wtf directory
  6725. https://bugs.webkit.org/show_bug.cgi?id=50057
  6726. * wtf/haiku/StringHaiku.cpp: Renamed from WebCore/platform/text/haiku/StringHaiku.cpp.
  6727. (WTF::String::String):
  6728. (WTF::String::operator BString):
  6729. 2010-12-02 Geoffrey Garen <ggaren@apple.com>
  6730. Try to fix Windows build.
  6731. * runtime/GCActivityCallback.cpp:
  6732. (JSC::DefaultGCActivityCallback::synchronize): Added a non-CF implementation.
  6733. 2010-12-02 Geoffrey Garen <ggaren@apple.com>
  6734. Reviewed by Gavin Barraclough.
  6735. Fixed <rdar://problem/8310571> CrashTracer: 60 crashes in Photo Booth at
  6736. com.apple.JavaScriptCore: JSC::Heap::markRoots + 746
  6737. * API/APIShims.h:
  6738. (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Call our new
  6739. synchronize() function.
  6740. * runtime/Collector.cpp:
  6741. (JSC::Heap::activityCallback):
  6742. * runtime/Collector.h: Added an activityCallback() accessor, for the
  6743. call above.
  6744. * runtime/GCActivityCallback.h:
  6745. (JSC::GCActivityCallback::synchronize):
  6746. * runtime/GCActivityCallbackCF.cpp:
  6747. (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
  6748. (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
  6749. (JSC::DefaultGCActivityCallback::operator()):
  6750. (JSC::DefaultGCActivityCallback::synchronize): Track the run loop we're
  6751. scheduled in. If we begin/resume execution within a new run loop, reschedule
  6752. on it. This prevents a crash when using a lockless context group on
  6753. multiple threads -- the crash would happen if the GC timer scheduled on
  6754. thread A, then you continued execution on thread B, then the thread A
  6755. timer fired.
  6756. 2010-12-02 Darin Adler <darin@apple.com>
  6757. * wtf/ASCIICType.h: Fix wrong type from last check-in.
  6758. 2010-12-02 Darin Adler <darin@apple.com>
  6759. Try to fix certain builds (Qt Windows).
  6760. * wtf/ASCIICType.h: Added an overload for unsigned because in obsolete
  6761. versions of ICU, UChar32 can be a typedef for unsigned. Adding this
  6762. overload should make us compatible with these old ICUs.
  6763. 2010-12-02 Patrick Gansterer <paroga@webkit.org>
  6764. Reviewed by Darin Adler.
  6765. Add AtomicString::fromUTF8
  6766. https://bugs.webkit.org/show_bug.cgi?id=45594
  6767. Unicode::calculateStringHashFromUTF8 creates a StringHash out of UTF8 input data and
  6768. calculates the required length for the UTF16 conversation in one step.
  6769. This is then used in a specialized translator for the string table of AtomicString.
  6770. * JavaScriptCore.exp:
  6771. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  6772. * wtf/text/AtomicString.cpp:
  6773. (WTF::CStringTranslator::equal):
  6774. (WTF::HashAndUTF8CharactersTranslator::hash):
  6775. (WTF::HashAndUTF8CharactersTranslator::equal):
  6776. (WTF::HashAndUTF8CharactersTranslator::translate):
  6777. (WTF::AtomicString::add):
  6778. (WTF::AtomicString::addSlowCase):
  6779. (WTF::AtomicString::find):
  6780. (WTF::AtomicString::fromUTF8):
  6781. * wtf/text/AtomicString.h:
  6782. * wtf/text/StringImpl.h:
  6783. * wtf/text/WTFString.h:
  6784. * wtf/unicode/UTF8.cpp:
  6785. (WTF::Unicode::readUTF8Sequence):
  6786. (WTF::Unicode::convertUTF8ToUTF16):
  6787. (WTF::Unicode::calculateStringHashFromUTF8):
  6788. (WTF::Unicode::equalUTF16WithUTF8):
  6789. * wtf/unicode/UTF8.h:
  6790. 2010-12-02 Geoffrey Garen <ggaren@apple.com>
  6791. Reviewed by Sam Weinig.
  6792. Added a little hardening to OSAllocator.
  6793. * wtf/OSAllocatorPosix.cpp:
  6794. (WTF::OSAllocator::release):
  6795. * wtf/OSAllocatorWin.cpp:
  6796. (WTF::OSAllocator::reserve):
  6797. (WTF::OSAllocator::reserveAndCommit):
  6798. (WTF::OSAllocator::commit):
  6799. (WTF::OSAllocator::decommit):
  6800. (WTF::OSAllocator::release): CRASH() if the OS's virtual memory system
  6801. reports an error.
  6802. 2010-12-02 Csaba Osztrogonác <ossy@webkit.org>
  6803. Reviewed by Geoffrey Garen.
  6804. [Qt] Make platform managing of OSAllocator better than r73106
  6805. https://bugs.webkit.org/show_bug.cgi?id=50385
  6806. * wtf/OSAllocatorPosix.cpp: Remove platform specific guard.
  6807. * wtf/OSAllocatorSymbian.cpp: Remove platform specific guard.
  6808. * wtf/OSAllocatorWin.cpp: Remove platform specific guard.
  6809. * wtf/wtf.pri: Add the correct platform specific source file instead of all of them.
  6810. 2010-12-02 Patrick Gansterer <paroga@webkit.org>
  6811. Reviewed by Andreas Kling.
  6812. [WINCE] Use GetTickCount() for srand()
  6813. https://bugs.webkit.org/show_bug.cgi?id=50338
  6814. time() is not a native function on WinCE, so use GetTickCount() instead.
  6815. * wtf/RandomNumberSeed.h:
  6816. (WTF::initializeRandomNumberGenerator):
  6817. 2010-12-02 Norbert Leser <norbert.leser@nokia.com>
  6818. Reviewed by Laszlo Gombos.
  6819. [Qt] [Symbian] Reintroduce compiler optimizations for JSC
  6820. https://bugs.webkit.org/show_bug.cgi?id=50270
  6821. Add compiler optimization (symbian ARM target) which was lost after split from WebCore.
  6822. Tested via Sunspider and V8 - both of which show significant performance improvement.
  6823. * JavaScriptCore.pro:
  6824. 2010-12-02 Peter Varga <pvarga@inf.u-szeged.hu>
  6825. Reviewed by Gavin Barraclough.
  6826. Move regex parsing and fallback handling to runtime/RegExp.cpp
  6827. https://bugs.webkit.org/show_bug.cgi?id=50015
  6828. * runtime/RegExp.cpp:
  6829. (JSC::RegExp::RegExp):
  6830. (JSC::RegExp::create):
  6831. (JSC::RegExp::compile):
  6832. (JSC::RegExp::match):
  6833. (JSC::RegExp::printTraceData):
  6834. * runtime/RegExp.h:
  6835. (JSC::RegExp::pattern):
  6836. * yarr/RegexInterpreter.cpp:
  6837. * yarr/RegexInterpreter.h:
  6838. * yarr/RegexJIT.cpp:
  6839. (JSC::Yarr::RegexGenerator::compile):
  6840. (JSC::Yarr::jitCompileRegex):
  6841. * yarr/RegexJIT.h:
  6842. (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
  6843. (JSC::Yarr::RegexCodeBlock::setFallBack):
  6844. (JSC::Yarr::RegexCodeBlock::isFallBack):
  6845. (JSC::Yarr::executeRegex):
  6846. 2010-12-01 Geoffrey Garen <ggaren@apple.com>
  6847. Try to fix the GTK build.
  6848. * GNUmakefile.am: Use a full path to OSAllocator*.cpp.
  6849. 2010-12-01 Geoffrey Garen <ggaren@apple.com>
  6850. Try to fix the EFL Linux build.
  6851. * CMakeListsEfl.txt: Added OSAllocator to the project.
  6852. 2010-12-01 Geoffrey Garen <ggaren@apple.com>
  6853. Try to fix the Qt build: Include all OS files for Qt's sake, and then
  6854. use #ifdefs in the files to exclude things based on OS.
  6855. This is a pretty bad way to manage platforms -- hopefully we can
  6856. fix the Qt build system and move away from this in the future.
  6857. * wtf/OSAllocatorPosix.cpp:
  6858. * wtf/OSAllocatorSymbian.cpp:
  6859. * wtf/OSAllocatorWin.cpp:
  6860. * wtf/wtf.pri:
  6861. 2010-12-01 Geoffrey Garen <ggaren@apple.com>
  6862. Try to fix the Chromium build.
  6863. * JavaScriptCore.gypi: This is a Windows build file, so use OSAllocatorWin.cpp.
  6864. 2010-12-01 Geoffrey Garen <ggaren@apple.com>
  6865. Try to fix the GTK build.
  6866. * GNUmakefile.am: Added OSAllocator to another project.
  6867. 2010-12-01 Geoffrey Garen <ggaren@apple.com>
  6868. Try to fix the GTK Linux build.
  6869. * JavaScriptCore.gypi: Added OSAllocator to the project.
  6870. 2010-12-01 Geoffrey Garen <ggaren@apple.com>
  6871. Try to fix the Qt Linux build.
  6872. * wtf/OSAllocatorPosix.cpp: Use the right errno.h.
  6873. 2010-12-01 Geoffrey Garen <ggaren@apple.com>
  6874. Try to fix Windows build: export some more symbols.
  6875. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  6876. 2010-12-01 Geoffrey Garen <ggaren@apple.com>
  6877. Try to fix the Qt Linux build.
  6878. * wtf/wtf.pri: Use the POSIX OSAllocator for Qt Linux.
  6879. 2010-12-01 Geoffrey Garen <ggaren@apple.com>
  6880. Windows build fix: commit doesn't have a return value.
  6881. * wtf/OSAllocatorWin.cpp:
  6882. (WTF::OSAllocator::commit):
  6883. 2010-12-01 Geoffrey Garen <ggaren@apple.com>
  6884. Build fix: Export some symbols.
  6885. * JavaScriptCore.exp:
  6886. 2010-12-01 Geoffrey Garen <ggaren@apple.com>
  6887. Build fix.
  6888. * JavaScriptCore.xcodeproj/project.pbxproj: Export OSAllocator.h as private
  6889. so other projects can see it.
  6890. * wtf/OSAllocatorPosix.cpp: #include UnusedParam.h for UNUSED_PARAM.
  6891. 2010-12-01 Geoffrey Garen <ggaren@apple.com>
  6892. Reviewed by Sam Weinig.
  6893. Baby step toward a cross-platform virtual memory abstraction: created
  6894. an all-static OSAllocator class and changed MarkStack to use it.
  6895. * JavaScriptCore.exp: These functions are inlined now.
  6896. * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added OSAllocatorWin.cpp.
  6897. * JavaScriptCore.xcodeproj/project.pbxproj: Added OSAllocatorPosix.cpp.
  6898. * runtime/MarkStack.h:
  6899. (JSC::MarkStack::allocateStack):
  6900. (JSC::MarkStack::releaseStack): Use OSAllocator instead of rolling our
  6901. own platform-specific code.
  6902. * runtime/MarkStackNone.cpp: Removed. Nothing used this.
  6903. * runtime/MarkStackPosix.cpp:
  6904. * runtime/MarkStackSymbian.cpp:
  6905. * runtime/MarkStackWin.cpp: Removed custom platform-specific code, since
  6906. we use the OSAllocator abstraction now.
  6907. * wtf/OSAllocator.h: Added.
  6908. * wtf/OSAllocatorPosix.cpp: Added.
  6909. (WTF::OSAllocator::reserve):
  6910. (WTF::OSAllocator::reserveAndCommit):
  6911. (WTF::OSAllocator::commit):
  6912. (WTF::OSAllocator::decommit):
  6913. (WTF::OSAllocator::release):
  6914. * wtf/OSAllocatorSymbian.cpp: Added.
  6915. (WTF::OSAllocator::reserve):
  6916. (WTF::OSAllocator::reserveAndCommit):
  6917. (WTF::OSAllocator::commit):
  6918. (WTF::OSAllocator::decommit):
  6919. (WTF::OSAllocator::release):
  6920. * wtf/OSAllocatorWin.cpp: Added.
  6921. (WTF::OSAllocator::reserve):
  6922. (WTF::OSAllocator::reserveAndCommit):
  6923. (WTF::OSAllocator::commit):
  6924. (WTF::OSAllocator::decommit):
  6925. (WTF::OSAllocator::release): The new OSAllocator abstraction.
  6926. * wtf/wtf.pri: Added OSAllocatorSymbian.cpp.
  6927. 2010-12-01 Steve Falkenburg <sfalken@apple.com>
  6928. Reviewed by Adam Roben.
  6929. WinCairo build should not use link-time code generation (LTCG)
  6930. https://bugs.webkit.org/show_bug.cgi?id=50353
  6931. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  6932. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  6933. * JavaScriptCore.vcproj/jsc/jsc.vcproj:
  6934. * JavaScriptCore.vcproj/testapi/testapi.vcproj:
  6935. 010-12-01 Steve Falkenburg <sfalken@apple.com>
  6936. Reviewed by Adam Roben.
  6937. vcproj changes can't be applied cleanly by the Windows EWS bot
  6938. https://bugs.webkit.org/show_bug.cgi?id=50328
  6939. * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style.
  6940. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modified property svn:eol-style.
  6941. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Added property svn:eol-style.
  6942. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Added property svn:eol-style.
  6943. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Added property svn:eol-style.
  6944. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Modified property svn:eol-style.
  6945. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added property svn:eol-style.
  6946. * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style.
  6947. * JavaScriptCore.vcproj/WTF/WTF.vcproj: Modified property svn:eol-style.
  6948. * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Added property svn:eol-style.
  6949. * JavaScriptCore.vcproj/jsc/jsc.vcproj: Modified property svn:eol-style.
  6950. * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added property svn:eol-style.
  6951. * JavaScriptCore.vcproj/testapi/testapi.vcproj: Modified property svn:eol-style.
  6952. * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Added property svn:eol-style.
  6953. 2010-12-01 Gavin Barraclough <barraclough@apple.com>
  6954. Reviewed by Sam Weinig.
  6955. Bug 50298 - /()()()()()()()()()(?:(\10a|b)(X|Y))+/.exec("bXXaYYaY") ASSERTs
  6956. For unmatched subpattens we previously used to set the subpattern end to -1,
  6957. but now we only set the start value. E.g. consider the following:
  6958. /a(b)?c/.exec("ac");
  6959. Previously we would generate an internal results array of:
  6960. [ 0, 2, -1, -1 ]
  6961. Since fairly recently we have generated results of:
  6962. [ 0, 2, -1, ??? ]
  6963. (With the end index of the subpattern uninitialized).
  6964. Update these ASSERTs to account for this.
  6965. Also, when stripping out self-referencing backreferences, (e.g. /(\1)/) we
  6966. were checking the wrong property on the pattern term. We should have been
  6967. looking at term.parentheses.subpatternId, but instead were checking
  6968. term.subpatternId. The latter is actually only the subpatternId for
  6969. back reference terms. Rename this to backReferenceSubpatternId.
  6970. * yarr/RegexInterpreter.cpp:
  6971. (JSC::Yarr::Interpreter::matchBackReference):
  6972. (JSC::Yarr::Interpreter::backtrackBackReference):
  6973. 2010-11-30 Gavin Barraclough <barraclough@apple.com>
  6974. Rubber stamped by Sam Weinig.
  6975. Bug 50297 - \s in YARR should match BOMs.
  6976. From section 15.10.2.12 CharacterClassEscape contains:
  6977. The production CharacterClassEscape :: s evaluates by returning the set of characters containing the
  6978. characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions.
  6979. Table 2 in section 7.2 contains:
  6980. \uFEFF Byte Order Mark <BOM>
  6981. * create_regex_tables:
  6982. Add BOM to spaces table.
  6983. 2010-11-30 Gavin Barraclough <barraclough@apple.com>
  6984. Reviewed by Darin Adler.
  6985. Fixed review comments following bug #48101.
  6986. Mostly typos, plus gave quantifyInfinite a symbolic name.
  6987. * yarr/RegexCompiler.cpp:
  6988. (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
  6989. (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
  6990. * yarr/RegexInterpreter.cpp:
  6991. (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
  6992. (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
  6993. (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
  6994. (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
  6995. * yarr/RegexJIT.cpp:
  6996. (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
  6997. (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
  6998. (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
  6999. * yarr/RegexParser.h:
  7000. (JSC::Yarr::Parser::parseTokens):
  7001. (JSC::Yarr::parse):
  7002. 2010-11-30 Steve Falkenburg <sfalken@apple.com>
  7003. Reviewed by Darin Adler.
  7004. WTF project missing build-stopping code from its pre-build event
  7005. https://bugs.webkit.org/show_bug.cgi?id=50281
  7006. * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
  7007. 2010-11-30 Patrick Gansterer <paroga@webkit.org>
  7008. Reviewed by Darin Adler.
  7009. Cleanup UTF8.cpp
  7010. https://bugs.webkit.org/show_bug.cgi?id=49581
  7011. Use macros and functions instead of range values directly.
  7012. * wtf/unicode/UTF8.cpp:
  7013. (WTF::Unicode::inlineUTF8SequenceLength):
  7014. (WTF::Unicode::UTF8SequenceLength):
  7015. (WTF::Unicode::convertUTF16ToUTF8):
  7016. (WTF::Unicode::readUTF8Sequence):
  7017. (WTF::Unicode::convertUTF8ToUTF16):
  7018. * wtf/unicode/UnicodeMacrosFromICU.h: Added U_IS_SUPPLEMENTARY macro.
  7019. 2010-11-30 Geoffrey Garen <ggaren@apple.com>
  7020. Reviewed by Gavin Barraclough.
  7021. Fixed a crash seen when using a PageAllocation to store itself.
  7022. * wtf/PageAllocation.h:
  7023. (WTF::PageAllocation::systemDeallocate): Zero out m_base before unmapping
  7024. it, in case unmapping m_base unmaps the PageAllocation.
  7025. * wtf/BumpPointerAllocator.h:
  7026. (WTF::BumpPointerPool::destroy): Now this work-around isn't needed!
  7027. 2010-11-30 Xan Lopez <xlopez@igalia.com>
  7028. Reviewed by Darin Adler.
  7029. m_hasNonEnumerableProperties is never initialized in Structure
  7030. https://bugs.webkit.org/show_bug.cgi?id=50266
  7031. * runtime/Structure.cpp:
  7032. (JSC::Structure::Structure): initialize member variable.
  7033. 2010-11-29 Steve Falkenburg <sfalken@apple.com>
  7034. Windows build fix (part 1). Use correct environment variable syntax in cmd files.
  7035. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
  7036. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
  7037. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd:
  7038. * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
  7039. * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
  7040. * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
  7041. * JavaScriptCore.vcproj/jsc/jscPreLink.cmd:
  7042. * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
  7043. * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
  7044. * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd:
  7045. 2010-11-29 Dan Bernstein <mitz@apple.com>
  7046. Reviewed by Darin Adler.
  7047. WTF support for <rdar://problem/8650085> adding word-prefix search options to the text search API.
  7048. https://bugs.webkit.org/show_bug.cgi?id=50038
  7049. * wtf/unicode/UnicodeMacrosFromICU.h: Copied additional macros from icu/unicode/utf16.h.
  7050. 2010-11-29 Steve Falkenburg <sfalken@apple.com>
  7051. Reviewed by Darin Adler.
  7052. JavaScriptCore projects on Windows should use cmd files for build events
  7053. https://bugs.webkit.org/show_bug.cgi?id=50193
  7054. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  7055. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: Added.
  7056. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: Added.
  7057. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: Added.
  7058. * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added property svn:eol-style.
  7059. * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added property svn:eol-style.
  7060. * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
  7061. * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: Added.
  7062. * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: Added.
  7063. * JavaScriptCore.vcproj/jsc/jscPreLink.cmd: Added.
  7064. * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
  7065. * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: Added.
  7066. * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: Added.
  7067. * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: Added.
  7068. 2010-11-29 Dai Mikurube <dmikurube@google.com>
  7069. Reviewed by Kent Tamura.
  7070. when empty, clicking "down" on outer-spin-button returns "max value"
  7071. https://bugs.webkit.org/show_bug.cgi?id=45491
  7072. It is required to calculate UTC/DST offsets to retrieve the current local milliseconds for
  7073. date/time type inputs. WTF::currentTimeMS() returns a UTC time, and WTF::getLocalTime()
  7074. returns a struct tm, not milliseconds.
  7075. Calculating milliseconds from a struct tm is not simple since timegm() cannot be used in all
  7076. environments. This calculation is already done in calculateUTCOffset(), and complicated.
  7077. Duplicating this complicated calculation is unreasonable because of maintainability.
  7078. To achieve this without duplication, we must call calculate{UTC|DST}Offset in some way.
  7079. * JavaScriptCore.exp:
  7080. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  7081. * wtf/DateMath.cpp: Changed calculateUTCOffset() and calculateDSTOffset() to external functions.
  7082. (WTF::calculateUTCOffset):
  7083. (WTF::calculateDSTOffset):
  7084. * wtf/DateMath.h:
  7085. 2010-11-29 Chris Rogers <crogers@google.com>
  7086. Reviewed by Kenneth Russell.
  7087. Switch web audio code to use FloatPoint3D instead of Vector3
  7088. https://bugs.webkit.org/show_bug.cgi?id=50186
  7089. * wtf/Vector3.h: Removed.
  7090. 2010-11-29 Steve Falkenburg <sfalken@apple.com>
  7091. Reviewed by Adam Roben.
  7092. Add a mechanism for Windows pre-build/pre-link/post-build events to be separated into individual cmd files
  7093. https://bugs.webkit.org/show_bug.cgi?id=49858
  7094. We're migrating our prebuild/prelink/postbuild steps out of vcproj and vsprops files:
  7095. - To simplify editing (editing vsprops build steps is confusing).
  7096. - For more readable diffs.
  7097. * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
  7098. * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added.
  7099. * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added.
  7100. 2010-11-29 Geoffrey Garen <ggaren@apple.com>
  7101. Reviewed by Gavin Barraclough.
  7102. Improved accuracy of command-line SunSpider.
  7103. * jsc.cpp:
  7104. (functionRun): Changed the "run" function to run a given test in
  7105. its own global object. Previously, all tests ran in the same global
  7106. object, which created name conflicts, and made globals from previous
  7107. tests artificially survive into later tests.
  7108. Also changed "run" to return the elapsed milliseconds when running a
  7109. given test, for slightly more accurate numbers.
  7110. (functionCheckSyntax): Ditto on returning elapsed milliseconds.
  7111. 2010-11-29 Darin Adler <darin@apple.com>
  7112. Reviewed by Andreas Kling.
  7113. Remove a couple unneeded overflow checks
  7114. https://bugs.webkit.org/show_bug.cgi?id=49816
  7115. * wtf/text/CString.cpp:
  7116. (WTF::CString::init): Use an ASSERT instead of
  7117. an overflow check with CRASH.
  7118. 2010-11-29 Adam Roben <aroben@apple.com>
  7119. Robustify react-to-vsprops-changes.py against changes to its location
  7120. or the location of the .vsprops files
  7121. Suggested by John Sullivan.
  7122. * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
  7123. Removed file_modification_times.
  7124. (main): Use glob.glob to find the .vsprops files and assert that we found some.
  7125. 2010-11-29 Adam Roben <aroben@apple.com>
  7126. Touch wtf/Platform.h whenever any .vsprops file changes
  7127. This will cause all files to be recompiled, which will make changes to
  7128. preprocessor macros (e.g., ENABLE_*) actually take effect.
  7129. Fixes <http://webkit.org/b/50167> Windows build fails when ENABLE_*
  7130. macros are changed (because not enough files are rebuilt)
  7131. Reviewed by John Sullivan.
  7132. * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
  7133. (main): Touch wtf/Platform.h if it's older than any .vsprops file. Also
  7134. added some comments and logging to make it clearer what the script is
  7135. doing and why.
  7136. 2010-11-29 Adam Roben <aroben@apple.com>
  7137. Update react-to-vsprops-changes.py after r72555
  7138. .vsprops files are no longer accessed relative to $WebKitLibrariesDir.
  7139. Fixes <http://webkit.org/b/50166> REGRESSION (r72555):
  7140. react-to-vsprops-changes.py no longer works for people with a
  7141. non-default $WebKitLibrariesDir
  7142. Reviewed by John Sullivan.
  7143. * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
  7144. (main): Always look in WebKitLibraries/win for .vsprops files, not in
  7145. $WebKitLibrariesDir.
  7146. 2010-11-28 Gavin Barraclough <barraclough@apple.com>
  7147. Reviewed by Sam Weinig.
  7148. Bug 48100 - YARR allows what seems like a bogus character-class range
  7149. Per ECMA-262 character classes containing character ranges containing
  7150. character classes are invalid, eg:
  7151. /[\d-x]/
  7152. /[x-\d]/
  7153. /[\d-\d]/
  7154. These should throw a syntax error.
  7155. * yarr/RegexParser.h:
  7156. 2010-11-27 Gavin Barraclough <barraclough@apple.com>
  7157. Reviewed by Sam Weinig.
  7158. Bug 48101 - Yarr gives different results for /(?:a*?){2,}/
  7159. The test cases in the linked mozilla bug demonstrate a couple of
  7160. problems in subpattern matching. These bugs lie in the optimized
  7161. cases - for matching parentheses with a quantity count of 1, and
  7162. for matching greedy quantified parentheses at the end of a regex
  7163. (which do not backtrack).
  7164. In both of these cases we are failing to correctly handle empty
  7165. matches. In the case of parentheses-single matches (quantity count
  7166. one) we are failing to test for empty matches at all. In the case
  7167. of terminal subpattern matches we do currently check, however there
  7168. is a subtler bug here too. In the case of an empty match we will
  7169. presently immediately fall through to the next alternative (or
  7170. complete the regex match), whereas upon a failed match we should
  7171. be backtracking into the failing alternative, to give it a chance
  7172. to match further (e.g. consider /a??b?|a/.exec("ab") - upon first
  7173. attempting to match the first alternative this will match the empty
  7174. string - since a?? is non-greedy, however rather than moving on to
  7175. the second alternative we should be re-matching the first one, at
  7176. which point the non-greedy a?? will match, and as such the result
  7177. should be "ab", not "a").
  7178. Terminal subpattern matching contains a second bug, too. The frame
  7179. location values in the subpattern should be being allocated with
  7180. the outer disjunction's frame (as we do for the parentheses-single
  7181. optimization). Consider the following three regexes:
  7182. /a*(?:b*)*c*/
  7183. /a*(?:b*)c*/
  7184. /a*(?:b*)*/
  7185. Considering only the frame location required by the atoms a,b, and
  7186. c, (ignoring space associated with the nested subpattern) the first
  7187. regex (a normal subpattern match) requires a frame size of 2 for
  7188. the outer disjunction, (to backtrack terms a & c), with each
  7189. iteration of the subpattern requiring a frame of size 1 (in order
  7190. to backtrack b). In the case of the second regex (where the
  7191. parentheses-single optimization will kick in) the outer frame must
  7192. be set up with a frame size of 3, since the outer frame will also
  7193. be used when running the nested subpattern. We will currently only
  7194. allocate a farme of size 1 for the outer disjuntion (to contain a),
  7195. howver the frame size should be 2 (since the subpattern will be
  7196. evaluated in the outer frame). In addition to failing to allocate
  7197. frame space the frame offsets are also presently invalid - in the
  7198. case of the last regex b's frame location will be set assuming it
  7199. to be the first term in the frame, whereas in this case b lies
  7200. after the term a, and should be taking a separate frame location.
  7201. In order to correctly allocate the frame for terminal subpattern
  7202. matches we must move this optimization back up from the JIT into
  7203. the compiler (and thus interpreter too), since this is where the
  7204. frame allocation takes place.
  7205. * yarr/RegexCompiler.cpp:
  7206. (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets):
  7207. (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
  7208. (JSC::Yarr::compileRegex):
  7209. * yarr/RegexInterpreter.cpp:
  7210. (JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
  7211. (JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
  7212. (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
  7213. (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
  7214. (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
  7215. (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
  7216. (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
  7217. (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
  7218. (JSC::Yarr::Interpreter::matchDisjunction):
  7219. (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
  7220. (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
  7221. (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
  7222. (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
  7223. (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
  7224. (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
  7225. (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
  7226. (JSC::Yarr::ByteCompiler::emitDisjunction):
  7227. * yarr/RegexInterpreter.h:
  7228. * yarr/RegexJIT.cpp:
  7229. (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
  7230. (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
  7231. (JSC::Yarr::RegexGenerator::generateTerm):
  7232. * yarr/RegexPattern.h:
  7233. (JSC::Yarr::PatternTerm::PatternTerm):
  7234. 2010-11-24 Patrick Gansterer <paroga@webkit.org>
  7235. Reviewed by Csaba Osztrogonác.
  7236. Remove Bakefile build system files
  7237. https://bugs.webkit.org/show_bug.cgi?id=49983
  7238. r53757 only removed the content, but not the files.
  7239. This patch removes that empty files.
  7240. * JavaScriptCoreSources.bkl: Removed.
  7241. * jscore.bkl: Removed.
  7242. 2010-11-24 Gabor Loki <loki@webkit.org>
  7243. Reviewed by Csaba Osztrogonác.
  7244. Merge the usage of jumps and calls at ARM-JIT
  7245. https://bugs.webkit.org/show_bug.cgi?id=50008
  7246. Those JmpSrc objects which represent jumps (not calls) should point to
  7247. after the jump instruction.
  7248. * assembler/ARMAssembler.h:
  7249. (JSC::ARMAssembler::blx):
  7250. (JSC::ARMAssembler::loadBranchTarget):
  7251. (JSC::ARMAssembler::getAbsoluteJumpAddress):
  7252. (JSC::ARMAssembler::linkJump):
  7253. (JSC::ARMAssembler::relinkJump):
  7254. (JSC::ARMAssembler::linkCall):
  7255. (JSC::ARMAssembler::relinkCall):
  7256. (JSC::ARMAssembler::getRelocatedAddress):
  7257. (JSC::ARMAssembler::getDifferenceBetweenLabels):
  7258. (JSC::ARMAssembler::getCallReturnOffset):
  7259. * assembler/MacroAssemblerARM.h:
  7260. (JSC::MacroAssemblerARM::call):
  7261. 2010-11-24 Carlos Garcia Campos <cgarcia@igalia.com>
  7262. Reviewed by Xan Lopez.
  7263. [GTK] Optimize foldCase, toLower and toUpper methods in glib unicode backend
  7264. https://bugs.webkit.org/show_bug.cgi?id=48625
  7265. GLib methods use UTF-8 strings, so we have to convert from UTF-16 to
  7266. UTF-8 to perform the case operations and then convert back the result to
  7267. UTF-16. GLib conversion methods return a new allocated string, so we
  7268. have to memcpy the result into the destination buffer too. Using our
  7269. own methods to convert between UTF-8 and UTF-16 from wtf/unicode/UTF8.h
  7270. we don't need such memcpy, since they take an already allocated buffer
  7271. rather than returning a new one. There's another optimization for the
  7272. case when the destination buffer is not large enough. In that case,
  7273. methods should return the expected destination buffer size and are
  7274. called again with a new buffer. We can avoid the conversion to UTF-16 by
  7275. pre-calculating the required size for the destination buffer.
  7276. * wtf/unicode/glib/UnicodeGLib.cpp:
  7277. (WTF::Unicode::getUTF16LengthFromUTF8):
  7278. (WTF::Unicode::convertCase):
  7279. (WTF::Unicode::foldCase):
  7280. (WTF::Unicode::toLower):
  7281. (WTF::Unicode::toUpper):
  7282. 2010-11-23 Patrick Gansterer <paroga@webkit.org>
  7283. Reviewed by Sam Weinig.
  7284. Use WTF::StringHasher directly in JavaScriptCore
  7285. https://bugs.webkit.org/show_bug.cgi?id=49893
  7286. * profiler/CallIdentifier.h:
  7287. (JSC::CallIdentifier::Hash::hash):
  7288. * runtime/Identifier.cpp:
  7289. (JSC::IdentifierCStringTranslator::hash):
  7290. (JSC::IdentifierUCharBufferTranslator::hash):
  7291. 2010-11-22 Patrick Gansterer <paroga@webkit.org>
  7292. Reviewed by Sam Weinig.
  7293. Add WTF::FixedArray::size()
  7294. https://bugs.webkit.org/show_bug.cgi?id=49891
  7295. Add a method to get the size of a FixedArray.
  7296. * wtf/FixedArray.h:
  7297. (WTF::FixedArray::size):
  7298. 2010-11-22 Patrick Gansterer <paroga@webkit.org>
  7299. Reviewed by Adam Roben.
  7300. [WINCE] Set correct preprocessor definitions
  7301. https://bugs.webkit.org/show_bug.cgi?id=49887
  7302. * wtf/Platform.h:
  7303. 2010-11-22 Adam Roben <aroben@apple.com>
  7304. Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files
  7305. Apple's Windows build allows placing header files and import libraries for WebKit's
  7306. dependencies (CoreGraphics, CFNetwork, SQLite, etc.) outside the source tree via the
  7307. $WebKitLibrariesDir environment variable. This is both required for production builds and
  7308. convenient for Apple-internal developer builds. Apple's production builds also require that
  7309. WebKit's shared .vsprops files be accessed relative to $WebKitLibrariesDir. In production
  7310. builds, the files are copied into that directory tree by the
  7311. WebKitLibraries/win/tools/WinTools.make file. In Apple-internal developer builds, the
  7312. copying is done by
  7313. JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make.
  7314. This .vsprops copying is problematic in one very important case: when a developer updates
  7315. their source tree and then tries to build. Visual Studio only reads .vsprops files when a
  7316. project is first loaded. So, when Visual Studio is first opened after the .vsprops files are
  7317. updated, it reads in the old files that were already residing in $WebKitLibrariesDir. When a
  7318. build is started, JavaScriptCoreGenerated.make copies the new .vsprops files into
  7319. $WebKitLibrariesDir, but Visual Studio will not pick up the changes. The rest of the build
  7320. will proceed with out-of-date .vsprops files, which will likely result in a build failure.
  7321. To fix this, we now use normal relative paths to access the .vsprops files in the source
  7322. tree rather than in $WebKitLibrariesDir, but prefix those paths with a new environment
  7323. variable, $WebKitVSPropsRedirectionDir. In developer builds, this environment variable is
  7324. unset, so the normal relative paths are used to read the .vsprops files out of the source
  7325. tree directly. In production builds, this environment variable is set to a fake directory
  7326. that will cause the .vsprops files in $WebKitLibrariesDir to be found when the relative path
  7327. is resolved.
  7328. For example, JavaScriptCore.vcproj uses this path for FeatureDefines.vsprops:
  7329. $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
  7330. In developer builds, where $WebKitVSPropsRedirectionDir is unset, this will point to the
  7331. files in WebKitLibraries\win\tools\vsprops in the source tree. In production builds,
  7332. JavaScriptCore.make sets $WebKitVSPropsRedirectionDir to
  7333. "$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\", so the full path for
  7334. FeatureDefines.vsprops becomes:
  7335. $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
  7336. which resolves to:
  7337. $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
  7338. (We rely on the fact that Windows doesn't care whether the directories "1", "2", and "3"
  7339. actually exist since they are matched by an equal number of ".." path components.)
  7340. Note that Visual Studio still won't pick up changes made to .vsprops files while Visual
  7341. Studio is open, but that problem hasn't seemed to cause developers many headaches so far.
  7342. Fixes <http://webkit.org/b/49181> Windows build fails mysteriously when .vsprops files are
  7343. updated
  7344. Reviewed by Dave Hyatt.
  7345. * JavaScriptCore.vcproj/JavaScriptCore.make: Set $WebKitVSPropsRedirectionDir so that
  7346. production builds can find the .vsprops files.
  7347. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stopy copying the
  7348. .vsprops files. It isn't needed anymore.
  7349. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  7350. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  7351. * JavaScriptCore.vcproj/jsc/jsc.vcproj:
  7352. * JavaScriptCore.vcproj/testapi/testapi.vcproj:
  7353. Changed to use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops
  7354. files.
  7355. 2010-11-19 Peter Varga <pvarga@inf.u-szeged.hu>
  7356. Reviewed by Gavin Barraclough.
  7357. YARR JIT should fallback to YARR Interpreter instead of PCRE.
  7358. https://bugs.webkit.org/show_bug.cgi?id=46719
  7359. Remove the ENABLE_YARR macro and the option of matching regular
  7360. expressions with PCRE from JavaScriptCore.
  7361. * runtime/JSGlobalData.h:
  7362. * runtime/RegExp.cpp:
  7363. (JSC::RegExp::compile):
  7364. (JSC::RegExp::match):
  7365. * tests/mozilla/expected.html:
  7366. * wtf/Platform.h:
  7367. * yarr/RegexCompiler.cpp:
  7368. * yarr/RegexCompiler.h:
  7369. * yarr/RegexInterpreter.cpp:
  7370. (JSC::Yarr::byteCompileRegex):
  7371. * yarr/RegexInterpreter.h:
  7372. * yarr/RegexJIT.cpp:
  7373. (JSC::Yarr::jitCompileRegex):
  7374. * yarr/RegexJIT.h:
  7375. (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
  7376. (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
  7377. (JSC::Yarr::RegexCodeBlock::getFallback):
  7378. (JSC::Yarr::RegexCodeBlock::isFallback):
  7379. (JSC::Yarr::RegexCodeBlock::setFallback):
  7380. (JSC::Yarr::executeRegex):
  7381. * yarr/RegexParser.h:
  7382. * yarr/RegexPattern.h:
  7383. 2010-11-20 Kwang Yul Seo <skyul@company100.net>
  7384. Reviewed by David Kilzer.
  7385. [BREWMP] Replace DBGPRINTF and DBGPRINTF_FATAL with dbg_Message
  7386. https://bugs.webkit.org/show_bug.cgi?id=49520
  7387. DBGPRINTF and DBGPRINTF_FATAL macros are prohibited in Mod1. Use dbg_Message instead.
  7388. * wtf/Assertions.cpp:
  7389. * wtf/Assertions.h:
  7390. 2010-11-20 Gabor Loki <loki@webkit.org>
  7391. Reviewed by Gavin Barraclough.
  7392. Support JIT_OPTIMIZE_MOD on Thumb-2
  7393. https://bugs.webkit.org/show_bug.cgi?id=49432
  7394. Rewrite the soft modulo operation into macroassembler form, and move it
  7395. to JSValue32_64 section.
  7396. Add support for soft modulo on Thumb-2 JIT also.
  7397. * assembler/ARMv7Assembler.h:
  7398. (JSC::ARMv7Assembler::clz):
  7399. * assembler/MacroAssemblerARM.h:
  7400. (JSC::MacroAssemblerARM::countLeadingZeros32):
  7401. (JSC::MacroAssemblerARM::relativeTableJump):
  7402. * assembler/MacroAssemblerARMv7.h:
  7403. (JSC::MacroAssemblerARMv7::countLeadingZeros32):
  7404. (JSC::MacroAssemblerARMv7::relativeTableJump):
  7405. * jit/JITArithmetic.cpp:
  7406. (JSC::JIT::emit_op_mod):
  7407. * jit/JITOpcodes.cpp:
  7408. (JSC::JIT::privateCompileCTIMachineTrampolines):
  7409. * jit/JITOpcodes32_64.cpp:
  7410. (JSC::JIT::softModulo):
  7411. * jit/JITStubs.cpp:
  7412. (JSC::JITThunks::JITThunks):
  7413. * wtf/Platform.h:
  7414. 2010-11-20 David Kilzer <ddkilzer@apple.com>
  7415. <http://webkit.org/b/49848> Make it possible to display the last character of a secure text field unobscured
  7416. Reviewed by Darin Adler.
  7417. * JavaScriptCore.exp:
  7418. * wtf/text/StringImpl.cpp:
  7419. (WTF::StringImpl::secure): Added argument that controls whether
  7420. the last character is obscured or not. Implemented behavior.
  7421. * wtf/text/StringImpl.h:
  7422. (WTF::StringImpl::LastCharacterBehavior): Added enum.
  7423. (WTF::StringImpl::secure): Updated method signature.
  7424. 2010-11-19 William Chan <willchan@chromium.org>
  7425. Reviewed by David Levin.
  7426. Add USE(CHROMIUM_NET)
  7427. Indicates the use of Chromium's network stack. Chromium's network
  7428. stack performs better when it has full view of all resource requests,
  7429. so USE(CHROMIUM_NET) can be used to bypass throttles.
  7430. https://bugs.webkit.org/show_bug.cgi?id=49778
  7431. * wtf/Platform.h:
  7432. 2010-11-19 Steve Falkenburg <sfalken@apple.com>
  7433. Reviewed by Adam Roben.
  7434. Add Debug_Cairo_CFLite and Release_Cairo_CFLite configurations for all vcproj files
  7435. https://bugs.webkit.org/show_bug.cgi?id=49819
  7436. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  7437. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
  7438. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  7439. * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
  7440. * JavaScriptCore.vcproj/jsc/jsc.vcproj:
  7441. * JavaScriptCore.vcproj/testapi/testapi.vcproj:
  7442. 2010-11-19 Oliver Hunt <oliver@apple.com>
  7443. Reviewed by Geoffrey Garen.
  7444. Don't check for constant registers when we can guarantee that the register won't be in the constant pool
  7445. https://bugs.webkit.org/show_bug.cgi?id=49814
  7446. Add uncheckedR(int) to CallFrame, and replace all the uses of r() with uncheckedR()
  7447. when we can guarantee that the register is not referring to a constant.
  7448. This makes the interpreter about 0.5% faster, and makes the CallFrame initialisation
  7449. logic correct when we're using a faked callframe (as in the case of the globalExec).
  7450. * bytecode/CodeBlock.cpp:
  7451. (JSC::CodeBlock::createActivation):
  7452. * debugger/DebuggerCallFrame.cpp:
  7453. (JSC::DebuggerCallFrame::thisObject):
  7454. * interpreter/CallFrame.h:
  7455. (JSC::ExecState::uncheckedR):
  7456. * interpreter/Interpreter.cpp:
  7457. (JSC::Interpreter::resolve):
  7458. (JSC::Interpreter::resolveSkip):
  7459. (JSC::Interpreter::resolveGlobal):
  7460. (JSC::Interpreter::resolveGlobalDynamic):
  7461. (JSC::Interpreter::resolveBase):
  7462. (JSC::Interpreter::resolveBaseAndProperty):
  7463. (JSC::Interpreter::callEval):
  7464. (JSC::Interpreter::unwindCallFrame):
  7465. (JSC::Interpreter::throwException):
  7466. (JSC::Interpreter::execute):
  7467. (JSC::Interpreter::executeCall):
  7468. (JSC::Interpreter::executeConstruct):
  7469. (JSC::Interpreter::prepareForRepeatCall):
  7470. (JSC::Interpreter::createExceptionScope):
  7471. (JSC::Interpreter::privateExecute):
  7472. * jit/JITStubs.cpp:
  7473. (JSC::DEFINE_STUB_FUNCTION):
  7474. * runtime/JSActivation.cpp:
  7475. (JSC::JSActivation::argumentsGetter):
  7476. 2010-11-19 Steve Falkenburg <sfalken@apple.com>
  7477. Reviewed by Darin Adler.
  7478. Normalize Cairo/CFLite project/solution configuration names
  7479. https://bugs.webkit.org/show_bug.cgi?id=49818
  7480. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  7481. * JavaScriptCore.vcproj/jsc/jsc.vcproj:
  7482. * JavaScriptCore.vcproj/testapi/testapi.vcproj:
  7483. 2010-11-18 Steve Falkenburg <sfalken@apple.com>
  7484. Reviewed by Adam Roben.
  7485. Windows vcproj configuration names should be normalized across projects
  7486. https://bugs.webkit.org/show_bug.cgi?id=49776
  7487. * JavaScriptCore.vcproj/JavaScriptCore.sln:
  7488. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
  7489. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added.
  7490. * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
  7491. 2010-11-19 Patrick Gansterer <paroga@webkit.org>
  7492. Unreviewed, build fix after r72360.
  7493. * bytecode/CodeBlock.h:
  7494. (JSC::CodeBlock::bytecodeOffset):
  7495. 2010-11-18 Gavin Barraclough <barraclough@apple.com>
  7496. Rubber stamped by Geoff Garen.
  7497. Bug 49577 - Function.prototype should be non-configurable
  7498. Ooops, Function.prototype should not be enumerable!
  7499. * runtime/JSFunction.cpp:
  7500. (JSC::JSFunction::getOwnPropertySlot):
  7501. 2010-11-18 Gavin Barraclough <barraclough@apple.com>
  7502. Reviewed by Oliver Hunt.
  7503. Bug 49708 - Stop recompiling functions to regenerate exception info.
  7504. Instead only hold info as necessary – keep divot info is the inspector
  7505. is enabled, line number info is debugging or profiling, and handler
  7506. info for functions with try/catch.
  7507. * bytecode/CodeBlock.cpp:
  7508. (JSC::CodeBlock::dumpStatistics):
  7509. (JSC::CodeBlock::CodeBlock):
  7510. (JSC::CodeBlock::lineNumberForBytecodeOffset):
  7511. (JSC::CodeBlock::expressionRangeForBytecodeOffset):
  7512. (JSC::CodeBlock::shrinkToFit):
  7513. * bytecode/CodeBlock.h:
  7514. (JSC::CodeBlock::bytecodeOffset):
  7515. (JSC::CodeBlock::addExpressionInfo):
  7516. (JSC::CodeBlock::addLineInfo):
  7517. (JSC::CodeBlock::hasExpressionInfo):
  7518. (JSC::CodeBlock::hasLineInfo):
  7519. (JSC::CodeBlock::needsCallReturnIndices):
  7520. (JSC::CodeBlock::callReturnIndexVector):
  7521. * bytecode/SamplingTool.cpp:
  7522. (JSC::SamplingTool::dump):
  7523. * bytecompiler/BytecodeGenerator.cpp:
  7524. (JSC::BytecodeGenerator::generate):
  7525. (JSC::BytecodeGenerator::BytecodeGenerator):
  7526. * bytecompiler/BytecodeGenerator.h:
  7527. (JSC::BytecodeGenerator::emitNode):
  7528. (JSC::BytecodeGenerator::emitNodeInConditionContext):
  7529. (JSC::BytecodeGenerator::emitExpressionInfo):
  7530. (JSC::BytecodeGenerator::addLineInfo):
  7531. * interpreter/Interpreter.cpp:
  7532. (JSC::Interpreter::unwindCallFrame):
  7533. (JSC::appendSourceToError):
  7534. (JSC::Interpreter::throwException):
  7535. (JSC::Interpreter::privateExecute):
  7536. (JSC::Interpreter::retrieveLastCaller):
  7537. * interpreter/Interpreter.h:
  7538. * jit/JIT.cpp:
  7539. (JSC::JIT::privateCompile):
  7540. * jit/JITStubs.cpp:
  7541. (JSC::jitThrow):
  7542. (JSC::DEFINE_STUB_FUNCTION):
  7543. * runtime/Collector.cpp:
  7544. (JSC::Heap::markRoots):
  7545. * runtime/Executable.cpp:
  7546. (JSC::EvalExecutable::compileInternal):
  7547. (JSC::ProgramExecutable::compileInternal):
  7548. (JSC::FunctionExecutable::compileForCallInternal):
  7549. (JSC::FunctionExecutable::compileForConstructInternal):
  7550. * runtime/Executable.h:
  7551. * runtime/JSGlobalData.cpp:
  7552. (JSC::JSGlobalData::JSGlobalData):
  7553. * runtime/JSGlobalData.h:
  7554. (JSC::JSGlobalData::usingAPI):
  7555. * runtime/JSGlobalObject.h:
  7556. (JSC::JSGlobalObject::supportsRichSourceInfo):
  7557. (JSC::JSGlobalObject::globalData):
  7558. 2010-11-18 Adam Roben <aroben@apple.com>
  7559. Add a script to delete manifest-related files when they are older than
  7560. any .vsprops file
  7561. Changes to .vsprops files can cause the manifest files to become
  7562. invalid, and Visual Studio doesn't always figure out that it needs to
  7563. rebuild them.
  7564. Reviewed by Sam Weinig.
  7565. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
  7566. Call the new script.
  7567. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
  7568. Added the new script.
  7569. * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Added.
  7570. (file_modification_times): Generator to return the modification time of
  7571. each file in a directory hierarchy.
  7572. (main): Get the modification time of the newest vsprops file, then find
  7573. all manifest-related files in the obj directory. Delete all
  7574. manifest-related files that are older than the newest vsprops file.
  7575. 2010-11-18 Mark Rowe <mrowe@apple.com>
  7576. Rubber-stamped by Adam Roben.
  7577. <rdar://problem/8602509&8602717&8602724> Enable compaction support.
  7578. * Configurations/JavaScriptCore.xcconfig:
  7579. 2010-11-18 Gavin Barraclough <barraclough@apple.com>
  7580. Reviewed by Oliver Hunt.
  7581. Bug 49635 - Profiler implementation is fragile
  7582. The profile presently requires the exception handling mechanism to explicitly
  7583. remove all stack frames that are exited during the exception unwind mechanism.
  7584. This is fragile in a number of ways:
  7585. * We have to change bytecode register allocation when compiling code to run
  7586. when profiling, to preserve the callee function (this is also required to
  7587. call did_call after the call has returned).
  7588. * In the JIT we have to maintain additional data structures
  7589. (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
  7590. containing the callee.
  7591. * In the interpreter we use 'magic values' to offset into the instruction
  7592. stream to rediscover the register containing the function.
  7593. Instead, move profiling into the head and tail of functions.
  7594. * This correctly accounts the cost of the call itself to the caller.
  7595. * This allows us to access the callee function object from the callframe.
  7596. * This means that at the point a call is made we can track the stack depth
  7597. on the ProfileNode.
  7598. * When unwinding we can simply report the depth at which the exception is
  7599. being handled - all call frames above this level are freed.
  7600. * bytecode/CodeBlock.cpp:
  7601. (JSC::CodeBlock::shrinkToFit):
  7602. * bytecode/CodeBlock.h:
  7603. (JSC::CodeBlock::bytecodeOffset):
  7604. (JSC::CodeBlock::methodCallLinkInfo):
  7605. * bytecompiler/BytecodeGenerator.cpp:
  7606. (JSC::BytecodeGenerator::emitCall):
  7607. (JSC::BytecodeGenerator::emitCallVarargs):
  7608. * interpreter/Interpreter.cpp:
  7609. (JSC::Interpreter::unwindCallFrame):
  7610. (JSC::Interpreter::throwException):
  7611. (JSC::Interpreter::execute):
  7612. (JSC::Interpreter::executeCall):
  7613. (JSC::Interpreter::executeConstruct):
  7614. (JSC::Interpreter::privateExecute):
  7615. * jit/JITStubs.cpp:
  7616. (JSC::DEFINE_STUB_FUNCTION):
  7617. * profiler/Profile.cpp:
  7618. (JSC::Profile::Profile):
  7619. * profiler/ProfileGenerator.cpp:
  7620. (JSC::ProfileGenerator::addParentForConsoleStart):
  7621. (JSC::ProfileGenerator::willExecute):
  7622. (JSC::ProfileGenerator::didExecute):
  7623. (JSC::ProfileGenerator::exceptionUnwind):
  7624. (JSC::ProfileGenerator::stopProfiling):
  7625. * profiler/ProfileGenerator.h:
  7626. * profiler/ProfileNode.cpp:
  7627. (JSC::ProfileNode::ProfileNode):
  7628. (JSC::ProfileNode::willExecute):
  7629. * profiler/ProfileNode.h:
  7630. (JSC::ProfileNode::create):
  7631. (JSC::ProfileNode::callerCallFrame):
  7632. * profiler/Profiler.cpp:
  7633. (JSC::dispatchFunctionToProfiles):
  7634. (JSC::Profiler::_willExecute):
  7635. (JSC::Profiler::_didExecute):
  7636. (JSC::Profiler::exceptionUnwind):
  7637. * profiler/Profiler.h:
  7638. 2010-11-18 Steve Falkenburg <sfalken@apple.com>
  7639. Reviewed by Adam Roben.
  7640. Remove leftover Windows Debug_Internal configurations
  7641. https://bugs.webkit.org/show_bug.cgi?id=49758
  7642. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  7643. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  7644. * JavaScriptCore.vcproj/jsc/jsc.vcproj:
  7645. * JavaScriptCore.vcproj/testapi/testapi.vcproj:
  7646. 2010-11-18 Chao-ying Fu <fu@mips.com>
  7647. Reviewed by Csaba Osztrogonác.
  7648. Avoid increasing required alignment of target type warning
  7649. https://bugs.webkit.org/show_bug.cgi?id=43963
  7650. * runtime/UString.h:
  7651. (JSC::UStringHash::equal):
  7652. * wtf/StdLibExtras.h:
  7653. 2010-11-17 Sam Weinig <sam@webkit.org>
  7654. Reviewed by Anders Carlsson.
  7655. Add stubbed out ScrollAnimator for the Mac
  7656. https://bugs.webkit.org/show_bug.cgi?id=49678
  7657. * wtf/Platform.h: Enable SMOOTH_SCROLLING on the Mac, this has no
  7658. change in behavior at the moment.
  7659. 2010-11-17 David Kilzer <ddkilzer@apple.com>
  7660. <http://webkit.org/b/49634> Make overflow guards in WTF::String::utf8 explicit
  7661. Reviewed by Darin Adler.
  7662. Add an explicit overflow check prior to allocating our buffer,
  7663. rather than implicitly relying on the guard in convertUTF16ToUTF8.
  7664. * wtf/text/WTFString.cpp:
  7665. (WTF::String::utf8):
  7666. 2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com>
  7667. Unreviewed, rolling out r72197.
  7668. http://trac.webkit.org/changeset/72197
  7669. https://bugs.webkit.org/show_bug.cgi?id=49661
  7670. broke fast/regex/test1.html (Requested by stampho on #webkit).
  7671. * runtime/JSGlobalData.h:
  7672. * runtime/RegExp.cpp:
  7673. (JSC::RegExpRepresentation::~RegExpRepresentation):
  7674. (JSC::RegExp::compile):
  7675. (JSC::RegExp::match):
  7676. * tests/mozilla/expected.html:
  7677. * wtf/Platform.h:
  7678. * yarr/RegexCompiler.cpp:
  7679. * yarr/RegexCompiler.h:
  7680. * yarr/RegexInterpreter.cpp:
  7681. * yarr/RegexInterpreter.h:
  7682. * yarr/RegexJIT.cpp:
  7683. (JSC::Yarr::jitCompileRegex):
  7684. * yarr/RegexJIT.h:
  7685. (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
  7686. (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
  7687. (JSC::Yarr::RegexCodeBlock::getFallback):
  7688. (JSC::Yarr::RegexCodeBlock::setFallback):
  7689. (JSC::Yarr::executeRegex):
  7690. * yarr/RegexParser.h:
  7691. * yarr/RegexPattern.h:
  7692. 2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu>
  7693. Reviewed by Gavin Barraclough.
  7694. YARR JIT should fallback to YARR Interpreter instead of PCRE.
  7695. https://bugs.webkit.org/show_bug.cgi?id=46719
  7696. Remove the ENABLE_YARR macro and the option of matching regular
  7697. expressions with PCRE from JavaScriptCore.
  7698. * runtime/JSGlobalData.h:
  7699. * runtime/RegExp.cpp:
  7700. (JSC::RegExp::compile):
  7701. (JSC::RegExp::match):
  7702. * tests/mozilla/expected.html:
  7703. * wtf/Platform.h:
  7704. * yarr/RegexCompiler.cpp:
  7705. * yarr/RegexCompiler.h:
  7706. * yarr/RegexInterpreter.cpp:
  7707. (JSC::Yarr::byteCompileRegex):
  7708. * yarr/RegexInterpreter.h:
  7709. * yarr/RegexJIT.cpp:
  7710. (JSC::Yarr::jitCompileRegex):
  7711. * yarr/RegexJIT.h:
  7712. (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
  7713. (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
  7714. (JSC::Yarr::RegexCodeBlock::getFallback):
  7715. (JSC::Yarr::RegexCodeBlock::isFallback):
  7716. (JSC::Yarr::RegexCodeBlock::setFallback):
  7717. (JSC::Yarr::executeRegex):
  7718. * yarr/RegexParser.h:
  7719. * yarr/RegexPattern.h:
  7720. 2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu>
  7721. Reviewed by Gavin Barraclough.
  7722. Extend YARR Interpreter with beginning character look-up optimization
  7723. https://bugs.webkit.org/show_bug.cgi?id=45751
  7724. Add beginning character look-up optimization which sets the start
  7725. index to the first possible successful pattern match.
  7726. Extend YARR Interpreter with lookupForBeginChars function which
  7727. implements the beginning character look-up optimization.
  7728. * yarr/RegexInterpreter.cpp:
  7729. (JSC::Yarr::Interpreter::InputStream::readPair):
  7730. (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
  7731. (JSC::Yarr::Interpreter::lookupForBeginChars):
  7732. (JSC::Yarr::Interpreter::matchDisjunction):
  7733. (JSC::Yarr::Interpreter::interpret):
  7734. * yarr/RegexInterpreter.h:
  7735. (JSC::Yarr::BytecodePattern::BytecodePattern):
  7736. 2010-11-17 Alexis Menard <alexis.menard@nokia.com>, Simon Hausmann <simon.hausmann@nokia.com>
  7737. Reviewed by Kenneth Christiansen, Tor Arne Vestbø.
  7738. [Qt] Add support for use GStreamer with the Qt build
  7739. Enable the build/inclusion of the wtf/QObject convenience classes.
  7740. * JavaScriptCore.pri:
  7741. * wtf/wtf.pri:
  7742. 2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu>
  7743. Reviewed by Gavin Barraclough.
  7744. Collect the beginning characters in a RegExp pattern for look-up
  7745. optimization
  7746. https://bugs.webkit.org/show_bug.cgi?id=45748
  7747. Extend the YARR's parser with an algorithm which collects the potential
  7748. beginning characters from a RegExp pattern for later look-up optimization.
  7749. * yarr/RegexCompiler.cpp:
  7750. (JSC::Yarr::BeginCharHelper::BeginCharHelper):
  7751. (JSC::Yarr::BeginCharHelper::addBeginChar):
  7752. (JSC::Yarr::BeginCharHelper::merge):
  7753. (JSC::Yarr::BeginCharHelper::addCharacter):
  7754. (JSC::Yarr::BeginCharHelper::linkHotTerms):
  7755. (JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor):
  7756. (JSC::Yarr::RegexPatternConstructor::addBeginTerm):
  7757. (JSC::Yarr::RegexPatternConstructor::setupDisjunctionBeginTerms):
  7758. (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
  7759. (JSC::Yarr::RegexPatternConstructor::setupBeginChars):
  7760. (JSC::Yarr::compileRegex):
  7761. * yarr/RegexPattern.h:
  7762. (JSC::Yarr::TermChain::TermChain):
  7763. (JSC::Yarr::BeginChar::BeginChar):
  7764. (JSC::Yarr::RegexPattern::RegexPattern):
  7765. (JSC::Yarr::RegexPattern::reset):
  7766. 2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com>
  7767. Unreviewed, rolling out r72160.
  7768. http://trac.webkit.org/changeset/72160
  7769. https://bugs.webkit.org/show_bug.cgi?id=49646
  7770. Broke lots of fast/profiler tests, among others (Requested by
  7771. aroben on #webkit).
  7772. * bytecode/CodeBlock.cpp:
  7773. (JSC::CodeBlock::dump):
  7774. (JSC::CodeBlock::functionRegisterForBytecodeOffset):
  7775. (JSC::CodeBlock::shrinkToFit):
  7776. * bytecode/CodeBlock.h:
  7777. (JSC::CodeBlock::addFunctionRegisterInfo):
  7778. * bytecode/Opcode.h:
  7779. * bytecompiler/BytecodeGenerator.cpp:
  7780. (JSC::BytecodeGenerator::BytecodeGenerator):
  7781. (JSC::BytecodeGenerator::emitCall):
  7782. (JSC::BytecodeGenerator::emitCallVarargs):
  7783. (JSC::BytecodeGenerator::emitReturn):
  7784. (JSC::BytecodeGenerator::emitConstruct):
  7785. * bytecompiler/BytecodeGenerator.h:
  7786. (JSC::CallArguments::profileHookRegister):
  7787. * bytecompiler/NodesCodegen.cpp:
  7788. (JSC::CallArguments::CallArguments):
  7789. * interpreter/Interpreter.cpp:
  7790. (JSC::Interpreter::unwindCallFrame):
  7791. (JSC::Interpreter::throwException):
  7792. (JSC::Interpreter::execute):
  7793. (JSC::Interpreter::executeCall):
  7794. (JSC::Interpreter::executeConstruct):
  7795. (JSC::Interpreter::privateExecute):
  7796. * jit/JIT.cpp:
  7797. (JSC::JIT::privateCompileMainPass):
  7798. * jit/JIT.h:
  7799. * jit/JITOpcodes.cpp:
  7800. (JSC::JIT::emit_op_profile_will_call):
  7801. (JSC::JIT::emit_op_profile_did_call):
  7802. * jit/JITOpcodes32_64.cpp:
  7803. (JSC::JIT::emit_op_profile_will_call):
  7804. (JSC::JIT::emit_op_profile_did_call):
  7805. * jit/JITStubs.cpp:
  7806. (JSC::DEFINE_STUB_FUNCTION):
  7807. * jit/JITStubs.h:
  7808. * profiler/Profile.cpp:
  7809. (JSC::Profile::Profile):
  7810. * profiler/ProfileGenerator.cpp:
  7811. (JSC::ProfileGenerator::addParentForConsoleStart):
  7812. (JSC::ProfileGenerator::willExecute):
  7813. (JSC::ProfileGenerator::didExecute):
  7814. (JSC::ProfileGenerator::stopProfiling):
  7815. * profiler/ProfileGenerator.h:
  7816. * profiler/ProfileNode.cpp:
  7817. (JSC::ProfileNode::ProfileNode):
  7818. (JSC::ProfileNode::willExecute):
  7819. * profiler/ProfileNode.h:
  7820. (JSC::ProfileNode::create):
  7821. (JSC::ProfileNode::operator==):
  7822. * profiler/Profiler.cpp:
  7823. (JSC::dispatchFunctionToProfiles):
  7824. (JSC::Profiler::willExecute):
  7825. (JSC::Profiler::didExecute):
  7826. * profiler/Profiler.h:
  7827. 2010-11-16 Gavin Barraclough <barraclough@apple.com>
  7828. Reviewed by Sam Weinig.
  7829. Bug 49635 - Profiler implementation is fragile
  7830. The profile presently requires the exception handling mechanism to explicitly
  7831. remove all stack frames that are exited during the exception unwind mechanism.
  7832. This is fragile in a number of ways:
  7833. * We have to change bytecode register allocation when compiling code to run
  7834. when profiling, to preserve the callee function (this is also required to
  7835. call did_call after the call has returned).
  7836. * In the JIT we have to maintain additional data structures
  7837. (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
  7838. containing the callee.
  7839. * In the interpreter we use 'magic values' to offset into the instruction
  7840. stream to rediscover the register containing the function.
  7841. Instead, move profiling into the head and tail of functions.
  7842. * This correctly accounts the cost of the call itself to the caller.
  7843. * This allows us to access the callee function object from the callframe.
  7844. * This means that at the point a call is made we can track the stack depth
  7845. on the ProfileNode.
  7846. * When unwinding we can simply report the depth at which the exception is
  7847. being handled - all call frames above this level are freed.
  7848. * JavaScriptCore.xcodeproj/project.pbxproj:
  7849. * bytecode/CodeBlock.cpp:
  7850. (JSC::CodeBlock::dump):
  7851. (JSC::CodeBlock::shrinkToFit):
  7852. * bytecode/CodeBlock.h:
  7853. (JSC::CodeBlock::bytecodeOffset):
  7854. (JSC::CodeBlock::methodCallLinkInfo):
  7855. * bytecode/Opcode.h:
  7856. * bytecompiler/BytecodeGenerator.cpp:
  7857. (JSC::BytecodeGenerator::BytecodeGenerator):
  7858. (JSC::BytecodeGenerator::emitCall):
  7859. (JSC::BytecodeGenerator::emitCallVarargs):
  7860. (JSC::BytecodeGenerator::emitReturn):
  7861. (JSC::BytecodeGenerator::emitConstruct):
  7862. * bytecompiler/BytecodeGenerator.h:
  7863. (JSC::CallArguments::count):
  7864. * bytecompiler/NodesCodegen.cpp:
  7865. (JSC::CallArguments::CallArguments):
  7866. * interpreter/Interpreter.cpp:
  7867. (JSC::ProfileHostCall::ProfileHostCall):
  7868. (JSC::ProfileHostCall::~ProfileHostCall):
  7869. (JSC::Interpreter::unwindCallFrame):
  7870. (JSC::Interpreter::throwException):
  7871. (JSC::Interpreter::execute):
  7872. (JSC::Interpreter::executeCall):
  7873. (JSC::Interpreter::executeConstruct):
  7874. (JSC::Interpreter::privateExecute):
  7875. * jit/JIT.cpp:
  7876. (JSC::JIT::privateCompileMainPass):
  7877. * jit/JIT.h:
  7878. * jit/JITOpcodes.cpp:
  7879. (JSC::JIT::emit_op_profile_has_called):
  7880. (JSC::JIT::emit_op_profile_will_return):
  7881. * jit/JITOpcodes32_64.cpp:
  7882. (JSC::JIT::emit_op_profile_has_called):
  7883. (JSC::JIT::emit_op_profile_will_return):
  7884. * jit/JITStubs.cpp:
  7885. (JSC::DEFINE_STUB_FUNCTION):
  7886. * jit/JITStubs.h:
  7887. * profiler/Profile.cpp:
  7888. (JSC::Profile::Profile):
  7889. * profiler/ProfileGenerator.cpp:
  7890. (JSC::ProfileGenerator::addParentForConsoleStart):
  7891. (JSC::ProfileGenerator::willExecute):
  7892. (JSC::ProfileGenerator::didExecute):
  7893. (JSC::ProfileGenerator::exceptionUnwind):
  7894. (JSC::ProfileGenerator::stopProfiling):
  7895. * profiler/ProfileGenerator.h:
  7896. * profiler/ProfileNode.cpp:
  7897. (JSC::ProfileNode::ProfileNode):
  7898. (JSC::ProfileNode::willExecute):
  7899. * profiler/ProfileNode.h:
  7900. (JSC::ProfileNode::create):
  7901. (JSC::ProfileNode::operator==):
  7902. (JSC::ProfileNode::exec):
  7903. * profiler/Profiler.cpp:
  7904. (JSC::dispatchFunctionToProfiles):
  7905. (JSC::Profiler::hasCalled):
  7906. (JSC::Profiler::willEvaluate):
  7907. (JSC::Profiler::willReturn):
  7908. (JSC::Profiler::didEvaluate):
  7909. (JSC::Profiler::exceptionUnwind):
  7910. * profiler/Profiler.h:
  7911. 2010-11-16 Brian Weinstein <bweinstein@apple.com>
  7912. Reviewed by Adam Roben and Steve Falkenburg.
  7913. Touch Platform.h to force a rebuild for Windows.
  7914. * wtf/Platform.h:
  7915. 2010-11-16 Steve Falkenburg <sfalken@apple.com>
  7916. Reviewed by Adam Roben.
  7917. Disable LTCG for Windows Release builds. Add new Release_LTCG configuration.
  7918. https://bugs.webkit.org/show_bug.cgi?id=49632
  7919. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  7920. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  7921. * JavaScriptCore.vcproj/jsc/jsc.vcproj:
  7922. * JavaScriptCore.vcproj/testapi/testapi.vcproj:
  7923. 2010-11-16 Peter Varga <pvarga@inf.u-szeged.hu>
  7924. Reviewed by Gavin Barraclough.
  7925. The number of recursive match calls isn't limited in YARR Interpreter
  7926. https://bugs.webkit.org/show_bug.cgi?id=47906
  7927. Check the number of the matchDisjunction recursive calls to avoid unbounded
  7928. recursion.
  7929. Now the matchDisjunction function returns JSRegExpResult instead of bool.
  7930. The JSRegExpResult enum contains the result of matching or the error code
  7931. of the failure (like HitLimit) which terminates the matching.
  7932. The error codes are based on pcre's jsRegExpExecute error codes.
  7933. * yarr/RegexInterpreter.cpp:
  7934. (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
  7935. (JSC::Yarr::Interpreter::matchParentheses):
  7936. (JSC::Yarr::Interpreter::backtrackParentheses):
  7937. (JSC::Yarr::Interpreter::matchDisjunction):
  7938. (JSC::Yarr::Interpreter::matchNonZeroDisjunction):
  7939. (JSC::Yarr::Interpreter::interpret):
  7940. (JSC::Yarr::Interpreter::Interpreter):
  7941. * yarr/RegexInterpreter.h:
  7942. 2010-11-16 Brian Weinstein <bweinstein@apple.com>
  7943. Rest of the Windows build fix.
  7944. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  7945. 2010-11-16 Gavin Barraclough <barraclough@apple.com>
  7946. Windows build fix pt 1.
  7947. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  7948. 2010-11-16 Gavin Barraclough <barraclough@apple.com>
  7949. Reviewed by Oliver Hunt.
  7950. https://bugs.webkit.org/show_bug.cgi?id=49606
  7951. The bug here is that we read the prototype from the RHS argument using a regular
  7952. op_get_by_id before op_instanceof has checked that this is an object implementing
  7953. HasInstance. This incorrect behaviour gives rise to further unnecessary complexity
  7954. in the code base, since we have additional logic (implemented using the
  7955. GetByIdExceptionInfo data structures on CodeBlock) to convert not an object errors
  7956. from the get_by_id into invalid parameter errors. Having fixed this bug this code
  7957. is all redundant, since in these cases the get_by_id will never have been reached.
  7958. * bytecode/CodeBlock.cpp:
  7959. (JSC::CodeBlock::dump):
  7960. (JSC::CodeBlock::shrinkToFit):
  7961. * bytecode/CodeBlock.h:
  7962. (JSC::CodeBlock::addExpressionInfo):
  7963. * bytecode/Opcode.h:
  7964. * bytecompiler/BytecodeGenerator.cpp:
  7965. (JSC::BytecodeGenerator::BytecodeGenerator):
  7966. (JSC::BytecodeGenerator::emitCheckHasInstance):
  7967. * bytecompiler/BytecodeGenerator.h:
  7968. * bytecompiler/NodesCodegen.cpp:
  7969. (JSC::InstanceOfNode::emitBytecode):
  7970. * interpreter/Interpreter.cpp:
  7971. (JSC::Interpreter::throwException):
  7972. (JSC::Interpreter::privateExecute):
  7973. * jit/JIT.cpp:
  7974. (JSC::JIT::privateCompileMainPass):
  7975. (JSC::JIT::privateCompileSlowCases):
  7976. * jit/JIT.h:
  7977. * jit/JITOpcodes.cpp:
  7978. (JSC::JIT::emit_op_check_has_instance):
  7979. (JSC::JIT::emit_op_instanceof):
  7980. (JSC::JIT::emitSlow_op_check_has_instance):
  7981. (JSC::JIT::emitSlow_op_instanceof):
  7982. * jit/JITOpcodes32_64.cpp:
  7983. (JSC::JIT::emit_op_check_has_instance):
  7984. (JSC::JIT::emit_op_instanceof):
  7985. (JSC::JIT::emitSlow_op_check_has_instance):
  7986. (JSC::JIT::emitSlow_op_instanceof):
  7987. * jit/JITStubs.cpp:
  7988. (JSC::DEFINE_STUB_FUNCTION):
  7989. * jit/JITStubs.h:
  7990. * runtime/ExceptionHelpers.cpp:
  7991. (JSC::createInterruptedExecutionException):
  7992. (JSC::createTerminatedExecutionException):
  7993. (JSC::createUndefinedVariableError):
  7994. (JSC::createNotAFunctionError):
  7995. (JSC::createNotAnObjectError):
  7996. * runtime/ExceptionHelpers.h:
  7997. * runtime/JSGlobalData.cpp:
  7998. (JSC::JSGlobalData::JSGlobalData):
  7999. * runtime/JSGlobalData.h:
  8000. * runtime/JSNotAnObject.cpp:
  8001. (JSC::JSNotAnObject::toPrimitive):
  8002. (JSC::JSNotAnObject::getPrimitiveNumber):
  8003. (JSC::JSNotAnObject::toBoolean):
  8004. (JSC::JSNotAnObject::toNumber):
  8005. (JSC::JSNotAnObject::toString):
  8006. (JSC::JSNotAnObject::toObject):
  8007. (JSC::JSNotAnObject::getOwnPropertySlot):
  8008. (JSC::JSNotAnObject::getOwnPropertyDescriptor):
  8009. (JSC::JSNotAnObject::put):
  8010. (JSC::JSNotAnObject::deleteProperty):
  8011. (JSC::JSNotAnObject::getOwnPropertyNames):
  8012. * runtime/JSNotAnObject.h:
  8013. (JSC::JSNotAnObject::JSNotAnObject):
  8014. * runtime/JSObject.h:
  8015. (JSC::JSObject::isActivationObject):
  8016. * runtime/JSValue.cpp:
  8017. (JSC::JSValue::toObjectSlowCase):
  8018. (JSC::JSValue::synthesizeObject):
  8019. (JSC::JSValue::synthesizePrototype):
  8020. 2010-11-15 Darin Adler <darin@apple.com>
  8021. Reviewed by Sam Weinig.
  8022. Harden additional string functions against large lengths
  8023. https://bugs.webkit.org/show_bug.cgi?id=49574
  8024. * wtf/text/CString.cpp:
  8025. (WTF::CString::init): Check for length that is too large for CString.
  8026. (WTF::CString::newUninitialized): Ditto.
  8027. (WTF::CString::copyBufferIfNeeded): Fix types so the length stays
  8028. in a size_t.
  8029. * wtf/text/WTFString.cpp:
  8030. (WTF::String::append): Check for length that is too large.
  8031. 2010-11-15 Gavin Barraclough <barraclough@apple.com>
  8032. Reviewed by Sam Weinig.
  8033. Bug 49577 - Function.prototype should be non-configurable
  8034. JSC lazily allocates the prototype property of Function objects.
  8035. We check the prototype exists on 'get', but not on 'put'.
  8036. If you 'put' without having first done a 'get' you can end up with a configurable
  8037. prototype (prototype should only ever be non-configurable).
  8038. This is visible in a couple of ways:
  8039. * 'delete' on the property may succeed. (the next access will result in a new,
  8040. reset prototype object).
  8041. * the prototype may be set to a getter.
  8042. * runtime/JSFunction.cpp:
  8043. (JSC::JSFunction::getOwnPropertyNames):
  8044. Reify the prototype property before allowing an enumerate including don't enum properties.
  8045. (JSC::JSFunction::put):
  8046. Reify the prototype property before any put to it.
  8047. 2010-11-15 Gavin Barraclough <barraclough@apple.com>
  8048. Reviewed by Geoff Garen.
  8049. Bug 49488 - Only add source specific information to exceptions in Interpreter::throwException
  8050. Three types of source location information are added to errors.
  8051. (1) Divot information.
  8052. This was added with the intention of using it to provide better source highlighting in the inspector.
  8053. We may still want to do so, but we probably should not be exposing these values in a manner visible to
  8054. user scripts – only through an internal C++ interface. The code adding divot properties to objects has
  8055. been removed.
  8056. (2) Line number information.
  8057. Line number information is presently sometimes added at the point the exception is created, and sometimes
  8058. added at the point the exception passes through throwException. Change this so that throwException has
  8059. the sole responsibility for adding line number and source file information.
  8060. (3) Source snippets in the message of certain type errors (e.g. 'doc' in `Result of expression 'doc' [undefined] is not an object.`).
  8061. These messages are currently created at the point the exceptions is raised. Instead reformat the message
  8062. such that the source snippet is located at the end (`Result of expression 'b1' [undefined] is not an object.`
  8063. becomes `'undefined' is not an object (evaluating 'b1.property')`), and append these to the message at
  8064. the in throw Exception. This presents a number of advantages:
  8065. * we no longer need to have source location information to create these TypeErrors.
  8066. * we can chose to append source location information in other error messages, including those where
  8067. passing source location to the point of construction would be inconvenient.
  8068. * we can chose in future to omit to append source location information when running in a non-debug mode.
  8069. This also cleans up some error output, e.g. removing double brackets ('[[]]') around objects in output,
  8070. removing double periods (..) at end of lines, and adding slightly more context to some errors.
  8071. * bytecode/CodeBlock.cpp:
  8072. (JSC::CodeBlock::expressionRangeForBytecodeOffset):
  8073. - Separated called to access line and range information.
  8074. * bytecode/CodeBlock.h:
  8075. - Separated called to access line and range information.
  8076. * interpreter/Interpreter.cpp:
  8077. (JSC::Interpreter::resolve):
  8078. (JSC::Interpreter::resolveSkip):
  8079. (JSC::Interpreter::resolveGlobal):
  8080. (JSC::Interpreter::resolveGlobalDynamic):
  8081. (JSC::Interpreter::resolveBaseAndProperty):
  8082. (JSC::isInvalidParamForIn):
  8083. (JSC::isInvalidParamForInstanceOf):
  8084. - Update parameters passed to error constructors.
  8085. (JSC::appendSourceToError):
  8086. - Update message property to add location information (previously added in createErrorMessage, in ExceptionHelpers)
  8087. (JSC::Interpreter::throwException):
  8088. - Updated to call appendSourceToError.
  8089. (JSC::Interpreter::privateExecute):
  8090. - Update parameters passed to error constructors.
  8091. * jit/JITStubs.cpp:
  8092. (JSC::DEFINE_STUB_FUNCTION):
  8093. - Update parameters passed to error constructors.
  8094. * runtime/Error.cpp:
  8095. (JSC::addErrorInfo):
  8096. (JSC::hasErrorInfo):
  8097. - Removed divot properties.
  8098. * runtime/Error.h:
  8099. - Removed divot properties.
  8100. * runtime/ErrorInstance.cpp:
  8101. (JSC::ErrorInstance::ErrorInstance):
  8102. - Initialize new property.
  8103. * runtime/ErrorInstance.h:
  8104. (JSC::ErrorInstance::appendSourceToMessage):
  8105. (JSC::ErrorInstance::setAppendSourceToMessage):
  8106. (JSC::ErrorInstance::clearAppendSourceToMessage):
  8107. - Added flag to check for errors needing location information appending.
  8108. (JSC::ErrorInstance::isErrorInstance):
  8109. - Added virtual method to check for ErrorInstances.
  8110. * runtime/ExceptionHelpers.cpp:
  8111. (JSC::createUndefinedVariableError):
  8112. (JSC::createInvalidParamError):
  8113. (JSC::createNotAConstructorError):
  8114. (JSC::createNotAFunctionError):
  8115. (JSC::createNotAnObjectError):
  8116. - Update parameters passed to error constructors, stopped adding line number information early, changed TypeError messages.
  8117. * runtime/ExceptionHelpers.h:
  8118. - Updated function signatures.
  8119. * runtime/JSFunction.cpp:
  8120. (JSC::callHostFunctionAsConstructor):
  8121. - Update parameters passed to error constructors.
  8122. * runtime/JSObject.h:
  8123. (JSC::JSObject::isErrorInstance):
  8124. - Added virtual method to check for ErrorInstances.
  8125. 2010-11-12 Anders Carlsson <andersca@apple.com>
  8126. Reviewed by Adam Roben.
  8127. CString(const char*) crashes when passed a null pointer
  8128. https://bugs.webkit.org/show_bug.cgi?id=49450
  8129. * wtf/text/CString.cpp:
  8130. (WTF::CString::CString):
  8131. Return early if str is null.
  8132. 2010-11-11 Gavin Barraclough <barraclough@apple.com>
  8133. Reviewed by Oliver Hunt.
  8134. Bug 49420 - Clean up syntax/reference error throw.
  8135. Some errors detected at compile time are thrown at runtime. We currently do so using a op_new_error/op_throw bytecode pair.
  8136. This is not ideal. op_throw is used for explicit user throw statements, and has different requirements in terms or meta data
  8137. attached to the exception (controlled by the explicitThrow parameter passed to Interpreter::throwException). To work around
  8138. this, op_new_error has to add the meta data at an early stage, which is unlike other VM exceptions being raised.
  8139. We can simplify this and bring into line with other exception behaviour by changing new_error from just allocating an
  8140. Exception instance to also throwing it – but as a regular VM throw, correctly passing explicitThrow as false.
  8141. * JavaScriptCore.xcodeproj/project.pbxproj:
  8142. * bytecode/CodeBlock.cpp:
  8143. (JSC::CodeBlock::dump):
  8144. (JSC::CodeBlock::expressionRangeForBytecodeOffset):
  8145. * bytecode/Opcode.h:
  8146. * bytecompiler/BytecodeGenerator.cpp:
  8147. (JSC::BytecodeGenerator::emitThrowReferenceError):
  8148. (JSC::BytecodeGenerator::emitThrowSyntaxError):
  8149. (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
  8150. * bytecompiler/BytecodeGenerator.h:
  8151. (JSC::BytecodeGenerator::emitNodeInConditionContext):
  8152. * bytecompiler/NodesCodegen.cpp:
  8153. (JSC::ThrowableExpressionData::emitThrowReferenceError):
  8154. (JSC::ThrowableExpressionData::emitThrowSyntaxError):
  8155. (JSC::RegExpNode::emitBytecode):
  8156. (JSC::PostfixErrorNode::emitBytecode):
  8157. (JSC::PrefixErrorNode::emitBytecode):
  8158. (JSC::AssignErrorNode::emitBytecode):
  8159. (JSC::ForInNode::emitBytecode):
  8160. (JSC::ContinueNode::emitBytecode):
  8161. (JSC::BreakNode::emitBytecode):
  8162. (JSC::ReturnNode::emitBytecode):
  8163. (JSC::LabelNode::emitBytecode):
  8164. * interpreter/Interpreter.cpp:
  8165. (JSC::Interpreter::privateExecute):
  8166. * jit/JIT.cpp:
  8167. (JSC::JIT::privateCompileMainPass):
  8168. * jit/JIT.h:
  8169. * jit/JITOpcodes.cpp:
  8170. (JSC::JIT::emit_op_throw_reference_error):
  8171. (JSC::JIT::emit_op_throw_syntax_error):
  8172. * jit/JITOpcodes32_64.cpp:
  8173. (JSC::JIT::emit_op_throw_reference_error):
  8174. (JSC::JIT::emit_op_throw_syntax_error):
  8175. * jit/JITStubs.cpp:
  8176. (JSC::DEFINE_STUB_FUNCTION):
  8177. * jit/JITStubs.h:
  8178. * parser/Nodes.h:
  8179. 2010-11-11 Darin Adler <darin@apple.com>
  8180. Reviewed by Sam Weinig.
  8181. Harden some string functions against large lengths
  8182. https://bugs.webkit.org/show_bug.cgi?id=49293
  8183. * wtf/text/StringImpl.cpp:
  8184. (WTF::StringImpl::create): Fix incorrect use of PassRefPtr. Check for
  8185. strlen results that are too large for StringImpl.
  8186. (WTF::StringImpl::lower): Check for lengths that are too large for
  8187. int32_t.
  8188. (WTF::StringImpl::upper): Fix incorrect use of PassRefPtr. Check for
  8189. lengths that are too large for int32_t.
  8190. (WTF::StringImpl::secure): Fix incorect use of PassRefPtr. Use unsigned
  8191. rather than int and int32_t so we can handle any length.
  8192. (WTF::StringImpl::foldCase): Fix incorrect use of PassRefPtr. Check for
  8193. lengths that are too large for int32_t.
  8194. (WTF::StringImpl::find): Check for strlen results that are too large for
  8195. StringImpl.
  8196. (WTF::StringImpl::findIgnoringCase): Ditto.
  8197. (WTF::StringImpl::replace): Fix incorrect use of PassRefPtr.
  8198. (WTF::StringImpl::createWithTerminatingNullCharacter): Check before
  8199. incrementing length.
  8200. 2010-11-11 Dan Horák <dan@danny.cz>
  8201. Reviewed by Andreas Kling.
  8202. Add support for the s390/s390x architectures, it's big-endian
  8203. with s390 being 32-bit and s390x being 64-bit.
  8204. https://bugs.webkit.org/show_bug.cgi?id=34786
  8205. * wtf/Platform.h:
  8206. 2010-11-10 Csaba Osztrogonác <ossy@webkit.org>
  8207. Reviewed by David Hyatt.
  8208. HTML5 Ruby support should be mandatory feature
  8209. https://bugs.webkit.org/show_bug.cgi?id=49272
  8210. Remove Ruby as optional feature.
  8211. * Configurations/FeatureDefines.xcconfig:
  8212. * JavaScriptCorePrefix.h:: Touch it to avoid incremental build failure on Windows.
  8213. 2010-11-10 Peter Rybin <peter.rybin@gmail.com>
  8214. Reviewed by Adam Barth.
  8215. HTML parser should provide script column position within HTML document to JavaScript engine
  8216. https://bugs.webkit.org/show_bug.cgi?id=45271
  8217. Adds TextPosition* classes -- a structure that stores line/column/generation
  8218. level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
  8219. wrappers that emphasize whether int number is used as zero-based or
  8220. one-based.
  8221. * GNUmakefile.am:
  8222. * JavaScriptCore.gypi:
  8223. * JavaScriptCore.xcodeproj/project.pbxproj:
  8224. * wtf/text/TextPosition.h: Added.
  8225. (WTF::TextPosition::TextPosition):
  8226. (WTF::TextPosition::minimumPosition):
  8227. (WTF::TextPosition::belowRangePosition):
  8228. (WTF::ZeroBasedNumber::fromZeroBasedInt):
  8229. (WTF::ZeroBasedNumber::ZeroBasedNumber):
  8230. (WTF::ZeroBasedNumber::zeroBasedInt):
  8231. (WTF::ZeroBasedNumber::base):
  8232. (WTF::ZeroBasedNumber::belowBase):
  8233. (WTF::OneBasedNumber::fromOneBasedInt):
  8234. (WTF::OneBasedNumber::OneBasedNumber):
  8235. (WTF::OneBasedNumber::oneBasedInt):
  8236. (WTF::OneBasedNumber::convertAsZeroBasedInt):
  8237. (WTF::OneBasedNumber::convertToZeroBased):
  8238. (WTF::OneBasedNumber::base):
  8239. (WTF::OneBasedNumber::belowBase):
  8240. (WTF::toZeroBasedTextPosition):
  8241. (WTF::toOneBasedTextPosition):
  8242. (WTF::ZeroBasedNumber::convertToOneBased):
  8243. 2010-11-09 Gabor Loki <loki@webkit.org>
  8244. Reviewed by Gavin Barraclough.
  8245. ARM JIT asserts when loading http://reader.google.com in debug mode
  8246. https://bugs.webkit.org/show_bug.cgi?id=48912
  8247. There are several cases when the uninterrupted sequence is larger than
  8248. maximum required offset for pathing the same sequence. Eg.: if in a
  8249. uninterrupted sequence the last macroassembler's instruction is a stub
  8250. call, it emits store instruction(s) which should not be included in the
  8251. calculation of length of uninterrupted sequence. So, the insnSpace and
  8252. constSpace should be upper limit instead of hard limit.
  8253. * jit/JIT.h:
  8254. * jit/JITInlineMethods.h:
  8255. (JSC::JIT::endUninterruptedSequence):
  8256. 2010-11-09 David Kilzer <ddkilzer@apple.com>
  8257. <http://webkit.org/b/49279> Fix include statements for local headers
  8258. Reviewed by Gavin Barraclough.
  8259. Use "Foo.h" instead of <Foo.h> for local headers.
  8260. * assembler/AbstractMacroAssembler.h: Also fixed sort order.
  8261. * assembler/CodeLocation.h:
  8262. * yarr/RegexJIT.h:
  8263. * yarr/RegexParser.h:
  8264. 2010-11-08 Adam Roben <aroben@apple.com>
  8265. Roll out r71532
  8266. It broke the build for Cygwin 1.7 installs. Cygwin 1.7's default
  8267. .bashrc unsets %TEMP%, which broke copy-tools.cmd.
  8268. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
  8269. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
  8270. * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Removed.
  8271. * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Removed.
  8272. 2010-11-08 Martin Robinson <mrobinson@igalia.com>
  8273. Reviewed by Xan Lopez.
  8274. >=webkitgtk-1.2.5: parallel build fails with libtool: link: cannot find the library `libwebkit-1.0.la' or unhandled argument `libwebkit-1.0.la'
  8275. https://bugs.webkit.org/show_bug.cgi?id=49128
  8276. r59042 introduced a C++-style comment in Platform.h, which is often
  8277. included in C source files. Change it to a C-style comment.
  8278. * wtf/Platform.h: Fix the C++-style comment.
  8279. 2010-11-08 Adam Roben <aroben@apple.com>
  8280. Show a message and cause the build to immediately fail when any
  8281. .vsprops files are copied
  8282. When $WebKitLibrariesDir is set to a non-standard location, the
  8283. .vsprops files have to be copied from WebKitLibraries/win to
  8284. $WebKitLibrariesDir. When this happens, Visual Studio doesn't pick up
  8285. changes to the .vsprops files until the next time it opens the solution
  8286. file. Before this patch, the build would soldier on with the old
  8287. .vsprops files, leading to strange build failures. Now we detect that
  8288. the .vsprops files have been updated, display a message to the user
  8289. telling them what to do, and make the build fail immediately.
  8290. Fixes <http://webkit.org/b/49181> Windows build fail mysteriously when
  8291. .vsprops files are updated
  8292. Reviewed by Steve Falkenburg.
  8293. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
  8294. Moved code to copy the tools directory to the new copy-tools.cmd
  8295. script. Moved that after the command that writes the buildfailed file
  8296. so the build will be considered a failure if copy-tools.cmd fails.
  8297. Changed to write the project name into buildfailed like all our other
  8298. projects do, so those other projects will know that the failure was due
  8299. to this project.
  8300. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
  8301. Added new scripts.
  8302. * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Added. Copies
  8303. the tools directory to $WebKitLibrariesDir. If any files were copied,
  8304. we display a message to the user and exit with error code 1 to cause
  8305. the build to fail. In non-interactive builds, we just print the message
  8306. to the build log. In interactive builds, we show the message in an
  8307. alert.
  8308. * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Added. Uses
  8309. Windows Scripting Host to display a message in an alert.
  8310. 2010-11-07 Sam Magnuson <smagnuson@netflix.com>
  8311. Reviewed by Andreas Kling.
  8312. [Qt] make install does not cause JavaScriptCore to be built
  8313. https://bugs.webkit.org/show_bug.cgi?id=49114
  8314. * JavaScriptCore.pro:
  8315. 2010-11-05 Oliver Hunt <oliver@apple.com>
  8316. Reviewed by Gavin Barraclough.
  8317. Website consistently crashing TOT in JIT::execute() on news.com.au
  8318. https://bugs.webkit.org/show_bug.cgi?id=48954
  8319. The problem here was the strict pass of this conversion was loading the
  8320. this structure into one register but doing the flags check off a different
  8321. register. This is clearly wrong. I have been unable to trigger the crash
  8322. with a reduction, but I've added an assertion to the this conversion to
  8323. attempt to make it more readily catchable in future.
  8324. * jit/JITOpcodes.cpp:
  8325. (JSC::JIT::emit_op_convert_this_strict):
  8326. * jit/JITOpcodes32_64.cpp:
  8327. (JSC::JIT::emit_op_convert_this_strict):
  8328. * jit/JITStubs.cpp:
  8329. (JSC::DEFINE_STUB_FUNCTION):
  8330. 2010-11-04 Xan Lopez <xlopez@igalia.com>
  8331. Reviewed by Adam Barth.
  8332. Use leakRef instead of releaseRef
  8333. https://bugs.webkit.org/show_bug.cgi?id=48974
  8334. Use leakRef instead of the deprecated releaseRef. This was renamed
  8335. some time ago because 'releaseRef' is too close to 'release',
  8336. which does something completely different.
  8337. 2010-11-04 Eric Seidel <eric@webkit.org>
  8338. Reviewed by Gavin Barraclough.
  8339. REGRESSION(49798): Crash in HTMLObjectElement::parseMappedAttribute
  8340. https://bugs.webkit.org/show_bug.cgi?id=48789
  8341. The contract for all String/AtomicString methods seems to be that it's
  8342. safe to call them, even when the String is null (impl() returns 0).
  8343. This contract was broken by r49798 (unintentionally) when optimizing
  8344. for dromeo.
  8345. This patch adds a null check to AtomicString::lower() fixing this
  8346. crash and preventing future confusion.
  8347. * wtf/text/AtomicString.cpp:
  8348. (WTF::AtomicString::lower):
  8349. 2010-11-04 Adam Barth <abarth@webkit.org>
  8350. Enabled ICCJPEG on Chromium Mac
  8351. https://bugs.webkit.org/show_bug.cgi?id=48977
  8352. * wtf/Platform.h:
  8353. 2010-11-03 Oliver Hunt <oliver@apple.com>
  8354. Reviewed by Gavin Barraclough.
  8355. Crash in Function.prototype.call.apply
  8356. https://bugs.webkit.org/show_bug.cgi?id=48485
  8357. The problem here was op_load_varargs failing to ensure that
  8358. there was sufficient space for the entire callframe prior to
  8359. op_call_varargs. This meant that when we then re-entered the
  8360. VM it was possible to stomp over an earlier portion of the
  8361. stack, so causing sub-optimal behaviour.
  8362. * bytecode/Opcode.h:
  8363. * bytecompiler/BytecodeGenerator.cpp:
  8364. (JSC::BytecodeGenerator::emitLoadVarargs):
  8365. * bytecompiler/BytecodeGenerator.h:
  8366. * bytecompiler/NodesCodegen.cpp:
  8367. (JSC::ApplyFunctionCallDotNode::emitBytecode):
  8368. * jit/JIT.cpp:
  8369. (JSC::JIT::privateCompile):
  8370. * jit/JITOpcodes.cpp:
  8371. (JSC::JIT::emit_op_load_varargs):
  8372. 2010-11-03 Kenneth Russell <kbr@google.com>
  8373. Reviewed by Chris Marrin.
  8374. Redesign extension mechanism in GraphicsContext3D
  8375. https://bugs.webkit.org/show_bug.cgi?id=46894
  8376. * JavaScriptCore.exp:
  8377. - Exposed String::split(const String&, Vector<String>).
  8378. 2010-11-03 Adam Roben <aroben@apple.com>
  8379. Bring WTF.vcproj up to date
  8380. * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added filters for the text and
  8381. unicode directories, added new files, removed old files.
  8382. 2010-11-03 Gabor Loki <loki@webkit.org>
  8383. Reviewed by Andreas Kling.
  8384. Remove unused initializeWeakRandomNumberGenerator
  8385. https://bugs.webkit.org/show_bug.cgi?id=48899
  8386. WeakRandom class is used instead of weakRandomNumber and its initializer.
  8387. * wtf/RandomNumberSeed.h:
  8388. 2010-11-03 Gabor Loki <loki@webkit.org>
  8389. Reviewed by Geoffrey Garen.
  8390. Unused class: JSFastMath with JSValue64
  8391. https://bugs.webkit.org/show_bug.cgi?id=48835
  8392. Remove unused JSFastMath class.
  8393. * runtime/JSImmediate.h:
  8394. 2010-11-02 Adam Roben <aroben@apple.com>
  8395. Windows build fix after r71127
  8396. MSVC isn't smart enough to figure out that the definition of the global
  8397. nullptr variable isn't needed, so we provide one for it.
  8398. Fixes <http://webkit.org/b/48862> Windows build is broken due to
  8399. undefined symbol nullptr
  8400. Reviewed by Anders Carlsson.
  8401. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export nullptr.
  8402. * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added NullPtr.cpp and let VS
  8403. resort the files.
  8404. * wtf/NullPtr.cpp: Added.
  8405. 2010-11-02 Martin Robinson <mrobinson@igalia.com>
  8406. Reviewed by Xan Lopez.
  8407. Remove special handling of HashTableDeletedValue in PlatformRefPtr and manually manage memory that cannot be controlled by HashTraits
  8408. https://bugs.webkit.org/show_bug.cgi?id=48841
  8409. Remove special handling of HashTableDeletedValue in PlatformRefPtr.
  8410. This is better handled on a case-by-case basis, when HashTraits
  8411. cannot account for it.
  8412. * wtf/PlatformRefPtr.h:
  8413. (WTF::PlatformRefPtr::~PlatformRefPtr):
  8414. (WTF::PlatformRefPtr::clear):
  8415. (WTF::::operator):
  8416. 2010-10-29 Oliver Hunt <oliver@apple.com>
  8417. Reviewed by Gavin Barraclough.
  8418. REGRESSION: r69429-r69611: Crash in JSC::Interpreter::privateExecute
  8419. https://bugs.webkit.org/show_bug.cgi?id=47573
  8420. I think the interpreter portion of this was introduced by
  8421. an incorrect but silent merge when I updated prior to committing.
  8422. The JIT change is basically just a correctness fix, but it is
  8423. needed to prevent the testcase from asserting in debug builds.
  8424. The basic problem is incorrectly setting the activation object
  8425. on an arguments object. The crash was due to us setting a null
  8426. activation in the interpreter, in the jit we were setting the
  8427. activation of a strict mode arguments object.
  8428. * interpreter/Interpreter.cpp:
  8429. (JSC::Interpreter::privateExecute):
  8430. * jit/JITStubs.cpp:
  8431. (JSC::DEFINE_STUB_FUNCTION):
  8432. * wtf/Platform.h:
  8433. 2010-10-29 Csaba Osztrogonác <ossy@webkit.org>
  8434. Reviewed by Adam Roben and David Kilzer.
  8435. Fix and cleanup of build systems
  8436. https://bugs.webkit.org/show_bug.cgi?id=48342
  8437. * Configurations/FeatureDefines.xcconfig: Add missing ENABLE_FULLSCREEN_API
  8438. 2010-10-28 Kwang Yul Seo <skyul@company100.net>
  8439. Reviewed by Darin Adler.
  8440. Include stddef.h unconditionally in Assertions.h
  8441. https://bugs.webkit.org/show_bug.cgi?id=48573
  8442. There is no reason to have stddef.h include be MSVC-only.
  8443. * wtf/Assertions.h:
  8444. 2010-10-28 Herczeg Zoltan <zherczeg@webkit.org>
  8445. Rubber stamped by Csaba Osztrogonác.
  8446. Try to fix interpreter build.
  8447. Needed parentheses around assignment to avoid GCC warning after
  8448. http://trac.webkit.org/changeset/70703
  8449. * interpreter/Interpreter.cpp:
  8450. (JSC::Interpreter::privateExecute):
  8451. 2010-10-28 Peter Varga <pvarga@inf.u-szeged.hu>
  8452. Reviewed by Csaba Osztrogonác.
  8453. resetAssertionMatches() is an unused function in YARR Interpreter
  8454. https://bugs.webkit.org/show_bug.cgi?id=48503
  8455. The resetAssertionMatches() function is removed from YARR Interpreter
  8456. because it's never called.
  8457. * yarr/RegexInterpreter.cpp:
  8458. (JSC::Yarr::Interpreter::resetMatches):
  8459. 2010-10-28 Zoltan Herczeg <zherczeg@webkit.org>
  8460. Reviewed by Andreas Kling.
  8461. Wrong instruction form for BKPT
  8462. https://bugs.webkit.org/show_bug.cgi?id=48427
  8463. One '0' is missing from BKPT instruction.
  8464. Thanks for Jacob Bramley for reporting this error.
  8465. * assembler/ARMAssembler.h:
  8466. 2010-10-28 Xan Lopez <xlopez@igalia.com>
  8467. Try to fix Snow Leopard build.
  8468. * jit/JITPropertyAccess.cpp:
  8469. (JSC::JIT::testPrototype):
  8470. 2010-10-28 Xan Lopez <xlopez@igalia.com>
  8471. Reviewed by Oliver Hunt.
  8472. Do not have two different asCell APIs in JSValue
  8473. https://bugs.webkit.org/show_bug.cgi?id=47979
  8474. Remove JSCell* asCell(JSValue) in favor of only using
  8475. JSValue::asCell().
  8476. * API/APICast.h:
  8477. (toRef):
  8478. * jit/JITPropertyAccess32_64.cpp:
  8479. (JSC::JIT::testPrototype):
  8480. * jit/JITStubs.cpp:
  8481. (JSC::JITThunks::tryCachePutByID):
  8482. (JSC::JITThunks::tryCacheGetByID):
  8483. (JSC::DEFINE_STUB_FUNCTION):
  8484. * runtime/GetterSetter.h:
  8485. (JSC::asGetterSetter):
  8486. * runtime/JSByteArray.h:
  8487. (JSC::asByteArray):
  8488. * runtime/JSCell.h:
  8489. (JSC::JSCell::getCallData):
  8490. (JSC::JSCell::getConstructData):
  8491. * runtime/JSString.h:
  8492. (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
  8493. (JSC::asString):
  8494. * runtime/JSValue.h:
  8495. * runtime/Operations.cpp:
  8496. (JSC::jsIsObjectType):
  8497. * runtime/Operations.h:
  8498. (JSC::normalizePrototypeChain):
  8499. * runtime/Protect.h:
  8500. (JSC::gcProtect):
  8501. (JSC::gcUnprotect):
  8502. 2010-10-27 Chao-ying Fu <fu@mips.com>
  8503. Reviewed by Oliver Hunt.
  8504. Support emit_op_mod() for MIPS on JSVALUE32_64
  8505. https://bugs.webkit.org/show_bug.cgi?id=46511
  8506. This patch uses MIPS div instructions for op_mod to improve performance.
  8507. * jit/JITArithmetic32_64.cpp:
  8508. (JSC::JIT::emit_op_mod):
  8509. 2010-10-27 Brent Fulgham <bfulgham@webkit.org>
  8510. Unreviewed build correction.
  8511. * wtf/Platform.h: Make sure ACCELERATED_COMPOSITING is
  8512. turned off in the WinCairo port. This isn't supported (yet.)
  8513. 2010-10-27 Chris Rogers <crogers@google.com>
  8514. Reviewed by Chris Marrin.
  8515. Add ENABLE_WEB_AUDIO feature enable flag (initially disabled) to build-webkit
  8516. https://bugs.webkit.org/show_bug.cgi?id=48279
  8517. * Configurations/FeatureDefines.xcconfig:
  8518. 2010-10-27 Brian Weinstein <bweinstein@apple.com>
  8519. Windows build fix.
  8520. * jit/JITStubs.cpp:
  8521. (JSC::jitThrow):
  8522. 2010-10-27 Gavin Barraclough <barraclough@apple.com>
  8523. Reviewed by Oliver Hunt.
  8524. Bug 48365 - Remove output parameters from JITStackFrame
  8525. The JIT stub functions presently use the stackframe to provide a couple of additional return values.
  8526. * In the case of uncaught exceptions the exception value is returned on the stackframe.exception property.
  8527. * In the case of caught exceptions the updated value for the callFrame register is returned on the stackframe.callFrame property.
  8528. Change exception returns such that exceptions are always returned on JSGlobalData::exception.
  8529. Change op_catch such that the new CallFrame value is returned from op_throw / vm_throw in regT0.
  8530. * JavaScriptCore.xcodeproj/project.pbxproj:
  8531. * debugger/Debugger.cpp:
  8532. (JSC::evaluateInGlobalCallFrame):
  8533. * debugger/DebuggerCallFrame.cpp:
  8534. (JSC::DebuggerCallFrame::evaluate):
  8535. * interpreter/CachedCall.h:
  8536. (JSC::CachedCall::CachedCall):
  8537. (JSC::CachedCall::call):
  8538. * interpreter/CallFrame.h:
  8539. (JSC::ExecState::exception):
  8540. * interpreter/Interpreter.cpp:
  8541. (JSC::Interpreter::callEval):
  8542. (JSC::Interpreter::Interpreter):
  8543. (JSC::Interpreter::execute):
  8544. (JSC::Interpreter::executeCall):
  8545. (JSC::Interpreter::executeConstruct):
  8546. (JSC::Interpreter::prepareForRepeatCall):
  8547. (JSC::Interpreter::privateExecute):
  8548. * interpreter/Interpreter.h:
  8549. * jit/JITCode.h:
  8550. (JSC::JITCode::execute):
  8551. * jit/JITOpcodes.cpp:
  8552. (JSC::JIT::emit_op_catch):
  8553. * jit/JITOpcodes32_64.cpp:
  8554. (JSC::JIT::emit_op_catch):
  8555. * jit/JITStubs.cpp:
  8556. (JSC::ctiTrampoline):
  8557. (JSC::jitThrow):
  8558. (JSC::DEFINE_STUB_FUNCTION):
  8559. * jit/JITStubs.h:
  8560. * runtime/ArrayPrototype.cpp:
  8561. (JSC::arrayProtoFuncFilter):
  8562. (JSC::arrayProtoFuncMap):
  8563. (JSC::arrayProtoFuncEvery):
  8564. (JSC::arrayProtoFuncForEach):
  8565. (JSC::arrayProtoFuncSome):
  8566. (JSC::arrayProtoFuncReduce):
  8567. (JSC::arrayProtoFuncReduceRight):
  8568. * runtime/CallData.cpp:
  8569. (JSC::call):
  8570. * runtime/Completion.cpp:
  8571. (JSC::evaluate):
  8572. * runtime/ConstructData.cpp:
  8573. (JSC::construct):
  8574. * runtime/ExceptionHelpers.cpp:
  8575. (JSC::createErrorForInvalidGlobalAssignment):
  8576. (JSC::throwOutOfMemoryError):
  8577. (JSC::throwStackOverflowError):
  8578. * runtime/ExceptionHelpers.h:
  8579. * runtime/JSArray.cpp:
  8580. (JSC::JSArray::sort):
  8581. * runtime/JSGlobalObjectFunctions.cpp:
  8582. (JSC::globalFuncEval):
  8583. * runtime/StringPrototype.cpp:
  8584. (JSC::stringProtoFuncReplace):
  8585. 2010-10-27 Gabor Loki <loki@webkit.org>
  8586. Reviewed by Oliver Hunt.
  8587. https://bugs.webkit.org/show_bug.cgi?id=48060
  8588. Speed up op_jeq_null and op_jneq_null.
  8589. For both opcodes the NullTag and UndefinedTag are checked to control the
  8590. jump. These values can be simply checked by AboveOrEqual or Below
  8591. condition if they are the two highest unsigned integers from JSValue's
  8592. Tag field.
  8593. * jit/JITOpcodes32_64.cpp:
  8594. (JSC::JIT::emit_op_jeq_null):
  8595. (JSC::JIT::emit_op_jneq_null):
  8596. * runtime/JSValue.h:
  8597. 2010-10-25 Geoffrey Garen <ggaren@apple.com>
  8598. Reviewed by Oliver Hunt.
  8599. https://bugs.webkit.org/show_bug.cgi?id=41948
  8600. REGRESSION(r60392): Registerfile can be unwound too far following an exception
  8601. SunSpider reports no change.
  8602. * interpreter/Interpreter.cpp:
  8603. (JSC::Interpreter::throwException): Walk the stack to calculate the high
  8604. water mark currently in use. It's not safe to assume that the current
  8605. CallFrame's high water mark is the highest high water mark because
  8606. calls do not always set up at the end of a CallFrame. A large caller
  8607. CallFrame can encompass a small callee CallFrame.
  8608. * jit/JITOpcodes.cpp:
  8609. (JSC::JIT::privateCompileCTINativeCall):
  8610. * jit/JITOpcodes32_64.cpp:
  8611. (JSC::JIT::privateCompileCTINativeCall): Make sure to set a 0 CodeBlock
  8612. in the CallFrame of a host call, like the Interpreter does, instead of
  8613. leaving the CodeBlock field uninitialized. The backtracing code requires
  8614. a valid CodeBlock field in each CallFrame.
  8615. 2010-10-27 Gabor Loki <loki@webkit.org>
  8616. Reviewed by Csaba Osztrogonác.
  8617. Add cmn to branch32(reg, imm) on ARM
  8618. https://bugs.webkit.org/show_bug.cgi?id=48062
  8619. The conditional comparison can be done with cmn if the imm value is
  8620. negative and can fit into the cmn instruction.
  8621. * assembler/MacroAssemblerARM.h:
  8622. (JSC::MacroAssemblerARM::branch32):
  8623. 2010-10-26 Oliver Hunt <oliver@apple.com>
  8624. Interpreter build fix.
  8625. * interpreter/Interpreter.cpp:
  8626. (JSC::Interpreter::privateExecute):
  8627. 2010-10-25 Oliver Hunt <oliver@apple.com>
  8628. Reviewed by Gavin Barraclough.
  8629. Remove exec and globalData arguments from jsNumber
  8630. https://bugs.webkit.org/show_bug.cgi?id=48270
  8631. Remove the now unused exec and globalData arguments from jsNumber
  8632. and mechanically update all users of jsNumber.
  8633. * API/JSValueRef.cpp:
  8634. (JSValueMakeNumber):
  8635. * bytecompiler/BytecodeGenerator.cpp:
  8636. (JSC::BytecodeGenerator::emitLoad):
  8637. * bytecompiler/NodesCodegen.cpp:
  8638. (JSC::ArrayNode::emitBytecode):
  8639. * jit/JITArithmetic.cpp:
  8640. (JSC::JIT::emit_op_mod):
  8641. * jit/JITArithmetic32_64.cpp:
  8642. (JSC::JIT::emit_op_mod):
  8643. * jit/JITOpcodes.cpp:
  8644. (JSC::JIT::emit_op_jfalse):
  8645. (JSC::JIT::emit_op_jtrue):
  8646. * jit/JITStubs.cpp:
  8647. (JSC::DEFINE_STUB_FUNCTION):
  8648. * jsc.cpp:
  8649. (functionRun):
  8650. * runtime/Arguments.cpp:
  8651. (JSC::Arguments::getOwnPropertySlot):
  8652. (JSC::Arguments::getOwnPropertyDescriptor):
  8653. * runtime/ArrayConstructor.cpp:
  8654. (JSC::ArrayConstructor::ArrayConstructor):
  8655. * runtime/ArrayPrototype.cpp:
  8656. (JSC::arrayProtoFuncPop):
  8657. (JSC::arrayProtoFuncPush):
  8658. (JSC::arrayProtoFuncShift):
  8659. (JSC::arrayProtoFuncSplice):
  8660. (JSC::arrayProtoFuncUnShift):
  8661. (JSC::arrayProtoFuncFilter):
  8662. (JSC::arrayProtoFuncMap):
  8663. (JSC::arrayProtoFuncEvery):
  8664. (JSC::arrayProtoFuncForEach):
  8665. (JSC::arrayProtoFuncSome):
  8666. (JSC::arrayProtoFuncReduce):
  8667. (JSC::arrayProtoFuncReduceRight):
  8668. (JSC::arrayProtoFuncIndexOf):
  8669. (JSC::arrayProtoFuncLastIndexOf):
  8670. * runtime/BooleanConstructor.cpp:
  8671. (JSC::BooleanConstructor::BooleanConstructor):
  8672. * runtime/CachedTranscendentalFunction.h:
  8673. (JSC::CachedTranscendentalFunction::operator()):
  8674. * runtime/DateConstructor.cpp:
  8675. (JSC::DateConstructor::DateConstructor):
  8676. (JSC::dateParse):
  8677. (JSC::dateNow):
  8678. (JSC::dateUTC):
  8679. * runtime/DateInstance.cpp:
  8680. (JSC::DateInstance::DateInstance):
  8681. * runtime/DatePrototype.cpp:
  8682. (JSC::dateProtoFuncGetFullYear):
  8683. (JSC::dateProtoFuncGetUTCFullYear):
  8684. (JSC::dateProtoFuncGetMonth):
  8685. (JSC::dateProtoFuncGetUTCMonth):
  8686. (JSC::dateProtoFuncGetDate):
  8687. (JSC::dateProtoFuncGetUTCDate):
  8688. (JSC::dateProtoFuncGetDay):
  8689. (JSC::dateProtoFuncGetUTCDay):
  8690. (JSC::dateProtoFuncGetHours):
  8691. (JSC::dateProtoFuncGetUTCHours):
  8692. (JSC::dateProtoFuncGetMinutes):
  8693. (JSC::dateProtoFuncGetUTCMinutes):
  8694. (JSC::dateProtoFuncGetSeconds):
  8695. (JSC::dateProtoFuncGetUTCSeconds):
  8696. (JSC::dateProtoFuncGetMilliSeconds):
  8697. (JSC::dateProtoFuncGetUTCMilliseconds):
  8698. (JSC::dateProtoFuncGetTimezoneOffset):
  8699. (JSC::dateProtoFuncSetTime):
  8700. (JSC::setNewValueFromTimeArgs):
  8701. (JSC::setNewValueFromDateArgs):
  8702. (JSC::dateProtoFuncSetYear):
  8703. (JSC::dateProtoFuncGetYear):
  8704. * runtime/Error.cpp:
  8705. (JSC::addErrorSourceInfo):
  8706. (JSC::addErrorDivotInfo):
  8707. * runtime/ErrorConstructor.cpp:
  8708. (JSC::ErrorConstructor::ErrorConstructor):
  8709. * runtime/FunctionConstructor.cpp:
  8710. (JSC::FunctionConstructor::FunctionConstructor):
  8711. * runtime/FunctionPrototype.cpp:
  8712. (JSC::FunctionPrototype::FunctionPrototype):
  8713. * runtime/JSArray.cpp:
  8714. (JSC::JSArray::getOwnPropertySlot):
  8715. (JSC::JSArray::getOwnPropertyDescriptor):
  8716. * runtime/JSByteArray.cpp:
  8717. (JSC::JSByteArray::JSByteArray):
  8718. * runtime/JSByteArray.h:
  8719. (JSC::JSByteArray::getIndex):
  8720. * runtime/JSFunction.cpp:
  8721. (JSC::JSFunction::JSFunction):
  8722. (JSC::JSFunction::lengthGetter):
  8723. (JSC::JSFunction::getOwnPropertyDescriptor):
  8724. * runtime/JSGlobalObject.cpp:
  8725. (JSC::JSGlobalObject::reset):
  8726. * runtime/JSGlobalObjectFunctions.cpp:
  8727. (JSC::globalFuncParseInt):
  8728. (JSC::globalFuncParseFloat):
  8729. * runtime/JSNumberCell.h:
  8730. (JSC::JSValue::JSValue):
  8731. (JSC::jsNaN):
  8732. (JSC::JSValue::toJSNumber):
  8733. * runtime/JSONObject.cpp:
  8734. (JSC::unwrapBoxedPrimitive):
  8735. (JSC::PropertyNameForFunctionCall::value):
  8736. (JSC::JSONStringify):
  8737. * runtime/JSString.cpp:
  8738. (JSC::JSString::getStringPropertyDescriptor):
  8739. * runtime/JSString.h:
  8740. (JSC::JSString::getStringPropertySlot):
  8741. * runtime/JSValue.h:
  8742. (JSC::jsDoubleNumber):
  8743. (JSC::jsNumber):
  8744. (JSC::jsNaN):
  8745. (JSC::JSValue::JSValue):
  8746. (JSC::JSValue::toJSNumber):
  8747. * runtime/LiteralParser.cpp:
  8748. (JSC::LiteralParser::parse):
  8749. * runtime/MathObject.cpp:
  8750. (JSC::MathObject::MathObject):
  8751. (JSC::mathProtoFuncAbs):
  8752. (JSC::mathProtoFuncACos):
  8753. (JSC::mathProtoFuncASin):
  8754. (JSC::mathProtoFuncATan):
  8755. (JSC::mathProtoFuncATan2):
  8756. (JSC::mathProtoFuncCeil):
  8757. (JSC::mathProtoFuncCos):
  8758. (JSC::mathProtoFuncExp):
  8759. (JSC::mathProtoFuncFloor):
  8760. (JSC::mathProtoFuncLog):
  8761. (JSC::mathProtoFuncMax):
  8762. (JSC::mathProtoFuncMin):
  8763. (JSC::mathProtoFuncPow):
  8764. (JSC::mathProtoFuncRandom):
  8765. (JSC::mathProtoFuncRound):
  8766. (JSC::mathProtoFuncSin):
  8767. (JSC::mathProtoFuncSqrt):
  8768. (JSC::mathProtoFuncTan):
  8769. * runtime/NativeErrorConstructor.cpp:
  8770. (JSC::NativeErrorConstructor::NativeErrorConstructor):
  8771. * runtime/NumberConstructor.cpp:
  8772. (JSC::NumberConstructor::NumberConstructor):
  8773. (JSC::numberConstructorNaNValue):
  8774. (JSC::numberConstructorNegInfinity):
  8775. (JSC::numberConstructorPosInfinity):
  8776. (JSC::numberConstructorMaxValue):
  8777. (JSC::numberConstructorMinValue):
  8778. (JSC::constructWithNumberConstructor):
  8779. (JSC::callNumberConstructor):
  8780. * runtime/NumberPrototype.cpp:
  8781. (JSC::NumberPrototype::NumberPrototype):
  8782. * runtime/ObjectConstructor.cpp:
  8783. (JSC::ObjectConstructor::ObjectConstructor):
  8784. * runtime/Operations.cpp:
  8785. (JSC::jsAddSlowCase):
  8786. * runtime/Operations.h:
  8787. (JSC::jsAdd):
  8788. * runtime/PrototypeFunction.cpp:
  8789. (JSC::PrototypeFunction::PrototypeFunction):
  8790. * runtime/RegExpConstructor.cpp:
  8791. (JSC::RegExpConstructor::RegExpConstructor):
  8792. (JSC::RegExpMatchesArray::fillArrayInstance):
  8793. * runtime/RegExpObject.cpp:
  8794. (JSC::regExpObjectLastIndex):
  8795. * runtime/StringConstructor.cpp:
  8796. (JSC::StringConstructor::StringConstructor):
  8797. * runtime/StringPrototype.cpp:
  8798. (JSC::StringPrototype::StringPrototype):
  8799. (JSC::stringProtoFuncReplace):
  8800. (JSC::stringProtoFuncCharCodeAt):
  8801. (JSC::stringProtoFuncIndexOf):
  8802. (JSC::stringProtoFuncLastIndexOf):
  8803. (JSC::stringProtoFuncSearch):
  8804. (JSC::stringProtoFuncLocaleCompare):
  8805. 2010-10-25 David Tapuska <dtapuska@rim.com>
  8806. Reviewed by David Kilzer.
  8807. Enable VFP if our compiler settings indicated we had a hardware
  8808. VFP.
  8809. https://bugs.webkit.org/show_bug.cgi?id=46096
  8810. * assembler/MacroAssemblerARM.cpp:
  8811. (JSC::isVFPPresent):
  8812. 2010-10-25 Sheriff Bot <webkit.review.bot@gmail.com>
  8813. Unreviewed, rolling out r70451.
  8814. http://trac.webkit.org/changeset/70451
  8815. https://bugs.webkit.org/show_bug.cgi?id=48249
  8816. Broke set-unloaded-frame-location.html under Qt (Requested by
  8817. caseq on #webkit).
  8818. * GNUmakefile.am:
  8819. * JavaScriptCore.gypi:
  8820. * JavaScriptCore.xcodeproj/project.pbxproj:
  8821. * wtf/text/TextPosition.h: Removed.
  8822. 2010-10-25 Patrick Gansterer <paroga@webkit.org>
  8823. Reviewed by David Kilzer.
  8824. Replace _countof with WTF_ARRAY_LENGTH
  8825. https://bugs.webkit.org/show_bug.cgi?id=48229
  8826. * wtf/Platform.h:
  8827. 2010-10-25 Peter Rybin <peter.rybin@gmail.com>
  8828. Reviewed by Adam Barth.
  8829. HTML parser should provide script column position within HTML document to JavaScript engine
  8830. https://bugs.webkit.org/show_bug.cgi?id=45271
  8831. Adds TextPosition* classes -- a structure that stores line/column/generation
  8832. level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
  8833. wrappers that emphasize whether int number is used as zero-based or
  8834. one-based.
  8835. * GNUmakefile.am:
  8836. * JavaScriptCore.gypi:
  8837. * JavaScriptCore.xcodeproj/project.pbxproj:
  8838. * wtf/text/TextPosition.h: Added.
  8839. (WTF::TextPosition::TextPosition):
  8840. (WTF::TextPosition::minimumPosition):
  8841. (WTF::TextPosition::belowRangePosition):
  8842. (WTF::ZeroBasedNumber::fromZeroBasedInt):
  8843. (WTF::ZeroBasedNumber::ZeroBasedNumber):
  8844. (WTF::ZeroBasedNumber::zeroBasedInt):
  8845. (WTF::ZeroBasedNumber::base):
  8846. (WTF::ZeroBasedNumber::belowBase):
  8847. (WTF::OneBasedNumber::fromOneBasedInt):
  8848. (WTF::OneBasedNumber::OneBasedNumber):
  8849. (WTF::OneBasedNumber::oneBasedInt):
  8850. (WTF::OneBasedNumber::convertAsZeroBasedInt):
  8851. (WTF::OneBasedNumber::convertToZeroBased):
  8852. (WTF::OneBasedNumber::base):
  8853. (WTF::OneBasedNumber::belowBase):
  8854. (WTF::toZeroBasedTextPosition):
  8855. (WTF::toOneBasedTextPosition):
  8856. (WTF::ZeroBasedNumber::convertToOneBased):
  8857. 2010-10-24 Kwang Yul Seo <skyul@company100.net>
  8858. Reviewed by David Kilzer.
  8859. Check endianness with __BIG_ENDIAN in RVCT.
  8860. https://bugs.webkit.org/show_bug.cgi?id=46122
  8861. RVCT defines __BIG_ENDIAN if compiling for a big-endian target.
  8862. * wtf/Platform.h:
  8863. 2010-10-24 Dan Bernstein <mitz@apple.com>
  8864. Rubber-stamped by Dave Kilzer.
  8865. Removed empty directories.
  8866. * JavaScriptCore: Removed.
  8867. * JavaScriptCore/runtime: Removed.
  8868. 2010-10-24 Patrick Gansterer <paroga@webkit.org>
  8869. Unreviewed, fix typo of last build fix.
  8870. * wtf/DateMath.cpp:
  8871. 2010-10-24 Patrick Gansterer <paroga@webkit.org>
  8872. Unreviewed build fix for chromium.
  8873. * wtf/DateMath.cpp: Added missing include.
  8874. 2010-10-24 Patrick Gansterer <paroga@webkit.org>
  8875. Reviewed by David Kilzer.
  8876. Add WTF_ARRAY_LENGTH macro to WTF
  8877. https://bugs.webkit.org/show_bug.cgi?id=32828
  8878. Unify the different implementations and usages.
  8879. * interpreter/Interpreter.cpp:
  8880. (JSC::Interpreter::privateExecute):
  8881. * runtime/DatePrototype.cpp:
  8882. (JSC::formatLocaleDate):
  8883. * runtime/JSGlobalObject.cpp:
  8884. (JSC::JSGlobalObject::reset):
  8885. * runtime/JSONObject.cpp:
  8886. (JSC::Stringifier::appendQuotedString):
  8887. (JSC::Stringifier::toJSON):
  8888. (JSC::Stringifier::appendStringifiedValue):
  8889. * runtime/UString.cpp:
  8890. (JSC::UString::number):
  8891. * wtf/DateMath.cpp:
  8892. (WTF::parseDateFromNullTerminatedCharacters):
  8893. * wtf/StdLibExtras.h:
  8894. 2010-10-24 Dirk Schulze <krit@webkit.org>
  8895. Reviewed by Nikolas Zimmermann.
  8896. Filter example Chiseled from SVG Wow! is slow
  8897. https://bugs.webkit.org/show_bug.cgi?id=48174
  8898. Added 'using WTF::ByteArray;' at the end of ByteArray.h
  8899. * wtf/ByteArray.h:
  8900. 2010-10-24 Patrick Gansterer <paroga@webkit.org>
  8901. Reviewed by David Kilzer.
  8902. Inline WTF::bitwise_cast and fix style
  8903. https://bugs.webkit.org/show_bug.cgi?id=48208
  8904. * wtf/StdLibExtras.h:
  8905. (WTF::bitwise_cast):
  8906. (WTF::bitCount):
  8907. 2010-10-23 Xan Lopez <xlopez@igalia.com>
  8908. Reviewed by Sam Weinig.
  8909. Unify globalData APIs
  8910. https://bugs.webkit.org/show_bug.cgi?id=47969
  8911. Make JSGlobalObject::globalData return a reference and adapt
  8912. callers. This unifies the API with the existing
  8913. CallFrame::globalData, which also returns a reference.
  8914. * debugger/Debugger.cpp:
  8915. (JSC::evaluateInGlobalCallFrame):
  8916. * interpreter/CallFrame.h:
  8917. * interpreter/Interpreter.cpp:
  8918. (JSC::Interpreter::dumpRegisters):
  8919. * jsc.cpp:
  8920. (runWithScripts):
  8921. * parser/JSParser.cpp:
  8922. (JSC::jsParse):
  8923. * parser/Parser.cpp:
  8924. (JSC::Parser::parse):
  8925. * parser/Parser.h:
  8926. (JSC::Parser::parse):
  8927. * runtime/Error.cpp:
  8928. (JSC::createError):
  8929. (JSC::createEvalError):
  8930. (JSC::createRangeError):
  8931. (JSC::createReferenceError):
  8932. (JSC::createSyntaxError):
  8933. (JSC::createTypeError):
  8934. (JSC::createURIError):
  8935. * runtime/FunctionConstructor.cpp:
  8936. (JSC::constructFunction):
  8937. * runtime/JSGlobalObject.cpp:
  8938. (JSC::JSGlobalObject::~JSGlobalObject):
  8939. (JSC::JSGlobalObject::markChildren):
  8940. * runtime/JSGlobalObject.h:
  8941. (JSC::JSGlobalObject::globalData):
  8942. 2010-10-23 Dimitri Glazkov <dglazkov@chromium.org>
  8943. Unreviewed, rolling out r70369.
  8944. http://trac.webkit.org/changeset/70369
  8945. https://bugs.webkit.org/show_bug.cgi?id=47974
  8946. Caused weird artifacts in expected results.
  8947. * wtf/Platform.h:
  8948. 2010-10-23 Martin Robinson <mrobinson@igalia.com>
  8949. Reviewed by Xan Lopez.
  8950. Crashes randomly in cairo_scaled_font_destroy
  8951. https://bugs.webkit.org/show_bug.cgi?id=46794
  8952. Make PlatformRefPtr aware of hashTableDeletedValue. When PlatformRefPtr
  8953. goes away this should probably be handled in the future via some special
  8954. hooks in RefCounted (or its contained type).
  8955. * wtf/PlatformRefPtr.h:
  8956. (WTF::PlatformRefPtr::~PlatformRefPtr):
  8957. (WTF::PlatformRefPtr::clear):
  8958. (WTF::::operator):
  8959. 2010-10-22 Adam Roben <aroben@apple.com>
  8960. Remove the QuartzCorePresent.h mechanism
  8961. This header was used to detect whether QuartzCore headers were present
  8962. on the system. Everyone should have these headers now so we no longer
  8963. need to detect.
  8964. Reviewed by Sam Weinig.
  8965. * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Remove
  8966. code to generate QuartzCorePresent.h.
  8967. * wtf/Platform.h: Stop including QuartzCorePresent.h on Windows and
  8968. collapse all USE_ACCELERATED_COMPOSITING settings into one #ifdef.
  8969. 2010-10-22 Adam Barth <abarth@webkit.org>
  8970. Unreviewed, rolling out r70290.
  8971. http://trac.webkit.org/changeset/70290
  8972. https://bugs.webkit.org/show_bug.cgi?id=48111
  8973. Undelete Android build files.
  8974. * Android.mk: Added.
  8975. 2010-10-22 Zoltan Herczeg <zherczeg@webkit.org>
  8976. Reviewed by Csaba Osztrogonác.
  8977. JSC interpreter regressions after r69940
  8978. https://bugs.webkit.org/show_bug.cgi?id=47839
  8979. Wrong "if": It should test whether the result exists,
  8980. and not the opposite. It is an interpreter bug, hence
  8981. the bots does not capture it.
  8982. * interpreter/Interpreter.cpp:
  8983. (JSC::Interpreter::resolveBase):
  8984. 2010-10-21 Adam Barth <abarth@webkit.org>
  8985. Reviewed by David Levin.
  8986. Remove Android build system
  8987. https://bugs.webkit.org/show_bug.cgi?id=48111
  8988. * Android.mk: Removed.
  8989. 2010-10-21 Kwang Yul Seo <skyul@company100.net>
  8990. Reviewed by Kent Tamura.
  8991. [BREWMP] Add a String constructor which takes AECHAR*
  8992. https://bugs.webkit.org/show_bug.cgi?id=45043
  8993. Add String(const AECHAR*) constructor for convenience.
  8994. * wtf/text/WTFString.h:
  8995. 2010-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
  8996. Reviewed by Martin Robinson.
  8997. [GTK] Use GCharsetConverter instead of g_iconv in TextCodecGtk
  8998. https://bugs.webkit.org/show_bug.cgi?id=47896
  8999. * wtf/gobject/GTypedefs.h:
  9000. 2010-10-21 Adam Barth <abarth@webkit.org>
  9001. Unreviewed, rolling out r70174.
  9002. http://trac.webkit.org/changeset/70174
  9003. https://bugs.webkit.org/show_bug.cgi?id=41948
  9004. This patch reverts a change that causes
  9005. http/tests/xmlhttprequest/origin-whitelisting-removal.html to crash.
  9006. * interpreter/Interpreter.cpp:
  9007. (JSC::Interpreter::throwException):
  9008. 2010-10-20 Simon Fraser <simon.fraser@apple.com>
  9009. Fix the EFL build.
  9010. * wtf/CMakeLists.txt:
  9011. 2010-10-20 Simon Fraser <simon.fraser@apple.com>
  9012. Fix Windows build: export needed symbols.
  9013. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  9014. 2010-10-19 Simon Fraser <simon.fraser@apple.com>
  9015. Reviewed by Gavin Barraclough.
  9016. https://bugs.webkit.org/show_bug.cgi?id=47851
  9017. Add methods to DecimalNumber to return the buffer length
  9018. required for decimal and exponential output.
  9019. Make some of the DecimalNumber code non-inline (no
  9020. effect on Sunspider), adding DecimalNumber.cpp to various
  9021. build systems.
  9022. Make some DecimalNumber methods 'const'.
  9023. * Android.mk:
  9024. * Android.v8.wtf.mk:
  9025. * GNUmakefile.am:
  9026. * JavaScriptCore.exp:
  9027. * JavaScriptCore.gypi:
  9028. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  9029. * JavaScriptCore.xcodeproj/project.pbxproj:
  9030. * runtime/NumberPrototype.cpp:
  9031. (JSC::numberProtoFuncToExponential):
  9032. (JSC::numberProtoFuncToFixed):
  9033. (JSC::numberProtoFuncToPrecision):
  9034. * wtf/DecimalNumber.cpp: Added.
  9035. (WTF::DecimalNumber::bufferLengthForStringDecimal):
  9036. (WTF::DecimalNumber::bufferLengthForStringExponential):
  9037. (WTF::DecimalNumber::toStringDecimal):
  9038. (WTF::DecimalNumber::toStringExponential):
  9039. * wtf/DecimalNumber.h:
  9040. (WTF::DecimalNumber::sign):
  9041. (WTF::DecimalNumber::exponent):
  9042. (WTF::DecimalNumber::significand):
  9043. (WTF::DecimalNumber::precision):
  9044. * wtf/dtoa.cpp:
  9045. (WTF::dtoa):
  9046. * wtf/dtoa.h:
  9047. * wtf/wtf.pri:
  9048. 2010-10-20 Sheriff Bot <webkit.review.bot@gmail.com>
  9049. Unreviewed, rolling out r70165.
  9050. http://trac.webkit.org/changeset/70165
  9051. https://bugs.webkit.org/show_bug.cgi?id=48007
  9052. It broke tests on Qt bot (Requested by Ossy on #webkit).
  9053. * GNUmakefile.am:
  9054. * JavaScriptCore.gypi:
  9055. * JavaScriptCore.xcodeproj/project.pbxproj:
  9056. * wtf/text/TextPosition.h: Removed.
  9057. 2010-10-20 Brian Weinstein <bweinstein@apple.com>
  9058. Reviewed by Adam Roben.
  9059. Fix the Windows build after r70165. Move the copying of JavaScript headers from JavaScriptCore's post-build
  9060. step to JavaScriptCoreGenerated, so the copying is done even when a cpp file in JavaScriptCore is changed.
  9061. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  9062. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
  9063. 2010-10-20 Dumitru Daniliuc <dumi@chromium.org>
  9064. Unreviewed, fixing the Win build.
  9065. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  9066. 2010-10-20 Geoffrey Garen <ggaren@apple.com>
  9067. Reviewed by Darin Adler.
  9068. https://bugs.webkit.org/show_bug.cgi?id=41948
  9069. REGRESSION(r60392): Registerfile can be unwound too far following an exception
  9070. * interpreter/Interpreter.cpp:
  9071. (JSC::Interpreter::throwException): Walk the stack to calculate the high
  9072. water mark currently in use. It's not safe to assume that the current
  9073. CallFrame's high water mark is the highest high water mark because
  9074. calls do not always set up at the end of a CallFrame. A large caller
  9075. CallFrame can encompass a small callee CallFrame.
  9076. 2010-10-20 Peter Rybin <peter.rybin@gmail.com>
  9077. Reviewed by Adam Barth.
  9078. HTML parser should provide script column position within HTML document to JavaScript engine
  9079. https://bugs.webkit.org/show_bug.cgi?id=45271
  9080. Adds TextPosition* classes -- a structure that stores line/column/generation
  9081. level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
  9082. wrappers that emphasize whether int number is used as zero-based or
  9083. one-based.
  9084. * GNUmakefile.am:
  9085. * JavaScriptCore.gypi:
  9086. * JavaScriptCore.xcodeproj/project.pbxproj:
  9087. * wtf/text/TextPosition.h: Added.
  9088. (WTF::TextPosition::TextPosition):
  9089. (WTF::TextPosition::minimumPosition):
  9090. (WTF::TextPosition::belowRangePosition):
  9091. (WTF::ZeroBasedNumber::fromZeroBasedInt):
  9092. (WTF::ZeroBasedNumber::ZeroBasedNumber):
  9093. (WTF::ZeroBasedNumber::zeroBasedInt):
  9094. (WTF::ZeroBasedNumber::base):
  9095. (WTF::ZeroBasedNumber::belowBase):
  9096. (WTF::OneBasedNumber::fromOneBasedInt):
  9097. (WTF::OneBasedNumber::OneBasedNumber):
  9098. (WTF::OneBasedNumber::oneBasedInt):
  9099. (WTF::OneBasedNumber::convertAsZeroBasedInt):
  9100. (WTF::OneBasedNumber::convertToZeroBased):
  9101. (WTF::OneBasedNumber::base):
  9102. (WTF::OneBasedNumber::belowBase):
  9103. (WTF::toZeroBasedTextPosition):
  9104. (WTF::toOneBasedTextPosition):
  9105. (WTF::ZeroBasedNumber::convertToOneBased):
  9106. 2010-10-19 Kwang Yul Seo <skyul@company100.net>
  9107. Reviewed by David Kilzer.
  9108. [BREWMP] Turn off JIT for simulator build
  9109. https://bugs.webkit.org/show_bug.cgi?id=47937
  9110. We don't need to test x86 JIT.
  9111. * wtf/Platform.h:
  9112. 2010-10-19 Oliver Hunt <oliver@apple.com>
  9113. Reviewed by Geoffrey Garen.
  9114. Remove support for JSVALUE32 from JSC
  9115. https://bugs.webkit.org/show_bug.cgi?id=47948
  9116. Remove all the code for supporting JSVALUE32 from JSC.
  9117. * jit/JIT.cpp:
  9118. (JSC::JIT::privateCompileMainPass):
  9119. (JSC::JIT::privateCompileSlowCases):
  9120. * jit/JIT.h:
  9121. * jit/JITArithmetic.cpp:
  9122. (JSC::JIT::emit_op_lshift):
  9123. (JSC::JIT::emitSlow_op_lshift):
  9124. (JSC::JIT::emit_op_rshift):
  9125. (JSC::JIT::emitSlow_op_rshift):
  9126. (JSC::JIT::emit_op_urshift):
  9127. (JSC::JIT::emitSlow_op_urshift):
  9128. (JSC::JIT::emit_op_jnless):
  9129. (JSC::JIT::emitSlow_op_jnless):
  9130. (JSC::JIT::emit_op_jless):
  9131. (JSC::JIT::emitSlow_op_jless):
  9132. (JSC::JIT::emit_op_jlesseq):
  9133. (JSC::JIT::emitSlow_op_jlesseq):
  9134. (JSC::JIT::emit_op_bitand):
  9135. (JSC::JIT::emit_op_post_inc):
  9136. (JSC::JIT::emit_op_post_dec):
  9137. (JSC::JIT::emit_op_pre_inc):
  9138. (JSC::JIT::emit_op_pre_dec):
  9139. (JSC::JIT::emit_op_mod):
  9140. (JSC::JIT::emitSlow_op_mod):
  9141. * jit/JITCall.cpp:
  9142. * jit/JITInlineMethods.h:
  9143. (JSC::JIT::emitGetFromCallFrameHeaderPtr):
  9144. (JSC::JIT::emitGetFromCallFrameHeader32):
  9145. * jit/JITOpcodes.cpp:
  9146. (JSC::JIT::emit_op_loop_if_lesseq):
  9147. (JSC::JIT::emit_op_bitnot):
  9148. (JSC::JIT::emit_op_next_pname):
  9149. * jit/JITPropertyAccess.cpp:
  9150. (JSC::JIT::emit_op_get_by_val):
  9151. (JSC::JIT::emit_op_put_by_val):
  9152. * jit/JITStubs.h:
  9153. * jit/JSInterfaceJIT.h:
  9154. * jit/SpecializedThunkJIT.h:
  9155. (JSC::SpecializedThunkJIT::returnDouble):
  9156. (JSC::SpecializedThunkJIT::tagReturnAsInt32):
  9157. * jit/ThunkGenerators.cpp:
  9158. (JSC::sqrtThunkGenerator):
  9159. (JSC::powThunkGenerator):
  9160. * runtime/Collector.cpp:
  9161. (JSC::isPossibleCell):
  9162. (JSC::typeName):
  9163. * runtime/JSCell.h:
  9164. * runtime/JSGlobalData.cpp:
  9165. (JSC::JSGlobalData::JSGlobalData):
  9166. * runtime/JSGlobalData.h:
  9167. * runtime/JSGlobalObject.h:
  9168. (JSC::Structure::prototypeForLookup):
  9169. * runtime/JSImmediate.h:
  9170. (JSC::reinterpretIntptrToDouble):
  9171. (JSC::JSImmediate::isIntegerNumber):
  9172. (JSC::JSImmediate::isDouble):
  9173. (JSC::JSImmediate::areBothImmediateIntegerNumbers):
  9174. (JSC::JSImmediate::makeDouble):
  9175. (JSC::JSImmediate::doubleValue):
  9176. (JSC::JSImmediate::toBoolean):
  9177. (JSC::JSImmediate::fromNumberOutsideIntegerRange):
  9178. (JSC::JSImmediate::from):
  9179. (JSC::JSImmediate::toDouble):
  9180. (JSC::JSFastMath::rightShiftImmediateNumbers):
  9181. * runtime/JSNumberCell.cpp:
  9182. * runtime/JSNumberCell.h:
  9183. * runtime/JSObject.h:
  9184. (JSC::JSObject::JSObject):
  9185. * runtime/JSValue.h:
  9186. * runtime/NumberObject.h:
  9187. * wtf/Platform.h:
  9188. 2010-10-19 Csaba Osztrogonác <ossy@webkit.org>
  9189. Reviewed by Geoffrey Garen.
  9190. BytecodeGenerator::m_lastOpcodePosition must be initialized in all constructors
  9191. https://bugs.webkit.org/show_bug.cgi?id=47920
  9192. * bytecompiler/BytecodeGenerator.cpp:
  9193. (JSC::BytecodeGenerator::BytecodeGenerator): Add missing member initialization.
  9194. 2010-10-19 Kwang Yul Seo <skyul@company100.net>
  9195. Reviewed by David Kilzer.
  9196. RVCT fails to compile DateMath.cpp due to overloaded function pow
  9197. https://bugs.webkit.org/show_bug.cgi?id=47844
  9198. Choose std::pow(double, double) among multiple overloaded pow functions
  9199. to fix build for RVCT.
  9200. * wtf/DateMath.cpp:
  9201. (WTF::parseES5DateFromNullTerminatedCharacters):
  9202. 2010-10-19 Patrick Gansterer <paroga@webkit.org>
  9203. Reviewed by David Kilzer.
  9204. Use UChar instead of wchar_t in UnicodeWinCE
  9205. https://bugs.webkit.org/show_bug.cgi?id=47904
  9206. Make UnicodeWinCE more portable, so we can use it for other ports too.
  9207. * wtf/unicode/wince/UnicodeWinCE.cpp:
  9208. (WTF::Unicode::toLower):
  9209. (WTF::Unicode::toUpper):
  9210. (WTF::Unicode::foldCase):
  9211. (WTF::Unicode::isPrintableChar):
  9212. (WTF::Unicode::isSpace):
  9213. (WTF::Unicode::isLetter):
  9214. (WTF::Unicode::isUpper):
  9215. (WTF::Unicode::isLower):
  9216. (WTF::Unicode::isDigit):
  9217. (WTF::Unicode::isPunct):
  9218. (WTF::Unicode::isAlphanumeric):
  9219. (WTF::Unicode::toTitleCase):
  9220. (WTF::Unicode::mirroredChar):
  9221. (WTF::Unicode::digitValue):
  9222. * wtf/unicode/wince/UnicodeWinCE.h:
  9223. (WTF::Unicode::isSeparatorSpace):
  9224. (WTF::Unicode::isHighSurrogate):
  9225. (WTF::Unicode::isLowSurrogate):
  9226. (WTF::Unicode::umemcasecmp):
  9227. (WTF::Unicode::surrogateToUcs4):
  9228. 2010-10-19 Patrick Gansterer <paroga@webkit.org>
  9229. Reviewed by Andreas Kling.
  9230. Fix style of UnicodeWinCE
  9231. https://bugs.webkit.org/show_bug.cgi?id=47818
  9232. * wtf/unicode/wince/UnicodeWinCE.cpp:
  9233. (WTF::Unicode::toLower):
  9234. (WTF::Unicode::toUpper):
  9235. * wtf/unicode/wince/UnicodeWinCE.h:
  9236. 2010-10-18 Xan Lopez <xlopez@igalia.com>
  9237. Reviewed by Martin Robinson.
  9238. * GNUmakefile.am: add missing file.
  9239. 2010-10-18 Oliver Hunt <oliver@apple.com>
  9240. Reviewed by Sam Weinig.
  9241. Strict mode: Functions created with the function constructor don't implement strict mode semantics
  9242. https://bugs.webkit.org/show_bug.cgi?id=47860
  9243. When creating the FunctionExecutable for a new function the function constructor
  9244. was always passing false for whether or not a function was strict, rather than
  9245. using the information from the freshly parsed function itself.
  9246. * runtime/Executable.cpp:
  9247. (JSC::FunctionExecutable::fromGlobalCode):
  9248. 2010-10-18 Oliver Hunt <oliver@apple.com>
  9249. Reviewed by Darin Adler.
  9250. Strict mode: |this| should be undefined if it is not explicitly provided
  9251. https://bugs.webkit.org/show_bug.cgi?id=47833
  9252. To make strict mode behave correctly we want to pass undefined instead of null
  9253. as the default this value. This has no impact on behaviour outside of strict
  9254. mode as both values are replaced with the global object if necessary.
  9255. * bytecompiler/NodesCodegen.cpp:
  9256. (JSC::FunctionCallValueNode::emitBytecode):
  9257. (JSC::FunctionCallResolveNode::emitBytecode):
  9258. (JSC::CallFunctionCallDotNode::emitBytecode):
  9259. (JSC::ApplyFunctionCallDotNode::emitBytecode):
  9260. 2010-10-18 Darin Adler <darin@apple.com>
  9261. Reviewed by Anders Carlsson.
  9262. Make a nullptr that works with OwnPtr and RefPtr
  9263. https://bugs.webkit.org/show_bug.cgi?id=47756
  9264. * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.h.
  9265. * wtf/NullPtr.h: Added.
  9266. * wtf/OwnArrayPtr.h: Add an overload of = taking nullptr.
  9267. * wtf/OwnPtr.h: Ditto.
  9268. * wtf/PassOwnArrayPtr.h: Ditto.
  9269. * wtf/PassOwnPtr.h: Ditto.
  9270. * wtf/PassRefPtr.h: Ditto.
  9271. * wtf/RefPtr.h: Ditto.
  9272. * wtf/RetainPtr.h: Ditto.
  9273. 2010-10-18 Oliver Hunt <oliver@apple.com>
  9274. Reviewed by Sam Weinig.
  9275. Strict mode: JIT doesn't check for |this| being an immediate before dereferencing
  9276. https://bugs.webkit.org/show_bug.cgi?id=47826
  9277. There's no guarantee that |this| will be a cell in a strict mode function, so
  9278. don't claim that it is.
  9279. * bytecode/CodeBlock.h:
  9280. (JSC::CodeBlock::isKnownNotImmediate):
  9281. 2010-10-18 Zoltan Herczeg <zherczeg@webkit.org>
  9282. Reviewed by Oliver Hunt.
  9283. if (0) throw "x" ; else { } throws parse error after r69906
  9284. https://bugs.webkit.org/show_bug.cgi?id=47807
  9285. r69906 introduced a bug: the semicolon is not parsed after a throw
  9286. expression anymore. Thus, the semicolon terminates the "if" parsing
  9287. in the example above, and the else token results a parse error.
  9288. * parser/JSParser.cpp:
  9289. (JSC::JSParser::parseThrowStatement):
  9290. 2010-10-18 Peter Varga <pvarga@inf.u-szeged.hu>
  9291. Reviewed by Andreas Kling.
  9292. Remove some unnecessary lines of code from Parser.cpp
  9293. https://bugs.webkit.org/show_bug.cgi?id=47816
  9294. * parser/Parser.cpp:
  9295. 2010-10-18 Xan Lopez <xlopez@igalia.com>
  9296. Reviewed by Csaba Osztrogonác.
  9297. Build broken with JIT disabled
  9298. https://bugs.webkit.org/show_bug.cgi?id=47801
  9299. This is a regression caused by r69940.
  9300. * interpreter/Interpreter.cpp:
  9301. (JSC::Interpreter::resolveBase):
  9302. 2010-10-18 Zoltan Horvath <zoltan@webkit.org>
  9303. Reviewed by Darin Adler.
  9304. Change FastAllocBase implementation into a macro
  9305. https://bugs.webkit.org/show_bug.cgi?id=42998
  9306. It was investigated in bug #33896 that inheriting classes from FastAllocBase
  9307. can result in objects getting larger which leads to memory regressions.
  9308. Using a macro instead of inheriting classes from FastAllocBase would solve the issue.
  9309. * wtf/FastAllocBase.h: Add a WTF_MAKE_FAST_ALLOCATED macro
  9310. 2010-10-17 Oliver Hunt <oliver@apple.com>
  9311. Reviewed by Sam Weinig.
  9312. Strict mode: arguments is not valid as the base expression for pre- or post-fix expressions
  9313. https://bugs.webkit.org/show_bug.cgi?id=47791
  9314. Simple fix, check for arguments in addition to eval.
  9315. * parser/JSParser.cpp:
  9316. (JSC::JSParser::parseUnaryExpression):
  9317. 2010-10-17 Oliver Hunt <oliver@apple.com>
  9318. Reviewed by Sam Weinig.
  9319. Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure
  9320. https://bugs.webkit.org/show_bug.cgi?id=47788
  9321. Fixing this required a couple of changes:
  9322. * resolve_base now has a flag to indicate whether it is being used for a put in strict mode.
  9323. this allows us to throw an exception when we're doing a completely generic resolve for
  9324. assignment, and that assignment would create a new global.
  9325. * There is a new opcode 'op_ensure_property_exists' that is used to determine whether
  9326. the property being assigned to already exists on the global object. This currently
  9327. has no caching, but such caching could be added relatively trivially. It is only used
  9328. in the case where we know that a property will be placed on the global object, and
  9329. we cannot verify that the property already exists.
  9330. In the jit we plant a call to cti_op_resolve_base_strict_put in the effected case rather
  9331. than making op_resolve_base have an additional runtime branch.
  9332. There's also a new helper function to create the exception for the invalid assignment.
  9333. * bytecode/CodeBlock.cpp:
  9334. (JSC::CodeBlock::dump):
  9335. * bytecode/Opcode.h:
  9336. * bytecompiler/BytecodeGenerator.cpp:
  9337. (JSC::BytecodeGenerator::emitResolveBase):
  9338. (JSC::BytecodeGenerator::emitResolveBaseForPut):
  9339. * bytecompiler/BytecodeGenerator.h:
  9340. * bytecompiler/NodesCodegen.cpp:
  9341. (JSC::AssignResolveNode::emitBytecode):
  9342. (JSC::ForInNode::emitBytecode):
  9343. * interpreter/Interpreter.cpp:
  9344. (JSC::Interpreter::resolveBase):
  9345. (JSC::Interpreter::privateExecute):
  9346. * jit/JIT.cpp:
  9347. (JSC::JIT::privateCompileMainPass):
  9348. * jit/JIT.h:
  9349. * jit/JITOpcodes.cpp:
  9350. (JSC::JIT::emit_op_resolve_base):
  9351. (JSC::JIT::emit_op_ensure_property_exists):
  9352. * jit/JITOpcodes32_64.cpp:
  9353. (JSC::JIT::emit_op_resolve_base):
  9354. (JSC::JIT::emit_op_ensure_property_exists):
  9355. * jit/JITStubs.cpp:
  9356. (JSC::DEFINE_STUB_FUNCTION):
  9357. * jit/JITStubs.h:
  9358. * parser/JSParser.cpp:
  9359. (JSC::JSParser::parseProgram):
  9360. * runtime/ExceptionHelpers.cpp:
  9361. (JSC::createErrorForInvalidGlobalAssignment):
  9362. * runtime/ExceptionHelpers.h:
  9363. * runtime/Operations.h:
  9364. (JSC::resolveBase):
  9365. 2010-10-17 Simon Fraser <simon.fraser@apple.com>
  9366. First part of fix for Windows build failure. Will wait for the
  9367. next set of link errors to determine the mangled forms for dtoaRoundSF
  9368. and dtoaRoundDP.
  9369. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  9370. 2010-10-17 Simon Fraser <simon.fraser@apple.com>
  9371. Reviewed by Nikolas Zimmermann.
  9372. Very large and small numbers fail to round-trip through CSS
  9373. https://bugs.webkit.org/show_bug.cgi?id=20674
  9374. New exports required to use DecimalNumber in WebCore.
  9375. * JavaScriptCore.exp:
  9376. * JavaScriptCore.xcodeproj/project.pbxproj:
  9377. 2010-10-16 Kyusun Kim <maniagoon@company100.net>
  9378. Reviewed by Alexey Proskuryakov.
  9379. Add using declarations for currentTimeMS() and parseDateFromNullTerminatedCharacters()
  9380. https://bugs.webkit.org/show_bug.cgi?id=47758
  9381. * wtf/CurrentTime.h:
  9382. * wtf/DateMath.h:
  9383. 2010-10-16 Patrick Gansterer <paroga@webkit.org>
  9384. Reviewed by Adam Barth.
  9385. Rename StringHasherFunctions.h to StringHasher.h
  9386. https://bugs.webkit.org/show_bug.cgi?id=47200
  9387. Now StringHasherFunctions.h only contains the StringHasher class, so rename it to the correct name.
  9388. * GNUmakefile.am:
  9389. * JavaScriptCore.gypi:
  9390. * JavaScriptCore.xcodeproj/project.pbxproj:
  9391. * wtf/StringHashFunctions.h: Removed.
  9392. * wtf/StringHasher.h: Copied from JavaScriptCore/wtf/StringHashFunctions.h.
  9393. * wtf/text/StringHash.h:
  9394. * wtf/text/StringImpl.h:
  9395. 2010-10-15 Oliver Hunt <oliver@apple.com>
  9396. Reviewed by Sam Weinig.
  9397. Automatic Semicolon Insertion incorrectly inserts semicolon after break, continue, and return followed by a newline
  9398. https://bugs.webkit.org/show_bug.cgi?id=47762
  9399. The old YACC parser depended on the lexer for some classes of semicolon insertion.
  9400. The new parser handles ASI entirely on its own so when the lexer inserts a semicolon
  9401. on its own the net result is a spurious semicolon in the input stream. This can result
  9402. in incorrect parsing in some cases:
  9403. if (0)
  9404. break
  9405. ;else {}
  9406. Would result in a parse failure as the output from the lexer is essentially
  9407. if (0)
  9408. break
  9409. ;;else
  9410. So the second semicolon is interpreted as a empty statement, which terminates the if,
  9411. making the else an error.
  9412. * parser/JSParser.cpp:
  9413. (JSC::JSParser::parseThrowStatement):
  9414. Parsing of throw statement was wrong, and only worked due to the weird behaviour
  9415. in the lexer
  9416. * parser/Lexer.cpp:
  9417. (JSC::Lexer::lex):
  9418. Remove bogus semicolon insertion from the newline handling
  9419. 2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com>
  9420. Reviewed by Dirk Schulze.
  9421. Replace some String::format() usages by StringConcatenate in WebKit
  9422. https://bugs.webkit.org/show_bug.cgi?id=47714
  9423. * wtf/text/StringConcatenate.h: Add UChar specific StringTypeAdapter, to accept single UChars in makeString().
  9424. 2010-10-15 Ilya Tikhonovsky <loislo@chromium.org>
  9425. Unreviewed build fix for Debug Leopard which is failng to compile after r69842.
  9426. * yarr/RegexInterpreter.cpp:
  9427. (JSC::Yarr::ByteCompiler::emitDisjunction):
  9428. 2010-10-15 Peter Varga <pvarga@inf.u-szeged.hu>
  9429. Reviewed by Gavin Barraclough.
  9430. The parenthetical assertion checking isn't working in some cases with YARR
  9431. Interpreter
  9432. https://bugs.webkit.org/show_bug.cgi?id=46893
  9433. Calculate the countToCheck value of a TypeParentheticalAssertion by
  9434. subtracting the number of characters which follows
  9435. a TypeParentheticalAssertion term with the number of characters which should
  9436. be matched by terms which are contained
  9437. in the TypeParentheticalAssertion term (minimumSize).
  9438. * yarr/RegexInterpreter.cpp:
  9439. (JSC::Yarr::ByteCompiler::emitDisjunction):
  9440. 2010-10-14 Nathan Vander Wilt <nate@andyet.net>
  9441. Reviewed by Darin Adler.
  9442. Added parser for ECMAScript 5 standard date format, so Date.parse can handle RFC 3339 timestamps: https://bugs.webkit.org/show_bug.cgi?id=44632
  9443. * runtime/DateConversion.cpp:
  9444. (JSC::parseDate):
  9445. * wtf/DateMath.cpp:
  9446. (WTF::ymdhmsToSeconds):
  9447. (WTF::parseES5DateFromNullTerminatedCharacters):
  9448. * wtf/DateMath.h:
  9449. 2010-10-14 Nikolas Zimmermann <nzimmermann@rim.com>
  9450. Reviewed by Gavin Barraclough.
  9451. Replace lots of String::format() usages by StringConcatenate
  9452. https://bugs.webkit.org/show_bug.cgi?id=47664
  9453. Add StringTypeAdapter<char> to accept single characters for makeString().
  9454. * wtf/text/StringConcatenate.h:
  9455. (WTF::makeString):
  9456. 2010-10-14 David Goodwin <david_goodwin@apple.com>
  9457. Reviewed by Darin Adler.
  9458. need way to measure size of JITed ARM code
  9459. https://bugs.webkit.org/show_bug.cgi?id=47121
  9460. * assembler/LinkBuffer.h:
  9461. (JSC::LinkBuffer::linkCode):
  9462. (JSC::LinkBuffer::dumpLinkStats):
  9463. (JSC::LinkBuffer::dumpCode):
  9464. 2010-10-14 Peter Varga <pvarga@inf.u-szeged.hu>
  9465. Reviewed by Gavin Barraclough.
  9466. The backreference checking isn't working in some cases with YARR Interpreter
  9467. https://bugs.webkit.org/show_bug.cgi?id=46904
  9468. The Interpreter::matchBackReference() function returns true without matching
  9469. when a backreference points to the same parentheses where it is.
  9470. * yarr/RegexInterpreter.cpp:
  9471. (JSC::Yarr::Interpreter::matchBackReference):
  9472. 2010-10-14 No'am Rosenthal <noam.rosenthal@nokia.com>
  9473. Reviewed by Andreas Kling.
  9474. [Qt] Text breaking is slow: enable ICU as an opt-in
  9475. https://bugs.webkit.org/show_bug.cgi?id=40332
  9476. Added a config flag that enables ICU as an opt-in instead of the Qt specific code.
  9477. Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h
  9478. * JavaScriptCore.pri:
  9479. * wtf/unicode/qt4/UnicodeQt4.h:
  9480. (WTF::Unicode::toLower):
  9481. (WTF::Unicode::toUpper):
  9482. (WTF::Unicode::toTitleCase):
  9483. (WTF::Unicode::foldCase):
  9484. (WTF::Unicode::isPrintableChar):
  9485. (WTF::Unicode::isSeparatorSpace):
  9486. (WTF::Unicode::isPunct):
  9487. (WTF::Unicode::isLower):
  9488. (WTF::Unicode::mirroredChar):
  9489. (WTF::Unicode::combiningClass):
  9490. (WTF::Unicode::direction):
  9491. (WTF::Unicode::category):
  9492. 2010-10-14 Anton Faern <anton@bladehawke.com>
  9493. Reviewed by Csaba Osztrogonác.
  9494. https://bugs.webkit.org/show_bug.cgi?id=47658
  9495. NetBSD was not included in the WTF_PLATFORM_FOO to WTF_OS_FOO
  9496. change. This means that OS(NETBSD) is also undefined.
  9497. * wtf/Platform.h: s/_PLATFORM_/_OS_/ for NetBSD
  9498. 2010-10-13 David Goodwin <david_goodwin@apple.com>
  9499. Reviewed by Oliver Hunt.
  9500. ARMv7 JIT should generated conditional branches when possible
  9501. https://bugs.webkit.org/show_bug.cgi?id=47384
  9502. Use different jump padding sizes for conditional and unconditional
  9503. jumps (12 bytes and 10 bytes respectively). This allows the JIT to
  9504. include the IT instruction as part of the conditional jump sequence
  9505. which in turn allows it to optimize away the IT using an ARMv7
  9506. conditional branch instruction. Use 2-byte B(T1) and 4-byte B(T3) for
  9507. conditional branches when displacement is in range. Also use IT/B(T4)
  9508. for conditional branch when displacement does not fit in B(T3).
  9509. For unconditional jump, instruction selection options are:
  9510. B(T2), B(T4), MOVW/MOVT/BX. For conditional jump, instruction selection
  9511. options are: B(T1), B(T3), IT/B(T4), ITTT/MOVW/MOVT/BX.
  9512. * assembler/ARMv7Assembler.cpp:
  9513. * assembler/ARMv7Assembler.h:
  9514. (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
  9515. (JSC::ARMv7Assembler::ifThenElse):
  9516. (JSC::ARMv7Assembler::jumpSizeDelta):
  9517. (JSC::ARMv7Assembler::canCompact):
  9518. (JSC::ARMv7Assembler::computeJumpType):
  9519. (JSC::ARMv7Assembler::link):
  9520. (JSC::ARMv7Assembler::canBeJumpT1):
  9521. (JSC::ARMv7Assembler::canBeJumpT3):
  9522. (JSC::ARMv7Assembler::canBeJumpT4):
  9523. (JSC::ARMv7Assembler::linkJumpT1):
  9524. (JSC::ARMv7Assembler::linkJumpT3):
  9525. (JSC::ARMv7Assembler::linkJumpT4):
  9526. (JSC::ARMv7Assembler::linkConditionalJumpT4):
  9527. (JSC::ARMv7Assembler::linkBX):
  9528. (JSC::ARMv7Assembler::linkConditionalBX):
  9529. (JSC::ARMv7Assembler::linkJumpAbsolute):
  9530. * assembler/LinkBuffer.h:
  9531. (JSC::LinkBuffer::linkCode):
  9532. * assembler/MacroAssemblerARMv7.h:
  9533. (JSC::MacroAssemblerARMv7::canCompact):
  9534. (JSC::MacroAssemblerARMv7::computeJumpType):
  9535. (JSC::MacroAssemblerARMv7::jumpSizeDelta):
  9536. (JSC::MacroAssemblerARMv7::jump):
  9537. (JSC::MacroAssemblerARMv7::nearCall):
  9538. (JSC::MacroAssemblerARMv7::call):
  9539. (JSC::MacroAssemblerARMv7::ret):
  9540. (JSC::MacroAssemblerARMv7::tailRecursiveCall):
  9541. (JSC::MacroAssemblerARMv7::makeJump):
  9542. (JSC::MacroAssemblerARMv7::makeBranch):
  9543. 2010-10-13 Fridrich Strba <fridrich.strba@bluewin.ch>
  9544. Reviewed by Darin Adler.
  9545. Don't depend on Windows on sched_yield and sched.h
  9546. https://bugs.webkit.org/show_bug.cgi?id=45543
  9547. sched.h is part of pthreads and sched_yield is implemented
  9548. in pthreads-win32 as Sleep(0). This patch avoids a gratuitous
  9549. dependency on pthreads-win32 in this file.
  9550. * wtf/TCSpinLock.h:
  9551. (TCMalloc_SlowLock):
  9552. 2010-10-13 Kwang Yul Seo <skyul@company100.net>
  9553. Reviewed by Kent Tamura.
  9554. [BREWMP] Port unicode
  9555. https://bugs.webkit.org/show_bug.cgi?id=45716
  9556. Brew MP port uses only the subset of ICU library to reduce the binary size.
  9557. Follow the WinCE's implementation.
  9558. * wtf/Platform.h:
  9559. * wtf/unicode/Unicode.h:
  9560. * wtf/unicode/brew/UnicodeBrew.cpp: Added.
  9561. (WTF::Unicode::toLower):
  9562. (WTF::Unicode::toUpper):
  9563. (WTF::Unicode::foldCase):
  9564. (WTF::Unicode::isPrintableChar):
  9565. (WTF::Unicode::isUpper):
  9566. (WTF::Unicode::isLower):
  9567. (WTF::Unicode::isDigit):
  9568. (WTF::Unicode::isPunct):
  9569. (WTF::Unicode::isAlphanumeric):
  9570. (WTF::Unicode::toTitleCase):
  9571. (WTF::Unicode::direction):
  9572. (WTF::Unicode::category):
  9573. (WTF::Unicode::decompositionType):
  9574. (WTF::Unicode::combiningClass):
  9575. (WTF::Unicode::mirroredChar):
  9576. (WTF::Unicode::digitValue):
  9577. (WTF::Unicode::isSpace):
  9578. (WTF::Unicode::isLetter):
  9579. * wtf/unicode/brew/UnicodeBrew.h: Added.
  9580. (WTF::Unicode::isArabicChar):
  9581. (WTF::Unicode::isSeparatorSpace):
  9582. (WTF::Unicode::hasLineBreakingPropertyComplexContext):
  9583. (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic):
  9584. (WTF::Unicode::umemcasecmp):
  9585. 2010-10-13 Gavin Barraclough <barraclough@apple.com>
  9586. Windows build fix.
  9587. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  9588. 2010-10-13 Adam Barth <abarth@webkit.org>
  9589. Reviewed by Maciej Stachowiak.
  9590. [WTFURL] Add URLQueryCanonicalizer
  9591. https://bugs.webkit.org/show_bug.cgi?id=45088
  9592. This class canonicalizes the query component of URLs. The main tricky
  9593. bit there is the convertCharset function, which I've moved to a
  9594. templated dependency. There'll likely be more about that in future
  9595. patches.
  9596. * JavaScriptCore.xcodeproj/project.pbxproj:
  9597. * wtf/url/src/URLEscape.cpp: Added.
  9598. * wtf/url/src/URLEscape.h: Added.
  9599. (WTF::appendEscapedCharacter):
  9600. * wtf/url/src/URLQueryCanonicalizer.h: Added.
  9601. (WTF::URLQueryCanonicalizer::canonicalize):
  9602. (WTF::URLQueryCanonicalizer::isAllASCII):
  9603. (WTF::URLQueryCanonicalizer::appendRaw8BitQueryString):
  9604. (WTF::URLQueryCanonicalizer::convertToQueryEncoding):
  9605. 2010-10-13 Gavin Barraclough <barraclough@apple.com>
  9606. Reviewed by Oliver Hunt.
  9607. Bug 43987 - Downloading using XHR is much slower than before
  9608. Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector.
  9609. Fundamentally this should be the same (copies current contents to expand capacity,
  9610. rather than using a rope), but this approach allows the intermadiate state of the
  9611. String to be inspected in the buffer without copying to resolve.
  9612. * runtime/JSONObject.cpp:
  9613. (JSC::Stringifier::appendQuotedString):
  9614. (JSC::Stringifier::Holder::appendNextProperty):
  9615. Renamed StringBuilder::size() -> length() (to match other String types).
  9616. * runtime/UStringBuilder.h:
  9617. (JSC::UStringBuilder::append):
  9618. (JSC::UStringBuilder::toUString):
  9619. Update for changes in parent class, can just 'using' the append methods.
  9620. * wtf/text/StringBuilder.cpp: Added.
  9621. (WTF::StringBuilder::reifyString):
  9622. (WTF::StringBuilder::resize):
  9623. (WTF::StringBuilder::reserveCapacity):
  9624. (WTF::StringBuilder::allocateBuffer):
  9625. (WTF::StringBuilder::appendUninitialized):
  9626. (WTF::StringBuilder::append):
  9627. (WTF::StringBuilder::shrinkToFit):
  9628. * wtf/text/StringBuilder.h:
  9629. (WTF::StringBuilder::StringBuilder):
  9630. (WTF::StringBuilder::append):
  9631. (WTF::StringBuilder::toString):
  9632. (WTF::StringBuilder::toStringPreserveCapacity):
  9633. (WTF::StringBuilder::length):
  9634. (WTF::StringBuilder::isEmpty):
  9635. (WTF::StringBuilder::operator[]):
  9636. (WTF::StringBuilder::clear):
  9637. Class updated to use overcapacity in a StringImpl, rather than a Vector.
  9638. * Android.mk:
  9639. * Android.v8.wtf.mk:
  9640. * GNUmakefile.am:
  9641. * JavaScriptCore.exp:
  9642. * JavaScriptCore.gypi:
  9643. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  9644. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  9645. * JavaScriptCore.vcproj/jsc/jsc.vcproj:
  9646. * JavaScriptCore.xcodeproj/project.pbxproj:
  9647. * wtf/CMakeLists.txt:
  9648. * wtf/wtf.pri:
  9649. 2010-10-13 Adam Roben <aroben@apple.com>
  9650. Export tryFastRealloc for WebKit2's benefit
  9651. Rubber-stamped by Anders Carlsson.
  9652. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added
  9653. tryFastRealloc. Removed RegExpObject::info, which is now exported via
  9654. JS_EXPORTDATA.
  9655. 2010-10-13 Adam Barth <abarth@webkit.org>
  9656. Reviewed by Maciej Stachowiak.
  9657. [WTFURL] Add a mechanism for classifying types of characters
  9658. https://bugs.webkit.org/show_bug.cgi?id=45085
  9659. Various characters have different escaping rules depending on where
  9660. they are in URLs. This patch adds a table containing that information.
  9661. * JavaScriptCore.xcodeproj/project.pbxproj:
  9662. * wtf/url/src/URLCharacterTypes.cpp: Added.
  9663. * wtf/url/src/URLCharacterTypes.h: Added.
  9664. (WTF::URLCharacterTypes::isQueryChar):
  9665. (WTF::URLCharacterTypes::isIPv4Char):
  9666. (WTF::URLCharacterTypes::isHexChar):
  9667. (WTF::URLCharacterTypes::isCharOfType):
  9668. 2010-10-13 Xan Lopez <xlopez@igalia.com>
  9669. Reviewed by Csaba Osztrogonác.
  9670. Missing parameters for bytecode dump of next_pname
  9671. https://bugs.webkit.org/show_bug.cgi?id=47590
  9672. * bytecode/CodeBlock.cpp:
  9673. (JSC::CodeBlock::dump): add missing parameters to the dump.
  9674. 2010-10-13 Nikolas Zimmermann <nzimmermann@rim.com>
  9675. Reviewed by Dirk Schulze.
  9676. Add wtf/text/StringConcatenate
  9677. https://bugs.webkit.org/show_bug.cgi?id=47584
  9678. Move runtime/StringConcatenate.h to wtf/text, make it work for Strings too.
  9679. Add a special runtime/UStringConcatenate.h class that inherits from StringConcatenate, and extends it for use with UString.
  9680. Exactly the same design that has been followed while refactoring StringBuilder.
  9681. The UString variants can all be removed as soon as WTF::String & JSC::UString converge.
  9682. * GNUmakefile.am: Add wtf/text/StringConcatenate.h and runtime/UStringConcatenate.h.
  9683. * JavaScriptCore.gypi: Ditto.
  9684. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
  9685. * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
  9686. * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
  9687. * bytecode/CodeBlock.cpp: s/makeString/makeUString/
  9688. (JSC::escapeQuotes):
  9689. (JSC::valueToSourceString):
  9690. (JSC::constantName):
  9691. (JSC::idName):
  9692. (JSC::CodeBlock::registerName):
  9693. (JSC::regexpToSourceString):
  9694. (JSC::regexpName):
  9695. * bytecompiler/NodesCodegen.cpp: Ditto.
  9696. (JSC::substitute):
  9697. * profiler/Profiler.cpp: Ditto.
  9698. (JSC::Profiler::createCallIdentifier):
  9699. * runtime/ExceptionHelpers.cpp: Ditto.
  9700. (JSC::createUndefinedVariableError):
  9701. (JSC::createErrorMessage):
  9702. (JSC::createInvalidParamError):
  9703. * runtime/FunctionConstructor.cpp: Ditto.
  9704. (JSC::constructFunction):
  9705. * runtime/FunctionPrototype.cpp: Ditto.
  9706. (JSC::insertSemicolonIfNeeded):
  9707. * runtime/JSONObject.cpp: Ditto.
  9708. (JSC::Stringifier::indent):
  9709. * runtime/JSStringBuilder.h:
  9710. (JSC::jsMakeNontrivialString):
  9711. * runtime/RegExpConstructor.cpp: Ditto.
  9712. (JSC::constructRegExp):
  9713. * runtime/RegExpObject.cpp: Ditto.
  9714. (JSC::RegExpObject::match):
  9715. * runtime/RegExpPrototype.cpp: Ditto.
  9716. (JSC::regExpProtoFuncCompile):
  9717. * runtime/StringConcatenate.h: Removed.
  9718. * runtime/UStringConcatenate.h: Added. Only contains the StringTypeAdapter<JSC::UString> code and the makeUString variants, the rest lives in wtf/text/StringConcatenate.h
  9719. (JSC::makeUString):
  9720. * wtf/text/StringConcatenate.h: Copied from runtime/StringConcatenate.h.
  9721. (WTF::makeString):
  9722. 2010-10-12 Gavin Barraclough <barraclough@apple.com>
  9723. Windows build fix.
  9724. * wtf/text/StringBuilder.h:
  9725. (WTF::StringBuilder::length):
  9726. 2010-10-12 Nikolas Zimmermann <nzimmermann@rim.com>
  9727. Reviewed by Gavin Barraclough.
  9728. Unify JSC::StringBuilder & WebCore::StringBuilder
  9729. https://bugs.webkit.org/show_bug.cgi?id=47538
  9730. Move runtime/StringBuilder.h to wtf/text/StringBuilder.h. Rename build() to toString() and return a WTF::String().
  9731. Move the append(const JSC::UString&) method into runtime/UStringBuilder.h.
  9732. UStringBuilder inherits from StringBuilder.h and adds append(const JSC::UString&) and UString toUString() functionality.
  9733. No new code, just move code around.
  9734. * GNUmakefile.am: Add wtf/text/StringBuilder.h / runtime/UStringBuilder.h. Remove runtime/StringBuilder.h.
  9735. * JavaScriptCore.gypi: Ditto.
  9736. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
  9737. * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
  9738. * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
  9739. * runtime/Executable.cpp:
  9740. (JSC::FunctionExecutable::paramString): Use UStringBuilder, instead of StringBuilder. Rename build() -> toUString().
  9741. * runtime/FunctionConstructor.cpp:
  9742. (JSC::constructFunction): Ditto.
  9743. * runtime/JSGlobalObjectFunctions.cpp:
  9744. (JSC::globalFuncUnescape): Ditto.
  9745. * runtime/JSONObject.cpp:
  9746. (JSC::Stringifier::stringify): Ditto.
  9747. (JSC::Stringifier::appendQuotedString): Ditto.
  9748. (JSC::Stringifier::appendStringifiedValue): Ditto.
  9749. (JSC::Stringifier::startNewLine): Ditto.
  9750. (JSC::Stringifier::Holder::appendNextProperty): Ditto.
  9751. * runtime/LiteralParser.cpp:
  9752. (JSC::LiteralParser::Lexer::lexString): Ditto.
  9753. * runtime/NumberPrototype.cpp: Remove unneeded JSStringBuilder.h / StringBuilder.h include.
  9754. * runtime/StringBuilder.h: Removed.
  9755. * runtime/UStringBuilder.h: Added. Inherits from WTF::StringBuilder, extending it by two methods.
  9756. (JSC::UStringBuilder::append): append(const JSC::UString&)
  9757. (JSC::UStringBuilder::toUString):
  9758. * wtf/text/StringBuilder.h: Copied from runtime/StringBuilder.h. Move JSC::UString parts into runtime/UStringBuilder.h
  9759. (WTF::StringBuilder::append): Renamed m_buffer to buffer everywhere.
  9760. (WTF::StringBuilder::isEmpty): Ditto (+ constify method).
  9761. (WTF::StringBuilder::reserveCapacity): Ditto.
  9762. (WTF::StringBuilder::resize): Ditto.
  9763. (WTF::StringBuilder::size): Ditto.
  9764. (WTF::StringBuilder::operator[]): Ditto.
  9765. (WTF::StringBuilder::toString): Ditto (+ renamed from build()). Returns a String, not an UString. The old build() method is now named toUString() and lives in UStringBuilder.
  9766. 2010-10-12 Michael Saboff <msaboff@apple.com>
  9767. Reviewed by Oliver Hunt.
  9768. Cleaned up the processing of replacements after regular expression
  9769. processing, especially the case where there wasn't a match.
  9770. Changed to use empty strings instead of computing a zero length sub
  9771. string.
  9772. https://bugs.webkit.org/show_bug.cgi?id=47506
  9773. * runtime/StringPrototype.cpp:
  9774. (JSC::jsSpliceSubstringsWithSeparators):
  9775. (JSC::stringProtoFuncReplace):
  9776. 2010-10-11 Patrick Gansterer <paroga@webkit.org>
  9777. Unreviewed.
  9778. Clang build fix after r69472.
  9779. https://bugs.webkit.org/show_bug.cgi?id=46523
  9780. * wtf/text/StringHash.h:
  9781. 2010-10-11 Oliver Hunt <oliver@apple.com>
  9782. Undo last minute change to 32bit build.
  9783. * jit/JITOpcodes32_64.cpp:
  9784. (JSC::JIT::emit_op_convert_this_strict):
  9785. 2010-10-11 Brian Weinstein <bweinstein@apple.com>
  9786. Build fix for Windows. Add a necessary export from r69516.
  9787. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  9788. 2010-10-11 Oliver Hunt <oliver@apple.com>
  9789. Fix interpreter build -- was broken by incorrect merge.
  9790. * interpreter/Interpreter.cpp:
  9791. (JSC::Interpreter::privateExecute):
  9792. 2010-10-01 Oliver Hunt <oliver@apple.com>
  9793. Reviewed by Gavin Barraclough.
  9794. [ES5] Implement strict mode
  9795. https://bugs.webkit.org/show_bug.cgi?id=10701
  9796. Initial strict mode implementation. This is the simplest
  9797. implementation that could possibly work and adds (hopefully)
  9798. all of the restrictions required by strict mode. There are
  9799. a number of inefficiencies, especially in the handling of
  9800. arguments and eval as smart implementations would make this
  9801. patch more complicated.
  9802. The SyntaxChecker AST builder has become somewhat more complex
  9803. as strict mode does require more parse tree information to
  9804. validate the syntax.
  9805. Summary of major changes to the parser:
  9806. * We track when we enter strict mode (this may come as a surprise)
  9807. * Strict mode actually requires a degree of AST knowledge to validate
  9808. so the SyntaxChecker now produces values that can be used to distinguish
  9809. "node" types.
  9810. * We now track variables that are written to. We do this to
  9811. statically identify writes to global properties that don't exist
  9812. and abort at that point. This should actually make it possible
  9813. to optimise some other cases in the future but for now it's
  9814. purely for validity checking. Currently writes are only tracked
  9815. in strict mode code.
  9816. * Labels are now tracked as it is now a syntax error to jump to a label
  9817. that does not exist (or to use break, continue, or return in a context
  9818. where they would be invalid).
  9819. Runtime changes:
  9820. * In order to get correct hanlding of the Arguments object all
  9821. strict mode functions that reference arguments create and tearoff
  9822. the arguments object on entry. This is not strictly necessary
  9823. but was the least work necessary to get the correct behaviour.
  9824. * PutPropertySlot now tracks whether it is being used for a strict
  9825. mode write, and if so Object::put will throw when a write can't be
  9826. completed.
  9827. * StrictEvalActivation was added as an "activation" object for strict
  9828. mode eval (so that strict eval does not introduce new variables into
  9829. the containing scope).
  9830. * CMakeLists.txt:
  9831. * GNUmakefile.am:
  9832. * JavaScriptCore.exp:
  9833. * JavaScriptCore.pro:
  9834. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  9835. * JavaScriptCore.xcodeproj/project.pbxproj:
  9836. * bytecode/CodeBlock.cpp:
  9837. (JSC::CodeBlock::dump):
  9838. (JSC::CodeBlock::CodeBlock):
  9839. (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
  9840. * bytecode/CodeBlock.h:
  9841. (JSC::CodeBlock::isStrictMode):
  9842. * bytecode/EvalCodeCache.h:
  9843. (JSC::EvalCodeCache::get):
  9844. * bytecode/Opcode.h:
  9845. * bytecompiler/BytecodeGenerator.cpp:
  9846. (JSC::BytecodeGenerator::BytecodeGenerator):
  9847. (JSC::BytecodeGenerator::createArgumentsIfNecessary):
  9848. (JSC::BytecodeGenerator::emitReturn):
  9849. * bytecompiler/BytecodeGenerator.h:
  9850. (JSC::BytecodeGenerator::isStrictMode):
  9851. (JSC::BytecodeGenerator::makeFunction):
  9852. * debugger/Debugger.cpp:
  9853. (JSC::evaluateInGlobalCallFrame):
  9854. * debugger/DebuggerCallFrame.cpp:
  9855. (JSC::DebuggerCallFrame::evaluate):
  9856. * interpreter/Interpreter.cpp:
  9857. (JSC::Interpreter::callEval):
  9858. (JSC::Interpreter::unwindCallFrame):
  9859. (JSC::Interpreter::execute):
  9860. (JSC::Interpreter::privateExecute):
  9861. * jit/JIT.cpp:
  9862. (JSC::JIT::privateCompileMainPass):
  9863. (JSC::JIT::privateCompileSlowCases):
  9864. * jit/JIT.h:
  9865. * jit/JITOpcodes.cpp:
  9866. (JSC::JIT::emit_op_get_pnames):
  9867. (JSC::JIT::emit_op_convert_this_strict):
  9868. (JSC::JIT::emitSlow_op_convert_this_strict):
  9869. * jit/JITOpcodes32_64.cpp:
  9870. (JSC::JIT::emit_op_get_pnames):
  9871. * jit/JITStubs.cpp:
  9872. (JSC::DEFINE_STUB_FUNCTION):
  9873. * jit/JITStubs.h:
  9874. * parser/ASTBuilder.h:
  9875. (JSC::ASTBuilder::createFunctionBody):
  9876. (JSC::ASTBuilder::isResolve):
  9877. * parser/JSParser.cpp:
  9878. (JSC::JSParser::next):
  9879. (JSC::JSParser::startLoop):
  9880. (JSC::JSParser::endLoop):
  9881. (JSC::JSParser::startSwitch):
  9882. (JSC::JSParser::endSwitch):
  9883. (JSC::JSParser::setStrictMode):
  9884. (JSC::JSParser::strictMode):
  9885. (JSC::JSParser::isValidStrictMode):
  9886. (JSC::JSParser::declareParameter):
  9887. (JSC::JSParser::breakIsValid):
  9888. (JSC::JSParser::pushLabel):
  9889. (JSC::JSParser::popLabel):
  9890. (JSC::JSParser::hasLabel):
  9891. (JSC::JSParser::DepthManager::DepthManager):
  9892. (JSC::JSParser::DepthManager::~DepthManager):
  9893. (JSC::JSParser::Scope::Scope):
  9894. (JSC::JSParser::Scope::startSwitch):
  9895. (JSC::JSParser::Scope::endSwitch):
  9896. (JSC::JSParser::Scope::startLoop):
  9897. (JSC::JSParser::Scope::endLoop):
  9898. (JSC::JSParser::Scope::inLoop):
  9899. (JSC::JSParser::Scope::breakIsValid):
  9900. (JSC::JSParser::Scope::pushLabel):
  9901. (JSC::JSParser::Scope::popLabel):
  9902. (JSC::JSParser::Scope::hasLabel):
  9903. (JSC::JSParser::Scope::isFunction):
  9904. (JSC::JSParser::Scope::declareVariable):
  9905. (JSC::JSParser::Scope::declareWrite):
  9906. (JSC::JSParser::Scope::deleteProperty):
  9907. (JSC::JSParser::Scope::declareParameter):
  9908. (JSC::JSParser::Scope::setNeedsFullActivation):
  9909. (JSC::JSParser::Scope::collectFreeVariables):
  9910. (JSC::JSParser::Scope::getUncapturedWrittenVariables):
  9911. (JSC::JSParser::Scope::getDeletedVariables):
  9912. (JSC::JSParser::Scope::setStrictMode):
  9913. (JSC::JSParser::Scope::strictMode):
  9914. (JSC::JSParser::Scope::isValidStrictMode):
  9915. (JSC::JSParser::pushScope):
  9916. (JSC::JSParser::popScope):
  9917. (JSC::JSParser::declareVariable):
  9918. (JSC::JSParser::declareWrite):
  9919. (JSC::JSParser::deleteProperty):
  9920. (JSC::jsParse):
  9921. (JSC::JSParser::JSParser):
  9922. (JSC::JSParser::parseProgram):
  9923. (JSC::JSParser::parseSourceElements):
  9924. (JSC::JSParser::parseDoWhileStatement):
  9925. (JSC::JSParser::parseWhileStatement):
  9926. (JSC::JSParser::parseVarDeclarationList):
  9927. (JSC::JSParser::parseConstDeclarationList):
  9928. (JSC::JSParser::parseForStatement):
  9929. (JSC::JSParser::parseBreakStatement):
  9930. (JSC::JSParser::parseContinueStatement):
  9931. (JSC::JSParser::parseReturnStatement):
  9932. (JSC::JSParser::parseWithStatement):
  9933. (JSC::JSParser::parseSwitchStatement):
  9934. (JSC::JSParser::parseSwitchClauses):
  9935. (JSC::JSParser::parseSwitchDefaultClause):
  9936. (JSC::JSParser::parseTryStatement):
  9937. (JSC::JSParser::parseBlockStatement):
  9938. (JSC::JSParser::parseStatement):
  9939. (JSC::JSParser::parseFormalParameters):
  9940. (JSC::JSParser::parseFunctionBody):
  9941. (JSC::JSParser::parseFunctionInfo):
  9942. (JSC::JSParser::parseFunctionDeclaration):
  9943. (JSC::JSParser::parseExpressionOrLabelStatement):
  9944. (JSC::JSParser::parseIfStatement):
  9945. (JSC::JSParser::parseExpression):
  9946. (JSC::JSParser::parseAssignmentExpression):
  9947. (JSC::JSParser::parseConditionalExpression):
  9948. (JSC::JSParser::parseBinaryExpression):
  9949. (JSC::JSParser::parseStrictObjectLiteral):
  9950. (JSC::JSParser::parsePrimaryExpression):
  9951. (JSC::JSParser::parseMemberExpression):
  9952. (JSC::JSParser::parseUnaryExpression):
  9953. * parser/JSParser.h:
  9954. * parser/Lexer.cpp:
  9955. (JSC::Lexer::parseString):
  9956. (JSC::Lexer::lex):
  9957. * parser/Lexer.h:
  9958. (JSC::Lexer::isReparsing):
  9959. * parser/Nodes.cpp:
  9960. (JSC::ScopeNode::ScopeNode):
  9961. (JSC::FunctionBodyNode::FunctionBodyNode):
  9962. (JSC::FunctionBodyNode::create):
  9963. * parser/Nodes.h:
  9964. (JSC::ScopeNode::isStrictMode):
  9965. * parser/Parser.cpp:
  9966. (JSC::Parser::parse):
  9967. * parser/Parser.h:
  9968. (JSC::Parser::parse):
  9969. * parser/SyntaxChecker.h:
  9970. (JSC::SyntaxChecker::SyntaxChecker):
  9971. (JSC::SyntaxChecker::makeFunctionCallNode):
  9972. (JSC::SyntaxChecker::appendToComma):
  9973. (JSC::SyntaxChecker::createCommaExpr):
  9974. (JSC::SyntaxChecker::makeAssignNode):
  9975. (JSC::SyntaxChecker::makePrefixNode):
  9976. (JSC::SyntaxChecker::makePostfixNode):
  9977. (JSC::SyntaxChecker::makeTypeOfNode):
  9978. (JSC::SyntaxChecker::makeDeleteNode):
  9979. (JSC::SyntaxChecker::makeNegateNode):
  9980. (JSC::SyntaxChecker::makeBitwiseNotNode):
  9981. (JSC::SyntaxChecker::createLogicalNot):
  9982. (JSC::SyntaxChecker::createUnaryPlus):
  9983. (JSC::SyntaxChecker::createVoid):
  9984. (JSC::SyntaxChecker::thisExpr):
  9985. (JSC::SyntaxChecker::createResolve):
  9986. (JSC::SyntaxChecker::createObjectLiteral):
  9987. (JSC::SyntaxChecker::createArray):
  9988. (JSC::SyntaxChecker::createNumberExpr):
  9989. (JSC::SyntaxChecker::createString):
  9990. (JSC::SyntaxChecker::createBoolean):
  9991. (JSC::SyntaxChecker::createNull):
  9992. (JSC::SyntaxChecker::createBracketAccess):
  9993. (JSC::SyntaxChecker::createDotAccess):
  9994. (JSC::SyntaxChecker::createRegex):
  9995. (JSC::SyntaxChecker::createNewExpr):
  9996. (JSC::SyntaxChecker::createConditionalExpr):
  9997. (JSC::SyntaxChecker::createAssignResolve):
  9998. (JSC::SyntaxChecker::createFunctionExpr):
  9999. (JSC::SyntaxChecker::createFunctionBody):
  10000. (JSC::SyntaxChecker::appendBinaryExpressionInfo):
  10001. (JSC::SyntaxChecker::operatorStackPop):
  10002. * runtime/Arguments.cpp:
  10003. (JSC::Arguments::createStrictModeCallerIfNecessary):
  10004. (JSC::Arguments::createStrictModeCalleeIfNecessary):
  10005. (JSC::Arguments::getOwnPropertySlot):
  10006. (JSC::Arguments::getOwnPropertyDescriptor):
  10007. (JSC::Arguments::put):
  10008. (JSC::Arguments::deleteProperty):
  10009. * runtime/Arguments.h:
  10010. (JSC::Arguments::Arguments):
  10011. * runtime/CommonIdentifiers.cpp:
  10012. (JSC::CommonIdentifiers::CommonIdentifiers):
  10013. * runtime/CommonIdentifiers.h:
  10014. * runtime/Error.cpp:
  10015. (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
  10016. (JSC::StrictModeTypeErrorFunction::constructThrowTypeError):
  10017. (JSC::StrictModeTypeErrorFunction::getConstructData):
  10018. (JSC::StrictModeTypeErrorFunction::callThrowTypeError):
  10019. (JSC::StrictModeTypeErrorFunction::getCallData):
  10020. (JSC::createTypeErrorFunction):
  10021. * runtime/Error.h:
  10022. * runtime/Executable.cpp:
  10023. (JSC::EvalExecutable::EvalExecutable):
  10024. (JSC::ProgramExecutable::ProgramExecutable):
  10025. (JSC::FunctionExecutable::FunctionExecutable):
  10026. (JSC::EvalExecutable::compileInternal):
  10027. (JSC::ProgramExecutable::checkSyntax):
  10028. (JSC::ProgramExecutable::compileInternal):
  10029. (JSC::FunctionExecutable::compileForCallInternal):
  10030. (JSC::FunctionExecutable::compileForConstructInternal):
  10031. (JSC::FunctionExecutable::reparseExceptionInfo):
  10032. (JSC::EvalExecutable::reparseExceptionInfo):
  10033. (JSC::FunctionExecutable::fromGlobalCode):
  10034. (JSC::ProgramExecutable::reparseExceptionInfo):
  10035. * runtime/Executable.h:
  10036. (JSC::ScriptExecutable::ScriptExecutable):
  10037. (JSC::ScriptExecutable::isStrictMode):
  10038. (JSC::EvalExecutable::create):
  10039. (JSC::FunctionExecutable::create):
  10040. * runtime/JSActivation.cpp:
  10041. (JSC::JSActivation::toStrictThisObject):
  10042. * runtime/JSActivation.h:
  10043. * runtime/JSFunction.cpp:
  10044. (JSC::createDescriptorForThrowingProperty):
  10045. (JSC::JSFunction::getOwnPropertySlot):
  10046. (JSC::JSFunction::getOwnPropertyDescriptor):
  10047. (JSC::JSFunction::put):
  10048. * runtime/JSGlobalData.cpp:
  10049. (JSC::JSGlobalData::JSGlobalData):
  10050. * runtime/JSGlobalData.h:
  10051. * runtime/JSGlobalObject.cpp:
  10052. (JSC::JSGlobalObject::reset):
  10053. * runtime/JSGlobalObject.h:
  10054. (JSC::JSGlobalObject::internalFunctionStructure):
  10055. * runtime/JSGlobalObjectFunctions.cpp:
  10056. (JSC::globalFuncEval):
  10057. * runtime/JSObject.cpp:
  10058. (JSC::JSObject::put):
  10059. (JSC::JSObject::toStrictThisObject):
  10060. (JSC::throwTypeError):
  10061. * runtime/JSObject.h:
  10062. (JSC::JSObject::isStrictModeFunction):
  10063. (JSC::JSObject::putDirectInternal):
  10064. (JSC::JSObject::putDirect):
  10065. (JSC::JSValue::putDirect):
  10066. (JSC::JSValue::toStrictThisObject):
  10067. * runtime/JSStaticScopeObject.cpp:
  10068. (JSC::JSStaticScopeObject::toStrictThisObject):
  10069. * runtime/JSStaticScopeObject.h:
  10070. * runtime/JSValue.h:
  10071. * runtime/JSZombie.h:
  10072. (JSC::JSZombie::toStrictThisObject):
  10073. * runtime/PutPropertySlot.h:
  10074. (JSC::PutPropertySlot::PutPropertySlot):
  10075. (JSC::PutPropertySlot::isStrictMode):
  10076. * runtime/StrictEvalActivation.cpp: Added.
  10077. (JSC::StrictEvalActivation::StrictEvalActivation):
  10078. (JSC::StrictEvalActivation::deleteProperty):
  10079. (JSC::StrictEvalActivation::toThisObject):
  10080. (JSC::StrictEvalActivation::toStrictThisObject):
  10081. * runtime/StrictEvalActivation.h: Added.
  10082. 2010-10-10 Patrick Gansterer <paroga@webkit.org>
  10083. Unreviewed.
  10084. Windows build fix after r69472.
  10085. * wtf/text/StringHash.h:
  10086. (WTF::CaseFoldingHash::hash):
  10087. 2010-10-10 Patrick Gansterer <paroga@webkit.org>
  10088. Reviewed by Adam Barth.
  10089. Use WTF::StringHasher in WTF::CaseFoldingHash
  10090. https://bugs.webkit.org/show_bug.cgi?id=46523
  10091. * wtf/text/StringHash.h:
  10092. (WTF::CaseFoldingHash::foldCase):
  10093. (WTF::CaseFoldingHash::hash):
  10094. 2010-10-09 Pratik Solanki <psolanki@apple.com>
  10095. Reviewed by Xan Lopez.
  10096. https://bugs.webkit.org/show_bug.cgi?id=47445
  10097. Remove unused function WTFThreadData::initializeIdentifierTable()
  10098. * wtf/WTFThreadData.h:
  10099. 2010-10-08 Michael Saboff <msaboff@apple.com>
  10100. Reviewed by Darin Adler.
  10101. Added check to start of subexpression being positive before using
  10102. subexpression in replacement.
  10103. https://bugs.webkit.org/show_bug.cgi?id=47324
  10104. * runtime/StringPrototype.cpp:
  10105. (JSC::substituteBackreferencesSlow):
  10106. 2010-10-08 Chris Evans <cevans@google.com>
  10107. Reviewed by David Levin.
  10108. https://bugs.webkit.org/show_bug.cgi?id=47393
  10109. Use unsigned consistently to check for max StringImpl length.
  10110. Add a few integer overflow checks.
  10111. Uses the existing paradigm of CRASH() when we can't reasonably handle a crazily large request.
  10112. * wtf/text/WTFString.cpp:
  10113. * wtf/text/StringImpl.h:
  10114. * wtf/text/StringImpl.cpp:
  10115. Better use of size_t vs. unsigned; check for integer overflows.
  10116. 2010-10-07 David Goodwin <david_goodwin@apple.com>
  10117. Reviewed by Oliver Hunt.
  10118. ARM JIT generates undefined operations due to partially uninitialized ShiftTypeAndAmount
  10119. https://bugs.webkit.org/show_bug.cgi?id=47356
  10120. * assembler/ARMv7Assembler.h:
  10121. 2010-10-06 Chris Evans <cevans@google.com>
  10122. Reviewed by David Levin.
  10123. https://bugs.webkit.org/show_bug.cgi?id=47248
  10124. Use size_t consistently in CString, to prevent theoretical trouble
  10125. with > 4GB strings on 64-bit platforms.
  10126. * wtf/text/CString.h:
  10127. * wtf/text/CString.cpp:
  10128. Use size_t for string lengths.
  10129. * wtf/MD5.cpp:
  10130. (WTF::expectMD5): use suitable format string + cast for size_t.
  10131. * JavaScriptCore.exp:
  10132. Update symbol name.
  10133. 2010-10-06 Anders Carlsson <andersca@apple.com>
  10134. Reviewed by Sam Weinig.
  10135. Start cleaning up Arguments.h
  10136. https://bugs.webkit.org/show_bug.cgi?id=47304
  10137. * wtf/TypeTraits.h:
  10138. * wtf/TypeTraits.cpp:
  10139. Add RemoveReference type trait.
  10140. 2010-10-06 Rafael Antognolli <antognolli@profusion.mobi>
  10141. Unreviewed build fix.
  10142. [EFL] Build fix for glib support.
  10143. https://bugs.webkit.org/show_bug.cgi?id=47221
  10144. If compiling with GLib support enabled, we also need to link wtf against
  10145. glib library.
  10146. * wtf/CMakeListsEfl.txt:
  10147. 2010-10-05 Kwang Yul Seo <skyul@company100.net>
  10148. Reviewed by Gavin Barraclough.
  10149. [BREWMP] Port ExecutableAllocator::cacheFlush to enable ARM JIT
  10150. https://bugs.webkit.org/show_bug.cgi?id=47117
  10151. Use IMemCache1 to flush data cache and invalidate instruction cache.
  10152. * jit/ExecutableAllocator.h:
  10153. (JSC::ExecutableAllocator::cacheFlush):
  10154. 2010-10-05 Leandro Pereira <leandro@profusion.mobi>
  10155. Unreviewed. Build fix.
  10156. Moved "jsc" directory to "shell", so that the name does not clash with the
  10157. JavaScriptCore shell in some build systems.
  10158. http://webkit.org/b/47049
  10159. * CMakeLists.txt: Changed reference from "jsc" to "shell".
  10160. * jsc: Removed.
  10161. * jsc/CMakeLists.txt: Removed.
  10162. * jsc/CMakeListsEfl.txt: Removed.
  10163. * shell: Copied from JavaScriptCore/jsc.
  10164. 2010-10-05 Kwang Yul Seo <skyul@company100.net>
  10165. Reviewed by Kent Tamura.
  10166. [BREWMP] Use PlatformRefPtr in randomNumber
  10167. https://bugs.webkit.org/show_bug.cgi?id=46989
  10168. Use PlatformRefPtr to free memory automatically.
  10169. * wtf/RandomNumber.cpp:
  10170. (WTF::randomNumber):
  10171. 2010-10-05 Oliver Hunt <oliver@apple.com>
  10172. Reviewed by Darin Adler.
  10173. REGRESSION(r68338): JavaScript error on PowerPC only (crashes on Interpreter built for x86_64)
  10174. https://bugs.webkit.org/show_bug.cgi?id=46690
  10175. Use the correct register value when initialising the arguments
  10176. object in the interpreter. This is covered by existing tests.
  10177. * interpreter/Interpreter.cpp:
  10178. (JSC::Interpreter::privateExecute):
  10179. 2010-10-04 David Goodwin <david_goodwin@apple.com>
  10180. Reviewed by Oliver Hunt.
  10181. ARMv7 JIT should take advantage of 2-byte branches to reduce code size
  10182. https://bugs.webkit.org/show_bug.cgi?id=47007
  10183. * assembler/ARMv7Assembler.cpp:
  10184. * assembler/ARMv7Assembler.h:
  10185. (JSC::ARMv7Assembler::computeJumpType):
  10186. (JSC::ARMv7Assembler::link):
  10187. (JSC::ARMv7Assembler::canBeJumpT2):
  10188. (JSC::ARMv7Assembler::canBeJumpT4):
  10189. (JSC::ARMv7Assembler::linkBX):
  10190. (JSC::ARMv7Assembler::linkJumpT4):
  10191. (JSC::ARMv7Assembler::linkJumpT2):
  10192. (JSC::ARMv7Assembler::linkJumpAbsolute):
  10193. 2010-10-04 Gyuyoung Kim <gyuyoung.kim@samsung.com>
  10194. Reviewed by Antonio Gomes.
  10195. [EFL] Use fast malloc for WebKit EFL
  10196. https://bugs.webkit.org/show_bug.cgi?id=46691
  10197. Use fast malloc for WebKit EFL because the fast malloc is to allocate
  10198. memory quickly.
  10199. * wtf/CMakeListsEfl.txt:
  10200. 2010-10-04 Oliver Hunt <oliver@apple.com>
  10201. Reviewed by Geoff Garen.
  10202. Lazily create activation objects
  10203. https://bugs.webkit.org/show_bug.cgi?id=47107
  10204. Make it possible to lazily create the activation object
  10205. for a function that needs one. This allows us to reduce
  10206. the overhead of entering a function that may require
  10207. an activation in some cases, but not always.
  10208. This does make exception handling a little more complex as
  10209. it's now necessary to verify that a callframes activation
  10210. has been created, and create it if not, in all of the
  10211. paths used in exception handling.
  10212. We also need to add logic to check for the existence of
  10213. the activation in the scoped_var opcodes, as well as
  10214. op_ret, op_ret_object_or_this and op_tearoff_activation
  10215. so that we can avoid creating an activation unnecesarily
  10216. on function exit.
  10217. * bytecode/CodeBlock.cpp:
  10218. (JSC::CodeBlock::dump):
  10219. (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
  10220. (JSC::CodeBlock::createActivation):
  10221. * bytecode/CodeBlock.h:
  10222. (JSC::CodeBlock::setActivationRegister):
  10223. (JSC::CodeBlock::activationRegister):
  10224. * bytecode/Opcode.h:
  10225. * bytecompiler/BytecodeGenerator.cpp:
  10226. (JSC::BytecodeGenerator::BytecodeGenerator):
  10227. (JSC::BytecodeGenerator::emitNewFunctionInternal):
  10228. (JSC::BytecodeGenerator::emitNewFunctionExpression):
  10229. (JSC::BytecodeGenerator::createActivationIfNecessary):
  10230. * bytecompiler/BytecodeGenerator.h:
  10231. * interpreter/Interpreter.cpp:
  10232. (JSC::Interpreter::resolveSkip):
  10233. (JSC::Interpreter::resolveGlobalDynamic):
  10234. (JSC::Interpreter::resolveBase):
  10235. (JSC::Interpreter::unwindCallFrame):
  10236. (JSC::Interpreter::throwException):
  10237. (JSC::Interpreter::privateExecute):
  10238. * jit/JIT.cpp:
  10239. (JSC::JIT::privateCompileMainPass):
  10240. * jit/JIT.h:
  10241. * jit/JITCall32_64.cpp:
  10242. (JSC::JIT::emit_op_ret):
  10243. (JSC::JIT::emit_op_ret_object_or_this):
  10244. * jit/JITOpcodes.cpp:
  10245. (JSC::JIT::emit_op_end):
  10246. (JSC::JIT::emit_op_get_scoped_var):
  10247. (JSC::JIT::emit_op_put_scoped_var):
  10248. (JSC::JIT::emit_op_tear_off_activation):
  10249. (JSC::JIT::emit_op_ret):
  10250. (JSC::JIT::emit_op_ret_object_or_this):
  10251. (JSC::JIT::emit_op_create_activation):
  10252. (JSC::JIT::emit_op_resolve_global_dynamic):
  10253. * jit/JITOpcodes32_64.cpp:
  10254. (JSC::JIT::emit_op_get_scoped_var):
  10255. (JSC::JIT::emit_op_put_scoped_var):
  10256. (JSC::JIT::emit_op_tear_off_activation):
  10257. (JSC::JIT::emit_op_create_activation):
  10258. * jit/JITStubs.cpp:
  10259. (JSC::DEFINE_STUB_FUNCTION):
  10260. 2010-10-04 Adam Barth <abarth@webkit.org>
  10261. Reviewed by Sam Weinig.
  10262. Remove ENABLE_SANDBOX
  10263. https://bugs.webkit.org/show_bug.cgi?id=47032
  10264. * Configurations/FeatureDefines.xcconfig:
  10265. 2010-10-01 Pratik Solanki <psolanki@apple.com>
  10266. Reviewed by Geoffrey Garen.
  10267. Specify ALWAYS_INLINE at function declaration not function definition
  10268. https://bugs.webkit.org/show_bug.cgi?id=46960
  10269. For functions defined with ALWAYS_INLINE, add the attribute to the declaration as well.
  10270. * bytecompiler/BytecodeGenerator.h:
  10271. * wtf/FastMalloc.cpp:
  10272. 2010-10-01 Kwang Yul Seo <skyul@company100.net>
  10273. Unreviewed.
  10274. [BREWMP] Change Collector BLOCK_SIZE to 64KB
  10275. https://bugs.webkit.org/show_bug.cgi?id=46436
  10276. Lower BLOCK_SIZE to 64KB because Brew MP runs on low end devices.
  10277. * runtime/Collector.h:
  10278. 2010-10-01 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
  10279. Reviewed by Andreas Kling.
  10280. [Qt] Stack overflow on symbian platform.
  10281. https://bugs.webkit.org/show_bug.cgi?id=40598
  10282. Move big allocation in arrayProtoFuncToString from stack to heap.
  10283. JSC::arrayProtoFuncToString function can be called recursivly and
  10284. 1K allocation on stack cahse stack overflow.
  10285. Can be useful for other platforms with limited stack size.
  10286. * runtime/ArrayPrototype.cpp:
  10287. (JSC::arrayProtoFuncToString):
  10288. 2010-09-30 Kwang Yul Seo <skyul@company100.net>
  10289. Reviewed by Kent Tamura.
  10290. [BREWMP] Add a factory function which returns an instance wrapped in PlatformRefPtr.
  10291. https://bugs.webkit.org/show_bug.cgi?id=46373
  10292. A Brew MP instance has reference count 1 when it is created, so call adoptPlatformRef
  10293. to wrap the instance in PlatformRefPtr.
  10294. * wtf/brew/ShellBrew.h:
  10295. (WTF::createRefPtrInstance):
  10296. 2010-09-30 Kwang Yul Seo <skyul@company100.net>
  10297. Reviewed by Kent Tamura.
  10298. [BREWMP] Port PlatformRefPtr
  10299. https://bugs.webkit.org/show_bug.cgi?id=46370
  10300. Implement refPlatformPtr and derefPlatformPtr to use PlatformRefPtr in Brew MP.
  10301. * wtf/brew/RefPtrBrew.h: Added.
  10302. (WTF::refPlatformPtr):
  10303. (WTF::derefPlatformPtr):
  10304. 2010-09-29 Sam Weinig <sam@webkit.org>
  10305. Reviewed by Darin Adler.
  10306. Add additional checks to StringBuffer.
  10307. <rdar://problem/7756381>
  10308. * wtf/text/StringBuffer.h:
  10309. (WTF::StringBuffer::StringBuffer):
  10310. (WTF::StringBuffer::resize):
  10311. 2010-09-30 Chris Marrin <cmarrin@apple.com>
  10312. Reviewed by Simon Fraser.
  10313. Make 2D accelerated canvas rendering build on Mac
  10314. https://bugs.webkit.org/show_bug.cgi?id=46007
  10315. Added ACCELERATED_2D_CANVAS to FeatureDefines
  10316. * Configurations/FeatureDefines.xcconfig:
  10317. 2010-09-30 Kevin Ollivier <kevino@theolliviers.com>
  10318. [wx] wxMSW build fix. Make sure we copy the compiler flags and remove exception handling from
  10319. the copy so as not to alter global settings.
  10320. * wscript:
  10321. 2010-09-30 Peter Varga <pvarga@inf.u-szeged.hu>
  10322. Reviewed by Gavin Barraclough.
  10323. The case-insensitivity backreference checking isn't working with YARR
  10324. Interpreter
  10325. https://bugs.webkit.org/show_bug.cgi?id=46882
  10326. Add ignorecase checking to the Interpreter::tryConsumeBackReference() function.
  10327. * yarr/RegexInterpreter.cpp:
  10328. (JSC::Yarr::Interpreter::tryConsumeBackReference):
  10329. 2010-09-30 Kwang Yul Seo <skyul@company100.net>
  10330. Reviewed by Andreas Kling.
  10331. [BREWMP] Leave initializeRandomNumberGenerator empty.
  10332. https://bugs.webkit.org/show_bug.cgi?id=46851
  10333. On Brew MP, AEECLSID_RANDOM initializes itself.
  10334. * wtf/RandomNumberSeed.h:
  10335. (WTF::initializeRandomNumberGenerator):
  10336. 2010-09-30 Gabor Loki <loki@webkit.org>
  10337. Reviewed by Csaba Osztrogonác.
  10338. Remove unnecessary cacheFlush calls from Thumb-2
  10339. https://bugs.webkit.org/show_bug.cgi?id=46702
  10340. * assembler/ARMv7Assembler.h:
  10341. (JSC::ARMv7Assembler::relinkCall):
  10342. (JSC::ARMv7Assembler::repatchInt32):
  10343. (JSC::ARMv7Assembler::repatchPointer):
  10344. 2010-09-29 Patrick Gansterer <paroga@webkit.org>
  10345. Unreviewed.
  10346. Next try to fix cygwin build.
  10347. * wtf/Assertions.cpp:
  10348. 2010-09-29 Patrick Gansterer <paroga@webkit.org>
  10349. Unreviewed.
  10350. Build fix for cygwin #2. It's OS(WINDOWS), not OS(WIN).
  10351. * wtf/Assertions.cpp:
  10352. 2010-09-29 Patrick Gansterer <paroga@webkit.org>
  10353. Unreviewed.
  10354. Build fix for cygwin.
  10355. * wtf/Assertions.cpp:
  10356. 2010-09-29 Patrick Gansterer <paroga@webkit.org>
  10357. Reviewed by Andreas Kling.
  10358. [WINCE] Buildfix for Assertions.cpp after r68511.
  10359. https://bugs.webkit.org/show_bug.cgi?id=46807
  10360. Some, but not all WinCE environments have support for IsDebuggerPresent().
  10361. Add HAVE(ISDEBUGGERPRESENT) to make this a build option.
  10362. HAVE(ISDEBUGGERPRESENT) will be 1 for all OS(WIN) by default.
  10363. * wtf/Assertions.cpp:
  10364. * wtf/Platform.h:
  10365. 2010-09-29 Peter Varga <pvarga@inf.u-szeged.hu>
  10366. Reviewed by Csaba Osztrogonác.
  10367. JSC compile fails on 32bit platform when Regexp Tracing is enabled
  10368. https://bugs.webkit.org/show_bug.cgi?id=46713
  10369. Fix the cast of pointer in regexp tracing to avoid the warning.
  10370. * runtime/RegExp.cpp:
  10371. (JSC::RegExp::match):
  10372. 2010-09-28 Anders Carlsson <andersca@apple.com>
  10373. Reviewed by Sam Weinig.
  10374. Begin hooking up painting in the plug-in process
  10375. https://bugs.webkit.org/show_bug.cgi?id=46766
  10376. * JavaScriptCore.exp:
  10377. Add tryFastRealloc, used by WebKit2.
  10378. 2010-09-28 Philippe Normand <pnormand@igalia.com>
  10379. Reviewed by Martin Robinson.
  10380. Guard GRefPtr/GOwnPtr files with ENABLE(GLIB_SUPPORT)
  10381. https://bugs.webkit.org/show_bug.cgi?id=46721
  10382. Enable GOwnPtr/GRefPtr build only if glib support has been
  10383. explicitly enabled using the WTF_ENABLE_GLIB_SUPPORT macro.
  10384. * wtf/gobject/GOwnPtr.cpp:
  10385. * wtf/gobject/GOwnPtr.h:
  10386. * wtf/gobject/GRefPtr.cpp:
  10387. * wtf/gobject/GRefPtr.h:
  10388. 2010-09-28 İsmail Dönmez <ismail@namtrac.org>
  10389. Reviewed by Andreas Kling.
  10390. Test for WINCE instead of WINCEBASIC, compiler always defines WINCE.
  10391. Remove reference to unexisting path JavaScriptCore/os-wince.
  10392. * JavaScriptCore.pri:
  10393. * wtf/Assertions.cpp:
  10394. 2010-09-27 Michael Saboff <msaboff@apple.com>
  10395. Reviewed by Geoffrey Garen.
  10396. Changed the initialization of JSArray objects to have space for
  10397. 3 elements for the constructor that takes a ArgList argument.
  10398. This improves v8-deltablue performance by about 2.8% by reducing
  10399. the number of realloc() calls.
  10400. https://bugs.webkit.org/show_bug.cgi?id=46664
  10401. * runtime/JSArray.cpp:
  10402. (JSC::JSArray::JSArray):
  10403. 2010-09-27 Gavin Barraclough <barraclough@apple.com>
  10404. Reviewed by Darin Adler.
  10405. Bug 46680 - Inlining string concatenation can regress interpreter performance
  10406. <rdar://problem/8362752> REGRESSION: ~6.4% sunspider regression in interpreter
  10407. Do not inline calls to string concatenation in the interpret loop.
  10408. * interpreter/Interpreter.cpp:
  10409. (JSC::concatenateStrings):
  10410. (JSC::Interpreter::privateExecute):
  10411. 2010-09-27 Anders Carlsson <andersca@apple.com>
  10412. Fix thinko.
  10413. * runtime/JSCell.h:
  10414. 2010-09-27 Anders Carlsson <andersca@apple.com>
  10415. Reviewed by Adam Roben.
  10416. Try to fix Windows build.
  10417. * runtime/JSCell.h:
  10418. (JSC::MSVCBugWorkaround::MSVCBugWorkaround):
  10419. (JSC::MSVCBugWorkaround::~MSVCBugWorkaround):
  10420. 2010-09-27 Erik Arvidsson <arv@chromium.org>
  10421. Reviewed by Darin Adler.
  10422. Add operator == for AtomicString and Vector<Uchar>
  10423. https://bugs.webkit.org/show_bug.cgi?id=46509
  10424. * JavaScriptCore.exp:
  10425. * wtf/text/AtomicString.cpp:
  10426. (WTF::operator==):
  10427. * wtf/text/AtomicString.h:
  10428. (WTF::operator==):
  10429. (WTF::operator!=):
  10430. 2010-09-27 Anders Carlsson <andersca@apple.com>
  10431. Try to fix the Windows build.
  10432. * wtf/Noncopyable.h:
  10433. 2010-09-26 Anders Carlsson <andersca@apple.com>
  10434. Reviewed by Alexey Proskuryakov and Adam Barth.
  10435. Add WTF_MAKE_NONCOPYABLE macro
  10436. https://bugs.webkit.org/show_bug.cgi?id=46589
  10437. Going forward, we'd like to get rid of the Noncopyable and FastAllocBase classes. The
  10438. reason for this is that the Itanium C++ ABI states that no empty classes of the same type
  10439. can be laid out at the same offset in the class. This can result in objects getting larger
  10440. which leads to memory regressions. (One example of this is the String class which grew by
  10441. sizeof(void*) when both its base class and its first member variable inherited indirectly
  10442. from FastAllocBase).
  10443. * wtf/Noncopyable.h:
  10444. Add a WTF_MAKE_NONCOPYABLE macro and get rid of NoncopyableCustomAllocated.
  10445. * runtime/JSCell.h:
  10446. * wtf/RefCounted.h:
  10447. Don't inherit from NoncopyableCustomAllocated. Instead, use WTF_MAKE_NONCOPYABLE.
  10448. 2010-09-27 Philippe Normand <pnormand@igalia.com>
  10449. Reviewed by Martin Robinson.
  10450. [GTK] use ENABLE(GLIB_SUPPORT)
  10451. https://bugs.webkit.org/show_bug.cgi?id=46630
  10452. * wtf/Platform.h: Include GTypedefs.h only if glib support
  10453. is explicitly enabled.
  10454. 2010-09-25 Holger Hans Peter Freyther <holger@moiji-mobile.com>
  10455. Reviewed by Adam Barth.
  10456. jsc: Document the strcat opcode.
  10457. https://bugs.webkit.org/show_bug.cgi?id=46571
  10458. * interpreter/Interpreter.cpp:
  10459. (JSC::Interpreter::privateExecute):
  10460. 2010-09-21 Holger Hans Peter Freyther <holger@moiji-mobile.com>
  10461. Reviewed by Adam Barth.
  10462. make-bytecode-docs.pl: Add a comment to the generated HTML
  10463. https://bugs.webkit.org/show_bug.cgi?id=46570
  10464. Generate an HTML Comment that this file was generated from
  10465. Interpreter.cpp with the make-bytecode-docs.pl script.
  10466. * docs/make-bytecode-docs.pl:
  10467. 2010-09-27 Patrick Gansterer <paroga@webkit.org>
  10468. Reviewed by Adam Barth.
  10469. Remove WTF::stringHash functions
  10470. https://bugs.webkit.org/show_bug.cgi?id=46520
  10471. Since r68289 the stringHash functions are only wrappers around StringHasher::createHash.
  10472. So use StringHasher::createHash directly and remove stringHash.
  10473. * wtf/StringHashFunctions.h:
  10474. * wtf/text/StringImpl.h:
  10475. (WTF::StringImpl::computeHash): Use WTF::StringHasher::createHash directly.
  10476. 2010-09-26 Patrick Gansterer <paroga@webkit.org>
  10477. Reviewed by Adam Barth.
  10478. Add WTF::StringHasher::createBlobHash
  10479. https://bugs.webkit.org/show_bug.cgi?id=46514
  10480. Add this function for hashing FormElementKey and QualifiedNameComponents.
  10481. * wtf/StringHashFunctions.h:
  10482. (WTF::StringHasher::createBlobHash):
  10483. 2010-09-26 Patrick Gansterer <paroga@webkit.org>
  10484. Reviewed by Adam Barth.
  10485. REGRESSION (r68289): Assertion failure in StringHasher::addCharacter() (ch != invalidCharacterValue)
  10486. running websocket/tests/bad-sub-protocol-non-ascii.html
  10487. https://bugs.webkit.org/show_bug.cgi?id=46553
  10488. Because we use StringHasher for binary data too, so the check for invalid unicode input is wrong.
  10489. Add an additional member variable to indicate if we have an pending character
  10490. instead of only using an invalid character for this purpose.
  10491. * wtf/StringHashFunctions.h:
  10492. (WTF::StringHasher::StringHasher):
  10493. (WTF::StringHasher::addCharacters):
  10494. (WTF::StringHasher::addCharacter):
  10495. (WTF::StringHasher::hash):
  10496. 2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com>
  10497. Reviewed by Oliver Hunt.
  10498. valueOf called in wrong order in atan2 and date constructors.
  10499. https://bugs.webkit.org/show_bug.cgi?id=26978
  10500. Fixed the bug where the arguments to atan2 were being evaluated
  10501. out of order.
  10502. * runtime/MathObject.cpp:
  10503. (JSC::mathProtoFuncATan2):
  10504. 2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com>
  10505. Reviewed by Oliver Hunt.
  10506. valueOf called in wrong order in atan2 and date constructors.
  10507. https://bugs.webkit.org/show_bug.cgi?id=26978
  10508. Fixed the issue where the parameters to the Date constructor
  10509. were being evaluated to numbers more than once.
  10510. * runtime/DateConstructor.cpp:
  10511. (JSC::constructDate):
  10512. (JSC::dateUTC):
  10513. 2010-09-25 Oliver Hunt <oliver@apple.com>
  10514. Fix various builds
  10515. Relearning the lesson that last minute changes are bad.
  10516. * bytecode/CodeBlock.cpp:
  10517. (JSC::CodeBlock::dump):
  10518. * bytecompiler/BytecodeGenerator.cpp:
  10519. (JSC::BytecodeGenerator::emitGetArgumentsLength):
  10520. * jit/JITOpcodes.cpp:
  10521. (JSC::JIT::emitSlow_op_get_argument_by_val):
  10522. 2010-09-25 Oliver Hunt <oliver@apple.com>
  10523. Reviewed by Cameron Zwarich.
  10524. Avoid constructing arguments object when accessing length and index properties
  10525. https://bugs.webkit.org/show_bug.cgi?id=46572
  10526. Add opcodes to read argument length and properties, and then implement them.
  10527. Much like other lazy opcodes these opcodes take a fast path when the arguments
  10528. object has not been instantiated, and fall back on generic access mechanisms
  10529. if they are acting on an instantiated object.
  10530. 3% win on v8-earleyboyer, no change elsewhere.
  10531. * bytecode/CodeBlock.cpp:
  10532. (JSC::CodeBlock::dump):
  10533. * bytecode/Opcode.h:
  10534. * bytecompiler/BytecodeGenerator.cpp:
  10535. (JSC::BytecodeGenerator::emitGetArgumentsLength):
  10536. (JSC::BytecodeGenerator::emitGetArgumentByVal):
  10537. * bytecompiler/BytecodeGenerator.h:
  10538. * bytecompiler/NodesCodegen.cpp:
  10539. (JSC::BracketAccessorNode::emitBytecode):
  10540. (JSC::DotAccessorNode::emitBytecode):
  10541. * interpreter/Interpreter.cpp:
  10542. (JSC::Interpreter::privateExecute):
  10543. * jit/JIT.cpp:
  10544. (JSC::JIT::privateCompileMainPass):
  10545. (JSC::JIT::privateCompileSlowCases):
  10546. * jit/JIT.h:
  10547. * jit/JITOpcodes.cpp:
  10548. (JSC::JIT::emit_op_get_arguments_length):
  10549. (JSC::JIT::emitSlow_op_get_arguments_length):
  10550. (JSC::JIT::emit_op_get_argument_by_val):
  10551. (JSC::JIT::emitSlow_op_get_argument_by_val):
  10552. * jit/JITOpcodes32_64.cpp:
  10553. (JSC::JIT::emit_op_get_arguments_length):
  10554. (JSC::JIT::emitSlow_op_get_arguments_length):
  10555. (JSC::JIT::emit_op_get_argument_by_val):
  10556. (JSC::JIT::emitSlow_op_get_argument_by_val):
  10557. 2010-09-25 Patrick Gansterer <paroga@webkit.org>
  10558. Unreviewed.
  10559. Fix typo in StringHasher class
  10560. https://bugs.webkit.org/show_bug.cgi?id=45970
  10561. * wtf/StringHashFunctions.h:
  10562. (WTF::StringHasher::createHash):
  10563. 2010-09-24 Patrick Gansterer <paroga@paroga.com>
  10564. Reviewed by Gavin Barraclough.
  10565. Add WTF::StringHasher
  10566. https://bugs.webkit.org/show_bug.cgi?id=45970
  10567. StringHasher is a class for calculation stringHash out of character string.
  10568. This class will unify the different usages of the same algorithm.
  10569. * wtf/StringHashFunctions.h:
  10570. (WTF::StringHasher::StringHasher):
  10571. (WTF::StringHasher::addCharacters):
  10572. (WTF::StringHasher::addCharacter):
  10573. (WTF::StringHasher::hash):
  10574. (WTF::StringHasher::createHash):
  10575. (WTF::StringHasher::defaultCoverter):
  10576. (WTF::StringHasher::addCharactersToHash):
  10577. (WTF::stringHash):
  10578. 2010-09-24 Oliver Hunt <oliver@apple.com>
  10579. Reviewed by Geoffrey Garen.
  10580. Variable declarations inside a catch scope don't get propogated to the parent scope
  10581. https://bugs.webkit.org/show_bug.cgi?id=46501
  10582. Add logic to make variable declaration look for a scope for the
  10583. new variable. This allows us to create a scope (eg. for catch)
  10584. and then seal it, so that additional variable declarations
  10585. contained are propogated to the correct target. Strangely this
  10586. comes out as a performance win, but I think it's mostly cache
  10587. effects.
  10588. * parser/JSParser.cpp:
  10589. (JSC::JSParser::Scope::Scope):
  10590. (JSC::JSParser::Scope::preventNewDecls):
  10591. (JSC::JSParser::Scope::allowsNewDecls):
  10592. (JSC::JSParser::declareVariable):
  10593. (JSC::JSParser::parseVarDeclarationList):
  10594. (JSC::JSParser::parseConstDeclarationList):
  10595. (JSC::JSParser::parseTryStatement):
  10596. (JSC::JSParser::parseFormalParameters):
  10597. (JSC::JSParser::parseFunctionDeclaration):
  10598. 2010-09-24 İsmail Dönmez <ismail@namtrac.org>
  10599. Reviewed by Csaba Osztrogonác.
  10600. Add a Windows compatible inttypes.h header to fix WinCE build.
  10601. https://bugs.webkit.org/show_bug.cgi?id=46463
  10602. * os-win32/inttypes.h: Added.
  10603. 2010-09-24 Oliver Hunt <oliver@apple.com>
  10604. Reviewed by Gavin Barraclough.
  10605. REGRESSION(r68223): It broke 2-3 tests on bots (Requested by Ossy on #webkit).
  10606. https://bugs.webkit.org/show_bug.cgi?id=46448
  10607. Roll this back in, with additional logic to prevent us from delaying construction
  10608. of functions named "arguments"
  10609. * bytecode/CodeBlock.cpp:
  10610. (JSC::CodeBlock::dump):
  10611. * bytecode/Opcode.h:
  10612. * bytecompiler/BytecodeGenerator.cpp:
  10613. (JSC::BytecodeGenerator::BytecodeGenerator):
  10614. (JSC::BytecodeGenerator::emitInitLazyRegister):
  10615. (JSC::BytecodeGenerator::registerFor):
  10616. (JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
  10617. (JSC::BytecodeGenerator::constRegisterFor):
  10618. (JSC::BytecodeGenerator::emitNewFunction):
  10619. (JSC::BytecodeGenerator::emitLazyNewFunction):
  10620. (JSC::BytecodeGenerator::emitNewFunctionInternal):
  10621. * bytecompiler/BytecodeGenerator.h:
  10622. * interpreter/Interpreter.cpp:
  10623. (JSC::Interpreter::privateExecute):
  10624. * jit/JIT.cpp:
  10625. (JSC::JIT::privateCompileMainPass):
  10626. * jit/JIT.h:
  10627. * jit/JITOpcodes.cpp:
  10628. (JSC::JIT::emit_op_init_lazy_reg):
  10629. (JSC::JIT::emit_op_new_func):
  10630. * jit/JITOpcodes32_64.cpp:
  10631. (JSC::JIT::emit_op_init_lazy_reg):
  10632. * parser/Nodes.h:
  10633. (JSC::ScopeNode::needsActivationForMoreThanVariables):
  10634. 2010-09-23 Sheriff Bot <webkit.review.bot@gmail.com>
  10635. Unreviewed, rolling out r68223.
  10636. http://trac.webkit.org/changeset/68223
  10637. https://bugs.webkit.org/show_bug.cgi?id=46448
  10638. It broke 2-3 tests on bots (Requested by Ossy on #webkit).
  10639. * bytecode/CodeBlock.cpp:
  10640. (JSC::CodeBlock::dump):
  10641. * bytecode/Opcode.h:
  10642. * bytecompiler/BytecodeGenerator.cpp:
  10643. (JSC::BytecodeGenerator::BytecodeGenerator):
  10644. (JSC::BytecodeGenerator::registerFor):
  10645. (JSC::BytecodeGenerator::constRegisterFor):
  10646. (JSC::BytecodeGenerator::emitNewFunction):
  10647. * bytecompiler/BytecodeGenerator.h:
  10648. * interpreter/Interpreter.cpp:
  10649. (JSC::Interpreter::privateExecute):
  10650. * jit/JIT.cpp:
  10651. (JSC::JIT::privateCompileMainPass):
  10652. * jit/JIT.h:
  10653. * jit/JITOpcodes.cpp:
  10654. (JSC::JIT::emit_op_new_func):
  10655. (JSC::JIT::emit_op_init_arguments):
  10656. * jit/JITOpcodes32_64.cpp:
  10657. (JSC::JIT::emit_op_new_func):
  10658. (JSC::JIT::emit_op_init_arguments):
  10659. * parser/Nodes.h:
  10660. 2010-09-23 Oliver Hunt <oliver@apple.com>
  10661. Reviewed by Geoffrey Garen.
  10662. Delay construction of functions that aren't captured
  10663. https://bugs.webkit.org/show_bug.cgi?id=46433
  10664. If a function isn't captured by an activation there's no
  10665. way it can be accessed indirectly, so we can delay the
  10666. construction until it's used (similar to what we do with
  10667. arguments). We rename the existing op_init_arguments to
  10668. op_init_lazy_reg and removed its implicit handling of
  10669. the anonymous argument register, and make op_new_function
  10670. take a parameter to indicate whether it should null check
  10671. the target slot before creating the function object.
  10672. * bytecode/CodeBlock.cpp:
  10673. (JSC::CodeBlock::dump):
  10674. * bytecode/Opcode.h:
  10675. * bytecompiler/BytecodeGenerator.cpp:
  10676. (JSC::BytecodeGenerator::BytecodeGenerator):
  10677. (JSC::BytecodeGenerator::emitInitLazyRegister):
  10678. (JSC::BytecodeGenerator::registerFor):
  10679. (JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
  10680. (JSC::BytecodeGenerator::constRegisterFor):
  10681. (JSC::BytecodeGenerator::emitNewFunction):
  10682. (JSC::BytecodeGenerator::emitLazyNewFunction):
  10683. (JSC::BytecodeGenerator::emitNewFunctionInternal):
  10684. * bytecompiler/BytecodeGenerator.h:
  10685. * interpreter/Interpreter.cpp:
  10686. (JSC::Interpreter::privateExecute):
  10687. * jit/JIT.cpp:
  10688. (JSC::JIT::privateCompileMainPass):
  10689. * jit/JIT.h:
  10690. * jit/JITOpcodes.cpp:
  10691. (JSC::JIT::emit_op_init_lazy_reg):
  10692. (JSC::JIT::emit_op_new_func):
  10693. * jit/JITOpcodes32_64.cpp:
  10694. (JSC::JIT::emit_op_init_lazy_reg):
  10695. * parser/Nodes.h:
  10696. (JSC::ScopeNode::needsActivationForMoreThanVariables):
  10697. 2010-09-23 David Kilzer <ddkilzer@apple.com>
  10698. <rdar://problem/8460731> ~9.9% speedup when compiling interpreter with llvm-gcc-4.2
  10699. https://bugs.webkit.org/show_bug.cgi?id=46423
  10700. Reviewed by Oliver Hunt.
  10701. * interpreter/Interpreter.cpp:
  10702. (JSC::Interpreter::privateExecute): Disable the gcc computed
  10703. goto hacks added in r55564 when compiling with llvm-gcc-4.2.
  10704. 2010-09-23 Lucas De Marchi <lucas.demarchi@profusion.mobi>
  10705. Reviewed by Darin Adler.
  10706. Fix usage of enum as if it was a define
  10707. https://bugs.webkit.org/show_bug.cgi?id=46355
  10708. pthread.h defines PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_NORMAL as an
  10709. enum. Hence, it cannot be used by the preprocessor which always
  10710. evaluates that condition as true. This was giving a warning when
  10711. compiling with gcc and "-Wundef" flag.
  10712. The second path, when PTHREAD_MUTEX_DEFAULT is not the same of
  10713. PTHREAD_MUTEX_NORMAL, is not slow. So, let's eliminate the first path
  10714. and get rid of that #if.
  10715. * wtf/ThreadingPthreads.cpp: Always call pthread_mutexattr_init() to
  10716. set mutex type to PTHREAD_MUTEX_NORMAL.
  10717. (WTF::Mutex::Mutex):
  10718. 2010-09-23 Michael Saboff <msaboff@apple.com>
  10719. Reviewed by Geoffrey Garen.
  10720. Removed extraneous truncation of ovector on entry and error exit.
  10721. Changed the initialization to -1 of vector to only initialize
  10722. the start indecies, which is sufficient for the pattern/subpatterns.
  10723. Changed the JIT code to not clear the end index for subpatterns
  10724. as it isn't needed. These changes are worth ~2.7% on v8-regexp.
  10725. https://bugs.webkit.org/show_bug.cgi?id=46404
  10726. * runtime/RegExp.cpp:
  10727. (JSC::RegExp::match):
  10728. * yarr/RegexJIT.cpp:
  10729. (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
  10730. 2010-09-22 Oliver Hunt <oliver@apple.com>
  10731. Reviewed by Geoff Garen.
  10732. Only copy captured variables into activation
  10733. https://bugs.webkit.org/show_bug.cgi?id=46330
  10734. We now track free variable information which means that
  10735. we no longer need to copy every variable defined in a
  10736. function. With this patch activations only retain those
  10737. variables needed for correctness. In order to interact
  10738. safely with the inspector this means that JSActivation
  10739. now provides its own lookup functions so it can avoid
  10740. trying to read or write to variables that have been
  10741. optimised out.
  10742. * bytecode/CodeBlock.h:
  10743. * bytecompiler/BytecodeGenerator.cpp:
  10744. (JSC::BytecodeGenerator::BytecodeGenerator):
  10745. * parser/Nodes.h:
  10746. (JSC::ScopeNode::capturedVariableCount):
  10747. (JSC::ScopeNode::captures):
  10748. * runtime/Arguments.h:
  10749. (JSC::JSActivation::copyRegisters):
  10750. * runtime/Executable.cpp:
  10751. (JSC::FunctionExecutable::FunctionExecutable):
  10752. (JSC::FunctionExecutable::compileForCallInternal):
  10753. (JSC::FunctionExecutable::compileForConstructInternal):
  10754. * runtime/Executable.h:
  10755. (JSC::FunctionExecutable::capturedVariableCount):
  10756. * runtime/JSActivation.cpp:
  10757. (JSC::JSActivation::markChildren):
  10758. (JSC::JSActivation::symbolTableGet):
  10759. (JSC::JSActivation::symbolTablePut):
  10760. (JSC::JSActivation::getOwnPropertyNames):
  10761. (JSC::JSActivation::symbolTablePutWithAttributes):
  10762. * runtime/JSActivation.h:
  10763. 2010-09-23 Ismail Donmez <ismail@namtrac.org>
  10764. Reviewed by Andreas Kling.
  10765. Fix jsc.exe build for Windows CE
  10766. * jsc.pro: Add mmtimer.lib for Windows CE.
  10767. 2010-09-23 Ismail Donmez <ismail@namtrac.org>
  10768. Unreviewed.
  10769. JIT should be disabled on Windows CE. Broken in r64176.
  10770. * wtf/Platform.h:
  10771. 2010-09-23 Peter Varga <pvarga@inf.u-szeged.hu>
  10772. Reviewed by Gavin Barraclough.
  10773. Reduce the number of BOL checks in YARR Interpreter
  10774. https://bugs.webkit.org/show_bug.cgi?id=46260
  10775. Extend the YARR Interpreter with an optimization which reduces the number of
  10776. BOL assertion checks. If a "TypeBodyAlternative" byteTerm is followed by a
  10777. "TypeAssertionBOL" byteTerm it will be checked just one time.
  10778. * yarr/RegexInterpreter.cpp:
  10779. (JSC::Yarr::Interpreter::matchDisjunction):
  10780. (JSC::Yarr::ByteCompiler::compile):
  10781. (JSC::Yarr::ByteCompiler::regexBegin):
  10782. (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
  10783. (JSC::Yarr::ByteCompiler::emitDisjunction):
  10784. * yarr/RegexInterpreter.h:
  10785. (JSC::Yarr::ByteTerm::BodyAlternativeBegin):
  10786. (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
  10787. (JSC::Yarr::ByteTerm::BodyAlternativeEnd):
  10788. (JSC::Yarr::ByteTerm::AlternativeBegin):
  10789. (JSC::Yarr::ByteTerm::AlternativeDisjunction):
  10790. (JSC::Yarr::ByteTerm::AlternativeEnd):
  10791. 2010-09-22 Michael Saboff <msaboff@apple.com>
  10792. Reviewed by Gavin Barraclough.
  10793. Fixed the cross over from alternatives executed once and
  10794. those that loop. This fixed the problem where the index
  10795. was getting messed up for looping alternatives causing an
  10796. infinite loop.
  10797. https://bugs.webkit.org/show_bug.cgi?id=46189
  10798. * yarr/RegexJIT.cpp:
  10799. (JSC::Yarr::RegexGenerator::generateDisjunction):
  10800. 2010-09-22 Steve Falkenburg <sfalken@apple.com>
  10801. Rubber stamped by Jon Honeycutt.
  10802. Allow jsc.exe to be run against unversioned ICU.
  10803. * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
  10804. 2010-09-22 Kwang Yul Seo <skyul@company100.net>
  10805. Reviewed by Laszlo Gombos.
  10806. Use "typedef wchar_t JSChar" when compiled with RVCT
  10807. https://bugs.webkit.org/show_bug.cgi?id=40651
  10808. Use wchar_t for JSChar and UChar when compiled with RVCT.
  10809. Linux is the exception for this rule.
  10810. * API/JSStringRef.h:
  10811. * wtf/unicode/qt4/UnicodeQt4.h:
  10812. 2010-09-22 Oliver Hunt <oliver@apple.com>
  10813. Reviewed by Gavin Barraclough.
  10814. [INTERPRETER] Two tests fail with SputnikError: #1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown
  10815. https://bugs.webkit.org/show_bug.cgi?id=44245
  10816. Remove incorrect code from op_load_varargs in the interpreter.
  10817. * interpreter/Interpreter.cpp:
  10818. (JSC::Interpreter::privateExecute):
  10819. 2010-09-22 Oliver Hunt <oliver@apple.com>
  10820. Reviewed by Gavin Barraclough.
  10821. [JIT] fast/js/sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.5/S15.3.5.3_A2_T6.html fails
  10822. https://bugs.webkit.org/show_bug.cgi?id=44246
  10823. JIT code generated for instanceof was not checking to ensure that the prototype property was
  10824. an object, this patch ensures that it does.
  10825. * jit/JITOpcodes.cpp:
  10826. (JSC::JIT::emit_op_instanceof):
  10827. (JSC::JIT::emitSlow_op_instanceof):
  10828. * jit/JITOpcodes32_64.cpp:
  10829. (JSC::JIT::emit_op_instanceof):
  10830. (JSC::JIT::emitSlow_op_instanceof):
  10831. 2010-09-22 Patrick Gansterer <paroga@webkit.org>
  10832. Reviewed by Darin Adler.
  10833. Inline UTF8SequenceLength
  10834. https://bugs.webkit.org/show_bug.cgi?id=45589
  10835. * wtf/unicode/UTF8.cpp:
  10836. (WTF::Unicode::convertUTF8ToUTF16): Use inline version of UTF8SequenceLength to improve performance.
  10837. 2010-09-21 Oliver Hunt <oliver@apple.com>
  10838. RS=Gavin Barraclough.
  10839. Fix codeblock dumping
  10840. * bytecode/CodeBlock.cpp:
  10841. (JSC::CodeBlock::dump):
  10842. * runtime/Executable.h:
  10843. (JSC::ScriptExecutable::ScriptExecutable):
  10844. 2010-09-21 Oliver Hunt <oliver@apple.com>
  10845. Reviewed by Geoffrey Garen.
  10846. Speed up function.apply(..., arguments)
  10847. https://bugs.webkit.org/show_bug.cgi?id=46207
  10848. Add code to do argument copying inline in the case
  10849. where we're using Function.apply to forward our arguments
  10850. directly.
  10851. * jit/JIT.cpp:
  10852. (JSC::JIT::privateCompileSlowCases):
  10853. Splitted op_load_varargs into fast and slow paths, so add the call
  10854. to the slow path generator.
  10855. * jit/JIT.h:
  10856. * jit/JITCall32_64.cpp:
  10857. Remove 32bit specific emit_op_load_varargs as the logic is the
  10858. same for all value representations
  10859. * jit/JITOpcodes.cpp:
  10860. (JSC::JIT::emit_op_load_varargs):
  10861. Copy arguments inline
  10862. (JSC::JIT::emitSlow_op_load_varargs):
  10863. 2010-09-21 Geoffrey Garen <ggaren@apple.com>
  10864. Reviewed by Oliver Hunt.
  10865. <rdar://problem/8363003> REGRESSION: ~1.4% sunspider regression in
  10866. interpreter due to 54724 and 54596
  10867. Fixed a typo (using "UNLIKELY" instead of "LIKELY").
  10868. * wtf/PassRefPtr.h:
  10869. (WTF::refIfNotNull):
  10870. (WTF::derefIfNotNull): It is likely that m_ptr != 0 because most RefPtrs
  10871. hold real data. Also, in cases where they do not hold real data, the
  10872. compiler usually sees a call to release() right before the call to the
  10873. destructor, so it can probably optimize out the test completely.
  10874. 2010-09-21 Fridrich Strba <fridrich.strba@bluewin.ch>
  10875. Reviewed by Martin Robinson.
  10876. Build issues with Windows versions of the GTK+ port
  10877. https://bugs.webkit.org/show_bug.cgi?id=45844
  10878. Link with winmm.dll when necessary and specify the executable extension
  10879. explicitely so that the Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@
  10880. rule actually works.
  10881. Don't try to build the ThreadSpecificWin.cpp since GTK+ port uses
  10882. a section in ThreadSpecific.cpp
  10883. * GNUmakefile.am:
  10884. 2010-09-21 Martin Robinson <mrobinson@igalia.com>
  10885. Reviewed by Xan Lopez.
  10886. [GTK] 'make dist' should be fixed in preparation for the next release
  10887. https://bugs.webkit.org/show_bug.cgi?id=46129
  10888. * GNUmakefile.am: Update the sources list to include missing headers.
  10889. 2010-09-21 Dave Tapuska <dtapuska@rim.com>
  10890. Reviewed by Csaba Osztrogonác.
  10891. https://bugs.webkit.org/show_bug.cgi?id=45673
  10892. r65596 caused ENABLE_PROFILER_REFERENCE_OFFSET to not be
  10893. 8 byte aligned. A non 8 byte divisible value for this will
  10894. cause the sp to become non 8 byte aligned.
  10895. Verify and correct offset values that r65596 effected that
  10896. weren't updated.
  10897. * jit/JITStubs.cpp:
  10898. * jit/JITStubs.h:
  10899. 2010-09-21 Xan Lopez <xlopez@igalia.com>
  10900. Reviewed by Martin Robinson.
  10901. Fix Opcode stats compilation
  10902. https://bugs.webkit.org/show_bug.cgi?id=46079
  10903. The FixedArray API had changed, and <stdio.h> was not included for
  10904. printf.
  10905. * bytecode/Opcode.cpp:
  10906. (JSC::OpcodeStats::~OpcodeStats):
  10907. 2010-09-20 Michael Saboff <msaboff@apple.com>
  10908. Reviewed by Gavin Barraclough.
  10909. Fixed detection of alternative smaller than the first alternative
  10910. to only check looping alternatives.
  10911. https://bugs.webkit.org/show_bug.cgi?id=46049
  10912. * yarr/RegexJIT.cpp:
  10913. (JSC::Yarr::RegexGenerator::generateDisjunction):
  10914. 2010-09-20 Peter Varga <pvarga@inf.u-szeged.hu>
  10915. Reviewed by Geoffrey Garen.
  10916. REGRESSION(67790): jsc tests are failed with YARR interpreter
  10917. https://bugs.webkit.org/show_bug.cgi?id=46083
  10918. Fix the initializing of the lastSubpatternId member of
  10919. parentheses.
  10920. * yarr/RegexCompiler.cpp:
  10921. (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
  10922. 2010-09-20 Gavin Barraclough <barraclough@apple.com>
  10923. Reviewed by Oliver Hunt.
  10924. Bug 46077 - ASSERT failure in YARR JIT
  10925. We will currently attempt to loop if there are multiple alternatives, they are all
  10926. BOL predicated, and the last alternative is longer then the first - however if all
  10927. alternatives are BOL predicated the head of loop label will not have been set, and
  10928. we'll try to link a jump to an undefined label. Stop doing so.
  10929. * yarr/RegexJIT.cpp:
  10930. (JSC::Yarr::RegexGenerator::generateDisjunction):
  10931. 2010-09-20 Adam Roben <aroben@apple.com>
  10932. Export RegExpObject::info from JavaScriptCore
  10933. This allows obj->inherits(&RegExpObject::info) to work correctly from
  10934. outside JavaScriptCore.dll on Windows.
  10935. Fixes <http://webkit.org/b/46098>
  10936. fast/loader/stateobjects/pushstate-object-types.html fails on Windows
  10937. Reviewed by John Sullivan.
  10938. * runtime/RegExpObject.h: Added JS_EXPORTDATA to the info member, as
  10939. we already have for some other classes whose info members have to be
  10940. used from outside the DLL.
  10941. 2010-09-19 Gavin Barraclough <barraclough@apple.com>
  10942. Windows build fix pt 2.
  10943. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  10944. 2010-09-19 Gavin Barraclough <barraclough@apple.com>
  10945. Windows build fix pt 1.
  10946. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  10947. 2010-09-19 Gavin Barraclough <barraclough@apple.com>
  10948. Build fix - implicit double-to-int conversion invalid on 32-bit.
  10949. * runtime/DatePrototype.cpp:
  10950. (JSC::fillStructuresUsingDateArgs):
  10951. (JSC::dateProtoFuncSetYear):
  10952. 2010-09-19 Gavin Barraclough <barraclough@apple.com>
  10953. Reviewed by Oliver Hunt.
  10954. Bug 46065 - Unify implementation of ToInt32 and ToUInt32, don't use fmod.
  10955. These methods implement the same conversion (see discussion in the notes
  10956. of sections of 9.5 and 9.6 of the spec), only differing in how the result
  10957. is interpretted.
  10958. Date prototype is incorrectly using toInt32, and this is causing us to
  10959. provide an output value indicating whether the input to ToInt32 was finite
  10960. (the corresponding methods on Date are actually spec'ed to use ToInteger,
  10961. not ToInt32). This patch partially fixes this in order to remove this
  10962. bogus output value, hoewever more work will be require to bring Date
  10963. fully up to spec compliance (the constructor is still performing ToInt32
  10964. conversions).
  10965. * JavaScriptCore.exp:
  10966. * runtime/DatePrototype.cpp:
  10967. (JSC::fillStructuresUsingTimeArgs):
  10968. (JSC::fillStructuresUsingDateArgs):
  10969. (JSC::dateProtoFuncSetYear):
  10970. * runtime/JSValue.cpp:
  10971. (JSC::toInt32):
  10972. * runtime/JSValue.h:
  10973. (JSC::toUInt32):
  10974. (JSC::JSValue::toInt32):
  10975. (JSC::JSValue::toUInt32):
  10976. 2010-09-18 Darin Adler <darin@apple.com>
  10977. First step in fixing Windows build.
  10978. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  10979. Removed incorrect symbol. The build will probably still fail,
  10980. but the failure will tell us what symbol to add.
  10981. 2010-09-18 Michael Saboff <msaboff@apple.com>
  10982. Reviewed by Gavin Barraclough.
  10983. Added code to unroll regular expressions containing ^.
  10984. Alternatives that begin with ^ are tagged during parsing
  10985. and rolled up in containing sub expression structs.
  10986. After parsing, a regular expression flagged as containing
  10987. a ^ (a.k.a. BOL) is processed further in optimizeBOL().
  10988. A copy of the disjunction is made excluding alternatives that
  10989. are rooted with BOL. The original alternatives are flagged
  10990. to only be executed once. The copy of the other alternatives are
  10991. added to the original expression.
  10992. In the case that all original alternatives are flagged, there
  10993. won't be any looping alternatives.
  10994. The JIT generator will emit code accordingly, executing the
  10995. original alternatives once and then looping over the
  10996. alternatives that aren't anchored with a BOL (if any).
  10997. https://bugs.webkit.org/show_bug.cgi?id=45787
  10998. * yarr/RegexCompiler.cpp:
  10999. (JSC::Yarr::RegexPatternConstructor::assertionBOL):
  11000. (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
  11001. (JSC::Yarr::RegexPatternConstructor::copyDisjunction):
  11002. (JSC::Yarr::RegexPatternConstructor::copyTerm):
  11003. (JSC::Yarr::RegexPatternConstructor::optimizeBOL):
  11004. (JSC::Yarr::compileRegex):
  11005. * yarr/RegexJIT.cpp:
  11006. (JSC::Yarr::RegexGenerator::generateDisjunction):
  11007. * yarr/RegexPattern.h:
  11008. (JSC::Yarr::PatternAlternative::PatternAlternative):
  11009. (JSC::Yarr::PatternAlternative::setOnceThrough):
  11010. (JSC::Yarr::PatternAlternative::onceThrough):
  11011. (JSC::Yarr::PatternDisjunction::PatternDisjunction):
  11012. (JSC::Yarr::RegexPattern::RegexPattern):
  11013. (JSC::Yarr::RegexPattern::reset):
  11014. 2010-09-18 Patrick Gansterer <paroga@paroga.com>
  11015. Reviewed by Darin Adler.
  11016. Rename Wince files to WinCE
  11017. https://bugs.webkit.org/show_bug.cgi?id=37287
  11018. * wtf/unicode/Unicode.h:
  11019. * wtf/unicode/wince/UnicodeWinCE.cpp: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.cpp.
  11020. * wtf/unicode/wince/UnicodeWinCE.h: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.h.
  11021. * wtf/unicode/wince/UnicodeWince.cpp: Removed.
  11022. * wtf/unicode/wince/UnicodeWince.h: Removed.
  11023. * wtf/wince/FastMallocWinCE.h: Copied from JavaScriptCore/wtf/wince/FastMallocWince.h.
  11024. * wtf/wince/FastMallocWince.h: Removed.
  11025. 2010-09-18 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
  11026. Reviewed by Kenneth Rohde Christiansen.
  11027. Enable Platform Strategies on Qt
  11028. [Qt] Turn on PLATFORM_STRATEGIES
  11029. https://bugs.webkit.org/show_bug.cgi?id=45831
  11030. * wtf/Platform.h: Enable Platform Strategies when building QtWebkit
  11031. 2010-09-17 Oliver Hunt <oliver@apple.com>
  11032. Reviewed by Gavin Barraclough.
  11033. Imprecise tracking of variable capture leads to overly pessimistic creation of activations
  11034. https://bugs.webkit.org/show_bug.cgi?id=46020
  11035. The old logic for track free and captured variables would cause us
  11036. to decide we needed an activation in every function along the scope
  11037. chain between a variable capture and its declaration. We now track
  11038. captured variables precisely which requires a bit of additional work
  11039. The most substantial change is that the parsing routine needs to
  11040. be passed the list of function parameters when reparsing a function
  11041. as when reparsing we don't parse the function declaration itself only
  11042. its body.
  11043. * JavaScriptCore.exp:
  11044. * parser/JSParser.cpp:
  11045. (JSC::JSParser::Scope::Scope):
  11046. (JSC::JSParser::Scope::needsFullActivation):
  11047. We need to distinguish between use of a feature that requires
  11048. an activation and eval so we now get this additional flag.
  11049. (JSC::JSParser::Scope::collectFreeVariables):
  11050. (JSC::JSParser::Scope::getCapturedVariables):
  11051. We can't simply return the list of "capturedVariables" now as
  11052. is insufficiently precise, so we compute them instead.
  11053. (JSC::JSParser::popScope):
  11054. (JSC::jsParse):
  11055. (JSC::JSParser::JSParser):
  11056. (JSC::JSParser::parseProgram):
  11057. (JSC::JSParser::parseWithStatement):
  11058. (JSC::JSParser::parseTryStatement):
  11059. (JSC::JSParser::parseFunctionInfo):
  11060. (JSC::JSParser::parseFunctionDeclaration):
  11061. (JSC::JSParser::parseProperty):
  11062. (JSC::JSParser::parseMemberExpression):
  11063. * parser/JSParser.h:
  11064. * parser/Parser.cpp:
  11065. (JSC::Parser::parse):
  11066. * parser/Parser.h:
  11067. (JSC::Parser::parse):
  11068. * runtime/Executable.cpp:
  11069. (JSC::EvalExecutable::compileInternal):
  11070. (JSC::ProgramExecutable::checkSyntax):
  11071. (JSC::ProgramExecutable::compileInternal):
  11072. (JSC::FunctionExecutable::compileForCallInternal):
  11073. (JSC::FunctionExecutable::compileForConstructInternal):
  11074. (JSC::FunctionExecutable::reparseExceptionInfo):
  11075. (JSC::EvalExecutable::reparseExceptionInfo):
  11076. (JSC::FunctionExecutable::fromGlobalCode):
  11077. Pass function parameters (if available) to the parser.
  11078. 2010-09-17 Anders Carlsson <andersca@apple.com>
  11079. Reviewed by Sam Weinig.
  11080. Add IsFloatingPoint and IsArithmetic type traits
  11081. https://bugs.webkit.org/show_bug.cgi?id=46018
  11082. * wtf/TypeTraits.h:
  11083. * wtf/TypeTraits.cpp:
  11084. 2010-09-17 Martin Robinson <mrobinson@igalia.com>
  11085. Reviewed by Oliver Hunt.
  11086. [GTK] FontPlatformDataFreeType should use smart pointers to hold its members
  11087. https://bugs.webkit.org/show_bug.cgi?id=45917
  11088. Added support to PlatformRefPtr for handling HashTableDeletedValue.
  11089. * wtf/PlatformRefPtr.h:
  11090. (WTF::PlatformRefPtr::PlatformRefPtr): Added a constructor that takes HashTableDeletedValue.
  11091. (WTF::PlatformRefPtr::isHashTableDeletedValue): Added.
  11092. 2010-09-16 Oliver Hunt <oliver@apple.com>
  11093. Reviewed by Geoffrey Garen.
  11094. Crash due to timer triggered GC on one heap while another heap is active
  11095. https://bugs.webkit.org/show_bug.cgi?id=45932
  11096. <rdar://problem/8318446>
  11097. The GC timer may trigger for one heap while another heap is active. This
  11098. is safe, but requires us to ensure that we have temporarily associated the
  11099. thread's identifierTable with the heap we're collecting on. Otherwise we
  11100. may end up with the identifier tables in an inconsistent state leading to
  11101. an eventual crash.
  11102. * runtime/Collector.cpp:
  11103. (JSC::Heap::allocate):
  11104. (JSC::Heap::reset):
  11105. (JSC::Heap::collectAllGarbage):
  11106. Add assertions to ensure we have the correct identifierTable active
  11107. while collecting.
  11108. * runtime/GCActivityCallbackCF.cpp:
  11109. (JSC::DefaultGCActivityCallbackPlatformData::trigger):
  11110. Temporarily make the expected IdentifierTable active
  11111. * wtf/WTFThreadData.h:
  11112. (JSC::IdentifierTable::remove):
  11113. Make it possible to see when IdentifierTable::remove has succeeded
  11114. * wtf/text/StringImpl.cpp:
  11115. (WTF::StringImpl::~StringImpl):
  11116. CRASH if an StringImpl is an Identifier but isn't present in the
  11117. active IdentifierTable. If we get to this state something has
  11118. gone wrong and we should just crash immediately.
  11119. 2010-09-16 Martin Robinson <mrobinson@igalia.com>
  11120. Reviewed by Xan Lopez.
  11121. [GTK] Implement dissolveDragImageToFraction
  11122. https://bugs.webkit.org/show_bug.cgi?id=45826
  11123. * wtf/gobject/GTypedefs.h: Added forward declarations for GtkWindow and GdkEventExpose.
  11124. 2010-09-16 Eric Uhrhane <ericu@chromium.org>
  11125. Reviewed by Jian Li.
  11126. Unify FILE_SYSTEM and FILE_WRITER enables under the name FILE_SYSTEM.
  11127. https://bugs.webkit.org/show_bug.cgi?id=45798
  11128. * Configurations/FeatureDefines.xcconfig:
  11129. 2010-09-15 Oliver Hunt <oliver@apple.com>
  11130. Reviewed by Geoffrey Garen.
  11131. Use free variable analysis to improve activation performance
  11132. https://bugs.webkit.org/show_bug.cgi?id=45837
  11133. Adds free and captured variable tracking to the JS parser. This
  11134. allows us to avoid construction of an activation object in some
  11135. cases. Future patches will make more use of this information to
  11136. improve those cases where activations are still needed.
  11137. * parser/ASTBuilder.h:
  11138. * parser/JSParser.cpp:
  11139. (JSC::JSParser::Scope::Scope):
  11140. (JSC::JSParser::Scope::declareVariable):
  11141. (JSC::JSParser::Scope::useVariable):
  11142. (JSC::JSParser::Scope::collectFreeVariables):
  11143. (JSC::JSParser::Scope::capturedVariables):
  11144. (JSC::JSParser::ScopeRef::ScopeRef):
  11145. (JSC::JSParser::ScopeRef::operator->):
  11146. (JSC::JSParser::ScopeRef::index):
  11147. (JSC::JSParser::currentScope):
  11148. (JSC::JSParser::pushScope):
  11149. (JSC::JSParser::popScope):
  11150. (JSC::JSParser::parseProgram):
  11151. (JSC::JSParser::parseVarDeclarationList):
  11152. (JSC::JSParser::parseConstDeclarationList):
  11153. (JSC::JSParser::parseTryStatement):
  11154. (JSC::JSParser::parseFormalParameters):
  11155. (JSC::JSParser::parseFunctionInfo):
  11156. (JSC::JSParser::parseFunctionDeclaration):
  11157. (JSC::JSParser::parsePrimaryExpression):
  11158. * parser/Nodes.cpp:
  11159. (JSC::ScopeNodeData::ScopeNodeData):
  11160. (JSC::ScopeNode::ScopeNode):
  11161. (JSC::ProgramNode::ProgramNode):
  11162. (JSC::ProgramNode::create):
  11163. (JSC::EvalNode::EvalNode):
  11164. (JSC::EvalNode::create):
  11165. (JSC::FunctionBodyNode::FunctionBodyNode):
  11166. (JSC::FunctionBodyNode::create):
  11167. * parser/Nodes.h:
  11168. (JSC::ScopeNode::needsActivation):
  11169. (JSC::ScopeNode::hasCapturedVariables):
  11170. * parser/Parser.cpp:
  11171. (JSC::Parser::didFinishParsing):
  11172. * parser/Parser.h:
  11173. (JSC::Parser::parse):
  11174. * parser/SyntaxChecker.h:
  11175. * runtime/Executable.cpp:
  11176. (JSC::EvalExecutable::compileInternal):
  11177. (JSC::ProgramExecutable::compileInternal):
  11178. (JSC::FunctionExecutable::compileForCallInternal):
  11179. (JSC::FunctionExecutable::compileForConstructInternal):
  11180. * runtime/Executable.h:
  11181. (JSC::ScriptExecutable::needsActivation):
  11182. (JSC::ScriptExecutable::recordParse):
  11183. 2010-09-14 Hyung Song <beergun@company100.net>
  11184. Reviewed by Kent Tamura.
  11185. [BREWMP] Add IMemGroup and IMemSpace to OwnPtr type.
  11186. https://bugs.webkit.org/show_bug.cgi?id=44764
  11187. * wtf/OwnPtrCommon.h:
  11188. * wtf/brew/OwnPtrBrew.cpp:
  11189. (WTF::deleteOwnedPtr):
  11190. 2010-09-14 Darin Adler <darin@apple.com>
  11191. Reviewed by Geoffrey Garen.
  11192. Sort with non-numeric custom sort function fails on array with length but no values
  11193. https://bugs.webkit.org/show_bug.cgi?id=45781
  11194. * runtime/JSArray.cpp:
  11195. (JSC::JSArray::sort): Replaced early exit for an array of length zero to instead
  11196. exit for any array without values, even if it has a non-0 length.
  11197. 2010-09-14 Steve Falkenburg <sfalken@apple.com>
  11198. Windows production build fix.
  11199. Roll out r65143.
  11200. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
  11201. 2010-09-14 Kwang Yul Seo <skyul@company100.net>
  11202. Reviewed by Darin Adler.
  11203. Share UnicodeMacrosFromICU.h
  11204. https://bugs.webkit.org/show_bug.cgi?id=45710
  11205. glib, qt4 and wince use the same macros from ICU.
  11206. Remove the code duplication and use the same header file.
  11207. * wtf/unicode/UnicodeMacrosFromICU.h: Copied from JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h.
  11208. * wtf/unicode/glib/UnicodeMacrosFromICU.h: Removed.
  11209. * wtf/unicode/qt4/UnicodeQt4.h:
  11210. * wtf/unicode/wince/UnicodeWince.h:
  11211. 2010-09-13 Darin Adler <darin@apple.com>
  11212. Reviewed by Adam Barth.
  11213. Preparation for eliminating deprecatedParseURL
  11214. https://bugs.webkit.org/show_bug.cgi?id=45695
  11215. * wtf/text/WTFString.h: Added isAllSpecialCharacters, moved here from
  11216. the HTML tree builder.
  11217. 2010-09-13 Darin Fisher <darin@chromium.org>
  11218. Reviewed by David Levin.
  11219. Add option to conditionally compile smooth scrolling support.
  11220. https://bugs.webkit.org/show_bug.cgi?id=45689
  11221. ENABLE(SMOOTH_SCROLLING) is disabled by default for all platforms.
  11222. * wtf/Platform.h:
  11223. 2010-09-13 Adam Roben <aroben@apple.com>
  11224. Copy JavaScriptCore's generated sources to the right directory
  11225. * JavaScriptCore.vcproj/JavaScriptCore.make: Fixed typo.
  11226. 2010-09-13 Kwang Yul Seo <skyul@company100.net>
  11227. Reviewed by Kent Tamura.
  11228. [BREWMP] Don't call _msize
  11229. https://bugs.webkit.org/show_bug.cgi?id=45556
  11230. Because Brew MP uses its own memory allocator, it is not correct to use
  11231. _msize in fastMallocSize. Add !PLATFORM(BREWMP) guard.
  11232. * wtf/FastMalloc.cpp:
  11233. (WTF::fastMallocSize):
  11234. 2010-09-11 Simon Hausmann <simon.hausmann@nokia.com>
  11235. Reviewed by Andreas Kling.
  11236. [Qt] V8 port: webcore project files changes
  11237. https://bugs.webkit.org/show_bug.cgi?id=45141
  11238. * JavaScriptCore.pro: Moved wtf specific files to wtf.pri,
  11239. so that they can also be used from WebCore.pro for v8 builds.
  11240. * wtf/wtf.pri: Added.
  11241. 2010-09-10 Fridrich Strba <fridrich.strba@bluewin.ch>
  11242. Reviewed by Andreas Kling.
  11243. Add a define missing when building with glib unicode backend
  11244. https://bugs.webkit.org/show_bug.cgi?id=45544
  11245. * wtf/unicode/glib/UnicodeMacrosFromICU.h:
  11246. 2010-09-10 Stephanie Lewis <slewis@apple.com>
  11247. Reviewed by Alexey Proskuryakov.
  11248. Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know
  11249. about the JIT and other implementation details of JavaScriptCore. Necessary
  11250. to fix PPC build.
  11251. https://bugs.webkit.org/show_bug.cgi?id=45528
  11252. * JavaScriptCore.exp:
  11253. * JavaScriptCore.xcodeproj/project.pbxproj:
  11254. * runtime/MemoryStatistics.cpp: Added.
  11255. (JSC::memoryStatistics):
  11256. * runtime/MemoryStatistics.h: Added.
  11257. 2010-09-09 Michael Saboff <msaboff@apple.com>
  11258. Reviewed by Gavin Barraclough.
  11259. Added a regular expression tracing facility. This tracing is connected
  11260. to jsc. Every compiled regular expression object is added to a list.
  11261. When the process exits, each regular expression dumps its pattern,
  11262. JIT address, number of times it was executed and the number of matches.
  11263. This tracing is controlled by the macro ENABLE_REGEXP_TRACING in
  11264. wtf/Platform.h.
  11265. https://bugs.webkit.org/show_bug.cgi?id=45401
  11266. * JavaScriptCore.exp:
  11267. * jsc.cpp:
  11268. (runWithScripts):
  11269. * runtime/JSGlobalData.cpp:
  11270. (JSC::JSGlobalData::JSGlobalData):
  11271. (JSC::JSGlobalData::~JSGlobalData):
  11272. (JSC::JSGlobalData::addRegExpToTrace):
  11273. (JSC::JSGlobalData::dumpRegExpTrace):
  11274. * runtime/JSGlobalData.h:
  11275. * runtime/RegExp.cpp:
  11276. (JSC::RegExp::RegExp):
  11277. (JSC::RegExp::create):
  11278. (JSC::RegExp::match):
  11279. * runtime/RegExp.h:
  11280. * wtf/Platform.h:
  11281. * yarr/RegexJIT.h:
  11282. (JSC::Yarr::RegexCodeBlock::getAddr):
  11283. 2010-09-09 John Therrell <jtherrell@apple.com>
  11284. 32-bit build fix.
  11285. * jit/ExecutableAllocator.cpp:
  11286. (JSC::ExecutableAllocator::committedByteCount):
  11287. 2010-09-09 John Therrell <jtherrell@apple.com>
  11288. Reviewed by Alexey Proskuryakov.
  11289. Added statistics sampling and reporting for JavaScriptCore's RegisterFile and ExecutableAllocator classes
  11290. https://bugs.webkit.org/show_bug.cgi?id=45134
  11291. Added thread-safe committed byte counting and reporting functionality to RegisterFile and
  11292. ExecutableAllocator.
  11293. * JavaScriptCore.exp:
  11294. Exported new symbols to allow for WebKit to get statistics from JavaScriptCore classes.
  11295. * interpreter/RegisterFile.cpp:
  11296. (JSC::registerFileStatisticsMutex):
  11297. Added function which returns a static Mutex used for locking during read/write access to
  11298. static committed byte count variable.
  11299. (JSC::RegisterFile::~RegisterFile):
  11300. Added call to addToStatistics since memory is decommitted here.
  11301. (JSC::RegisterFile::releaseExcessCapacity):
  11302. Added call to addToStatistics since memory is decommitted here.
  11303. (JSC::RegisterFile::initializeThreading):
  11304. Added function which calls registerFileStatisticsMutex().
  11305. (JSC::RegisterFile::committedByteCount):
  11306. Added function which returns the current committed byte count for RegisterFile.
  11307. (JSC::RegisterFile::addToCommittedByteCount):
  11308. Added function which updates committed byte count.
  11309. * interpreter/RegisterFile.h:
  11310. (JSC::RegisterFile::RegisterFile):
  11311. Added call to addToStatistics since memory is committed here.
  11312. (JSC::RegisterFile::grow):
  11313. Added call to addToStatistics since memory is committed here.
  11314. * jit/ExecutableAllocator.h:
  11315. Added function prototype for public static function committedByteCount().
  11316. * jit/ExecutableAllocatorFixedVMPool.cpp:
  11317. (JSC::FixedVMPoolAllocator::release):
  11318. Added call to addToStatistics since memory is decommitted here.
  11319. (JSC::FixedVMPoolAllocator::reuse):
  11320. Added call to addToStatistics since memory is committed here.
  11321. (JSC::FixedVMPoolAllocator::addToCommittedByteCount):
  11322. Added function which updates committed byte count.
  11323. (JSC::ExecutableAllocator::committedByteCount):
  11324. Added function which returns the current committed byte count for ExecutableAllocator.
  11325. * runtime/InitializeThreading.cpp:
  11326. (JSC::initializeThreadingOnce):
  11327. Added call to RegisterFile::initializeThreading.
  11328. 2010-09-09 Mark Rowe <mrowe@apple.com>
  11329. Reviewed by Oliver Hunt.
  11330. <http://webkit.org/b/45502> JSObjectSetPrivateProperty does not handle NULL values as it claims
  11331. * API/JSObjectRef.cpp:
  11332. (JSObjectSetPrivateProperty): Don't call toJS if we have a NULL value as that will cause an assertion
  11333. failure. Instead map NULL directly to the null JSValue.
  11334. * API/tests/testapi.c:
  11335. (main): Add test coverage for the NULL value case.
  11336. 2010-09-09 Csaba Osztrogonác <ossy@webkit.org>
  11337. Reviewed by Gavin Barraclough.
  11338. [Qt] JSVALUE32_64 not works on Windows platform with MinGW compiler
  11339. https://bugs.webkit.org/show_bug.cgi?id=29268
  11340. * wtf/Platform.h: Enable JSVALUE32_64 for Qt/Windows/MinGW, because it works now.
  11341. 2010-09-08 Zoltan Herczeg <zherczeg@webkit.org>
  11342. Reviewed by Darin Adler.
  11343. Removing doneSemicolon label in the lexer
  11344. https://bugs.webkit.org/show_bug.cgi?id=45289
  11345. As a side effect of moving the multiline comment parsing
  11346. to a separate function, an opportunity raised to simplify
  11347. the single line comment parsing, and removing doneSemicolon
  11348. label. Slight performance increase on --parse-only
  11349. tests (from 32.8ms to 31.5ms)
  11350. * parser/Lexer.cpp:
  11351. (JSC::Lexer::lex):
  11352. 2010-09-08 Xan Lopez <xlopez@igalia.com>
  11353. Reviewed by Alexey Proskuryakov.
  11354. Remove accessor for private member variable in JSParser
  11355. https://bugs.webkit.org/show_bug.cgi?id=45378
  11356. m_token is private to JSParser, so it does not seem to be useful
  11357. to have an accessor for it. On top of that, the file was both
  11358. using the accessor and directly accessing the member variable,
  11359. only one style should be used.
  11360. 2010-09-08 Csaba Osztrogonác <ossy@webkit.org>
  11361. Reviewed by Oliver Hunt.
  11362. [Qt] REGRESSION(63348): jsc is broken
  11363. https://bugs.webkit.org/show_bug.cgi?id=42818
  11364. Need fastcall conventions on Qt/Win/MinGW.
  11365. Based on patches of Gavin Barraclough: r63947 and r63948.
  11366. * jit/JITStubs.cpp:
  11367. * jit/JITStubs.h:
  11368. 2010-09-08 Robert Hogan <robert@webkit.org>
  11369. Reviewed by Antonio Gomes.
  11370. Remove some unnecessary duplicate calls to string functions
  11371. https://bugs.webkit.org/show_bug.cgi?id=45314
  11372. * wtf/text/WTFString.cpp:
  11373. (WTF::String::format):
  11374. 2010-09-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
  11375. Reviewed by Andreas Kling.
  11376. Re-Disable JIT for MSVC 64bit to fix the build on this compiler.
  11377. https://bugs.webkit.org/show_bug.cgi?id=45382
  11378. It was enabled in the cleanup made in r64176, though it is still
  11379. not implemented.
  11380. * wtf/Platform.h:
  11381. 2010-09-08 Martin Robinson <mrobinson@igalia.com>
  11382. Reviewed by Xan Lopez.
  11383. [GTK] Need a WebSocket implementation
  11384. https://bugs.webkit.org/show_bug.cgi?id=45197
  11385. Add a GIO-based WebSocket implementation.
  11386. * wtf/gobject/GRefPtr.cpp: Added PlatformRefPtr support for GSource.
  11387. (WTF::refPlatformPtr):
  11388. (WTF::derefPlatformPtr):
  11389. * wtf/gobject/GRefPtr.h: Added new template specialization declarations.
  11390. * wtf/gobject/GTypedefs.h: Add some more GLib/GIO forward declarations.
  11391. 2010-08-30 Maciej Stachowiak <mjs@apple.com>
  11392. Reviewed by Darin Adler.
  11393. Handle MediaQueryExp memory management exclusively with smart pointers
  11394. https://bugs.webkit.org/show_bug.cgi?id=44874
  11395. Implemented a non-copying sort function to make it possible to sort a Vector
  11396. of OwnPtrs (which cannot be copied). This is required for the above.
  11397. * wtf/NonCopyingSort.h: Added.
  11398. (WTF::nonCopyingSort): It's secretly heapsort.
  11399. (WTF::heapSort): heapsort implementation.
  11400. (WTF::siftDown): Helper function for heapsort.
  11401. (WTF::heapify): ditto
  11402. Adjust build systems.
  11403. * GNUmakefile.am:
  11404. * JavaScriptCore.gypi:
  11405. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  11406. * JavaScriptCore.xcodeproj/project.pbxproj:
  11407. 2010-09-08 Zoltan Herczeg <zherczeg@webkit.org>
  11408. Reviewed by Darin Adler.
  11409. Refactoring multiline comments in the lexer
  11410. https://bugs.webkit.org/show_bug.cgi?id=45289
  11411. MultiLine comment parsing is moved to a separate function.
  11412. Slight performance increase on --parse-only tests (from 33.6ms to 32.8ms)
  11413. SunSpider reports no change (from 523.1ms to 521.2ms).
  11414. * parser/Lexer.cpp:
  11415. (JSC::Lexer::parseMultilineComment):
  11416. (JSC::Lexer::lex):
  11417. * parser/Lexer.h:
  11418. 2010-09-07 James Robinson <jamesr@chromium.org>
  11419. Compile fix attempt for windows.
  11420. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  11421. 2010-09-07 Mihai Parparita <mihaip@chromium.org>
  11422. Reviewed by James Robinson.
  11423. Fix Windows build after r66936
  11424. https://bugs.webkit.org/show_bug.cgi?id=45348
  11425. Add symbol names that were missing from r66936.
  11426. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  11427. 2010-09-07 Mihai Parparita <mihaip@chromium.org>
  11428. Reviewed by Oliver Hunt.
  11429. pushState and replaceState do not clone RegExp objects correctly
  11430. https://bugs.webkit.org/show_bug.cgi?id=44718
  11431. Move internal representation of JSC::RegExp (which depends on wether
  11432. YARR and YARR_JIT is enabled) into RegExpRepresentation which can live
  11433. in the implementation only. This makes it feasible to use RegExp in
  11434. WebCore without bringing in all of YARR.
  11435. * JavaScriptCore.exp: Export RegExp and RegExpObject functions that are
  11436. needed inside WebCore's JSC bindings.
  11437. * runtime/RegExp.cpp:
  11438. (JSC::RegExpRepresentation::~RegExpRepresentation):
  11439. (JSC::RegExp::RegExp):
  11440. (JSC::RegExp::~RegExp):
  11441. (JSC::RegExp::compile):
  11442. (JSC::RegExp::match):
  11443. * runtime/RegExp.h:
  11444. 2010-09-07 Anders Carlsson <andersca@apple.com>
  11445. Reviewed by Darin Adler.
  11446. <rdar://problem/8381749> -Wcast-align warning emitted when building with clang
  11447. Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc.
  11448. * Configurations/Base.xcconfig:
  11449. 2010-09-07 Zoltan Horvath <zoltan@webkit.org>
  11450. Reviewed by Darin Adler.
  11451. REGRESSION(66741): Undefined pthread macros
  11452. https://bugs.webkit.org/show_bug.cgi?id=45246
  11453. PTHREAD_MUTEX_NORMAL and PTHREAD_MUTEX_DEFAULT (introduced in r60487) are not defined on Linux,
  11454. but used in a statement. Add an additional check to test this.
  11455. * wtf/FastMalloc.cpp:
  11456. (WTF::TCMalloc_PageHeap::initializeScavenger):
  11457. 2010-09-06 Oliver Hunt <oliver@apple.com>
  11458. Windows build fix
  11459. 2010-09-05 Oliver Hunt <oliver@apple.com>
  11460. Reviewed by Sam Weinig.
  11461. SerializedScriptValue needs to use a flat storage mechanism
  11462. https://bugs.webkit.org/show_bug.cgi?id=45244
  11463. Export JSArray::put
  11464. * JavaScriptCore.exp:
  11465. 2010-09-06 Chao-ying Fu <fu@mips.com>
  11466. Reviewed by Oliver Hunt.
  11467. Support JSVALUE32_64 on MIPS
  11468. https://bugs.webkit.org/show_bug.cgi?id=43999
  11469. Add missing functions to support JSVALUE32_64 on MIPS.
  11470. Remove JSVALUE32 as the default for MIPS.
  11471. * assembler/MIPSAssembler.h:
  11472. (JSC::MIPSAssembler::divd):
  11473. (JSC::MIPSAssembler::mthc1):
  11474. (JSC::MIPSAssembler::cvtwd):
  11475. * assembler/MacroAssemblerMIPS.h:
  11476. (JSC::MacroAssemblerMIPS::neg32):
  11477. (JSC::MacroAssemblerMIPS::branchOr32):
  11478. (JSC::MacroAssemblerMIPS::set8):
  11479. (JSC::MacroAssemblerMIPS::loadDouble):
  11480. (JSC::MacroAssemblerMIPS::divDouble):
  11481. (JSC::MacroAssemblerMIPS::convertInt32ToDouble):
  11482. (JSC::MacroAssemblerMIPS::branchDouble):
  11483. (JSC::MacroAssemblerMIPS::branchConvertDoubleToInt32):
  11484. (JSC::MacroAssemblerMIPS::zeroDouble):
  11485. * jit/JIT.h:
  11486. * jit/JITOpcodes32_64.cpp:
  11487. (JSC::JIT::privateCompileCTINativeCall):
  11488. * jit/JITPropertyAccess32_64.cpp:
  11489. (JSC::JIT::privateCompilePutByIdTransition):
  11490. * jit/JITStubs.cpp:
  11491. (JSC::JITThunks::JITThunks):
  11492. * jit/JITStubs.h:
  11493. * wtf/Platform.h:
  11494. 2010-09-06 Robert Hogan <robert@webkit.org>
  11495. Unreviewed, compile fix.
  11496. Fix compile failure in r66843
  11497. Revert to original patch in bugzilla. Leave bug open for
  11498. discussion on potential removal of double utf8 conversion.
  11499. https://bugs.webkit.org/show_bug.cgi?id=45240
  11500. * wtf/text/WTFString.cpp:
  11501. (WTF::String::format):
  11502. 2010-09-06 Robert Hogan <robert@webkit.org>
  11503. Reviewed by Andreas Kling.
  11504. [Qt] utf8 encoding of console() messages
  11505. Unskip:
  11506. http/tests/security/xssAuditor/embed-tag-null-char.html
  11507. http/tests/security/xssAuditor/object-embed-tag-null-char.html
  11508. Both tests failed because Qt's implementation of String::format()
  11509. is casting a utf8 result to String, which assumes latin1 in
  11510. its constructor. So instead of casting a QString to a String, use
  11511. StringImpl::create() instead. Unfortunately, this involves a lot
  11512. of extra casts but the end result is correct.
  11513. https://bugs.webkit.org/show_bug.cgi?id=45240
  11514. * wtf/text/WTFString.cpp:
  11515. (WTF::String::format):
  11516. 2010-09-03 Alexey Proskuryakov <ap@apple.com>
  11517. Reviewed by Darin Adler.
  11518. https://bugs.webkit.org/show_bug.cgi?id=45135
  11519. <rdar://problem/7823714> TCMalloc_PageHeap doesn't hold a mutex while manipulating shared data
  11520. * wtf/FastMalloc.cpp:
  11521. (WTF::TCMalloc_PageHeap::initializeScavenger): Make sure to create a non-recursive mutex
  11522. regardless of platform default, so that we can assert that it's held (this is for platforms
  11523. that don't have libdispatch).
  11524. (WTF::TCMalloc_PageHeap::signalScavenger): Assert that the mutex is held, so we can look
  11525. at m_scavengeThreadActive. For platforms that have libdispatch, assert that pageheap_lock
  11526. is held.
  11527. (WTF::TCMalloc_PageHeap::periodicScavenge): Make sure that pageheap_lock is held before
  11528. manipulating m_scavengeThreadActive. Otherwise, there is an obvious race condition, and we
  11529. can make unbalanced calls to dispatch_resume().
  11530. 2010-09-03 Lucas De Marchi <lucas.demarchi@profusion.mobi>
  11531. Reviewed by Martin Robinson.
  11532. [EFL] Regression (66531) Build break with Glib Support
  11533. https://bugs.webkit.org/show_bug.cgi?id=45011
  11534. Move GtkTypedefs.h to GTypedefs.h and let it inside gobject directory
  11535. since when glib is enabled, EFL port needs it, too.
  11536. * CMakeListsEfl.txt: Include gobject directory to find new header
  11537. file.
  11538. * GNUmakefile.am: Ditto.
  11539. * wtf/CMakeListsEfl.txt: Ditto.
  11540. * wtf/Platform.h: Include header if port is EFL and glib support is
  11541. enabled.
  11542. * wtf/gtk/GtkTypedefs.h: Removed.
  11543. * wtf/gobject/GTypedefs.h: Added. Sections specific to GTK are now
  11544. guarded by PLATFORM(GTK).
  11545. 2010-09-03 Csaba Osztrogonác <ossy@webkit.org>
  11546. Reviewed by Simon Hausmann.
  11547. Fix warning in wtf/ByteArray.h
  11548. https://bugs.webkit.org/show_bug.cgi?id=44672
  11549. * wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers.
  11550. 2010-09-02 Adam Barth <abarth@webkit.org>
  11551. Reviewed by Eric Seidel.
  11552. Actually parse a URL from ParsedURL
  11553. https://bugs.webkit.org/show_bug.cgi?id=45080
  11554. This patch only handles standard URLs. At some point we'll need to
  11555. distinguish between standard URLs and other kinds of URLs.
  11556. * wtf/url/api/ParsedURL.cpp:
  11557. (WTF::ParsedURL::ParsedURL):
  11558. 2010-09-02 Adam Barth <abarth@webkit.org>
  11559. Reviewed by Eric Seidel.
  11560. Add ParsedURL and URLString to WTFURL API
  11561. https://bugs.webkit.org/show_bug.cgi?id=45078
  11562. Currently there's no actual URL parsing going on, but this patch is a
  11563. start to sketching out the API.
  11564. * JavaScriptCore.xcodeproj/project.pbxproj:
  11565. * wtf/url/api/ParsedURL.cpp: Added.
  11566. (WTF::ParsedURL::ParsedURL):
  11567. (WTF::ParsedURL::scheme):
  11568. (WTF::ParsedURL::username):
  11569. (WTF::ParsedURL::password):
  11570. (WTF::ParsedURL::host):
  11571. (WTF::ParsedURL::port):
  11572. (WTF::ParsedURL::path):
  11573. (WTF::ParsedURL::query):
  11574. (WTF::ParsedURL::fragment):
  11575. (WTF::ParsedURL::segment):
  11576. * wtf/url/api/ParsedURL.h: Added.
  11577. (WTF::ParsedURL::spec):
  11578. * wtf/url/api/URLString.h: Added.
  11579. (WTF::URLString::URLString):
  11580. (WTF::URLString::string):
  11581. 2010-09-02 Adam Barth <abarth@webkit.org>
  11582. Reviewed by Eric Seidel.
  11583. Add WTFURL to the JavaScriptCore build on Mac
  11584. https://bugs.webkit.org/show_bug.cgi?id=45075
  11585. Building code is good.
  11586. * JavaScriptCore.xcodeproj/project.pbxproj:
  11587. 2010-09-02 Alexey Proskuryakov <ap@apple.com>
  11588. Reviewed by Oliver Hunt.
  11589. https://bugs.webkit.org/show_bug.cgi?id=43230
  11590. <rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser
  11591. One can't delete a ThreadSpecific object that has data in it. It's not even possible to
  11592. enumerate data objects in all threads, much less destroy them from a thread that's destroying
  11593. the ThreadSpecific.
  11594. * parser/JSParser.cpp:
  11595. (JSC::JSParser::JSParser):
  11596. * runtime/JSGlobalData.h:
  11597. * wtf/WTFThreadData.cpp:
  11598. (WTF::WTFThreadData::WTFThreadData):
  11599. * wtf/WTFThreadData.h:
  11600. (WTF::WTFThreadData::approximatedStackStart):
  11601. Moved stack guard tracking from JSGlobalData to WTFThreadData.
  11602. * wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't
  11603. ever face a situation where we'd want to delete a ThreadSpecific object.
  11604. 2010-09-01 Gavin Barraclough <barraclough@apple.com>
  11605. Rubber stamped by Oliver Hunt.
  11606. Ecma-262 15.11.1.1 states that if the argument is undefined then an
  11607. Error object's message property should be set to the empty string.
  11608. * runtime/ErrorInstance.cpp:
  11609. (JSC::ErrorInstance::ErrorInstance):
  11610. (JSC::ErrorInstance::create):
  11611. * runtime/ErrorInstance.h:
  11612. * runtime/ErrorPrototype.cpp:
  11613. (JSC::ErrorPrototype::ErrorPrototype):
  11614. 2010-08-31 Darin Adler <darin@apple.com>
  11615. Reviewed by Anders Carlsson.
  11616. * wtf/FastMalloc.cpp:
  11617. (WTF::TCMalloc_PageHeap::scavenge): Replaced somewhat-quirky code that
  11618. mixed types with code that uses size_t.
  11619. * wtf/TCPageMap.h: Removed names of unused arguments to avoid warning.
  11620. 2010-08-31 Martin Robinson <mrobinson@igalia.com>
  11621. Reviewed by Gustavo Noronha Silva.
  11622. [GTK] Isolate all GTK+ typedefs into one file
  11623. https://bugs.webkit.org/show_bug.cgi?id=44900
  11624. * GNUmakefile.am: Add GtkTypedefs.h to the source lists.
  11625. * wtf/Platform.h: #include GtkTypedefs.h for the GTK+ build.
  11626. * wtf/ThreadingPrimitives.h: Remove GTK+ typedefs.
  11627. * wtf/gobject/GOwnPtr.h: Ditto.
  11628. * wtf/gobject/GRefPtr.h: Ditto.
  11629. * wtf/gtk/GtkTypedefs.h: Added.
  11630. 2010-08-31 Martin Robinson <mrobinson@igalia.com>
  11631. Reviewed by Gustavo Noronha Silva.
  11632. [GTK] Fix 'make dist' in preparation of the 1.3.3 release
  11633. https://bugs.webkit.org/show_bug.cgi?id=44978
  11634. * GNUmakefile.am: Adding missing headers to the sources list.
  11635. 2010-08-31 Chao-ying Fu <fu@mips.com>
  11636. Reviewed by Oliver Hunt.
  11637. Support emit_op_mod() for MIPS
  11638. https://bugs.webkit.org/show_bug.cgi?id=42855
  11639. This patch uses MIPS div instructions for op_mod to improve performance.
  11640. * assembler/MIPSAssembler.h:
  11641. (JSC::MIPSAssembler::div):
  11642. * jit/JITArithmetic.cpp:
  11643. (JSC::JIT::emit_op_mod):
  11644. (JSC::JIT::emitSlow_op_mod):
  11645. 2010-08-31 Csaba Osztrogonác <ossy@webkit.org>
  11646. Reviewed by Darin Adler.
  11647. Modify ASSERT_UNUSED and UNUSED_PARAM similar to Qt's Q_UNUSED.
  11648. https://bugs.webkit.org/show_bug.cgi?id=44870
  11649. * wtf/Assertions.h:
  11650. * wtf/UnusedParam.h:
  11651. 2010-08-31 Benjamin Poulain <benjamin.poulain@nokia.com>
  11652. Reviewed by Kenneth Rohde Christiansen.
  11653. JSC TimeoutChecker::didTimeOut overflows on ARM
  11654. https://bugs.webkit.org/show_bug.cgi?id=38538
  11655. Make getCPUTime() return values relative to the first call.
  11656. The previous implementation relied on simply on currentTime(), which
  11657. return a time since epoch and not a time since the thread started. This
  11658. made the return value of getCPUTime() overflow on 32 bits.
  11659. * runtime/TimeoutChecker.cpp:
  11660. (JSC::getCPUTime):
  11661. 2010-08-30 Mihai Parparita <mihaip@chromium.org>
  11662. Reviewed by Adam Barth.
  11663. HISTORY_ALWAYS_ASYNC should be removed (history should always be async)
  11664. https://bugs.webkit.org/show_bug.cgi?id=44315
  11665. Remove ENABLE_HISTORY_ALWAYS_ASYNC #define.
  11666. * wtf/Platform.h:
  11667. 2010-08-30 Chris Rogers <crogers@google.com>
  11668. Reviewed by Kenneth Russell.
  11669. Fix namespace for wtf/Complex.h and wtf/Vector3.h
  11670. https://bugs.webkit.org/show_bug.cgi?id=44892
  11671. * wtf/Complex.h:
  11672. * wtf/Vector3.h:
  11673. 2010-08-30 Andy Estes <aestes@apple.com>
  11674. Reviewed by Eric Carlson.
  11675. Strings returned by asciiDebug() should be NULL-terminated.
  11676. https://bugs.webkit.org/show_bug.cgi?id=44866
  11677. * wtf/text/WTFString.cpp:
  11678. (asciiDebug):
  11679. 2010-08-30 Zoltan Herczeg <zherczeg@webkit.org>
  11680. Reviewed by Darin Adler.
  11681. Refactor number parsing in the lexer
  11682. https://bugs.webkit.org/show_bug.cgi?id=44104
  11683. Number parsing was full of gotos, and needed a complete
  11684. redesign to remove them (Only one remained). Furthermore
  11685. integer arithmetic is empolyed for fast cases (= small
  11686. integer numbers).
  11687. * parser/Lexer.cpp:
  11688. (JSC::Lexer::parseHex):
  11689. (JSC::Lexer::parseOctal):
  11690. (JSC::Lexer::parseDecimal):
  11691. (JSC::Lexer::parseNumberAfterDecimalPoint):
  11692. (JSC::Lexer::parseNumberAfterExponentIndicator):
  11693. (JSC::Lexer::lex):
  11694. * parser/Lexer.h:
  11695. 2010-08-29 Darin Adler <darin@apple.com>
  11696. Fix Qt build.
  11697. * wtf/unicode/glib/UnicodeMacrosFromICU.h: Added U_IS_BMP.
  11698. * wtf/unicode/qt4/UnicodeQt4.h: Ditto.
  11699. * wtf/unicode/wince/UnicodeWince.h: Ditto.
  11700. 2010-08-29 Kwang Yul Seo <skyul@company100.net>
  11701. Reviewed by Kent Tamura.
  11702. [BREWMP] Port vprintf_stderr_common
  11703. https://bugs.webkit.org/show_bug.cgi?id=33568
  11704. Use BREW's DBGPRINTF to output debug messages.
  11705. * wtf/Assertions.cpp:
  11706. 2010-08-28 Gavin Barraclough <barraclough@apple.com>
  11707. Reviewed by Oliver Hunt.
  11708. Bug 44830 - In Array's prototype functyions we're incorrectly handing large index values
  11709. We are in places casting doubles to unsigneds, and unsigneds to ints, without always check
  11710. that the result is within bounds. This is problematic in the case of double-to-unsigned
  11711. conversion because we should be saturating to array length.
  11712. Also, the error return value from Array.splice should be [], not undefined.
  11713. I don't see any security concerns here. These methods are spec'ed in such a way that they
  11714. can be applied to non Array objects, so in all cases the (potentially bogus) indices are
  11715. being passed to functions that will safely check accesses are within bounds.
  11716. * runtime/ArrayPrototype.cpp:
  11717. (JSC::argumentClampedIndexFromStartOrEnd):
  11718. (JSC::arrayProtoFuncJoin):
  11719. (JSC::arrayProtoFuncConcat):
  11720. (JSC::arrayProtoFuncReverse):
  11721. (JSC::arrayProtoFuncShift):
  11722. (JSC::arrayProtoFuncSlice):
  11723. (JSC::arrayProtoFuncSort):
  11724. (JSC::arrayProtoFuncSplice):
  11725. (JSC::arrayProtoFuncUnShift):
  11726. (JSC::arrayProtoFuncFilter):
  11727. (JSC::arrayProtoFuncMap):
  11728. (JSC::arrayProtoFuncEvery):
  11729. (JSC::arrayProtoFuncForEach):
  11730. (JSC::arrayProtoFuncSome):
  11731. (JSC::arrayProtoFuncReduce):
  11732. (JSC::arrayProtoFuncReduceRight):
  11733. (JSC::arrayProtoFuncIndexOf):
  11734. (JSC::arrayProtoFuncLastIndexOf):
  11735. * runtime/JSValue.h:
  11736. (JSC::JSValue::toUInt32):
  11737. 2010-08-28 Pratik Solanki <psolanki@apple.com>
  11738. Reviewed by Dan Bernstein.
  11739. Add an ENABLE define for purgeable memory support
  11740. https://bugs.webkit.org/show_bug.cgi?id=44777
  11741. * wtf/Platform.h:
  11742. 2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
  11743. Reviewed by Kenneth Rohde Christiansen.
  11744. [Qt] NPAPI Plugin metadata should be cached, and loading a plugin should not require loading every plugin
  11745. https://bugs.webkit.org/show_bug.cgi?id=43179
  11746. Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE flag to enable persistent
  11747. NPAPI Plugin Cache. The flag is enabled by default.
  11748. * wtf/Platform.h: Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE
  11749. 2010-07-27 Jer Noble <jer.noble@apple.com>
  11750. Reviewed by Eric Carlson.
  11751. Add JavaScript API to allow a page to go fullscreen.
  11752. rdar://problem/6867795
  11753. https://bugs.webkit.org/show_bug.cgi?id=43099
  11754. * wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS).
  11755. 2010-08-27 Gavin Barraclough <barraclough@apple.com>
  11756. Windows build fix pt 2.
  11757. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  11758. 2010-08-27 Gavin Barraclough <barraclough@apple.com>
  11759. Windows build fix pt 1.
  11760. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  11761. 2010-08-27 Gavin Barraclough <barraclough@apple.com>
  11762. Reviewed by Oliver Hunt.
  11763. Bug 44745 - Number.toFixed/toExponential/toPrecision are inaccurate.
  11764. These methods should be using a version of dtoa that can generate results accurate
  11765. to the requested precision, whereas our version of dtoa is only currently able to
  11766. support producing results sufficiently accurate to distinguish the value from any
  11767. other IEEE-754 double precision number.
  11768. This change has no impact on benchmarks we track.
  11769. On microbenchmarks for these functions, this is a slight regression where a high
  11770. precision is requested (dtoa now need to iterate further to generate a a greater
  11771. number of digits), but with smaller precision values (hopefully more common) this
  11772. improves performance, since it reduced the accurate of result dtoa is required,
  11773. to produce, and removes the need to pre-round values before calling dtoa.
  11774. * JavaScriptCore.exp:
  11775. doubleToStringInJavaScriptFormat renamed to numberToString
  11776. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  11777. doubleToStringInJavaScriptFormat renamed to numberToString
  11778. * runtime/UString.cpp:
  11779. (JSC::UString::number):
  11780. doubleToStringInJavaScriptFormat renamed to numberToString
  11781. * wtf/DecimalNumber.h:
  11782. (WTF::DecimalNumber::DecimalNumber):
  11783. (WTF::DecimalNumber::toStringDecimal):
  11784. (WTF::DecimalNumber::toStringExponential):
  11785. Remove all pre-rounding of values, instead call dtoa correctly.
  11786. * wtf/dtoa.cpp:
  11787. (WTF::dtoa):
  11788. * wtf/dtoa.h:
  11789. Reenable support for rounding to specific-figures/decimal-places in dtoa.
  11790. Modify to remove unbiased rounding, provide ECMA required away-from-zero.
  11791. Rewrite doubleToStringInJavaScriptFormat to use DecimalNumber, rename to
  11792. numberToString.
  11793. 2010-08-27 Chao-ying Fu <fu@mips.com>
  11794. Reviewed by Oliver Hunt.
  11795. Byte alignment issue on MIPS
  11796. https://bugs.webkit.org/show_bug.cgi?id=29415
  11797. MIPS accesses one byte at a time for now to avoid the help from the
  11798. kernel to fix unaligned accesses.
  11799. * wtf/text/AtomicString.cpp:
  11800. (WebCore::equal):
  11801. * wtf/text/StringHash.h:
  11802. (WebCore::StringHash::equal):
  11803. 2010-08-27 Xan Lopez <xlopez@igalia.com>
  11804. Reviewed by Tor Arne Vestbø.
  11805. Fix a couple of typos in comment.
  11806. * bytecode/CodeBlock.h:
  11807. 2010-08-26 Gavin Barraclough <barraclough@apple.com>
  11808. Windows build fix.
  11809. * wtf/dtoa.cpp:
  11810. 2010-08-26 Gavin Barraclough <baraclough@apple.com>
  11811. Reviewed by Sam Weinig.
  11812. Bug 44735 - Clean up dtoa.cpp
  11813. Remove unused & unmaintained code paths, reformat code to match
  11814. coding standard & use platform #defines from Platform.h directly.
  11815. * wtf/dtoa.cpp:
  11816. (WTF::storeInc):
  11817. (WTF::multadd):
  11818. (WTF::s2b):
  11819. (WTF::lo0bits):
  11820. (WTF::mult):
  11821. (WTF::pow5mult):
  11822. (WTF::lshift):
  11823. (WTF::diff):
  11824. (WTF::ulp):
  11825. (WTF::b2d):
  11826. (WTF::d2b):
  11827. (WTF::ratio):
  11828. (WTF::):
  11829. (WTF::strtod):
  11830. (WTF::quorem):
  11831. (WTF::dtoa):
  11832. 2010-08-26 Gavin Barraclough <barraclough@apple.com>
  11833. Rubber Stamped by Oliver Hunt.
  11834. Partially revert r65959. The toString changes regressed the v8 tests,
  11835. but keep the toFixed/toExponential/toPrecision changes.
  11836. * JavaScriptCore.exp:
  11837. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  11838. * runtime/NumberPrototype.cpp:
  11839. * runtime/UString.cpp:
  11840. (JSC::UString::number):
  11841. * wtf/DecimalNumber.h:
  11842. * wtf/dtoa.cpp:
  11843. (WTF::append):
  11844. (WTF::doubleToStringInJavaScriptFormat):
  11845. * wtf/dtoa.h:
  11846. * wtf/text/WTFString.cpp:
  11847. * wtf/text/WTFString.h:
  11848. 2010-08-26 James Robinson <jamesr@chromium.org>
  11849. Reviewed by Darin Fisher.
  11850. [chromium] Remove the USE(GLES2_RENDERING) define and associated code
  11851. https://bugs.webkit.org/show_bug.cgi?id=43761
  11852. Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused.
  11853. * wtf/Platform.h:
  11854. 2010-08-26 Gavin Barraclough <barraclough@apple.com>
  11855. Rolling out r64608, this regressed performance.
  11856. * JavaScriptCore.xcodeproj/project.pbxproj:
  11857. * assembler/ARMAssembler.cpp:
  11858. (JSC::ARMAssembler::executableCopy):
  11859. * assembler/LinkBuffer.h:
  11860. (JSC::LinkBuffer::LinkBuffer):
  11861. (JSC::LinkBuffer::~LinkBuffer):
  11862. (JSC::LinkBuffer::performFinalization):
  11863. * assembler/MIPSAssembler.h:
  11864. (JSC::MIPSAssembler::executableCopy):
  11865. * assembler/X86Assembler.h:
  11866. (JSC::X86Assembler::executableCopy):
  11867. * bytecode/StructureStubInfo.h:
  11868. (JSC::StructureStubInfo::initGetByIdProto):
  11869. (JSC::StructureStubInfo::initGetByIdChain):
  11870. (JSC::StructureStubInfo::initGetByIdSelfList):
  11871. (JSC::StructureStubInfo::initGetByIdProtoList):
  11872. (JSC::StructureStubInfo::initPutByIdTransition):
  11873. * jit/ExecutableAllocator.cpp:
  11874. (JSC::ExecutablePool::systemAlloc):
  11875. * jit/ExecutableAllocator.h:
  11876. (JSC::ExecutablePool::create):
  11877. (JSC::ExecutableAllocator::ExecutableAllocator):
  11878. (JSC::ExecutableAllocator::poolForSize):
  11879. (JSC::ExecutablePool::ExecutablePool):
  11880. (JSC::ExecutablePool::poolAllocate):
  11881. * jit/ExecutableAllocatorFixedVMPool.cpp:
  11882. (JSC::FixedVMPoolAllocator::allocInternal):
  11883. * jit/JIT.cpp:
  11884. (JSC::JIT::privateCompile):
  11885. * jit/JIT.h:
  11886. (JSC::JIT::compileGetByIdProto):
  11887. (JSC::JIT::compileGetByIdSelfList):
  11888. (JSC::JIT::compileGetByIdProtoList):
  11889. (JSC::JIT::compileGetByIdChainList):
  11890. (JSC::JIT::compileGetByIdChain):
  11891. (JSC::JIT::compilePutByIdTransition):
  11892. (JSC::JIT::compilePatchGetArrayLength):
  11893. * jit/JITOpcodes.cpp:
  11894. (JSC::JIT::privateCompileCTIMachineTrampolines):
  11895. * jit/JITOpcodes32_64.cpp:
  11896. (JSC::JIT::privateCompileCTIMachineTrampolines):
  11897. (JSC::JIT::privateCompileCTINativeCall):
  11898. * jit/JITPropertyAccess.cpp:
  11899. (JSC::JIT::stringGetByValStubGenerator):
  11900. (JSC::JIT::privateCompilePutByIdTransition):
  11901. (JSC::JIT::privateCompilePatchGetArrayLength):
  11902. (JSC::JIT::privateCompileGetByIdProto):
  11903. (JSC::JIT::privateCompileGetByIdSelfList):
  11904. (JSC::JIT::privateCompileGetByIdProtoList):
  11905. (JSC::JIT::privateCompileGetByIdChainList):
  11906. (JSC::JIT::privateCompileGetByIdChain):
  11907. * jit/JITPropertyAccess32_64.cpp:
  11908. (JSC::JIT::stringGetByValStubGenerator):
  11909. (JSC::JIT::privateCompilePutByIdTransition):
  11910. (JSC::JIT::privateCompilePatchGetArrayLength):
  11911. (JSC::JIT::privateCompileGetByIdProto):
  11912. (JSC::JIT::privateCompileGetByIdSelfList):
  11913. (JSC::JIT::privateCompileGetByIdProtoList):
  11914. (JSC::JIT::privateCompileGetByIdChainList):
  11915. (JSC::JIT::privateCompileGetByIdChain):
  11916. * jit/JITStubs.cpp:
  11917. (JSC::JITThunks::tryCachePutByID):
  11918. (JSC::JITThunks::tryCacheGetByID):
  11919. (JSC::DEFINE_STUB_FUNCTION):
  11920. (JSC::getPolymorphicAccessStructureListSlot):
  11921. * jit/JITStubs.h:
  11922. * jit/SpecializedThunkJIT.h:
  11923. (JSC::SpecializedThunkJIT::finalize):
  11924. * runtime/ExceptionHelpers.cpp:
  11925. * runtime/ExceptionHelpers.h:
  11926. * runtime/Executable.cpp:
  11927. (JSC::EvalExecutable::compileInternal):
  11928. (JSC::ProgramExecutable::compileInternal):
  11929. (JSC::FunctionExecutable::compileForCallInternal):
  11930. (JSC::FunctionExecutable::compileForConstructInternal):
  11931. (JSC::FunctionExecutable::reparseExceptionInfo):
  11932. (JSC::EvalExecutable::reparseExceptionInfo):
  11933. * yarr/RegexJIT.cpp:
  11934. (JSC::Yarr::RegexGenerator::compile):
  11935. 2010-08-26 Gavin Barraclough <barraclough@apple.com>
  11936. Reviewed by Brady Eidson.
  11937. Bug 44655 - Add debug only convenience methods to obtain a Vector<char> from a String/StringImpl.
  11938. * wtf/text/WTFString.cpp:
  11939. (asciiDebug):
  11940. Return a Vector<char> containing the contents of a string as ASCII.
  11941. 2010-08-26 Sam Weinig <sam@webkit.org>
  11942. Reviewed by Darin Adler.
  11943. Add PassOwnArrayPtr
  11944. https://bugs.webkit.org/show_bug.cgi?id=44627
  11945. * GNUmakefile.am:
  11946. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  11947. * JavaScriptCore.xcodeproj/project.pbxproj:
  11948. Add the new files.
  11949. * wtf/Forward.h:
  11950. Forward declare PassOwnArrayPtr.
  11951. * wtf/OwnArrayPtr.h:
  11952. Mimic the OwnPtr interface.
  11953. * wtf/OwnArrayPtrCommon.h: Added.
  11954. (WTF::deleteOwnedArrayPtr):
  11955. Move delete function here so it can be shared by OwnArrayPtr and
  11956. PassOwnArrayPtr.
  11957. * wtf/PassOwnArrayPtr.h: Added.
  11958. Mimic the PassOwnPtr interface.
  11959. 2010-08-26 Oliver Hunt <oliver@apple.com>
  11960. Reviewed by Gavin Barraclough.
  11961. [JSC] JavaScript parsing error when loading Equifax web page
  11962. https://bugs.webkit.org/show_bug.cgi?id=42900
  11963. '-->' is ostensibly only meant to occur when there is only
  11964. whitespace preceeding it on the line. However firefox treats
  11965. multiline comments as a space character, so they are allowed.
  11966. One side effect of the firefox model is that any line terminators
  11967. inside the multiline comment are ignored, so
  11968. foo/*
  11969. */-->
  11970. is treated as
  11971. foo -->
  11972. and so '-->' will not be a comment in this case. Happily this simply
  11973. means that to fix this issue all we need to do is stop updating
  11974. m_atLineStart when handling multiline comments.
  11975. * parser/Lexer.cpp:
  11976. (JSC::Lexer::lex):
  11977. 2010-08-25 Oliver Hunt <oliver@apple.com>
  11978. Reviewed by Geoffrey Garen.
  11979. Improve overflow handling in StringImpl::Replace
  11980. https://bugs.webkit.org/show_bug.cgi?id=42502
  11981. <rdar://problem/8203794>
  11982. Harden StringImpl::replace against overflow -- I can't see how this
  11983. could be abused, but it's better to be safe than sorry.
  11984. * wtf/text/StringImpl.cpp:
  11985. (WTF::StringImpl::replace):
  11986. 2010-08-26 Martin Robinson <mrobinson@igalia.com>
  11987. Reviewed by Xan Lopez.
  11988. [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
  11989. https://bugs.webkit.org/show_bug.cgi?id=44624
  11990. Clean up GNUmakefile.am.
  11991. * GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move
  11992. a couple include lines from the top-level GNUmakefile.am.
  11993. 2010-08-25 Xan Lopez <xlopez@igalia.com>
  11994. Reviewed by Kent Tamura.
  11995. Local variables 'k' and 'y' in s2b() in dtoa.cpp are computed but not used
  11996. https://bugs.webkit.org/show_bug.cgi?id=29259
  11997. Remove unused code in dtoa.cpp, spotted by Wan-Teh Chang.
  11998. * wtf/dtoa.cpp:
  11999. (WTF::s2b):
  12000. 2010-08-25 Kwang Yul Seo <skyul@company100.net>
  12001. Reviewed by Kevin Ollivier.
  12002. [BREWMP] Add build system
  12003. https://bugs.webkit.org/show_bug.cgi?id=44645
  12004. Make waf script portable so that we can add more ports.
  12005. * wscript:
  12006. 2010-08-25 Michael Saboff <msaboff@apple.com>
  12007. Reviewed by Sam Weinig.
  12008. Remove the single entry regular expression cache introduced as part of
  12009. the fix for https://bugs.webkit.org/show_bug.cgi?id=41238.
  12010. The performance problem in Dromaeo that initiated that bug is no
  12011. longer present. Dromaeo has been modified so that the regular
  12012. expression tests are somewhat random and don't benefit from a
  12013. single entry cache.
  12014. * runtime/RegExp.cpp:
  12015. (JSC::RegExp::RegExp):
  12016. (JSC::RegExp::match):
  12017. * runtime/RegExp.h:
  12018. 2010-08-25 Martin Robinson <mrobinson@igalia.com>
  12019. Reviewed by Gustavo Noronha Silva.
  12020. Cairo and EFL port shouldn't depend on glib.
  12021. https://bugs.webkit.org/show_bug.cgi?id=44354
  12022. Replace GRefPtr with PlatformRefPtr. Keep GLib specific bits in
  12023. GRefPtr.h.
  12024. * GNUmakefile.am: Add PlatformRefPtr.h to the source list.
  12025. * wtf/PlatformRefPtr.h: Migrated from GRefPtr.h.
  12026. (WTF::PlatformRefPtr::PlatformRefPtr): Ditto.
  12027. (WTF::PlatformRefPtr::~PlatformRefPtr): Ditto.
  12028. (WTF::PlatformRefPtr::clear): Ditto.
  12029. (WTF::PlatformRefPtr::get): Ditto.
  12030. (WTF::PlatformRefPtr::operator*): Ditto.
  12031. (WTF::PlatformRefPtr::operator->): Ditto.
  12032. (WTF::PlatformRefPtr::operator!): Ditto.
  12033. (WTF::PlatformRefPtr::operator UnspecifiedBoolType): Ditto.
  12034. (WTF::PlatformRefPtr::hashTableDeletedValue): Ditto.
  12035. (WTF::::operator): Ditto.
  12036. (WTF::::swap): Ditto.
  12037. (WTF::swap): Ditto.
  12038. (WTF::operator==): Ditto.
  12039. (WTF::operator!=): Ditto.
  12040. (WTF::static_pointer_cast): Ditto.
  12041. (WTF::const_pointer_cast): Ditto.
  12042. (WTF::getPtr): Ditto.
  12043. (WTF::adoptPlatformRef): Ditto.
  12044. * wtf/gobject/GRefPtr.cpp: Changes to reflect new names.
  12045. (WTF::refPlatformPtr):
  12046. (WTF::derefPlatformPtr):
  12047. * wtf/gobject/GRefPtr.h: Ditto.
  12048. (WTF::refPlatformPtr):
  12049. (WTF::derefPlatformPtr):
  12050. 2010-08-25 Xan Lopez <xlopez@igalia.com>
  12051. Reviewed by Alexey Proskuryakov.
  12052. Remove dead code in JSGlobalObject
  12053. https://bugs.webkit.org/show_bug.cgi?id=44615
  12054. The recursion data member in the JSGlobalObject and its getter
  12055. plus inc/dec methods seems to be unused, remove them.
  12056. * runtime/JSGlobalObject.cpp:
  12057. (JSC::JSGlobalObject::init):
  12058. * runtime/JSGlobalObject.h:
  12059. 2010-08-25 Michael Saboff <msaboff@apple.com>
  12060. Reviewed by Geoffrey Garen.
  12061. Changed the initial and subsequent allocation of vector storage to
  12062. Array()s. The changes are to limit sparse arrays to 100000 entries
  12063. and fixed the sparse map to vector storage conversion to use the
  12064. minimum amount of memory needed to store the current number of entries.
  12065. These changes address https://bugs.webkit.org/show_bug.cgi?id=43707
  12066. * runtime/JSArray.cpp:
  12067. (JSC::JSArray::putSlowCase):
  12068. (JSC::JSArray::getNewVectorLength):
  12069. 2010-08-16 Gabor Loki <loki@webkit.org>
  12070. Reviewed by Gavin Barraclough.
  12071. Avoid increasing required alignment of target type warning
  12072. https://bugs.webkit.org/show_bug.cgi?id=43963
  12073. Fix platform independent alignment warnings.
  12074. * wtf/ListHashSet.h:
  12075. (WTF::ListHashSetNodeAllocator::pool):
  12076. 2010-08-19 Gabor Loki <loki@webkit.org>
  12077. Reviewed by Gavin Barraclough.
  12078. Enable truncated floating point feature on ARM
  12079. https://bugs.webkit.org/show_bug.cgi?id=44233
  12080. Enable truncated floating point feature with the help of VCVTR.S32.F64
  12081. instruction. If VCVTR.S32.F64 can't fit the result into a 32-bit
  12082. integer/register, it saturates at INT_MAX or INT_MIN. Testing this
  12083. looks quicker than testing FPSCR for exception.
  12084. Inspired by Jacob Bramley's patch from JaegerMonkey
  12085. * assembler/ARMAssembler.h:
  12086. (JSC::ARMAssembler::):
  12087. (JSC::ARMAssembler::cmn_r):
  12088. (JSC::ARMAssembler::vcvtr_s32_f64_r):
  12089. * assembler/MacroAssemblerARM.h:
  12090. (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
  12091. (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
  12092. 2010-08-24 Gavin Barraclough <barraclough@apple.com>
  12093. Windows build fix.
  12094. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  12095. 2010-08-24 Gavin Barraclough <barraclough@apple.com>
  12096. Windows build fix.
  12097. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  12098. * wtf/DecimalNumber.h:
  12099. (WTF::DecimalNumber::intPow10):
  12100. * wtf/dtoa.cpp:
  12101. * wtf/dtoa.h:
  12102. 2010-08-23 Gavin Barraclough <barraclough@apple.com>
  12103. Reviewed by Oliver Hunt.
  12104. https://bugs.webkit.org/show_bug.cgi?id=44487
  12105. Number.toExponential/toFixed/toPrecision all contain a spaghetti of duplicated
  12106. code & unnecessary complexity. Add a new DecimalNumber class to encapsulate
  12107. double to string conversion, share the implementations of rounding &
  12108. decimal-fraction/exponential formatting.
  12109. * JavaScriptCore.exp:
  12110. Update exports.
  12111. * runtime/NumberPrototype.cpp:
  12112. (JSC::toThisNumber):
  12113. (JSC::getIntegerArgumentInRange):
  12114. Helper methods used in implementing toExponential/toFixed/toString.
  12115. (JSC::numberProtoFuncToExponential):
  12116. (JSC::numberProtoFuncToFixed):
  12117. (JSC::numberProtoFuncToPrecision):
  12118. Reimplemented using new DecimalNumber class.
  12119. * runtime/UString.cpp:
  12120. (JSC::UString::number):
  12121. Updated to call numberToString.
  12122. * wtf/DecimalNumber.h: Added.
  12123. (WTF::):
  12124. (WTF::DecimalNumber::DecimalNumber):
  12125. (WTF::DecimalNumber::toStringDecimal):
  12126. (WTF::DecimalNumber::toStringExponential):
  12127. (WTF::DecimalNumber::sign):
  12128. (WTF::DecimalNumber::exponent):
  12129. (WTF::DecimalNumber::significand):
  12130. (WTF::DecimalNumber::precision):
  12131. (WTF::DecimalNumber::init):
  12132. (WTF::DecimalNumber::isZero):
  12133. (WTF::DecimalNumber::roundToPrecision):
  12134. New class to perform double to string conversion.
  12135. Has three constructors, which allow conversion with no rounding,
  12136. rounding to significant-figures, or rounding to decimal-places,
  12137. and two methods for formatting strings, either using decimal
  12138. fraction or exponential encoding. Internal implementation uses
  12139. pre-rounding of the values before calling dtoa rather than
  12140. relying on dtoa to correctly round, which does not produce
  12141. fully accurate results. Hopefully we can address this in the
  12142. near future.
  12143. * wtf/dtoa.cpp:
  12144. (WTF::intPow10):
  12145. * wtf/dtoa.h:
  12146. intPow10 is used internally by DecimalNumber.
  12147. * wtf/text/WTFString.cpp:
  12148. (WTF::copyToString):
  12149. (WTF::nanOrInfToString):
  12150. Used internally in numberToString for NaN/Infinity handling.
  12151. (WTF::numberToString):
  12152. Added new method to convert doubles to strings.
  12153. * wtf/text/WTFString.h:
  12154. Added declaration for numberToString. This is here because
  12155. we should switch over to using this for all double to string
  12156. conversion in WebCore (see section 2.4.4.3 of the HTML5 spec).
  12157. 2010-08-24 Oliver Hunt <oliver@apple.com>
  12158. Reviewed by Geoff Garen.
  12159. Don't seed the JS random number generator from time()
  12160. https://bugs.webkit.org/show_bug.cgi?id=41868
  12161. <rdar://problem/8171025>
  12162. Switch to using the secure random number generator to
  12163. seed the fast random generator, and make the generator
  12164. be per global object.
  12165. * runtime/JSGlobalData.cpp:
  12166. (JSC::JSGlobalData::JSGlobalData):
  12167. * runtime/JSGlobalData.h:
  12168. * runtime/JSGlobalObject.h:
  12169. (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
  12170. (JSC::JSGlobalObject::weakRandomNumber):
  12171. * runtime/MathObject.cpp:
  12172. (JSC::mathProtoFuncRandom):
  12173. 2010-08-24 Oliver Hunt <oliver@apple.com>
  12174. Reviewed by Beth Dakin.
  12175. Make overflow guards in UString::utf8 explicit
  12176. https://bugs.webkit.org/show_bug.cgi?id=44540
  12177. Add an explicit overflow check prior to allocating our buffer,
  12178. rather than implicitly relying on the guard in convertUTF16ToUTF8.
  12179. * runtime/UString.cpp:
  12180. (JSC::UString::utf8):
  12181. 2010-08-24 Yael Aharon <yael.aharon@nokia.com>
  12182. Reviewed by Simon Hausmann.
  12183. [Symbian] Fix commit/decommit of system memory using RChunk
  12184. Swap accidentially reversed start and m_base values for determining the
  12185. offset within the RChunk.
  12186. * wtf/PageReservation.h:
  12187. (WTF::PageReservation::systemCommit):
  12188. (WTF::PageReservation::systemDecommit):
  12189. 2010-08-23 Patrick Gansterer <paroga@paroga.com>
  12190. Rubber-stamped by Gabor Loki.
  12191. [WINCE] Buildfix for GeneratedJITStubs after r64818
  12192. https://bugs.webkit.org/show_bug.cgi?id=44469
  12193. Use " THUNK_RETURN_ADDRESS_OFFSET" instead of "#offset#".
  12194. * jit/JITStubs.cpp:
  12195. 2010-08-23 Oliver Hunt <oliver@apple.com>
  12196. Reviewed by Darin Adler.
  12197. [REGRESSION] Interpreter incorrectly excludes prototype chain when validating put_by_id_transition
  12198. https://bugs.webkit.org/show_bug.cgi?id=44240
  12199. <rdar://problem/8328995>
  12200. Fix an error I introduced when cleaning up the interpreter side of the logic
  12201. to prevent setters being called in object initialisers.
  12202. * interpreter/Interpreter.cpp:
  12203. (JSC::Interpreter::privateExecute):
  12204. 2010-08-23 Michael Saboff <msaboff@apple.com>
  12205. Reviewed by Oliver Hunt.
  12206. Fixed case where a single character search string in a string.replace()
  12207. did not properly handle back reference replacement. The fix is to
  12208. check for a '$' as part of the check to see if we can execute the
  12209. single character replace optimization.
  12210. https://bugs.webkit.org/show_bug.cgi?id=44067
  12211. * runtime/StringPrototype.cpp:
  12212. (JSC::stringProtoFuncReplace):
  12213. 2010-08-23 Oliver Hunt <oliver@apple.com>
  12214. Reviewed by Gavin Barraclough.
  12215. JSON.stringify is much slower than Firefox on particular pathological input
  12216. https://bugs.webkit.org/show_bug.cgi?id=44456
  12217. Make StringBuilder::reserveCapacity reserve additional space so we don't end up
  12218. repeatedly copying the entire result string.
  12219. * runtime/StringBuilder.h:
  12220. (JSC::StringBuilder::append):
  12221. (JSC::StringBuilder::reserveCapacity):
  12222. 2010-08-23 Jian Li <jianli@chromium.org>
  12223. Reviewed by Darin Fisher.
  12224. Handle blob resource.
  12225. https://bugs.webkit.org/show_bug.cgi?id=43941
  12226. * JavaScriptCore.exp: Add an export that is neede by BlobResourceHandle.
  12227. 2010-08-19 Andreas Kling <andreas.kling@nokia.com>
  12228. Reviewed by Geoffrey Garen.
  12229. JSC: Move the static_cast into to(U)Int32 fast case
  12230. https://bugs.webkit.org/show_bug.cgi?id=44037
  12231. Do the static_cast<(u)int32_t> inline to avoid the function call overhead
  12232. for easily converted values (within (u)int32_t range.)
  12233. * runtime/JSValue.cpp:
  12234. (JSC::toInt32SlowCase):
  12235. (JSC::toUInt32SlowCase):
  12236. * runtime/JSValue.h:
  12237. (JSC::JSValue::toInt32):
  12238. (JSC::JSValue::toUInt32):
  12239. 2010-08-18 Andreas Kling <andreas.kling@nokia.com>
  12240. Reviewed by Geoffrey Garen.
  12241. REGRESSION(r58469): Math.pow() always returns double-backed JSValue which is extremely slow as array subscript
  12242. https://bugs.webkit.org/show_bug.cgi?id=43742
  12243. Add codegen for pow() to return Int32 values when possible.
  12244. * jit/ThunkGenerators.cpp:
  12245. (JSC::powThunkGenerator):
  12246. 2010-08-18 Gabor Loki <loki@webkit.org>
  12247. Reviewed by Gavin Barraclough.
  12248. The JITStackFrame is wrong using Thumb-2 JIT with JSVALUE32_64
  12249. https://bugs.webkit.org/show_bug.cgi?id=43897
  12250. A 64 bits wide member in a structure is aligned to 8 bytes on ARM by
  12251. default, but this is not taken into account in the offset defines of
  12252. JITStackFrame.
  12253. * jit/JITStubs.cpp:
  12254. * jit/JITStubs.h:
  12255. 2010-08-18 Gavin Barraclough <barraclough@apple.com>
  12256. Rubber stamped by Sam Weinig.
  12257. Rename UString::substr to substringSharingImpl, add to WTF::String.
  12258. Now WTF::String can do everything that JSC::UString can do!
  12259. * JavaScriptCore.exp:
  12260. * bytecode/CodeBlock.cpp:
  12261. (JSC::escapeQuotes):
  12262. * bytecompiler/NodesCodegen.cpp:
  12263. (JSC::substitute):
  12264. * parser/SourceProvider.h:
  12265. (JSC::UStringSourceProvider::getRange):
  12266. * runtime/FunctionPrototype.cpp:
  12267. (JSC::insertSemicolonIfNeeded):
  12268. * runtime/JSGlobalObjectFunctions.cpp:
  12269. (JSC::parseInt):
  12270. * runtime/JSONObject.cpp:
  12271. (JSC::gap):
  12272. (JSC::Stringifier::indent):
  12273. (JSC::Stringifier::unindent):
  12274. * runtime/JSString.cpp:
  12275. (JSC::JSString::replaceCharacter):
  12276. * runtime/NumberPrototype.cpp:
  12277. (JSC::numberProtoFuncToFixed):
  12278. (JSC::numberProtoFuncToPrecision):
  12279. * runtime/StringPrototype.cpp:
  12280. (JSC::stringProtoFuncReplace):
  12281. (JSC::trimString):
  12282. * runtime/UString.cpp:
  12283. (JSC::UString::substringSharingImpl):
  12284. * runtime/UString.h:
  12285. * wtf/text/WTFString.cpp:
  12286. (WTF::String::substringSharingImpl):
  12287. * wtf/text/WTFString.h:
  12288. 2010-08-18 Gavin Barraclough <barraclough@apple.com>
  12289. Windows build fix.
  12290. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  12291. * JavaScriptCore.xcodeproj/project.pbxproj:
  12292. 2010-08-18 Gavin Barraclough <barraclough@apple.com>
  12293. Windows build fix.
  12294. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  12295. * JavaScriptCore.xcodeproj/project.pbxproj:
  12296. 2010-08-17 Gavin Barraclough <barraclough@apple.com>
  12297. Reviewed by Sam Weinig.
  12298. Bug 44146 - Remove toDouble/toUInt32 methods from UString.
  12299. These methods all implement JavaScript language specific behaviour, and as such
  12300. are not suited to being on a generic string object. They are also inefficient
  12301. and incorrectly used, refactor & cleanup. Uses of these methods really divide
  12302. out into two cases.
  12303. ToNumber:
  12304. Uses of toDouble from JSString and from parseFloat are implementing ecma's
  12305. ToNumber conversion from strings (see ecma-262 9.3.1), so UString::toDouble
  12306. should largely just be moved out to a global jsToNumber function. ToNumber is
  12307. capable of recognizing either decimal or hexadecimal numbers, but parseFloat
  12308. should only recognize decimal values. This is currently handled by testing for
  12309. hexadecimal before calling toDouble, which should unnecessary - instead we can
  12310. just split out the two parts to the grammar into separate functions. Also,
  12311. strtod recognizes a set of literals (nan, inf, and infinity - all with any
  12312. capitalization) - which are not defined by any of the specs we are implementing.
  12313. To handle this we need to perform additional work in toDouble to convert the
  12314. unsupported cases of infinities back to NaNs. Instead we should simply remove
  12315. support for this literals from strtod. This should provide a more desirable
  12316. behaviour for all clients of strtod.
  12317. Indexed properties:
  12318. Uses of the toStrictUInt32 methods are were all converting property names to
  12319. indices, and all uses of toUInt32 were incorrect; in all cases we should have
  12320. been calling toUInt32. This error results in some incorrect behaviour in the
  12321. DOM (accessing property "0 " of a NodeList should fail; it currently does not).
  12322. Move this method onto Identifier (our canonical property name), and make it
  12323. always perform a strict conversion. Add a layout test to check NodeList does
  12324. convert indexed property names correctly.
  12325. * JavaScriptCore.exp:
  12326. * runtime/Arguments.cpp:
  12327. (JSC::Arguments::getOwnPropertySlot):
  12328. (JSC::Arguments::getOwnPropertyDescriptor):
  12329. (JSC::Arguments::put):
  12330. (JSC::Arguments::deleteProperty):
  12331. * runtime/Identifier.cpp:
  12332. (JSC::Identifier::toUInt32):
  12333. * runtime/Identifier.h:
  12334. (JSC::Identifier::toUInt32):
  12335. * runtime/JSArray.cpp:
  12336. (JSC::JSArray::getOwnPropertySlot):
  12337. (JSC::JSArray::getOwnPropertyDescriptor):
  12338. (JSC::JSArray::put):
  12339. (JSC::JSArray::deleteProperty):
  12340. * runtime/JSArray.h:
  12341. (JSC::Identifier::toArrayIndex):
  12342. * runtime/JSByteArray.cpp:
  12343. (JSC::JSByteArray::getOwnPropertySlot):
  12344. (JSC::JSByteArray::getOwnPropertyDescriptor):
  12345. (JSC::JSByteArray::put):
  12346. * runtime/JSGlobalObjectFunctions.cpp:
  12347. (JSC::isInfinity):
  12348. (JSC::jsHexIntegerLiteral):
  12349. (JSC::jsStrDecimalLiteral):
  12350. (JSC::jsToNumber):
  12351. (JSC::parseFloat):
  12352. * runtime/JSGlobalObjectFunctions.h:
  12353. * runtime/JSString.cpp:
  12354. (JSC::JSString::getPrimitiveNumber):
  12355. (JSC::JSString::toNumber):
  12356. (JSC::JSString::getStringPropertyDescriptor):
  12357. * runtime/JSString.h:
  12358. (JSC::JSString::getStringPropertySlot):
  12359. * runtime/ObjectPrototype.cpp:
  12360. (JSC::ObjectPrototype::put):
  12361. * runtime/StringObject.cpp:
  12362. (JSC::StringObject::deleteProperty):
  12363. * runtime/UString.cpp:
  12364. * runtime/UString.h:
  12365. * wtf/dtoa.cpp:
  12366. (WTF::strtod):
  12367. 2010-08-17 Gavin Barraclough <barraclough@apple.com>
  12368. Reviewed by Sam Weinig.
  12369. Bug 44099 - REGRESSION(r65468): Crashes in StringImpl::find
  12370. Bug 44080 introuduced a couple of cases in which array bounds could be overrun.
  12371. One of these was fixed in r65493, this patch fixes the other and address the
  12372. concerns voiced in comment #6 by restructuring the loops to remove the code
  12373. dupliction without introducing an additional if check.
  12374. * wtf/text/StringImpl.cpp:
  12375. (WTF::StringImpl::find):
  12376. (WTF::StringImpl::findIgnoringCase):
  12377. (WTF::StringImpl::reverseFind):
  12378. (WTF::StringImpl::reverseFindIgnoringCase):
  12379. 2010-08-17 No'am Rosenthal <noam.rosenthal@nokia.com>
  12380. Reviewed by Ariya Hidayat.
  12381. [Qt] Move the accelerated compositing build flag to the right place
  12382. https://bugs.webkit.org/show_bug.cgi?id=43882
  12383. * wtf/Platform.h:
  12384. 2010-08-17 Yuta Kitamura <yutak@chromium.org>
  12385. Reviewed by Shinichiro Hamaji.
  12386. Avoid uninitialized memory read in StringImpl::find().
  12387. REGRESSION(r65468): Crashes in StringImpl::find
  12388. https://bugs.webkit.org/show_bug.cgi?id=44099
  12389. * wtf/text/StringImpl.cpp:
  12390. (WTF::StringImpl::find):
  12391. 2010-08-16 Gavin Barraclough <barraclough@apple.com>
  12392. Rubber stamped by Sam Weinig
  12393. Add VectorTraits to String & DefaultHash traits to UString to unify behaviour.
  12394. * runtime/UString.h:
  12395. (JSC::UStringHash::hash):
  12396. (JSC::UStringHash::equal):
  12397. (WTF::):
  12398. * wtf/text/WTFString.h:
  12399. (WTF::):
  12400. 2010-08-16 Gavin Barraclough <barraclough@apple.com>
  12401. Rubber stamped by Sam Weinig
  12402. Remove unnecessary includes from UString.h, add new includes as necessary.
  12403. * profiler/CallIdentifier.h:
  12404. * profiler/ProfileNode.h:
  12405. * runtime/DateConversion.cpp:
  12406. * runtime/Identifier.h:
  12407. (JSC::IdentifierRepHash::hash):
  12408. * runtime/RegExpCache.h:
  12409. * runtime/RegExpKey.h:
  12410. * runtime/UString.cpp:
  12411. (JSC::UString::substr):
  12412. * runtime/UString.h:
  12413. * wtf/text/WTFString.h:
  12414. 2010-08-16 Gavin Barraclough <barraclough@apple.com>
  12415. Reviewed by Sam Weinig
  12416. Bug 44080 - String find/reverseFind methods need tidying up
  12417. These methods have a couple of problems with their interface, and implementation.
  12418. These methods take and int index, and return an int - however this is problematic
  12419. since on 64-bit string indices may have a full 32-bit range. This spills out into
  12420. surrounding code, which unsafely casts string indices from unsigned to int. Code
  12421. checking the result of these methods check for a mix of "== -1", "< 0", and
  12422. "== notFound". Clean this up by changing these methods to take an unsigned
  12423. starting index, and return a size_t. with a failed match indicated by notFound.
  12424. reverseFind also has a special meaning for the starting index argument, in that a
  12425. negative index is interpreted as an offset back from the end of the string. Remove
  12426. this functionality, in the (1!) case where it is used we should just calculate the
  12427. offset by subtracting from the string's length.
  12428. The implementation has a few problems too. The code is not in webkit style, in
  12429. using assorted abbreviations in variable names, and implementations of similar
  12430. find methods with differing argument types were unnecessarily inconsistent. When
  12431. find is passed const char* data the string would be handled as latin1 (zero
  12432. extended to UTF-16) for all characters but the first; this is sign extended.
  12433. Case-insensitive find is broken for unicode strings; the hashing optimization is
  12434. not unicode safe, and could result in false negatives.
  12435. Unify UString find methods to match String.
  12436. * JavaScriptCore.exp:
  12437. * bytecode/CodeBlock.cpp:
  12438. (JSC::escapeQuotes):
  12439. * bytecompiler/NodesCodegen.cpp:
  12440. (JSC::substitute):
  12441. * runtime/JSString.cpp:
  12442. (JSC::JSString::replaceCharacter):
  12443. * runtime/RegExp.cpp:
  12444. (JSC::RegExp::RegExp):
  12445. * runtime/RegExpKey.h:
  12446. (JSC::RegExpKey::getFlagsValue):
  12447. * runtime/StringPrototype.cpp:
  12448. (JSC::substituteBackreferencesSlow):
  12449. (JSC::substituteBackreferences):
  12450. (JSC::stringProtoFuncReplace):
  12451. (JSC::stringProtoFuncIndexOf):
  12452. (JSC::stringProtoFuncLastIndexOf):
  12453. (JSC::stringProtoFuncSplit):
  12454. * runtime/UString.cpp:
  12455. * runtime/UString.h:
  12456. (JSC::UString::find):
  12457. (JSC::UString::reverseFind):
  12458. * wtf/text/AtomicString.h:
  12459. (WTF::AtomicString::find):
  12460. * wtf/text/StringImpl.cpp:
  12461. (WTF::StringImpl::find):
  12462. (WTF::StringImpl::findCaseInsensitive):
  12463. (WTF::StringImpl::reverseFind):
  12464. (WTF::StringImpl::reverseFindCaseInsensitive):
  12465. (WTF::StringImpl::endsWith):
  12466. (WTF::StringImpl::replace):
  12467. * wtf/text/StringImpl.h:
  12468. (WTF::StringImpl::startsWith):
  12469. * wtf/text/WTFString.cpp:
  12470. (WTF::String::split):
  12471. * wtf/text/WTFString.h:
  12472. (WTF::String::find):
  12473. (WTF::String::reverseFind):
  12474. (WTF::String::findCaseInsensitive):
  12475. (WTF::String::reverseFindCaseInsensitive):
  12476. (WTF::String::contains):
  12477. (WTF::find):
  12478. (WTF::reverseFind):
  12479. 2010-08-16 Kevin Ollivier <kevino@theolliviers.com>
  12480. [wx] Build fix, do not build WebCore as a convenience library as this leads to
  12481. errors in the Win build w/export symbols and causes problems with DOM bindings
  12482. debugging in gdb.
  12483. * wscript:
  12484. 2010-08-16 Leandro Pereira <leandro@profusion.mobi>
  12485. [EFL] Build fix after r65366.
  12486. * CMakeLists.txt: Use if (VAR) instead of if (${VAR}) to check if
  12487. they're empty.
  12488. * jsc/CMakeLists.txt: Ditto.
  12489. * wtf/CMakeLists.txt: Ditto.
  12490. 2010-08-15 Kevin Ollivier <kevino@theolliviers.com>
  12491. [wx] Build fix, don't build intermediate source in DerivedSources dir.
  12492. * wscript:
  12493. 2010-08-14 Patrick Gansterer <paroga@paroga.com>
  12494. Reviewed by Kenneth Rohde Christiansen.
  12495. [CMake] Add preprocessor detection for generator scripts
  12496. https://bugs.webkit.org/show_bug.cgi?id=43984
  12497. * CMakeLists.txt:
  12498. 2010-08-14 Patrick Gansterer <paroga@paroga.com>
  12499. Reviewed by Kenneth Rohde Christiansen.
  12500. [CMake] Set target properties only if available
  12501. https://bugs.webkit.org/show_bug.cgi?id=43978
  12502. * CMakeLists.txt:
  12503. * jsc/CMakeLists.txt:
  12504. * wtf/CMakeLists.txt:
  12505. 2010-08-13 Kevin Ollivier <kevino@theolliviers.com>
  12506. [wx] Build fix, add CString to the list of forwards.
  12507. * wtf/Forward.h:
  12508. 2010-08-13 Gavin Barraclough <barraclough@apple.com>
  12509. Windows build fix
  12510. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  12511. 2010-08-13 Gavin Barraclough <barraclough@apple.com>
  12512. Windows build fix
  12513. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  12514. 2010-08-13 Gavin Barraclough <barraclough@apple.com>
  12515. Windows build fix
  12516. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  12517. 2010-08-13 Gavin Barraclough <barraclough@apple.com>
  12518. Rubber stamped by Sam Weinig.
  12519. Switch String::/UString::ascii() to return a CString.
  12520. * JavaScriptCore.exp:
  12521. * JavaScriptCore.xcodeproj/project.pbxproj:
  12522. * bytecode/CodeBlock.cpp:
  12523. (JSC::CodeBlock::dump):
  12524. * bytecode/SamplingTool.cpp:
  12525. (JSC::SamplingTool::dump):
  12526. * interpreter/CallFrame.cpp:
  12527. (JSC::CallFrame::dumpCaller):
  12528. * jsc.cpp:
  12529. (runWithScripts):
  12530. (runInteractive):
  12531. * runtime/Identifier.h:
  12532. (JSC::Identifier::ascii):
  12533. * runtime/ScopeChain.cpp:
  12534. (JSC::ScopeChainNode::print):
  12535. * runtime/UString.cpp:
  12536. (JSC::UString::ascii):
  12537. (JSC::UString::latin1):
  12538. * runtime/UString.h:
  12539. * wtf/text/StringImpl.cpp:
  12540. (WTF::StringImpl::asciiOLD):
  12541. * wtf/text/StringImpl.h:
  12542. * wtf/text/WTFString.cpp:
  12543. (WTF::String::ascii):
  12544. (WTF::String::latin1):
  12545. * wtf/text/WTFString.h:
  12546. 2010-08-13 Gabor Loki <loki@webkit.org>
  12547. Reviewed by Gavin Barraclough.
  12548. Avoid increasing required alignment of target type warning on ARM
  12549. https://bugs.webkit.org/show_bug.cgi?id=38045
  12550. The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
  12551. sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
  12552. increases required alignment of target type warnings.
  12553. Casting the type of [pointer to Type2] object to void* bypasses the
  12554. warning.
  12555. * assembler/ARMAssembler.cpp:
  12556. (JSC::ARMAssembler::executableCopy):
  12557. * assembler/AssemblerBuffer.h:
  12558. (JSC::AssemblerBuffer::putShortUnchecked):
  12559. (JSC::AssemblerBuffer::putIntUnchecked):
  12560. (JSC::AssemblerBuffer::putInt64Unchecked):
  12561. * interpreter/RegisterFile.h:
  12562. (JSC::RegisterFile::RegisterFile):
  12563. (JSC::RegisterFile::grow):
  12564. * jit/JITStubs.cpp:
  12565. * pcre/pcre_compile.cpp:
  12566. (jsRegExpCompile):
  12567. * runtime/JSArray.cpp:
  12568. (JSC::JSArray::putSlowCase):
  12569. (JSC::JSArray::increaseVectorLength):
  12570. (JSC::JSArray::increaseVectorPrefixLength):
  12571. (JSC::JSArray::shiftCount):
  12572. (JSC::JSArray::unshiftCount):
  12573. * wtf/FastMalloc.cpp:
  12574. (WTF::PageHeapAllocator::New):
  12575. (WTF::TCMalloc_Central_FreeList::Populate):
  12576. * wtf/MD5.cpp:
  12577. (WTF::reverseBytes):
  12578. (WTF::MD5::addBytes):
  12579. (WTF::MD5::checksum):
  12580. * wtf/StdLibExtras.h:
  12581. (isPointerTypeAlignmentOkay):
  12582. (reinterpret_cast_ptr):
  12583. * wtf/Vector.h:
  12584. (WTF::VectorBuffer::inlineBuffer):
  12585. * wtf/qt/StringQt.cpp:
  12586. (WTF::String::String):
  12587. 2010-08-13 Gavin Barraclough <barraclough@apple.com>
  12588. Reviewed by Sam Weinig
  12589. Unify UString::UTF8String() & String::utf8() methods,
  12590. remove UString::cost() & make atArrayIndex a free function.
  12591. * JavaScriptCore.exp:
  12592. * bytecode/CodeBlock.cpp:
  12593. (JSC::constantName):
  12594. (JSC::idName):
  12595. (JSC::CodeBlock::registerName):
  12596. (JSC::regexpName):
  12597. (JSC::printGlobalResolveInfo):
  12598. (JSC::printStructureStubInfo):
  12599. (JSC::CodeBlock::printStructure):
  12600. (JSC::CodeBlock::printStructures):
  12601. * jsc.cpp:
  12602. (functionPrint):
  12603. (functionDebug):
  12604. (runInteractive):
  12605. (fillBufferWithContentsOfFile):
  12606. * pcre/pcre_exec.cpp:
  12607. (Histogram::~Histogram):
  12608. * profiler/CallIdentifier.h:
  12609. (JSC::CallIdentifier::c_str):
  12610. * profiler/Profile.cpp:
  12611. (JSC::Profile::debugPrintDataSampleStyle):
  12612. * profiler/ProfileGenerator.cpp:
  12613. (JSC::ProfileGenerator::willExecute):
  12614. (JSC::ProfileGenerator::didExecute):
  12615. * profiler/ProfileNode.cpp:
  12616. (JSC::ProfileNode::debugPrintData):
  12617. (JSC::ProfileNode::debugPrintDataSampleStyle):
  12618. * runtime/Arguments.cpp:
  12619. (JSC::Arguments::getOwnPropertySlot):
  12620. (JSC::Arguments::getOwnPropertyDescriptor):
  12621. (JSC::Arguments::put):
  12622. (JSC::Arguments::deleteProperty):
  12623. * runtime/DateConversion.cpp:
  12624. (JSC::parseDate):
  12625. * runtime/Identifier.h:
  12626. (JSC::Identifier::toStrictUInt32):
  12627. * runtime/JSArray.cpp:
  12628. (JSC::JSArray::getOwnPropertySlot):
  12629. (JSC::JSArray::getOwnPropertyDescriptor):
  12630. (JSC::JSArray::put):
  12631. (JSC::JSArray::deleteProperty):
  12632. * runtime/JSArray.h:
  12633. (JSC::toArrayIndex):
  12634. * runtime/JSGlobalObjectFunctions.cpp:
  12635. (JSC::encode):
  12636. (JSC::parseInt):
  12637. (JSC::globalFuncJSCPrint):
  12638. * runtime/JSString.h:
  12639. (JSC::RopeBuilder::JSString):
  12640. * runtime/UString.cpp:
  12641. (JSC::UString::toDouble):
  12642. (JSC::putUTF8Triple):
  12643. (JSC::UString::utf8):
  12644. * runtime/UString.h:
  12645. (JSC::UString::~UString):
  12646. (JSC::UString::isNull):
  12647. (JSC::UString::isEmpty):
  12648. (JSC::UString::impl):
  12649. * wtf/text/WTFString.cpp:
  12650. (WTF::String::utf8):
  12651. * wtf/text/WTFString.h:
  12652. (WTF::String::~String):
  12653. (WTF::String::swap):
  12654. (WTF::String::isNull):
  12655. (WTF::String::isEmpty):
  12656. (WTF::String::impl):
  12657. (WTF::String::length):
  12658. (WTF::String::String):
  12659. (WTF::String::isHashTableDeletedValue):
  12660. 2010-08-12 Zoltan Herczeg <zherczeg@webkit.org>
  12661. Reviewed by Gavin Barraclough.
  12662. Refactoring the fpu code generator for the ARM port
  12663. https://bugs.webkit.org/show_bug.cgi?id=43842
  12664. Support up to 32 double precision registers, and the
  12665. recent VFP instruction formats. This patch is mainly
  12666. a style change which keeps the current functionality.
  12667. * assembler/ARMAssembler.h:
  12668. (JSC::ARMRegisters::):
  12669. (JSC::ARMAssembler::):
  12670. (JSC::ARMAssembler::emitInst):
  12671. (JSC::ARMAssembler::emitDoublePrecisionInst):
  12672. (JSC::ARMAssembler::emitSinglePrecisionInst):
  12673. (JSC::ARMAssembler::vadd_f64_r):
  12674. (JSC::ARMAssembler::vdiv_f64_r):
  12675. (JSC::ARMAssembler::vsub_f64_r):
  12676. (JSC::ARMAssembler::vmul_f64_r):
  12677. (JSC::ARMAssembler::vcmp_f64_r):
  12678. (JSC::ARMAssembler::vsqrt_f64_r):
  12679. (JSC::ARMAssembler::vmov_vfp_r):
  12680. (JSC::ARMAssembler::vmov_arm_r):
  12681. (JSC::ARMAssembler::vcvt_f64_s32_r):
  12682. (JSC::ARMAssembler::vcvt_s32_f64_r):
  12683. (JSC::ARMAssembler::vmrs_apsr):
  12684. * assembler/MacroAssemblerARM.h:
  12685. (JSC::MacroAssemblerARM::addDouble):
  12686. (JSC::MacroAssemblerARM::divDouble):
  12687. (JSC::MacroAssemblerARM::subDouble):
  12688. (JSC::MacroAssemblerARM::mulDouble):
  12689. (JSC::MacroAssemblerARM::sqrtDouble):
  12690. (JSC::MacroAssemblerARM::convertInt32ToDouble):
  12691. (JSC::MacroAssemblerARM::branchDouble):
  12692. (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
  12693. 2010-08-12 Sheriff Bot <webkit.review.bot@gmail.com>
  12694. Unreviewed, rolling out r65295.
  12695. http://trac.webkit.org/changeset/65295
  12696. https://bugs.webkit.org/show_bug.cgi?id=43950
  12697. It broke 4 sputnik tests (Requested by Ossy on #webkit).
  12698. * JavaScriptCore.exp:
  12699. * bytecode/CodeBlock.cpp:
  12700. (JSC::constantName):
  12701. (JSC::idName):
  12702. (JSC::CodeBlock::registerName):
  12703. (JSC::regexpName):
  12704. (JSC::printGlobalResolveInfo):
  12705. (JSC::printStructureStubInfo):
  12706. (JSC::CodeBlock::printStructure):
  12707. (JSC::CodeBlock::printStructures):
  12708. * jsc.cpp:
  12709. (functionPrint):
  12710. (functionDebug):
  12711. (runInteractive):
  12712. (fillBufferWithContentsOfFile):
  12713. * pcre/pcre_exec.cpp:
  12714. (Histogram::~Histogram):
  12715. * profiler/CallIdentifier.h:
  12716. (JSC::CallIdentifier::c_str):
  12717. * profiler/Profile.cpp:
  12718. (JSC::Profile::debugPrintDataSampleStyle):
  12719. * profiler/ProfileGenerator.cpp:
  12720. (JSC::ProfileGenerator::willExecute):
  12721. (JSC::ProfileGenerator::didExecute):
  12722. * profiler/ProfileNode.cpp:
  12723. (JSC::ProfileNode::debugPrintData):
  12724. (JSC::ProfileNode::debugPrintDataSampleStyle):
  12725. * runtime/Arguments.cpp:
  12726. (JSC::Arguments::getOwnPropertySlot):
  12727. (JSC::Arguments::getOwnPropertyDescriptor):
  12728. (JSC::Arguments::put):
  12729. (JSC::Arguments::deleteProperty):
  12730. * runtime/DateConversion.cpp:
  12731. (JSC::parseDate):
  12732. * runtime/Identifier.h:
  12733. (JSC::Identifier::Identifier):
  12734. (JSC::Identifier::toArrayIndex):
  12735. * runtime/JSArray.cpp:
  12736. (JSC::JSArray::getOwnPropertySlot):
  12737. (JSC::JSArray::getOwnPropertyDescriptor):
  12738. (JSC::JSArray::put):
  12739. (JSC::JSArray::deleteProperty):
  12740. * runtime/JSArray.h:
  12741. * runtime/JSGlobalObjectFunctions.cpp:
  12742. (JSC::encode):
  12743. (JSC::parseInt):
  12744. (JSC::globalFuncJSCPrint):
  12745. * runtime/JSString.h:
  12746. (JSC::RopeBuilder::JSString):
  12747. * runtime/UString.cpp:
  12748. (JSC::UString::toDouble):
  12749. (JSC::UString::UTF8String):
  12750. * runtime/UString.h:
  12751. (JSC::UString::isNull):
  12752. (JSC::UString::isEmpty):
  12753. (JSC::UString::impl):
  12754. (JSC::UString::cost):
  12755. (JSC::UString::~UString):
  12756. (JSC::UString::toArrayIndex):
  12757. * wtf/text/WTFString.cpp:
  12758. (WTF::String::utf8):
  12759. * wtf/text/WTFString.h:
  12760. (WTF::String::String):
  12761. (WTF::String::isHashTableDeletedValue):
  12762. (WTF::String::length):
  12763. (WTF::String::operator[]):
  12764. (WTF::String::isNull):
  12765. (WTF::String::isEmpty):
  12766. (WTF::String::impl):
  12767. 2010-08-12 Gavin Barraclough <barraclough@apple.com>
  12768. Windows build fix.
  12769. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  12770. 2010-08-12 Gavin Barraclough <barraclough@apple.com>
  12771. Reviewed by Sam Weinig
  12772. Unify UString::UTF8String() & String::utf8() methods,
  12773. remove UString::cost() & make atArrayIndex a free function.
  12774. * JavaScriptCore.exp:
  12775. * bytecode/CodeBlock.cpp:
  12776. (JSC::constantName):
  12777. (JSC::idName):
  12778. (JSC::CodeBlock::registerName):
  12779. (JSC::regexpName):
  12780. (JSC::printGlobalResolveInfo):
  12781. (JSC::printStructureStubInfo):
  12782. (JSC::CodeBlock::printStructure):
  12783. (JSC::CodeBlock::printStructures):
  12784. * jsc.cpp:
  12785. (functionPrint):
  12786. (functionDebug):
  12787. (runInteractive):
  12788. (fillBufferWithContentsOfFile):
  12789. * pcre/pcre_exec.cpp:
  12790. (Histogram::~Histogram):
  12791. * profiler/CallIdentifier.h:
  12792. (JSC::CallIdentifier::c_str):
  12793. * profiler/Profile.cpp:
  12794. (JSC::Profile::debugPrintDataSampleStyle):
  12795. * profiler/ProfileGenerator.cpp:
  12796. (JSC::ProfileGenerator::willExecute):
  12797. (JSC::ProfileGenerator::didExecute):
  12798. * profiler/ProfileNode.cpp:
  12799. (JSC::ProfileNode::debugPrintData):
  12800. (JSC::ProfileNode::debugPrintDataSampleStyle):
  12801. * runtime/Arguments.cpp:
  12802. (JSC::Arguments::getOwnPropertySlot):
  12803. (JSC::Arguments::getOwnPropertyDescriptor):
  12804. (JSC::Arguments::put):
  12805. (JSC::Arguments::deleteProperty):
  12806. * runtime/DateConversion.cpp:
  12807. (JSC::parseDate):
  12808. * runtime/Identifier.h:
  12809. (JSC::Identifier::toStrictUInt32):
  12810. * runtime/JSArray.cpp:
  12811. (JSC::JSArray::getOwnPropertySlot):
  12812. (JSC::JSArray::getOwnPropertyDescriptor):
  12813. (JSC::JSArray::put):
  12814. (JSC::JSArray::deleteProperty):
  12815. * runtime/JSArray.h:
  12816. (JSC::toArrayIndex):
  12817. * runtime/JSGlobalObjectFunctions.cpp:
  12818. (JSC::encode):
  12819. (JSC::parseInt):
  12820. (JSC::globalFuncJSCPrint):
  12821. * runtime/JSString.h:
  12822. (JSC::RopeBuilder::JSString):
  12823. * runtime/UString.cpp:
  12824. (JSC::UString::toDouble):
  12825. (JSC::putUTF8Triple):
  12826. (JSC::UString::utf8):
  12827. * runtime/UString.h:
  12828. (JSC::UString::~UString):
  12829. (JSC::UString::isNull):
  12830. (JSC::UString::isEmpty):
  12831. (JSC::UString::impl):
  12832. * wtf/text/WTFString.cpp:
  12833. (WTF::String::utf8):
  12834. * wtf/text/WTFString.h:
  12835. (WTF::String::~String):
  12836. (WTF::String::swap):
  12837. (WTF::String::isNull):
  12838. (WTF::String::isEmpty):
  12839. (WTF::String::impl):
  12840. (WTF::String::length):
  12841. (WTF::String::String):
  12842. (WTF::String::isHashTableDeletedValue):
  12843. 2010-08-12 Gavin Barraclough <barraclough@apple.com>
  12844. Eeerk! - revert accidentally committed changes in UString!
  12845. * JavaScriptCore.exp:
  12846. * runtime/UString.cpp:
  12847. (JSC::UString::UString):
  12848. * runtime/UString.h:
  12849. 2010-08-12 Gavin Barraclough <barraclough@apple.com>
  12850. Reviewed by Sam Weinig
  12851. Change UString constructors to match those in WTF::String.
  12852. This changes behaviour of UString((char*)0) to create null
  12853. strings, akin to UString() rather than UString::empty().
  12854. (This matches String). Remove unused constructors from
  12855. UString, and add null-terminated UTF-16 constructor, to
  12856. match String. Move String's constructor into the .cpp to
  12857. match UString.
  12858. * JavaScriptCore.exp:
  12859. * debugger/DebuggerCallFrame.cpp:
  12860. (JSC::DebuggerCallFrame::calculatedFunctionName):
  12861. * runtime/RegExpKey.h:
  12862. (JSC::RegExpKey::RegExpKey):
  12863. * runtime/SmallStrings.cpp:
  12864. (JSC::SmallStrings::createSingleCharacterString):
  12865. * runtime/UString.cpp:
  12866. (JSC::UString::UString):
  12867. * runtime/UString.h:
  12868. (JSC::UString::UString):
  12869. (JSC::UString::swap):
  12870. (JSC::UString::adopt):
  12871. (JSC::UString::operator[]):
  12872. * wtf/text/WTFString.h:
  12873. (WTF::String::String):
  12874. (WTF::String::adopt):
  12875. (WTF::String::operator[]):
  12876. 2010-08-12 David Levin <levin@chromium.org>
  12877. Reviewed by NOBODY (build fix).
  12878. * runtime/UString.h: Removed unneccessary #include.
  12879. 2010-08-12 Gavin Barraclough <barraclough@apple.com>
  12880. Reviewed by Sam Weinig
  12881. Revert changes to ALWAYS_INLINEness of a couple of functions in UString.
  12882. This appears to have degraded performance.
  12883. * runtime/UString.cpp:
  12884. (JSC::UString::ascii):
  12885. * runtime/UString.h:
  12886. (JSC::UString::length):
  12887. (JSC::UString::isEmpty):
  12888. (JSC::UString::~UString):
  12889. 2010-08-12 Csaba Osztrogonác <ossy@webkit.org>
  12890. Reviewed by Antonio Gomes.
  12891. [Qt] Fix warnings: unknown conversion type character 'l' in format
  12892. https://bugs.webkit.org/show_bug.cgi?id=43359
  12893. Qt port doesn't call any printf in String::format(...), consequently
  12894. using __attribute__((format(printf,m,n))) is incorrect and causes
  12895. false positive warnings on Windows if you build with MinGW.
  12896. Qt port calls QString::vsprintf(...) , which is platform
  12897. independent, and handles %lli, %llu and %llx on all platforms.
  12898. (http://trac.webkit.org/changeset/35712)
  12899. * wtf/text/WTFString.h:
  12900. 2010-08-12 Gabor Loki <loki@webkit.org>
  12901. Reviewed by Geoffrey Garen.
  12902. Fix the array subscript is above array bounds warning in ByteArray on ARM.
  12903. https://bugs.webkit.org/show_bug.cgi?id=43358
  12904. The warning is very similar to this one: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37861
  12905. * wtf/ByteArray.cpp:
  12906. (WTF::ByteArray::create):
  12907. 2010-08-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
  12908. Reviewed by Martin Robinson.
  12909. [GTK] Use GSettings to save/restore Web Inspector settings
  12910. https://bugs.webkit.org/show_bug.cgi?id=43512
  12911. * wtf/gobject/GRefPtr.cpp: Added support for GVariant, used by our
  12912. GSettings support.
  12913. (WTF::refGPtr):
  12914. (WTF::derefGPtr):
  12915. * wtf/gobject/GRefPtr.h:
  12916. 2010-08-12 Gabor Loki <loki@webkit.org>
  12917. Reviewed by Simon Hausmann.
  12918. The scratch register should be saved in YARR with ARM JIT
  12919. https://bugs.webkit.org/show_bug.cgi?id=43910
  12920. Reported by Jocelyn Turcotte.
  12921. * yarr/RegexJIT.cpp:
  12922. (JSC::Yarr::RegexGenerator::generateEnter):
  12923. (JSC::Yarr::RegexGenerator::generateReturn):
  12924. 2010-08-11 Gavin Barraclough <barraclough@apple.com>
  12925. Windows build fix.
  12926. * JavaScriptCore.xcodeproj/project.pbxproj:
  12927. * wtf/Forward.h:
  12928. 2010-08-11 Leo Yang <leo.yang@torchmobile.com.cn>
  12929. Reviewed by Geoffrey Garen.
  12930. Date("") should be an invalid date. For IE, Firefox and Chrome, Date("") is invalid date,
  12931. which means isNaN(new Date("")) should return true.
  12932. https://bugs.webkit.org/show_bug.cgi?id=43793
  12933. Tests: fast/js/date-constructor.html
  12934. * runtime/JSGlobalData.cpp:
  12935. (JSC::JSGlobalData::resetDateCache):
  12936. 2010-08-11 Gavin Barraclough <barraclough@apple.com>
  12937. Windows & !JIT build fix.
  12938. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  12939. * JavaScriptCore.xcodeproj/project.pbxproj:
  12940. * runtime/RegExp.cpp:
  12941. (JSC::RegExp::match):
  12942. 2010-08-11 Gavin Barraclough <barraclough@apple.com>
  12943. Rubber stamp by sam weinig
  12944. Touch a file to stop the bot rolling a bit change out!
  12945. * runtime/UString.cpp:
  12946. (JSC::UString::ascii):
  12947. 2010-08-11 Kevin Ollivier <kevino@theolliviers.com>
  12948. [wx] Build fix for wx and WebDOM bindings, add CString classes to the list of forwards.
  12949. * wtf/Forward.h:
  12950. 2010-08-11 Gavin Barraclough <barraclough@apple.com>
  12951. Rubber stamps by Darin Adler & Sam Weinig.
  12952. Bug 43867 - Some UString cleanup
  12953. Change JSC::UString data(), size(), and from(), to characters(), length(), and number() to match WTF::String.
  12954. Move string concatenation methods to a new header to simplify down UString.h. Remove is8Bit().
  12955. * API/JSClassRef.cpp:
  12956. (OpaqueJSClass::~OpaqueJSClass):
  12957. (OpaqueJSClass::className):
  12958. * API/OpaqueJSString.cpp:
  12959. (OpaqueJSString::create):
  12960. * JavaScriptCore.exp:
  12961. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  12962. * JavaScriptCore.xcodeproj/project.pbxproj:
  12963. * bytecode/CodeBlock.cpp:
  12964. (JSC::constantName):
  12965. (JSC::idName):
  12966. (JSC::CodeBlock::registerName):
  12967. (JSC::regexpName):
  12968. * bytecode/EvalCodeCache.h:
  12969. (JSC::EvalCodeCache::get):
  12970. * bytecompiler/NodesCodegen.cpp:
  12971. (JSC::ResolveNode::emitBytecode):
  12972. (JSC::FunctionCallResolveNode::emitBytecode):
  12973. (JSC::ReadModifyResolveNode::emitBytecode):
  12974. (JSC::processClauseList):
  12975. * parser/ASTBuilder.h:
  12976. (JSC::ASTBuilder::createRegex):
  12977. * parser/ParserArena.h:
  12978. (JSC::IdentifierArena::makeNumericIdentifier):
  12979. * parser/SourceProvider.h:
  12980. (JSC::UStringSourceProvider::data):
  12981. (JSC::UStringSourceProvider::length):
  12982. * profiler/Profiler.cpp:
  12983. * runtime/Arguments.cpp:
  12984. (JSC::Arguments::getOwnPropertySlot):
  12985. (JSC::Arguments::getOwnPropertyNames):
  12986. (JSC::Arguments::put):
  12987. (JSC::Arguments::deleteProperty):
  12988. * runtime/ArrayPrototype.cpp:
  12989. (JSC::arrayProtoFuncToString):
  12990. * runtime/DatePrototype.cpp:
  12991. (JSC::formatLocaleDate):
  12992. * runtime/ExceptionHelpers.cpp:
  12993. * runtime/FunctionConstructor.cpp:
  12994. * runtime/FunctionPrototype.cpp:
  12995. (JSC::insertSemicolonIfNeeded):
  12996. * runtime/Identifier.h:
  12997. (JSC::Identifier::characters):
  12998. (JSC::Identifier::length):
  12999. * runtime/JSGlobalObjectFunctions.cpp:
  13000. (JSC::decode):
  13001. (JSC::parseInt):
  13002. (JSC::parseFloat):
  13003. (JSC::globalFuncEscape):
  13004. (JSC::globalFuncUnescape):
  13005. * runtime/JSNumberCell.cpp:
  13006. (JSC::JSNumberCell::toString):
  13007. * runtime/JSONObject.cpp:
  13008. (JSC::gap):
  13009. (JSC::Stringifier::appendQuotedString):
  13010. (JSC::Stringifier::appendStringifiedValue):
  13011. (JSC::Stringifier::indent):
  13012. (JSC::Stringifier::unindent):
  13013. (JSC::Walker::walk):
  13014. * runtime/JSString.cpp:
  13015. (JSC::JSString::replaceCharacter):
  13016. (JSC::JSString::getIndexSlowCase):
  13017. * runtime/JSString.h:
  13018. (JSC::RopeBuilder::JSString):
  13019. (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
  13020. (JSC::RopeBuilder::fiberCount):
  13021. (JSC::jsSingleCharacterSubstring):
  13022. (JSC::jsNontrivialString):
  13023. (JSC::JSString::getIndex):
  13024. (JSC::jsString):
  13025. (JSC::jsStringWithFinalizer):
  13026. (JSC::jsSubstring):
  13027. (JSC::jsOwnedString):
  13028. * runtime/JSStringBuilder.h:
  13029. (JSC::JSStringBuilder::append):
  13030. * runtime/LiteralParser.h:
  13031. (JSC::LiteralParser::Lexer::Lexer):
  13032. * runtime/NumberPrototype.cpp:
  13033. (JSC::numberProtoFuncToString):
  13034. (JSC::numberProtoFuncToFixed):
  13035. (JSC::numberProtoFuncToExponential):
  13036. (JSC::numberProtoFuncToPrecision):
  13037. * runtime/NumericStrings.h:
  13038. (JSC::NumericStrings::add):
  13039. (JSC::NumericStrings::lookupSmallString):
  13040. * runtime/Operations.h:
  13041. (JSC::jsString):
  13042. * runtime/RegExp.cpp:
  13043. (JSC::RegExp::match):
  13044. * runtime/RegExpCache.cpp:
  13045. (JSC::RegExpCache::lookupOrCreate):
  13046. (JSC::RegExpCache::create):
  13047. * runtime/RegExpConstructor.cpp:
  13048. (JSC::RegExpConstructor::getRightContext):
  13049. * runtime/RegExpObject.cpp:
  13050. (JSC::RegExpObject::match):
  13051. * runtime/RegExpPrototype.cpp:
  13052. (JSC::regExpProtoFuncToString):
  13053. * runtime/StringBuilder.h:
  13054. (JSC::StringBuilder::append):
  13055. * runtime/StringConcatenate.h: Copied from JavaScriptCore/runtime/UString.h.
  13056. (JSC::):
  13057. (JSC::sumWithOverflow):
  13058. (JSC::tryMakeString):
  13059. (JSC::makeString):
  13060. * runtime/StringObject.cpp:
  13061. (JSC::StringObject::getOwnPropertyNames):
  13062. * runtime/StringPrototype.cpp:
  13063. (JSC::substituteBackreferencesSlow):
  13064. (JSC::localeCompare):
  13065. (JSC::jsSpliceSubstringsWithSeparators):
  13066. (JSC::stringProtoFuncReplace):
  13067. (JSC::stringProtoFuncCharAt):
  13068. (JSC::stringProtoFuncCharCodeAt):
  13069. (JSC::stringProtoFuncIndexOf):
  13070. (JSC::stringProtoFuncLastIndexOf):
  13071. (JSC::stringProtoFuncSlice):
  13072. (JSC::stringProtoFuncSplit):
  13073. (JSC::stringProtoFuncSubstr):
  13074. (JSC::stringProtoFuncSubstring):
  13075. (JSC::stringProtoFuncToLowerCase):
  13076. (JSC::stringProtoFuncToUpperCase):
  13077. (JSC::stringProtoFuncFontsize):
  13078. (JSC::stringProtoFuncLink):
  13079. (JSC::trimString):
  13080. * runtime/UString.cpp:
  13081. (JSC::UString::number):
  13082. (JSC::UString::ascii):
  13083. (JSC::UString::operator[]):
  13084. (JSC::UString::toDouble):
  13085. (JSC::UString::find):
  13086. (JSC::UString::rfind):
  13087. (JSC::UString::substr):
  13088. (JSC::operator==):
  13089. (JSC::operator<):
  13090. (JSC::operator>):
  13091. (JSC::UString::UTF8String):
  13092. * runtime/UString.h:
  13093. (JSC::UString::UString):
  13094. (JSC::UString::adopt):
  13095. (JSC::UString::length):
  13096. (JSC::UString::characters):
  13097. (JSC::UString::isNull):
  13098. (JSC::UString::isEmpty):
  13099. (JSC::UString::impl):
  13100. (JSC::UString::cost):
  13101. (JSC::operator==):
  13102. (JSC::operator!=):
  13103. (JSC::codePointCompare):
  13104. (JSC::UString::toArrayIndex):
  13105. (JSC::IdentifierRepHash::hash):
  13106. (WTF::):
  13107. * yarr/RegexJIT.cpp:
  13108. (JSC::Yarr::jitCompileRegex):
  13109. * yarr/RegexParser.h:
  13110. (JSC::Yarr::Parser::Parser):
  13111. 2010-08-11 Gabor Loki <loki@webkit.org>
  13112. Qt build fix (ARMv7).
  13113. Fix invalid conversion from int to Condition.
  13114. Add ARMv7Assembler.cpp to JavaScriptCore.pro.
  13115. * JavaScriptCore.pro:
  13116. * assembler/ARMv7Assembler.h:
  13117. (JSC::ARMv7Assembler::):
  13118. (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
  13119. 2010-08-11 Nathan Lawrence <nlawrence@apple.com>
  13120. Reviewed by Geoffrey Garen.
  13121. At collection time, we frequently want to mark a cell, while checking
  13122. whether it was originally checked. Previously, this was a get
  13123. operation follwed by a set operation. Fusing the two saves
  13124. computation and gives a 0.5% sunspider speedup.
  13125. * runtime/Collector.h:
  13126. (JSC::CollectorBitmap::getset):
  13127. (JSC::Heap::checkMarkCell):
  13128. * runtime/JSArray.h:
  13129. (JSC::MarkStack::drain):
  13130. * runtime/JSCell.h:
  13131. (JSC::MarkStack::append):
  13132. 2010-08-11 Steve Falkenburg <sfalken@apple.com>
  13133. Reviewed by Adam Roben.
  13134. Improve vsprops copying for Windows build
  13135. https://bugs.webkit.org/show_bug.cgi?id=41982
  13136. When we detect a new SDK, always copy a new set of vsprops files.
  13137. Previously, if someone updated their SDK after updating their sources,
  13138. they could end up with out-of-date vsprops files.
  13139. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
  13140. 2010-08-10 Darin Adler <darin@apple.com>
  13141. Reviewed by Sam Weinig.
  13142. Add leakRef and clear to all RefPtr variants
  13143. https://bugs.webkit.org/show_bug.cgi?id=42389
  13144. * API/JSRetainPtr.h: Changed all uses of "template <...>" to instead do
  13145. "template<...>". We should probably put this in the style guide and do it
  13146. consitently. Fixed other minor style issues. Defined many of the inlined
  13147. functions outside the class definition, to avoid style checker warnings
  13148. about multiple statements on a single line and for slightly better clarity
  13149. of the class definition itself. Renamed releaseRef to leakRef. Added a
  13150. releaseRef that calls leakRef so we don't have to rename all callers oat
  13151. once. Added a clear function.
  13152. * wtf/PassRefPtr.h: Changed all uses of releaseRef to leakRef.
  13153. n
  13154. * wtf/RefPtr.h: Changed all uses of "template <...>" to instead do
  13155. "template<...>". Tidied up declarations and comments a bit.
  13156. Changed all uses of releaseRef to leakRef.
  13157. * wtf/RetainPtr.h: Changed all uses of "template <...>" to instead do
  13158. "template<...>". Defined many of the inlined functions outside the class
  13159. definition, to avoid style checker warnings about multiple statements on
  13160. a single line and for slightly better clarity of the class definition itself.
  13161. Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
  13162. don't have to rename all callers at once. Added a clear function.
  13163. 2010-08-10 Dumitru Daniliuc <dumi@chromium.org>
  13164. Unreviewed, reverting an unintentional change to a file submitted in r65108.
  13165. * bytecode/CodeBlock.h:
  13166. (JSC::binaryChop):
  13167. 2010-08-10 Gavin Barraclough <barraclough@apple.com>
  13168. Rubber stamped by Sam Weinig
  13169. Bug 43817 - Remove UString::Rep
  13170. UString::Rep has for a long time been replaced by UStringImpl (Rep
  13171. remaining as a typedef). UStringImpl has since been removed too
  13172. (unified with StringImpl). Remove Rep, rename rep() to impl() and
  13173. m_rep to m_impl. Also add impl() method to Identifier, and rename
  13174. its UString member from _ustring to m_string.
  13175. * API/JSCallbackObject.h:
  13176. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
  13177. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
  13178. (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty):
  13179. * API/JSCallbackObjectFunctions.h:
  13180. (JSC::::getOwnPropertySlot):
  13181. (JSC::::put):
  13182. (JSC::::deleteProperty):
  13183. (JSC::::getOwnPropertyNames):
  13184. (JSC::::staticValueGetter):
  13185. (JSC::::staticFunctionGetter):
  13186. * API/JSClassRef.cpp:
  13187. (tryCreateStringFromUTF8):
  13188. (OpaqueJSClass::OpaqueJSClass):
  13189. (OpaqueJSClass::~OpaqueJSClass):
  13190. (OpaqueJSClassContextData::OpaqueJSClassContextData):
  13191. * API/JSClassRef.h:
  13192. * API/OpaqueJSString.cpp:
  13193. (OpaqueJSString::ustring):
  13194. * bytecode/EvalCodeCache.h:
  13195. (JSC::EvalCodeCache::get):
  13196. * bytecode/JumpTable.h:
  13197. (JSC::StringJumpTable::offsetForValue):
  13198. (JSC::StringJumpTable::ctiForValue):
  13199. * bytecompiler/BytecodeGenerator.cpp:
  13200. (JSC::BytecodeGenerator::addVar):
  13201. (JSC::BytecodeGenerator::addGlobalVar):
  13202. (JSC::BytecodeGenerator::BytecodeGenerator):
  13203. (JSC::BytecodeGenerator::addParameter):
  13204. (JSC::BytecodeGenerator::registerFor):
  13205. (JSC::BytecodeGenerator::willResolveToArguments):
  13206. (JSC::BytecodeGenerator::uncheckedRegisterForArguments):
  13207. (JSC::BytecodeGenerator::constRegisterFor):
  13208. (JSC::BytecodeGenerator::isLocal):
  13209. (JSC::BytecodeGenerator::isLocalConstant):
  13210. (JSC::BytecodeGenerator::addConstant):
  13211. (JSC::BytecodeGenerator::emitLoad):
  13212. (JSC::BytecodeGenerator::findScopedProperty):
  13213. (JSC::keyForCharacterSwitch):
  13214. (JSC::prepareJumpTableForStringSwitch):
  13215. * bytecompiler/BytecodeGenerator.h:
  13216. * bytecompiler/NodesCodegen.cpp:
  13217. (JSC::processClauseList):
  13218. * interpreter/Interpreter.cpp:
  13219. (JSC::Interpreter::privateExecute):
  13220. * jit/JITStubs.cpp:
  13221. (JSC::DEFINE_STUB_FUNCTION):
  13222. * parser/JSParser.cpp:
  13223. (JSC::JSParser::parseStrictObjectLiteral):
  13224. * pcre/pcre_exec.cpp:
  13225. (Histogram::add):
  13226. * profiler/CallIdentifier.h:
  13227. (JSC::CallIdentifier::Hash::hash):
  13228. * profiler/Profile.cpp:
  13229. * profiler/ProfileNode.cpp:
  13230. (JSC::ProfileNode::debugPrintDataSampleStyle):
  13231. * profiler/ProfileNode.h:
  13232. * runtime/ArrayPrototype.cpp:
  13233. (JSC::arrayProtoFuncToString):
  13234. * runtime/Identifier.cpp:
  13235. (JSC::Identifier::equal):
  13236. (JSC::IdentifierCStringTranslator::hash):
  13237. (JSC::IdentifierCStringTranslator::equal):
  13238. (JSC::IdentifierCStringTranslator::translate):
  13239. (JSC::Identifier::add):
  13240. (JSC::IdentifierUCharBufferTranslator::hash):
  13241. (JSC::IdentifierUCharBufferTranslator::equal):
  13242. (JSC::IdentifierUCharBufferTranslator::translate):
  13243. (JSC::Identifier::addSlowCase):
  13244. * runtime/Identifier.h:
  13245. (JSC::Identifier::Identifier):
  13246. (JSC::Identifier::ustring):
  13247. (JSC::Identifier::impl):
  13248. (JSC::Identifier::data):
  13249. (JSC::Identifier::size):
  13250. (JSC::Identifier::ascii):
  13251. (JSC::Identifier::isNull):
  13252. (JSC::Identifier::isEmpty):
  13253. (JSC::Identifier::toUInt32):
  13254. (JSC::Identifier::toStrictUInt32):
  13255. (JSC::Identifier::toArrayIndex):
  13256. (JSC::Identifier::toDouble):
  13257. (JSC::Identifier::equal):
  13258. (JSC::Identifier::add):
  13259. * runtime/InitializeThreading.cpp:
  13260. (JSC::initializeThreadingOnce):
  13261. * runtime/InternalFunction.cpp:
  13262. (JSC::InternalFunction::displayName):
  13263. * runtime/JSFunction.cpp:
  13264. (JSC::JSFunction::displayName):
  13265. * runtime/JSGlobalObject.h:
  13266. (JSC::JSGlobalObject::addStaticGlobals):
  13267. * runtime/JSStaticScopeObject.h:
  13268. (JSC::JSStaticScopeObject::JSStaticScopeObject):
  13269. * runtime/JSString.h:
  13270. (JSC::):
  13271. (JSC::RopeBuilder::appendStringInConstruct):
  13272. (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
  13273. (JSC::jsSingleCharacterSubstring):
  13274. (JSC::jsSubstring):
  13275. * runtime/JSVariableObject.cpp:
  13276. (JSC::JSVariableObject::deleteProperty):
  13277. (JSC::JSVariableObject::symbolTableGet):
  13278. * runtime/JSVariableObject.h:
  13279. (JSC::JSVariableObject::symbolTableGet):
  13280. (JSC::JSVariableObject::symbolTablePut):
  13281. (JSC::JSVariableObject::symbolTablePutWithAttributes):
  13282. * runtime/Lookup.cpp:
  13283. (JSC::HashTable::createTable):
  13284. (JSC::HashTable::deleteTable):
  13285. * runtime/Lookup.h:
  13286. (JSC::HashEntry::initialize):
  13287. (JSC::HashEntry::setKey):
  13288. (JSC::HashEntry::key):
  13289. (JSC::HashTable::entry):
  13290. * runtime/PropertyMapHashTable.h:
  13291. (JSC::PropertyMapEntry::PropertyMapEntry):
  13292. * runtime/PropertyNameArray.cpp:
  13293. (JSC::PropertyNameArray::add):
  13294. * runtime/PropertyNameArray.h:
  13295. (JSC::PropertyNameArray::add):
  13296. (JSC::PropertyNameArray::addKnownUnique):
  13297. * runtime/RegExp.cpp:
  13298. (JSC::RegExp::match):
  13299. * runtime/RegExpCache.cpp:
  13300. (JSC::RegExpCache::create):
  13301. * runtime/RegExpKey.h:
  13302. (JSC::RegExpKey::RegExpKey):
  13303. * runtime/SmallStrings.cpp:
  13304. (JSC::SmallStringsStorage::rep):
  13305. (JSC::SmallStrings::singleCharacterStringRep):
  13306. * runtime/SmallStrings.h:
  13307. * runtime/StringPrototype.cpp:
  13308. (JSC::jsSpliceSubstringsWithSeparators):
  13309. (JSC::stringProtoFuncMatch):
  13310. (JSC::stringProtoFuncSearch):
  13311. * runtime/Structure.cpp:
  13312. (JSC::Structure::~Structure):
  13313. (JSC::Structure::despecifyDictionaryFunction):
  13314. (JSC::Structure::addPropertyTransitionToExistingStructure):
  13315. (JSC::Structure::addPropertyTransition):
  13316. (JSC::Structure::copyPropertyTable):
  13317. (JSC::Structure::get):
  13318. (JSC::Structure::despecifyFunction):
  13319. (JSC::Structure::put):
  13320. (JSC::Structure::hasTransition):
  13321. (JSC::Structure::remove):
  13322. (JSC::Structure::checkConsistency):
  13323. * runtime/Structure.h:
  13324. (JSC::Structure::get):
  13325. (JSC::Structure::hasTransition):
  13326. * runtime/StructureTransitionTable.h:
  13327. * runtime/SymbolTable.h:
  13328. * runtime/UString.cpp:
  13329. (JSC::UString::UString):
  13330. (JSC::UString::toStrictUInt32):
  13331. (JSC::UString::substr):
  13332. * runtime/UString.h:
  13333. (JSC::UString::UString):
  13334. (JSC::UString::adopt):
  13335. (JSC::UString::data):
  13336. (JSC::UString::size):
  13337. (JSC::UString::isNull):
  13338. (JSC::UString::isEmpty):
  13339. (JSC::UString::impl):
  13340. (JSC::UString::cost):
  13341. (JSC::operator==):
  13342. (JSC::codePointCompare):
  13343. (JSC::IdentifierRepHash::hash):
  13344. (WTF::):
  13345. 2010-08-10 Gavin Barraclough <barraclough@apple.com>
  13346. Bug 43816 - Remove UStringImpl
  13347. The class was actually removed a long time ago, replaced by StringImpl.
  13348. UStringImpl is just a typedef onto StringImpl. Remove this.
  13349. * API/JSClassRef.cpp:
  13350. (OpaqueJSClass::OpaqueJSClass):
  13351. * JavaScriptCore.xcodeproj/project.pbxproj:
  13352. * runtime/JSString.cpp:
  13353. (JSC::JSString::resolveRope):
  13354. (JSC::JSString::replaceCharacter):
  13355. * runtime/JSString.h:
  13356. (JSC::RopeBuilder::RopeIterator::operator*):
  13357. (JSC::RopeBuilder::JSString):
  13358. (JSC::RopeBuilder::appendStringInConstruct):
  13359. (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
  13360. (JSC::jsSingleCharacterSubstring):
  13361. (JSC::jsSubstring):
  13362. * runtime/JSStringBuilder.h:
  13363. (JSC::jsMakeNontrivialString):
  13364. * runtime/RopeImpl.cpp:
  13365. (JSC::RopeImpl::derefFibersNonRecursive):
  13366. * runtime/RopeImpl.h:
  13367. (JSC::RopeImpl::deref):
  13368. * runtime/SmallStrings.cpp:
  13369. (JSC::SmallStringsStorage::SmallStringsStorage):
  13370. * runtime/StringConstructor.cpp:
  13371. (JSC::stringFromCharCodeSlowCase):
  13372. * runtime/StringPrototype.cpp:
  13373. (JSC::jsSpliceSubstringsWithSeparators):
  13374. (JSC::stringProtoFuncFontsize):
  13375. (JSC::stringProtoFuncLink):
  13376. * runtime/UString.cpp:
  13377. (JSC::initializeUString):
  13378. * runtime/UString.h:
  13379. (JSC::UString::adopt):
  13380. (JSC::tryMakeString):
  13381. (JSC::makeString):
  13382. * runtime/UStringImpl.h: Removed.
  13383. 2010-08-10 Patrick Gansterer <paroga@paroga.com>
  13384. Reviewed by Eric Seidel.
  13385. Make FastMalloc more portable.
  13386. https://bugs.webkit.org/show_bug.cgi?id=41790
  13387. * wtf/FastMalloc.cpp:
  13388. (WTF::TCMalloc_Central_FreeList::Populate):
  13389. (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
  13390. 2010-08-10 Patrick Gansterer <paroga@paroga.com>
  13391. Reviewed by David Levin.
  13392. [WINCE] Buildfix for CE 6.0
  13393. https://bugs.webkit.org/show_bug.cgi?id=43027
  13394. CE 6.0 doesn't define localtime in the system include files.
  13395. * wtf/Platform.h: Include ce_time.h on all OS(WINCE).
  13396. 2010-08-10 Gavin Barraclough <barraclough@apple.com>
  13397. Rubber stamped by Sam Weinig.
  13398. Bug 43786 - Move AtomicStringHash from WebCore to WTF
  13399. Also remove deprecated string headers from WebCore/platform/text.
  13400. * GNUmakefile.am:
  13401. * JavaScriptCore.gypi:
  13402. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  13403. * JavaScriptCore.xcodeproj/project.pbxproj:
  13404. * wtf/text/AtomicString.h:
  13405. * wtf/text/AtomicStringHash.h: Copied from WebCore/platform/text/AtomicStringHash.h.
  13406. 2010-08-09 Oliver Hunt <oliver@apple.com>
  13407. Fix Qt/ARM again, this time including the other changed file.
  13408. * jit/JIT.h:
  13409. 2010-08-09 Oliver Hunt <oliver@apple.com>
  13410. Fix Qt/ARM
  13411. C++ overload resolution I stab at thee
  13412. * jit/JITInlineMethods.h:
  13413. (JSC::JIT::beginUninterruptedSequence):
  13414. (JSC::JIT::endUninterruptedSequence):
  13415. 2010-08-09 Oliver Hunt <oliver@apple.com>
  13416. Reviewed by Gavin Barraclough.
  13417. Allow an assembler/macroassembler to compact branches to more concise forms when linking
  13418. https://bugs.webkit.org/show_bug.cgi?id=43745
  13419. This patch makes it possible for an assembler to convert jumps into a different
  13420. (presumably more efficient) form at link time. Currently implemented in the
  13421. ARMv7 JIT as that already had logic to delay linking of jumps until the end of
  13422. compilation already. The ARMv7 JIT chooses between either a 4 byte short jump
  13423. or a full 32-bit offset (and rewrites ITTT instructions as appropriate), so does
  13424. not yet produce the most compact form possible. The general design of the linker
  13425. should make it relatively simple to introduce new branch types with little effort,
  13426. as the linker has no knowledge of the exact form of any of the branches.
  13427. * JavaScriptCore.xcodeproj/project.pbxproj:
  13428. * assembler/ARMv7Assembler.cpp: Added.
  13429. (JSC::):
  13430. Record jump sizes
  13431. * assembler/ARMv7Assembler.h:
  13432. (JSC::ARMv7Assembler::LinkRecord::LinkRecord):
  13433. (JSC::ARMv7Assembler::LinkRecord::from):
  13434. (JSC::ARMv7Assembler::LinkRecord::setFrom):
  13435. (JSC::ARMv7Assembler::LinkRecord::to):
  13436. (JSC::ARMv7Assembler::LinkRecord::type):
  13437. (JSC::ARMv7Assembler::LinkRecord::linkType):
  13438. (JSC::ARMv7Assembler::LinkRecord::setLinkType):
  13439. Encapsulate LinkRecord fields so we can compress the values somewhat
  13440. (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
  13441. Need to record the jump type now
  13442. (JSC::ARMv7Assembler::b):
  13443. (JSC::ARMv7Assembler::blx):
  13444. (JSC::ARMv7Assembler::bx):
  13445. Need to pass the jump types
  13446. (JSC::ARMv7Assembler::executableOffsetFor):
  13447. (JSC::ARMv7Assembler::jumpSizeDelta):
  13448. (JSC::ARMv7Assembler::linkRecordSourceComparator):
  13449. (JSC::ARMv7Assembler::computeJumpType):
  13450. (JSC::ARMv7Assembler::convertJumpTo):
  13451. (JSC::ARMv7Assembler::recordLinkOffsets):
  13452. (JSC::ARMv7Assembler::jumpsToLink):
  13453. (JSC::ARMv7Assembler::link):
  13454. (JSC::ARMv7Assembler::unlinkedCode):
  13455. Helper functions for the linker
  13456. (JSC::ARMv7Assembler::linkJump):
  13457. (JSC::ARMv7Assembler::canBeShortJump):
  13458. (JSC::ARMv7Assembler::linkLongJump):
  13459. (JSC::ARMv7Assembler::linkShortJump):
  13460. (JSC::ARMv7Assembler::linkJumpAbsolute):
  13461. Moving code around for the various jump linking functions
  13462. * assembler/AbstractMacroAssembler.h:
  13463. (JSC::AbstractMacroAssembler::beginUninterruptedSequence):
  13464. (JSC::AbstractMacroAssembler::endUninterruptedSequence):
  13465. We have to track uninterrupted sequences in any assembler that compacts
  13466. branches as that's not something we're allowed to do in such sequences.
  13467. AbstractMacroAssembler has a nop version of these functions as it makes the
  13468. code elsewhere nicer.
  13469. * assembler/LinkBuffer.h:
  13470. (JSC::LinkBuffer::LinkBuffer):
  13471. (JSC::LinkBuffer::link):
  13472. (JSC::LinkBuffer::patch):
  13473. (JSC::LinkBuffer::locationOf):
  13474. (JSC::LinkBuffer::locationOfNearCall):
  13475. (JSC::LinkBuffer::returnAddressOffset):
  13476. (JSC::LinkBuffer::trampolineAt):
  13477. Updated these functions to adjust for any changed offsets in the linked code
  13478. (JSC::LinkBuffer::applyOffset):
  13479. A helper function to deal with the now potentially moved labels
  13480. (JSC::LinkBuffer::linkCode):
  13481. The new and mighty linker function
  13482. * assembler/MacroAssemblerARMv7.h:
  13483. (JSC::MacroAssemblerARMv7::MacroAssemblerARMv7):
  13484. (JSC::MacroAssemblerARMv7::beginUninterruptedSequence):
  13485. (JSC::MacroAssemblerARMv7::endUninterruptedSequence):
  13486. (JSC::MacroAssemblerARMv7::jumpsToLink):
  13487. (JSC::MacroAssemblerARMv7::unlinkedCode):
  13488. (JSC::MacroAssemblerARMv7::computeJumpType):
  13489. (JSC::MacroAssemblerARMv7::convertJumpTo):
  13490. (JSC::MacroAssemblerARMv7::recordLinkOffsets):
  13491. (JSC::MacroAssemblerARMv7::jumpSizeDelta):
  13492. (JSC::MacroAssemblerARMv7::link):
  13493. (JSC::MacroAssemblerARMv7::jump):
  13494. (JSC::MacroAssemblerARMv7::branchMul32):
  13495. (JSC::MacroAssemblerARMv7::breakpoint):
  13496. (JSC::MacroAssemblerARMv7::nearCall):
  13497. (JSC::MacroAssemblerARMv7::call):
  13498. (JSC::MacroAssemblerARMv7::ret):
  13499. (JSC::MacroAssemblerARMv7::tailRecursiveCall):
  13500. (JSC::MacroAssemblerARMv7::executableOffsetFor):
  13501. (JSC::MacroAssemblerARMv7::inUninterruptedSequence):
  13502. (JSC::MacroAssemblerARMv7::makeJump):
  13503. (JSC::MacroAssemblerARMv7::makeBranch):
  13504. All branches need to pass on their type now
  13505. * jit/ExecutableAllocator.h:
  13506. (JSC::ExecutablePool::returnLastBytes):
  13507. We can't know ahead of time how much space will be necessary to
  13508. hold the linked code if we're compacting branches, this new
  13509. function allows us to return the unused bytes at the end of linking
  13510. * jit/JIT.cpp:
  13511. (JSC::JIT::JIT):
  13512. (JSC::JIT::privateCompile):
  13513. * jit/JIT.h:
  13514. (JSC::JIT::compile):
  13515. The JIT class now needs to take a linker offset so that recompilation
  13516. can generate the same jumps when using branch compaction.
  13517. * jit/JITArithmetic32_64.cpp:
  13518. (JSC::JIT::emitSlow_op_mod):
  13519. * jit/JITOpcodes.cpp:
  13520. (JSC::JIT::privateCompileCTIMachineTrampolines):
  13521. * jit/JITOpcodes32_64.cpp:
  13522. (JSC::JIT::privateCompileCTIMachineTrampolines):
  13523. (JSC::JIT::privateCompileCTINativeCall):
  13524. Update for new trampolineAt changes
  13525. * wtf/FastMalloc.cpp:
  13526. (WTF::TCMallocStats::):
  13527. * wtf/Platform.h:
  13528. 2010-08-09 Gavin Barraclough <barraclough@apple.com>
  13529. Qt build fix III.
  13530. * wtf/text/WTFString.h:
  13531. 2010-08-09 Gavin Barraclough <barraclough@apple.com>
  13532. Qt build fix.
  13533. * wtf/qt/StringQt.cpp:
  13534. 2010-08-06 Gavin Barraclough <barraclough@apple.com>
  13535. Rubber stamped by Sam Weinig
  13536. Bug 43594 - Add string forwards to Forward.h
  13537. This allows us to remove forward declarations for these classes from
  13538. WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
  13539. * JavaScriptCore.xcodeproj/project.pbxproj:
  13540. * wtf/Forward.h:
  13541. 2010-08-07 Sheriff Bot <webkit.review.bot@gmail.com>
  13542. Unreviewed, rolling out r64938.
  13543. http://trac.webkit.org/changeset/64938
  13544. https://bugs.webkit.org/show_bug.cgi?id=43685
  13545. Did not compile on several ports (Requested by abarth on
  13546. #webkit).
  13547. * Android.mk:
  13548. * CMakeLists.txt:
  13549. * GNUmakefile.am:
  13550. * JavaScriptCore.gypi:
  13551. * JavaScriptCore.pro:
  13552. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  13553. * JavaScriptCore.xcodeproj/project.pbxproj:
  13554. * assembler/AbstractMacroAssembler.h:
  13555. * assembler/MacroAssembler.h:
  13556. * assembler/MacroAssemblerX86.h:
  13557. (JSC::MacroAssemblerX86::load32):
  13558. (JSC::MacroAssemblerX86::store32):
  13559. * assembler/X86Assembler.h:
  13560. (JSC::X86Assembler::movl_rm):
  13561. (JSC::X86Assembler::movl_mr):
  13562. * bytecode/CodeBlock.cpp:
  13563. (JSC::CodeBlock::markAggregate):
  13564. * bytecode/Instruction.h:
  13565. (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::):
  13566. (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
  13567. (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
  13568. * bytecode/StructureStubInfo.cpp:
  13569. (JSC::StructureStubInfo::deref):
  13570. * bytecode/StructureStubInfo.h:
  13571. (JSC::StructureStubInfo::initGetByIdProto):
  13572. (JSC::StructureStubInfo::initGetByIdChain):
  13573. (JSC::StructureStubInfo::):
  13574. * jit/JIT.h:
  13575. * jit/JITMarkObjects.cpp: Removed.
  13576. * jit/JITPropertyAccess.cpp:
  13577. (JSC::JIT::compileGetDirectOffset):
  13578. (JSC::JIT::testPrototype):
  13579. (JSC::JIT::privateCompilePutByIdTransition):
  13580. (JSC::JIT::privateCompileGetByIdProto):
  13581. (JSC::JIT::privateCompileGetByIdProtoList):
  13582. (JSC::JIT::privateCompileGetByIdChainList):
  13583. (JSC::JIT::privateCompileGetByIdChain):
  13584. * jit/JITPropertyAccess32_64.cpp:
  13585. (JSC::JIT::compileGetDirectOffset):
  13586. (JSC::JIT::testPrototype):
  13587. (JSC::JIT::privateCompilePutByIdTransition):
  13588. (JSC::JIT::privateCompileGetByIdProto):
  13589. (JSC::JIT::privateCompileGetByIdProtoList):
  13590. (JSC::JIT::privateCompileGetByIdChainList):
  13591. (JSC::JIT::privateCompileGetByIdChain):
  13592. * jit/JITStubs.cpp:
  13593. (JSC::setupPolymorphicProtoList):
  13594. * wtf/Platform.h:
  13595. 2010-08-07 Nathan Lawrence <nlawrence@apple.com>
  13596. Reviewed by Geoffrey Garen.
  13597. The JIT code contains a number of direct references to GC'd objects.
  13598. When we have movable objects, these references will need to be
  13599. updated.
  13600. * Android.mk:
  13601. * CMakeLists.txt:
  13602. * GNUmakefile.am:
  13603. * JavaScriptCore.gypi:
  13604. * JavaScriptCore.pro:
  13605. * JavaScriptCore.xcodeproj/project.pbxproj:
  13606. * assembler/AbstractMacroAssembler.h:
  13607. (JSC::AbstractMacroAssembler::int32AtLocation):
  13608. (JSC::AbstractMacroAssembler::pointerAtLocation):
  13609. (JSC::AbstractMacroAssembler::jumpTarget):
  13610. * assembler/MacroAssembler.h:
  13611. (JSC::MacroAssembler::loadPtrWithPatch):
  13612. Normally, loadPtr will optimize when the register is eax. Since
  13613. the slightly smaller instruction changes the offsets, it messes up
  13614. our ability to repatch the code. We added this new instruction
  13615. that garuntees a constant size.
  13616. * assembler/MacroAssemblerX86.h:
  13617. (JSC::MacroAssemblerX86::load32WithPatch):
  13618. Changed load32 in the same way described above.
  13619. (JSC::MacroAssemblerX86::load32):
  13620. Moved the logic to optimize laod32 from movl_mr to load32
  13621. (JSC::MacroAssemblerX86::store32):
  13622. Moved the logic to optimize store32 from movl_rm to store32
  13623. * assembler/X86Assembler.h:
  13624. (JSC::X86Assembler::movl_rm):
  13625. (JSC::X86Assembler::movl_mr):
  13626. (JSC::X86Assembler::int32AtLocation):
  13627. (JSC::X86Assembler::pointerAtLocation):
  13628. (JSC::X86Assembler::jumpTarget):
  13629. * bytecode/CodeBlock.cpp:
  13630. (JSC::CodeBlock::markAggregate):
  13631. * bytecode/Instruction.h:
  13632. As described in StructureStubInfo.h, we needed to add additional
  13633. fields to both StructureStubInfo and
  13634. PolymorphicAccessStructureList so that we can determine the
  13635. structure of the JITed code at patch time.
  13636. (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
  13637. (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
  13638. * bytecode/StructureStubInfo.cpp:
  13639. (JSC::StructureStubInfo::markAggregate):
  13640. Added this function to mark the JITed code that correosponds to
  13641. this structure stub info.
  13642. * bytecode/StructureStubInfo.h:
  13643. (JSC::StructureStubInfo::initGetByIdProto):
  13644. (JSC::StructureStubInfo::initGetByIdChain):
  13645. (JSC::StructureStubInfo::):
  13646. * jit/JIT.h:
  13647. * jit/JITMarkObjects.cpp: Added.
  13648. (JSC::JIT::patchPrototypeStructureAddress):
  13649. (JSC::JIT::patchGetDirectOffset):
  13650. (JSC::JIT::markGetByIdProto):
  13651. (JSC::JIT::markGetByIdChain):
  13652. (JSC::JIT::markGetByIdProtoList):
  13653. (JSC::JIT::markPutByIdTransition):
  13654. (JSC::JIT::markGlobalObjectReference):
  13655. * jit/JITPropertyAccess.cpp:
  13656. Added asserts for the patch offsets.
  13657. (JSC::JIT::compileGetDirectOffset):
  13658. (JSC::JIT::testPrototype):
  13659. (JSC::JIT::privateCompilePutByIdTransition):
  13660. (JSC::JIT::privateCompileGetByIdProto):
  13661. (JSC::JIT::privateCompileGetByIdProtoList):
  13662. (JSC::JIT::privateCompileGetByIdChainList):
  13663. (JSC::JIT::privateCompileGetByIdChain):
  13664. * jit/JITPropertyAccess32_64.cpp:
  13665. (JSC::JIT::compileGetDirectOffset):
  13666. (JSC::JIT::testPrototype):
  13667. (JSC::JIT::privateCompilePutByIdTransition):
  13668. (JSC::JIT::privateCompileGetByIdProto):
  13669. (JSC::JIT::privateCompileGetByIdProtoList):
  13670. (JSC::JIT::privateCompileGetByIdChainList):
  13671. (JSC::JIT::privateCompileGetByIdChain):
  13672. * jit/JITStubs.cpp:
  13673. (JSC::setupPolymorphicProtoList):
  13674. * wtf/Platform.h:
  13675. Added ENABLE_MOVABLE_GC_OBJECTS flag
  13676. 2010-08-07 Michael Saboff <msaboff@apple.com>
  13677. Reviewed by Geoffrey Garen.
  13678. Revert JSArray to point to the beginning of the contained ArrayStorage
  13679. struct. This is described in
  13680. https://bugs.webkit.org/show_bug.cgi?id=43526.
  13681. * jit/JITPropertyAccess.cpp:
  13682. (JSC::JIT::emit_op_get_by_val):
  13683. (JSC::JIT::emit_op_put_by_val):
  13684. (JSC::JIT::privateCompilePatchGetArrayLength):
  13685. * jit/JITPropertyAccess32_64.cpp:
  13686. (JSC::JIT::emit_op_get_by_val):
  13687. (JSC::JIT::emit_op_put_by_val):
  13688. (JSC::JIT::privateCompilePatchGetArrayLength):
  13689. * runtime/JSArray.cpp:
  13690. (JSC::JSArray::JSArray):
  13691. (JSC::JSArray::~JSArray):
  13692. (JSC::JSArray::getOwnPropertySlot):
  13693. (JSC::JSArray::getOwnPropertyDescriptor):
  13694. (JSC::JSArray::put):
  13695. (JSC::JSArray::putSlowCase):
  13696. (JSC::JSArray::deleteProperty):
  13697. (JSC::JSArray::getOwnPropertyNames):
  13698. (JSC::JSArray::getNewVectorLength):
  13699. (JSC::JSArray::increaseVectorLength):
  13700. (JSC::JSArray::increaseVectorPrefixLength):
  13701. (JSC::JSArray::setLength):
  13702. (JSC::JSArray::pop):
  13703. (JSC::JSArray::push):
  13704. (JSC::JSArray::shiftCount):
  13705. (JSC::JSArray::unshiftCount):
  13706. (JSC::JSArray::sortNumeric):
  13707. (JSC::JSArray::sort):
  13708. (JSC::JSArray::fillArgList):
  13709. (JSC::JSArray::copyToRegisters):
  13710. (JSC::JSArray::compactForSorting):
  13711. (JSC::JSArray::subclassData):
  13712. (JSC::JSArray::setSubclassData):
  13713. (JSC::JSArray::checkConsistency):
  13714. * runtime/JSArray.h:
  13715. (JSC::JSArray::length):
  13716. (JSC::JSArray::canGetIndex):
  13717. (JSC::JSArray::getIndex):
  13718. (JSC::JSArray::setIndex):
  13719. (JSC::JSArray::uncheckedSetIndex):
  13720. (JSC::JSArray::markChildrenDirect):
  13721. 2010-08-07 Kwang Yul Seo <skyul@company100.net>
  13722. Reviewed by Eric Seidel.
  13723. Add ENABLE(YARR) guard around JSGlobalData::m_regexAllocator
  13724. https://bugs.webkit.org/show_bug.cgi?id=43399
  13725. m_regexAllocator is used only by RegExp::compile which is guarded with ENABLE(YARR).
  13726. * runtime/JSGlobalData.h:
  13727. 2010-08-07 Patrick Roland Gansterer <paroga@paroga.com>
  13728. Reviewed by Eric Seidel.
  13729. [Qt] Enable JIT on WinCE
  13730. https://bugs.webkit.org/show_bug.cgi?id=43303
  13731. Add ExtraCompiler for generating GeneratedJITStubs_MSVC.asm.
  13732. * DerivedSources.pro:
  13733. 2010-08-07 Dan Bernstein <mitz@apple.com>
  13734. Reviewed by Anders Carlsson.
  13735. Created a separate SimpleFontData constructor exclusively for SVG fonts and moved the CTFontRef
  13736. from SimpleFontData to FontPlatformData.
  13737. https://bugs.webkit.org/show_bug.cgi?id=43674
  13738. * wtf/Platform.h: Moved definitions of WTF_USE_CORE_TEXT and WTF_USE_ATSUI here from WebCore/config.h.
  13739. 2010-08-07 Zoltan Herczeg <zherczeg@webkit.org>
  13740. Reviewed by Eric Seidel.
  13741. Bitmap.h has no default constructor
  13742. https://bugs.webkit.org/show_bug.cgi?id=43619
  13743. Without a constructor, the initial bits of the Bitmap class
  13744. are undefinied. If only a few, or zero bits are 0, the memory
  13745. area provided by AlignedMemoryAllocator can be easly exhausted.
  13746. Csaba Osztrogonác helped to find this bug.
  13747. * wtf/Bitmap.h:
  13748. (WTF::::Bitmap):
  13749. 2010-08-06 Rafael Antognolli <antognolli@profusion.mobi>
  13750. [EFL] Build fix.
  13751. * CMakeLists.txt: add runtime/CGHandle.cpp.
  13752. 2010-08-06 Jessie Berlin <jberlin@apple.com>
  13753. Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build.
  13754. Unreviewed.
  13755. * JavaScriptCore.xcodeproj/project.pbxproj:
  13756. * wtf/Forward.h:
  13757. 2010-08-06 Jessie Berlin <jberlin@apple.com>
  13758. Windows Build Fix (continued). Unreviewed.
  13759. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  13760. 2010-08-06 Jessie Berlin <jberlin@apple.com>
  13761. Windows Build Fix. Unreviewed.
  13762. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  13763. Add GCHandle.h and GCHandle.cpp.
  13764. 2010-08-06 Nathan Lawrence <nlawrence@apple.com>
  13765. Reviewed by Geoffrey Garen.
  13766. https://bugs.webkit.org/show_bug.cgi?id=43207
  13767. WeakGCPtr's should instead of directly pointing to the GC'd object
  13768. should be directed to an array of pointers that can be updated for
  13769. movable objects.
  13770. * Android.mk:
  13771. * GNUmakefile.am:
  13772. * JavaScriptCore.exp:
  13773. * JavaScriptCore.gypi:
  13774. * JavaScriptCore.pro:
  13775. * JavaScriptCore.xcodeproj/project.pbxproj:
  13776. * runtime/Collector.cpp:
  13777. (JSC::Heap::destroy):
  13778. (JSC::Heap::allocateBlock):
  13779. (JSC::Heap::freeBlock):
  13780. (JSC::Heap::updateWeakGCHandles):
  13781. (JSC::WeakGCHandlePool::update):
  13782. (JSC::Heap::addWeakGCHandle):
  13783. (JSC::Heap::markRoots):
  13784. * runtime/Collector.h:
  13785. (JSC::Heap::weakGCHandlePool):
  13786. * runtime/GCHandle.cpp: Added.
  13787. (JSC::WeakGCHandle::pool):
  13788. (JSC::WeakGCHandlePool::WeakGCHandlePool):
  13789. (JSC::WeakGCHandlePool::allocate):
  13790. (JSC::WeakGCHandlePool::free):
  13791. (JSC::WeakGCHandlePool::operator new):
  13792. * runtime/GCHandle.h: Added.
  13793. (JSC::WeakGCHandle::isValidPtr):
  13794. (JSC::WeakGCHandle::isPtr):
  13795. (JSC::WeakGCHandle::isNext):
  13796. (JSC::WeakGCHandle::invalidate):
  13797. (JSC::WeakGCHandle::get):
  13798. (JSC::WeakGCHandle::set):
  13799. (JSC::WeakGCHandle::getNextInFreeList):
  13800. (JSC::WeakGCHandle::setNextInFreeList):
  13801. (JSC::WeakGCHandlePool::isFull):
  13802. * runtime/WeakGCPtr.h:
  13803. (JSC::WeakGCPtr::WeakGCPtr):
  13804. (JSC::WeakGCPtr::~WeakGCPtr):
  13805. (JSC::WeakGCPtr::get):
  13806. (JSC::WeakGCPtr::clear):
  13807. (JSC::WeakGCPtr::assign):
  13808. (JSC::get):
  13809. 2010-08-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
  13810. Reviewed by Antonio Gomes.
  13811. [Qt] Fix warnings about difference in symbol visiblity on Mac OS X
  13812. * jsc.pro:
  13813. 2010-08-06 Zoltan Herczeg <zherczeg@webkit.org>
  13814. Reviewed by Darin Adler.
  13815. Refactor identifier parsing in lexer
  13816. https://bugs.webkit.org/show_bug.cgi?id=41845
  13817. The code is refactored to avoid gotos. The new code
  13818. has the same performance as the old one.
  13819. SunSpider --parse-only: no change (from 34.0ms to 33.6ms)
  13820. SunSpider: no change (from 523.2ms to 523.5ms)
  13821. * parser/Lexer.cpp:
  13822. (JSC::Lexer::parseIdent):
  13823. (JSC::Lexer::lex):
  13824. * parser/Lexer.h:
  13825. 2010-08-06 Gabor Loki <loki@webkit.org>
  13826. Reviewed by Gavin Barraclough.
  13827. The ARM JIT does not support JSValue32_64 with RVCT
  13828. https://bugs.webkit.org/show_bug.cgi?id=43411
  13829. JSValue32_64 is enabled for RVCT by default.
  13830. * create_jit_stubs:
  13831. * jit/JITStubs.cpp:
  13832. (JSC::ctiTrampoline):
  13833. (JSC::ctiVMThrowTrampoline):
  13834. (JSC::ctiOpThrowNotCaught):
  13835. * wtf/Platform.h:
  13836. 2010-08-05 Chao-ying Fu <fu@mips.com>
  13837. Reviewed by Darin Adler.
  13838. Define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER for MIPS
  13839. https://bugs.webkit.org/show_bug.cgi?id=43514
  13840. MIPS needs to define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER, so that
  13841. RenderArena::allocate() can return 8-byte aligned memory to avoid
  13842. exceptions on sdc1/ldc1.
  13843. * wtf/Platform.h:
  13844. 2010-08-05 Gavin Barraclough <barraclough@apple.com>
  13845. Rubber stamped by Sam Weinig
  13846. Bug 43594 - Add string forwards to Forward.h
  13847. This allows us to remove forward declarations for these classes from
  13848. WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
  13849. * JavaScriptCore.xcodeproj/project.pbxproj:
  13850. * wtf/Forward.h:
  13851. 2010-08-05 Geoffrey Garen <ggaren@apple.com>
  13852. Reviewed by Mark Rowe.
  13853. Fixed leak seen on buildbot.
  13854. * runtime/GCActivityCallbackCF.cpp:
  13855. (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
  13856. (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
  13857. (JSC::DefaultGCActivityCallback::operator()): Make out timer a RetainPtr,
  13858. since anything less would be uncivilized.
  13859. 2010-08-05 Andy Estes <aestes@apple.com>
  13860. Reviewed by David Kilzer.
  13861. Rename iOS-related OS and PLATFORM macros.
  13862. https://bugs.webkit.org/show_bug.cgi?id=43493
  13863. Rename WTF_OS_IPHONE_OS to WTF_OS_IOS, WTF_PLATFORM_IPHONE to
  13864. WTF_PLATFORM_IOS, and WTF_PLATFORM_IPHONE_SIMULATOR to
  13865. WTF_PLATFORM_IOS_SIMULATOR.
  13866. * jit/ExecutableAllocator.h:
  13867. * jit/JITStubs.cpp:
  13868. * profiler/ProfilerServer.mm:
  13869. (-[ProfilerServer init]):
  13870. * wtf/FastMalloc.cpp:
  13871. (WTF::TCMallocStats::):
  13872. * wtf/Platform.h:
  13873. * wtf/unicode/icu/CollatorICU.cpp:
  13874. (WTF::Collator::userDefault):
  13875. 2010-08-05 Nathan Lawrence <nlawrence@apple.com>
  13876. Reviewed by Darin Adler.
  13877. https://bugs.webkit.org/show_bug.cgi?id=43464
  13878. Currently, the global object is being embedded in the JavaScriptCore
  13879. bytecode, however since the global object is the same for all opcodes
  13880. in a code block, we can have the global object just be a member of the
  13881. associated code block.
  13882. Additionally, I added an assert inside of emitOpcode that verifies
  13883. that the last generated opcode was of the correct length.
  13884. * bytecode/CodeBlock.cpp:
  13885. (JSC::CodeBlock::CodeBlock):
  13886. (JSC::CodeBlock::derefStructures):
  13887. (JSC::CodeBlock::markAggregate):
  13888. * bytecode/CodeBlock.h:
  13889. (JSC::CodeBlock::globalObject):
  13890. (JSC::GlobalCodeBlock::GlobalCodeBlock):
  13891. (JSC::ProgramCodeBlock::ProgramCodeBlock):
  13892. (JSC::EvalCodeBlock::EvalCodeBlock):
  13893. (JSC::FunctionCodeBlock::FunctionCodeBlock):
  13894. * bytecode/Opcode.h:
  13895. (JSC::opcodeLength):
  13896. * bytecompiler/BytecodeGenerator.cpp:
  13897. (JSC::BytecodeGenerator::BytecodeGenerator):
  13898. (JSC::BytecodeGenerator::emitOpcode):
  13899. Added an assert to check that the last generated opcode is the
  13900. correct length.
  13901. (JSC::BytecodeGenerator::rewindBinaryOp):
  13902. Changed the last opcode to op_end since the length will no longer
  13903. be correct.
  13904. (JSC::BytecodeGenerator::rewindUnaryOp):
  13905. Changed the last opcode to op_end since the length will no longer
  13906. be correct.
  13907. (JSC::BytecodeGenerator::emitResolve):
  13908. (JSC::BytecodeGenerator::emitGetScopedVar):
  13909. (JSC::BytecodeGenerator::emitPutScopedVar):
  13910. (JSC::BytecodeGenerator::emitResolveWithBase):
  13911. * bytecompiler/BytecodeGenerator.h:
  13912. * interpreter/Interpreter.cpp:
  13913. (JSC::Interpreter::resolveGlobal):
  13914. (JSC::Interpreter::resolveGlobalDynamic):
  13915. (JSC::Interpreter::privateExecute):
  13916. * jit/JITOpcodes.cpp:
  13917. (JSC::JIT::emit_op_get_global_var):
  13918. (JSC::JIT::emit_op_put_global_var):
  13919. (JSC::JIT::emit_op_resolve_global):
  13920. (JSC::JIT::emitSlow_op_resolve_global):
  13921. (JSC::JIT::emit_op_resolve_global_dynamic):
  13922. (JSC::JIT::emitSlow_op_resolve_global_dynamic):
  13923. * jit/JITOpcodes32_64.cpp:
  13924. (JSC::JIT::emit_op_get_global_var):
  13925. (JSC::JIT::emit_op_put_global_var):
  13926. (JSC::JIT::emit_op_resolve_global):
  13927. (JSC::JIT::emitSlow_op_resolve_global):
  13928. * jit/JITStubs.cpp:
  13929. (JSC::cti_op_resolve_global):
  13930. * runtime/Executable.cpp:
  13931. (JSC::FunctionExecutable::compileForCallInternal):
  13932. (JSC::FunctionExecutable::compileForConstructInternal):
  13933. (JSC::FunctionExecutable::reparseExceptionInfo):
  13934. 2010-08-05 Gavin Barraclough <barraclough@apple.com>
  13935. Reviewed by Sam Weinig.
  13936. Bug 43185 - Switch RegisterFile over to use PageAllocation
  13937. Remove platform-specific memory allocation code.
  13938. * interpreter/RegisterFile.cpp:
  13939. (JSC::RegisterFile::~RegisterFile):
  13940. (JSC::RegisterFile::releaseExcessCapacity):
  13941. * interpreter/RegisterFile.h:
  13942. (JSC::RegisterFile::RegisterFile):
  13943. (JSC::RegisterFile::grow):
  13944. (JSC::RegisterFile::checkAllocatedOkay):
  13945. * wtf/PageAllocation.cpp:
  13946. (WTF::PageAllocation::lastError):
  13947. * wtf/PageAllocation.h:
  13948. (WTF::PageAllocation::allocate):
  13949. (WTF::PageAllocation::allocateAt):
  13950. (WTF::PageAllocation::allocateAligned):
  13951. (WTF::PageAllocation::pageSize):
  13952. (WTF::PageAllocation::isPageAligned):
  13953. (WTF::PageAllocation::isPowerOfTwo):
  13954. * wtf/PageReservation.h:
  13955. (WTF::PageReservation::commit):
  13956. (WTF::PageReservation::decommit):
  13957. (WTF::PageReservation::reserve):
  13958. (WTF::PageReservation::reserveAt):
  13959. 2010-08-05 Michael Saboff <msaboff@apple.com>
  13960. Reviewed by Darin Adler.
  13961. Fixed https://bugs.webkit.org/show_bug.cgi?id=43401 where array
  13962. content aren't properly initialized as part of unshift.
  13963. * runtime/JSArray.cpp:
  13964. (JSC::JSArray::unshiftCount):
  13965. 2010-08-05 Jian Li <jianli@chromium.org>
  13966. Reviewed by David Levin.
  13967. Unify blob related feature defines to ENABLE(BLOB).
  13968. https://bugs.webkit.org/show_bug.cgi?id=43081
  13969. * Configurations/FeatureDefines.xcconfig:
  13970. 2010-08-05 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
  13971. Rubber-stamped by Xan Lopez.
  13972. Remove GHashTable left-overs. GHashTable is ref-counted, and is
  13973. correctly supported by GRefPtr.
  13974. * wtf/gobject/GOwnPtr.h:
  13975. 2010-08-05 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
  13976. Unreviewed.
  13977. Typo fix that makes distcheck happy.
  13978. * GNUmakefile.am:
  13979. 2010-08-03 Geoffrey Garen <ggaren@apple.com>
  13980. Reviewed by Oliver Hunt and Beth Dakin.
  13981. https://bugs.webkit.org/show_bug.cgi?id=43461
  13982. Invalid NaN parsing
  13983. * wtf/dtoa.cpp: Turn off the dtoa feature that allows you to specify a
  13984. non-standard NaN representation, since our NaN encoding assumes that all
  13985. true NaNs have the standard bit pattern.
  13986. * API/JSValueRef.cpp:
  13987. (JSValueMakeNumber): Don't allow an API client to accidentally specify
  13988. a non-standard NaN either.
  13989. 2010-08-04 Gavin Barraclough <barraclough@apple.com>
  13990. Windows build fix part II.
  13991. * wtf/PageReservation.h:
  13992. (WTF::PageReservation::systemReserve):
  13993. 2010-08-04 Gavin Barraclough <barraclough@apple.com>
  13994. Windows build fix.
  13995. * wtf/PageReservation.h:
  13996. (WTF::PageReservation::systemReserve):
  13997. 2010-08-04 Gavin Barraclough <barraclough@apple.com>
  13998. Build fix - add new header to !Mac projects.
  13999. * GNUmakefile.am:
  14000. * JavaScriptCore.gypi:
  14001. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  14002. 2010-08-04 Gavin Barraclough <barraclough@apple.com>
  14003. Reviewed by Sam Weinig.
  14004. Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation.
  14005. The PageAllocation class has a number of issues:
  14006. * Changes in bug #43269 accidentally switched SYMBIAN over to use malloc/free to allocate
  14007. blocks of memory for the GC heap, instead of allocating RChunks. Revert this change in
  14008. behaviour.
  14009. * In order for PageAllocation to work correctly on WinCE we should be decommitting memory
  14010. before deallocating. In order to simplify understanding the expected state at deallocate,
  14011. split behaviour out into PageAllocation and PageReservation classes. Require that all
  14012. memory be decommitted before calling deallocate on a PageReservation, add asserts to
  14013. enforce this.
  14014. * add many missing asserts.
  14015. * inline more functions.
  14016. * remove ability to create sub-PageAllocations from an existing PageAllocations object -
  14017. this presented an interface that would allow sub regions to be deallocated, which would
  14018. not have provided expected behaviour.
  14019. * remove writable/executable arguments to commit, this value can be cached at the point
  14020. the memory is reserved.
  14021. * remove writable/executable arguments to allocateAligned, protection other than RW is not
  14022. supported.
  14023. * add missing checks for overflow & failed allocation to mmap path through allocateAligned.
  14024. * JavaScriptCore.xcodeproj/project.pbxproj:
  14025. * jit/ExecutableAllocator.cpp:
  14026. (JSC::ExecutableAllocator::intializePageSize):
  14027. * jit/ExecutableAllocator.h:
  14028. (JSC::ExecutablePool::Allocation::Allocation):
  14029. (JSC::ExecutablePool::Allocation::base):
  14030. (JSC::ExecutablePool::Allocation::size):
  14031. (JSC::ExecutablePool::Allocation::operator!):
  14032. * jit/ExecutableAllocatorFixedVMPool.cpp:
  14033. (JSC::FixedVMPoolAllocator::reuse):
  14034. (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
  14035. (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
  14036. (JSC::FixedVMPoolAllocator::alloc):
  14037. (JSC::FixedVMPoolAllocator::free):
  14038. (JSC::FixedVMPoolAllocator::allocInternal):
  14039. * runtime/AlignedMemoryAllocator.h:
  14040. (JSC::::allocate):
  14041. (JSC::::AlignedMemoryAllocator):
  14042. * runtime/Collector.cpp:
  14043. (JSC::Heap::allocateBlock):
  14044. * runtime/Collector.h:
  14045. * wtf/PageAllocation.cpp:
  14046. * wtf/PageAllocation.h:
  14047. (WTF::PageAllocation::operator!):
  14048. (WTF::PageAllocation::allocate):
  14049. (WTF::PageAllocation::allocateAt):
  14050. (WTF::PageAllocation::allocateAligned):
  14051. (WTF::PageAllocation::deallocate):
  14052. (WTF::PageAllocation::pageSize):
  14053. (WTF::PageAllocation::systemAllocate):
  14054. (WTF::PageAllocation::systemAllocateAt):
  14055. (WTF::PageAllocation::systemAllocateAligned):
  14056. (WTF::PageAllocation::systemDeallocate):
  14057. (WTF::PageAllocation::systemPageSize):
  14058. * wtf/PageReservation.h: Copied from JavaScriptCore/wtf/PageAllocation.h.
  14059. (WTF::PageReservation::PageReservation):
  14060. (WTF::PageReservation::commit):
  14061. (WTF::PageReservation::decommit):
  14062. (WTF::PageReservation::reserve):
  14063. (WTF::PageReservation::reserveAt):
  14064. (WTF::PageReservation::deallocate):
  14065. (WTF::PageReservation::systemCommit):
  14066. (WTF::PageReservation::systemDecommit):
  14067. (WTF::PageReservation::systemReserve):
  14068. (WTF::PageReservation::systemReserveAt):
  14069. * wtf/Platform.h:
  14070. 2010-08-04 Sheriff Bot <webkit.review.bot@gmail.com>
  14071. Unreviewed, rolling out r64655.
  14072. http://trac.webkit.org/changeset/64655
  14073. https://bugs.webkit.org/show_bug.cgi?id=43496
  14074. JavaScriptCore references patch seems to have caused
  14075. regressions in QT and GTK builds (Requested by nlawrence on
  14076. #webkit).
  14077. * bytecode/CodeBlock.cpp:
  14078. (JSC::CodeBlock::markAggregate):
  14079. * runtime/Collector.cpp:
  14080. (JSC::Heap::markConservatively):
  14081. * runtime/JSCell.h:
  14082. (JSC::JSValue::asCell):
  14083. (JSC::MarkStack::append):
  14084. * runtime/JSGlobalObject.cpp:
  14085. (JSC::markIfNeeded):
  14086. * runtime/JSONObject.cpp:
  14087. (JSC::Stringifier::Holder::object):
  14088. * runtime/JSObject.h:
  14089. (JSC::JSObject::prototype):
  14090. * runtime/JSStaticScopeObject.cpp:
  14091. (JSC::JSStaticScopeObject::markChildren):
  14092. * runtime/JSValue.h:
  14093. (JSC::JSValue::):
  14094. (JSC::JSValue::JSValue):
  14095. (JSC::JSValue::asCell):
  14096. * runtime/MarkStack.h:
  14097. * runtime/NativeErrorConstructor.cpp:
  14098. * runtime/NativeErrorConstructor.h:
  14099. * runtime/Structure.h:
  14100. (JSC::Structure::storedPrototype):
  14101. 2010-08-04 Gavin Barraclough <barraclough@apple.com>
  14102. Rubber stamped by Sam Weinig.
  14103. Enable JSVALUE64 for CPU(PPC64).
  14104. Basic browsing seems to work.
  14105. * wtf/Platform.h:
  14106. 2010-08-04 Nathan Lawrence <nlawrence@apple.com>
  14107. Reviewed by Darin Adler.
  14108. Refactoring MarkStack::append to take a reference. This is in
  14109. preparation for movable objects when we will need to update pointers.
  14110. http://bugs.webkit.org/show_bug.cgi?id=41177
  14111. Unless otherwise noted, all changes are to either return by reference
  14112. or pass a reference to MarkStack::append.
  14113. * bytecode/CodeBlock.cpp:
  14114. (JSC::CodeBlock::markAggregate):
  14115. * runtime/Collector.cpp:
  14116. (JSC::Heap::markConservatively):
  14117. Added a temporary variable to prevent marking from changing an
  14118. unknown value on the stack
  14119. * runtime/JSCell.h:
  14120. (JSC::JSValue::asCell):
  14121. (JSC::MarkStack::append):
  14122. (JSC::MarkStack::appendInternal):
  14123. * runtime/JSGlobalObject.cpp:
  14124. (JSC::markIfNeeded):
  14125. * runtime/JSONObject.cpp:
  14126. (JSC::Stringifier::Holder::object):
  14127. * runtime/JSObject.h:
  14128. (JSC::JSObject::prototype):
  14129. * runtime/JSStaticScopeObject.cpp:
  14130. (JSC::JSStaticScopeObject::markChildren):
  14131. * runtime/JSValue.h:
  14132. (JSC::JSValue::JSValue):
  14133. (JSC::JSValue::asCell):
  14134. * runtime/MarkStack.h:
  14135. * runtime/NativeErrorConstructor.cpp:
  14136. (JSC::NativeErrorConstructor::createStructure):
  14137. Changed the structure flags to include a custom markChildren.
  14138. (JSC::NativeErrorConstructor::markChildren):
  14139. Update the prototype of the stored structure.
  14140. * runtime/NativeErrorConstructor.h:
  14141. Added structure flags.
  14142. * runtime/Structure.h:
  14143. (JSC::Structure::storedPrototype):
  14144. 2010-08-03 Nathan Lawrence <nlawrence@apple.com>
  14145. Reviewed by Oliver Hunt.
  14146. Tightened up some get_by_id_chain* code generation
  14147. https://bugs.webkit.org/show_bug.cgi?id=40935
  14148. This is in the style of
  14149. https://bugs.webkit.org/show_bug.cgi?id=30539, and changed code to
  14150. call accessor functions when it was not necessary to directly access
  14151. the private variables.
  14152. * jit/JIT.h:
  14153. * jit/JITPropertyAccess.cpp:
  14154. (JSC::JIT::compileGetDirectOffset):
  14155. (JSC::JIT::testPrototype):
  14156. (JSC::JIT::privateCompilePutByIdTransition):
  14157. (JSC::JIT::privateCompileGetByIdChainList):
  14158. (JSC::JIT::privateCompileGetByIdChain):
  14159. * jit/JITPropertyAccess32_64.cpp:
  14160. (JSC::JIT::testPrototype):
  14161. (JSC::JIT::privateCompilePutByIdTransition):
  14162. (JSC::JIT::privateCompileGetByIdChainList):
  14163. (JSC::JIT::privateCompileGetByIdChain):
  14164. 2010-08-03 Adam Roben <aroben@apple.com>
  14165. Turn on PLATFORM_STRATEGIES on Windows
  14166. Fixes <http://webkit.org/b/43431>.
  14167. Reviewed by Anders Carlsson.
  14168. * wtf/Platform.h:
  14169. 2010-08-04 Gabor Loki <loki@webkit.org>
  14170. Reviewed by Geoffrey Garen.
  14171. Enable JSValue32_64 for GCC on ARM by default
  14172. https://bugs.webkit.org/show_bug.cgi?id=43410
  14173. * wtf/Platform.h:
  14174. 2010-08-03 Gavin Barraclough <barraclough@apple.com>
  14175. Speculative windows build fix.
  14176. * wtf/Bitmap.h:
  14177. 2010-08-03 Gavin Barraclough <barraclough@apple.com>
  14178. Build fix following r64624.
  14179. * JavaScriptCore.xcodeproj/project.pbxproj:
  14180. * wtf/PageAllocation.h:
  14181. 2010-08-03 Nathan Lawrence <nlawrence@apple.com>
  14182. Reviewed by Gavin Barraclough.
  14183. https://bugs.webkit.org/show_bug.cgi?id=43269
  14184. Added new allocateAligned methods to PageAllocation. In order to
  14185. prevent a regress in performance, the function needs to be inlined.
  14186. Additionally, I ported the symbian block allocator to use
  14187. PageAllocation and added a new WTF::Bitmap class to support this.
  14188. * GNUmakefile.am:
  14189. * JavaScriptCore.gypi:
  14190. * JavaScriptCore.xcodeproj/project.pbxproj:
  14191. * runtime/AlignedMemoryAllocator.h: Added.
  14192. (JSC::AlignedMemory::deallocate):
  14193. (JSC::AlignedMemory::base):
  14194. (JSC::AlignedMemory::AlignedMemory):
  14195. (JSC::AlignedMemoryAllocator::destroy):
  14196. (JSC::AlignedMemoryAllocator::allocate):
  14197. (JSC::AlignedMemoryAllocator::AlignedMemoryAllocator):
  14198. (JSC::AlignedMemoryAllocator::~AlignedMemoryAllocator):
  14199. (JSC::AlignedMemoryAllocator::free):
  14200. * runtime/Collector.cpp:
  14201. (JSC::Heap::Heap):
  14202. (JSC::Heap::destroy):
  14203. (JSC::Heap::allocateBlock):
  14204. (JSC::Heap::freeBlock):
  14205. (JSC::Heap::freeBlocks):
  14206. (JSC::Heap::allocate):
  14207. (JSC::Heap::shrinkBlocks):
  14208. (JSC::Heap::markConservatively):
  14209. (JSC::Heap::clearMarkBits):
  14210. (JSC::Heap::markedCells):
  14211. * runtime/Collector.h:
  14212. (JSC::CollectorHeap::collectorBlock):
  14213. * runtime/CollectorHeapIterator.h:
  14214. (JSC::CollectorHeapIterator::operator*):
  14215. (JSC::LiveObjectIterator::operator++):
  14216. (JSC::DeadObjectIterator::operator++):
  14217. * wtf/Bitmap.h: Added.
  14218. (WTF::Bitmap::get):
  14219. (WTF::Bitmap::set):
  14220. (WTF::Bitmap::clear):
  14221. (WTF::Bitmap::clearAll):
  14222. (WTF::Bitmap::advanceToNextFreeBit):
  14223. (WTF::Bitmap::count):
  14224. (WTF::Bitmap::isEmpty):
  14225. (WTF::Bitmap::isFull):
  14226. * wtf/PageAllocation.h:
  14227. (WTF::PageAllocation::operator UnspecifiedBoolType):
  14228. (WTF::PageAllocation::allocateAligned):
  14229. (WTF::PageAllocation::reserveAligned):
  14230. * wtf/Platform.h:
  14231. * wtf/symbian: Removed.
  14232. * wtf/symbian/BlockAllocatorSymbian.cpp: Removed.
  14233. * wtf/symbian/BlockAllocatorSymbian.h: Removed.
  14234. 2010-08-03 Michael Saboff <msaboff@apple.com>
  14235. Reviewed by Gavin Barraclough.
  14236. Fix for https://bugs.webkit.org/show_bug.cgi?id=43314. The prior code
  14237. was using the wrong "length" value to move array contents when adding
  14238. space to the beginning of an array for an unshift() or similar
  14239. operation. Instead of using m_vectorLength, the length of the
  14240. allocated JSValue array, the code was using m_length, the declared
  14241. length of the array. These two values do not need to match.
  14242. * JavaScriptCore.xcodeproj/project.pbxproj:
  14243. * runtime/JSArray.cpp:
  14244. (JSC::JSArray::increaseVectorPrefixLength):
  14245. 2010-08-03 Chao-ying Fu <fu@mips.com>
  14246. Reviewed by Gavin Barraclough.
  14247. Fix following https://bugs.webkit.org/show_bug.cgi?id=43089
  14248. (accidentally inverted a compiler version check).
  14249. * jit/ExecutableAllocator.h:
  14250. (JSC::ExecutableAllocator::cacheFlush):
  14251. 2010-08-03 Patrick Gansterer <paroga@paroga.com>
  14252. Reviewed by Gavin Barraclough.
  14253. Implement DEFINE_STUB_FUNCTION for WinCE.
  14254. https://bugs.webkit.org/show_bug.cgi?id=34953
  14255. * jit/JITStubs.cpp:
  14256. (JSC::):
  14257. (JSC::DEFINE_STUB_FUNCTION):
  14258. 2010-08-02 Gavin Barraclough <barraclough@apple.com>
  14259. Reviewed by Oliver Hunt.
  14260. Bug 43390 - Do not CRASH if we run out of room for jit code.
  14261. Change the ExecutableAllocator implementations not to crash, and to return 0 if memory cannot be allocated.
  14262. The assemblers should pass this through without trying to use it in executableCopy.
  14263. Change the LinkBuffer to handle this, and to provide an allocationSuccessful() method to test for this.
  14264. Change the JIT to throw an exception if allocation fails.
  14265. Make JIT optimizations fail gracefully if memory cannot be allocated (use non-optimized path).
  14266. Change YARR JIT to fallback to PCRE
  14267. * assembler/ARMAssembler.cpp:
  14268. (JSC::ARMAssembler::executableCopy):
  14269. * assembler/ARMv7Assembler.h:
  14270. (JSC::ARMv7Assembler::executableCopy):
  14271. * assembler/LinkBuffer.h:
  14272. (JSC::LinkBuffer::allocationSuccessful):
  14273. * assembler/MIPSAssembler.h:
  14274. (JSC::MIPSAssembler::executableCopy):
  14275. * assembler/X86Assembler.h:
  14276. (JSC::X86Assembler::executableCopy):
  14277. * bytecode/StructureStubInfo.h:
  14278. (JSC::StructureStubInfo::initGetByIdProto):
  14279. (JSC::StructureStubInfo::initGetByIdChain):
  14280. (JSC::StructureStubInfo::initGetByIdSelfList):
  14281. (JSC::StructureStubInfo::initGetByIdProtoList):
  14282. (JSC::StructureStubInfo::initPutByIdTransition):
  14283. * jit/ExecutableAllocator.cpp:
  14284. (JSC::ExecutablePool::systemAlloc):
  14285. * jit/ExecutableAllocatorFixedVMPool.cpp:
  14286. (JSC::FixedVMPoolAllocator::allocInternal):
  14287. * jit/JIT.cpp:
  14288. (JSC::JIT::privateCompile):
  14289. * jit/JIT.h:
  14290. (JSC::JIT::compileGetByIdProto):
  14291. (JSC::JIT::compileGetByIdSelfList):
  14292. (JSC::JIT::compileGetByIdProtoList):
  14293. (JSC::JIT::compileGetByIdChainList):
  14294. (JSC::JIT::compileGetByIdChain):
  14295. (JSC::JIT::compilePutByIdTransition):
  14296. (JSC::JIT::compilePatchGetArrayLength):
  14297. * jit/JITOpcodes.cpp:
  14298. (JSC::JIT::privateCompileCTIMachineTrampolines):
  14299. * jit/JITOpcodes32_64.cpp:
  14300. (JSC::JIT::privateCompileCTIMachineTrampolines):
  14301. (JSC::JIT::privateCompileCTINativeCall):
  14302. * jit/JITPropertyAccess.cpp:
  14303. (JSC::JIT::stringGetByValStubGenerator):
  14304. (JSC::JIT::privateCompilePutByIdTransition):
  14305. (JSC::JIT::privateCompilePatchGetArrayLength):
  14306. (JSC::JIT::privateCompileGetByIdProto):
  14307. (JSC::JIT::privateCompileGetByIdSelfList):
  14308. (JSC::JIT::privateCompileGetByIdProtoList):
  14309. (JSC::JIT::privateCompileGetByIdChainList):
  14310. (JSC::JIT::privateCompileGetByIdChain):
  14311. * jit/JITPropertyAccess32_64.cpp:
  14312. (JSC::JIT::stringGetByValStubGenerator):
  14313. (JSC::JIT::privateCompilePutByIdTransition):
  14314. (JSC::JIT::privateCompilePatchGetArrayLength):
  14315. (JSC::JIT::privateCompileGetByIdProto):
  14316. (JSC::JIT::privateCompileGetByIdSelfList):
  14317. (JSC::JIT::privateCompileGetByIdProtoList):
  14318. (JSC::JIT::privateCompileGetByIdChainList):
  14319. (JSC::JIT::privateCompileGetByIdChain):
  14320. * jit/JITStubs.cpp:
  14321. (JSC::JITThunks::tryCachePutByID):
  14322. (JSC::JITThunks::tryCacheGetByID):
  14323. (JSC::DEFINE_STUB_FUNCTION):
  14324. (JSC::setupPolymorphicProtoList):
  14325. * jit/JITStubs.h:
  14326. * jit/SpecializedThunkJIT.h:
  14327. (JSC::SpecializedThunkJIT::finalize):
  14328. * runtime/ExceptionHelpers.cpp:
  14329. (JSC::createOutOfMemoryError):
  14330. * runtime/ExceptionHelpers.h:
  14331. * runtime/Executable.cpp:
  14332. (JSC::EvalExecutable::compileInternal):
  14333. (JSC::ProgramExecutable::compileInternal):
  14334. (JSC::FunctionExecutable::compileForCallInternal):
  14335. (JSC::FunctionExecutable::compileForConstructInternal):
  14336. (JSC::FunctionExecutable::reparseExceptionInfo):
  14337. (JSC::EvalExecutable::reparseExceptionInfo):
  14338. * yarr/RegexJIT.cpp:
  14339. (JSC::Yarr::RegexGenerator::compile):
  14340. 2010-08-03 Geoffrey Garen <ggaren@apple.com>
  14341. Reviewed by Oliver Hunt.
  14342. Fixed a crash seen on the GTK 64bit buildbot.
  14343. When JSArray is allocated for the vptr stealing hack, it's not allocated
  14344. in the heap, so the JSArray constructor can't safely call Heap::heap().
  14345. Since this was subtle enough to confuse smart people, I've changed JSArray
  14346. to have an explicit vptr stealing constructor.
  14347. * JavaScriptCore.xcodeproj/project.pbxproj:
  14348. * runtime/JSArray.cpp:
  14349. (JSC::JSArray::JSArray):
  14350. * runtime/JSArray.h:
  14351. (JSC::JSArray::):
  14352. * runtime/JSGlobalData.cpp:
  14353. (JSC::JSGlobalData::storeVPtrs):
  14354. 2010-08-03 Alex Milowski <alex@milowski.com>
  14355. Reviewed by Beth Dakin.
  14356. Changed the ENABLE_MATHML value to enable MathML by default.
  14357. * Configurations/FeatureDefines.xcconfig:
  14358. 2010-08-03 Michael Saboff <msaboff@apple.com>
  14359. Reviewed by Gavin Barraclough.
  14360. Change to keep returned pointer from malloc family functions to
  14361. quiet memory leak detect. The pointer is saved in the new m_allocBase
  14362. member of the ArrayStorage structure. This fixes the issue found in
  14363. https://bugs.webkit.org/show_bug.cgi?id=43229.
  14364. As part of this change, we use m_allocBase when reallocating and
  14365. freeing the memory associated with ArrayStorage.
  14366. * runtime/JSArray.cpp:
  14367. (JSC::JSArray::JSArray):
  14368. (JSC::JSArray::~JSArray):
  14369. (JSC::JSArray::putSlowCase):
  14370. (JSC::JSArray::increaseVectorLength):
  14371. (JSC::JSArray::increaseVectorPrefixLength):
  14372. * runtime/JSArray.h:
  14373. 2010-08-03 Geoffrey Garen <ggaren@apple.com>
  14374. Reviewed by Mark Rowe.
  14375. https://bugs.webkit.org/show_bug.cgi?id=43444
  14376. PLATFORM(CF) is false on Windows in JavaScriptCore
  14377. Moved some PLATFORM(WIN) #defines down into JavaScriptCore.
  14378. * wtf/Platform.h: Added WTF_PLATFORM_CF 1 and WTF_USE_PTHREADS 0, inherited
  14379. from WebCore/config.h. Removed WTF_USE_WININET 1 since WebCore/config.h
  14380. just #undefined that later.
  14381. 2010-08-03 Geoffrey Garen <ggaren@apple.com>
  14382. Try to fix Windows build: Don't use GCActivityCallbackCF on Windows, since
  14383. PLATFORM(CF) is not defined on Windows.
  14384. We'll need to enable the GC activity callback some other way, but this
  14385. change should get the build back to normal.
  14386. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  14387. * runtime/GCActivityCallbackCF.cpp: Make it easier to detect this error
  14388. in the future with an explicit error message.
  14389. 2010-08-03 Geoffrey Garen <ggaren@apple.com>
  14390. Try to fix Windows build: update .def file.
  14391. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  14392. 2010-08-03 Nathan Lawrence <nlawrence@apple.com>
  14393. Reviewed by Oliver Hunt.
  14394. https://bugs.webkit.org/show_bug.cgi?id=41318
  14395. GC should reclaim garbage even when new objects are not being allocated rapidly
  14396. Added a callback in JavaScriptCore that gets triggered after an
  14397. allocation causes the heap to reset. This is useful for adding a
  14398. timer that will trigger garbage collection after the "last" allocation.
  14399. Also needed was to add lock and unlock methods to JSLock that needed
  14400. only a JSGlobalData object versus an ExecState object.
  14401. * CMakeLists.txt:
  14402. * GNUmakefile.am:
  14403. * JavaScriptCore.exp:
  14404. * JavaScriptCore.gypi:
  14405. * JavaScriptCore.pro:
  14406. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  14407. * JavaScriptCore.xcodeproj/project.pbxproj:
  14408. * jit/JITPropertyAccess.cpp:
  14409. (JSC::JIT::emit_op_put_by_val):
  14410. * runtime/Collector.cpp:
  14411. (JSC::Heap::Heap):
  14412. (JSC::Heap::reset):
  14413. (JSC::Heap::setActivityCallback):
  14414. * runtime/Collector.h:
  14415. * runtime/GCActivityCallback.cpp: Added.
  14416. (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
  14417. (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
  14418. (JSC::DefaultGCActivityCallback::operator()):
  14419. * runtime/GCActivityCallback.h: Added.
  14420. (JSC::GCActivityCallback::~GCActivityCallback):
  14421. (JSC::GCActivityCallback::operator()):
  14422. (JSC::GCActivityCallback::GCActivityCallback):
  14423. (JSC::DefaultGCActivityCallback::create):
  14424. * runtime/GCActivityCallbackCF.cpp: Added.
  14425. (JSC::DefaultGCActivityCallbackPlatformData::trigger):
  14426. (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
  14427. (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
  14428. (JSC::DefaultGCActivityCallback::operator()):
  14429. * runtime/JSLock.cpp:
  14430. (JSC::JSLock::JSLock):
  14431. * runtime/JSLock.h:
  14432. 2010-08-02 Kevin Ollivier <kevino@theolliviers.com>
  14433. [wx] Build fix after removal of need to compile ExecutableAllocatorPosix.cpp
  14434. * wscript:
  14435. 2010-08-02 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
  14436. Reviewed by Simon Hausmann.
  14437. [QT] build fix for symbian
  14438. https://bugs.webkit.org/show_bug.cgi?id=43234
  14439. 1) wrong order of passing param's
  14440. 2) static_cast complains on symbian so using reinterpret_cast
  14441. No new tests added. Just a build fix for qt symbian
  14442. * wtf/PageAllocation.cpp:
  14443. (WTF::PageAllocation::commit):
  14444. (WTF::PageAllocation::decommit):
  14445. (WTF::PageAllocation::reserve):
  14446. 2010-07-30 Luiz Agostini <luiz.agostini@openbossa.org>
  14447. Reviewed by Simon Fraser.
  14448. Enabling view modes to all platforms
  14449. https://bugs.webkit.org/show_bug.cgi?id=37505
  14450. Removing ENABLE_WIDGETS_10_SUPPORT flag.
  14451. As view mode media feature is not part of widget 1.0 specification
  14452. any more the ENABLE_WIDGETS_10_SUPPORT flag may be removed. The only use
  14453. of this flag was related to view mode media feature implementation in Qt.
  14454. * wtf/Platform.h:
  14455. 2010-07-30 Andy Estes <aestes@apple.com>
  14456. Reviewed by David Kilzer.
  14457. Add Xcode support for compiling WebKit against iOS SDKs.
  14458. https://bugs.webkit.org/show_bug.cgi?id=42796
  14459. * Configurations/Base.xcconfig:
  14460. * Configurations/DebugRelease.xcconfig:
  14461. * Configurations/FeatureDefines.xcconfig:
  14462. 2010-07-30 Dumitru Daniliuc <dumi@chromium.org>
  14463. Reviewed by Davin Levin.
  14464. Added a yield() function.
  14465. https://bugs.webkit.org/show_bug.cgi?id=42843
  14466. * JavaScriptCore.exp:
  14467. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  14468. * wtf/Threading.h:
  14469. * wtf/ThreadingPthreads.cpp:
  14470. (WTF::yield):
  14471. * wtf/ThreadingWin.cpp:
  14472. (WTF::yield):
  14473. * wtf/gtk/ThreadingGtk.cpp:
  14474. (WTF::yield):
  14475. * wtf/qt/ThreadingQt.cpp:
  14476. (WTF::yield):
  14477. 2010-07-30 Rafael Antognolli <antognolli@profusion.mobi>
  14478. Reviewed by Antonio Gomes.
  14479. [EFL] Add library version and soname to EFL generated libraries and binary.
  14480. https://bugs.webkit.org/show_bug.cgi?id=43212
  14481. Add version and soname to libjavascriptcore.so and libwtf.so in case of
  14482. linking as shared libraries, and version to jsc executable.
  14483. * CMakeLists.txt:
  14484. * jsc/CMakeLists.txt:
  14485. * wtf/CMakeLists.txt:
  14486. 2010-07-30 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
  14487. Reviewed by Simon Hausmann.
  14488. [QT] build fix for symbian
  14489. https://bugs.webkit.org/show_bug.cgi?id=43234
  14490. * wtf/PageAllocation.h:
  14491. (WTF::PageAllocation::PageAllocation):
  14492. 2010-07-29 Sheriff Bot <webkit.review.bot@gmail.com>
  14493. Unreviewed, rolling out r64313.
  14494. http://trac.webkit.org/changeset/64313
  14495. https://bugs.webkit.org/show_bug.cgi?id=43233
  14496. Some Chromium bots are not happy with it for some unknown
  14497. reason. (Requested by dumi on #webkit).
  14498. * JavaScriptCore.exp:
  14499. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  14500. * wtf/Threading.h:
  14501. * wtf/ThreadingPthreads.cpp:
  14502. * wtf/ThreadingWin.cpp:
  14503. * wtf/gtk/ThreadingGtk.cpp:
  14504. * wtf/qt/ThreadingQt.cpp:
  14505. 2010-07-29 Sheriff Bot <webkit.review.bot@gmail.com>
  14506. Unreviewed, rolling out r64302.
  14507. http://trac.webkit.org/changeset/64302
  14508. https://bugs.webkit.org/show_bug.cgi?id=43223
  14509. Assertion is bogus (Requested by olliej on #webkit).
  14510. * assembler/ARMAssembler.cpp:
  14511. (JSC::ARMAssembler::executableCopy):
  14512. * assembler/AssemblerBuffer.h:
  14513. (JSC::AssemblerBuffer::putShortUnchecked):
  14514. (JSC::AssemblerBuffer::putIntUnchecked):
  14515. (JSC::AssemblerBuffer::putInt64Unchecked):
  14516. * jit/JITStubs.cpp:
  14517. * pcre/pcre_compile.cpp:
  14518. (jsRegExpCompile):
  14519. * wtf/FastMalloc.cpp:
  14520. (WTF::PageHeapAllocator::New):
  14521. (WTF::TCMalloc_Central_FreeList::Populate):
  14522. * wtf/MD5.cpp:
  14523. (WTF::reverseBytes):
  14524. (WTF::MD5::addBytes):
  14525. (WTF::MD5::checksum):
  14526. * wtf/StdLibExtras.h:
  14527. * wtf/Vector.h:
  14528. (WTF::VectorBuffer::inlineBuffer):
  14529. * wtf/qt/StringQt.cpp:
  14530. (WebCore::String::String):
  14531. 2010-07-29 Michael Saboff <msaboff@apple.com>
  14532. Reviewed by Gavin Barraclough.
  14533. Changed the handling for removing and adding elements at the front
  14534. of an array. The code now keeps a bias that indicates the amount of
  14535. JSValue sized holes are prior to the ArrayStorage block. This means
  14536. that shift operations are now memmove's of the header part of
  14537. the ArrayStorage and unshift operations are similar, but may require a
  14538. realloc first to create the space. Similar operations are performed
  14539. for special cases of splice and slice.
  14540. Also optimized the new Array(size) case so that we don't allocate and
  14541. initialize array elements until the JS code starts using elements.
  14542. The array growth code is slightly more aggressive for initial growth
  14543. based on size growth of any previous array.
  14544. * Configurations/JavaScriptCore.xcconfig:
  14545. * jit/JITPropertyAccess.cpp:
  14546. (JSC::JIT::emit_op_get_by_val):
  14547. (JSC::JIT::emit_op_put_by_val):
  14548. (JSC::JIT::privateCompilePatchGetArrayLength):
  14549. * jit/JITPropertyAccess32_64.cpp:
  14550. (JSC::JIT::emit_op_get_by_val):
  14551. (JSC::JIT::emit_op_put_by_val):
  14552. (JSC::JIT::privateCompilePatchGetArrayLength):
  14553. * runtime/ArrayPrototype.cpp:
  14554. (JSC::arrayProtoFuncShift):
  14555. (JSC::arrayProtoFuncSplice):
  14556. (JSC::arrayProtoFuncUnShift):
  14557. * runtime/JSArray.cpp:
  14558. (JSC::JSArray::JSArray):
  14559. (JSC::JSArray::~JSArray):
  14560. (JSC::JSArray::getOwnPropertySlot):
  14561. (JSC::JSArray::getOwnPropertyDescriptor):
  14562. (JSC::JSArray::put):
  14563. (JSC::JSArray::putSlowCase):
  14564. (JSC::JSArray::deleteProperty):
  14565. (JSC::JSArray::getOwnPropertyNames):
  14566. (JSC::JSArray::getNewVectorLength):
  14567. (JSC::JSArray::increaseVectorLength):
  14568. (JSC::JSArray::increaseVectorPrefixLength):
  14569. (JSC::JSArray::setLength):
  14570. (JSC::JSArray::pop):
  14571. (JSC::JSArray::push):
  14572. (JSC::JSArray::shiftCount):
  14573. (JSC::JSArray::unshiftCount):
  14574. (JSC::JSArray::sortNumeric):
  14575. (JSC::JSArray::sort):
  14576. (JSC::JSArray::fillArgList):
  14577. (JSC::JSArray::copyToRegisters):
  14578. (JSC::JSArray::compactForSorting):
  14579. (JSC::JSArray::subclassData):
  14580. (JSC::JSArray::setSubclassData):
  14581. (JSC::JSArray::checkConsistency):
  14582. * runtime/JSArray.h:
  14583. (JSC::JSArray::length):
  14584. (JSC::JSArray::canGetIndex):
  14585. (JSC::JSArray::getIndex):
  14586. (JSC::JSArray::setIndex):
  14587. (JSC::JSArray::uncheckedSetIndex):
  14588. (JSC::JSArray::arrayStorage):
  14589. (JSC::JSArray::setArrayStorage):
  14590. (JSC::JSArray::markChildrenDirect):
  14591. 2010-07-29 Michael Saboff <msaboff@apple.com>
  14592. Reviewed by Darin Adler.
  14593. Changed MINIMUM_CELL_SIZE to be fixed at 64 bytes.
  14594. * runtime/Collector.h:
  14595. 2010-07-28 Dumitru Daniliuc <dumi@chromium.org>
  14596. Reviewed by David Levin.
  14597. Added a yield() function.
  14598. https://bugs.webkit.org/show_bug.cgi?id=42843
  14599. * JavaScriptCore.exp:
  14600. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  14601. * wtf/Threading.h:
  14602. * wtf/ThreadingPthreads.cpp:
  14603. (WTF::yield):
  14604. * wtf/ThreadingWin.cpp:
  14605. (WTF::yield):
  14606. * wtf/gtk/ThreadingGtk.cpp:
  14607. (WTF::yield):
  14608. * wtf/qt/ThreadingQt.cpp:
  14609. (WTF::yield):
  14610. 2010-07-29 Michael Saboff <msaboff@apple.com>
  14611. Reviewed by Oliver Hunt.
  14612. Fixed issue where RegExp greedy jit code loops when no input is
  14613. consumed. Changed the code to only loop if some input was consumed,
  14614. but fall through if we successfully match an alternative that
  14615. doesn't consume any input.
  14616. https://bugs.webkit.org/show_bug.cgi?id=42664
  14617. * yarr/RegexJIT.cpp:
  14618. (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
  14619. 2010-07-29 Gabor Loki <loki@webkit.org>
  14620. Reviewed by Gavin Barraclough.
  14621. Avoid increasing required alignment of target type warning on ARM
  14622. https://bugs.webkit.org/show_bug.cgi?id=38045
  14623. The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
  14624. sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
  14625. increases required alignment of target type warnings.
  14626. Casting the type of [pointer to Type2] object to void* bypasses the
  14627. warning.
  14628. * assembler/ARMAssembler.cpp:
  14629. (JSC::ARMAssembler::executableCopy):
  14630. * assembler/AssemblerBuffer.h:
  14631. (JSC::AssemblerBuffer::putShortUnchecked):
  14632. (JSC::AssemblerBuffer::putIntUnchecked):
  14633. (JSC::AssemblerBuffer::putInt64Unchecked):
  14634. * jit/JITStubs.cpp:
  14635. * pcre/pcre_compile.cpp:
  14636. (jsRegExpCompile):
  14637. * wtf/FastMalloc.cpp:
  14638. (WTF::PageHeapAllocator::New):
  14639. (WTF::TCMalloc_Central_FreeList::Populate):
  14640. * wtf/MD5.cpp:
  14641. (WTF::reverseBytes):
  14642. (WTF::MD5::addBytes):
  14643. (WTF::MD5::checksum):
  14644. * wtf/StdLibExtras.h:
  14645. (reinterpret_cast_ptr):
  14646. * wtf/Vector.h:
  14647. (WTF::VectorBuffer::inlineBuffer):
  14648. * wtf/qt/StringQt.cpp:
  14649. (WebCore::String::String):
  14650. 2010-07-29 Martin Robinson <mrobinson@igalia.com>
  14651. Unreviewed build fix.
  14652. Include a missing header in the source list to fix 'make dist.'
  14653. * GNUmakefile.am: Include missing header.
  14654. 2010-07-28 Gavin Barraclough <barraclough@apple.com>
  14655. Reviewed by Darin Adler.
  14656. Bug 43162 - Add support for MADV_FREE to PageAllocation.
  14657. * wtf/PageAllocation.cpp:
  14658. (WTF::PageAllocation::commit):
  14659. (WTF::PageAllocation::decommit):
  14660. 2010-07-27 Kinuko Yasuda <kinuko@chromium.org>
  14661. Reviewed by Ojan Vafai.
  14662. Add FILE_SYSTEM build flag for FileSystem API
  14663. https://bugs.webkit.org/show_bug.cgi?id=42915
  14664. * Configurations/FeatureDefines.xcconfig:
  14665. 2010-07-27 Gavin Barraclough <barraclough@apple.com>
  14666. Temporarily rolling out http://trac.webkit.org/changeset/64177,
  14667. this seems to give QT ARM/Win a headache (specifically, looks
  14668. like structure layour differs, objects get too large -
  14669. "..\..\..\JavaScriptCore\runtime\ArrayPrototype.cpp:41:"
  14670. "error: size of array 'dummyclass_fits_in_cell' is negative").
  14671. * jit/JITPropertyAccess.cpp:
  14672. (JSC::JIT::emit_op_get_by_val):
  14673. (JSC::JIT::emit_op_put_by_val):
  14674. (JSC::JIT::privateCompilePatchGetArrayLength):
  14675. * jit/JITPropertyAccess32_64.cpp:
  14676. (JSC::JIT::emit_op_get_by_val):
  14677. (JSC::JIT::emit_op_put_by_val):
  14678. (JSC::JIT::privateCompilePatchGetArrayLength):
  14679. * runtime/ArrayPrototype.cpp:
  14680. (JSC::arrayProtoFuncShift):
  14681. (JSC::arrayProtoFuncSplice):
  14682. (JSC::arrayProtoFuncUnShift):
  14683. * runtime/JSArray.cpp:
  14684. (JSC::increasedVectorLength):
  14685. (JSC::JSArray::JSArray):
  14686. (JSC::JSArray::~JSArray):
  14687. (JSC::JSArray::getOwnPropertySlot):
  14688. (JSC::JSArray::getOwnPropertyDescriptor):
  14689. (JSC::JSArray::put):
  14690. (JSC::JSArray::putSlowCase):
  14691. (JSC::JSArray::deleteProperty):
  14692. (JSC::JSArray::getOwnPropertyNames):
  14693. (JSC::JSArray::increaseVectorLength):
  14694. (JSC::JSArray::setLength):
  14695. (JSC::JSArray::pop):
  14696. (JSC::JSArray::push):
  14697. (JSC::JSArray::sortNumeric):
  14698. (JSC::JSArray::sort):
  14699. (JSC::JSArray::fillArgList):
  14700. (JSC::JSArray::copyToRegisters):
  14701. (JSC::JSArray::compactForSorting):
  14702. (JSC::JSArray::subclassData):
  14703. (JSC::JSArray::setSubclassData):
  14704. (JSC::JSArray::checkConsistency):
  14705. * runtime/JSArray.h:
  14706. (JSC::JSArray::length):
  14707. (JSC::JSArray::canGetIndex):
  14708. (JSC::JSArray::getIndex):
  14709. (JSC::JSArray::setIndex):
  14710. (JSC::JSArray::uncheckedSetIndex):
  14711. (JSC::JSArray::markChildrenDirect):
  14712. 2010-07-27 Gavin Barraclough <barraclough@apple.com>
  14713. Speculative build fix for Chromium/Win
  14714. * wtf/Platform.h:
  14715. 2010-07-27 Gavin Barraclough <barraclough@apple.com>
  14716. Oh! that makes more sense! Maybe C++-style comments are bringing teh bad mojo.
  14717. * wtf/Platform.h:
  14718. 2010-07-27 Gavin Barraclough <barraclough@apple.com>
  14719. Speculative build fix for GTK/64 ... seems to be barfing on a comment o_O
  14720. * wtf/Platform.h:
  14721. 2010-07-27 Michael Saboff <msaboff@apple.com>
  14722. Reviewed by Gavin Barraclough.
  14723. Changed the handling for removing and adding elements at the front
  14724. of an array. The code now keeps a bias that indicates the amount of
  14725. JSValue sized holes are prior to the ArrayStorage block. This means
  14726. that shift operations are now memmove's of the header part of
  14727. the ArrayStorage and unshift operations are similar, but may require a
  14728. realloc first to create the space. Similar operations are performed
  14729. for special cases of splice and slice.
  14730. Also optimized the new Array(size) case so that we don't allocate and
  14731. initialize array elements until the JS code starts using elements.
  14732. The array growth code is slightly more aggressive for initial growth
  14733. based on size growth of any previous array.
  14734. * Configurations/JavaScriptCore.xcconfig:
  14735. * jit/JITPropertyAccess.cpp:
  14736. (JSC::JIT::emit_op_get_by_val):
  14737. (JSC::JIT::emit_op_put_by_val):
  14738. (JSC::JIT::privateCompilePatchGetArrayLength):
  14739. * jit/JITPropertyAccess32_64.cpp:
  14740. (JSC::JIT::emit_op_get_by_val):
  14741. (JSC::JIT::emit_op_put_by_val):
  14742. (JSC::JIT::privateCompilePatchGetArrayLength):
  14743. * runtime/ArrayPrototype.cpp:
  14744. (JSC::arrayProtoFuncShift):
  14745. (JSC::arrayProtoFuncSplice):
  14746. (JSC::arrayProtoFuncUnShift):
  14747. * runtime/JSArray.cpp:
  14748. (JSC::JSArray::JSArray):
  14749. (JSC::JSArray::~JSArray):
  14750. (JSC::JSArray::getOwnPropertySlot):
  14751. (JSC::JSArray::getOwnPropertyDescriptor):
  14752. (JSC::JSArray::put):
  14753. (JSC::JSArray::putSlowCase):
  14754. (JSC::JSArray::deleteProperty):
  14755. (JSC::JSArray::getOwnPropertyNames):
  14756. (JSC::JSArray::getNewVectorLength):
  14757. (JSC::JSArray::increaseVectorLength):
  14758. (JSC::JSArray::increaseVectorPrefixLength):
  14759. (JSC::JSArray::setLength):
  14760. (JSC::JSArray::pop):
  14761. (JSC::JSArray::push):
  14762. (JSC::JSArray::shiftCount):
  14763. (JSC::JSArray::unshiftCount):
  14764. (JSC::JSArray::sortNumeric):
  14765. (JSC::JSArray::sort):
  14766. (JSC::JSArray::fillArgList):
  14767. (JSC::JSArray::copyToRegisters):
  14768. (JSC::JSArray::compactForSorting):
  14769. (JSC::JSArray::subclassData):
  14770. (JSC::JSArray::setSubclassData):
  14771. (JSC::JSArray::checkConsistency):
  14772. * runtime/JSArray.h:
  14773. (JSC::JSArray::length):
  14774. (JSC::JSArray::canGetIndex):
  14775. (JSC::JSArray::getIndex):
  14776. (JSC::JSArray::setIndex):
  14777. (JSC::JSArray::uncheckedSetIndex):
  14778. (JSC::JSArray::arrayStorage):
  14779. (JSC::JSArray::setArrayStorage):
  14780. (JSC::JSArray::markChildrenDirect):
  14781. 2010-07-27 Gavin Barraclough <barraclough@apple.com>
  14782. Reviewed by Oliver Hunt.
  14783. Bug 43089 - Cleanup JIT related switched in Platform.h
  14784. The code the enable to JIT checks every permutation of platform & OS individually, but
  14785. now the JIT is enabled on the majority much all x86/x86-64/ARM/MIPS systems. It should
  14786. be cleaner to just enable by default on these platforms, and explicitly disable on configs
  14787. that don't aren't supported.
  14788. Also, rename ENABLE_JIT_OPTIMIZE_MOD to ENABLE_JIT_USE_SOFT_MODULO. I always find this
  14789. confusing since enabling this "optimization" would be possible, but would be a regression
  14790. on x86/x86-64 systems! I think it's clearer to reserve "JIT_OPTIMIZE" for compiler
  14791. technologies applicable to all platforms, and make a more optional behaviour like this a
  14792. "USE".
  14793. * jit/ExecutableAllocator.h:
  14794. (JSC::ExecutableAllocator::cacheFlush):
  14795. * jit/JIT.h:
  14796. * jit/JITArithmetic.cpp:
  14797. (JSC::JIT::emit_op_mod):
  14798. (JSC::JIT::emitSlow_op_mod):
  14799. * jit/JITArithmetic32_64.cpp:
  14800. (JSC::JIT::emit_op_mod):
  14801. (JSC::JIT::emitSlow_op_mod):
  14802. * jit/JITOpcodes.cpp:
  14803. (JSC::JIT::privateCompileCTIMachineTrampolines):
  14804. * jit/JITOpcodes32_64.cpp:
  14805. (JSC::JIT::privateCompileCTIMachineTrampolines):
  14806. * wtf/Platform.h:
  14807. 2010-07-27 James Robinson <jamesr@chromium.org>
  14808. Reviewed by Darin Fisher.
  14809. [chromium] Make PLATFORM(CHROMIUM) and not OS(MAC) turn USE(GLES2_RENDERING) on
  14810. https://bugs.webkit.org/show_bug.cgi?id=43084
  14811. This turns USE(GLES2_RENDERING) on for chromium on windows/linux. This causes no
  14812. change in behavior, that's all controlled by ENABLE() macros that are currently off.
  14813. * wtf/Platform.h:
  14814. 2010-07-23 Helder Correia <heldercorreia@codeaurora.org>
  14815. Reviewed by Darin Adler.
  14816. Canvas tests 2d.imageData.object.round and 2d.imageData.object.wrap are
  14817. failing. For canvas image data manipulation, the values passed should
  14818. be truncated and wrapped. Also fix the canvas-ImageData-behaviour test
  14819. to expect wrapping rather than clamping, and add some new checkings.
  14820. https://bugs.webkit.org/show_bug.cgi?id=40272
  14821. * runtime/JSByteArray.h:
  14822. (JSC::JSByteArray::setIndex):
  14823. (JSC::JSByteArray::JSByteArray):
  14824. 2010-07-27 Gavin Barraclough <barraclough@apple.com>
  14825. Reviewed by Oliver Hunt.
  14826. Bug 42621 - Add a bump allocator for the YARR interpreter
  14827. The regex engine requires lifo allocation, however currently uses the general purpose
  14828. malloc/free memory allocation. A simple bump pointer allocator should provide a lower
  14829. overhead allocation solution.
  14830. When using YARR interpreter, 15% progression on v8-regex.
  14831. * JavaScriptCore.xcodeproj/project.pbxproj:
  14832. * runtime/JSGlobalData.h:
  14833. * runtime/RegExp.cpp:
  14834. (JSC::RegExp::compile):
  14835. * wtf/BumpPointerAllocator.h: Added.
  14836. (WTF::BumpPointerPool::ensureCapacity):
  14837. (WTF::BumpPointerPool::alloc):
  14838. (WTF::BumpPointerPool::dealloc):
  14839. (WTF::BumpPointerPool::operator new):
  14840. (WTF::BumpPointerPool::BumpPointerPool):
  14841. (WTF::BumpPointerPool::create):
  14842. (WTF::BumpPointerPool::shrink):
  14843. (WTF::BumpPointerPool::destroy):
  14844. (WTF::BumpPointerPool::ensureCapacityCrossPool):
  14845. (WTF::BumpPointerPool::deallocCrossPool):
  14846. (WTF::BumpPointerAllocator::BumpPointerAllocator):
  14847. (WTF::BumpPointerAllocator::~BumpPointerAllocator):
  14848. (WTF::BumpPointerAllocator::startAllocator):
  14849. (WTF::BumpPointerAllocator::stopAllocator):
  14850. * yarr/RegexInterpreter.cpp:
  14851. (JSC::Yarr::Interpreter::allocDisjunctionContext):
  14852. (JSC::Yarr::Interpreter::freeDisjunctionContext):
  14853. (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
  14854. (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
  14855. (JSC::Yarr::Interpreter::interpret):
  14856. (JSC::Yarr::Interpreter::Interpreter):
  14857. (JSC::Yarr::ByteCompiler::compile):
  14858. (JSC::Yarr::byteCompileRegex):
  14859. * yarr/RegexInterpreter.h:
  14860. (JSC::Yarr::BytecodePattern::BytecodePattern):
  14861. 2010-07-26 Gavin Barraclough <barraclough@apple.com>
  14862. Windows build fix from Chromium/GTK build fix!
  14863. * wtf/PageAllocation.cpp:
  14864. 2010-07-26 Gavin Barraclough <barraclough@apple.com>
  14865. Chromium/GTK build fix
  14866. * wtf/PageAllocation.cpp:
  14867. 2010-07-26 Gavin Barraclough <barraclough@apple.com>
  14868. Build fix for !Mac platforms.
  14869. * Android.mk:
  14870. * CMakeLists.txt:
  14871. * GNUmakefile.am:
  14872. * JavaScriptCore.gypi:
  14873. * JavaScriptCore.pro:
  14874. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  14875. 2010-07-26 Gavin Barraclough <barraclough@apple.com>
  14876. Reviewed by Oliver Hunt.
  14877. Bug 43009 - Abstract out page allocation from executable allocators
  14878. It would be great to have a single platform abstraction for block allocation, rather than copy/paste code.
  14879. In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory.
  14880. I think this will match current behaviour for the next client we will want to port across (RegisterFile &
  14881. Collector).
  14882. * CMakeListsEfl.txt:
  14883. * GNUmakefile.am:
  14884. * JavaScriptCore.gypi:
  14885. * JavaScriptCore.pro:
  14886. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  14887. * JavaScriptCore.xcodeproj/project.pbxproj:
  14888. * jit/ExecutableAllocator.cpp:
  14889. (JSC::ExecutableAllocator::intializePageSize):
  14890. (JSC::ExecutablePool::systemAlloc):
  14891. (JSC::ExecutablePool::systemRelease):
  14892. (JSC::ExecutableAllocator::isValid):
  14893. * jit/ExecutableAllocator.h:
  14894. (JSC::ExecutablePool::ExecutablePool):
  14895. (JSC::ExecutablePool::poolAllocate):
  14896. * jit/ExecutableAllocatorFixedVMPool.cpp:
  14897. (JSC::FixedVMPoolAllocator::release):
  14898. (JSC::FixedVMPoolAllocator::reuse):
  14899. (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
  14900. (JSC::FixedVMPoolAllocator::alloc):
  14901. (JSC::FixedVMPoolAllocator::free):
  14902. (JSC::FixedVMPoolAllocator::isValid):
  14903. (JSC::FixedVMPoolAllocator::isWithinVMPool):
  14904. (JSC::ExecutablePool::systemAlloc):
  14905. (JSC::ExecutablePool::systemRelease):
  14906. * jit/ExecutableAllocatorPosix.cpp: Removed.
  14907. * jit/ExecutableAllocatorSymbian.cpp: Removed.
  14908. * jit/ExecutableAllocatorWin.cpp: Removed.
  14909. * wscript:
  14910. * wtf/PageAllocator.cpp: Added.
  14911. (WTF::protection):
  14912. (WTF::PageAllocation::commit):
  14913. (WTF::PageAllocation::decommit):
  14914. (WTF::PageAllocator::allocate):
  14915. (WTF::PageAllocator::reserve):
  14916. (WTF::PageAllocator::deallocate):
  14917. (WTF::PageAllocator::pagesize):
  14918. * wtf/PageAllocator.h: Added.
  14919. (WTF::PageAllocation::PageAllocation):
  14920. (WTF::PageAllocation::base):
  14921. (WTF::PageAllocation::size):
  14922. (WTF::PageAllocation::chunk):
  14923. (WTF::PageAllocation::operator!):
  14924. (WTF::PageAllocator::):
  14925. 2010-07-26 Gavin Barraclough <barraclough@apple.com>
  14926. Rolling out r64097:64100, oops, more b0rked than I relized by my last changes, sorry!
  14927. * CMakeListsEfl.txt:
  14928. * GNUmakefile.am:
  14929. * JavaScriptCore.gypi:
  14930. * JavaScriptCore.pro:
  14931. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  14932. * JavaScriptCore.xcodeproj/project.pbxproj:
  14933. * jit/ExecutableAllocator.cpp:
  14934. (JSC::ExecutableAllocator::reprotectRegion):
  14935. (JSC::ExecutableAllocator::cacheFlush):
  14936. * jit/ExecutableAllocator.h:
  14937. (JSC::ExecutablePool::ExecutablePool):
  14938. (JSC::ExecutablePool::poolAllocate):
  14939. * jit/ExecutableAllocatorFixedVMPool.cpp:
  14940. (JSC::FixedVMPoolAllocator::release):
  14941. (JSC::FixedVMPoolAllocator::reuse):
  14942. (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
  14943. (JSC::FixedVMPoolAllocator::alloc):
  14944. (JSC::FixedVMPoolAllocator::free):
  14945. (JSC::FixedVMPoolAllocator::isValid):
  14946. (JSC::FixedVMPoolAllocator::isWithinVMPool):
  14947. (JSC::ExecutablePool::systemAlloc):
  14948. (JSC::ExecutablePool::systemRelease):
  14949. * jit/ExecutableAllocatorPosix.cpp: Added.
  14950. (JSC::ExecutableAllocator::intializePageSize):
  14951. (JSC::ExecutablePool::systemAlloc):
  14952. (JSC::ExecutablePool::systemRelease):
  14953. (JSC::ExecutableAllocator::isValid):
  14954. * jit/ExecutableAllocatorSymbian.cpp: Added.
  14955. (JSC::ExecutableAllocator::intializePageSize):
  14956. (JSC::ExecutablePool::systemAlloc):
  14957. (JSC::ExecutablePool::systemRelease):
  14958. (JSC::ExecutableAllocator::isValid):
  14959. * jit/ExecutableAllocatorWin.cpp: Added.
  14960. (JSC::ExecutableAllocator::intializePageSize):
  14961. (JSC::ExecutablePool::systemAlloc):
  14962. (JSC::ExecutablePool::systemRelease):
  14963. (JSC::ExecutableAllocator::isValid):
  14964. * wscript:
  14965. * wtf/PageAllocation.cpp: Removed.
  14966. * wtf/PageAllocation.h: Removed.
  14967. 2010-07-26 Gavin Barraclough <barraclough@apple.com>
  14968. Speculative !debug build fix II.
  14969. * wtf/PageAllocation.h:
  14970. (WTF::PageAllocation::PageAllocation):
  14971. 2010-07-26 Gavin Barraclough <barraclough@apple.com>
  14972. Speculative !debug build fix.
  14973. * wtf/PageAllocation.h:
  14974. (WTF::PageAllocation::PageAllocation):
  14975. 2010-07-26 Gavin Barraclough <barraclough@apple.com>
  14976. Reviewed by Oliver Hunt.
  14977. Bug 43009 - Abstract out page allocation from executable allocators
  14978. It would be great to have a single platform abstraction for block allocation, rather than copy/paste code.
  14979. In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory.
  14980. I think this will match current behaviour for the next client we will want to port across (RegisterFile &
  14981. Collector).
  14982. * CMakeListsEfl.txt:
  14983. * GNUmakefile.am:
  14984. * JavaScriptCore.gypi:
  14985. * JavaScriptCore.pro:
  14986. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  14987. * JavaScriptCore.xcodeproj/project.pbxproj:
  14988. * jit/ExecutableAllocator.cpp:
  14989. (JSC::ExecutableAllocator::intializePageSize):
  14990. (JSC::ExecutablePool::systemAlloc):
  14991. (JSC::ExecutablePool::systemRelease):
  14992. (JSC::ExecutableAllocator::isValid):
  14993. * jit/ExecutableAllocator.h:
  14994. (JSC::ExecutablePool::ExecutablePool):
  14995. (JSC::ExecutablePool::poolAllocate):
  14996. * jit/ExecutableAllocatorFixedVMPool.cpp:
  14997. (JSC::FixedVMPoolAllocator::release):
  14998. (JSC::FixedVMPoolAllocator::reuse):
  14999. (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
  15000. (JSC::FixedVMPoolAllocator::alloc):
  15001. (JSC::FixedVMPoolAllocator::free):
  15002. (JSC::FixedVMPoolAllocator::isValid):
  15003. (JSC::FixedVMPoolAllocator::isWithinVMPool):
  15004. (JSC::ExecutablePool::systemAlloc):
  15005. (JSC::ExecutablePool::systemRelease):
  15006. * jit/ExecutableAllocatorPosix.cpp: Removed.
  15007. * jit/ExecutableAllocatorSymbian.cpp: Removed.
  15008. * jit/ExecutableAllocatorWin.cpp: Removed.
  15009. * wscript:
  15010. * wtf/PageAllocator.cpp: Added.
  15011. (WTF::protection):
  15012. (WTF::PageAllocation::commit):
  15013. (WTF::PageAllocation::decommit):
  15014. (WTF::PageAllocator::allocate):
  15015. (WTF::PageAllocator::reserve):
  15016. (WTF::PageAllocator::deallocate):
  15017. (WTF::PageAllocator::pagesize):
  15018. * wtf/PageAllocator.h: Added.
  15019. (WTF::PageAllocation::PageAllocation):
  15020. (WTF::PageAllocation::base):
  15021. (WTF::PageAllocation::size):
  15022. (WTF::PageAllocation::chunk):
  15023. (WTF::PageAllocation::operator!):
  15024. (WTF::PageAllocator::):
  15025. 2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
  15026. Reviewed by Kenneth Rohde Christiansen.
  15027. [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
  15028. This ensures that long-running JavaScript (for example due to a modal alert() dialog),
  15029. will not trigger a deferred load after only 500ms (the default tokenizer delay) while
  15030. still giving a reasonable timeout (10 seconds) to prevent deadlock.
  15031. https://bugs.webkit.org/show_bug.cgi?id=29381
  15032. * runtime/TimeoutChecker.h: Add getter for the timeout interval
  15033. 2010-07-25 Patrick Gansterer <paroga@paroga.com>
  15034. Reviewed by Kent Tamura.
  15035. [WINCE] Buildfix for JSC in release mode
  15036. https://bugs.webkit.org/show_bug.cgi?id=42934
  15037. * jsc.cpp: Don't use __try on WinCE.
  15038. 2010-07-24 Patrick Gansterer <paroga@paroga.com>
  15039. Reviewed by Darin Adler.
  15040. [MSVC] Ensure 4 byte alignment on ARM
  15041. https://bugs.webkit.org/show_bug.cgi?id=42935
  15042. * jit/JITStubs.h: Added #pragma pack(4) around JITStackFrame.
  15043. 2010-07-24 Patrick Gansterer <paroga@paroga.com>
  15044. Reviewed by Darin Adler.
  15045. [WINCE] Cleanup defines in Platform.h
  15046. https://bugs.webkit.org/show_bug.cgi?id=42933
  15047. * wtf/Platform.h:
  15048. 2010-07-23 Rafael Antognolli <antognolli@profusion.mobi>
  15049. Reviewed by Antonio Gomes.
  15050. [EFL] Cleanup glib support (make it optional)
  15051. https://bugs.webkit.org/show_bug.cgi?id=42480
  15052. Remove gobject/GRefPtr.cpp if not using soup/glib.
  15053. * wtf/CMakeListsEfl.txt:
  15054. 2010-07-23 Patrick Gansterer <paroga@paroga.com>
  15055. Reviewed by Adam Roben.
  15056. [WINCE] Implement TCSpinLock.
  15057. https://bugs.webkit.org/show_bug.cgi?id=41792
  15058. Implement the SpinLock with InterlockedExchange from the Windows API.
  15059. * wtf/TCSpinLock.h:
  15060. (TCMalloc_SpinLock::Lock):
  15061. (TCMalloc_SpinLock::Unlock):
  15062. (TCMalloc_SpinLock::IsHeld):
  15063. (TCMalloc_SpinLock::Init):
  15064. (TCMalloc_SlowLock):
  15065. 2010-07-22 Csaba Osztrogonác <ossy@webkit.org>
  15066. Unreviewed rolling out r63947 and r63948, because they broke Qt Windows build.
  15067. * jit/JITStubs.cpp:
  15068. * jit/JITStubs.h:
  15069. 2010-07-22 Gavin Barraclough <barraclough@apple.com>
  15070. Eeeep! r63947 hosed all non-x86 builds!
  15071. * jit/JITStubs.h:
  15072. 2010-07-22 Gavin Barraclough <barraclough@apple.com>
  15073. Reviewed by Oliver Hunt.
  15074. Bug 42818 - [Qt] REGRESSION(63348): jsc is broken
  15075. Speculative fix, need fastcall conventions on Qt/Win.
  15076. * jit/JITStubs.cpp:
  15077. * jit/JITStubs.h:
  15078. 2010-07-22 Oliver Hunt <oliver@apple.com>
  15079. Reviewed by Gavin Barraclough.
  15080. Do more constant folding
  15081. https://bugs.webkit.org/show_bug.cgi?id=42867
  15082. Constant fold a few more operations. SunSpider says this is
  15083. a win but I suspect that's just code motion at play.
  15084. * parser/ASTBuilder.h:
  15085. (JSC::ASTBuilder::makeModNode):
  15086. (JSC::ASTBuilder::makeURightShiftNode):
  15087. (JSC::ASTBuilder::makeBitOrNode):
  15088. (JSC::ASTBuilder::makeBitAndNode):
  15089. (JSC::ASTBuilder::makeBitXOrNode):
  15090. (JSC::ASTBuilder::makeBinaryNode):
  15091. 2010-07-22 Kent Hansen <kent.hansen@nokia.com>
  15092. Reviewed by Kent Tamura.
  15093. Error properties of the Global Object are missing the DontEnum attribute
  15094. https://bugs.webkit.org/show_bug.cgi?id=28771
  15095. Add the attributes to become spec compliant.
  15096. * runtime/JSGlobalObject.cpp:
  15097. (JSC::JSGlobalObject::reset):
  15098. 2010-07-20 Steve Falkenburg <sfalken@apple.com>
  15099. Reviewed by Adam Roben.
  15100. WebKit on Windows should build optionally with an unversioned ICU DLL
  15101. https://bugs.webkit.org/show_bug.cgi?id=42722
  15102. <rdar://problem/8211743> JavaScriptCore needs to link against unversioned ICU
  15103. Dynamically create a new header, ICUVersion.h, as part of build-generated-files.sh.
  15104. Header contains a preprocessor define (U_DISABLE_RENAMING) indicating to ICU whether the ICU API
  15105. should be namespaced with the current ICU version number. Proper value is determined
  15106. by checking for the presence of libicuuc.lib, the unversioned copy of ICU.
  15107. To get the proper value for U_DISABLE_RENAMING into all source files, we force
  15108. the include of ICUVersion.h (our generated header) via the compiler options.
  15109. Since the versioned and unversioned ICU have different filenames (libicuuc.lib vs icuuc.lib)
  15110. we copy the ICU lib to an intermediate location under obj with a common name. This
  15111. allows us to link properly with either without adding a new build configuration.
  15112. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  15113. Copy ICU libs into a common location with a common name.
  15114. Add additional library search path to pick up icu lib.
  15115. Change ICU library filename specified to linker.
  15116. Add forced include of ICUVersion.h.
  15117. * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Generate ICUVersion.h
  15118. * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Add forced include of ICUVersion.h.
  15119. * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
  15120. Copy ICU libs into a common location with a common name.
  15121. Add additional library search path to pick up icu lib.
  15122. Change ICU library filename specified to linker.
  15123. Add forced include of ICUVersion.h.
  15124. * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
  15125. Copy ICU libs into a common location with a common name.
  15126. Add additional library search path to pick up icu lib.
  15127. Change ICU library filename specified to linker.
  15128. Add forced include of ICUVersion.h.
  15129. 2010-07-20 Steve Falkenburg <sfalken@apple.com>
  15130. Re-save vsprops files after no-op edits in Visual Studio
  15131. to fix manual edit issues.
  15132. 2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
  15133. Reviewed by Steve Block.
  15134. Need to be able to configure Geolocation policy regarding user permissions
  15135. https://bugs.webkit.org/show_bug.cgi?id=42068
  15136. If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy
  15137. by default
  15138. * wtf/Platform.h:
  15139. 2010-07-20 Sheriff Bot <webkit.review.bot@gmail.com>
  15140. Unreviewed, rolling out r63742.
  15141. http://trac.webkit.org/changeset/63742
  15142. https://bugs.webkit.org/show_bug.cgi?id=42641
  15143. Broke Leopard Intel build. (Requested by bbandix on #webkit).
  15144. * wtf/Platform.h:
  15145. 2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
  15146. Reviewed by Steve Block.
  15147. Need to be able to configure Geolocation policy regarding user permissions
  15148. https://bugs.webkit.org/show_bug.cgi?id=42068
  15149. If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy
  15150. by default
  15151. * wtf/Platform.h:
  15152. 2010-07-19 Dirk Schulze <krit@webkit.org>
  15153. Reviewed by Nikolas Zimmermann.
  15154. SVG CleanUp of SVGPathData parsing
  15155. https://bugs.webkit.org/show_bug.cgi?id=41410
  15156. Added piOverTwo to MathExtras.
  15157. * wtf/MathExtras.h:
  15158. 2010-07-19 Mike Moretti <mike.moretti@nokia.com>
  15159. Reviewed by Laszlo Gombos.
  15160. [Symbian] Build fix after r63404.
  15161. Implement isValid() function for the Symbian executable allocator.
  15162. * jit/ExecutableAllocatorSymbian.cpp:
  15163. (JSC::ExecutableAllocator::isValid):
  15164. 2010-07-19 Chris Marrin <cmarrin@apple.com>
  15165. Reviewed by Darin Adler.
  15166. https://bugs.webkit.org/show_bug.cgi?id=42118
  15167. Disable WebGL on Leopard for now.
  15168. LayoutTests fail on some graphics hardware on Leopard because one of the features we use,
  15169. GL_ARB_framebuffer_object, is not universally available in Leopard like it is in
  15170. SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a
  15171. software OpenGL driver on machines without this support.
  15172. * Configurations/FeatureDefines.xcconfig:
  15173. 2010-07-16 Darin Adler <darin@apple.com>
  15174. Reviewed by Sam Weinig.
  15175. Use OwnPtr for CodeBlock objects
  15176. https://bugs.webkit.org/show_bug.cgi?id=42490
  15177. * runtime/Executable.cpp:
  15178. (JSC::EvalExecutable::EvalExecutable): Moved this here and made it non-inline.
  15179. Eliminated the code that used to initialize the raw pointer since it's now
  15180. an OwnPtr.
  15181. (JSC::EvalExecutable::~EvalExecutable): Removed the explicit delete here.
  15182. (JSC::ProgramExecutable::ProgramExecutable): Ditto.
  15183. (JSC::ProgramExecutable::~ProgramExecutable): Ditto.
  15184. (JSC::FunctionExecutable::FunctionExecutable): Ditto.
  15185. (JSC::FunctionExecutable::~FunctionExecutable): Ditto.
  15186. (JSC::EvalExecutable::compileInternal): Added use of adoptPtr and get.
  15187. (JSC::ProgramExecutable::compileInternal): Ditto.
  15188. (JSC::FunctionExecutable::compileForCallInternal): Ditto.
  15189. (JSC::FunctionExecutable::compileForConstructInternal): Ditto.
  15190. (JSC::FunctionExecutable::recompile): Use clear instead of delete followed
  15191. by assignment of 0.
  15192. * runtime/Executable.h: Moved constructors to the cpp file and changed
  15193. raw pointers to OwnPtr.
  15194. 2010-07-19 Lucas De Marchi <lucas.demarchi@profusion.mobi>
  15195. Reviewed by Kenneth Rohde Christiansen.
  15196. [EFL] Fix build on 64-bit systems. According to
  15197. JavaScriptCore/wtf/Platform.h, x86_64 uses fixed allocator, which
  15198. needs jit/ExecutableAllocatorFixedVMPool.cpp to be included in build
  15199. system.
  15200. https://bugs.webkit.org/show_bug.cgi?id=42559
  15201. * CMakeListsEfl.txt: add missing file for x86_64.
  15202. 2010-07-16 Leandro Pereira <leandro@profusion.mobi>
  15203. [EFL] Unreviewed build system cleanup.
  15204. Move ExecutableAllocator{FixedVMPool,Posix,Symbian,Win}.cpp from
  15205. root CMakeLists.txt to the platform CMakeLists.txt.
  15206. * CMakeLists.txt:
  15207. * CMakeListsEfl.txt: Add ExecutableAllocatorPosix.cpp.
  15208. 2010-07-16 Oliver Hunt <oliver@apple.com>
  15209. Reviewed by Geoffrey Garen.
  15210. ES5 allows use of reserved words as IdentifierName
  15211. https://bugs.webkit.org/show_bug.cgi?id=42471
  15212. Modify the lexer to allow us to avoid identifying reserved
  15213. words in those contexts where they are valid identifiers, and
  15214. we know it's safe. Additionally tag the reserved word tokens
  15215. so we can easily identify them in those cases where we can't
  15216. guarantee that we've skipped reserved word identification.
  15217. * parser/JSParser.cpp:
  15218. (JSC::JSParser::next):
  15219. (JSC::JSParser::parseProperty):
  15220. (JSC::JSParser::parseMemberExpression):
  15221. * parser/JSParser.h:
  15222. (JSC::):
  15223. * parser/Lexer.cpp:
  15224. (JSC::Lexer::lex):
  15225. * parser/Lexer.h:
  15226. (JSC::Lexer::):
  15227. 2010-07-16 Anders Carlsson <andersca@apple.com>
  15228. Reviewed by Sam Weinig.
  15229. clang++ build fixes for JavaScriptCore and WebCore
  15230. https://bugs.webkit.org/show_bug.cgi?id=42478
  15231. * runtime/RegExpKey.h:
  15232. (JSC::operator==):
  15233. Move the RegExpKey equals operator into the JSC namespace so it can be found by ADL.
  15234. 2010-07-16 Anders Carlsson <andersca@apple.com>
  15235. Reviewed by David Levin.
  15236. Really add WARN_UNUSED_RESULT to leakRef
  15237. https://bugs.webkit.org/show_bug.cgi?id=42464
  15238. * wtf/PassRefPtr.h:
  15239. (WTF::PassRefPtr::):
  15240. (WTF::NonNullPassRefPtr::):
  15241. Put the WARN_UNUSED_RESULT attribute at the right place.
  15242. * wtf/RetainPtr.h:
  15243. (WTF::RetainPtr::releaseRef):
  15244. Remove WARN_UNUSED_RESULT here for now, it leads to two warnings that need
  15245. to be fixed first.
  15246. 2010-07-15 Victor Wang <victorw@chromium.org>
  15247. Reviewed by David Levin.
  15248. [Chromium] Disable c4291 for chromium windows multi dll build.
  15249. https://bugs.webkit.org/show_bug.cgi?id=42177
  15250. * JavaScriptCore.gyp/JavaScriptCore.gyp:
  15251. 2010-07-15 Geoffrey Garen <ggaren@apple.com>
  15252. Reviewed by Maciej Stachowiak.
  15253. Crash entering mail.yahoo.com
  15254. https://bugs.webkit.org/show_bug.cgi?id=42394
  15255. * bytecompiler/BytecodeGenerator.cpp:
  15256. (JSC::BytecodeGenerator::argumentNumberFor): Added a NULL check. If the
  15257. identifier we're resolving is not a local variable, registerFor returns
  15258. NULL.
  15259. * bytecompiler/NodesCodegen.cpp:
  15260. (JSC::FunctionBodyNode::emitBytecode): Unrelated to the crash, but I
  15261. noticed this while working on it: No need to NULL-check returnNode,
  15262. since an early return has already done so.
  15263. 2010-07-15 Martin Robinson <mrobinson@igalia.com>
  15264. Reviewed by Oliver Hunt.
  15265. [GTK] Simplify the distribution step
  15266. https://bugs.webkit.org/show_bug.cgi?id=42414
  15267. * GNUmakefile.am: Add extra dist files directly to EXTRA_DIST instead
  15268. of adding them by proxy via javascriptcore_dist. Sort the EXTRA_DIST list.
  15269. Refer to create_hash_table and create_regexp_tables directly, as is the
  15270. behavior with other code generation scripts.
  15271. 2010-07-15 Oliver Hunt <oliver@apple.com>
  15272. Reviewed by Geoff Garen.
  15273. Fix dumping of op_put_by_id.
  15274. * bytecode/CodeBlock.cpp:
  15275. (JSC::CodeBlock::printPutByIdOp):
  15276. 2010-07-15 Zoltan Herczeg <zherczeg@webkit.org>
  15277. Reviewed by Darin Adler.
  15278. Refactoring some parts of the lexer
  15279. https://bugs.webkit.org/show_bug.cgi?id=41845
  15280. This patch is a precursor of refactoring the identifier
  15281. parsing, which currently slows down the lexer, and not
  15282. ready for landing. This patch contains those sources,
  15283. which does not slow down the lexer (mainly style changes).
  15284. SunSpider: no change (529.4ms to 528.7ms)
  15285. --parse-only: no change (31.0ms to 31.2ms)
  15286. * parser/Lexer.cpp:
  15287. (JSC::isIdentStart): using typesOfASCIICharacters to determine
  15288. whether the current character is in identifier start
  15289. (JSC::isIdentPart): using typesOfASCIICharacters to determine
  15290. whether the current character is in identifier part
  15291. (JSC::Lexer::parseString): style fix
  15292. (JSC::Lexer::lex): removing the else after the main which
  15293. which reduces code duplication
  15294. 2010-07-15 Mark Rowe <mrowe@apple.com>
  15295. Update the sorting in the Xcode project files.
  15296. * JavaScriptCore.xcodeproj/project.pbxproj:
  15297. 2010-07-14 Oliver Hunt <oliver@apple.com>
  15298. Reviewed by Gavin Barraclough.
  15299. Make sure that mixed interpreter/jit builds don't try to use the jit if the allocator fails
  15300. https://bugs.webkit.org/show_bug.cgi?id=42310
  15301. Add some null checks to deal with the Fixed VM allocator failing
  15302. to get the requested executable region, delay the creation of the
  15303. JITStubs in JSGlobalData until after we know whether we're using
  15304. the JIT.
  15305. * jit/ExecutableAllocator.h:
  15306. (JSC::ExecutableAllocator::ExecutableAllocator):
  15307. (JSC::ExecutableAllocator::poolForSize):
  15308. * jit/ExecutableAllocatorFixedVMPool.cpp:
  15309. (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
  15310. (JSC::FixedVMPoolAllocator::alloc):
  15311. (JSC::FixedVMPoolAllocator::free):
  15312. (JSC::FixedVMPoolAllocator::isValid):
  15313. (JSC::ExecutableAllocator::isValid):
  15314. (JSC::ExecutablePool::systemAlloc):
  15315. (JSC::ExecutablePool::systemRelease):
  15316. * jit/ExecutableAllocatorPosix.cpp:
  15317. (JSC::ExecutableAllocator::isValid):
  15318. * jit/ExecutableAllocatorWin.cpp:
  15319. (JSC::ExecutableAllocator::isValid):
  15320. * jit/JIT.cpp:
  15321. (JSC::JIT::linkCall):
  15322. (JSC::JIT::linkConstruct):
  15323. * jit/JIT.h:
  15324. (JSC::JIT::compileCTIMachineTrampolines):
  15325. (JSC::JIT::compileCTINativeCall):
  15326. * jit/JITArithmetic.cpp:
  15327. (JSC::JIT::emit_op_mod):
  15328. * jit/JITArithmetic32_64.cpp:
  15329. (JSC::JIT::emit_op_mod):
  15330. * jit/JITCall.cpp:
  15331. (JSC::JIT::compileOpCallVarargs):
  15332. (JSC::JIT::compileOpCall):
  15333. (JSC::JIT::compileOpCallSlowCase):
  15334. * jit/JITCall32_64.cpp:
  15335. (JSC::JIT::compileOpCallVarargs):
  15336. (JSC::JIT::compileOpCall):
  15337. (JSC::JIT::compileOpCallSlowCase):
  15338. * jit/JITOpcodes.cpp:
  15339. (JSC::JIT::privateCompileCTINativeCall):
  15340. * jit/JITStubs.cpp:
  15341. (JSC::JITThunks::JITThunks):
  15342. (JSC::JITThunks::tryCacheGetByID):
  15343. (JSC::JITThunks::hostFunctionStub):
  15344. * jit/ThunkGenerators.cpp:
  15345. (JSC::charCodeAtThunkGenerator):
  15346. (JSC::charAtThunkGenerator):
  15347. (JSC::fromCharCodeThunkGenerator):
  15348. (JSC::sqrtThunkGenerator):
  15349. (JSC::powThunkGenerator):
  15350. * runtime/Executable.h:
  15351. (JSC::NativeExecutable::create):
  15352. * runtime/JSGlobalData.cpp:
  15353. (JSC::JSGlobalData::JSGlobalData):
  15354. (JSC::JSGlobalData::getHostFunction):
  15355. * runtime/JSGlobalData.h:
  15356. (JSC::JSGlobalData::getCTIStub):
  15357. * yarr/RegexJIT.cpp:
  15358. (JSC::Yarr::jitCompileRegex):
  15359. 2010-07-14 Gavin Barraclough <barraclough@apple.com>
  15360. Speculative Qt/Windows build fix.
  15361. * jit/JITStubs.h:
  15362. 2010-07-14 Gavin Barraclough <barraclough@apple.com>
  15363. Reviewed by Oliver Hunt.
  15364. https://bugs.webkit.org/show_bug.cgi?id=42280
  15365. JIT_STUB_ARGUMENT_VA_LIST is only slowing us down! Remove it!
  15366. * jit/JIT.h:
  15367. * jit/JITInlineMethods.h:
  15368. (JSC::JIT::restoreArgumentReferenceForTrampoline):
  15369. * jit/JITStubs.cpp:
  15370. * jit/JITStubs.h:
  15371. * wtf/Platform.h:
  15372. 2010-07-14 Oliver Hunt <oliver@apple.com>
  15373. RS=Geoff Garen.
  15374. Guard the CF path of interpreter vs. jit selection with PLATFORM(CF)
  15375. This allows the code to work on windows as well. Also unifies the
  15376. environment variable with the preference name.
  15377. * runtime/JSGlobalData.cpp:
  15378. (JSC::JSGlobalData::JSGlobalData):
  15379. 2010-07-14 Oliver Hunt <oliver@apple.com>
  15380. Reviewed by Don Melton.
  15381. Crash when trying to enable JIT and Interpreter in a single build.
  15382. CFPreferences code added at the last minute failed to account for
  15383. the preference not being present and then attempted to CFRelease
  15384. a null value.
  15385. * runtime/JSGlobalData.cpp:
  15386. (JSC::JSGlobalData::JSGlobalData):
  15387. 2010-07-14 Zoltan Herczeg <zherczeg@webkit.org>
  15388. Reviewed by Darin Adler.
  15389. Change indentations in the lexer
  15390. https://bugs.webkit.org/show_bug.cgi?id=41845
  15391. This patch fixes an old, indentation error comes from kjs,
  15392. as webkit has a different style rule for switches, and change
  15393. the indentation of the main switch, which is a temporary
  15394. style error. This change makes easier to see the behavioural
  15395. changes in the follow-up patch.
  15396. No behavioural changes.
  15397. * parser/Lexer.cpp:
  15398. (JSC::singleEscape):
  15399. (JSC::Lexer::lex):
  15400. 2010-07-13 Sheriff Bot <webkit.review.bot@gmail.com>
  15401. Unreviewed, rolling out r63262.
  15402. http://trac.webkit.org/changeset/63262
  15403. https://bugs.webkit.org/show_bug.cgi?id=42229
  15404. broke Windows compile (Requested by bweinstein on #webkit).
  15405. * API/tests/testapi.c:
  15406. (assertEqualsAsCharactersPtr):
  15407. (main):
  15408. * testapi.pro: Removed.
  15409. 2010-07-13 Oliver Hunt <oliver@apple.com>
  15410. Reviewed by Gavin Barraclough.
  15411. ES5 requires BOMs to be treated as whitespace
  15412. https://bugs.webkit.org/show_bug.cgi?id=42218
  15413. Add BOM character to the Lexer's definition of whitespace,
  15414. and remove the logic that dealt with stripping BOMs and
  15415. caching the cleaned string.
  15416. * parser/Lexer.h:
  15417. (JSC::Lexer::isWhiteSpace):
  15418. * parser/SourceProvider.h:
  15419. (JSC::UStringSourceProvider::create):
  15420. (JSC::UStringSourceProvider::UStringSourceProvider):
  15421. * wtf/text/StringImpl.h:
  15422. 2010-07-13 Andreas Kling <andreas.kling@nokia.com>
  15423. Reviewed by Darin Adler.
  15424. Avoid slow-path for put() in Array.splice()
  15425. https://bugs.webkit.org/show_bug.cgi?id=41920
  15426. Defer creation of the returned array until its final size is known
  15427. to avoid growing it while adding elements.
  15428. * runtime/JSArray.cpp:
  15429. (JSC::JSArray::JSArray): Add two modes of creation, CreateInitialized (old)
  15430. and CreateCompact (which should only be used when constructing arrays whose
  15431. size and contents are known at the time of creation.)
  15432. (JSC::JSArray::setLength): Skip first consistency check if in CreateCompact
  15433. initialization mode. (Only applies to non-empty arrays.)
  15434. (JSC::JSArray::checkConsistency): Build fix (JSValue::type() is gone)
  15435. * runtime/JSArray.h:
  15436. (JSC::JSArray::uncheckedSetIndex): Added for fast initialization of compact
  15437. arrays. Does no bounds or other sanity checking.
  15438. * runtime/ArrayPrototype.cpp:
  15439. (JSC::arrayProtoFuncSplice): Optimized creation of the returned JSArray.
  15440. * runtime/ArrayConstructor.cpp:
  15441. (JSC::constructArrayWithSizeQuirk): Pass CreateInitialized to ctor.
  15442. * runtime/JSGlobalObject.h:
  15443. (JSC::constructEmptyArray): Pass CreateInitialized to ctor.
  15444. * runtime/RegExpConstructor.cpp:
  15445. (JSC::RegExpMatchesArray::RegExpMatchesArray): Pass CreateInitialized to ctor.
  15446. 2010-07-13 Gavin Barraclough <barraclough@apple.com>
  15447. Reviewed by Oliver Hunt.
  15448. Bug 42207 - Clean up interface to compile executables, always check for exceptions
  15449. Presently interface to compile executable is inconsistent between eval/program and
  15450. function code, and is error prone in allowing a caller to byte compile without JIT
  15451. compiling an executable (we rely on all executables with codeblocks having JIT code).
  15452. Unify on an interface where all compilation is performed by a single compile (with
  15453. ForCall|ForConstruct variants) method, and make all clients check for errors.
  15454. * interpreter/Interpreter.cpp:
  15455. (JSC::Interpreter::unwindCallFrame):
  15456. (JSC::Interpreter::execute):
  15457. (JSC::Interpreter::executeCall):
  15458. (JSC::Interpreter::executeConstruct):
  15459. (JSC::Interpreter::prepareForRepeatCall):
  15460. (JSC::Interpreter::privateExecute):
  15461. * jit/JITStubs.cpp:
  15462. (JSC::DEFINE_STUB_FUNCTION):
  15463. * parser/Parser.h:
  15464. (JSC::Parser::isFunctionBodyNode):
  15465. (JSC::Parser::parse):
  15466. * runtime/ArrayPrototype.cpp:
  15467. (JSC::isNumericCompareFunction):
  15468. * runtime/ExceptionHelpers.cpp:
  15469. (JSC::createStackOverflowError):
  15470. * runtime/ExceptionHelpers.h:
  15471. * runtime/Executable.cpp:
  15472. (JSC::EvalExecutable::compileInternal):
  15473. (JSC::ProgramExecutable::checkSyntax):
  15474. (JSC::ProgramExecutable::compileInternal):
  15475. (JSC::FunctionExecutable::compileForCallInternal):
  15476. (JSC::FunctionExecutable::compileForConstructInternal):
  15477. (JSC::FunctionExecutable::reparseExceptionInfo):
  15478. (JSC::EvalExecutable::reparseExceptionInfo):
  15479. (JSC::FunctionExecutable::fromGlobalCode):
  15480. * runtime/Executable.h:
  15481. (JSC::EvalExecutable::compile):
  15482. (JSC::EvalExecutable::generatedBytecode):
  15483. (JSC::EvalExecutable::generatedJITCode):
  15484. (JSC::ProgramExecutable::compile):
  15485. (JSC::ProgramExecutable::generatedBytecode):
  15486. (JSC::ProgramExecutable::generatedJITCode):
  15487. (JSC::FunctionExecutable::generatedBytecode):
  15488. (JSC::FunctionExecutable::compileForCall):
  15489. (JSC::FunctionExecutable::compileForConstruct):
  15490. (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):
  15491. * runtime/FunctionConstructor.cpp:
  15492. (JSC::constructFunction):
  15493. * runtime/JSActivation.cpp:
  15494. (JSC::JSActivation::argumentsGetter):
  15495. * runtime/JSGlobalData.h:
  15496. (JSC::JSGlobalData::canUseJIT):
  15497. 2010-07-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
  15498. Reviewed by Oliver Hunt.
  15499. testapi.c depends on the Core Foundation.
  15500. https://bugs.webkit.org/show_bug.cgi?id=40058
  15501. Separate CoreFoundation specific tests in JSC's testapi.c. Enabling it
  15502. to compile in Qt environments.
  15503. All tests should work except for the JSStringCreateWithCharacters() function,
  15504. because its tests depend on Core Foundation specific functions.
  15505. * API/tests/testapi.c:
  15506. (testJSStringRefCF): moved CoreFoundation specific tests to this function.
  15507. (main): The moves plus some minor tweaks.
  15508. * testapi.pro: Added.
  15509. 2010-07-13 Gavin Barraclough <barraclough@apple.com>
  15510. Reviewed by Oliver Hunt.
  15511. Bug 42182 - Change how numeric compare functions are detected
  15512. There are three problems with the current mechanism:
  15513. * It requires that a function executable be bytecode compiled without
  15514. being JIT generated (in order to copy the bytecode from the numeric
  15515. compare function). This is a problem since we have an invariant when
  15516. running with the JIT that functions are never bytecode compiled without
  15517. also being JIT generated (after checking the codeblock we assume the
  15518. function has JIT code). To help maintain this invariant
  15519. * This implementation will prevent us from experimenting with alternate
  15520. compilation paths which do not compile via bytecode.
  15521. * It doesn't work. Functions passing more than two arguments will match
  15522. if they are comparing their last two arguments, not the first two.
  15523. Generally the mapping back from bytecode to semantics may be more
  15524. complex then initially expected.
  15525. * bytecompiler/BytecodeGenerator.cpp:
  15526. (JSC::BytecodeGenerator::generate):
  15527. (JSC::BytecodeGenerator::setIsNumericCompareFunction):
  15528. (JSC::BytecodeGenerator::argumentNumberFor):
  15529. * bytecompiler/BytecodeGenerator.h:
  15530. * bytecompiler/NodesCodegen.cpp:
  15531. (JSC::BlockNode::singleStatement):
  15532. (JSC::FunctionBodyNode::emitBytecode):
  15533. * parser/Nodes.h:
  15534. (JSC::ExpressionNode::isSubtract):
  15535. (JSC::BinaryOpNode::lhs):
  15536. (JSC::BinaryOpNode::rhs):
  15537. (JSC::SubNode::isSubtract):
  15538. (JSC::ReturnNode::value):
  15539. * runtime/JSGlobalData.cpp:
  15540. (JSC::JSGlobalData::JSGlobalData):
  15541. * runtime/JSGlobalData.h:
  15542. 2010-07-12 Oliver Hunt <oliver@apple.com>
  15543. Reviewed by Gavin Barraclough.
  15544. REGRESSION: Crash at JSC::JIT::privateCompile(JSC::MacroAssemblerCodePtr*)
  15545. https://bugs.webkit.org/show_bug.cgi?id=41763
  15546. There are two parts to this patch, the first is to fix the actual
  15547. problem. When calling copyStringWithoutBOMs on a string we know
  15548. to contain BOMs we return a value indicating that there are no
  15549. BOMs.
  15550. The second part of this fix is simply to harden the path that
  15551. led to a crash when parsing failed.
  15552. * jit/JITOpcodes.cpp:
  15553. (JSC::JIT::privateCompileCTIMachineTrampolines):
  15554. * jit/JITOpcodes32_64.cpp:
  15555. (JSC::JIT::privateCompileCTIMachineTrampolines):
  15556. * jit/JITStubs.cpp:
  15557. (JSC::DEFINE_STUB_FUNCTION):
  15558. Harden compilation stubs against parser failure.
  15559. * parser/Lexer.cpp:
  15560. (JSC::Lexer::sourceCode):
  15561. Add assertions to ensure that subranges into a source provider
  15562. are always actually braces. Hopefully this should catch similar
  15563. failures in future. These assertions fire on existing tests
  15564. without this fix.
  15565. * runtime/Executable.h:
  15566. (JSC::FunctionExecutable::tryJitCodeForCall):
  15567. (JSC::FunctionExecutable::tryJitCodeForConstruct):
  15568. * wtf/text/StringImpl.h:
  15569. (WebCore::StringImpl::copyStringWithoutBOMs):
  15570. Make copyStringWithBOMs do the right thing.
  15571. 2010-07-13 Gabor Loki <loki@webkit.org>
  15572. Reviewed by Gavin Barraclough.
  15573. Fix the constant encoding in data transfer instructions on ARM
  15574. https://bugs.webkit.org/show_bug.cgi?id=42166
  15575. The getImm function is designed to produce modified immediate constant
  15576. for data processing instructions. It should not be used to encode
  15577. any constant for data transfer. In the current situation there is no
  15578. way to use any immediate constant for data transfer. So, the moveImm
  15579. function is the desired method to pass the offset value to the data
  15580. transfer instructions.
  15581. Reported by Jacob Bramley.
  15582. * assembler/ARMAssembler.cpp:
  15583. (JSC::ARMAssembler::dataTransfer32):
  15584. * assembler/MacroAssemblerARM.h:
  15585. (JSC::MacroAssemblerARM::call32):
  15586. 2010-07-09 Darin Adler <darin@apple.com>
  15587. Reviewed by Geoffrey Garen.
  15588. String to number coercion is not spec compliant
  15589. https://bugs.webkit.org/show_bug.cgi?id=31349
  15590. ToNumber should ignore NBSP (\u00a0)
  15591. https://bugs.webkit.org/show_bug.cgi?id=25490
  15592. * runtime/JSGlobalObjectFunctions.cpp:
  15593. (JSC::parseIntOverflow): Added a version that works on UChar.
  15594. * runtime/JSGlobalObjectFunctions.h: Ditto.
  15595. * runtime/UString.cpp:
  15596. (JSC::isInfinity): Added helper functions.
  15597. (JSC::UString::toDouble): Use isStrWhiteSpace instead of
  15598. isSASCIISpace to define what we should skip. Got rid of the
  15599. code that used CString and UTF8String, instead processing the
  15600. UChar of the string directly, except for when we call strtod.
  15601. For strtod, use our own home-grown conversion function that
  15602. does not try to do any UTF-16 processing. Tidied up the logic
  15603. a bit as well.
  15604. 2010-07-12 Martin Robinson <mrobinson@igalia.com>
  15605. Reviewed by Xan Lopez.
  15606. [GTK] make dist is broken because of missing headers and other miscellaneous reasons
  15607. https://bugs.webkit.org/show_bug.cgi?id=42107
  15608. * GNUmakefile.am: Add missing header to the sources list.
  15609. 2010-07-12 Adam Roben <aroben@apple.com>
  15610. Stop generating stripped symbols for Release builds
  15611. It turns out we can strip the symbols after-the-fact using PDBCopy.
  15612. Fixes <http://webkit.org/b/42085>.
  15613. Reviewed by Steve Falkenburg.
  15614. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  15615. Removed the pre-link event, which just created the public\sym
  15616. directory.
  15617. 2010-07-12 Anders Carlsson <andersca@apple.com>
  15618. Reviewed by Dan Bernstein.
  15619. Add WARN_UNUSED_RETURN to the smart pointer "leak" member functions
  15620. https://bugs.webkit.org/show_bug.cgi?id=42086
  15621. * wtf/OwnPtr.h:
  15622. * wtf/PassOwnPtr.h:
  15623. * wtf/PassRefPtr.h:
  15624. (WTF::PassRefPtr::releaseRef):
  15625. (WTF::NonNullPassRefPtr::leakRef):
  15626. (WTF::NonNullPassRefPtr::releaseRef):
  15627. * wtf/RetainPtr.h:
  15628. (WTF::RetainPtr::releaseRef):
  15629. 2010-07-10 Oliver Hunt <oliver@apple.com>
  15630. Reviewed by Maciej Stachowiak.
  15631. HAVE_COMPUTED_GOTO is dependent on the interpreter being enabled
  15632. https://bugs.webkit.org/show_bug.cgi?id=42039
  15633. Separate the existence of computed goto support in the compiler
  15634. from whether or not we are using the interpreter. All the current
  15635. HAVE(COMPUTED_GOTO) guards are for the interpreter, but I'd like
  15636. the option of using it elsewhere. The interpreter now uses
  15637. ENABLE(COMPUTED_GOTO_INTERPRETER)
  15638. * bytecode/Instruction.h:
  15639. (JSC::Instruction::Instruction):
  15640. * bytecode/Opcode.h:
  15641. * interpreter/Interpreter.cpp:
  15642. (JSC::Interpreter::Interpreter):
  15643. (JSC::Interpreter::isOpcode):
  15644. (JSC::Interpreter::privateExecute):
  15645. * interpreter/Interpreter.h:
  15646. (JSC::Interpreter::getOpcode):
  15647. (JSC::Interpreter::getOpcodeID):
  15648. * wtf/Platform.h:
  15649. 2010-07-10 Oliver Hunt <oliver@apple.com>
  15650. Reviewed by Gavin Barraclough.
  15651. Remove switches from inner expression loops in the parser
  15652. https://bugs.webkit.org/show_bug.cgi?id=42035
  15653. Use bitmasks and flags on the token types to identify unary and
  15654. binary operators, rather than switching on the token type to
  15655. identify them.
  15656. * parser/JSParser.cpp:
  15657. (JSC::isUnaryOp):
  15658. (JSC::JSParser::isBinaryOperator):
  15659. * parser/JSParser.h:
  15660. (JSC::):
  15661. 2010-07-09 Leon Clarke <leonclarke@google.com>
  15662. Reviewed by Adam Barth.
  15663. add support for link prefetching
  15664. https://bugs.webkit.org/show_bug.cgi?id=3652
  15665. * Configurations/FeatureDefines.xcconfig:
  15666. 2010-07-09 Oliver Hunt <oliver@apple.com>
  15667. Reviewed by Darin Adler.
  15668. Tidy up lexer token ids
  15669. https://bugs.webkit.org/show_bug.cgi?id=42014
  15670. Stop using character literals to identify single character tokens
  15671. and instead use symbolic names for all tokens.
  15672. * parser/ASTBuilder.h:
  15673. (JSC::ASTBuilder::makeBinaryNode):
  15674. * parser/JSParser.cpp:
  15675. (JSC::JSParser::consume):
  15676. (JSC::JSParser::match):
  15677. (JSC::JSParser::autoSemiColon):
  15678. (JSC::JSParser::JSParser):
  15679. (JSC::JSParser::parseProgram):
  15680. (JSC::JSParser::allowAutomaticSemicolon):
  15681. (JSC::JSParser::parseDoWhileStatement):
  15682. (JSC::JSParser::parseWhileStatement):
  15683. (JSC::JSParser::parseVarDeclarationList):
  15684. (JSC::JSParser::parseConstDeclarationList):
  15685. (JSC::JSParser::parseForStatement):
  15686. (JSC::JSParser::parseReturnStatement):
  15687. (JSC::JSParser::parseWithStatement):
  15688. (JSC::JSParser::parseSwitchStatement):
  15689. (JSC::JSParser::parseSwitchClauses):
  15690. (JSC::JSParser::parseSwitchDefaultClause):
  15691. (JSC::JSParser::parseTryStatement):
  15692. (JSC::JSParser::parseDebuggerStatement):
  15693. (JSC::JSParser::parseStatement):
  15694. (JSC::JSParser::parseFormalParameters):
  15695. (JSC::JSParser::parseFunctionInfo):
  15696. (JSC::JSParser::parseExpressionOrLabelStatement):
  15697. (JSC::JSParser::parseIfStatement):
  15698. (JSC::JSParser::parseExpression):
  15699. (JSC::JSParser::parseAssignmentExpression):
  15700. (JSC::JSParser::parseConditionalExpression):
  15701. (JSC::isUnaryOp):
  15702. (JSC::JSParser::isBinaryOperator):
  15703. (JSC::JSParser::parseBinaryExpression):
  15704. (JSC::JSParser::parseProperty):
  15705. (JSC::JSParser::parseObjectLiteral):
  15706. (JSC::JSParser::parseStrictObjectLiteral):
  15707. (JSC::JSParser::parseArrayLiteral):
  15708. (JSC::JSParser::parsePrimaryExpression):
  15709. (JSC::JSParser::parseArguments):
  15710. (JSC::JSParser::parseMemberExpression):
  15711. (JSC::JSParser::parseUnaryExpression):
  15712. * parser/JSParser.h:
  15713. (JSC::):
  15714. * parser/Lexer.cpp:
  15715. (JSC::):
  15716. (JSC::Lexer::lex):
  15717. * parser/Lexer.h:
  15718. 2010-07-09 Gavin Barraclough <barraclough@apple.com>
  15719. Reviewed by Oliver Hunt.
  15720. Bug 42015 - Enable JSValue32_64 on ARMv7
  15721. * Configurations/JavaScriptCore.xcconfig:
  15722. * jit/JIT.h:
  15723. * jit/JITStubs.cpp:
  15724. * wtf/Platform.h:
  15725. 2010-07-09 Kenneth Russell <kbr@google.com>
  15726. Reviewed by Dimitri Glazkov.
  15727. Assertion failure in String::utf8() for certain invalid UTF16 inputs
  15728. https://bugs.webkit.org/show_bug.cgi?id=41983
  15729. * wtf/text/WTFString.cpp:
  15730. (WebCore::String::utf8):
  15731. - Fixed assertion when sourceExhausted is returned from convertUTF16ToUTF8.
  15732. 2010-07-09 Oliver Hunt <oliver@apple.com>
  15733. Reviewed by Geoffrey Garen.
  15734. Remove a couple of excess writes from the lexer
  15735. https://bugs.webkit.org/show_bug.cgi?id=41981
  15736. Remove a couple of fields from JSTokenInfo, and rename the remaining ones
  15737. to something more accurate
  15738. * parser/JSParser.cpp:
  15739. (JSC::JSParser::next):
  15740. (JSC::JSParser::tokenStart):
  15741. (JSC::JSParser::tokenLine):
  15742. (JSC::JSParser::tokenEnd):
  15743. * parser/JSParser.h:
  15744. (JSC::JSTokenInfo::JSTokenInfo):
  15745. * parser/Lexer.cpp:
  15746. (JSC::Lexer::lex):
  15747. 2010-07-08 Oliver Hunt <oliver@apple.com>
  15748. Reviewed by Sam Weinig.
  15749. Property declarations in an object literal should not consider the prototype chain when being added to the new object
  15750. https://bugs.webkit.org/show_bug.cgi?id=41929
  15751. To fix this all we need to do is ensure that all new properties are
  15752. added with putDirect rather than a fully generic call to put. This
  15753. is safe as an object literal is by definition going to produce a
  15754. completely normal object.
  15755. Rather than duplicating all the put_by_id logic we add an additional
  15756. flag to op_put_by_id to indicate it should be using putDirect. In
  15757. the interpreter this adds a runtime branch, but in the jit this is
  15758. essentially free as the branch is taken at compile time. This does
  15759. actually improve object literal creation time even in the interpreter
  15760. as we no longer need to walk the prototype chain to verify that the
  15761. cached put is safe.
  15762. We still emit normal put_by_id code when emitting __proto__ as we want
  15763. to get the correct handling for changing the prototype.
  15764. Sunspider claims this is a 0.7% speedup which is conceivably real due
  15765. to the performance improvement in object literals, but I suspect its
  15766. really just the result of code motion.
  15767. * bytecode/Opcode.h:
  15768. * bytecompiler/BytecodeGenerator.cpp:
  15769. (JSC::BytecodeGenerator::emitPutById):
  15770. (JSC::BytecodeGenerator::emitDirectPutById):
  15771. * bytecompiler/BytecodeGenerator.h:
  15772. * bytecompiler/NodesCodegen.cpp:
  15773. (JSC::PropertyListNode::emitBytecode):
  15774. * interpreter/Interpreter.cpp:
  15775. (JSC::Interpreter::privateExecute):
  15776. * jit/JIT.h:
  15777. (JSC::JIT::compilePutByIdTransition):
  15778. * jit/JITPropertyAccess.cpp:
  15779. (JSC::JIT::emit_op_put_by_id):
  15780. (JSC::JIT::emitSlow_op_put_by_id):
  15781. (JSC::JIT::privateCompilePutByIdTransition):
  15782. (JSC::JIT::patchPutByIdReplace):
  15783. * jit/JITPropertyAccess32_64.cpp:
  15784. (JSC::JIT::emitSlow_op_put_by_id):
  15785. (JSC::JIT::privateCompilePutByIdTransition):
  15786. (JSC::JIT::patchPutByIdReplace):
  15787. * jit/JITStubs.cpp:
  15788. (JSC::JITThunks::tryCachePutByID):
  15789. (JSC::DEFINE_STUB_FUNCTION):
  15790. * jit/JITStubs.h:
  15791. (JSC::):
  15792. * runtime/JSGlobalData.cpp:
  15793. (JSC::JSGlobalData::JSGlobalData):
  15794. * runtime/JSObject.h:
  15795. (JSC::JSObject::putDirect):
  15796. (JSC::JSValue::putDirect):
  15797. * runtime/JSValue.h:
  15798. 2010-07-08 Gavin Barraclough <barraclough@apple.com>
  15799. Reviewed by Sam Weinig.
  15800. String.prototype methods should CheckObjectCoercible (test this is not null or undefined).
  15801. * runtime/StringPrototype.cpp:
  15802. (JSC::stringProtoFuncCharAt):
  15803. (JSC::stringProtoFuncCharCodeAt):
  15804. (JSC::stringProtoFuncConcat):
  15805. (JSC::stringProtoFuncIndexOf):
  15806. (JSC::stringProtoFuncLastIndexOf):
  15807. (JSC::stringProtoFuncMatch):
  15808. (JSC::stringProtoFuncSearch):
  15809. (JSC::stringProtoFuncSlice):
  15810. (JSC::stringProtoFuncSplit):
  15811. (JSC::stringProtoFuncSubstr):
  15812. (JSC::stringProtoFuncSubstring):
  15813. (JSC::stringProtoFuncToLowerCase):
  15814. (JSC::stringProtoFuncToUpperCase):
  15815. (JSC::stringProtoFuncLocaleCompare):
  15816. (JSC::trimString):
  15817. 2010-07-08 Gavin Barraclough <barraclough@apple.com>
  15818. Reviewed by Sam Weinig.
  15819. Date.prototype.toJSON takes one argument, report this correctly.
  15820. * runtime/DatePrototype.cpp:
  15821. 2010-07-08 Gavin Barraclough <barraclough@apple.com>
  15822. Reviewed by Sam Weinig.
  15823. RegExp's prototype should be an object of type RegExp.
  15824. * runtime/RegExpPrototype.cpp:
  15825. (JSC::RegExpPrototype::RegExpPrototype):
  15826. * runtime/RegExpPrototype.h:
  15827. 2010-07-08 Oliver Hunt <oliver@apple.com>
  15828. Reviewed by Gavin Barraclough.
  15829. JavaScript parser violates ECMA automatic semicolon insertion rule
  15830. https://bugs.webkit.org/show_bug.cgi?id=41844
  15831. Remove (very) old and bogus logic that automatically inserted a semicolon
  15832. at the end of a script's source.
  15833. * parser/Lexer.cpp:
  15834. (JSC::Lexer::lex):
  15835. 2010-07-08 Oliver Hunt <oliver@apple.com>
  15836. Reviewed by Anders Carlson.
  15837. Tidy up the lexer
  15838. Remove some of the old yacc/lex-isms still present in the lexer
  15839. * parser/JSParser.h:
  15840. (JSC::):
  15841. * parser/Lexer.cpp:
  15842. (JSC::Lexer::parseString):
  15843. (JSC::Lexer::lex):
  15844. * parser/Lexer.h:
  15845. 2010-07-08 Oliver Hunt <oliver@apple.com>
  15846. Reviewed by Gavin Barraclough.
  15847. Make object-literal parsing conformant with the spec.
  15848. https://bugs.webkit.org/show_bug.cgi?id=41892
  15849. Bring our parsing of object literals into conformance with the ES5 spec.
  15850. Basically disallow conflicting accessor vs. normal property definitions
  15851. The bulk of this patch is just fiddling to maintain performance.
  15852. * parser/ASTBuilder.h:
  15853. (JSC::ASTBuilder::createGetterOrSetterProperty):
  15854. (JSC::ASTBuilder::createProperty):
  15855. (JSC::ASTBuilder::getName):
  15856. (JSC::ASTBuilder::getType):
  15857. * parser/JSParser.cpp:
  15858. (JSC::jsParse):
  15859. (JSC::JSParser::JSParser):
  15860. (JSC::JSParser::parseProperty):
  15861. (JSC::JSParser::parseObjectLiteral):
  15862. (JSC::JSParser::parseStrictObjectLiteral):
  15863. * parser/JSParser.h:
  15864. * parser/Lexer.cpp:
  15865. (JSC::Lexer::clear):
  15866. * parser/Lexer.h:
  15867. (JSC::Lexer::currentOffset):
  15868. (JSC::Lexer::setOffset):
  15869. Add logic to allow us to roll the lexer back in the input stream.
  15870. * parser/Nodes.h:
  15871. (JSC::PropertyNode::):
  15872. (JSC::PropertyNode::type):
  15873. * parser/Parser.cpp:
  15874. (JSC::Parser::parse):
  15875. * parser/SourceProvider.h:
  15876. (JSC::SourceProvider::SourceProvider):
  15877. (JSC::SourceProvider::isValid):
  15878. (JSC::SourceProvider::setValid):
  15879. SourceProvider now records whether the input text
  15880. has already been validated.
  15881. * parser/SyntaxChecker.h:
  15882. (JSC::SyntaxChecker::SyntaxChecker):
  15883. (JSC::SyntaxChecker::Property::Property):
  15884. (JSC::SyntaxChecker::Property::operator!):
  15885. (JSC::SyntaxChecker::createProperty):
  15886. (JSC::SyntaxChecker::createPropertyList):
  15887. (JSC::SyntaxChecker::createGetterOrSetterProperty):
  15888. The SyntaxChecker mode now needs to maintain a bit more information
  15889. to ensure that we can validate object literals correctly.
  15890. 2010-07-08 Darin Adler <darin@apple.com>
  15891. * runtime/JSGlobalData.cpp:
  15892. (JSC::JSGlobalData::sharedInstance): Fix typo.
  15893. 2010-07-08 Darin Adler <darin@apple.com>
  15894. Reviewed by Oliver Hunt.
  15895. Fix assertion seen on the Leopard buildbot.
  15896. The single shared instance of JSGlobalData was not being
  15897. adopted after creation.
  15898. * runtime/JSGlobalData.cpp:
  15899. (JSC::JSGlobalData::sharedInstance): Do adoptRef and then leakRef.
  15900. 2010-07-08 Gavin Barraclough <barraclough@apple.com>
  15901. Reviewed by Sam Weinig.
  15902. BOMs are whitespace.
  15903. * runtime/JSGlobalObjectFunctions.cpp:
  15904. (JSC::isStrWhiteSpace):
  15905. 2010-07-08 Martin Robinson <mrobinson@igalia.com>
  15906. Unreviewed.
  15907. Try fix the GTK+ build by touching this file.
  15908. * jit/ExecutableAllocatorFixedVMPool.cpp:
  15909. 2010-07-08 Gavin Barraclough <barraclough@apple.com>
  15910. GTK build fix take two.
  15911. * GNUmakefile.am:
  15912. 2010-07-08 Gavin Barraclough <barraclough@apple.com>
  15913. GTK build fix.
  15914. * GNUmakefile.am:
  15915. 2010-07-08 Gavin Barraclough <barraclough@apple.com>
  15916. Reviewed by Sam Weinig.
  15917. https://bugs.webkit.org/show_bug.cgi?id=41641
  15918. Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
  15919. other than x86-64 (this may be useful on 32-bit platforms, too).
  15920. Simplify ifdefs by dividing into thwo broad allocation strategies
  15921. (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
  15922. Rename constant used in the code to have names descriptive of their purpose,
  15923. rather than their specific value on a given platform.
  15924. * jit/ExecutableAllocator.cpp:
  15925. (JSC::ExecutableAllocator::reprotectRegion):
  15926. (JSC::ExecutableAllocator::cacheFlush):
  15927. * jit/ExecutableAllocatorFixedVMPool.cpp:
  15928. (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
  15929. (JSC::FixedVMPoolAllocator::free):
  15930. (JSC::ExecutablePool::systemAlloc):
  15931. * jit/ExecutableAllocatorPosix.cpp:
  15932. * jit/ExecutableAllocatorSymbian.cpp:
  15933. * jit/ExecutableAllocatorWin.cpp:
  15934. * wtf/Platform.h:
  15935. 2010-07-08 Xan Lopez <xlopez@igalia.com>
  15936. Reviewed by Gustavo Noronha.
  15937. Silence a few noisy build rules.
  15938. * GNUmakefile.am:
  15939. 2010-07-08 Sheriff Bot <webkit.review.bot@gmail.com>
  15940. Unreviewed, rolling out r62765.
  15941. http://trac.webkit.org/changeset/62765
  15942. https://bugs.webkit.org/show_bug.cgi?id=41840
  15943. All jscore and layout tests crash on Qt bot (Requested by Ossy
  15944. on #webkit).
  15945. * wtf/FastMalloc.cpp:
  15946. (WTF::TCMalloc_PageHeap::initializeScavenger):
  15947. (WTF::TCMalloc_PageHeap::signalScavenger):
  15948. (WTF::TCMalloc_PageHeap::scavengerThread):
  15949. 2010-07-08 Andreas Kling <andreas.kling@nokia.com>
  15950. Reviewed by Oliver Hunt.
  15951. Interpreter: Crash in op_load_varargs on 64-bit
  15952. https://bugs.webkit.org/show_bug.cgi?id=41795
  15953. Added missing cast of argCount to int32_t in op_load_varargs.
  15954. * interpreter/Interpreter.cpp:
  15955. (JSC::Interpreter::privateExecute):
  15956. 2010-07-08 Patrick Gansterer <paroga@paroga.com>
  15957. Reviewed by Geoffrey Garen.
  15958. Make FastMalloc more portable.
  15959. https://bugs.webkit.org/show_bug.cgi?id=41790
  15960. Use WTF::Mutex instead of pthread_mutex_t and
  15961. replace pthread_cond_t with WTF::ThreadCondition.
  15962. * wtf/FastMalloc.cpp:
  15963. (WTF::TCMalloc_PageHeap::initializeScavenger):
  15964. (WTF::TCMalloc_PageHeap::signalScavenger):
  15965. (WTF::TCMalloc_PageHeap::scavengerThread):
  15966. 2010-07-08 Patrick Gansterer <paroga@paroga.com>
  15967. Reviewed by Darin Adler.
  15968. Remove needless #include <fcntl.h> from TCSystemAlloc.cpp.
  15969. https://bugs.webkit.org/show_bug.cgi?id=41777
  15970. * wtf/TCSystemAlloc.cpp:
  15971. 2010-07-07 Darin Adler <darin@apple.com>
  15972. Fixed build in configurations like PowerPC.
  15973. * runtime/RegExpConstructor.cpp: Added include of PassOwnPtr.h.
  15974. * runtime/RegExpObject.cpp: Ditto.
  15975. * wtf/SizeLimits.cpp: Changed compile time assertion to work
  15976. even on platforms where two bool members do not end up taking
  15977. the same size as one int member!
  15978. 2010-07-07 Oliver Hunt <oliver@apple.com>
  15979. Reviewed by Geoffrey Garen.
  15980. Lazy mode of parser allows invalid syntax in object literals.
  15981. https://bugs.webkit.org/show_bug.cgi?id=41809
  15982. Make the parser itself validate getter and setter syntax rather
  15983. than offloading it to the AST builder.
  15984. * parser/ASTBuilder.h:
  15985. (JSC::ASTBuilder::createGetterOrSetterProperty):
  15986. * parser/JSParser.cpp:
  15987. (JSC::JSParser::parseProperty):
  15988. 2010-07-07 Dumitru Daniliuc <dumi@chromium.org>
  15989. Reviewed by Adam Roben.
  15990. Revert r62689.
  15991. https://bugs.webkit.org/show_bug.cgi?id=41804
  15992. * runtime/Collector.cpp:
  15993. (JSC::Heap::freeBlocks):
  15994. 2010-07-07 Adam Barth <abarth@webkit.org>
  15995. Reviewed by Sam Weinig.
  15996. Add reverseFind to Vector and deploy in HTML5 parser
  15997. https://bugs.webkit.org/show_bug.cgi?id=41778
  15998. This method seems generally useful. I'm slightly surprised we don't
  15999. have it already.
  16000. * wtf/Vector.h:
  16001. (WTF::::reverseFind):
  16002. 2010-07-07 Darin Adler <darin@apple.com>
  16003. Reviewed by Adam Barth.
  16004. Turn on adoptRef assertion for RefCounted
  16005. https://bugs.webkit.org/show_bug.cgi?id=41547
  16006. * wtf/CrossThreadRefCounted.h: Fixed include style. Includes of other
  16007. WTF headers should use "" includes; consistent in most WTF headers.
  16008. Added a call to relaxAdoptionRequirement.
  16009. * wtf/RefCounted.h: Fixed include style. Removed LOOSE_REF_COUNTED.
  16010. Added relaxAdoptionRequirement.
  16011. 2010-07-07 Anders Carlsson <andersca@apple.com>
  16012. Try to fix the Windows build.
  16013. * runtime/Collector.cpp:
  16014. (JSC::Heap::freeBlocks):
  16015. 2010-07-07 Darin Adler <darin@apple.com>
  16016. Reviewed by Adam Barth.
  16017. More OwnPtr work
  16018. https://bugs.webkit.org/show_bug.cgi?id=41727
  16019. * API/JSCallbackObject.h:
  16020. (JSC::JSCallbackObjectData::setPrivateProperty): Use adoptPtr.
  16021. * API/JSCallbackObjectFunctions.h:
  16022. (JSC::JSCallbackObject::JSCallbackObject): Ditto.
  16023. * bytecode/CodeBlock.cpp:
  16024. (JSC::CodeBlock::CodeBlock): Ditto.
  16025. * bytecode/CodeBlock.h:
  16026. (JSC::CodeBlock::createRareDataIfNecessary): Ditto.
  16027. * parser/Nodes.cpp:
  16028. (JSC::ScopeNode::ScopeNode): Ditto.
  16029. * parser/ParserArena.cpp:
  16030. (JSC::ParserArena::ParserArena): Ditto.
  16031. * runtime/Arguments.h:
  16032. (JSC::Arguments::Arguments): Ditto.
  16033. * runtime/Executable.cpp:
  16034. (JSC::EvalExecutable::compile): Ditto.
  16035. (JSC::ProgramExecutable::compile): Ditto.
  16036. (JSC::FunctionExecutable::compileForCall): Ditto.
  16037. (JSC::FunctionExecutable::compileForConstruct): Ditto.
  16038. (JSC::FunctionExecutable::reparseExceptionInfo): Ditto.
  16039. (JSC::EvalExecutable::reparseExceptionInfo): Ditto.
  16040. * runtime/JSArray.cpp:
  16041. (JSC::JSArray::sort): Ditto.
  16042. * runtime/RegExpConstructor.cpp:
  16043. (JSC::RegExpConstructor::RegExpConstructor): Ditto.
  16044. * runtime/RegExpObject.cpp:
  16045. (JSC::RegExpObject::RegExpObject): Ditto.
  16046. * runtime/SmallStrings.cpp:
  16047. (JSC::SmallStrings::createSingleCharacterString): Ditto.
  16048. (JSC::SmallStrings::singleCharacterStringRep): Ditto.
  16049. * wtf/unicode/icu/CollatorICU.cpp:
  16050. (WTF::Collator::userDefault): Use adoptPtr.
  16051. * yarr/RegexInterpreter.cpp:
  16052. (JSC::Yarr::ByteCompiler::ByteCompiler): Ditto.
  16053. (JSC::Yarr::ByteCompiler::compile): Ditto.
  16054. (JSC::Yarr::ByteCompiler::regexBegin): Ditto.
  16055. (JSC::Yarr::byteCompileRegex): Ditto.
  16056. * yarr/RegexInterpreter.h:
  16057. (JSC::Yarr::BytecodePattern::BytecodePattern): Ditto.
  16058. 2010-07-07 Darin Adler <darin@apple.com>
  16059. Reviewed by Adam Barth.
  16060. Make clear set the pointer to 0 before deletion
  16061. https://bugs.webkit.org/show_bug.cgi?id=41727
  16062. * wtf/OwnArrayPtr.h: Changed code so we always set the pointer to its new
  16063. value before deleting the old one, including in the set function and the
  16064. clear function. This required changing safeDelete.
  16065. * wtf/OwnPtr.h: Ditto. Also removed some extra null checks.
  16066. * wtf/PassOwnPtr.h: Ditto.
  16067. * wtf/PassRefPtr.h: Changed code so we always set the pointer to its new
  16068. value before deref'ing the old one in the clear function. Also added a
  16069. leakRef function for NonNullPassRefPtr.
  16070. * wtf/RefPtr.h: Ditto.
  16071. * wtf/gobject/GOwnPtr.h: More of the same.
  16072. * wtf/gobject/GRefPtr.h: Ditto.
  16073. 2010-07-07 Zoltan Herczeg <zherczeg@webkit.org>
  16074. Reviewed by Oliver Hunt.
  16075. Refactored string parsing inside the lexer
  16076. https://bugs.webkit.org/show_bug.cgi?id=41606
  16077. Does not use goto. Although the last sunspider
  16078. parse-only tests yields 1.044x speedup, I think the
  16079. patch can have a slight improvement at most.
  16080. * parser/Lexer.cpp:
  16081. (JSC::singleEscape):
  16082. (JSC::Lexer::parseString):
  16083. (JSC::Lexer::lex):
  16084. * parser/Lexer.h:
  16085. 2010-07-06 Oliver Hunt <oliver@apple.com>
  16086. Reviewed by Maciej Stachowiak.
  16087. Make it possible to have both the JIT and Interpreter available in a single build
  16088. https://bugs.webkit.org/show_bug.cgi?id=41722
  16089. Separate the concept of !ENABLE(JIT) and ENABLE(INTERPRETER) and make it possible
  16090. to have both JIT and INTERPRETER enabled at the same time. This doesn't add
  16091. support for mix mode execution, but it does allow a single build to contain all
  16092. the code needed to use either the interpreter or the jit.
  16093. If both ENABLE(INTERPRETER) and ENABLE(JIT) are true then setting the environment
  16094. variable JSC_FORCE_INTERPRETER will force JSC to use the interpreter.
  16095. This patch basically consists of replacing !ENABLE(JIT) with ENABLE(INTERPRETER),
  16096. or converting #if ENABLE(JIT) ... #else ... into #if ENABLE(JIT) ... #endif
  16097. #if ENABLE(INTERPRETER), etc. There are also a few functions that need to be
  16098. renamed to resolve return type ambiguity.
  16099. * bytecode/CodeBlock.cpp:
  16100. (JSC::CodeBlock::~CodeBlock):
  16101. (JSC::CodeBlock::shrinkToFit):
  16102. * bytecode/CodeBlock.h:
  16103. * interpreter/CallFrame.h:
  16104. (JSC::ExecState::returnVPC):
  16105. * interpreter/Interpreter.cpp:
  16106. (JSC::Interpreter::unwindCallFrame):
  16107. (JSC::Interpreter::throwException):
  16108. (JSC::Interpreter::execute):
  16109. (JSC::Interpreter::executeCall):
  16110. (JSC::Interpreter::executeConstruct):
  16111. (JSC::Interpreter::prepareForRepeatCall):
  16112. (JSC::Interpreter::privateExecute):
  16113. (JSC::Interpreter::retrieveLastCaller):
  16114. * interpreter/Interpreter.h:
  16115. * runtime/ArrayPrototype.cpp:
  16116. (JSC::isNumericCompareFunction):
  16117. * runtime/Executable.cpp:
  16118. (JSC::EvalExecutable::generateJITCode):
  16119. (JSC::ProgramExecutable::generateJITCode):
  16120. (JSC::FunctionExecutable::generateJITCodeForCall):
  16121. (JSC::FunctionExecutable::generateJITCodeForConstruct):
  16122. (JSC::FunctionExecutable::reparseExceptionInfo):
  16123. (JSC::EvalExecutable::reparseExceptionInfo):
  16124. * runtime/JSFunction.cpp:
  16125. * runtime/JSGlobalData.cpp:
  16126. (JSC::JSGlobalData::JSGlobalData):
  16127. * runtime/JSGlobalData.h:
  16128. (JSC::JSGlobalData::canUseJIT):
  16129. * wtf/Platform.h:
  16130. 2010-07-06 Darin Adler <darin@apple.com>
  16131. Reviewed by Adam Barth.
  16132. Add adoptPtr and leakPtr functions for OwnPtr and PassOwnPtr
  16133. https://bugs.webkit.org/show_bug.cgi?id=41320
  16134. * bytecode/CodeBlock.cpp:
  16135. (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): Use assignment
  16136. instead of set since the result of reparseExceptionInfo is now a
  16137. PassOwnPtr.
  16138. * bytecode/CodeBlock.h: Change extractExceptionInfo to return a
  16139. PassOwnPtr instead of a raw pointer.
  16140. * runtime/Executable.cpp:
  16141. (JSC::FunctionExecutable::reparseExceptionInfo): Return a PassOwnPtr.
  16142. (JSC::EvalExecutable::reparseExceptionInfo): Ditto.
  16143. (JSC::ProgramExecutable::reparseExceptionInfo): Added. This was
  16144. in the header before, but it's better to not have it there to reduce
  16145. header dependencies. Return a PassOwnPtr.
  16146. * runtime/Executable.h: Made reparseExceptionInfo return a PassOwnPtr,
  16147. and put it in the private sections of classes other than the base class.
  16148. * wtf/MessageQueue.h:
  16149. (WTF::MessageQueue::append): Use leakPtr instead of release.
  16150. (WTF::MessageQueue::appendAndCheckEmpty): Ditto.
  16151. (WTF::MessageQueue::prepend): Ditto.
  16152. * wtf/OwnPtr.h: Tweaked formatting. Changed the release function to return
  16153. a PassOwnPtr rather than a raw pointer. Added a leakPtr function that
  16154. returns a raw pointer. Put the constructor that takes a raw pointer and
  16155. the set function into a section guarded by LOOSE_OWN_PTR. Adapted to the
  16156. new adoptPtr function from PassOwnPtr.h.
  16157. * wtf/PassOwnPtr.h: Tweaked formatting. Renamed the release function
  16158. to leakPtr. Added an adoptPtr function that creates a new PassOwnPtr.
  16159. Put the constructor and assignment operators that take a raw pointer
  16160. into a section guarded by LOOSE_PASS_OWN_PTR.
  16161. 2010-07-06 Sam Weinig <sam@webkit.org>
  16162. Reviewed by Darin Adler
  16163. Update comment in StringExtras.h to be more accurate.
  16164. * wtf/StringExtras.h:
  16165. 2010-07-06 Sheriff Bot <webkit.review.bot@gmail.com>
  16166. Unreviewed, rolling out r62511.
  16167. http://trac.webkit.org/changeset/62511
  16168. https://bugs.webkit.org/show_bug.cgi?id=41686
  16169. Breaks Linux/64bit compilation (Requested by xan_ on #webkit).
  16170. * jit/ExecutableAllocator.cpp:
  16171. * jit/ExecutableAllocatorFixedVMPool.cpp:
  16172. (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
  16173. (JSC::FixedVMPoolAllocator::free):
  16174. (JSC::ExecutablePool::systemAlloc):
  16175. * jit/ExecutableAllocatorPosix.cpp:
  16176. (JSC::ExecutableAllocator::reprotectRegion):
  16177. (JSC::ExecutableAllocator::cacheFlush):
  16178. * jit/ExecutableAllocatorSymbian.cpp:
  16179. * jit/ExecutableAllocatorWin.cpp:
  16180. * wtf/Platform.h:
  16181. 2010-07-05 Gavin Barraclough <barraclough@apple.com>
  16182. Reviewed by Sam Weinig.
  16183. https://bugs.webkit.org/show_bug.cgi?id=41641
  16184. Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
  16185. other than x86-64 (this may be useful on 32-bit platforms, too).
  16186. Simplify ifdefs by dividing into thwo broad allocation strategies
  16187. (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
  16188. Rename constant used in the code to have names descriptive of their purpose,
  16189. rather than their specific value on a given platform.
  16190. * jit/ExecutableAllocator.cpp:
  16191. (JSC::ExecutableAllocator::reprotectRegion):
  16192. (JSC::ExecutableAllocator::cacheFlush):
  16193. * jit/ExecutableAllocatorFixedVMPool.cpp:
  16194. (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
  16195. (JSC::FixedVMPoolAllocator::free):
  16196. (JSC::ExecutablePool::systemAlloc):
  16197. * jit/ExecutableAllocatorPosix.cpp:
  16198. * jit/ExecutableAllocatorSymbian.cpp:
  16199. * jit/ExecutableAllocatorWin.cpp:
  16200. * wtf/Platform.h:
  16201. 2010-07-05 Steve Block <steveblock@google.com>
  16202. Reviewed by Darin Adler.
  16203. ThreadingPthreads.cpp should use JNIUtility.h on Android, not outdated jni_utility.h
  16204. https://bugs.webkit.org/show_bug.cgi?id=41594
  16205. * wtf/ThreadingPthreads.cpp:
  16206. 2010-07-04 Mark Rowe <mrowe@apple.com>
  16207. Build fix after r62456.
  16208. * interpreter/Interpreter.cpp:
  16209. (JSC::Interpreter::privateExecute): Be slightly more consistent in using uint32_t to prevent
  16210. warnings about comparisons between signed and unsigned types, and attempts to call an overload
  16211. of std::min that doesn't exist.
  16212. 2010-07-02 Sam Weinig <sam@webkit.org>
  16213. Reviewed by Darin Adler.
  16214. Patch for https://bugs.webkit.org/show_bug.cgi?id=41553
  16215. Make StringExtras.h versions of snprintf and vsnprintf match the unix versions.
  16216. - MSVC does not ensure the buffers are null terminated as the unix versions do.
  16217. * runtime/JSGlobalObjectFunctions.cpp: Cleanup includes.
  16218. * runtime/UString.cpp: Clean up includes.
  16219. (JSC::UString::from): Don't pass sizeof(buf) - 1, that is wrong.
  16220. * wtf/StringExtras.h:
  16221. (snprintf): Ensure null termination of buffer.
  16222. (vsnprintf): Ditto.
  16223. 2010-07-03 Yong Li <yoli@rim.com>
  16224. Reviewed by Darin Adler.
  16225. Make Arguments::MaxArguments clamping work for numbers >= 0x80000000 in
  16226. the interpreter as well as the JIT.
  16227. https://bugs.webkit.org/show_bug.cgi?id=41351
  16228. rdar://problem/8142141
  16229. * interpreter/Interpreter.cpp:
  16230. (JSC::Interpreter::privateExecute): Fix signed integer overflow problem
  16231. in op_load_varargs handling. 0xFFFFFFFF was read as -1.
  16232. 2010-06-26 Jeremy Orlow <jorlow@chromium.org>
  16233. Reviewed by Dumitru Daniliuc.
  16234. Support for keys and in-memory storage for IndexedDB
  16235. https://bugs.webkit.org/show_bug.cgi?id=41252
  16236. Set the role to Private.
  16237. * JavaScriptCore.xcodeproj/project.pbxproj:
  16238. 2010-07-02 Oliver Hunt <oliver@apple.com>
  16239. Reviewed by Geoffrey Garen.
  16240. Move BOM handling out of the lexer and parser
  16241. https://bugs.webkit.org/show_bug.cgi?id=41539
  16242. Doing the BOM stripping in the lexer meant that we could
  16243. end up having to strip the BOMs from a source multiple times.
  16244. To deal with this we now require all strings provided by
  16245. a SourceProvider to already have had the BOMs stripped.
  16246. This also simplifies some of the lexer logic.
  16247. * parser/Lexer.cpp:
  16248. (JSC::Lexer::setCode):
  16249. (JSC::Lexer::sourceCode):
  16250. * parser/SourceProvider.h:
  16251. (JSC::SourceProvider::SourceProvider):
  16252. (JSC::UStringSourceProvider::create):
  16253. (JSC::UStringSourceProvider::getRange):
  16254. (JSC::UStringSourceProvider::UStringSourceProvider):
  16255. * wtf/text/StringImpl.h:
  16256. (WebCore::StringImpl::copyStringWithoutBOMs):
  16257. 2010-07-03 Patrick Gansterer <paroga@paroga.com>
  16258. Reviewed by Kent Tamura.
  16259. [WINCE] Implement Unicode::isAlphanumeric and Unicode::isArabicChar.
  16260. https://bugs.webkit.org/show_bug.cgi?id=41411
  16261. * wtf/unicode/wince/UnicodeWince.cpp:
  16262. (WTF::Unicode::isAlphanumeric):
  16263. * wtf/unicode/wince/UnicodeWince.h:
  16264. (WTF::Unicode::isArabicChar):
  16265. 2010-07-03 Kwang Yul Seo <skyul@company100.net>
  16266. Reviewed by Kent Tamura.
  16267. [BREWMP] Change the CRASH() macro to print "WebKit CRASH" log.
  16268. https://bugs.webkit.org/show_bug.cgi?id=41524
  16269. Print "WebKit CRASH" before crashing.
  16270. * wtf/Assertions.h:
  16271. 2010-07-02 Gavin Barraclough <barraclough@apple.com>
  16272. Reviewed by Oliver Hunt.
  16273. Bug 41565 - Repatching in ARMv7Assembler::repatchLoadPtrToLEA is broken
  16274. This method tried to repatch a LDR (T2) into an ADD (T3) - but it only
  16275. repatches the first instruction word. The layout of the fields in the
  16276. second word is different, and also needs repatching.
  16277. * assembler/ARMv7Assembler.h:
  16278. (JSC::ARMv7Assembler::repatchLoadPtrToLEA):
  16279. 2010-07-02 Oliver Hunt <oliver@apple.com>
  16280. Reviewed by Gavin Barraclough.
  16281. Clamp the number of arguments supported by function.apply
  16282. https://bugs.webkit.org/show_bug.cgi?id=41351
  16283. <rdar://problem/8142141>
  16284. Add clamping logic to function.apply similar to that
  16285. enforced by firefox. We have a smaller clamp than
  16286. firefox as our calling convention means that stack
  16287. usage is proportional to argument count -- the firefox
  16288. limit is larger than you could actually call.
  16289. * interpreter/Interpreter.cpp:
  16290. (JSC::Interpreter::privateExecute):
  16291. * jit/JITStubs.cpp:
  16292. (JSC::DEFINE_STUB_FUNCTION):
  16293. * runtime/Arguments.h:
  16294. (JSC::Arguments::):
  16295. 2010-07-02 Chao-ying Fu <fu@mips.com>
  16296. Reviewed by Oliver Hunt.
  16297. Re-enable JIT_OPTIMIZE_NATIVE_CALL on MIPS
  16298. https://bugs.webkit.org/show_bug.cgi?id=40179
  16299. Add the MIPS part to re-enable JIT_OPTIMIZE_NATIVE_CALL.
  16300. * jit/JITOpcodes.cpp:
  16301. (JSC::JIT::privateCompileCTINativeCall):
  16302. * wtf/Platform.h:
  16303. 2010-07-02 Gavin Barraclough <barraclough@apple.com>
  16304. Reviewed by Oliver Hunt.
  16305. Bug 41552 - Clean up ARMv7 vfp code generation
  16306. Emit separate opcode individually, remove magic numbers.
  16307. Also remove invalid assert from JSImmediate (number cells are not CELL_MASK aligned).
  16308. * assembler/ARMv7Assembler.h:
  16309. (JSC::ARMv7Assembler::):
  16310. (JSC::ARMv7Assembler::vadd_F64):
  16311. (JSC::ARMv7Assembler::vcmp_F64):
  16312. (JSC::ARMv7Assembler::vcvt_F64_S32):
  16313. (JSC::ARMv7Assembler::vcvtr_S32_F64):
  16314. (JSC::ARMv7Assembler::vdiv_F64):
  16315. (JSC::ARMv7Assembler::vldr):
  16316. (JSC::ARMv7Assembler::vmov_F64_0):
  16317. (JSC::ARMv7Assembler::vmov):
  16318. (JSC::ARMv7Assembler::vmrs):
  16319. (JSC::ARMv7Assembler::vmul_F64):
  16320. (JSC::ARMv7Assembler::vstr):
  16321. (JSC::ARMv7Assembler::vsub_F64):
  16322. (JSC::ARMv7Assembler::VFPOperand::VFPOperand):
  16323. (JSC::ARMv7Assembler::VFPOperand::bits1):
  16324. (JSC::ARMv7Assembler::VFPOperand::bits4):
  16325. (JSC::ARMv7Assembler::vcvtOp):
  16326. (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpOp):
  16327. (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpMemOp):
  16328. * assembler/MacroAssemblerARMv7.h:
  16329. (JSC::MacroAssemblerARMv7::branchDouble):
  16330. * runtime/JSImmediate.h:
  16331. (JSC::JSValue::isCell):
  16332. 2010-07-02 Sheriff Bot <webkit.review.bot@gmail.com>
  16333. Unreviewed, rolling out r62410.
  16334. http://trac.webkit.org/changeset/62410
  16335. https://bugs.webkit.org/show_bug.cgi?id=41549
  16336. accursed last minute changes (Requested by olliej on #webkit).
  16337. * parser/Lexer.cpp:
  16338. (JSC::Lexer::setCode):
  16339. (JSC::Lexer::copyCodeWithoutBOMs):
  16340. (JSC::Lexer::sourceCode):
  16341. * parser/SourceProvider.h:
  16342. (JSC::):
  16343. (JSC::SourceProvider::SourceProvider):
  16344. (JSC::SourceProvider::hasBOMs):
  16345. (JSC::UStringSourceProvider::create):
  16346. (JSC::UStringSourceProvider::getRange):
  16347. (JSC::UStringSourceProvider::UStringSourceProvider):
  16348. * wtf/text/StringImpl.h:
  16349. 2010-07-02 Sam Weinig <sam@webkit.org>
  16350. Reviewed by Geoffrey Garen.
  16351. Patch for https://bugs.webkit.org/show_bug.cgi?id=41548
  16352. Use snprintf instead of sprintf everywhere in JavaScriptCore
  16353. * runtime/JSGlobalObjectFunctions.cpp:
  16354. (JSC::encode):
  16355. (JSC::globalFuncEscape):
  16356. * runtime/UString.cpp:
  16357. (JSC::UString::from):
  16358. 2010-07-02 Oliver Hunt <oliver@apple.com>
  16359. Reviewed by Geoffrey Garen.
  16360. Move BOM handling out of the lexer and parser
  16361. https://bugs.webkit.org/show_bug.cgi?id=41539
  16362. Doing the BOM stripping in the lexer meant that we could
  16363. end up having to strip the BOMs from a source multiple times.
  16364. To deal with this we now require all strings provided by
  16365. a SourceProvider to already have had the BOMs stripped.
  16366. This also simplifies some of the lexer logic.
  16367. * parser/Lexer.cpp:
  16368. (JSC::Lexer::setCode):
  16369. (JSC::Lexer::sourceCode):
  16370. * parser/SourceProvider.h:
  16371. (JSC::SourceProvider::SourceProvider):
  16372. (JSC::UStringSourceProvider::create):
  16373. (JSC::UStringSourceProvider::getRange):
  16374. (JSC::UStringSourceProvider::UStringSourceProvider):
  16375. * wtf/text/StringImpl.h:
  16376. (WebCore::StringImpl::copyStringWithoutBOMs):
  16377. 2010-07-02 Renata Hodovan <reni@inf.u-szeged.hu>
  16378. Reviewed by Oliver Hunt.
  16379. [ Updated after rollout. ]
  16380. Merged RegExp constructor and RegExp::create methods.
  16381. Both functions are called with three parameters and check whether
  16382. flags (the third param) is given or not.
  16383. Avoid extra hash lookups in RegExpCache::create by passing a pre-computed
  16384. iterator parameter.
  16385. https://bugs.webkit.org/show_bug.cgi?id=41055
  16386. * runtime/RegExp.cpp:
  16387. (JSC::RegExp::RegExp):
  16388. * runtime/RegExp.h:
  16389. * runtime/RegExpCache.cpp:
  16390. (JSC::RegExpCache::lookupOrCreate):
  16391. (JSC::RegExpCache::create):
  16392. * runtime/RegExpCache.h:
  16393. 2010-07-02 Martin Robinson <mrobinson@igalia.com>
  16394. Unreviewed. Build fix for GTK+.
  16395. Build Lexer.lut.h with the rest of the .lut.h files. Later these should
  16396. all probably be moved to DerivedSources.
  16397. * GNUmakefile.am:
  16398. 2010-06-23 Martin Robinson <mrobinson@igalia.com>
  16399. Reviewed by Gustavo Noronha Silva.
  16400. [GTK] Separate DerivedSources per-project
  16401. https://bugs.webkit.org/show_bug.cgi?id=41109
  16402. Generate JavaScriptCore derived sources in <builddir>/DerivedSources/JavaScriptCore.
  16403. * GNUmakefile.am:
  16404. 2010-07-02 Peter Varga <pvarga@inf.u-szeged.hu>
  16405. Reviewed by Oliver Hunt.
  16406. The alternativeFrameLocation value is wrong in the emitDisjunction function in
  16407. case of PatternTerm::TypeParentheticalAssertion. This value needs to be
  16408. computed from term.frameLocation instead of term.inputPosition. This mistake caused glibc
  16409. memory corruption in some cases.
  16410. Layout test added for checking of TypeParentheticalAssertion case.
  16411. https://bugs.webkit.org/show_bug.cgi?id=41458
  16412. * yarr/RegexInterpreter.cpp:
  16413. (JSC::Yarr::ByteCompiler::emitDisjunction):
  16414. 2010-07-01 Oliver Hunt <oliver@apple.com>
  16415. Reviewed by Maciej Stachowiak.
  16416. Add a FixedArray template to encapsulate fixed length arrays
  16417. https://bugs.webkit.org/show_bug.cgi?id=41506
  16418. This new type is used in place of fixed length C arrays so
  16419. that debug builds can guard against attempts to go beyond
  16420. the end of the array.
  16421. * JavaScriptCore.xcodeproj/project.pbxproj:
  16422. * bytecode/Opcode.cpp:
  16423. (JSC::OpcodeStats::~OpcodeStats):
  16424. * pcre/pcre_compile.cpp:
  16425. (calculateCompiledPatternLength):
  16426. * runtime/Collector.cpp:
  16427. (JSC::Heap::allocateBlock):
  16428. (JSC::Heap::allocate):
  16429. * runtime/Collector.h:
  16430. (JSC::CollectorBitmap::clearAll):
  16431. * runtime/CollectorHeapIterator.h:
  16432. (JSC::CollectorHeapIterator::operator*):
  16433. * runtime/DateInstanceCache.h:
  16434. * runtime/JSString.cpp:
  16435. (JSC::JSString::replaceCharacter):
  16436. * runtime/JSString.h:
  16437. (JSC::RopeBuilder::JSStringFinalizerStruct::):
  16438. * runtime/NumericStrings.h:
  16439. * runtime/RegExpCache.h:
  16440. * runtime/SmallStrings.h:
  16441. (JSC::SmallStrings::singleCharacterStrings):
  16442. * wtf/AVLTree.h:
  16443. * wtf/FixedArray.h: Added.
  16444. (WTF::FixedArray::operator[]):
  16445. (WTF::FixedArray::data):
  16446. 2010-07-01 Zoltan Herczeg <zherczeg@webkit.org>
  16447. Reviewed by Oliver Hunt.
  16448. Improve the main lexer switch by mapping input characters to their type
  16449. https://bugs.webkit.org/show_bug.cgi?id=41459
  16450. Sunsipder: no change (from 532.9ms to 531.5ms)
  16451. SunSpider --parse-only: 1.025x as fast (from 33.1ms to 32.3ms)
  16452. * parser/Lexer.cpp:
  16453. (JSC::):
  16454. (JSC::Lexer::lex):
  16455. 2010-07-01 Sam Weinig <sam@webkit.org>
  16456. Rubber-stamped by Ander Carlsson.
  16457. Define HAVE_HOSTED_CORE_ANIMATION on Snow Leopard.
  16458. * wtf/Platform.h:
  16459. 2010-07-01 Gavin Barraclough <barraclough@apple.com>
  16460. Reviewed by Oliver Hunt.
  16461. Bug 41490 - Add missing operations to MacroAssemblerARMv7
  16462. Also, make single, double, quad register numbers in ARMv7Assembler distinct & strongly typed.
  16463. * assembler/ARMv7Assembler.h:
  16464. (JSC::ARMRegisters::):
  16465. (JSC::ARMRegisters::asSingle):
  16466. (JSC::ARMRegisters::asDouble):
  16467. (JSC::VFPImmediate::VFPImmediate):
  16468. (JSC::VFPImmediate::isValid):
  16469. (JSC::VFPImmediate::value):
  16470. (JSC::ARMv7Assembler::singleRegisterMask):
  16471. (JSC::ARMv7Assembler::doubleRegisterMask):
  16472. (JSC::ARMv7Assembler::):
  16473. (JSC::ARMv7Assembler::add_S):
  16474. (JSC::ARMv7Assembler::neg):
  16475. (JSC::ARMv7Assembler::orr_S):
  16476. (JSC::ARMv7Assembler::sub):
  16477. (JSC::ARMv7Assembler::sub_S):
  16478. (JSC::ARMv7Assembler::vadd_F64):
  16479. (JSC::ARMv7Assembler::vcmp_F64):
  16480. (JSC::ARMv7Assembler::vcvt_F64_S32):
  16481. (JSC::ARMv7Assembler::vcvtr_S32_F64):
  16482. (JSC::ARMv7Assembler::vdiv_F64):
  16483. (JSC::ARMv7Assembler::vldr):
  16484. (JSC::ARMv7Assembler::vmov_F64_0):
  16485. (JSC::ARMv7Assembler::vmov):
  16486. (JSC::ARMv7Assembler::vmul_F64):
  16487. (JSC::ARMv7Assembler::vstr):
  16488. (JSC::ARMv7Assembler::vsub_F64):
  16489. (JSC::ARMv7Assembler::vcvt):
  16490. (JSC::ARMv7Assembler::vmem):
  16491. * assembler/AbstractMacroAssembler.h:
  16492. * assembler/MacroAssemblerARM.h:
  16493. * assembler/MacroAssemblerARMv7.h:
  16494. (JSC::MacroAssemblerARMv7::fpTempRegisterAsSingle):
  16495. (JSC::MacroAssemblerARMv7::neg32):
  16496. (JSC::MacroAssemblerARMv7::loadDouble):
  16497. (JSC::MacroAssemblerARMv7::divDouble):
  16498. (JSC::MacroAssemblerARMv7::convertInt32ToDouble):
  16499. (JSC::MacroAssemblerARMv7::branchConvertDoubleToInt32):
  16500. (JSC::MacroAssemblerARMv7::zeroDouble):
  16501. (JSC::MacroAssemblerARMv7::branchOr32):
  16502. (JSC::MacroAssemblerARMv7::set32):
  16503. (JSC::MacroAssemblerARMv7::set8):
  16504. * assembler/MacroAssemblerMIPS.h:
  16505. * assembler/MacroAssemblerX86Common.h:
  16506. 2010-07-01 Oliver Hunt <oliver@apple.com>
  16507. Reviewed by Geoff Garen.
  16508. Improve reentrancy logic in polymorphic cache stubs
  16509. <https://bugs.webkit.org/show_bug.cgi?id=41482>
  16510. <rdar://problem/8094380>
  16511. Make the polymorphic cache stubs handle reentrancy
  16512. better.
  16513. * jit/JITStubs.cpp:
  16514. (JSC::DEFINE_STUB_FUNCTION):
  16515. (JSC::getPolymorphicAccessStructureListSlot):
  16516. 2010-07-01 Antti Koivisto <koivisto@iki.fi>
  16517. Revert accidental commit.
  16518. * runtime/Collector.cpp:
  16519. (JSC::Heap::allocateBlock):
  16520. 2010-06-30 Darin Adler <darin@apple.com>
  16521. Reviewed by Adam Barth.
  16522. Add assertion, off by default, for when you forget to do adoptRef
  16523. https://bugs.webkit.org/show_bug.cgi?id=41422
  16524. * wtf/PassRefPtr.h: Tweaked formatting. Added a new adopted
  16525. function, called on the pointer by adoptRef, with an empty inline
  16526. default version, meant to be overloaded. Unified the inlining
  16527. with a macro named REF_DEREF_INLINE to make it clearer what's
  16528. going on in the refIfNotNull/derefIfNotNull functions. Renamed
  16529. releaseRef to leakRef, but left the old name in for compatibility
  16530. for now.
  16531. * wtf/RefCounted.h: Added code to require adoption and assert if
  16532. you don't call adoptRef. For now, it is turned off because of the
  16533. LOOSE_REF_COUNTED define in this header. Later we can turn it on
  16534. once we get everything working without asserting.
  16535. 2010-06-29 Michael Saboff <msaboff@apple.com>
  16536. Reviewed by Darin Adler.
  16537. Bug 41238 - RegExp performance slow on Dromaeo benchmark
  16538. Other javascript engines appear to cache prior results of regular
  16539. expression operations.
  16540. Suggest adding some sort of caching mechanism to regular expression
  16541. processing.
  16542. Added a single entry cache of match() results to RegExp class.
  16543. Also added performance improvements to UString == operator.
  16544. First check the impls for equality. Then get the length of
  16545. each of the non-null impls. Next check the sizes for equality.
  16546. Then check the data for the case of different impls that point
  16547. to the same data (most likely due to substrings from the beginning of
  16548. another string). Lastly we check the underlying data for equality.
  16549. * runtime/RegExp.cpp:
  16550. (JSC::RegExp::RegExp):
  16551. (JSC::RegExp::match):
  16552. * runtime/RegExp.h:
  16553. * runtime/UString.h:
  16554. (JSC::operator==):
  16555. 2010-06-29 Nathan Lawrence <nlawrence@apple.com>
  16556. Reviewed by Geoffrey Garen.
  16557. WTF::HashSet iterators are quasi-mutable. Changing the value through
  16558. dereferencing an iterator will not change the behavior of methods like
  16559. contains or find, but will change the behavior of iterating.
  16560. * wtf/HashSet.h:
  16561. (WTF::::begin):
  16562. (WTF::::end):
  16563. (WTF::::find):
  16564. (WTF::::remove):
  16565. * wtf/HashTable.h:
  16566. 2010-06-29 Martin Robinson <mrobinson@igalia.com>
  16567. Reviewed by Xan Lopez.
  16568. [GTK] Clean up the source lists in the GNUMakefile.am files
  16569. https://bugs.webkit.org/show_bug.cgi?id=41229
  16570. Clean up the GNUMakefile.am a little bit. Alphabetize and conglomerate
  16571. the source lists.
  16572. * GNUmakefile.am:
  16573. 2010-06-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
  16574. Reviewed by Kenneth Rohde Christiansen.
  16575. [Qt] Fix QtScript build after QScriptValuePrivate ctor changes
  16576. https://bugs.webkit.org/show_bug.cgi?id=41307
  16577. * qt/api/qscriptvalue_p.h:
  16578. (QScriptValuePrivate::prototype):
  16579. * qt/benchmarks/qscriptengine/qscriptengine.pro:
  16580. 2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
  16581. Reviewed by Kenneth Rohde Christiansen.
  16582. [Qt] QScriptEngine API should contain a newArray function
  16583. https://bugs.webkit.org/show_bug.cgi?id=39115
  16584. * qt/api/qscriptengine.cpp:
  16585. (QScriptEngine::newArray):
  16586. * qt/api/qscriptengine.h:
  16587. * qt/api/qscriptengine_p.cpp:
  16588. (QScriptEnginePrivate::newArray):
  16589. * qt/api/qscriptengine_p.h:
  16590. * qt/tests/qscriptengine/tst_qscriptengine.cpp:
  16591. (tst_QScriptEngine::newArray):
  16592. 2010-06-28 Xan Lopez <xlopez@igalia.com>
  16593. Reviewed by Gustavo Noronha.
  16594. Install jsc as jsc-X where X is the major API version to allow
  16595. parallel installation of both GTK+ 2.x and 3.x versions.
  16596. * GNUmakefile.am:
  16597. 2010-06-28 John Gregg <johnnyg@google.com>
  16598. Reviewed by Kent Tamura.
  16599. add ENABLE_DIRECTORY_UPLOAD build support
  16600. https://bugs.webkit.org/show_bug.cgi?id=41100
  16601. * Configurations/FeatureDefines.xcconfig:
  16602. 2010-06-28 Xan Lopez <xlopez@igalia.com>
  16603. Revert to build jsc, since the tests expect this.
  16604. * GNUmakefile.am:
  16605. 2010-06-28 Zoltan Herczeg <zherczeg@webkit.org>
  16606. Reviewed by Oliver Hunt.
  16607. Only one character lookahead should be enough for the lexer
  16608. https://bugs.webkit.org/show_bug.cgi?id=41213
  16609. The lexer had 4 character lookahead before, which required
  16610. a complex shifting mechanism. This can be improved by using
  16611. only one character lookahead for most decisions, and a
  16612. peek() function as a fallback when it is absolutely necessary.
  16613. * parser/Lexer.cpp:
  16614. (JSC::Lexer::currentCharacter):
  16615. (JSC::Lexer::currentOffset):
  16616. (JSC::Lexer::setCode):
  16617. (JSC::Lexer::shift):
  16618. (JSC::Lexer::peek):
  16619. (JSC::Lexer::getUnicodeCharacter):
  16620. (JSC::Lexer::shiftLineTerminator):
  16621. (JSC::Lexer::lastTokenWasRestrKeyword):
  16622. (JSC::Lexer::lex):
  16623. (JSC::Lexer::scanRegExp):
  16624. (JSC::Lexer::skipRegExp):
  16625. * parser/Lexer.h:
  16626. 2010-06-28 Lucas De Marchi <lucas.demarchi@profusion.mobi>
  16627. Unreviewed build fix.
  16628. [EFL] Build fix for latest version of Ecore library.
  16629. Ecore recently changed return type of callbacks from int to Eina_Bool.
  16630. * wtf/efl/MainThreadEfl.cpp:
  16631. (WTF::timeoutFired): Return Eina_Bool instead of int.
  16632. 2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
  16633. Reviewed by Kenneth Rohde Christiansen.
  16634. [Qt] QScriptValue should have API for accessing object properties
  16635. https://bugs.webkit.org/show_bug.cgi?id=40903
  16636. Make possible to access properties inside QScriptValues. While this
  16637. still doesn't support the ResolveLocal parameter, it is already useful
  16638. for testing the API.
  16639. The tests from upstream QtScript weren't imported since most of them
  16640. depend on the setProperty() function as well. A simple test was created.
  16641. * qt/api/qscriptvalue.cpp:
  16642. (QScriptValue::property):
  16643. * qt/api/qscriptvalue.h:
  16644. (QScriptValue::):
  16645. * qt/api/qscriptvalue_p.h:
  16646. (QScriptValuePrivate::property):
  16647. * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
  16648. (tst_QScriptValue::propertySimple):
  16649. * qt/tests/qscriptvalue/tst_qscriptvalue.h:
  16650. 2010-06-28 Xan Lopez <xlopez@igalia.com>
  16651. Reviewed by Gustavo Noronha.
  16652. [GTK] Add support for GTK+3
  16653. https://bugs.webkit.org/show_bug.cgi?id=41253
  16654. Suffix jsc with the API version of the library, so that
  16655. libwebkitgtk 1.x and 3.x can install jsc.
  16656. * GNUmakefile.am:
  16657. 2010-06-27 Kwang Yul Seo <skyul@company100.net>
  16658. Reviewed by Kent Tamura.
  16659. [BREWMP] Turn ENABLE(SINGLE_THREADED) on.
  16660. https://bugs.webkit.org/show_bug.cgi?id=41135
  16661. Brew MP does not support preemptive multi-threading.
  16662. Disable threading for Brew MP.
  16663. * wtf/Platform.h:
  16664. 2010-06-26 Tony Gentilcore <tonyg@chromium.org>
  16665. Reviewed by Dimitri Glazkov.
  16666. Add an ENABLE_WEB_TIMING option for enabling Web Timing support.
  16667. https://bugs.webkit.org/show_bug.cgi?id=38924
  16668. * Configurations/FeatureDefines.xcconfig:
  16669. 2010-06-25 Nathan Lawrence <nlawrence@apple.com>
  16670. Reviewed by Geoffrey Garen.
  16671. We assume in testapi.c that the value aHeapRef refers to will not be
  16672. moved. When we have movable objects, this will not be the case.
  16673. * API/tests/testapi.c:
  16674. (main):
  16675. 2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com>
  16676. Unreviewed, rolling out r61924.
  16677. http://trac.webkit.org/changeset/61924
  16678. https://bugs.webkit.org/show_bug.cgi?id=41240
  16679. It was rolled out, but cq+ wasn't removed (Requested by Ossy_
  16680. on #webkit).
  16681. * runtime/RegExp.cpp:
  16682. (JSC::RegExp::RegExp):
  16683. (JSC::RegExp::create):
  16684. * runtime/RegExp.h:
  16685. * runtime/RegExpCache.cpp:
  16686. (JSC::RegExpCache::lookupOrCreate):
  16687. (JSC::RegExpCache::create):
  16688. * runtime/RegExpCache.h:
  16689. 2010-06-25 Renata Hodovan <reni@inf.u-szeged.hu>
  16690. Reviewed by Geoffrey Garen.
  16691. Merge RegExp constructor and RegExp::create methods into one.
  16692. Both of function are called with tree parameters and check whether
  16693. flags (the third param) is given or not.
  16694. Simplify hash lookups in RegExpCache::create with giving them an extra
  16695. iterator parameter.
  16696. https://bugs.webkit.org/show_bug.cgi?id=41055
  16697. * runtime/RegExp.cpp:
  16698. (JSC::RegExp::RegExp):
  16699. * runtime/RegExp.h:
  16700. * runtime/RegExpCache.cpp:
  16701. (JSC::RegExpCache::lookupOrCreate):
  16702. (JSC::RegExpCache::create):
  16703. * runtime/RegExpCache.h:
  16704. 2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
  16705. Reviewed by Simon Hausmann.
  16706. Introduce QtScript benchmarks.
  16707. The QtScript performance should be tested regularly. The patch introduces
  16708. micro benchmarks for existing API.
  16709. [Qt] Performance of the QtScript API is not tested.
  16710. https://bugs.webkit.org/show_bug.cgi?id=40911
  16711. * qt/benchmarks/benchmarks.pri: Copied from JavaScriptCore/qt/tests/tests.pri.
  16712. * qt/benchmarks/benchmarks.pro: Added.
  16713. * qt/benchmarks/qscriptengine/qscriptengine.pro: Added.
  16714. * qt/benchmarks/qscriptengine/tst_qscriptengine.cpp: Added.
  16715. (tst_QScriptEngine::checkSyntax_data):
  16716. (tst_QScriptEngine::checkSyntax):
  16717. (tst_QScriptEngine::constructor):
  16718. (tst_QScriptEngine::evaluateString_data):
  16719. (tst_QScriptEngine::evaluateString):
  16720. (tst_QScriptEngine::evaluateProgram_data):
  16721. (tst_QScriptEngine::evaluateProgram):
  16722. (tst_QScriptEngine::newObject):
  16723. (tst_QScriptEngine::nullValue):
  16724. (tst_QScriptEngine::undefinedValue):
  16725. (tst_QScriptEngine::globalObject):
  16726. (tst_QScriptEngine::toStringHandle):
  16727. * qt/benchmarks/qscriptvalue/qscriptvalue.pro: Added.
  16728. * qt/benchmarks/qscriptvalue/tst_qscriptvalue.cpp: Added.
  16729. (tst_QScriptValue::tst_QScriptValue):
  16730. (tst_QScriptValue::~tst_QScriptValue):
  16731. (tst_QScriptValue::values_data):
  16732. (tst_QScriptValue::ctorBool):
  16733. (tst_QScriptValue::ctorReal):
  16734. (tst_QScriptValue::ctorNumber):
  16735. (tst_QScriptValue::ctorQString):
  16736. (tst_QScriptValue::ctorCString):
  16737. (tst_QScriptValue::ctorSpecial):
  16738. (tst_QScriptValue::ctorQScriptValue):
  16739. (tst_QScriptValue::isValid_data):
  16740. (tst_QScriptValue::isValid):
  16741. (tst_QScriptValue::isBool_data):
  16742. (tst_QScriptValue::isBool):
  16743. (tst_QScriptValue::isNumber_data):
  16744. (tst_QScriptValue::isNumber):
  16745. (tst_QScriptValue::isFunction_data):
  16746. (tst_QScriptValue::isFunction):
  16747. (tst_QScriptValue::isNull_data):
  16748. (tst_QScriptValue::isNull):
  16749. (tst_QScriptValue::isString_data):
  16750. (tst_QScriptValue::isString):
  16751. (tst_QScriptValue::isUndefined_data):
  16752. (tst_QScriptValue::isUndefined):
  16753. (tst_QScriptValue::isObject_data):
  16754. (tst_QScriptValue::isObject):
  16755. (tst_QScriptValue::isError_data):
  16756. (tst_QScriptValue::isError):
  16757. (tst_QScriptValue::toString_data):
  16758. (tst_QScriptValue::toString):
  16759. (tst_QScriptValue::toNumber_data):
  16760. (tst_QScriptValue::toNumber):
  16761. (tst_QScriptValue::toBool_data):
  16762. (tst_QScriptValue::toBool):
  16763. (tst_QScriptValue::toInteger_data):
  16764. (tst_QScriptValue::toInteger):
  16765. (tst_QScriptValue::toInt32_data):
  16766. (tst_QScriptValue::toInt32):
  16767. (tst_QScriptValue::toUInt32_data):
  16768. (tst_QScriptValue::toUInt32):
  16769. (tst_QScriptValue::toUInt16_data):
  16770. (tst_QScriptValue::toUInt16):
  16771. (tst_QScriptValue::toObject_data):
  16772. (tst_QScriptValue::toObject):
  16773. (tst_QScriptValue::equals_data):
  16774. (tst_QScriptValue::equals):
  16775. (tst_QScriptValue::strictlyEquals_data):
  16776. (tst_QScriptValue::strictlyEquals):
  16777. (tst_QScriptValue::instanceOf_data):
  16778. (tst_QScriptValue::instanceOf):
  16779. 2010-06-25 Oliver Hunt <oliver@apple.com>
  16780. Reviewed by Geoffrey Garen.
  16781. Remove old js parser
  16782. https://bugs.webkit.org/show_bug.cgi?id=41222
  16783. Remove the old yacc parser, this also solves the tiger problem. Which
  16784. was a conflict between yacc generated token values and those in the
  16785. custom parser
  16786. * Android.mk:
  16787. * CMakeLists.txt:
  16788. * DerivedSources.make:
  16789. * DerivedSources.pro:
  16790. * GNUmakefile.am:
  16791. * JavaScriptCore.pro:
  16792. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  16793. * JavaScriptCore.xcodeproj/project.pbxproj:
  16794. * parser/Grammar.y: Removed.
  16795. * parser/JSParser.cpp:
  16796. * parser/JSParser.h:
  16797. * parser/Lexer.cpp:
  16798. * parser/NodeConstructors.h:
  16799. (JSC::Node::Node):
  16800. * parser/Parser.cpp:
  16801. (JSC::Parser::parse):
  16802. * wtf/Platform.h:
  16803. 2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
  16804. Reviewed by Simon Hausmann.
  16805. New QtScript API; setPrototype() and prototype().
  16806. This patch implements QScriptValue's prototype accessors.
  16807. [Qt] QScriptValue should have accessors to a prototype.
  16808. https://bugs.webkit.org/show_bug.cgi?id=39356
  16809. * qt/api/qscriptvalue.cpp:
  16810. (QScriptValue::prototype):
  16811. (QScriptValue::setPrototype):
  16812. * qt/api/qscriptvalue.h:
  16813. * qt/api/qscriptvalue_p.h:
  16814. (QScriptValuePrivate::prototype):
  16815. (QScriptValuePrivate::setPrototype):
  16816. * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
  16817. (tst_QScriptValue::getSetPrototype):
  16818. * qt/tests/qscriptvalue/tst_qscriptvalue.h:
  16819. 2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi>
  16820. Reviewed by Kenneth Rohde Christiansen.
  16821. [CMake] Add option to enable JIT.
  16822. JIT is disabled by default, but now it's possible to enable it through
  16823. an option to CMake: -DENABLE_JIT will enable it.
  16824. https://bugs.webkit.org/show_bug.cgi?id=40936
  16825. * CMakeLists.txt: Add missing files and re-sort.
  16826. 2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi>
  16827. Reviewed by Gustavo Noronha Silva.
  16828. [CMake] Remove unused variable in EFL build system. It was previously
  16829. being used to set the flags of each port but it was superseded by
  16830. other flags.
  16831. https://bugs.webkit.org/show_bug.cgi?id=40931
  16832. * jsc/CMakeLists.txt:
  16833. 2010-06-25 Nathan Lawrence <nlawrence@apple.com>
  16834. Reviewed by Geoffrey Garen.
  16835. Aligning AssemblerBuffer to 128 bytes gives a 0.4% speedup on
  16836. sunspider.
  16837. * assembler/AssemblerBuffer.h:
  16838. (JSC::AssemblerBuffer::AssemblerBuffer):
  16839. 2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com>
  16840. Unreviewed, rolling out r61842.
  16841. http://trac.webkit.org/changeset/61842
  16842. https://bugs.webkit.org/show_bug.cgi?id=41208
  16843. It broke Windows build (Requested by Ossy_ on #webkit).
  16844. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  16845. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  16846. * wtf/OwnPtrCommon.h:
  16847. * wtf/brew/OwnPtrBrew.h: Removed.
  16848. * wtf/win/OwnPtrWin.h: Removed.
  16849. 2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com>
  16850. Unreviewed, rolling out r61833.
  16851. http://trac.webkit.org/changeset/61833
  16852. https://bugs.webkit.org/show_bug.cgi?id=41205
  16853. It broke Leopard and GTK (Requested by Ossy_ on #webkit).
  16854. * runtime/RegExp.cpp:
  16855. (JSC::RegExp::RegExp):
  16856. (JSC::RegExp::create):
  16857. * runtime/RegExp.h:
  16858. * runtime/RegExpCache.cpp:
  16859. (JSC::RegExpCache::lookupOrCreate):
  16860. (JSC::RegExpCache::create):
  16861. * runtime/RegExpCache.h:
  16862. 2010-06-25 Kwang Yul Seo <skyul@company100.net>
  16863. Reviewed by Adam Barth.
  16864. Change OwnPtrCommon to include platform-specific headers
  16865. https://bugs.webkit.org/show_bug.cgi?id=40279
  16866. Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
  16867. Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
  16868. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  16869. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  16870. * wtf/OwnPtrCommon.h:
  16871. * wtf/brew/OwnPtrBrew.h: Added.
  16872. * wtf/win/OwnPtrWin.h: Added.
  16873. 2010-06-25 Patrick Gansterer <paroga@paroga.com>
  16874. Reviewed by Darin Adler.
  16875. Add the possibility for a head and footer section to create_jit_stubs.
  16876. https://bugs.webkit.org/show_bug.cgi?id=36050
  16877. * create_jit_stubs:
  16878. 2010-06-24 Renata Hodovan <reni@inf.u-szeged.hu>
  16879. Reviewed by Geoffrey Garen.
  16880. Merge RegExp constructor and RegExp::create methods into one.
  16881. Both of function are called with tree parameters and check whether
  16882. flags (the third param) is given or not.
  16883. Simplify hash lookups in RegExpCache::create with giving them an extra
  16884. iterator parameter.
  16885. https://bugs.webkit.org/show_bug.cgi?id=41055
  16886. * runtime/RegExp.cpp:
  16887. (JSC::RegExp::RegExp):
  16888. * runtime/RegExp.h:
  16889. * runtime/RegExpCache.cpp:
  16890. (JSC::RegExpCache::lookupOrCreate):
  16891. (JSC::RegExpCache::create):
  16892. * runtime/RegExpCache.h:
  16893. 2010-06-24 Oliver Hunt <oliver@apple.com>
  16894. Reviewed by Maciej Stachowiak.
  16895. Incorrect use of '+ 4' and 0 instead of tag and payload offsets in JSValue32_64
  16896. https://bugs.webkit.org/show_bug.cgi?id=41193
  16897. I noticed a use of '+ 4' in some of the 32_64 code paths and realised there
  16898. were a few places where endianness was being hardcoded. This patch fixes
  16899. the errors i could find through code inspection.
  16900. * jit/JITOpcodes32_64.cpp:
  16901. (JSC::JIT::emit_op_resolve_global):
  16902. * jit/JITPropertyAccess32_64.cpp:
  16903. (JSC::JIT::emit_op_get_by_val):
  16904. (JSC::JIT::emit_op_put_by_val):
  16905. (JSC::JIT::compileGetDirectOffset):
  16906. (JSC::JIT::privateCompilePutByIdTransition):
  16907. (JSC::JIT::patchGetByIdSelf):
  16908. (JSC::JIT::patchPutByIdReplace):
  16909. 2010-06-24 Oliver Hunt <oliver@apple.com>
  16910. Build fix
  16911. Temporarily get the tiger bot working again by disabling the
  16912. new JS parser. GCC on tiger is miscompiling the parser and
  16913. I don't have access to a tiger machine right now.
  16914. * wtf/Platform.h:
  16915. 2010-06-21 Nathan Lawrence <nlawrence@apple.com>
  16916. Reviewed by Geoff Garen.
  16917. https://bugs.webkit.org/show_bug.cgi?id=40128
  16918. Fixed broken debug functionality.
  16919. * interpreter/Interpreter.cpp:
  16920. (JSC::Interpreter::dumpRegisters):
  16921. Fixed to work with updated call frame.
  16922. * runtime/JSImmediate.h:
  16923. (JSC::JSValue::isCell):
  16924. Added assert for aligned cell.
  16925. * runtime/JSValue.cpp:
  16926. (JSC::JSValue::description):
  16927. Fixed to work with current JSValue implementation.
  16928. * runtime/JSZombie.cpp:
  16929. (JSC::JSZombie::leakedZombieStructure):
  16930. JSombies compile again.
  16931. 2010-06-24 Leandro Pereira <leandro@profusion.mobi>
  16932. Unreviewed build fix.
  16933. * CMakeLists.txt: Add JSParser.cpp.
  16934. 2010-06-24 Oliver Hunt <oliver@apple.com>
  16935. Reviewed by Maciej Stachowiak.
  16936. Single character string replacement may replace too many characters
  16937. https://bugs.webkit.org/show_bug.cgi?id=41138
  16938. <rdar://problem/8097496>
  16939. Simple fix to stop the rope path of single character replacement
  16940. once the first replacement occurs.
  16941. * runtime/JSString.cpp:
  16942. (JSC::JSString::replaceCharacter):
  16943. 2010-06-24 Gabor Loki <loki@webkit.org>
  16944. Reviewed by Gavin Barraclough.
  16945. Fix the length of instruction stream controlled by constant pool
  16946. https://bugs.webkit.org/show_bug.cgi?id=40293
  16947. The initial/maximum length of instruction stream (m_maxDistance) should
  16948. be set when the first constant arrives to the constant pool. Otherwise
  16949. the constant pool could be placed into an uninterrupted sequence.
  16950. * assembler/AssemblerBufferWithConstantPool.h:
  16951. (JSC::):
  16952. 2010-06-24 Oliver Hunt <oliver@apple.com>
  16953. Reviewed by Gavin Barraclough.
  16954. We assume bytecodeOffset will always return a value > 1,
  16955. so we adjust the failure case to return 1 instead of 0.
  16956. * bytecode/CodeBlock.h:
  16957. (JSC::CodeBlock::bytecodeOffset):
  16958. 2010-06-23 Oliver Hunt <oliver@apple.com>
  16959. Reviewed by Gavin Barraclough.
  16960. Custom-written JavaScript parser
  16961. https://bugs.webkit.org/show_bug.cgi?id=34019
  16962. Implement a recursive descent parser similar to that used by V8 and
  16963. SpiderMonkey. Greater than 2x improvement in SunSpider parsing tests.
  16964. The parser consists of a JSParser class that uses a TreeBuilder to actually
  16965. build the AST. There are currently two builders -- the ASTBuilder and
  16966. SyntaxChecker which separate the job of building an AST for code generation
  16967. and simply checking syntactic correctness.
  16968. There's still some less than ideal code remaining in the parser to allow
  16969. us to retain the existing lexing code with minimal changes. We'll tidy
  16970. this up at a later date.
  16971. * GNUmakefile.am:
  16972. * JavaScriptCore.gypi:
  16973. * JavaScriptCore.pro:
  16974. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  16975. * JavaScriptCore.xcodeproj/project.pbxproj:
  16976. * parser/ASTBuilder.h: Added.
  16977. (JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo):
  16978. (JSC::ASTBuilder::AssignmentInfo::AssignmentInfo):
  16979. (JSC::ASTBuilder::ASTBuilder):
  16980. (JSC::ASTBuilder::createSourceElements):
  16981. (JSC::ASTBuilder::varDeclarations):
  16982. (JSC::ASTBuilder::funcDeclarations):
  16983. (JSC::ASTBuilder::features):
  16984. (JSC::ASTBuilder::numConstants):
  16985. (JSC::ASTBuilder::appendToComma):
  16986. (JSC::ASTBuilder::createCommaExpr):
  16987. (JSC::ASTBuilder::createLogicalNot):
  16988. (JSC::ASTBuilder::createUnaryPlus):
  16989. (JSC::ASTBuilder::createVoid):
  16990. (JSC::ASTBuilder::thisExpr):
  16991. (JSC::ASTBuilder::createResolve):
  16992. (JSC::ASTBuilder::createObjectLiteral):
  16993. (JSC::ASTBuilder::createArray):
  16994. (JSC::ASTBuilder::createNumberExpr):
  16995. (JSC::ASTBuilder::createString):
  16996. (JSC::ASTBuilder::createBoolean):
  16997. (JSC::ASTBuilder::createNull):
  16998. (JSC::ASTBuilder::createBracketAccess):
  16999. (JSC::ASTBuilder::createDotAccess):
  17000. (JSC::ASTBuilder::createRegex):
  17001. (JSC::ASTBuilder::createNewExpr):
  17002. (JSC::ASTBuilder::createConditionalExpr):
  17003. (JSC::ASTBuilder::createAssignResolve):
  17004. (JSC::ASTBuilder::createFunctionExpr):
  17005. (JSC::ASTBuilder::createFunctionBody):
  17006. (JSC::ASTBuilder::createGetterOrSetterProperty):
  17007. (JSC::ASTBuilder::createArguments):
  17008. (JSC::ASTBuilder::createArgumentsList):
  17009. (JSC::ASTBuilder::createProperty):
  17010. (JSC::ASTBuilder::createPropertyList):
  17011. (JSC::ASTBuilder::createElementList):
  17012. (JSC::ASTBuilder::createFormalParameterList):
  17013. (JSC::ASTBuilder::createClause):
  17014. (JSC::ASTBuilder::createClauseList):
  17015. (JSC::ASTBuilder::setUsesArguments):
  17016. (JSC::ASTBuilder::createFuncDeclStatement):
  17017. (JSC::ASTBuilder::createBlockStatement):
  17018. (JSC::ASTBuilder::createExprStatement):
  17019. (JSC::ASTBuilder::createIfStatement):
  17020. (JSC::ASTBuilder::createForLoop):
  17021. (JSC::ASTBuilder::createForInLoop):
  17022. (JSC::ASTBuilder::createEmptyStatement):
  17023. (JSC::ASTBuilder::createVarStatement):
  17024. (JSC::ASTBuilder::createReturnStatement):
  17025. (JSC::ASTBuilder::createBreakStatement):
  17026. (JSC::ASTBuilder::createContinueStatement):
  17027. (JSC::ASTBuilder::createTryStatement):
  17028. (JSC::ASTBuilder::createSwitchStatement):
  17029. (JSC::ASTBuilder::createWhileStatement):
  17030. (JSC::ASTBuilder::createDoWhileStatement):
  17031. (JSC::ASTBuilder::createLabelStatement):
  17032. (JSC::ASTBuilder::createWithStatement):
  17033. (JSC::ASTBuilder::createThrowStatement):
  17034. (JSC::ASTBuilder::createDebugger):
  17035. (JSC::ASTBuilder::createConstStatement):
  17036. (JSC::ASTBuilder::appendConstDecl):
  17037. (JSC::ASTBuilder::appendStatement):
  17038. (JSC::ASTBuilder::addVar):
  17039. (JSC::ASTBuilder::combineCommaNodes):
  17040. (JSC::ASTBuilder::evalCount):
  17041. (JSC::ASTBuilder::appendBinaryExpressionInfo):
  17042. (JSC::ASTBuilder::operatorStackPop):
  17043. (JSC::ASTBuilder::operatorStackHasHigherPrecedence):
  17044. (JSC::ASTBuilder::getFromOperandStack):
  17045. (JSC::ASTBuilder::shrinkOperandStackBy):
  17046. (JSC::ASTBuilder::appendBinaryOperation):
  17047. (JSC::ASTBuilder::operatorStackAppend):
  17048. (JSC::ASTBuilder::popOperandStack):
  17049. (JSC::ASTBuilder::appendUnaryToken):
  17050. (JSC::ASTBuilder::unaryTokenStackLastType):
  17051. (JSC::ASTBuilder::unaryTokenStackLastStart):
  17052. (JSC::ASTBuilder::unaryTokenStackRemoveLast):
  17053. (JSC::ASTBuilder::assignmentStackAppend):
  17054. (JSC::ASTBuilder::createAssignment):
  17055. (JSC::ASTBuilder::Scope::Scope):
  17056. (JSC::ASTBuilder::setExceptionLocation):
  17057. (JSC::ASTBuilder::incConstants):
  17058. (JSC::ASTBuilder::usesThis):
  17059. (JSC::ASTBuilder::usesCatch):
  17060. (JSC::ASTBuilder::usesClosures):
  17061. (JSC::ASTBuilder::usesArguments):
  17062. (JSC::ASTBuilder::usesAssignment):
  17063. (JSC::ASTBuilder::usesWith):
  17064. (JSC::ASTBuilder::usesEval):
  17065. (JSC::ASTBuilder::createNumber):
  17066. (JSC::ASTBuilder::makeTypeOfNode):
  17067. (JSC::ASTBuilder::makeDeleteNode):
  17068. (JSC::ASTBuilder::makeNegateNode):
  17069. (JSC::ASTBuilder::makeBitwiseNotNode):
  17070. (JSC::ASTBuilder::makeMultNode):
  17071. (JSC::ASTBuilder::makeDivNode):
  17072. (JSC::ASTBuilder::makeAddNode):
  17073. (JSC::ASTBuilder::makeSubNode):
  17074. (JSC::ASTBuilder::makeLeftShiftNode):
  17075. (JSC::ASTBuilder::makeRightShiftNode):
  17076. (JSC::ASTBuilder::makeFunctionCallNode):
  17077. (JSC::ASTBuilder::makeBinaryNode):
  17078. (JSC::ASTBuilder::makeAssignNode):
  17079. (JSC::ASTBuilder::makePrefixNode):
  17080. (JSC::ASTBuilder::makePostfixNode):
  17081. * parser/JSParser.cpp: Added.
  17082. (JSC::JSParser::AllowInOverride::AllowInOverride):
  17083. (JSC::JSParser::AllowInOverride::~AllowInOverride):
  17084. (JSC::JSParser::token):
  17085. (JSC::JSParser::next):
  17086. (JSC::JSParser::consume):
  17087. (JSC::JSParser::match):
  17088. (JSC::JSParser::tokenStart):
  17089. (JSC::JSParser::tokenLine):
  17090. (JSC::JSParser::tokenEnd):
  17091. (JSC::JSParser::):
  17092. (JSC::JSParser::autoSemiColon):
  17093. (JSC::JSParser::canRecurse):
  17094. (JSC::JSParser::lastTokenEnd):
  17095. (JSC::jsParse):
  17096. (JSC::JSParser::JSParser):
  17097. (JSC::JSParser::parseProgram):
  17098. (JSC::JSParser::allowAutomaticSemicolon):
  17099. (JSC::JSParser::parseSourceElements):
  17100. (JSC::JSParser::parseVarDeclaration):
  17101. (JSC::JSParser::parseConstDeclaration):
  17102. (JSC::JSParser::parseDoWhileStatement):
  17103. (JSC::JSParser::parseWhileStatement):
  17104. (JSC::JSParser::parseVarDeclarationList):
  17105. (JSC::JSParser::parseConstDeclarationList):
  17106. (JSC::JSParser::parseForStatement):
  17107. (JSC::JSParser::parseBreakStatement):
  17108. (JSC::JSParser::parseContinueStatement):
  17109. (JSC::JSParser::parseReturnStatement):
  17110. (JSC::JSParser::parseThrowStatement):
  17111. (JSC::JSParser::parseWithStatement):
  17112. (JSC::JSParser::parseSwitchStatement):
  17113. (JSC::JSParser::parseSwitchClauses):
  17114. (JSC::JSParser::parseSwitchDefaultClause):
  17115. (JSC::JSParser::parseTryStatement):
  17116. (JSC::JSParser::parseDebuggerStatement):
  17117. (JSC::JSParser::parseBlockStatement):
  17118. (JSC::JSParser::parseStatement):
  17119. (JSC::JSParser::parseFormalParameters):
  17120. (JSC::JSParser::parseFunctionBody):
  17121. (JSC::JSParser::parseFunctionInfo):
  17122. (JSC::JSParser::parseFunctionDeclaration):
  17123. (JSC::JSParser::parseExpressionOrLabelStatement):
  17124. (JSC::JSParser::parseExpressionStatement):
  17125. (JSC::JSParser::parseIfStatement):
  17126. (JSC::JSParser::parseExpression):
  17127. (JSC::JSParser::parseAssignmentExpression):
  17128. (JSC::JSParser::parseConditionalExpression):
  17129. (JSC::isUnaryOp):
  17130. (JSC::JSParser::isBinaryOperator):
  17131. (JSC::JSParser::parseBinaryExpression):
  17132. (JSC::JSParser::parseProperty):
  17133. (JSC::JSParser::parseObjectLiteral):
  17134. (JSC::JSParser::parseArrayLiteral):
  17135. (JSC::JSParser::parsePrimaryExpression):
  17136. (JSC::JSParser::parseArguments):
  17137. (JSC::JSParser::parseMemberExpression):
  17138. (JSC::JSParser::parseUnaryExpression):
  17139. * parser/JSParser.h: Added.
  17140. (JSC::):
  17141. (JSC::JSTokenInfo::JSTokenInfo):
  17142. * parser/Lexer.cpp:
  17143. (JSC::Lexer::lex):
  17144. * parser/Lexer.h:
  17145. (JSC::Lexer::setLastLineNumber):
  17146. (JSC::Lexer::lastLineNumber):
  17147. * parser/NodeConstructors.h:
  17148. (JSC::Node::Node):
  17149. * parser/Parser.cpp:
  17150. (JSC::Parser::parse):
  17151. * parser/SyntaxChecker.h: Added.
  17152. (JSC::SyntaxChecker::SyntaxChecker):
  17153. (JSC::SyntaxChecker::createSourceElements):
  17154. (JSC::SyntaxChecker::makeFunctionCallNode):
  17155. (JSC::SyntaxChecker::appendToComma):
  17156. (JSC::SyntaxChecker::createCommaExpr):
  17157. (JSC::SyntaxChecker::makeAssignNode):
  17158. (JSC::SyntaxChecker::makePrefixNode):
  17159. (JSC::SyntaxChecker::makePostfixNode):
  17160. (JSC::SyntaxChecker::makeTypeOfNode):
  17161. (JSC::SyntaxChecker::makeDeleteNode):
  17162. (JSC::SyntaxChecker::makeNegateNode):
  17163. (JSC::SyntaxChecker::makeBitwiseNotNode):
  17164. (JSC::SyntaxChecker::createLogicalNot):
  17165. (JSC::SyntaxChecker::createUnaryPlus):
  17166. (JSC::SyntaxChecker::createVoid):
  17167. (JSC::SyntaxChecker::thisExpr):
  17168. (JSC::SyntaxChecker::createResolve):
  17169. (JSC::SyntaxChecker::createObjectLiteral):
  17170. (JSC::SyntaxChecker::createArray):
  17171. (JSC::SyntaxChecker::createNumberExpr):
  17172. (JSC::SyntaxChecker::createString):
  17173. (JSC::SyntaxChecker::createBoolean):
  17174. (JSC::SyntaxChecker::createNull):
  17175. (JSC::SyntaxChecker::createBracketAccess):
  17176. (JSC::SyntaxChecker::createDotAccess):
  17177. (JSC::SyntaxChecker::createRegex):
  17178. (JSC::SyntaxChecker::createNewExpr):
  17179. (JSC::SyntaxChecker::createConditionalExpr):
  17180. (JSC::SyntaxChecker::createAssignResolve):
  17181. (JSC::SyntaxChecker::createFunctionExpr):
  17182. (JSC::SyntaxChecker::createFunctionBody):
  17183. (JSC::SyntaxChecker::createArguments):
  17184. (JSC::SyntaxChecker::createArgumentsList):
  17185. (JSC::SyntaxChecker::createProperty):
  17186. (JSC::SyntaxChecker::createPropertyList):
  17187. (JSC::SyntaxChecker::createElementList):
  17188. (JSC::SyntaxChecker::createFormalParameterList):
  17189. (JSC::SyntaxChecker::createClause):
  17190. (JSC::SyntaxChecker::createClauseList):
  17191. (JSC::SyntaxChecker::setUsesArguments):
  17192. (JSC::SyntaxChecker::createFuncDeclStatement):
  17193. (JSC::SyntaxChecker::createBlockStatement):
  17194. (JSC::SyntaxChecker::createExprStatement):
  17195. (JSC::SyntaxChecker::createIfStatement):
  17196. (JSC::SyntaxChecker::createForLoop):
  17197. (JSC::SyntaxChecker::createForInLoop):
  17198. (JSC::SyntaxChecker::createEmptyStatement):
  17199. (JSC::SyntaxChecker::createVarStatement):
  17200. (JSC::SyntaxChecker::createReturnStatement):
  17201. (JSC::SyntaxChecker::createBreakStatement):
  17202. (JSC::SyntaxChecker::createContinueStatement):
  17203. (JSC::SyntaxChecker::createTryStatement):
  17204. (JSC::SyntaxChecker::createSwitchStatement):
  17205. (JSC::SyntaxChecker::createWhileStatement):
  17206. (JSC::SyntaxChecker::createWithStatement):
  17207. (JSC::SyntaxChecker::createDoWhileStatement):
  17208. (JSC::SyntaxChecker::createLabelStatement):
  17209. (JSC::SyntaxChecker::createThrowStatement):
  17210. (JSC::SyntaxChecker::createDebugger):
  17211. (JSC::SyntaxChecker::createConstStatement):
  17212. (JSC::SyntaxChecker::appendConstDecl):
  17213. (JSC::SyntaxChecker::createGetterOrSetterProperty):
  17214. (JSC::SyntaxChecker::appendStatement):
  17215. (JSC::SyntaxChecker::addVar):
  17216. (JSC::SyntaxChecker::combineCommaNodes):
  17217. (JSC::SyntaxChecker::evalCount):
  17218. (JSC::SyntaxChecker::appendBinaryExpressionInfo):
  17219. (JSC::SyntaxChecker::operatorStackPop):
  17220. * runtime/JSGlobalData.h:
  17221. * wtf/Platform.h:
  17222. * wtf/ThreadSpecific.h:
  17223. (WTF::T):
  17224. 2010-06-23 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
  17225. Reviewed by Simon Hausmann.
  17226. Optimization of the QScriptValuePrivate.
  17227. Patch change only internals of the QScriptValuePrivate.
  17228. Most of the QScriptValuePrivate's attributes were moved
  17229. into an union.
  17230. [Qt] Optimization of the QScriptVAluePrivate.
  17231. https://bugs.webkit.org/show_bug.cgi?id=40415
  17232. * qt/api/qscriptengine_p.cpp:
  17233. (QScriptEnginePrivate::globalObject):
  17234. * qt/api/qscriptvalue_p.h:
  17235. (QScriptValuePrivate::):
  17236. (QScriptValuePrivate::~QScriptValuePrivate):
  17237. (QScriptValuePrivate::QScriptValuePrivate):
  17238. (QScriptValuePrivate::toString):
  17239. (QScriptValuePrivate::toNumber):
  17240. (QScriptValuePrivate::toBool):
  17241. (QScriptValuePrivate::toObject):
  17242. (QScriptValuePrivate::equals):
  17243. (QScriptValuePrivate::strictlyEquals):
  17244. (QScriptValuePrivate::assignEngine):
  17245. (QScriptValuePrivate::operator JSValueRef):
  17246. (QScriptValuePrivate::operator JSObjectRef):
  17247. (QScriptValuePrivate::refinedJSValue):
  17248. 2010-06-23 Kwang Yul Seo <skyul@company100.net>
  17249. Reviewed by Oliver Hunt.
  17250. [GTK] Implement ThreadSpecific with glib
  17251. https://bugs.webkit.org/show_bug.cgi?id=39829
  17252. Implement ThreadSpecific with glib's GStaticPrivate.
  17253. This patch makes it possible to build GTK port without pthread.
  17254. * wtf/ThreadSpecific.h:
  17255. (WTF::::ThreadSpecific):
  17256. (WTF::::~ThreadSpecific):
  17257. (WTF::::get):
  17258. (WTF::::set):
  17259. (WTF::::destroy):
  17260. 2010-06-23 Leandro Pereira <leandro@profusion.mobi>
  17261. Unreviewed build fix.
  17262. * CMakeLists.txt: Add runtime/RegExpCache.cpp.
  17263. 2010-06-22 Renata Hodovan <hodovan@inf.u-szeged.hu>
  17264. Reviewed by Geoffrey Garen.
  17265. Adding regular expression caching to JavaScriptCore
  17266. https://bugs.webkit.org/show_bug.cgi?id=38142
  17267. The cache is based on Round Robin eviction policy, and
  17268. can cache at most 256 character long regular expressions,
  17269. and at most 256 of them. These values can be changed at compile time.
  17270. * GNUmakefile.am:
  17271. * JavaScriptCore.gypi:
  17272. * JavaScriptCore.pro:
  17273. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  17274. * JavaScriptCore.xcodeproj/project.pbxproj:
  17275. * bytecompiler/NodesCodegen.cpp:
  17276. (JSC::RegExpNode::emitBytecode):
  17277. * runtime/JSGlobalData.cpp:
  17278. (JSC::JSGlobalData::JSGlobalData):
  17279. (JSC::JSGlobalData::~JSGlobalData):
  17280. * runtime/JSGlobalData.h:
  17281. (JSC::JSGlobalData::regExpCache):
  17282. * runtime/RegExpCache.cpp: Added.
  17283. (JSC::RegExpCache::lookupOrCreate):
  17284. (JSC::RegExpCache::create):
  17285. (JSC::RegExpCache::RegExpCache):
  17286. * runtime/RegExpCache.h: Added.
  17287. * runtime/RegExpConstructor.cpp:
  17288. (JSC::constructRegExp):
  17289. * runtime/RegExpKey.h: Added.
  17290. (JSC::RegExpKey::RegExpKey):
  17291. (JSC::RegExpKey::getFlagsValue):
  17292. (WTF::operator==):
  17293. (WTF::):
  17294. * runtime/RegExpPrototype.cpp:
  17295. (JSC::regExpProtoFuncCompile):
  17296. * runtime/StringPrototype.cpp:
  17297. (JSC::stringProtoFuncMatch):
  17298. (JSC::stringProtoFuncSearch):
  17299. 2010-06-22 Gabor Loki <loki@webkit.org>
  17300. Reviewed by Geoffrey Garen.
  17301. Add native call support for ARM and Thumb-2 JIT.
  17302. https://bugs.webkit.org/show_bug.cgi?id=40231
  17303. * jit/JITOpcodes.cpp:
  17304. (JSC::JIT::privateCompileCTINativeCall):
  17305. * jit/JITOpcodes32_64.cpp:
  17306. (JSC::JIT::privateCompileCTINativeCall):
  17307. * wtf/Platform.h:
  17308. 2010-06-21 Oliver Hunt <oliver@apple.com>
  17309. Reviewed by Geoffrey Garen.
  17310. Make JSC more resilient in the face of parse failures
  17311. https://bugs.webkit.org/show_bug.cgi?id=40951
  17312. A number of recent bugs have occurred due to issues like miscounting
  17313. BOMs, etc which lead to interesting crashes later on. Adding this
  17314. logic hardens JSC in the face of these errors, and has no impact on
  17315. performance (32bit jit actually gets 0.7% faster but I put that down
  17316. to cache effects).
  17317. * bytecode/CodeBlock.cpp:
  17318. (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
  17319. (JSC::CodeBlock::lineNumberForBytecodeOffset):
  17320. (JSC::CodeBlock::expressionRangeForBytecodeOffset):
  17321. (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
  17322. * bytecode/CodeBlock.h:
  17323. (JSC::CodeBlock::bytecodeOffset):
  17324. * interpreter/Interpreter.cpp:
  17325. (JSC::Interpreter::execute):
  17326. (JSC::Interpreter::executeCall):
  17327. (JSC::Interpreter::executeConstruct):
  17328. (JSC::Interpreter::prepareForRepeatCall):
  17329. (JSC::Interpreter::privateExecute):
  17330. * jit/JITOpcodes.cpp:
  17331. (JSC::JIT::privateCompileCTIMachineTrampolines):
  17332. * jit/JITOpcodes32_64.cpp:
  17333. (JSC::JIT::privateCompileCTIMachineTrampolines):
  17334. * jit/JITStubs.cpp:
  17335. (JSC::DEFINE_STUB_FUNCTION):
  17336. * runtime/ArrayPrototype.cpp:
  17337. (JSC::isNumericCompareFunction):
  17338. * runtime/Executable.cpp:
  17339. (JSC::FunctionExecutable::compileForCall):
  17340. (JSC::FunctionExecutable::compileForConstruct):
  17341. (JSC::FunctionExecutable::generateJITCodeForCall):
  17342. (JSC::FunctionExecutable::generateJITCodeForConstruct):
  17343. (JSC::FunctionExecutable::reparseExceptionInfo):
  17344. (JSC::EvalExecutable::reparseExceptionInfo):
  17345. * runtime/Executable.h:
  17346. (JSC::FunctionExecutable::bytecodeForCall):
  17347. (JSC::FunctionExecutable::bytecodeForConstruct):
  17348. * runtime/JSGlobalData.cpp:
  17349. (JSC::JSGlobalData::numericCompareFunction):
  17350. 2010-06-21 John Sullivan <sullivan@apple.com>
  17351. Reviewed by Adam Roben.
  17352. RetainPtr can't be used in HashMaps or HashSets
  17353. <https://bugs.webkit.org/show_bug.cgi?id=40938>
  17354. Added hashing knowledge similar to that in COMPtr.h.
  17355. * wtf/RetainPtr.h:
  17356. (WTF::RetainPtr::RetainPtr):
  17357. New function, copied from COMPtr.h but for the type change.
  17358. (WTF::RetainPtr::isHashTableDeletedValue):
  17359. Ditto.
  17360. (WTF::RetainPtr::hashTableDeletedValue):
  17361. Ditto.
  17362. Added template code for HashTraits and PtrHash copied from COMPtr.h but for the type change.
  17363. The only difference is that constructDeletedValue() matches the RefPtr implementation (in HashTraits.h)
  17364. rather than the COMPtr implementation.
  17365. 2010-06-19 Oliver Hunt <oliver@apple.com>
  17366. Reviewed by Geoffrey Garen.
  17367. Need to ensure that we grow the RegisterFile when creating a callframe for host code
  17368. https://bugs.webkit.org/show_bug.cgi?id=40858
  17369. <rdar://problem/8108986>
  17370. In the past the use of the callframe in hostcode was much more
  17371. limited. Now that we expect the callframe to always be valid
  17372. we need to grow the RegisterFile so that this is actually the
  17373. case. In this particular case the problem was failing to grow
  17374. the registerfile could lead to a callframe that extended beyond
  17375. RegisterFiler::end(), so vm re-entry would clobber the callframe
  17376. other scenarios could also lead to badness.
  17377. I was unable to construct a simple testcase to trigger badness,
  17378. and any such testcase would be so dependent on exact vm stack
  17379. layout that it would be unlikely to work as a testcase following
  17380. any callframe or register allocation changes anyway.
  17381. Thankfully the new assertion I added should help to catch these
  17382. failures in future, and triggers on a couple of tests currently.
  17383. * interpreter/CallFrame.cpp:
  17384. (JSC::CallFrame::registerFile):
  17385. * interpreter/CallFrame.h:
  17386. (JSC::ExecState::init):
  17387. * interpreter/Interpreter.cpp:
  17388. (JSC::Interpreter::privateExecute):
  17389. * jit/JITStubs.cpp:
  17390. (JSC::DEFINE_STUB_FUNCTION):
  17391. 2010-06-21 Satish Sampath <satish@chromium.org>
  17392. Reviewed by Steve Block.
  17393. Speech Input Patch 0: Added compilation argument to conditionally compile pending patches.
  17394. https://bugs.webkit.org/show_bug.cgi?id=40878
  17395. * Configurations/FeatureDefines.xcconfig:
  17396. 2010-06-21 Kwang Yul Seo <skyul@company100.net>
  17397. Reviewed by Kent Tamura.
  17398. [BREWMP] Use global new/delete operator overloading with USE_SYSTEM_MALLOC=1
  17399. https://bugs.webkit.org/show_bug.cgi?id=40653
  17400. Currently, other ports do not use global new/delete operator overloading
  17401. when USE_SYSTEM_MALLOC=1. Brew MP uses system malloc, but it needs to enable
  17402. "global fastMalloc new" because the default new/delete causes crash on device.
  17403. We need to replace them with Brew MP's MALLOC/FREE.
  17404. * wtf/FastMalloc.h:
  17405. 2010-06-18 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
  17406. Reviewed by Simon Hausmann.
  17407. [Qt] Work around a build problem with libjscore on Symbian.
  17408. https://bugs.webkit.org/show_bug.cgi?id=40840
  17409. Sbsv2 sometimes have problems with debug/release configuration
  17410. determination causing QtWebKit in release to try linking with the debug
  17411. JavaScriptCore static library. This patch limit the jscore/jscored
  17412. r58306 fix necessary for mac builds only to the mac platform to prevent the
  17413. different name problem.
  17414. The real fix would be to fix qmake or the toolchain, this patch might
  17415. help meanwhile.
  17416. * JavaScriptCore.pri:
  17417. 2010-06-21 Patrick Gansterer <paroga@paroga.com>
  17418. Reviewed by Kent Tamura.
  17419. Buildfix after r61338.
  17420. https://bugs.webkit.org/show_bug.cgi?id=40888
  17421. roundUpAllocationSize is needed in RegisterFile.h.
  17422. * jit/ExecutableAllocator.h:
  17423. 2010-06-19 Kwang Yul Seo <skyul@company100.net>
  17424. Reviewed by Darin Adler.
  17425. Include <string.h> in StringExtras.h
  17426. https://bugs.webkit.org/show_bug.cgi?id=40808
  17427. Without string.h, RVCT 2.2 can't compile StringExtras.h.
  17428. It can't find strlen and strncmp.
  17429. * wtf/StringExtras.h:
  17430. 2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
  17431. Reviewed by Kenneth Rohde Christiansen.
  17432. Don't use __attribute__((may_alias)) with the Intel compiler,
  17433. as it doesn't understand it.
  17434. * wtf/Vector.h:
  17435. 2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
  17436. Reviewed by Kenneth Rohde Christiansen.
  17437. Fix compilation with the Intel C++ compiler (11.1.072).
  17438. Like RVCT, label pointers must be void*, not const void*.
  17439. * bytecode/Opcode.h:
  17440. 2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
  17441. Reviewed by Kenneth Rohde Christiansen.
  17442. Add the WTF_COMPILER_INTEL for when the Intel compiler is used
  17443. for building. Usually, the Intel compiler masquerades as
  17444. another compiler in the system and gets away with it, but some
  17445. times specific fixes are required (such as when using language
  17446. extensions).
  17447. * wtf/Platform.h:
  17448. 2010-06-18 Oliver Hunt <oliver@apple.com>
  17449. Reviewed by Geoffrey Garen.
  17450. Incorrect handling of multiple BOMs scattered through a file.
  17451. https://bugs.webkit.org/show_bug.cgi?id=40865
  17452. When determining the offset of open and close braces in a source
  17453. with BOMs we were finishing our count early as we failed to account
  17454. for BOMs prior to the open/close brace positions effecting those
  17455. positions.
  17456. * parser/Lexer.cpp:
  17457. (JSC::Lexer::sourceCode):
  17458. 2010-06-17 Oliver Hunt <oliver@apple.com>
  17459. Reviewed by Sam Weinig.
  17460. Don't throw away exception information for functions that use exceptions
  17461. https://bugs.webkit.org/show_bug.cgi?id=40786
  17462. Simple patch to stop JSC from throwing away the exception information
  17463. of a function that uses "exceptiony" features like try and throw. This
  17464. is a speed up for catching expressions but it's difficult to quantify as
  17465. the old cost of reparsing is amortised over all exceptions caught in the
  17466. effected function.
  17467. * bytecode/CodeBlock.cpp:
  17468. (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
  17469. * bytecompiler/BytecodeGenerator.cpp:
  17470. (JSC::BytecodeGenerator::generate):
  17471. (JSC::BytecodeGenerator::emitCatch):
  17472. * bytecompiler/BytecodeGenerator.h:
  17473. (JSC::BytecodeGenerator::emitThrow):
  17474. 2010-06-18 Anders Carlsson <andersca@apple.com>
  17475. Reviewed by Sam Weinig.
  17476. Add PlatformStrategies and PluginStrategy classes.
  17477. https://bugs.webkit.org/show_bug.cgi?id=40850
  17478. * wtf/Platform.h:
  17479. 2010-06-18 Leandro Pereira <leandro@profusion.mobi>
  17480. [EFL] Unreviewed build fix.
  17481. * wtf/CMakeLists.txt: Add MD5.cpp.
  17482. 2010-06-17 Shu Chang <chang.shu@nokia.com>
  17483. Reviewed by Kenneth Rohde Christiansen.
  17484. [Qt] Fix the link error on symbian with ENABLE_JIT=0.
  17485. 1. Add "#if ENABLE(JIT)" in the header file;
  17486. 2. Put feature enable/disable logic to a common.pri so
  17487. that both JavaScriptCore.pri and WebCore.pri can share.
  17488. https://bugs.webkit.org/show_bug.cgi?id=40780
  17489. * JavaScriptCore.pri:
  17490. * jit/ExecutableAllocator.h:
  17491. 2010-06-17 Darin Adler <darin@apple.com>
  17492. Reviewed by Sam Weinig.
  17493. Use adoptRef and create functions in more code paths
  17494. https://bugs.webkit.org/show_bug.cgi?id=40760
  17495. * API/JSClassRef.h: Removed unneeded include of RefCounted.h.
  17496. * API/JSWeakObjectMapRefPrivate.cpp: Ditto.
  17497. * bytecode/CodeBlock.h:
  17498. (JSC::FunctionCodeBlock::FunctionCodeBlock): Use the
  17499. SharedSymbolTable::create function instead of calling new directly.
  17500. * runtime/SymbolTable.h: Added a create function to the SharedSymbolTable
  17501. class and made the constructor private.
  17502. 2010-06-17 Mark Brand <mabrand@mabrand.nl>
  17503. Reviewed by Simon Hausmann.
  17504. [Qt] use "win32-g++*" scope to match all MinGW makespecs
  17505. The scope "win32-g++" comes from the name of the makespec. However, it
  17506. is frequently used to check for MinGW. This works fine as long as
  17507. win32-g++ is the only makespec for MinGW. Now we need the wildcard
  17508. to cover "win32-g++-cross" as well.
  17509. * JavaScriptCore.pro:
  17510. 2010-06-16 Darin Adler <darin@apple.com>
  17511. Reviewed by David Levin.
  17512. Deploy adoptRef in more places, including all HTML and MathML elements
  17513. https://bugs.webkit.org/show_bug.cgi?id=39941
  17514. * wtf/ThreadSafeShared.h: Made the constructor protected and removed the
  17515. unneeded support for initial reference counts other than 1.
  17516. 2010-06-16 Peter Varga <pvarga@inf.u-szeged.hu>
  17517. Reviewed by Geoffrey Garen.
  17518. Store matchBegin directly in the array of output instead of the stack.
  17519. https://bugs.webkit.org/show_bug.cgi?id=38988
  17520. * yarr/RegexJIT.cpp:
  17521. (JSC::Yarr::RegexGenerator::generateDisjunction):
  17522. (JSC::Yarr::RegexGenerator::generate):
  17523. 2010-06-15 Anders Carlsson <andersca@apple.com>
  17524. Reviewed by Sam Weinig.
  17525. Make JavaScriptCore build with clang++.
  17526. * jit/JITInlineMethods.h:
  17527. (JSC::JIT::emitPutVirtualRegister):
  17528. Explicitly cast to an int.
  17529. * yarr/RegexCompiler.cpp:
  17530. (JSC::Yarr::compileRegex):
  17531. Return 0 instead of false.
  17532. 2010-06-15 Adam Roben <aroben@apple.com>
  17533. Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds
  17534. Fixes <http://webkit.org/b/40626> <rdar://problem/8094205>.
  17535. Reviewed by Sam Weinig.
  17536. * JavaScriptCore.vcproj/JavaScriptCore.make: Copy the contents of
  17537. JavaScriptCore's DerivedSources directory to
  17538. AppleInternal/Sources/JavaScriptCore.
  17539. 2010-06-15 Gabor Loki <loki@webkit.org>
  17540. Rubber-stamped by Eric Seidel.
  17541. Fix invalid access to non-static data member warning in JITPropertyAccess32_64 on ARM
  17542. https://bugs.webkit.org/show_bug.cgi?id=40423
  17543. Using OBJECT_OFFSETOF macro instead of objectof to bypass access to
  17544. non-static data member warning.
  17545. * jit/JITPropertyAccess32_64.cpp:
  17546. (JSC::JIT::privateCompilePutByIdTransition):
  17547. 2010-06-11 Eric Seidel <eric@webkit.org>
  17548. Reviewed by Adam Barth.
  17549. Rename the rest of the *Tokenizer classes to *DocumentParser
  17550. https://bugs.webkit.org/show_bug.cgi?id=40507
  17551. * wtf/Platform.h:
  17552. - fixed a comment to match new names.
  17553. 2010-06-11 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
  17554. Reviewed by Simon Hausmann.
  17555. [Qt] Explicit conversions from QtScript types to JSC opaque types were removed.
  17556. https://bugs.webkit.org/show_bug.cgi?id=40412
  17557. Conversion between a JSC C types and a QtScript private types, takes
  17558. main part of the source code. In most cases a mapping between the types
  17559. is one to one. New cast operators were added to simplify the code.
  17560. The QScriptValuePrivate could be casted to the JSValueRef and the JSObjectRef.
  17561. The QScriptEnginePrivate could be casted to the JSGlobalContext.
  17562. The QScriptProgramPrivate could be casted to the JSStringRef.
  17563. * qt/api/qscriptengine_p.cpp:
  17564. (QScriptEnginePrivate::evaluate):
  17565. (QScriptEnginePrivate::newObject):
  17566. (QScriptEnginePrivate::globalObject):
  17567. * qt/api/qscriptengine_p.h:
  17568. (QScriptEnginePrivate::operator JSGlobalContextRef):
  17569. * qt/api/qscriptprogram_p.h:
  17570. (QScriptProgramPrivate::operator JSStringRef):
  17571. * qt/api/qscriptsyntaxcheckresult.cpp:
  17572. (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate):
  17573. (QScriptSyntaxCheckResultPrivate::errorMessage):
  17574. (QScriptSyntaxCheckResultPrivate::errorLineNumber):
  17575. * qt/api/qscriptvalue_p.h:
  17576. (QScriptValuePrivate::~QScriptValuePrivate):
  17577. (QScriptValuePrivate::QScriptValuePrivate):
  17578. (QScriptValuePrivate::isBool):
  17579. (QScriptValuePrivate::isNumber):
  17580. (QScriptValuePrivate::isNull):
  17581. (QScriptValuePrivate::isString):
  17582. (QScriptValuePrivate::isUndefined):
  17583. (QScriptValuePrivate::isFunction):
  17584. (QScriptValuePrivate::toString):
  17585. (QScriptValuePrivate::toNumber):
  17586. (QScriptValuePrivate::toBool):
  17587. (QScriptValuePrivate::toObject):
  17588. (QScriptValuePrivate::equals):
  17589. (QScriptValuePrivate::strictlyEquals):
  17590. (QScriptValuePrivate::instanceOf):
  17591. (QScriptValuePrivate::call):
  17592. (QScriptValuePrivate::operator JSValueRef):
  17593. (QScriptValuePrivate::operator JSObjectRef):
  17594. (QScriptValuePrivate::setValue):
  17595. (QScriptValuePrivate::inherits):
  17596. (QScriptValuePrivate::refinedJSValue):
  17597. 2010-05-31 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
  17598. Reviewed by Simon Hausmann.
  17599. [Qt] Implement the simple text code path.
  17600. https://bugs.webkit.org/show_bug.cgi?id=40077
  17601. Remove the FONT_FAST_PATH macro and use the Qt's
  17602. fast text implementation instead of the one of WebKit.
  17603. The Qt::TextBypassShaping flag is used to tell Qt to
  17604. only use the glyph advances.
  17605. Qt 4.7 is needed to get this flag thus the complex path is always
  17606. used if QtWebKit is compiled against an earlier version.
  17607. Contrary to the WebKit's implementation, the complex code path
  17608. is taken if the text is RightToLeft, justified or is formatted
  17609. with non-zero letter or word spacing.
  17610. * wtf/Platform.h:
  17611. 2010-06-11 Luiz Agostini <luiz.agostini@openbossa.org>
  17612. Reviewed by Kenneth Rohde Christiansen.
  17613. add codePointCompare to JavaScriptCore.exp
  17614. https://bugs.webkit.org/show_bug.cgi?id=40426
  17615. * JavaScriptCore.exp:
  17616. 2010-06-10 Oliver Hunt <oliver@apple.com>
  17617. Reviewed by Maciej Stachowiak.
  17618. Math Javascript Bug on Safari 5 (webkit 533.16) under "32bit" mode
  17619. https://bugs.webkit.org/show_bug.cgi?id=40367
  17620. If we're in the slow case of right shift we must write the type tag as
  17621. the only reason we hit this code path is because we know we're working
  17622. with a double. eg. we are guaranteed that the tag cannot be reused.
  17623. * jit/JITArithmetic32_64.cpp:
  17624. (JSC::JIT::emitRightShiftSlowCase):
  17625. 2010-06-10 Kwang Yul Seo <skyul@company100.net>
  17626. Reviewed by Eric Seidel.
  17627. Remove weakRandomNumber
  17628. https://bugs.webkit.org/show_bug.cgi?id=40291
  17629. weakRandomNumber is used nowhere. Currently, WeakRandom is used instead.
  17630. * wtf/RandomNumber.cpp:
  17631. * wtf/RandomNumber.h:
  17632. 2010-06-09 Alexey Proskuryakov <ap@apple.com>
  17633. Reviewed by Brady Eidson.
  17634. Export StringImpl::ascii(). It might be not very useful, but it's a public function.
  17635. * JavaScriptCore.exp:
  17636. 2010-06-09 Leandro Pereira <leandro@profusion.mobi>
  17637. Reviewed by Adam Treat.
  17638. [EFL] Allow building core libraries as shared objects to speed up
  17639. linking time on machines with small amounts of memory.
  17640. http://webkit.org/b/39899
  17641. * CMakeLists.txt: If building with shared core, install the lib.
  17642. * jsc/CMakeListsEfl.txt: Needs Glib and Ecore to link dynamically.
  17643. * wtf/CMakeLists.txt: If building with shared core, install the lib.
  17644. 2010-06-09 Gabor Loki <loki@webkit.org>
  17645. Reviewed by David Levin.
  17646. Remove some unused variable warnings from JITOpcodes
  17647. https://bugs.webkit.org/show_bug.cgi?id=40298
  17648. * jit/JITOpcodes.cpp:
  17649. (JSC::JIT::privateCompileCTINativeCall):
  17650. * jit/JITOpcodes32_64.cpp:
  17651. (JSC::JIT::privateCompileCTINativeCall):
  17652. 2010-05-18 Yuzo Fujishima <yuzo@google.com>
  17653. Reviewed by Shinichiro Hamaji.
  17654. Fix for Bug 34529 - [CSSOM] issues with cssText and selectorText
  17655. Add U16_LENGTH that is needed to implement CSS character serialization.
  17656. https://bugs.webkit.org/show_bug.cgi?id=34529
  17657. * wtf/unicode/qt4/UnicodeQt4.h:
  17658. * wtf/unicode/wince/UnicodeWince.h:
  17659. 2010-06-08 Sheriff Bot <webkit.review.bot@gmail.com>
  17660. Unreviewed, rolling out r60830.
  17661. http://trac.webkit.org/changeset/60830
  17662. https://bugs.webkit.org/show_bug.cgi?id=40305
  17663. Broke the Windows build (Requested by abarth on #webkit).
  17664. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  17665. * wtf/OwnPtrCommon.h:
  17666. * wtf/brew/OwnPtrBrew.h: Removed.
  17667. * wtf/win/OwnPtrWin.h: Removed.
  17668. 2010-06-08 MORITA Hajime <morrita@google.com>
  17669. Unreviewed. An attempt to fix test break.
  17670. * Configurations/FeatureDefines.xcconfig:
  17671. 2010-06-08 Kwang Yul Seo <skyul@company100.net>
  17672. Reviewed by Adam Barth.
  17673. Change OwnPtrCommon to include platform-specific headers
  17674. https://bugs.webkit.org/show_bug.cgi?id=40279
  17675. Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
  17676. Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
  17677. * JavaScriptCore.vcproj/WTF/WTF.vcproj:
  17678. * wtf/OwnPtrCommon.h:
  17679. * wtf/brew/OwnPtrBrew.h: Added.
  17680. * wtf/win/OwnPtrWin.h: Added.
  17681. 2010-06-07 MORITA Hajime <morrita@google.com>
  17682. Reviewed by Kent Tamura.
  17683. https://bugs.webkit.org/show_bug.cgi?id=40219
  17684. [Mac] ENABLE_METER_TAG should be enabled
  17685. Added ENABLE_METER_TAG.
  17686. * Configurations/FeatureDefines.xcconfig:
  17687. 2010-06-07 Kwang Yul Seo <skyul@company100.net>
  17688. Reviewed by Eric Seidel.
  17689. [BREWMP] Add more types to OwnPtr
  17690. https://bugs.webkit.org/show_bug.cgi?id=39667
  17691. Add ISSL and ISocket to the list of OwnPtr-ed type.
  17692. * wtf/OwnPtrCommon.h:
  17693. * wtf/brew/OwnPtrBrew.cpp:
  17694. (WTF::deleteOwnedPtr):
  17695. 2010-06-07 Benjamin Poulain <benjamin.poulain@nokia.com>
  17696. Reviewed by Simon Hausmann.
  17697. [Qt] Crash when compiling on Snow Leopard and running on Leopard
  17698. https://bugs.webkit.org/show_bug.cgi?id=31403
  17699. Disable the use of pthread_setname_np and other symbols
  17700. when targetting Leopard.
  17701. Use the defines TARGETING_XX instead of BUILDING_ON_XX
  17702. for features that cannot be used before Snow Leopard.
  17703. * wtf/Platform.h:
  17704. 2010-06-07 Gabor Loki <loki@webkit.org>
  17705. Reviewed by NOBODY (JSVALUE32_64 build fix).
  17706. * jit/JITOpcodes32_64.cpp:
  17707. (JSC::JIT::privateCompileCTINativeCall):
  17708. 2010-06-06 Gavin Barraclough <barraclough@apple.com>
  17709. Reviewed by NOBODY (windows build fix pt 2).
  17710. * JavaScriptCore.exp:
  17711. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  17712. 2010-06-06 Gavin Barraclough <barraclough@apple.com>
  17713. Reviewed by NOBODY (windows build fix pt 1).
  17714. * JavaScriptCore.exp:
  17715. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  17716. 2010-06-06 Gavin Barraclough <barraclough@apple.com>
  17717. Reviewed by Sam Weinig.
  17718. Bug 40214 - Clean up error construction / throwing in JSC.
  17719. The one egregious insanity here is that creating an error requires
  17720. a VM-entry-esqe-host call (the string argument is wrapped as a JS
  17721. object & pushed on the RegisterFile, then unwrapped back to a
  17722. UString). Changing this also means you only require a global
  17723. object, not an ExecState, to create an error.
  17724. The methods to create error objects are also parameterized
  17725. requiring a switch on the type, which can be made cleaner and
  17726. faster by moving to a separate method per error type. Code to add
  17727. divot information to error had been duplicated, and is coalesced
  17728. back into a single function.
  17729. Convenience methods added to create & throw type & syntax error
  17730. with a default error message, since this is a common case.
  17731. Also, errors are currently thrown either using
  17732. "throwError(exec, error)" or "exec->setException(error)" - unify
  17733. on the former, since this is more commonly used. Add
  17734. "throwVMError(exec, error)" equivalents, as a convenience for
  17735. cases where the result was being wrapped in "JSValue::encode(...)".
  17736. * API/JSCallbackConstructor.cpp:
  17737. (JSC::constructJSCallback):
  17738. * API/JSCallbackFunction.cpp:
  17739. (JSC::JSCallbackFunction::call):
  17740. * API/JSCallbackObjectFunctions.h:
  17741. (JSC::::getOwnPropertySlot):
  17742. (JSC::::put):
  17743. (JSC::::deleteProperty):
  17744. (JSC::::construct):
  17745. (JSC::::hasInstance):
  17746. (JSC::::call):
  17747. (JSC::::toNumber):
  17748. (JSC::::toString):
  17749. (JSC::::staticValueGetter):
  17750. (JSC::::staticFunctionGetter):
  17751. (JSC::::callbackGetter):
  17752. * API/JSObjectRef.cpp:
  17753. (JSObjectMakeError):
  17754. * JavaScriptCore.exp:
  17755. * bytecompiler/BytecodeGenerator.cpp:
  17756. (JSC::BytecodeGenerator::emitNewError):
  17757. (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
  17758. * bytecompiler/BytecodeGenerator.h:
  17759. * bytecompiler/NodesCodegen.cpp:
  17760. (JSC::ThrowableExpressionData::emitThrowError):
  17761. (JSC::RegExpNode::emitBytecode):
  17762. (JSC::PostfixErrorNode::emitBytecode):
  17763. (JSC::PrefixErrorNode::emitBytecode):
  17764. (JSC::AssignErrorNode::emitBytecode):
  17765. (JSC::ForInNode::emitBytecode):
  17766. (JSC::ContinueNode::emitBytecode):
  17767. (JSC::BreakNode::emitBytecode):
  17768. (JSC::ReturnNode::emitBytecode):
  17769. (JSC::LabelNode::emitBytecode):
  17770. * interpreter/CallFrame.h:
  17771. * interpreter/Interpreter.cpp:
  17772. (JSC::Interpreter::throwException):
  17773. (JSC::Interpreter::privateExecute):
  17774. * jit/JITStubs.cpp:
  17775. (JSC::DEFINE_STUB_FUNCTION):
  17776. * jsc.cpp:
  17777. (functionRun):
  17778. (functionLoad):
  17779. (functionCheckSyntax):
  17780. * parser/Nodes.h:
  17781. * runtime/ArrayConstructor.cpp:
  17782. (JSC::constructArrayWithSizeQuirk):
  17783. * runtime/ArrayPrototype.cpp:
  17784. (JSC::arrayProtoFuncToString):
  17785. (JSC::arrayProtoFuncToLocaleString):
  17786. (JSC::arrayProtoFuncJoin):
  17787. (JSC::arrayProtoFuncFilter):
  17788. (JSC::arrayProtoFuncMap):
  17789. (JSC::arrayProtoFuncEvery):
  17790. (JSC::arrayProtoFuncForEach):
  17791. (JSC::arrayProtoFuncSome):
  17792. (JSC::arrayProtoFuncReduce):
  17793. (JSC::arrayProtoFuncReduceRight):
  17794. * runtime/BooleanPrototype.cpp:
  17795. (JSC::booleanProtoFuncToString):
  17796. (JSC::booleanProtoFuncValueOf):
  17797. * runtime/DatePrototype.cpp:
  17798. (JSC::dateProtoFuncToString):
  17799. (JSC::dateProtoFuncToUTCString):
  17800. (JSC::dateProtoFuncToISOString):
  17801. (JSC::dateProtoFuncToDateString):
  17802. (JSC::dateProtoFuncToTimeString):
  17803. (JSC::dateProtoFuncToLocaleString):
  17804. (JSC::dateProtoFuncToLocaleDateString):
  17805. (JSC::dateProtoFuncToLocaleTimeString):
  17806. (JSC::dateProtoFuncGetTime):
  17807. (JSC::dateProtoFuncGetFullYear):
  17808. (JSC::dateProtoFuncGetUTCFullYear):
  17809. (JSC::dateProtoFuncToGMTString):
  17810. (JSC::dateProtoFuncGetMonth):
  17811. (JSC::dateProtoFuncGetUTCMonth):
  17812. (JSC::dateProtoFuncGetDate):
  17813. (JSC::dateProtoFuncGetUTCDate):
  17814. (JSC::dateProtoFuncGetDay):
  17815. (JSC::dateProtoFuncGetUTCDay):
  17816. (JSC::dateProtoFuncGetHours):
  17817. (JSC::dateProtoFuncGetUTCHours):
  17818. (JSC::dateProtoFuncGetMinutes):
  17819. (JSC::dateProtoFuncGetUTCMinutes):
  17820. (JSC::dateProtoFuncGetSeconds):
  17821. (JSC::dateProtoFuncGetUTCSeconds):
  17822. (JSC::dateProtoFuncGetMilliSeconds):
  17823. (JSC::dateProtoFuncGetUTCMilliseconds):
  17824. (JSC::dateProtoFuncGetTimezoneOffset):
  17825. (JSC::dateProtoFuncSetTime):
  17826. (JSC::setNewValueFromTimeArgs):
  17827. (JSC::setNewValueFromDateArgs):
  17828. (JSC::dateProtoFuncSetMilliSeconds):
  17829. (JSC::dateProtoFuncSetUTCMilliseconds):
  17830. (JSC::dateProtoFuncSetSeconds):
  17831. (JSC::dateProtoFuncSetUTCSeconds):
  17832. (JSC::dateProtoFuncSetMinutes):
  17833. (JSC::dateProtoFuncSetUTCMinutes):
  17834. (JSC::dateProtoFuncSetHours):
  17835. (JSC::dateProtoFuncSetUTCHours):
  17836. (JSC::dateProtoFuncSetDate):
  17837. (JSC::dateProtoFuncSetUTCDate):
  17838. (JSC::dateProtoFuncSetMonth):
  17839. (JSC::dateProtoFuncSetUTCMonth):
  17840. (JSC::dateProtoFuncSetFullYear):
  17841. (JSC::dateProtoFuncSetUTCFullYear):
  17842. (JSC::dateProtoFuncSetYear):
  17843. (JSC::dateProtoFuncGetYear):
  17844. (JSC::dateProtoFuncToJSON):
  17845. * runtime/Error.cpp:
  17846. (JSC::createError):
  17847. (JSC::createEvalError):
  17848. (JSC::createRangeError):
  17849. (JSC::createReferenceError):
  17850. (JSC::createSyntaxError):
  17851. (JSC::createTypeError):
  17852. (JSC::createURIError):
  17853. (JSC::addErrorSourceInfo):
  17854. (JSC::addErrorDivotInfo):
  17855. (JSC::addErrorInfo):
  17856. (JSC::hasErrorInfo):
  17857. (JSC::throwError):
  17858. (JSC::throwTypeError):
  17859. (JSC::throwSyntaxError):
  17860. * runtime/Error.h:
  17861. (JSC::throwVMError):
  17862. (JSC::throwVMTypeError):
  17863. * runtime/ErrorConstructor.cpp:
  17864. (JSC::constructWithErrorConstructor):
  17865. (JSC::callErrorConstructor):
  17866. * runtime/ErrorConstructor.h:
  17867. * runtime/ErrorInstance.cpp:
  17868. (JSC::ErrorInstance::ErrorInstance):
  17869. (JSC::ErrorInstance::create):
  17870. * runtime/ErrorInstance.h:
  17871. * runtime/ErrorPrototype.cpp:
  17872. (JSC::ErrorPrototype::ErrorPrototype):
  17873. * runtime/ExceptionHelpers.cpp:
  17874. (JSC::createStackOverflowError):
  17875. (JSC::createUndefinedVariableError):
  17876. (JSC::createInvalidParamError):
  17877. (JSC::createNotAConstructorError):
  17878. (JSC::createNotAFunctionError):
  17879. (JSC::createNotAnObjectError):
  17880. (JSC::throwOutOfMemoryError):
  17881. * runtime/ExceptionHelpers.h:
  17882. * runtime/Executable.cpp:
  17883. (JSC::EvalExecutable::compile):
  17884. (JSC::ProgramExecutable::checkSyntax):
  17885. (JSC::ProgramExecutable::compile):
  17886. * runtime/FunctionConstructor.cpp:
  17887. (JSC::constructFunction):
  17888. * runtime/FunctionPrototype.cpp:
  17889. (JSC::functionProtoFuncToString):
  17890. (JSC::functionProtoFuncApply):
  17891. (JSC::functionProtoFuncCall):
  17892. * runtime/Identifier.cpp:
  17893. (JSC::Identifier::from):
  17894. * runtime/Identifier.h:
  17895. * runtime/JSArray.cpp:
  17896. (JSC::JSArray::put):
  17897. * runtime/JSFunction.cpp:
  17898. (JSC::callHostFunctionAsConstructor):
  17899. * runtime/JSGlobalObjectFunctions.cpp:
  17900. (JSC::encode):
  17901. (JSC::decode):
  17902. (JSC::globalFuncEval):
  17903. * runtime/JSONObject.cpp:
  17904. (JSC::Stringifier::appendStringifiedValue):
  17905. (JSC::Walker::walk):
  17906. (JSC::JSONProtoFuncParse):
  17907. (JSC::JSONProtoFuncStringify):
  17908. * runtime/JSObject.cpp:
  17909. (JSC::throwSetterError):
  17910. (JSC::JSObject::put):
  17911. (JSC::JSObject::putWithAttributes):
  17912. (JSC::JSObject::defaultValue):
  17913. (JSC::JSObject::hasInstance):
  17914. (JSC::JSObject::defineOwnProperty):
  17915. * runtime/JSObject.h:
  17916. * runtime/JSValue.cpp:
  17917. (JSC::JSValue::toObjectSlowCase):
  17918. (JSC::JSValue::synthesizeObject):
  17919. (JSC::JSValue::synthesizePrototype):
  17920. * runtime/NativeErrorConstructor.cpp:
  17921. (JSC::constructWithNativeErrorConstructor):
  17922. (JSC::callNativeErrorConstructor):
  17923. * runtime/NativeErrorConstructor.h:
  17924. * runtime/NumberPrototype.cpp:
  17925. (JSC::numberProtoFuncToString):
  17926. (JSC::numberProtoFuncToLocaleString):
  17927. (JSC::numberProtoFuncValueOf):
  17928. (JSC::numberProtoFuncToFixed):
  17929. (JSC::numberProtoFuncToExponential):
  17930. (JSC::numberProtoFuncToPrecision):
  17931. * runtime/ObjectConstructor.cpp:
  17932. (JSC::objectConstructorGetPrototypeOf):
  17933. (JSC::objectConstructorGetOwnPropertyDescriptor):
  17934. (JSC::objectConstructorGetOwnPropertyNames):
  17935. (JSC::objectConstructorKeys):
  17936. (JSC::toPropertyDescriptor):
  17937. (JSC::objectConstructorDefineProperty):
  17938. (JSC::objectConstructorDefineProperties):
  17939. (JSC::objectConstructorCreate):
  17940. * runtime/ObjectPrototype.cpp:
  17941. (JSC::objectProtoFuncDefineGetter):
  17942. (JSC::objectProtoFuncDefineSetter):
  17943. * runtime/RegExpConstructor.cpp:
  17944. (JSC::constructRegExp):
  17945. * runtime/RegExpObject.cpp:
  17946. (JSC::RegExpObject::match):
  17947. * runtime/RegExpPrototype.cpp:
  17948. (JSC::regExpProtoFuncTest):
  17949. (JSC::regExpProtoFuncExec):
  17950. (JSC::regExpProtoFuncCompile):
  17951. (JSC::regExpProtoFuncToString):
  17952. * runtime/StringPrototype.cpp:
  17953. (JSC::stringProtoFuncToString):
  17954. 2010-06-05 Kwang Yul Seo <skyul@company100.net>
  17955. Reviewed by Eric Seidel.
  17956. [BREWMP] Add PLATFORM(BREWMP) guard for using std::xxx
  17957. https://bugs.webkit.org/show_bug.cgi?id=39710
  17958. Build fix for BREW MP.
  17959. * wtf/MathExtras.h:
  17960. 2010-06-04 Adam Barth <abarth@webkit.org>
  17961. Reviewed by Darin Adler.
  17962. HTML5 parser should be within 1% of old parser performance
  17963. https://bugs.webkit.org/show_bug.cgi?id=40172
  17964. Fix cast in this operator= to allow for assignment between vectors with
  17965. different inline capacities (as clearly intended by its author).
  17966. * wtf/Vector.h:
  17967. (WTF::::operator):
  17968. 2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
  17969. Reviewed by Kenneth Rohde Christiansen.
  17970. New QtScript API; QScriptValue::instanceOf.
  17971. New function create an easy way to check value's prototype hierarchy.
  17972. [Qt] QScriptValue should have an instanceOf method
  17973. https://bugs.webkit.org/show_bug.cgi?id=40120
  17974. * qt/api/qscriptvalue.cpp:
  17975. (QScriptValue::instanceOf):
  17976. * qt/api/qscriptvalue.h:
  17977. * qt/api/qscriptvalue_p.h:
  17978. (QScriptValuePrivate::instanceOf):
  17979. * qt/tests/qscriptvalue/tst_qscriptvalue.h:
  17980. * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
  17981. (tst_QScriptValue::instanceOf_initData):
  17982. (tst_QScriptValue::instanceOf_makeData):
  17983. (tst_QScriptValue::instanceOf_test):
  17984. 2010-06-04 Gavin Barraclough <barraclough@apple.com>
  17985. Reviewed by NOBODY (interpreter build fix).
  17986. * interpreter/Interpreter.cpp:
  17987. (JSC::Interpreter::privateExecute):
  17988. 2010-06-04 Mark Rowe <mrowe@apple.com>
  17989. Silence some warnings seen on the build bot.
  17990. * JavaScriptCore.JSVALUE32_64only.exp: Add a trailing newline.
  17991. * JavaScriptCore.JSVALUE32only.exp: Ditto.
  17992. * JavaScriptCore.JSVALUE64only.exp: Ditto.
  17993. * JavaScriptCore.xcodeproj/project.pbxproj: Remove the .exp files from all targets so that Xcode doesn't
  17994. complain about not knowing how to compile them.
  17995. 2010-06-04 Gavin Barraclough <barraclough@apple.com>
  17996. Reviewed by Oliver Hunt.
  17997. Bug 40187 - Change function signature of NativeConstructor to match NativeFunction
  17998. Mostly for consistency, but constructor & args arguments are redundant,
  17999. and this will help if we wish to be able to JIT calls to more constructors.
  18000. * API/JSCallbackConstructor.cpp:
  18001. (JSC::constructJSCallback):
  18002. * API/JSCallbackObject.h:
  18003. * API/JSCallbackObjectFunctions.h:
  18004. (JSC::::construct):
  18005. * interpreter/Interpreter.cpp:
  18006. (JSC::Interpreter::executeConstruct):
  18007. * interpreter/Interpreter.h:
  18008. * jit/JITStubs.cpp:
  18009. (JSC::DEFINE_STUB_FUNCTION):
  18010. * runtime/ArrayConstructor.cpp:
  18011. (JSC::constructWithArrayConstructor):
  18012. * runtime/BooleanConstructor.cpp:
  18013. (JSC::constructWithBooleanConstructor):
  18014. * runtime/ConstructData.cpp:
  18015. (JSC::construct):
  18016. * runtime/ConstructData.h:
  18017. * runtime/DateConstructor.cpp:
  18018. (JSC::constructWithDateConstructor):
  18019. * runtime/Error.cpp:
  18020. (JSC::constructNativeError):
  18021. (JSC::Error::create):
  18022. * runtime/ErrorConstructor.cpp:
  18023. (JSC::constructWithErrorConstructor):
  18024. * runtime/FunctionConstructor.cpp:
  18025. (JSC::constructWithFunctionConstructor):
  18026. * runtime/NativeErrorConstructor.cpp:
  18027. (JSC::constructWithNativeErrorConstructor):
  18028. * runtime/NativeErrorConstructor.h:
  18029. (JSC::NativeErrorConstructor::errorStructure):
  18030. * runtime/NumberConstructor.cpp:
  18031. (JSC::constructWithNumberConstructor):
  18032. * runtime/ObjectConstructor.cpp:
  18033. (JSC::constructWithObjectConstructor):
  18034. * runtime/RegExpConstructor.cpp:
  18035. (JSC::constructWithRegExpConstructor):
  18036. * runtime/StringConstructor.cpp:
  18037. (JSC::constructWithStringConstructor):
  18038. 2010-06-04 Tony Gentilcore <tonyg@chromium.org>
  18039. Reviewed by Adam Barth.
  18040. Add a takeFirst() method to Deque and use it where appropriate.
  18041. https://bugs.webkit.org/show_bug.cgi?id=40089
  18042. * wtf/Deque.h:
  18043. (WTF::::takeFirst):
  18044. * wtf/MainThread.cpp:
  18045. (WTF::dispatchFunctionsFromMainThread):
  18046. * wtf/MessageQueue.h:
  18047. (WTF::::tryGetMessage):
  18048. 2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
  18049. Reviewed by Kenneth Rohde Christiansen.
  18050. Remove a QEXPECT_FAIL flag from an autotest.
  18051. Test tst_QScriptEngine::globalObject pass after 36600 bug
  18052. fix have been applied.
  18053. [Qt] Expected fail in the tst_QScriptEngine::globalObject should be removed.
  18054. https://bugs.webkit.org/show_bug.cgi?id=40114
  18055. * qt/tests/qscriptengine/tst_qscriptengine.cpp:
  18056. (tst_QScriptEngine::globalObject):
  18057. 2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
  18058. Reviewed by Kenneth Rohde Christiansen.
  18059. Fix QScriptValue::equals.
  18060. Handling for a few edge cases were added. Now comparison between
  18061. NaN, an invalid objects should works as supposed.
  18062. [Qt] QScriptValue::equals problems
  18063. https://bugs.webkit.org/show_bug.cgi?id=40110
  18064. * qt/api/qscriptvalue.cpp:
  18065. (QScriptValue::equals):
  18066. * qt/api/qscriptvalue_p.h:
  18067. (QScriptValuePrivate::equals):
  18068. * qt/tests/qscriptvalue/tst_qscriptvalue.h:
  18069. * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
  18070. (tst_QScriptValue::equals_initData):
  18071. (tst_QScriptValue::equals_makeData):
  18072. (tst_QScriptValue::equals_test):
  18073. 2010-06-03 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
  18074. Reviewed by Kenneth Rohde Christiansen.
  18075. New states in QScriptValuePrivate.
  18076. The CSpecial state was divided into CNull and CUndefined. It simplify
  18077. the QScriptValue code by avoiding a few "cast" and "if".
  18078. Moreover the MSVS compiler didn't like casting between a double and an
  18079. enum which is avoided now.
  18080. [Qt] The QScriptValuePrivate::CSpecial is too generic.
  18081. https://bugs.webkit.org/show_bug.cgi?id=40067
  18082. * qt/api/qscriptvalue_p.h:
  18083. (QScriptValuePrivate::):
  18084. (QScriptValuePrivate::QScriptValuePrivate):
  18085. (QScriptValuePrivate::isNull):
  18086. (QScriptValuePrivate::isUndefined):
  18087. (QScriptValuePrivate::toString):
  18088. (QScriptValuePrivate::toNumber):
  18089. (QScriptValuePrivate::toBool):
  18090. (QScriptValuePrivate::toObject):
  18091. (QScriptValuePrivate::assignEngine):
  18092. (QScriptValuePrivate::isNumberBased):
  18093. 2010-06-03 Gavin Barraclough <barraclough@apple.com>
  18094. Reviewed by NOBODY (Qt build fix).
  18095. * wtf/Platform.h:
  18096. 2010-06-03 Gavin Barraclough <barraclough@apple.com>
  18097. Reviewed by Mark Rowe.
  18098. Bug 40150 - ENABLE_JIT_OPTIMIZE_NATIVE_CALL on all x86/x86_64 platforms
  18099. This was fixed in bug #40094.
  18100. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  18101. * wtf/Platform.h:
  18102. 2010-06-03 Gavin Barraclough <barraclough@apple.com>
  18103. Reviewed by NOBODY (Interpreter build fix).
  18104. * JavaScriptCore.JSVALUE32_64only.exp:
  18105. * JavaScriptCore.JSVALUE32only.exp:
  18106. * JavaScriptCore.JSVALUE64only.exp:
  18107. * interpreter/Interpreter.cpp:
  18108. (JSC::Interpreter::privateExecute):
  18109. 2010-06-03 Gavin Barraclough <barraclough@apple.com>
  18110. Reviewed by NOBODY (windows build fix II).
  18111. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  18112. 2010-06-03 Gavin Barraclough <barraclough@apple.com>
  18113. Reviewed by NOBODY (windows build fix).
  18114. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  18115. 2010-06-02 Gavin Barraclough <barraclough@apple.com>
  18116. Reviewed by Oliver Hunt.
  18117. Bug 40094 - The return type of NativeFunction should be EncodedJSValue
  18118. On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not.
  18119. * API/JSCallbackFunction.cpp:
  18120. (JSC::JSCallbackFunction::call):
  18121. * API/JSCallbackFunction.h:
  18122. * API/JSCallbackObject.h:
  18123. * API/JSCallbackObjectFunctions.h:
  18124. (JSC::::call):
  18125. * JavaScriptCore.exp:
  18126. * interpreter/Interpreter.cpp:
  18127. (JSC::Interpreter::executeCall):
  18128. * jit/JITStubs.cpp:
  18129. (JSC::DEFINE_STUB_FUNCTION):
  18130. * jit/JITStubs.h:
  18131. * jsc.cpp:
  18132. (functionPrint):
  18133. (functionDebug):
  18134. (functionGC):
  18135. (functionVersion):
  18136. (functionRun):
  18137. (functionLoad):
  18138. (functionCheckSyntax):
  18139. (functionSetSamplingFlags):
  18140. (functionClearSamplingFlags):
  18141. (functionReadline):
  18142. (functionQuit):
  18143. * runtime/ArrayConstructor.cpp:
  18144. (JSC::callArrayConstructor):
  18145. (JSC::arrayConstructorIsArray):
  18146. * runtime/ArrayPrototype.cpp:
  18147. (JSC::arrayProtoFuncToString):
  18148. (JSC::arrayProtoFuncToLocaleString):
  18149. (JSC::arrayProtoFuncJoin):
  18150. (JSC::arrayProtoFuncConcat):
  18151. (JSC::arrayProtoFuncPop):
  18152. (JSC::arrayProtoFuncPush):
  18153. (JSC::arrayProtoFuncReverse):
  18154. (JSC::arrayProtoFuncShift):
  18155. (JSC::arrayProtoFuncSlice):
  18156. (JSC::arrayProtoFuncSort):
  18157. (JSC::arrayProtoFuncSplice):
  18158. (JSC::arrayProtoFuncUnShift):
  18159. (JSC::arrayProtoFuncFilter):
  18160. (JSC::arrayProtoFuncMap):
  18161. (JSC::arrayProtoFuncEvery):
  18162. (JSC::arrayProtoFuncForEach):
  18163. (JSC::arrayProtoFuncSome):
  18164. (JSC::arrayProtoFuncReduce):
  18165. (JSC::arrayProtoFuncReduceRight):
  18166. (JSC::arrayProtoFuncIndexOf):
  18167. (JSC::arrayProtoFuncLastIndexOf):
  18168. * runtime/BooleanConstructor.cpp:
  18169. (JSC::callBooleanConstructor):
  18170. * runtime/BooleanPrototype.cpp:
  18171. (JSC::booleanProtoFuncToString):
  18172. (JSC::booleanProtoFuncValueOf):
  18173. * runtime/CallData.h:
  18174. * runtime/DateConstructor.cpp:
  18175. (JSC::callDate):
  18176. (JSC::dateParse):
  18177. (JSC::dateNow):
  18178. (JSC::dateUTC):
  18179. * runtime/DatePrototype.cpp:
  18180. (JSC::dateProtoFuncToString):
  18181. (JSC::dateProtoFuncToUTCString):
  18182. (JSC::dateProtoFuncToISOString):
  18183. (JSC::dateProtoFuncToDateString):
  18184. (JSC::dateProtoFuncToTimeString):
  18185. (JSC::dateProtoFuncToLocaleString):
  18186. (JSC::dateProtoFuncToLocaleDateString):
  18187. (JSC::dateProtoFuncToLocaleTimeString):
  18188. (JSC::dateProtoFuncGetTime):
  18189. (JSC::dateProtoFuncGetFullYear):
  18190. (JSC::dateProtoFuncGetUTCFullYear):
  18191. (JSC::dateProtoFuncToGMTString):
  18192. (JSC::dateProtoFuncGetMonth):
  18193. (JSC::dateProtoFuncGetUTCMonth):
  18194. (JSC::dateProtoFuncGetDate):
  18195. (JSC::dateProtoFuncGetUTCDate):
  18196. (JSC::dateProtoFuncGetDay):
  18197. (JSC::dateProtoFuncGetUTCDay):
  18198. (JSC::dateProtoFuncGetHours):
  18199. (JSC::dateProtoFuncGetUTCHours):
  18200. (JSC::dateProtoFuncGetMinutes):
  18201. (JSC::dateProtoFuncGetUTCMinutes):
  18202. (JSC::dateProtoFuncGetSeconds):
  18203. (JSC::dateProtoFuncGetUTCSeconds):
  18204. (JSC::dateProtoFuncGetMilliSeconds):
  18205. (JSC::dateProtoFuncGetUTCMilliseconds):
  18206. (JSC::dateProtoFuncGetTimezoneOffset):
  18207. (JSC::dateProtoFuncSetTime):
  18208. (JSC::dateProtoFuncSetMilliSeconds):
  18209. (JSC::dateProtoFuncSetUTCMilliseconds):
  18210. (JSC::dateProtoFuncSetSeconds):
  18211. (JSC::dateProtoFuncSetUTCSeconds):
  18212. (JSC::dateProtoFuncSetMinutes):
  18213. (JSC::dateProtoFuncSetUTCMinutes):
  18214. (JSC::dateProtoFuncSetHours):
  18215. (JSC::dateProtoFuncSetUTCHours):
  18216. (JSC::dateProtoFuncSetDate):
  18217. (JSC::dateProtoFuncSetUTCDate):
  18218. (JSC::dateProtoFuncSetMonth):
  18219. (JSC::dateProtoFuncSetUTCMonth):
  18220. (JSC::dateProtoFuncSetFullYear):
  18221. (JSC::dateProtoFuncSetUTCFullYear):
  18222. (JSC::dateProtoFuncSetYear):
  18223. (JSC::dateProtoFuncGetYear):
  18224. (JSC::dateProtoFuncToJSON):
  18225. * runtime/ErrorConstructor.cpp:
  18226. (JSC::callErrorConstructor):
  18227. * runtime/ErrorPrototype.cpp:
  18228. (JSC::errorProtoFuncToString):
  18229. * runtime/FunctionConstructor.cpp:
  18230. (JSC::callFunctionConstructor):
  18231. * runtime/FunctionPrototype.cpp:
  18232. (JSC::callFunctionPrototype):
  18233. (JSC::functionProtoFuncToString):
  18234. (JSC::functionProtoFuncApply):
  18235. (JSC::functionProtoFuncCall):
  18236. * runtime/JSCell.h:
  18237. (JSC::getCallData):
  18238. (JSC::getConstructData):
  18239. * runtime/JSFunction.cpp:
  18240. (JSC::callHostFunctionAsConstructor):
  18241. * runtime/JSFunction.h:
  18242. * runtime/JSGlobalObjectFunctions.cpp:
  18243. (JSC::globalFuncEval):
  18244. (JSC::globalFuncParseInt):
  18245. (JSC::globalFuncParseFloat):
  18246. (JSC::globalFuncIsNaN):
  18247. (JSC::globalFuncIsFinite):
  18248. (JSC::globalFuncDecodeURI):
  18249. (JSC::globalFuncDecodeURIComponent):
  18250. (JSC::globalFuncEncodeURI):
  18251. (JSC::globalFuncEncodeURIComponent):
  18252. (JSC::globalFuncEscape):
  18253. (JSC::globalFuncUnescape):
  18254. (JSC::globalFuncJSCPrint):
  18255. * runtime/JSGlobalObjectFunctions.h:
  18256. * runtime/JSONObject.cpp:
  18257. (JSC::JSONProtoFuncParse):
  18258. (JSC::JSONProtoFuncStringify):
  18259. * runtime/JSObject.cpp:
  18260. (JSC::callDefaultValueFunction):
  18261. * runtime/JSValue.h:
  18262. * runtime/MathObject.cpp:
  18263. (JSC::mathProtoFuncAbs):
  18264. (JSC::mathProtoFuncACos):
  18265. (JSC::mathProtoFuncASin):
  18266. (JSC::mathProtoFuncATan):
  18267. (JSC::mathProtoFuncATan2):
  18268. (JSC::mathProtoFuncCeil):
  18269. (JSC::mathProtoFuncCos):
  18270. (JSC::mathProtoFuncExp):
  18271. (JSC::mathProtoFuncFloor):
  18272. (JSC::mathProtoFuncLog):
  18273. (JSC::mathProtoFuncMax):
  18274. (JSC::mathProtoFuncMin):
  18275. (JSC::mathProtoFuncPow):
  18276. (JSC::mathProtoFuncRandom):
  18277. (JSC::mathProtoFuncRound):
  18278. (JSC::mathProtoFuncSin):
  18279. (JSC::mathProtoFuncSqrt):
  18280. (JSC::mathProtoFuncTan):
  18281. * runtime/NativeErrorConstructor.cpp:
  18282. (JSC::callNativeErrorConstructor):
  18283. * runtime/NumberConstructor.cpp:
  18284. (JSC::callNumberConstructor):
  18285. * runtime/NumberPrototype.cpp:
  18286. (JSC::numberProtoFuncToString):
  18287. (JSC::numberProtoFuncToLocaleString):
  18288. (JSC::numberProtoFuncValueOf):
  18289. (JSC::numberProtoFuncToFixed):
  18290. (JSC::numberProtoFuncToExponential):
  18291. (JSC::numberProtoFuncToPrecision):
  18292. * runtime/ObjectConstructor.cpp:
  18293. (JSC::callObjectConstructor):
  18294. (JSC::objectConstructorGetPrototypeOf):
  18295. (JSC::objectConstructorGetOwnPropertyDescriptor):
  18296. (JSC::objectConstructorGetOwnPropertyNames):
  18297. (JSC::objectConstructorKeys):
  18298. (JSC::toPropertyDescriptor):
  18299. (JSC::objectConstructorDefineProperty):
  18300. (JSC::objectConstructorDefineProperties):
  18301. (JSC::objectConstructorCreate):
  18302. * runtime/ObjectPrototype.cpp:
  18303. (JSC::objectProtoFuncValueOf):
  18304. (JSC::objectProtoFuncHasOwnProperty):
  18305. (JSC::objectProtoFuncIsPrototypeOf):
  18306. (JSC::objectProtoFuncDefineGetter):
  18307. (JSC::objectProtoFuncDefineSetter):
  18308. (JSC::objectProtoFuncLookupGetter):
  18309. (JSC::objectProtoFuncLookupSetter):
  18310. (JSC::objectProtoFuncPropertyIsEnumerable):
  18311. (JSC::objectProtoFuncToLocaleString):
  18312. (JSC::objectProtoFuncToString):
  18313. * runtime/ObjectPrototype.h:
  18314. * runtime/RegExpConstructor.cpp:
  18315. (JSC::callRegExpConstructor):
  18316. * runtime/RegExpObject.cpp:
  18317. (JSC::callRegExpObject):
  18318. * runtime/RegExpPrototype.cpp:
  18319. (JSC::regExpProtoFuncTest):
  18320. (JSC::regExpProtoFuncExec):
  18321. (JSC::regExpProtoFuncCompile):
  18322. (JSC::regExpProtoFuncToString):
  18323. * runtime/StringConstructor.cpp:
  18324. (JSC::stringFromCharCode):
  18325. (JSC::callStringConstructor):
  18326. * runtime/StringPrototype.cpp:
  18327. (JSC::stringProtoFuncReplace):
  18328. (JSC::stringProtoFuncToString):
  18329. (JSC::stringProtoFuncCharAt):
  18330. (JSC::stringProtoFuncCharCodeAt):
  18331. (JSC::stringProtoFuncConcat):
  18332. (JSC::stringProtoFuncIndexOf):
  18333. (JSC::stringProtoFuncLastIndexOf):
  18334. (JSC::stringProtoFuncMatch):
  18335. (JSC::stringProtoFuncSearch):
  18336. (JSC::stringProtoFuncSlice):
  18337. (JSC::stringProtoFuncSplit):
  18338. (JSC::stringProtoFuncSubstr):
  18339. (JSC::stringProtoFuncSubstring):
  18340. (JSC::stringProtoFuncToLowerCase):
  18341. (JSC::stringProtoFuncToUpperCase):
  18342. (JSC::stringProtoFuncLocaleCompare):
  18343. (JSC::stringProtoFuncBig):
  18344. (JSC::stringProtoFuncSmall):
  18345. (JSC::stringProtoFuncBlink):
  18346. (JSC::stringProtoFuncBold):
  18347. (JSC::stringProtoFuncFixed):
  18348. (JSC::stringProtoFuncItalics):
  18349. (JSC::stringProtoFuncStrike):
  18350. (JSC::stringProtoFuncSub):
  18351. (JSC::stringProtoFuncSup):
  18352. (JSC::stringProtoFuncFontcolor):
  18353. (JSC::stringProtoFuncFontsize):
  18354. (JSC::stringProtoFuncAnchor):
  18355. (JSC::stringProtoFuncLink):
  18356. (JSC::stringProtoFuncTrim):
  18357. (JSC::stringProtoFuncTrimLeft):
  18358. (JSC::stringProtoFuncTrimRight):
  18359. 2010-06-02 Mark Rowe <mrowe@apple.com>
  18360. Reviewed by Gavin Barraclough.
  18361. Add value-representation specific sections to the mac export file.
  18362. * Configurations/JavaScriptCore.xcconfig:
  18363. * DerivedSources.make:
  18364. * JavaScriptCore.JSVALUE32_64only.exp: Added.
  18365. * JavaScriptCore.JSVALUE32only.exp: Added.
  18366. * JavaScriptCore.JSVALUE64only.exp: Added.
  18367. * JavaScriptCore.xcodeproj/project.pbxproj:
  18368. 2010-06-02 Mark Rowe <mrowe@apple.com>
  18369. Reviewed by Gavin Barraclough.
  18370. <rdar://problem/8054988> Work around an LLVM GCC code generation bug that results in crashes inside PCRE.
  18371. * pcre/pcre_exec.cpp:
  18372. (repeatInformationFromInstructionOffset): Change the type of instructionOffset to int. There's no good
  18373. reason for it to be a short, and using int prevents this code from triggering the LLVM GCC bug.
  18374. 2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
  18375. Reviewed by Kenneth Rohde Christiansen.
  18376. Fix the QScriptValue::strictlyEquals function.
  18377. Handling for a few edge cases was added.
  18378. New autotest that covers the QScriptValue::strictlyEquals function.
  18379. [Qt] QScriptValue::strictlyEquals is broken
  18380. https://bugs.webkit.org/show_bug.cgi?id=36600
  18381. * qt/api/qscriptvalue.cpp:
  18382. (QScriptValue::strictlyEquals):
  18383. * qt/api/qscriptvalue_p.h:
  18384. (QScriptValuePrivate::strictlyEquals):
  18385. * qt/tests/qscriptvalue/qscriptvalue.pro:
  18386. * qt/tests/qscriptvalue/tst_qscriptvalue.h:
  18387. * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: Added.
  18388. (tst_QScriptValue::strictlyEquals_initData):
  18389. (tst_QScriptValue::strictlyEquals_makeData):
  18390. (tst_QScriptValue::strictlyEquals_test):
  18391. 2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
  18392. Reviewed by Kenneth Rohde Christiansen.
  18393. New function QScriptEngine::newObject.
  18394. The function creates a object of class Object and returns it
  18395. as a QScriptValue.
  18396. [Qt] QScriptEngine API should contain a newObject function
  18397. https://bugs.webkit.org/show_bug.cgi?id=39114
  18398. * qt/api/qscriptengine.cpp:
  18399. (QScriptEngine::newObject):
  18400. * qt/api/qscriptengine.h:
  18401. * qt/api/qscriptengine_p.cpp:
  18402. (QScriptEnginePrivate::newObject):
  18403. * qt/api/qscriptengine_p.h:
  18404. * qt/tests/qscriptengine/tst_qscriptengine.cpp:
  18405. (tst_QScriptEngine::newObject):
  18406. 2010-06-02 Gabor Loki <loki@webkit.org>
  18407. Reviewed by Gavin Barraclough.
  18408. https://bugs.webkit.org/show_bug.cgi?id=40011
  18409. Thumb-2 build fix: The offset parameter of ldrh should be encoded as an
  18410. imm12 immediate constant in load16. If it is not fit in the instruction
  18411. a temporary register has to be used.
  18412. * assembler/MacroAssemblerARMv7.h:
  18413. (JSC::MacroAssemblerARMv7::load16):
  18414. 2010-06-02 Sterling Swigart <sswigart@google.com>
  18415. Reviewed by David Levin.
  18416. Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches.
  18417. https://bugs.webkit.org/show_bug.cgi?id=39906
  18418. * Configurations/FeatureDefines.xcconfig:
  18419. 2010-06-01 Gavin Barraclough <barraclough@apple.com>
  18420. Reviewed by Sam Weinig.
  18421. Bug 40021 - Refactor bytecode generation for calls so that register for this & args are allocated together
  18422. This is a useful stepping stone towards reversing argument order.
  18423. * bytecompiler/BytecodeGenerator.cpp:
  18424. (JSC::BytecodeGenerator::BytecodeGenerator):
  18425. (JSC::BytecodeGenerator::addParameter):
  18426. (JSC::BytecodeGenerator::emitCall):
  18427. (JSC::BytecodeGenerator::emitCallEval):
  18428. (JSC::BytecodeGenerator::emitConstruct):
  18429. * bytecompiler/BytecodeGenerator.h:
  18430. (JSC::CallArguments::thisRegister):
  18431. (JSC::CallArguments::argumentRegister):
  18432. (JSC::CallArguments::callFrame):
  18433. (JSC::CallArguments::count):
  18434. (JSC::BytecodeGenerator::shouldEmitProfileHooks):
  18435. * bytecompiler/NodesCodegen.cpp:
  18436. (JSC::NewExprNode::emitBytecode):
  18437. (JSC::CallArguments::CallArguments):
  18438. (JSC::EvalFunctionCallNode::emitBytecode):
  18439. (JSC::FunctionCallValueNode::emitBytecode):
  18440. (JSC::FunctionCallResolveNode::emitBytecode):
  18441. (JSC::FunctionCallBracketNode::emitBytecode):
  18442. (JSC::FunctionCallDotNode::emitBytecode):
  18443. (JSC::CallFunctionCallDotNode::emitBytecode):
  18444. (JSC::ApplyFunctionCallDotNode::emitBytecode):
  18445. 2010-06-01 Yong Li <yoli@rim.com>
  18446. Reviewed by Darin Adler.
  18447. Explicitly use PTHREAD_MUTEX_NORMAL to create pthread mutex.
  18448. https://bugs.webkit.org/show_bug.cgi?id=39893
  18449. * wtf/ThreadingPthreads.cpp:
  18450. (WTF::Mutex::Mutex):
  18451. 2010-06-01 Kwang Yul Seo <skyul@company100.net>
  18452. Reviewed by Xan Lopez.
  18453. [GTK] Use DEFINE_STATIC_LOCAL for threadMapMutex and threadMap
  18454. https://bugs.webkit.org/show_bug.cgi?id=39831
  18455. Use DEFINE_STATIC_LOCAL for static local variables.
  18456. * wtf/gtk/ThreadingGtk.cpp:
  18457. (WTF::threadMapMutex):
  18458. (WTF::threadMap):
  18459. (WTF::identifierByGthreadHandle):
  18460. 2010-06-01 Kent Tamura <tkent@chromium.org>
  18461. Reviewed by Shinichiro Hamaji.
  18462. Fix style errors of dtoa
  18463. https://bugs.webkit.org/show_bug.cgi?id=39972
  18464. Fix all errors reported by check-webkit-style.
  18465. * wtf/dtoa.cpp:
  18466. * wtf/dtoa.h:
  18467. 2010-05-30 Darin Adler <darin@apple.com>
  18468. Reviewed by Sam Weinig.
  18469. * wtf/OwnArrayPtr.h:
  18470. (WTF::OwnArrayPtr::set): Fix the assertion in here to match the one in OwnPtr.
  18471. At some point someone fixed the "asserts when assigning to 0 and the pointer is
  18472. already 0" issue in OwnPtr but forgot to do it here.
  18473. 2010-05-29 Geoffrey Garen <ggaren@apple.com>
  18474. Windows build fix: Updated exported symbols.
  18475. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  18476. 2010-05-29 Geoffrey Garen <ggaren@apple.com>
  18477. Disabled ENABLE_JIT_OPTIMIZE_NATIVE_CALL on Windows for now, until I
  18478. can figure out why it's crashing.
  18479. * wtf/Platform.h:
  18480. 2010-05-29 Geoffrey Garen <ggaren@apple.com>
  18481. Fixed Windows crash seen on buildbot.
  18482. * jit/JITOpcodes32_64.cpp:
  18483. (JSC::JIT::privateCompileCTINativeCall): __fastcall puts the first
  18484. argument in ecx.
  18485. 2010-05-28 Geoffrey Garen <ggaren@apple.com>
  18486. Windows build fix: Updated exported symbols.
  18487. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  18488. 2010-05-28 Geoffrey Garen <ggaren@apple.com>
  18489. Qt build fix: disable a little more stuff when JIT_OPTIMIZE_NATIVE_CALL
  18490. is disabled.
  18491. * runtime/Lookup.cpp:
  18492. (JSC::setUpStaticFunctionSlot):
  18493. * runtime/Lookup.h:
  18494. * wtf/Platform.h:
  18495. 2010-05-28 Geoffrey Garen <ggaren@apple.com>
  18496. Windows build fix: Updated exported symbols.
  18497. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  18498. 2010-05-28 Geoffrey Garen <ggaren@apple.com>
  18499. Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
  18500. Simplified the host calling convention.
  18501. 22.5% speedup on 32-bit host function calls. 9.5% speedup on 64-bit host
  18502. function calls.
  18503. No change on SunSpider.
  18504. All JS calls (but not constructs, yet) now go through the normal JS
  18505. calling convention via the RegisterFile. As a result, the host calling
  18506. convention, which used to be this
  18507. JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&)
  18508. is now this
  18509. JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*)
  18510. Callee, 'this', and argument access all hapen relative to the ExecState*,
  18511. which is a pointer into the RegisterFile.
  18512. This patch comes in two parts.
  18513. PART ONE: Functional code changes.
  18514. * wtf/Platform.h: Disabled optimized calls on platforms I didn't test.
  18515. We can re-enable once we verify that host calls on these platforms are
  18516. correct.
  18517. * debugger/DebuggerCallFrame.cpp:
  18518. (JSC::DebuggerCallFrame::functionName):
  18519. (JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to
  18520. ExecState::callee().
  18521. (JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue().
  18522. * interpreter/CallFrame.cpp:
  18523. * interpreter/CallFrame.h:
  18524. (JSC::ExecState::callee):
  18525. (JSC::ExecState::scopeChain):
  18526. (JSC::ExecState::init): Changed callee() to be JSObject* instead of
  18527. JSFunction* -- now, it might be some other callable host object.
  18528. (JSC::ExecState::hostThisRegister):
  18529. (JSC::ExecState::hostThisValue):
  18530. (JSC::ExecState::argumentCount):
  18531. (JSC::ExecState::argumentCountIncludingThis):
  18532. (JSC::ExecState::argument):
  18533. (JSC::ExecState::setArgumentCountIncludingThis):
  18534. (JSC::ExecState::setCallee): Added convenient accessors for arguments
  18535. from within a host function. Removed thisValue() because it was too
  18536. tempting to use incorrectly, and it only had one or two clients, anyway.
  18537. * interpreter/Interpreter.cpp:
  18538. (JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue().
  18539. (JSC::Interpreter::throwException): Be sure to shrink the register file
  18540. before invoking the exception handler, to reduce the chances that the
  18541. handler will re-throw in the case of stack overflow. (Re-throwing is now
  18542. more likely than it used to be, since standardizing the calling convention
  18543. implicitly added stack overflow checks to some places where they used to be missing.)
  18544. (JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope.
  18545. Updated for CallFrame::init API change.
  18546. (JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope.
  18547. Updated for CallFrame::init API change. Added support for calling a host
  18548. function.
  18549. (JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope.
  18550. Updated for CallFrame::init API change.
  18551. (JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change.
  18552. (JSC::Interpreter::privateExecute): Updated for CallFrame::init API change.
  18553. Added some explicit JSValue(JSObject*) initialization, since relaxing
  18554. the JSFunction* restriction on callee has made register types more ambiguous.
  18555. Removed toThisObject() conversion, since all callees do it themselves now.
  18556. Updated host function call for new host function signature. Updated for
  18557. change to ExecState::argumentCount() API.
  18558. * interpreter/Register.h:
  18559. (JSC::Register::):
  18560. (JSC::Register::operator=):
  18561. (JSC::Register::function): Changed callee() to be JSObject* instead of
  18562. JSFunction* -- now, it might be some other callable host object.
  18563. * jit/JITOpcodes.cpp:
  18564. (JSC::JIT::privateCompileCTINativeCall):
  18565. * jit/JITOpcodes32_64.cpp:
  18566. (JSC::JIT::privateCompileCTINativeCall): Deleted a bunch of code that
  18567. set up the arguments to host functions -- all but one of the arguments
  18568. are gone now. This is the actual optimization.
  18569. * jit/JITStubs.cpp:
  18570. (JSC::DEFINE_STUB_FUNCTION): Updated for ExecState and Register API
  18571. changes noted above. Removed toThisObject() conversion, since all callees
  18572. do it themselves now.
  18573. * runtime/ArgList.h:
  18574. (JSC::ArgList::ArgList): ArgList is getting close to unused. Added a
  18575. temporary shim for converting from ExecState* to ArgList where it's still
  18576. necessary.
  18577. * runtime/Arguments.h:
  18578. (JSC::Arguments::getArgumentsData):
  18579. (JSC::Arguments::Arguments): Updated for ExecState and Register API
  18580. changes noted above.
  18581. * runtime/CallData.cpp:
  18582. (JSC::call): Changed call always to call Interpreter::executeCall, even
  18583. for host functions. This ensures that the normal calling convention is
  18584. set up in the RegsiterFile when calling from C++ to host function.
  18585. * runtime/CallData.h: Changed host function signature as described above.
  18586. * runtime/ConstructData.cpp:
  18587. (JSC::construct): Moved JSFunction::construct code here so I could nix
  18588. JSFunction::call and JSFunction::call. We want a JSFunction-agnostic
  18589. way to call and construct, so that everything works naturally for non-
  18590. JSFunction objects.
  18591. * runtime/JSFunction.cpp:
  18592. (JSC::callHostFunctionAsConstructor):
  18593. * runtime/JSFunction.h: Updated for ExecState and Register API changes
  18594. noted above. Nixed JSFunction::call and JSFunction::construct, noted above.
  18595. * runtime/JSGlobalObject.cpp:
  18596. (JSC::JSGlobalObject::init): Ditto.
  18597. PART TWO: Global search and replace.
  18598. In the areas below, I used global search-and-replace to change
  18599. (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
  18600. args.size() => exec->argumentCount()
  18601. args.at(i) => exec->argument(i)
  18602. * API/JSCallbackFunction.cpp:
  18603. (JSC::JSCallbackFunction::call):
  18604. * API/JSCallbackFunction.h:
  18605. * API/JSCallbackObject.h:
  18606. * API/JSCallbackObjectFunctions.h:
  18607. (JSC::::call):
  18608. * JavaScriptCore.exp:
  18609. * jsc.cpp:
  18610. (functionPrint):
  18611. (functionDebug):
  18612. (functionGC):
  18613. (functionVersion):
  18614. (functionRun):
  18615. (functionLoad):
  18616. (functionCheckSyntax):
  18617. (functionSetSamplingFlags):
  18618. (functionClearSamplingFlags):
  18619. (functionReadline):
  18620. (functionQuit):
  18621. * runtime/ArrayConstructor.cpp:
  18622. (JSC::callArrayConstructor):
  18623. (JSC::arrayConstructorIsArray):
  18624. * runtime/ArrayPrototype.cpp:
  18625. (JSC::arrayProtoFuncToString):
  18626. (JSC::arrayProtoFuncToLocaleString):
  18627. (JSC::arrayProtoFuncJoin):
  18628. (JSC::arrayProtoFuncConcat):
  18629. (JSC::arrayProtoFuncPop):
  18630. (JSC::arrayProtoFuncPush):
  18631. (JSC::arrayProtoFuncReverse):
  18632. (JSC::arrayProtoFuncShift):
  18633. (JSC::arrayProtoFuncSlice):
  18634. (JSC::arrayProtoFuncSort):
  18635. (JSC::arrayProtoFuncSplice):
  18636. (JSC::arrayProtoFuncUnShift):
  18637. (JSC::arrayProtoFuncFilter):
  18638. (JSC::arrayProtoFuncMap):
  18639. (JSC::arrayProtoFuncEvery):
  18640. (JSC::arrayProtoFuncForEach):
  18641. (JSC::arrayProtoFuncSome):
  18642. (JSC::arrayProtoFuncReduce):
  18643. (JSC::arrayProtoFuncReduceRight):
  18644. (JSC::arrayProtoFuncIndexOf):
  18645. (JSC::arrayProtoFuncLastIndexOf):
  18646. * runtime/BooleanConstructor.cpp:
  18647. (JSC::callBooleanConstructor):
  18648. * runtime/BooleanPrototype.cpp:
  18649. (JSC::booleanProtoFuncToString):
  18650. (JSC::booleanProtoFuncValueOf):
  18651. * runtime/DateConstructor.cpp:
  18652. (JSC::callDate):
  18653. (JSC::dateParse):
  18654. (JSC::dateNow):
  18655. (JSC::dateUTC):
  18656. * runtime/DatePrototype.cpp:
  18657. (JSC::formatLocaleDate):
  18658. (JSC::fillStructuresUsingTimeArgs):
  18659. (JSC::fillStructuresUsingDateArgs):
  18660. (JSC::dateProtoFuncToString):
  18661. (JSC::dateProtoFuncToUTCString):
  18662. (JSC::dateProtoFuncToISOString):
  18663. (JSC::dateProtoFuncToDateString):
  18664. (JSC::dateProtoFuncToTimeString):
  18665. (JSC::dateProtoFuncToLocaleString):
  18666. (JSC::dateProtoFuncToLocaleDateString):
  18667. (JSC::dateProtoFuncToLocaleTimeString):
  18668. (JSC::dateProtoFuncGetTime):
  18669. (JSC::dateProtoFuncGetFullYear):
  18670. (JSC::dateProtoFuncGetUTCFullYear):
  18671. (JSC::dateProtoFuncToGMTString):
  18672. (JSC::dateProtoFuncGetMonth):
  18673. (JSC::dateProtoFuncGetUTCMonth):
  18674. (JSC::dateProtoFuncGetDate):
  18675. (JSC::dateProtoFuncGetUTCDate):
  18676. (JSC::dateProtoFuncGetDay):
  18677. (JSC::dateProtoFuncGetUTCDay):
  18678. (JSC::dateProtoFuncGetHours):
  18679. (JSC::dateProtoFuncGetUTCHours):
  18680. (JSC::dateProtoFuncGetMinutes):
  18681. (JSC::dateProtoFuncGetUTCMinutes):
  18682. (JSC::dateProtoFuncGetSeconds):
  18683. (JSC::dateProtoFuncGetUTCSeconds):
  18684. (JSC::dateProtoFuncGetMilliSeconds):
  18685. (JSC::dateProtoFuncGetUTCMilliseconds):
  18686. (JSC::dateProtoFuncGetTimezoneOffset):
  18687. (JSC::dateProtoFuncSetTime):
  18688. (JSC::setNewValueFromTimeArgs):
  18689. (JSC::setNewValueFromDateArgs):
  18690. (JSC::dateProtoFuncSetMilliSeconds):
  18691. (JSC::dateProtoFuncSetUTCMilliseconds):
  18692. (JSC::dateProtoFuncSetSeconds):
  18693. (JSC::dateProtoFuncSetUTCSeconds):
  18694. (JSC::dateProtoFuncSetMinutes):
  18695. (JSC::dateProtoFuncSetUTCMinutes):
  18696. (JSC::dateProtoFuncSetHours):
  18697. (JSC::dateProtoFuncSetUTCHours):
  18698. (JSC::dateProtoFuncSetDate):
  18699. (JSC::dateProtoFuncSetUTCDate):
  18700. (JSC::dateProtoFuncSetMonth):
  18701. (JSC::dateProtoFuncSetUTCMonth):
  18702. (JSC::dateProtoFuncSetFullYear):
  18703. (JSC::dateProtoFuncSetUTCFullYear):
  18704. (JSC::dateProtoFuncSetYear):
  18705. (JSC::dateProtoFuncGetYear):
  18706. (JSC::dateProtoFuncToJSON):
  18707. * runtime/ErrorConstructor.cpp:
  18708. (JSC::callErrorConstructor):
  18709. * runtime/ErrorPrototype.cpp:
  18710. (JSC::errorProtoFuncToString):
  18711. * runtime/FunctionConstructor.cpp:
  18712. (JSC::callFunctionConstructor):
  18713. * runtime/FunctionPrototype.cpp:
  18714. (JSC::callFunctionPrototype):
  18715. (JSC::functionProtoFuncToString):
  18716. (JSC::functionProtoFuncApply):
  18717. (JSC::functionProtoFuncCall):
  18718. * runtime/JSGlobalObjectFunctions.cpp:
  18719. (JSC::encode):
  18720. (JSC::decode):
  18721. (JSC::globalFuncEval):
  18722. (JSC::globalFuncParseInt):
  18723. (JSC::globalFuncParseFloat):
  18724. (JSC::globalFuncIsNaN):
  18725. (JSC::globalFuncIsFinite):
  18726. (JSC::globalFuncDecodeURI):
  18727. (JSC::globalFuncDecodeURIComponent):
  18728. (JSC::globalFuncEncodeURI):
  18729. (JSC::globalFuncEncodeURIComponent):
  18730. (JSC::globalFuncEscape):
  18731. (JSC::globalFuncUnescape):
  18732. (JSC::globalFuncJSCPrint):
  18733. * runtime/JSGlobalObjectFunctions.h:
  18734. * runtime/JSONObject.cpp:
  18735. (JSC::JSONProtoFuncParse):
  18736. (JSC::JSONProtoFuncStringify):
  18737. * runtime/JSString.h:
  18738. * runtime/MathObject.cpp:
  18739. (JSC::mathProtoFuncAbs):
  18740. (JSC::mathProtoFuncACos):
  18741. (JSC::mathProtoFuncASin):
  18742. (JSC::mathProtoFuncATan):
  18743. (JSC::mathProtoFuncATan2):
  18744. (JSC::mathProtoFuncCeil):
  18745. (JSC::mathProtoFuncCos):
  18746. (JSC::mathProtoFuncExp):
  18747. (JSC::mathProtoFuncFloor):
  18748. (JSC::mathProtoFuncLog):
  18749. (JSC::mathProtoFuncMax):
  18750. (JSC::mathProtoFuncMin):
  18751. (JSC::mathProtoFuncPow):
  18752. (JSC::mathProtoFuncRandom):
  18753. (JSC::mathProtoFuncRound):
  18754. (JSC::mathProtoFuncSin):
  18755. (JSC::mathProtoFuncSqrt):
  18756. (JSC::mathProtoFuncTan):
  18757. * runtime/NativeErrorConstructor.cpp:
  18758. (JSC::callNativeErrorConstructor):
  18759. * runtime/NumberConstructor.cpp:
  18760. (JSC::callNumberConstructor):
  18761. * runtime/NumberPrototype.cpp:
  18762. (JSC::numberProtoFuncToString):
  18763. (JSC::numberProtoFuncToLocaleString):
  18764. (JSC::numberProtoFuncValueOf):
  18765. (JSC::numberProtoFuncToFixed):
  18766. (JSC::numberProtoFuncToExponential):
  18767. (JSC::numberProtoFuncToPrecision):
  18768. * runtime/ObjectConstructor.cpp:
  18769. (JSC::callObjectConstructor):
  18770. (JSC::objectConstructorGetPrototypeOf):
  18771. (JSC::objectConstructorGetOwnPropertyDescriptor):
  18772. (JSC::objectConstructorGetOwnPropertyNames):
  18773. (JSC::objectConstructorKeys):
  18774. (JSC::objectConstructorDefineProperty):
  18775. (JSC::objectConstructorDefineProperties):
  18776. (JSC::objectConstructorCreate):
  18777. * runtime/ObjectPrototype.cpp:
  18778. (JSC::objectProtoFuncValueOf):
  18779. (JSC::objectProtoFuncHasOwnProperty):
  18780. (JSC::objectProtoFuncIsPrototypeOf):
  18781. (JSC::objectProtoFuncDefineGetter):
  18782. (JSC::objectProtoFuncDefineSetter):
  18783. (JSC::objectProtoFuncLookupGetter):
  18784. (JSC::objectProtoFuncLookupSetter):
  18785. (JSC::objectProtoFuncPropertyIsEnumerable):
  18786. (JSC::objectProtoFuncToLocaleString):
  18787. (JSC::objectProtoFuncToString):
  18788. * runtime/ObjectPrototype.h:
  18789. * runtime/Operations.h:
  18790. (JSC::jsString):
  18791. * runtime/RegExpConstructor.cpp:
  18792. (JSC::callRegExpConstructor):
  18793. * runtime/RegExpObject.cpp:
  18794. (JSC::RegExpObject::test):
  18795. (JSC::RegExpObject::exec):
  18796. (JSC::callRegExpObject):
  18797. (JSC::RegExpObject::match):
  18798. * runtime/RegExpObject.h:
  18799. * runtime/RegExpPrototype.cpp:
  18800. (JSC::regExpProtoFuncTest):
  18801. (JSC::regExpProtoFuncExec):
  18802. (JSC::regExpProtoFuncCompile):
  18803. (JSC::regExpProtoFuncToString):
  18804. * runtime/StringConstructor.cpp:
  18805. (JSC::stringFromCharCodeSlowCase):
  18806. (JSC::stringFromCharCode):
  18807. (JSC::callStringConstructor):
  18808. * runtime/StringPrototype.cpp:
  18809. (JSC::stringProtoFuncReplace):
  18810. (JSC::stringProtoFuncToString):
  18811. (JSC::stringProtoFuncCharAt):
  18812. (JSC::stringProtoFuncCharCodeAt):
  18813. (JSC::stringProtoFuncConcat):
  18814. (JSC::stringProtoFuncIndexOf):
  18815. (JSC::stringProtoFuncLastIndexOf):
  18816. (JSC::stringProtoFuncMatch):
  18817. (JSC::stringProtoFuncSearch):
  18818. (JSC::stringProtoFuncSlice):
  18819. (JSC::stringProtoFuncSplit):
  18820. (JSC::stringProtoFuncSubstr):
  18821. (JSC::stringProtoFuncSubstring):
  18822. (JSC::stringProtoFuncToLowerCase):
  18823. (JSC::stringProtoFuncToUpperCase):
  18824. (JSC::stringProtoFuncLocaleCompare):
  18825. (JSC::stringProtoFuncBig):
  18826. (JSC::stringProtoFuncSmall):
  18827. (JSC::stringProtoFuncBlink):
  18828. (JSC::stringProtoFuncBold):
  18829. (JSC::stringProtoFuncFixed):
  18830. (JSC::stringProtoFuncItalics):
  18831. (JSC::stringProtoFuncStrike):
  18832. (JSC::stringProtoFuncSub):
  18833. (JSC::stringProtoFuncSup):
  18834. (JSC::stringProtoFuncFontcolor):
  18835. (JSC::stringProtoFuncFontsize):
  18836. (JSC::stringProtoFuncAnchor):
  18837. (JSC::stringProtoFuncLink):
  18838. (JSC::stringProtoFuncTrim):
  18839. (JSC::stringProtoFuncTrimLeft):
  18840. (JSC::stringProtoFuncTrimRight):
  18841. 2010-05-28 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
  18842. Reviewed by Geoffrey Garen.
  18843. Fix the JSObjectSetPrototype function.
  18844. A cycle in a prototype chain can cause an application hang or
  18845. even crash.
  18846. A check for a prototype chain cycles was added to
  18847. the JSObjectSetPrototype.
  18848. JSObjectSetPrototype doesn't check for cycle in prototype chain.
  18849. https://bugs.webkit.org/show_bug.cgi?id=39360
  18850. * API/JSObjectRef.cpp:
  18851. (JSObjectSetPrototype):
  18852. * API/tests/testapi.c:
  18853. (assertTrue):
  18854. (checkForCycleInPrototypeChain):
  18855. (main):
  18856. * runtime/JSObject.cpp:
  18857. (JSC::JSObject::put):
  18858. * runtime/JSObject.h:
  18859. (JSC::JSObject::setPrototypeWithCycleCheck):
  18860. 2010-05-28 Chao-ying Fu <fu@mips.com>
  18861. Reviewed by Eric Seidel.
  18862. Fix MIPS JIT DoubleGreaterThanOrEqual Operands
  18863. https://bugs.webkit.org/show_bug.cgi?id=39504
  18864. Swapped two operands of left and right for DoubleGreaterThanOrEqual.
  18865. This patch fixed two layout tests as follows.
  18866. fast/js/comparison-operators-greater.html
  18867. fast/js/comparison-operators-less.html
  18868. * assembler/MacroAssemblerMIPS.h:
  18869. (JSC::MacroAssemblerMIPS::branchDouble):
  18870. 2010-05-28 Gavin Barraclough <barraclough@apple.com>
  18871. Reviewed by Geoff Garen.
  18872. Move jit compilation from linking thunks into cti_vm_lazyLink methods.
  18873. * jit/JITOpcodes.cpp:
  18874. (JSC::JIT::privateCompileCTIMachineTrampolines):
  18875. * jit/JITOpcodes32_64.cpp:
  18876. (JSC::JIT::privateCompileCTIMachineTrampolines):
  18877. * jit/JITStubs.cpp:
  18878. (JSC::DEFINE_STUB_FUNCTION):
  18879. 2010-05-28 Gavin Barraclough <barraclough@apple.com>
  18880. Reviewed by Sam Weinig.
  18881. Bug 39898 - Move arity check into callee.
  18882. We can reduce the size of the virtual call trampolines by moving the arity check
  18883. into the callee functions. As a following step we will be able to remove the
  18884. check for native function / codeblocks by performing translation in a lazy stub.
  18885. * interpreter/CallFrame.h:
  18886. (JSC::ExecState::init):
  18887. (JSC::ExecState::setReturnPC):
  18888. * jit/JIT.cpp:
  18889. (JSC::JIT::privateCompile):
  18890. (JSC::JIT::linkCall):
  18891. (JSC::JIT::linkConstruct):
  18892. * jit/JIT.h:
  18893. (JSC::JIT::compile):
  18894. * jit/JITOpcodes.cpp:
  18895. (JSC::JIT::privateCompileCTIMachineTrampolines):
  18896. * jit/JITOpcodes32_64.cpp:
  18897. (JSC::JIT::privateCompileCTIMachineTrampolines):
  18898. * jit/JITStubs.cpp:
  18899. (JSC::DEFINE_STUB_FUNCTION):
  18900. * runtime/Executable.cpp:
  18901. (JSC::FunctionExecutable::generateJITCodeForCall):
  18902. (JSC::FunctionExecutable::generateJITCodeForConstruct):
  18903. (JSC::FunctionExecutable::reparseExceptionInfo):
  18904. * runtime/Executable.h:
  18905. (JSC::NativeExecutable::NativeExecutable):
  18906. (JSC::FunctionExecutable::generatedJITCodeForCallWithArityCheck):
  18907. (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):
  18908. 2010-05-27 Luiz Agostini <luiz.agostini@openbossa.org>
  18909. Reviewed by Darin Adler.
  18910. UTF-16 code points compare() for String objects
  18911. https://bugs.webkit.org/show_bug.cgi?id=39701
  18912. Moving compare() implementation from UString to StringImpl for it to be shared
  18913. with String. Adding overloaded free functions codePointCompare() in StringImpl
  18914. and WTFString. Renaming function compare in UString to codePointCompare to be
  18915. consistent.
  18916. * runtime/JSArray.cpp:
  18917. (JSC::compareByStringPairForQSort):
  18918. * runtime/UString.cpp:
  18919. * runtime/UString.h:
  18920. (JSC::codePointCompare):
  18921. * wtf/text/StringImpl.cpp:
  18922. (WebCore::codePointCompare):
  18923. * wtf/text/StringImpl.h:
  18924. * wtf/text/WTFString.cpp:
  18925. (WebCore::codePointCompare):
  18926. * wtf/text/WTFString.h:
  18927. 2010-05-26 Darin Adler <darin@apple.com>
  18928. Reviewed by Kent Tamura.
  18929. Null characters handled incorrectly in ToNumber conversion
  18930. https://bugs.webkit.org/show_bug.cgi?id=38088
  18931. * runtime/JSGlobalObjectFunctions.cpp:
  18932. (JSC::parseInt): Changed code to use UTF8String().data() instead of
  18933. ascii() to fix the thread safety issue. Code path is covered by existing
  18934. tests in run-javascriptcore-tests.
  18935. (JSC::parseFloat): Moved comment to UString::toDouble since the issue
  18936. affects all clients, not just parseFloat. Specifically, this also affects
  18937. standard JavaScript numeric conversion, ToNumber.
  18938. * runtime/UString.cpp:
  18939. (JSC::UString::toDouble): Added a comment about incorrect space skipping.
  18940. Changed trailing junk check to use the length of the CString instead of
  18941. checking for a null character. Also got rid of a little unneeded logic
  18942. in the case where we tolerate trailing junk.
  18943. 2010-05-27 Nathan Lawrence <nlawrence@apple.com>
  18944. Reviewed by Geoffrey Garen.
  18945. Search for the new allocation one word at a time. Improves
  18946. performance on SunSpider by approximately 1%.
  18947. http://bugs.webkit.org/show_bug.cgi?id=39758
  18948. * runtime/Collector.cpp:
  18949. (JSC::Heap::allocate):
  18950. * runtime/Collector.h:
  18951. (JSC::CollectorBitmap::advanceToNextPossibleFreeCell):
  18952. 2010-05-27 Kevin Ollivier <kevino@theolliviers.com>
  18953. [wx] Build fixes for Windows after recent changes.
  18954. * wscript:
  18955. 2010-05-27 Gustavo Noronha Silva <gns@gnome.org>
  18956. More build fixage for make dist.
  18957. * GNUmakefile.am:
  18958. 2010-05-27 Kwang Yul Seo <skyul@company100.net>
  18959. Reviewed by Darin Adler.
  18960. RVCT does not have strnstr.
  18961. https://bugs.webkit.org/show_bug.cgi?id=39719
  18962. Add COMPILER(RVCT) guard to strnstr in StringExtras.h as RVCT does not provide strnstr.
  18963. * wtf/StringExtras.h:
  18964. 2010-05-26 Gavin Barraclough <barraclough@apple.com>
  18965. Reviewed by Oliver Hunt.
  18966. Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
  18967. (relanding r60267)
  18968. If the last item in a main disjunction is a quantified set of parentheses,
  18969. this is easier to code generate for than the general case for quantified
  18970. parentheses. This is because we never need to backtrack into the parentheses
  18971. - the first match will be the final and accepted match.
  18972. This patch also somewhat reverts a recent change to when fallback to PCRE
  18973. occurs. At the minute the compiler is tracking on patterns which will
  18974. require JIT fallback. This is handy from a performance perspective (it saves
  18975. the failed attempt at JIT compilation), but it means introducing knowledge
  18976. of the JITs capabilities into the other layers of the regex compilers. For
  18977. the specific feature of back-references, add a flag tracking their presence
  18978. on the pattern, and make these expressions fallback without attempting to
  18979. JIT. For parentheses, return to detecting which cases are have or have not
  18980. been handled during JIT compilation.
  18981. 18% progression on tagcloud, ~1.5% overall on sunspidey.
  18982. * yarr/RegexCompiler.cpp:
  18983. (JSC::Yarr::RegexPatternConstructor::atomBackReference):
  18984. (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
  18985. * yarr/RegexJIT.cpp:
  18986. (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
  18987. (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
  18988. (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
  18989. (JSC::Yarr::RegexGenerator::generateTerm):
  18990. (JSC::Yarr::RegexGenerator::RegexGenerator):
  18991. (JSC::Yarr::RegexGenerator::shouldFallBack):
  18992. (JSC::Yarr::jitCompileRegex):
  18993. * yarr/RegexPattern.h:
  18994. (JSC::Yarr::RegexPattern::RegexPattern):
  18995. (JSC::Yarr::RegexPattern::reset):
  18996. 2010-05-26 Gavin Barraclough <barraclough@apple.com>
  18997. Reviewed by NOBODY (revert).
  18998. Temporarily rolling out r60267, I appear to have hoesed perf at the last minute. :-/ Fixing.
  18999. * yarr/RegexCompiler.cpp:
  19000. (JSC::Yarr::RegexPatternConstructor::atomBackReference):
  19001. (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
  19002. * yarr/RegexJIT.cpp:
  19003. (JSC::Yarr::RegexGenerator::TermGenerationState::term):
  19004. (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
  19005. (JSC::Yarr::RegexGenerator::generateTerm):
  19006. (JSC::Yarr::RegexGenerator::RegexGenerator):
  19007. (JSC::Yarr::jitCompileRegex):
  19008. * yarr/RegexPattern.h:
  19009. (JSC::Yarr::RegexPattern::RegexPattern):
  19010. (JSC::Yarr::RegexPattern::reset):
  19011. 2010-05-26 Gustavo Noronha Silva <gns@gnome.org>
  19012. Build fixes for make distcheck.
  19013. * GNUmakefile.am:
  19014. 2010-05-26 Gavin Barraclough <barraclough@apple.com>
  19015. Reviewed by Oliver Hunt.
  19016. Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
  19017. If the last item in a main disjunction is a quantified set of parentheses,
  19018. this is easier to code generate for than the general case for quantified
  19019. parentheses. This is because we never need to backtrack into the parentheses
  19020. - the first match will be the final and accepted match.
  19021. This patch also somewhat reverts a recent change to when fallback to PCRE
  19022. occurs. At the minute the compiler is tracking on patterns which will
  19023. require JIT fallback. This is handy from a performance perspective (it saves
  19024. the failed attempt at JIT compilation), but it means introducing knowledge
  19025. of the JITs capabilities into the other layers of the regex compilers. For
  19026. the specific feature of back-references, add a flag tracking their presence
  19027. on the pattern, and make these expressions fallback without attempting to
  19028. JIT. For parentheses, return to detecting which cases are have or have not
  19029. been handled during JIT compilation.
  19030. 18% progression on tagcloud, ~1.5% overall on sunspidey.
  19031. * yarr/RegexCompiler.cpp:
  19032. (JSC::Yarr::RegexPatternConstructor::atomBackReference):
  19033. (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
  19034. * yarr/RegexJIT.cpp:
  19035. (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
  19036. (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
  19037. (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
  19038. (JSC::Yarr::RegexGenerator::generateTerm):
  19039. (JSC::Yarr::RegexGenerator::RegexGenerator):
  19040. (JSC::Yarr::RegexGenerator::shouldFallBack):
  19041. (JSC::Yarr::jitCompileRegex):
  19042. * yarr/RegexPattern.h:
  19043. (JSC::Yarr::RegexPattern::RegexPattern):
  19044. (JSC::Yarr::RegexPattern::reset):
  19045. 2010-05-26 Geoffrey Garen <ggaren@apple.com>
  19046. Reviewed by Sam Weinig.
  19047. Fixed a crash seen on the Leopard bot, caused by merge.
  19048. * jit/JITStubs.cpp:
  19049. (JSC::DEFINE_STUB_FUNCTION): Get the return address from the callframe,
  19050. since it's no longer passed to us as an argument.
  19051. 2010-05-25 Geoffrey Garen <ggaren@apple.com>
  19052. Fixed build failure caused by merge.
  19053. * jit/JITStubs.cpp:
  19054. (JSC::DEFINE_STUB_FUNCTION): On error, return a single value, since this
  19055. function no longer returns a pair.
  19056. 2010-05-25 Geoffrey Garen <ggaren@apple.com>
  19057. Reviewed by Oliver Hunt.
  19058. <rdar://problem/8020221>
  19059. Fixed a crash seen on Windows when calling a function with too many
  19060. arguments.
  19061. SunSpider reports no change.
  19062. No test because the ASSERT I added fires in existing tests.
  19063. * jit/JITStubs.cpp:
  19064. (JSC::DEFINE_STUB_FUNCTION): Make sure to grow the registerFile when too
  19065. many arguments have been provided, since the caller only allocated enough
  19066. registerFile space for the arguments it provided, not enough for the extra
  19067. copy of arguments we're going to need.
  19068. 2010-05-25 Kwang Yul Seo <skyul@company100.net>
  19069. Reviewed by Darin Adler.
  19070. Build fix for JSFunction
  19071. https://bugs.webkit.org/show_bug.cgi?id=39658
  19072. MSVC can't compile one of JSFunction constructors when JIT is disabled.
  19073. "PassRefPtr<NativeExecutable>" causes the compile error as NativeExecutable is not defined.
  19074. Add ENABLE(JIT) guard to the constructor.
  19075. * runtime/JSFunction.cpp:
  19076. (JSC::JSFunction::JSFunction):
  19077. * runtime/JSFunction.h:
  19078. 2010-05-24 Gavin Barraclough <barraclough@apple.com>
  19079. Reviewed by Sam Weinig.
  19080. Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call.
  19081. Presently, as soon as op-call strays off the hot path we set up a set of values on
  19082. the stack to be passed as arguments to cti functions, in case any should be called.
  19083. Instead, hoist the setup of the callframe to happen slightly sooner, and make the
  19084. cti functions to compile & check arity read these values from the callframe. This
  19085. allows up to remove the deprecated methods to manually set up cti arguments, rather
  19086. than using JITStubCall.h.
  19087. * interpreter/CallFrame.h:
  19088. * jit/JIT.h:
  19089. * jit/JITCall.cpp:
  19090. (JSC::JIT::compileOpCallInitializeCallFrame):
  19091. (JSC::JIT::compileOpCallVarargs):
  19092. (JSC::JIT::compileOpCallVarargsSlowCase):
  19093. (JSC::JIT::compileOpCall):
  19094. (JSC::JIT::compileOpCallSlowCase):
  19095. * jit/JITCall32_64.cpp:
  19096. (JSC::JIT::compileOpCallInitializeCallFrame):
  19097. (JSC::JIT::compileOpCallVarargs):
  19098. (JSC::JIT::compileOpCallVarargsSlowCase):
  19099. (JSC::JIT::compileOpCall):
  19100. (JSC::JIT::compileOpCallSlowCase):
  19101. * jit/JITInlineMethods.h:
  19102. * jit/JITOpcodes.cpp:
  19103. (JSC::JIT::privateCompileCTIMachineTrampolines):
  19104. * jit/JITOpcodes32_64.cpp:
  19105. (JSC::JIT::privateCompileCTIMachineTrampolines):
  19106. * jit/JITStubs.cpp:
  19107. (JSC::DEFINE_STUB_FUNCTION):
  19108. * jit/JITStubs.h:
  19109. (JSC::):
  19110. 2010-05-24 Gavin Barraclough <barraclough@apple.com>
  19111. Reviewed by Sam Weinig.
  19112. Relanding r60075.
  19113. * bytecode/CodeBlock.cpp:
  19114. (JSC::CodeBlock::dump):
  19115. (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
  19116. * bytecode/CodeBlock.h:
  19117. * bytecode/Opcode.h:
  19118. * bytecompiler/BytecodeGenerator.cpp:
  19119. (JSC::BytecodeGenerator::BytecodeGenerator):
  19120. (JSC::BytecodeGenerator::emitConstruct):
  19121. * bytecompiler/BytecodeGenerator.h:
  19122. (JSC::BytecodeGenerator::emitGetByIdExceptionInfo):
  19123. * interpreter/Interpreter.cpp:
  19124. (JSC::Interpreter::privateExecute):
  19125. * jit/JIT.cpp:
  19126. (JSC::JIT::privateCompileMainPass):
  19127. * jit/JIT.h:
  19128. * jit/JITCall.cpp:
  19129. (JSC::JIT::compileOpCall):
  19130. (JSC::JIT::compileOpCallSlowCase):
  19131. * jit/JITCall32_64.cpp:
  19132. (JSC::JIT::compileOpCall):
  19133. (JSC::JIT::compileOpCallSlowCase):
  19134. * jit/JITOpcodes.cpp:
  19135. (JSC::JIT::privateCompileCTIMachineTrampolines):
  19136. (JSC::JIT::privateCompileCTINativeCall):
  19137. (JSC::JIT::emit_op_neq_null):
  19138. (JSC::JIT::emit_op_convert_this):
  19139. (JSC::JIT::emit_op_get_callee):
  19140. (JSC::JIT::emit_op_create_this):
  19141. * jit/JITOpcodes32_64.cpp:
  19142. (JSC::JIT::privateCompileCTIMachineTrampolines):
  19143. (JSC::JIT::privateCompileCTINativeCall):
  19144. (JSC::JIT::emit_op_get_callee):
  19145. (JSC::JIT::emit_op_create_this):
  19146. * jit/JITStubs.cpp:
  19147. (JSC::DEFINE_STUB_FUNCTION):
  19148. (JSC::JITThunks::hostFunctionStub):
  19149. * jit/JITStubs.h:
  19150. (JSC::JITThunks::ctiNativeConstruct):
  19151. (JSC::):
  19152. * runtime/ExceptionHelpers.cpp:
  19153. (JSC::createNotAnObjectError):
  19154. * runtime/Executable.h:
  19155. (JSC::NativeExecutable::create):
  19156. (JSC::NativeExecutable::NativeExecutable):
  19157. * runtime/JSFunction.cpp:
  19158. (JSC::callHostFunctionAsConstructor):
  19159. * runtime/JSFunction.h:
  19160. * wtf/Platform.h:
  19161. == Rolled over to ChangeLog-2010-05-24 ==