IM: Implement lowering and codegen for LInteger

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Andrew Scheff, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
Here's a sample script where this hits:

function loop() {
    var i = 0;
    for (; i;) {
        i = 1;
    }
    return i;
}
print(loop());

Assertion failure: implement Integer, at ../ion/IonLIR.h:614
Aborted
(Reporter)

Comment 2

6 years ago
Created attachment 548647 [details] [diff] [review]
Code generation for LInteger
(Reporter)

Comment 3

6 years ago
Comment on attachment 548647 [details] [diff] [review]
Code generation for LInteger

I believe this is correct codegen for LInteger, but it triggers another not yet implemented assertion now: TestVAndBranch.  I'll move on to that.
Attachment #548647 - Attachment is patch: true
Attachment #548647 - Attachment mime type: text/x-patch → text/plain
Attachment #548647 - Flags: review?(dvander)
Comment on attachment 548647 [details] [diff] [review]
Code generation for LInteger

Review of attachment 548647 [details] [diff] [review]:
-----------------------------------------------------------------

Nice.

FYI TestVAndBranch is hard. I would simplify it by annotating comparisons with the TypeOracle, and then reduce it to TestIAndBranch which will be much easier and give us the functionality we want anyway.

::: js/src/ion/LIR-Common.h
@@ +125,5 @@
>  
>      LInteger(int32 i32) : i32_(i32)
>      { }
> +
> +    int32 getValue() {

Nit: int32 getValue() const {
Attachment #548647 - Flags: review?(dvander) → review+
(Reporter)

Comment 5

6 years ago
http://hg.mozilla.org/projects/ionmonkey/rev/62f64f4e16ea

So that's what V means..
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Reporter)

Comment 6

6 years ago
http://hg.mozilla.org/projects/ionmonkey/rev/62f64f4e16ea

So that's what V means..
You need to log in before you can comment on or make changes to this bug.