Closed Bug 838530 Opened 11 years ago Closed 11 years ago

BaselineCompiler: Skip unreachable ops in the compiler

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

We currently rely on the stack depths computed by ScriptAnalysis. If ScriptAnalysis has no Bytecode for an op (because it's unreachable), the depth can be wrong. The following test asserts (when compiling the second LEAVEBLOCK), because the compiler's stack depth is incorrect:

function f() {
    while (true) {
	try {
	} catch ( e ) {
	    break;
	}
    }
}
f();

Right fix is to skip unreachable ops in the compiler. I hoped we could avoid it because it adds some complexity, but looks like we have to do this after all.

Should fix ecma_2/Statements/try-009.js
Attached patch PatchSplinter Review
Attachment #711753 - Flags: review?(bhackett1024)
Attachment #711753 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/projects/ionmonkey/rev/e42abbe46417
Status: ASSIGNED → RESOLVED
Closed: 11 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: