bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

OdinMonkey accepts over-parenthesized return statement, which is disallowed by spec

RESOLVED INVALID

Status

()

Core
JavaScript Engine
RESOLVED INVALID
5 years ago
5 years ago

People

(Reporter: Jesse Ruderman, Unassigned)

Tracking

({testcase})

Trunk
x86_64
Mac OS X
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
js> (function() { "use asm"; function f(i) { i=i|0; return (i|0); } return f; })
warning: successfully compiled asm.js code
function () {
    [native code]
}

http://asmjs.org/spec/latest/#return-type-annotations requires the entire return statement to have the form "return ...|0;".

Not sure if OdinMonkey or spec should be changed.
The intention (which doesn't seem to appear in the spec, probably we should add that) is that parens are ignored for the purposes of asm.js type checking.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.