Closed Bug 629160 Opened 13 years ago Closed 13 years ago

Generating CASE_EXIT for some default cases in tableswitch when tracing

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: h4writer, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:2.0b10pre) Gecko/20110125 Firefox/4.0b10pre
Build Identifier: 

For some inputs to a switch we are taking the CASE_EXIT guard instead of using the DEFAULT_EXIT. Therefor they don't get matched and every time a new trace will get recorded. 

In the code the default exit gets taken when:
current_case - lowest_case >= count_cases

Now this isn't an issue when we are tracing integers,
but isn't true when the input is a double.

Then the default exit should get taken when:
current_case - lowest_case >= count_cases || jsint(current_case) != current_case

Reproducible: Always
Attached patch PatchSplinter Review
Here is the patch that solves the issue.
Attachment #507249 - Flags: review?(nnethercote)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Bug 620757 removed this code, thus rendering this bug moot!
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Attachment #507249 - Flags: review?(nnethercote)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: