Fixed-width strings: Difference between revisions

m
Line 57: Line 57:
=== SpiderMonkey compatibility ===
=== SpiderMonkey compatibility ===


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 string created with a finalizer ID, which is a 32-bit integer. Finalizers for this type are registered and deregistered.
* 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).


* How do 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 write).
* 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).


* What about growable strings? They are contradictory to the immutability of Tamarin strings. They could be implemented, but there should be some safety measure so they cannot be passed in to the engine.
* What about growable strings? They are contradictory to the immutability of Tamarin strings. They could be implemented, but there should be some safety measure so they cannot be passed in to the engine.
55

edits