we (web engine): Experimental web browser project to understand the limits of Claude

Implement JS built-in Math, Date, and JSON master

## Math - Not a constructor (static methods only) - Constants: E, LN2, LN10, LOG2E, LOG10E, PI, SQRT1_2, SQRT2 - Methods: abs, ceil, floor, round, trunc, max, min, pow, sqrt, cbrt, hypot, sin, cos, tan, asin, acos, atan, atan2, exp, log, log2, log10, expm1, log1p, sign, clz32, fround, random, imul ## Date - Constructor: Date(), Date(ms), Date(string), Date(y, m, d, h, min, s, ms) - Static: Date.now(), Date.parse(string), Date.UTC(...) - Getters: getFullYear, getMonth, getDate, getDay, getHours, getMinutes, getSeconds, getMilliseconds, getTime, getTimezoneOffset + UTC variants - Setters: setFullYear, setMonth, setDate, setHours, setMinutes, setSeconds, setMilliseconds, setTime - Formatting: toString, toISOString, toUTCString, toLocaleDateString, toJSON - valueOf returns milliseconds since epoch ## JSON - JSON.parse(text): full JSON tokenizer and recursive descent parser supporting objects, arrays, strings, numbers, booleans, null, and escape sequences including \uXXXX unicode escapes - JSON.stringify(value, replacer?, space?): recursive serialization with pretty-print support, circular reference detection (throws TypeError), handles NaN/Infinity as null, Date toJSON support ## VM Changes - Added date_prototype field to Vm - Added RuntimeError::syntax_error constructor - Made js_number_to_string pub(crate) for JSON.stringify 41 new tests (369 total JS tests, all passing) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>


+1849 -2
2 changed files