Last Comment Bug 674099 - IM: Implement lowering and codegen for LInteger
: IM: Implement lowering and codegen for LInteger
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: ---
Assigned To: general
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-25 16:13 PDT by Andrew Scheff
Modified: 2011-07-26 20:20 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Code generation for LInteger (2.39 KB, patch)
2011-07-26 17:57 PDT, Andrew Scheff
dvander: review+
Details | Diff | Review

Description Andrew Scheff 2011-07-25 16:13:13 PDT

    
Comment 1 David Anderson [:dvander] 2011-07-25 16:15:44 PDT
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 2 Andrew Scheff 2011-07-26 17:57:31 PDT
Created attachment 548647 [details] [diff] [review]
Code generation for LInteger
Comment 3 Andrew Scheff 2011-07-26 17:59:23 PDT
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.
Comment 4 David Anderson [:dvander] 2011-07-26 18:04:49 PDT
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 {
Comment 5 Andrew Scheff 2011-07-26 20:17:43 PDT
http://hg.mozilla.org/projects/ionmonkey/rev/62f64f4e16ea

So that's what V means..
Comment 6 Andrew Scheff 2011-07-26 20:20:00 PDT
http://hg.mozilla.org/projects/ionmonkey/rev/62f64f4e16ea

So that's what V means..

Note You need to log in before you can comment on or make changes to this bug.