Fixed-width strings: Difference between revisions

Jump to navigation Jump to search
m
Line 61: Line 61:
''This is just the start of this section...''
''This is just the start of this section...''


* Do we need to support external strings and their finalizers? External strings are strings created with a finalizer ID, which is a 32-bit integer. Finalizers for this type are registered and deregistered. The additional ID would fit into the maximum of 16 bytes for string instance data (assuming 4-byte pointers).
* Do we need to support external strings and their finalizers? External strings are strings created with a finalizer index, which is a 32-bit integer. Finalizers for this type are registered and deregistered. The additional index could fit into the maximum of 16 bytes for string instance data (assuming 4-byte pointers), but since the index is returned by JS_AddExternalStringFinalizer(), the implementation could be limited to, say, 8 bits, giving a maximum of 255 indexes (one index needs to be reserved for the default, built-in finalizer).


* How would JS_GetStringChars() and JS_GetStringBytes() work? Would they force a narrowing of the string? In that case, the corresponding method is needed (which would not be difficult to add).
* How would JS_GetStringChars() and JS_GetStringBytes() work? Would they force a narrowing of the string? In that case, the corresponding method is needed (which would not be difficult to add).
55

edits

Navigation menu