Closed Bug 464932 Opened 16 years ago Closed 16 years ago

ecma3/Statements/eforin_001.as switch statement case needs to be updated

Categories

(Tamarin Graveyard :: Tracing Virtual Machine, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: brbaker, Assigned: brbaker)

Details

(Keywords: flashplayer)

Attachments

(1 file)

The case statement is currently set for the string zero "0" but the property of the object that it is switching on is a number zero. Since the switch statement is implemented using !== (ecma 262 section 12.11) so the case will never be executed (0 !== "0")

This is causing the test to actually throw a TypeError in the test and not all testcases are executed:

$ $AVM ecma3/Statements/eforin_001.abc
forin-001 The for...in  statement
object[company] = netscape PASSED!
object[length] = 4 PASSED!
TypeError: Error #1010: A term is undefined and has no properties.
        at MethodInfo-65()
        at global$init()

After fixing the case statements to use: case 0: all of the testcases execute and pass.

$ $AVM ecma3/Statements/eforin_001.abc
forin-001 The for...in  statement
object[company] = netscape PASSED!
object[length] = 4 PASSED!
object[0] = zero PASSED!
object[year] = 2000 PASSED!
object.length = 4 PASSED!
object[company] = netscape PASSED!
object[length] = 4 PASSED!
object[0] = zero PASSED!
object[year] = 2000 PASSED!
object.length = 4 PASSED!
check break out of for...in = pass PASSED!
properties.length = 1 PASSED!
object[properties[0]] == values[0] = PASSED PASSED!
check break out of for...in = pass PASSED!
properties.length = 1 PASSED!
object[properties[0]] == object[properties[0]] = PASSED PASSED!
Flags: wanted-flashplayer10+
Flags: flashplayer-triage+
Attached patch patchSplinter Review
Assignee: nobody → brbaker
Status: NEW → ASSIGNED
Attachment #348208 - Flags: review?(cpeyer)
Attachment #348208 - Flags: review?(cpeyer) → review+
pushed patch into redux 1290:ef275c60b255
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: