Closed Bug 517127 Opened 15 years ago Closed 15 years ago

specialize the add operator

Categories

(Tamarin Graveyard :: Baseline JIT (CodegenLIR), enhancement, P3)

enhancement

Tracking

(Not tracked)

VERIFIED FIXED
flash10.1

People

(Reporter: edwsmith, Assigned: edwsmith)

References

Details

Attachments

(1 file, 3 obsolete files)

currently: A:* + B:String => concatStrings(string(core,A), B) proposed: => concat_any_str(A, B) (more cases to be added here)
Verifier::emitToString() is a holdover from before the CodeWriter refactoring, and is only used by the jit. This patch eliminates it; the type-sniffing optimizations it performed are pushed down into the jit, and consolidated. the patch removes the extra cases for OP_esc_xattr, OP_esc_xelem, and OP_convert_s from writeOp1. OP_concat still exists in the code but is dead (it's not a real opcode, it was just used in this bizarre codegen code). Will remove in a subsequent patch.
Assignee: nobody → edwsmith
Attachment #401208 - Flags: review?(jodyer)
Attached patch removes vestiges of OP_concat (obsolete) — Splinter Review
This completes the removal of internal opcode OP_concat. Note that op_concat has never been a real instruction in abc.
Attachment #401216 - Flags: review?(jodyer)
This just moves code around and shouldn't affect what we generate. OP_add_d was never an opcode in ABC, this removes it from code and puts the numeric-add optimization logic further down in the jit. Where we can also specialize it further without dealing with the CodeWriter abstraction boundary.
Attachment #401220 - Flags: review?(tharwood)
Attachment #401220 - Flags: review?(tharwood) → review+
Blocks: 517121
Attachment #401208 - Flags: review?(tharwood)
Attachment #401216 - Flags: review?(tharwood)
Comment on attachment 401208 [details] [diff] [review] Refactor convert_s and add to avoid Verifier::emitToString I'd find the straight STRING_TYPE, NUMBER_TYPE, and OBJECT_TYPE easier to read than st, nt, ot, but it's no biggie.
Attachment #401208 - Flags: review?(tharwood) → review+
Attachment #401216 - Flags: review?(tharwood) → review+
no prob, i'll put them back to STRING_TYPE, etc.
Attachment #401208 - Attachment is obsolete: true
Attachment #401208 - Flags: review?(jodyer)
Attachment #401216 - Attachment is obsolete: true
Attachment #401216 - Flags: review?(jodyer)
Comment on attachment 401220 [details] [diff] [review] Refactors numeric-add optimization into codegen block for OP_add, remove OP_add_d internal opcode. pushed http://hg.mozilla.org/tamarin-redux/rev/71bbb71fd271
Attachment #401220 - Attachment is obsolete: true
Apart from refactoring, the salient changes are: * adds int-specialized case at the top of op_add * op_add takes AvmCore* instead of toplevel; if XML objects are being added, then the new xml object is constructed using the toplevel of the XML objects passed in, instead of the toplevel of the caller. (it seems totally arbitrary, and this saves me passing in an environment). * boilerplate removed from jit code; we pass in AvmCore* instead of Toplevel*
Attachment #405557 - Flags: review?(stejohns)
Attachment #405557 - Flags: review?(stejohns) → review+
Depends on: 521353
this patch is essentially done, and R+, but blocked by the 64-bit-int-atom-precision bug (bug 521353). landing this bug would make the other one more exposed, by letting it happen in jit code in addition to interpreter code. opinions? should this bug be blocked by the other one or should it land anyway?
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → flash10.1
(In reply to comment #9) > opinions? should this bug be blocked by the other one or should it land > anyway? my vote: don't block it, go ahead and land it, and add notes to 521353 to indicate scope creep
Severity: normal → enhancement
OS: Mac OS X → All
Hardware: x86 → All
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Engineering work item. Marking as verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: