Updates:
        Status: Accepted
        Labels: ES5

Comment #1 on issue 838 by [email protected]: Function [[Call]] should return Reference Type
http://code.google.com/p/v8/issues/detail?id=838

This is correct. While V8 never has a function return a Reference, it would be against the spirit of ES5 section 16 to consider this an early error (unlike, e.g., the assignment "3=4").

The spec isn't entirely clear, due to the wording of the last case where Early Errors are required: "Attempts to call PutValue on any value for which an early determination can be made that the value is not a Reference (for example, executing the assignment statement 3=4)." V8 can actually determine early that a function call isn't a Reference, because it never is in V8, but that seems counter to the intended meaning when reading the following sentence: "An implementation shall not treat other kinds of errors as early errors even if the compiler can prove that a construct cannot execute without error under any circumstances.".


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to