Unify internal property creation (#4373)

Furthermore free up a bit in the property descriptor.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-01-12 13:12:44 +01:00
committed by GitHub
parent 4399744588
commit 6f0391dd66
20 changed files with 344 additions and 392 deletions
+2 -1
View File
@@ -284,7 +284,8 @@ The objects are represented as following structure:
![Object properties](img/ecma_object_property.png)
Objects have a linked list that contains their properties. This list actually contains property pairs, in order to save memory described in the followings:
A property is 7 bit long and its type field is 2 bit long which consumes 9 bit which does not fit into 1 byte but consumes 2 bytes. Hence, placing together two properties (14 bit) with the 2 bit long type field fits into 2 bytes.
A property has a one byte long descriptor, a two byte long name and four byte long value. Hence 14 bytes consumed by a property pair. Another two bytes is
used to show the next property pair, so the total size (16 byte) is divisible by 8.
#### Property Hashmap