Closed Bug 525413 Opened 16 years ago Closed 16 years ago

lirasm: avoid operandCount

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

(Whiteboard: fixed-in-nanojit, fixed-in-tracemonkey)

Attachments

(1 file)

The main switch in assembleFragment() currently handles some LIR opcodes specifically, and then falls back to generic code based on operandCounts for other cases. This is bad, see bug 505662 for more details. This patch gets rid of this behaviour in lirasm by removing assemble_general() and handling all LIR opcodes explicitly in the switch. Some other benefits of this: - LIR_start/LIR_label/LIR_callh now give useful error messages if they are used, rather than random crashes/asserts/wrong behaviour. - LIR_cmov/LIR_qcmov are now implemented, as is qcall. - LIR_float is now handled. LIR_quad can now only take integral arguments. The tests have been updated accordingly. - LIR_qcall is now handled. - mOpMap is simpler -- the values are now just LOpcodes instead of a pair. Other things in the patch: - error messages now say "line 123: ..." instead of "instruction 123: ..." because it's really the line number. - assemble_guard() and assemble_jump() have been tweaked.
Attached patch patchSplinter Review
Attachment #409289 - Flags: review?(graydon)
Blocks: 505662
Attachment #409289 - Flags: review?(graydon) → review+
Whiteboard: fixed-in-nanojit → fixed-in-nanojit, fixed-in-tracemonkey
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: