Closed Bug 674099 Opened 13 years ago Closed 13 years ago

IM: Implement lowering and codegen for LInteger

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ascheff, Unassigned)

Details

Attachments

(1 file)

      No description provided.
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
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+
http://hg.mozilla.org/projects/ionmonkey/rev/62f64f4e16ea

So that's what V means..
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.