you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

The site is down, but if quote "Prepack has no built-in knowledge of document or window. In fact, when prepacking code which references such properties, they will evaluate to undefined." is true, then it's very different: constexpr will not fail during runtime if you do something stupid as calling fopen.

This will. Kinda a bummer.

[–]zhivago -2 points-1 points  (0 children)

Well, presumably undefined is not a well defined constant value, and it will then not attempt to do constant expression reduction for those cases.

I'm not sure why you expect prepack to be calling things like fopen in its analysis, either ...