Haled Odat
Haled Odat
This Pull Request fixes/closes #1373 This PR implements `JsValue` NaN boxing It is a work in progress, and requires a lot more changes.
It would be nice for the nodes to have a `Span` for better error messages. A `Span` would contain a `start` `Position` and `end` `Position`.
**What is the problem with the current implementation?** The problem is that we treat `Value` as an `Object` which is not always the case. for example `Value` has a `.set_field()`...
Currently `Node` is both a expression, statement and declaration. It would be better if `Node` was split into how the spec describes it `Expression`, `Statement` and also `Declaration`. Why do...
Currently we have the `Attribute` which by default is `READONLY`, `NON_ENUMERABLE` and `PERMANENT`. Which means when we create a for example a data descriptor with only `Attribute::READONLY` (`DataDescriptor::new(value, Attribute::READONLY)`), One...
Currently a JavaScript value in Boa is defined as a fat enum. With NaN boxing we can reduce this to `8` bytes having all the variants of a JS value...
## Console methods - [x] assert() - [x] clear() - [x] count() - [x] countReset() - [x] debug() - [x] dir() - [x] dirxml() - [x] error() - [x] exception()...
Because JavaScript describes so many objects creating them on every `Context` creation takes some time. But with snapshots we only do it once then we serialize them into a snapshot...
The fuzzer would generate tests with fuzzed input and we would check what is the expected behaviour
This PR is a WIP implementation of control flow graph construction from bytecode, that will be used for many optimizations, like dead-code-elimination. #### TODO - [ ] Add instruction information...