Closed Bug 810375 Opened 12 years ago Closed 12 years ago

BaselineCompiler: Support local/arg inc/dec ops

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(3 files)

No description provided.
Attached patch Part 1: Ignore decomposed ops (deleted) — Splinter Review
Attachment #680131 - Flags: review?(kvijayan)
Attached patch Part 2: Implement JSOP_POS (deleted) — Splinter Review
Uses an inline path for int32 and double. We can test for both with a single compare and in these cases POS is a no-op.
Attachment #680152 - Flags: review?(kvijayan)
Attached patch Part 3: Implement JSOP_DUP (deleted) — Splinter Review
i++ is decomposed as getlocal 0 pos dup one add setlocal 0 The patch doesn't attempt to DUP unsynced constants etc directly. There are probably other uses of DUP but here it doesn't matter.
Attachment #680172 - Flags: review?(kvijayan)
Attachment #680131 - Flags: review?(kvijayan) → review+
Attachment #680152 - Flags: review?(kvijayan) → review+
Attachment #680172 - Flags: review?(kvijayan) → review+
There's something I don't understand about decomposed ops. JSOP_LOCALINC has the decompose flag set on it, but in the emitted bytecode it doesn't actually seem to be decomposed. The couple of other inc ops I checked actually had the surrogate ops emitted, but not LOCALINC. Is there something I'm missing?
(In reply to Kannan Vijayan [:djvj] from comment #4) > There's something I don't understand about decomposed ops. JSOP_LOCALINC > has the decompose flag set on it, but in the emitted bytecode it doesn't > actually seem to be decomposed. Are you using a recent build? Local/arg ops were decomposed in bug 804636. js> dis(function() { var i; i++; }); flags: LAMBDA loc op ----- -- main: 00000: getlocal 0 00003: pop 00004: localinc 11 00007: getlocal 0 00010: pos 00011: dup 00012: one 00013: add 00014: setlocal 0 00017: pop 00018: pop 00019: stop
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: