Closed Bug 438376 Opened 18 years ago Closed 18 years ago

for-each-var code generation failure

Categories

(Tamarin Graveyard :: Self-hosting compiler (ESC), defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lhansen, Assigned: lhansen)

Details

Attachments

(1 file)

ESC generates code for the following fragment that fails verification (unbalanced stack depth). If the var is manually hoisted then the code succeeds. function f() { if (x) for each (var md in x) print(md); } f();
Note that the 'if' is necessary. The CFG needs to have a flow graph that results in an unbalanced stack /and/ the unbalance needs to be detectable, as for the jump past the for loop when x is false. The verifier does not complain if the loop leaves a nonempty stack and then returns. This fact explains why all the for-each-var statements in eg abc-encode.es did not cause problems.
Attached patch Patch — — Splinter Review
Assignee: nobody → lhansen
Status: NEW → ASSIGNED
Attachment #324492 - Flags: review?(jodyer)
(In reply to comment #1) > Note that the 'if' is necessary. The CFG needs to have a flow graph that ^^^^^^^^^^^^^^^^^^^^^^^^^^ needs to have an edge
Attachment #324492 - Flags: review?(jodyer) → review+
Changeset 582.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: