Hi, I tried to run 02/13/09 code on Ubuntu 8.10/Intel two core CPU and face a few errors.
1. how do I specifically test WREC/JIT? I just want to run a specific code file so I can trace if sth wrong. I can run GtkLauncher or jsc. 2. on architecture level how WREC/JIT are used in webkit? how could I know the calling sequence? I can run some test but how do I know whether WREC/JIT are called? what's the running flow of WREC/JIT? 3. when I run_javascriptcore_tests the error is: shell.js -f ./js1_6/String/regress-306591.js -#- Wrote results to 'actual.html'. ** Danger, Will Robinson! Danger! The following failures have been introduced: ecma/Date/15.9.5.31-1.js #hour diff 1 ecma/Date/15.9.5.35-1.js ecma_3/Date/15.9.5.6.js You fixed the following test: ecma_3/Date/15.9.5.7.js 3 regressions found. 1 test fixed. Errors include time difference of 1 hour (time zone wrong?) or unexpected NaN. 4. when I run-webkit-tests: ... 3907 test cases (96%) succeeded 106 test cases (2%) had incorrect layout 35 test cases (<1%) were new 1 test case (<1%) timed out 9 test cases (<1%) crashed 138 test cases (3%) had stderr output May be some errors are normal but how do I identify them? rgds joe --- On Wed, 1/28/09, Gavin Barraclough <barraclo...@apple.com> wrote: > From: Gavin Barraclough <barraclo...@apple.com> > Subject: Re: [webkit-dev] want to port JIT to MIPS, any coworker or any hint? > To: last...@yahoo.com > Date: Wednesday, January 28, 2009, 4:55 PM > On Jan 27, 2009, at 10:58 PM, x yz wrote: > > > Gavin, > > last night I saw WREC when I search X86, and realized > many places > > need to be touched. Your reply give more info and > really help. > > Thanks a lot. > > > > In Generator::generateEnter(), there is comment > "On gcc the function > > is regparm(3)...", how to understand that? > > WREC JIT generates a function with a C calling convention > that > implements the regular expression. The entry and exit from > the > function are generated by the generateEnter() and > generateReturn*() > methods. On OS X x86, the JIT generated function > implements a > regparm(3) calling convention (see WREC.h, the generated > code is > called through a CompiledRegExp function pointer). > > > The function has no argument, why we peek four > arguments from > > stack(input,output,length,index)? > > These calls are not peeking values from the stack at the > time they are > called; they are emitting JIT code that will will read > values from the > stack, when the JIT function has been generated and is run. > The JIT > generated regular expression function is passed these four > arguments > (again see WREC.h). > > As a note, you're best directing these emails at the > webkit-dev list > in future, that way other people will also be able to help > you out. > > cheers, > G. > > > > > > rgds > > joe > > > > > > --- On Tue, 1/27/09, Gavin Barraclough > <barraclo...@apple.com> wrote: > > > >> From: Gavin Barraclough > <barraclo...@apple.com> > >> Subject: Re: [webkit-dev] want to port JIT to > MIPS, any coworker or > >> any hint? > >> To: last...@yahoo.com > >> Date: Tuesday, January 27, 2009, 5:10 AM > >> On Jan 26, 2009, at 11:09 AM, x yz wrote: > >> > >>> Gavin, > >>> Thanks, I really need to learn fast. > >>> Where can I find more on WREC or its spec? > >> > >> WREC is WebKit's regular expression JIT. The > spec it > >> is implementing is the regular expression syntax > described > >> in ECMA-262. > >> > >>> Which part of webkit is WREC? I just see all > assembler > >> codes are in <assembler> and <jit> and > wonder > >> whether I can just change them rather then change > WREC. > >> > >> WebKit contains two separate JITs, one for the > JavaScript > >> language (in the 'jit' directory), one for > >> JavaScript's regular expression language (in > the > >> 'wrec' directory). Both JITs make use of > the same > >> assembler to emit code. WREC is a much smaller, > simpler > >> JIT, which is why I suggest starting by looking at > this, but > >> either JIT can be enabled independently of the > other. > >> > >>> Foresee SSE set may be a problem as MIPS has > no SSE. > >> > >> WREC does not use SSE, and I believe all JIT code > generated > >> by the main JS JIT is guarded by the a > configuration switch, > >> JIT_OPTIMIZE_ARITHMETIC – this can be disabled > in > >> Platform.h. > >> > >>> Sun's link for "The JIT Compiler > Interface > >> Specification" not valid anymore. > >> > >> Our JIT is all our own code, and written from > scratch, so > >> I'm not sure this documentation would help > you. > >> > >> Good luck, > >> G. > >> > >> > >>> MacroAssembler::breakpoint() is just int3 > which I know > >> used as debug int in X86. I'll see which one > used in gnu > >> mips. > >>> joe > >>> > >>> > >>> > >>> --- On Sun, 1/25/09, Gavin Barraclough > >> <barraclo...@apple.com> wrote: > >>> > >>>> From: Gavin Barraclough > >> <barraclo...@apple.com> > >>>> Subject: Re: [webkit-dev] want to port JIT > to > >> MIPS, any coworker or any hint? > >>>> To: "WebKit Development" > >> <webkit-dev@lists.webkit.org> > >>>> Date: Sunday, January 25, 2009, 5:34 PM > >>>> On Jan 24, 2009, at 8:36 PM, x yz wrote: > >>>> > >>>>> Just build webkit on XP using cgywin, > not > >> tested yet. > >>>> I want to port to 32bit MIPS, it seems I > need to > >> touch JIT > >>>> and rewrite assembler folder. > >>>> > >>>> Once you have the bytecode interpreter up > and > >> running on > >>>> MIPS, I'd recommend starting by just > trying to > >> port WREC > >>>> (the regular expression JIT). This is a > good > >> starting point > >>>> because it utilizes a smaller subset of > the > >> MacroAssembler > >>>> interface, and has a much simpler > interface to C > >> code (JIT > >>>> code is called with C calling conventions, > and no > >> callbacks > >>>> are made into C from the JIT generated > code). > >>>> > >>>>> Any document there on > javascripcore/assembler? > >> I also > >>>> want a smart way to make sure output is > correct. > >>>> > >>>> A very simple way to validate you are > generating > >> the > >>>> correct code is to simply force the JIT to > insert > >> a > >>>> breakpoint (i.e. use > MacroAssembler::breakpoint()) > >> at the > >>>> head of the function you are generating, > then run > >> jsc under > >>>> a debugger, and when it hits the > breakpoint simply > >>>> disassemble the code in memory at the > point it has > >> stopped. > >>>> Now you can visually inspect that it it > has > >> generated the > >>>> code you were expecting. > >>>> > >>>> Good luck! > >>>> G. > >>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >> _______________________________________________ > >>>>> webkit-dev mailing list > >>>>> webkit-dev@lists.webkit.org > >>>>> > >>>> > >> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > >>>> > >>>> > _______________________________________________ > >>>> webkit-dev mailing list > >>>> webkit-dev@lists.webkit.org > >>>> > >> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > >>> > >>> > >>> > > > > > > _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev