| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
The point of the single union is that it is not possible to use multiple variables of a union for data storage (and overwriting each other). While this patch improves readability, people may accidentally think that arraybuffer / typedarray are different things and may use both. Anyway I am neutral for this change, but wanted to add some notes about the original purpose. |
Sorry, something went wrong.
|
Btw, am I see correctly that it increases the structure total size? |
Sorry, something went wrong.
OK, let's me use static_assert to ensure that, |
Sorry, something went wrong.
may use both. Anyway I am neutral for this change, but wanted to add some notes about the original purpose. |
Sorry, something went wrong.
As far as I see now we have a cls and clz unions, and they are independent members of the parent structure. This is why I worry about the structure size. |
Sorry, something went wrong.
Is this the right direction, I can convert all the reamaing to separate class, then I can merge cls and clz |
Sorry, something went wrong.
Your concern addressed, ecma_object_cls_general are used for access general(boolean,string,number,bigint,symbol) object, ecma_object_cls_general have ASSERT to ensure there is no mis-access |
Sorry, something went wrong.
…iltin object class Currently all builtin class are sharing same union u1 u2 u3 in ecma_extended_object_t::cls::, that's complicated the things Now we split general object class into ecma_object_cls_general_t and can only access with ecma_object_cls_general, for others split it into separate struct, so when new builtin object class, bug-fixing, feature improving will be easier. JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
|
@zherczeg all your concern addressed, please take a look again |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Currently all builtin class are sharing same union u1 u2 u3 in ecma_extended_object_t::cls::, that's complicated the things
Now we split general object class into ecma_object_cls_general_t and can only access with ecma_object_cls_general,
for others split it into separate struct, so when new builtin object class, bug-fixing, feature improving will
be easier.
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com