Last Comment Bug 720925 - IonMonkey: Add Object comparison
: IonMonkey: Add Object comparison
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: David Anderson [:dvander]
:
Mentors:
Depends on:
Blocks: 684381
  Show dependency treegraph
 
Reported: 2012-01-24 19:02 PST by David Anderson [:dvander]
Modified: 2012-01-26 11:00 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (13.99 KB, patch)
2012-01-25 10:57 PST, David Anderson [:dvander]
no flags Details | Diff | Review
actual patch (13.95 KB, patch)
2012-01-25 11:00 PST, David Anderson [:dvander]
sstangl: review+
Details | Diff | Review

Description David Anderson [:dvander] 2012-01-24 19:02:32 PST
This is needed to run kraken-ai-astar.
Comment 1 David Anderson [:dvander] 2012-01-25 10:57:24 PST
Created attachment 591546 [details] [diff] [review]
patch
Comment 2 David Anderson [:dvander] 2012-01-25 11:00:05 PST
Created attachment 591548 [details] [diff] [review]
actual patch
Comment 3 Sean Stangl [:sstangl] 2012-01-25 11:13:18 PST
Comment on attachment 591548 [details] [diff] [review]
actual patch

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

::: js/src/ion/LIR-Common.h
@@ +385,1 @@
>  class LCompareI : public LInstructionHelper<1, 2, 0>

Keeping the I suffix seems misleading. LCompareIO? LCompareIvO (the "v" being "or")? Same with LCompareIAndBranch.

::: js/src/ion/Lowering.cpp
@@ +223,5 @@
>          MCompare *comp = opd->toCompare();
>          MDefinition *left = comp->getOperand(0);
>          MDefinition *right = comp->getOperand(1);
>  
> +        if (comp->specialization() == MIRType_Int32|| comp->specialization() == MIRType_Object) {

nit: space between MIRType_Int32 and ||.

::: js/src/ion/TypePolicy.h
@@ +118,5 @@
>  
>    public:
> +    ComparePolicy() : specialization_(MIRType_None)
> +    {
> +    }

nit:
ComparePolicy()
  : specialization_(MIRType_None)
{ }

::: js/src/ion/shared/CodeGenerator-x86-shared.cpp
@@ +226,5 @@
>      }
>  }
>  
> +void
> +CodeGeneratorX86Shared::emitCompare(MIRType type, const LAllocation *left, const LAllocation *right)

emitCompareIvO?

@@ +227,5 @@
>  }
>  
> +void
> +CodeGeneratorX86Shared::emitCompare(MIRType type, const LAllocation *left, const LAllocation *right)
> +{

JS_ASSERT(type == MIRType_Object || type == MIRType_Int32);
Comment 4 David Anderson [:dvander] 2012-01-25 15:38:08 PST
http://hg.mozilla.org/projects/ionmonkey/rev/b2a4c499d052
Comment 5 Guilherme Lima 2012-01-26 03:11:50 PST
It's a bug or this patch really made IM 5.4x times faster than JM+TI? (looking at awfy)
Comment 6 Guilherme Lima 2012-01-26 03:12:51 PST
On 652377 testcase.
Comment 7 Sean Stangl [:sstangl] 2012-01-26 10:35:27 PST
(In reply to Guilherme Lima from comment #5)
> It's a bug or this patch really made IM 5.4x times faster than JM+TI?
> (looking at awfy)

It's a bug: debug builds trip an assert.
Comment 8 David Anderson [:dvander] 2012-01-26 11:00:21 PST
It's also unrelated to this patch (awfy only tests on the hour) - bug 721272 fixed a typo that caused more paths to compile, exposing more bugs.

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