Closed
Bug 781052
Opened 12 years ago
Closed 4 years ago
IonMonkey: Impossible type in TypeSet in tight 3d-raytrace loop.
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: sstangl, Unassigned)
References
Details
(Whiteboard: [ion:p2])
In SS-1.0's 3d-raytrace, Scene.prototype.intersect() begins with the following loop:
> var closest = null;
> for (i = 0; i < this.triangles.length; i++) {
> var triangle = this.triangles[i];
> var d = triangle.intersect(origin, dir, near, far);
> if (d == null || d > far || d < near)
> continue;
> far = d;
> closest = triangle;
> }
The comparisons are currently emitted as, respectively: LIsNullOrUndefined, LCompareV, and LCompareV.
At the first LCompareV, the TypeSets contain the following:
> lhs: Double, Int32, Null
> rhs: Double, Int32, Null, Undefined
However, it is impossible for |d|, |far|, or |near| to ever be Null at those locations. This prevents us from lowering the MCompare as LCompareD, which would be significantly faster.
Updated•12 years ago
|
Whiteboard: [ion:p2]
Comment 1•12 years ago
|
||
Bug 824257 added some stuff for eliminating type barriers when they are only filtering out an impossible null/undefined value. I don't know how much of that logic can be reused here but the problems are similar.
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Comment 2•4 years ago
|
||
TypeSets no longer exist.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•