Closed Bug 576417 Opened 15 years ago Closed 15 years ago

JM: Reimplement tempRegForConstant() as copyConstantIntoReg().

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sstangl, Assigned: sstangl)

Details

Attachments

(1 file)

tempRegForConstant() has the nasty side-effect of notifying the FrameState that the constant value is stored inside of a register, which causes fe->isConstant() to return false. This patch eliminates that function and instead implements copyConstantIntoReg(), which performs a mov on an immediate, but does not update the FrameEntry of the store, since if it is in any way notified, it becomes non-constant. The nasty thing is that this then requires an explicit call to freeReg() for the returned register. Because the register is not listed as reflecting any FrameEntry, assertValidRegisterState() will otherwise assert that a register has been lost.
Attachment #455584 - Flags: review?(dvander)
Comment on attachment 455584 [details] [diff] [review] Implement copyConstantIntoReg(). r=me though I'd prefer the function name give a clue as to its hardcoding of int32.
Attachment #455584 - Flags: review?(dvander) → review+
Status: NEW → RESOLVED
Closed: 15 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: