Closed Bug 1106947 Opened 10 years ago Closed 10 years ago

Make CodeGenerator visit() methods infallible

Categories

(Core :: JavaScript Engine: JIT, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: bhackett1024, Assigned: bhackett1024)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch patch (deleted) — Splinter Review
The visit() methods, which are the main way Ion generates code, can only fail on OOM. In such cases the OOM can be more cleanly indicated within the macro assembler. The attached patch makes the visit methods infallible in this fashion, along with many other CodeGenerator methods called by the visit methods. 35 files changed, 2528 insertions(+), 3469 deletions(-)
Attachment #8531399 - Flags: review?(jdemooij)
Comment on attachment 8531399 [details] [diff] [review] patch Review of attachment 8531399 [details] [diff] [review]: ----------------------------------------------------------------- Seems reasonable, it's similar to what we're already doing in the MacroAssembler. ::: js/src/jit/CodeGenerator.cpp @@ -867,5 @@ > > OutOfLineCode *ool = oolCallVM(IntToStringInfo, lir, (ArgList(), input), > StoreRegisterTo(output)); > - if (!ool) > - return false; The OutOfLineCode allocation is infallible so we shouldn't get a nullptr ool right?
Attachment #8531399 - Flags: review?(jdemooij) → review+
(In reply to Jan de Mooij [:jandem] from comment #1) > The OutOfLineCode allocation is infallible so we shouldn't get a nullptr ool > right? Yes, the code was already assuming that OutOfLineCode allocations were infallible, and the only way this function could fail earlier was if we failed to append to some vector.
Assignee: nobody → bhackett1024
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: