- Refactor `String` => `Rc<str>`
- Refactor `Symbol` => `Rc<Symbol>`
- Refactor `BigInt` => `RcBigInt`
- Changed function signature, from `&mut Value` to `&Value`
- Removed `Interpreter::value_to_rust_number()
- Abstracted `Gc<GcCell<Object>>` to `GcObject`
- Removed unnecessary `Box`s in global environment
- Extracted `extensible` from internal slots
- Made `to_primitive` throw errors
- Removed `strict` parameter in `SameValue` function.
- The `SameValue` function is not dependent on strict mode.
* added builtin globalThis
* forgot to initialize globalThis in the builtin mod.rs file
* changed to to match naming conventions and fixed issue with suggested edits to globalThis' initial value
* updated the test for the property as suggested
* remove From<JSONValue> for Value. Going from JSONValue to Value will soon need the interpreter
* pass interpreter to from_json
* move from_json to Value impl
* move to_json to Value impl alongside from_json
* add prototype to objects created from json
* consume the object and don't clone
* if it fits into i32, use integer; otherwise, use a rational
* WIP: throwing type error
* address most of the error cases
* cargo fmt
* address the rest of the error cases
* return null when JSONNumber::from_f64() returns None
* cargo fmt
* Update boa/src/builtins/value/mod.rs
* use JSONValue and use Result
* Update boa/src/builtins/json/mod.rs
Use and_then to avoid flatten
Co-authored-by: HalidOdat <halidodat@gmail.com>
Co-authored-by: Iban Eguia <razican@protonmail.ch>
Co-authored-by: HalidOdat <halidodat@gmail.com>
* Added documentation to make_builtin_fn
* Simple impl of parseInt()
* Impl rest of parse_int
* Fixed handling of strings starting 0x
* Made NaN return as per js spec
* Rework to improve clarity
* parseFloat impl, added tests
* Addressed comments to PR
* Removed f64 import
* Fixed handling of too many/few arguments to parseInt/Float
Co-authored-by: HalidOdat <halidodat@gmail.com>