If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

nanojit: clean up asm_spill() and friends a little

RESOLVED FIXED

Status

Core Graveyard
Nanojit
RESOLVED FIXED
8 years ago
4 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
Created attachment 432496 [details] [diff] [review]
patch

This patch has some slight clean-ups to asm_spill() and
friends.  I was hoping to clean things up more, but failed.  'pop' really 
bugs me :(

- Rename asm_spilli() as asm_maybe_spill(), because it doesn't always spill.

- Move the post-spill handling of the i386-only 'pop' case into 
  prepareResultReg(), which already has the computation of 'pop'.
  
- Only call asm_spill() if a spill is necessary;  avoids a test in each
  back-end's copy of asm_spill().
  
- Using 'i' for non-integer variable names is a bad idea.  Avoid a few more
  of these.
  
- Remove the no-longer-needed 'pop' arg to deprecated_freeRsrcOf().
Attachment #432496 - Flags: review?(edwsmith)
(Assignee)

Updated

8 years ago
Duplicate of this bug: 539637

Updated

8 years ago
Attachment #432496 - Flags: review?(edwsmith) → review+

Comment 2

8 years ago
Comment on attachment 432496 [details] [diff] [review]
patch

Assembler.cpp:587:  the comment should read "...no longer used on i386..."

Assembler.cpp:647:  TR does hit this assert.  In AS3 a call to a function that is declared to return Number will emit a non-pure LIR_fcall with the result ignored, e.g.

package {
    function f():Number { return 0 }
    f()
}

In the TR regressions, it happens in these three tests:
  as3/Definitions/FunctionAccessors/GetSuper.abc
  ecma3/GlobalObject/e15_1_2_2_1.abc
  ecma3/String/e15_5_4_5_4.abc 

Tests run fine with the assert removed.  R+ with those minor changes.
(Assignee)

Comment 3

8 years ago
NJ: http://hg.mozilla.org/projects/nanojit-central/rev/5806c6f3bf12
TM: http://hg.mozilla.org/tracemonkey/rev/5ff90d0961a7
Whiteboard: fixed-in-nanojit, fixed-in-tracemonkey

Comment 4

8 years ago
TR: http://hg.mozilla.org/tamarin-redux/rev/96e8b653ab9a
Whiteboard: fixed-in-nanojit, fixed-in-tracemonkey → fixed-in-nanojit, fixed-in-tracemonkey, fixed-in-tamarin

Comment 5

8 years ago
http://hg.mozilla.org/mozilla-central/rev/5ff90d0961a7
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Component: Nanojit → Nanojit
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.