Closed Bug 1201460 Opened 9 years ago Closed 9 years ago

Disallow asm.js compilation for classes/methods

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox43 --- affected
firefox44 --- fixed

People

(Reporter: anba, Assigned: bbouvier)

References

Details

Attachments

(1 file)

Test case 1:
---
var c = class { constructor(stdlib, foreign, heap) { "use asm"; return {}; } };
c();
---

Expected: Throws TypeError
Actual: No TypeError



Test case 2:
---
var obj = ({m(stdlib, foreign, heap) { "use asm"; return {}; }});
new obj.m;
---

Expected: Throws TypeError
Actual: No TypeError
This blocks compilation when establishing preconditions. An alternative would be to allow compiling asm.js methods and checking in LinkAsmJS, but so far we've kept it simple and disallowed compilation for generators and arrow functions. So let's keep it that way.
Assignee: nobody → benj
Status: NEW → ASSIGNED
Attachment #8674813 - Flags: review?(luke)
Attachment #8674813 - Flags: review?(luke) → review+
https://hg.mozilla.org/mozilla-central/rev/670b49ddf4e5
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: