Closed Bug 1584133 Opened 5 years ago Closed 5 years ago

Stop maintaining zero-termination of JSString

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1330776

People

(Reporter: hsivonen, Unassigned)

Details

SpiderMonkey requires strings to be zero-terminated:
https://searchfox.org/mozilla-central/source/js/src/vm/StringType-inl.h#269

Previously, I've heard from a SpiderMonkey dev (I forget who) that they thought this was already removed and bz said the requirement has been removed for external strings.

It seems bad to optimize for passing strings to C string APIs instead of optimizing for avoiding the complexity of the maintaining the zero terminator.

(In reply to Henri Sivonen (:hsivonen) from comment #0)

Previously, I've heard from a SpiderMonkey dev (I forget who) that they thought this was already removed

It still has to happen. This is bug 1330776.

bz said the requirement has been removed for external strings.

True, external strings are not flat.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.