mirror of
https://github.com/RGBCube/serenity
synced 2026-01-17 17:30:59 +00:00
Now that Array.prototype.join() is producing the correct results we can remove the separate code path for arrays in Value::to_number() and treat them like all other objects - using to_primitive() with number as the preferred type and then calling to_number() on the result. This is how the spec descibes it. This also means we don't crash anymore when trying to coerce [<empty>] to a number - it now does the following: [<empty>] - to string - "" - to number - 0 [<empty>, <empty>] - to string - "," - to number - NaN |
||
|---|---|---|
| .. | ||
| Heap | ||
| Runtime | ||
| Tests | ||
| AST.cpp | ||
| AST.h | ||
| Forward.h | ||
| Interpreter.cpp | ||
| Interpreter.h | ||
| Lexer.cpp | ||
| Lexer.h | ||
| Makefile | ||
| Parser.cpp | ||
| Parser.h | ||
| Token.cpp | ||
| Token.h | ||