Closed
Bug 643733
Opened 15 years ago
Closed 15 years ago
TI+JM: Assertion failure: Call site vanished., at ../methodjit/Compiler.cpp:2443
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(2 files, 2 obsolete files)
|
1.31 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
|
1.01 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
var x;
-(typeof (x+x))
OR
-(typeof Math.abs())
The problem is that we call a stub for JSOP_NEG, then we recompile and this time typeof pushes a constant string and JSOP_NEG does constant folding.
The easiest fix is probably to make JSOP_NEG only constant fold numbers.
| Assignee | ||
Updated•15 years ago
|
Assignee: general → jandemooij
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•15 years ago
|
||
Attachment #520916 -
Flags: review?(bhackett1024)
| Assignee | ||
Comment 2•15 years ago
|
||
Comment on attachment 520916 [details] [diff] [review]
Patch
Hm not sure if this is entirely correct, will check some other things first.
Attachment #520916 -
Flags: review?(bhackett1024)
| Assignee | ||
Comment 3•15 years ago
|
||
Another option is to add some constraint to jsop_typeofexpr to recompile after Math.abs(), but I'm not sure if we need it.
Comment 4•15 years ago
|
||
I think the problem is in jsop_typeof. To allow constant propagation/folding to happen when recompiling without having to worry about emitting rejoin paths, the constants in the recompiled code should be a subset of those in the original code (we used to want them to be strictly equal, but that has been relaxed). However, in the recompiled code the fe's known types may be better or worse than in the original code, so the compiler should not rely only on the known types of entries to do constant folding. jsop_typeof could instead alloc a register and move the string value into it, pushing a known string but not a constant.
| Assignee | ||
Comment 5•15 years ago
|
||
This makes more sense indeed.
Attachment #520916 -
Attachment is obsolete: true
Attachment #520991 -
Flags: review?(bhackett1024)
Updated•15 years ago
|
Attachment #520991 -
Flags: review?(bhackett1024) → review+
Comment 6•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 7•15 years ago
|
||
According to AWFY this might have regressed v8-crypto, which uses typeof in several places (though not I think on terribly hot paths).
| Assignee | ||
Comment 8•15 years ago
|
||
(In reply to comment #7)
> According to AWFY this might have regressed v8-crypto, which uses typeof in
> several places (though not I think on terribly hot paths).
Reverting the patch does not affect performance much using the SS-harness or v8-v6 from the V8 repository. I can't reproduce the v8-crypto regression at all at revision af6d3ea1e6e7 using opt32 build with -m -n, can you reproduce it locally?
Comment 9•15 years ago
|
||
Hmm, thanks for looking. I haven't tried to repro, but unless an obvious issue presents itself we can just let this sit until I start on LICM (after scripted call inlining is done), that will be focusing on v8-crypto and kraken.
| Assignee | ||
Comment 10•15 years ago
|
||
It should be safe now to push a constant value in jsop_typeof. Most of the other bugs like this are not perf-critical but I'd like to have this back for jsop_typeof. Especially with TI enabled this allows us to better optimize some typeof expressions.
Attachment #527278 -
Flags: review?(bhackett1024)
| Assignee | ||
Comment 11•15 years ago
|
||
Attachment #527278 -
Attachment is obsolete: true
Attachment #527278 -
Flags: review?(bhackett1024)
Attachment #527279 -
Flags: review?(bhackett1024)
| Assignee | ||
Updated•15 years ago
|
Attachment #527279 -
Attachment mime type: application/octet-stream → text/plain
| Assignee | ||
Updated•15 years ago
|
Attachment #527279 -
Attachment is patch: true
Updated•15 years ago
|
Attachment #527279 -
Flags: review?(bhackett1024) → review+
Comment 12•14 days ago
|
||
Pushed by clegnitto@mozilla.com:
https://hg.mozilla.org/releases/mozilla-release/rev/eab484f82ca4
[INFER] Push constant value in jsop_typeof, bug 643733. r=bhackett
You need to log in
before you can comment on or make changes to this bug.
Description
•