BaselineCompiler: Skip unreachable ops in the compiler

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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
(Assignee)

Comment 1

5 years ago
Created attachment 711753 [details] [diff] [review]
Patch
Attachment #711753 - Flags: review?(bhackett1024)
Attachment #711753 - Flags: review?(bhackett1024) → review+
(Assignee)

Comment 2

5 years ago
https://hg.mozilla.org/projects/ionmonkey/rev/e42abbe46417
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.