[Webkit-unassigned] [Bug 91052] JSC: LLInt should auto-generate our cross-platform C++ interpreter

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 16 14:03:30 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=91052


Geoffrey Garen <ggaren at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ggaren at apple.com




--- Comment #16 from Geoffrey Garen <ggaren at apple.com>  2012-08-16 14:04:02 PST ---
> OFFLINE_ASM_OPCODE_LABEL(op_create_this)
>     r0.i = *CAST<intptr_t*>(fp.i8p - 32);                      // this<t0> = cfr.Callee;
>     r2.i = *CAST<intptr_t*>(r0.i8p + 40);                      // inheritor<t2> = this<t0>.cachedInheritorID;

I see a couple issues here.

(1) r0 and r2 are declared to be interpreter-global. This will defeat local register allocation, possibly causing performance problems. Can you test the performance of this interpreter, as compared to the existing .cpp interpreter, and post the results?

Performance is not a top priority here, but we'd like to pay it some mind.

(2) This code is a bit cryptic. Assembly forces you to be cryptic. But we're auto-generating C++ here, so we can be much more explanatory. For example, when the existing .cpp interpreter wants to read the callee register, it just says "JSFunction* constructor = jsCast<JSFunction*>(callFrame->callee())". Why is that kind of code not possible here? Are we going out of our way to mimic the assembly generated by our assembly back-ends for some reason?

(3) Comments. I tend to agree that this code is cryptic, and could use some explanation. However, the comments are equally cryptic. I don't know what <> annotation means, and I don't know what these numbered t's are. 

The original code reads:

    loadp Callee[cfr], t0

Why can't our C++ code have variables named "cfr", "callee" and "t0", and perform an operation like "Register t0 = cfr[callee]"?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list