Repository navigation
Conversation
A String's + (xString.invokeAdd) makes its operand's text with Utils.callToString(), which builds it natively only when the type's toString() is native. For Int8 to UInt64, Nibble, Char and String it was not, so every join ran Ecstasy code: Stringable's toString(), which makes a StringBuffer and has appendTo() write the digits, one call per digit, or String's `toString() = this`. A loop of 200,000 iterations that joins five values, an Int, a Char, a String and a UInt8, took about 16.3 seconds a round; it now takes 0.14 to 0.3. - xConstrainedInteger, the template of Int8 to UInt64 and Nibble, marks toString() native and builds it as decimal, unsigned for the unsigned types; xNibble builds its digit, as its toChar() makes it. xChar builds the one char that a Char[] holds for the Char, and xString answers the String itself. - ClassTemplate.markNativeMethod() found no toString() to mark for these classes: a const class implements Const, and through it Stringable, with no contribution that findMethodDeep() follows, so it reported "Missing method" and left the Ecstasy code in place. It now also looks through Const for a const class, and makes its native override as for any other inherited method. Tests: the new ToStringTest runs a module, in a JVM of its own so that its runtime does not stay in the test JVM, that checks for each value that toString(), "" + the value, and its own appendTo() all give the expected text: the bounds of Int8 to Int64 and UInt8 to UInt64, 0 and -7, Nibble 0, 9, A and F, 'a', U+00E9, "text" and "", and, for a Char beyond the Basic Multilingual Plane, what its appendTo() writes. The test also fails if a toString() could not be marked: without the ClassTemplate change it fails, with "Missing method" for all ten types. Before the change, the module's checks pass as well, since the text must not change. Validation: ToStringTest passes, and fails without the ClassTemplate change as above. The timing above is of that loop, three rounds on each of master's and this build, run with the launcher; the joined text's size is the same on both, 4,802,906. After xdk:installDist, check passes, with the Ecstasy libraries' tests: lib_json's JsonTest passes 175 and lib_metrics' MetricsTest 4; :javatools:test passes 457 tests, the 42 existing skips; spotlessCheck passes. Problems found and fixed: - markNativeMethod() could not mark a method that a const class gets from Const, as above. - Found while testing, not fixed here: `new Nibble(Bit[])` makes 0 for every value on master, so Nibble's table, and with it Nibble.of() and IntLiteral.toNibble(), does too: xConstrainedInteger.constructFromBits() packs the bits into the high bits of a byte, and Nibble's mask then drops them. The test makes its Nibbles from an Int64. Limits: Int128, UInt128, IntN and UIntN, the floating-point and decimal types, and Boolean keep their toString(). A Char beyond the Basic Multilingual Plane still reads as the one char a Char[] holds for it, as before. A $"..." template appends with appendTo(), which is not changed.
lagergren
added a commit
that referenced
this pull request
Oct 23, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
The checks of ToStringTest move into testToString() in TestNumbers, which CI runs with the other manual tests (runCiTestTasks): for each value, its toString(), "" + the value, and its own appendTo() are the expected text, with plain asserts like the rest of numbers.x, instead of a JUnit test that compiled and ran a module in a JVM of its own. Validation: TestNumbers through manualTests:runOne passes, and its output has no "Missing method"; with master's five runtime files in place of this branch's it passes as well, as it must, since the text does not change. :javatools:test passes 456 tests, the 42 existing skips; spotlessCheck passes. Limits: an assert cannot tell a native toString() from the Ecstasy one it replaces, so a toString() that could not be marked native passes; the run then prints "Missing method" for it. The checks run where manualTests runs, in CI or with -PincludeBuildManualTests=true -PincludeBuildAttachManualTests=true.
ggleyzer
reviewed
Oct 24, 2026
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
xConstrainedInteger, the native template of the fixed-width integers,
handled a Nibble's 4 bits as if they filled a byte:
- constructFromBits() read the bits as the bytes they are packed in,
from the most significant bit down, so a Nibble's bits were the high
half of a byte: [1, 0, 0, 1] read as 0x90, and Nibble's mask then left
0. Nibble makes its table of values that way, so Nibble.of(Int),
Nibble.of(Char), IntLiteral.toNibble() and Char.isNibble() all gave 0,
for every value. It now shifts out the unused low bits.
- The bits property made a byte array of f_cNumBits / 8 bytes, none for
a Nibble, and failed with an IllegalStateException. It now puts the
value in the high bits of its byte, as constructFromBits() reads them.
- constructFromString(), which answers Nibble(String), checked the value
by its size in whole bytes, so every Nibble overflowed. A value
narrower than a byte is now checked against its range.
Tests: the new NibbleTest runs a module, in a JVM of its own so that its
runtime does not stay in the test JVM, that checks a Nibble made from
its bits, Nibble.of() of 0 to F as numbers and as hexits,
0xA.toNibble(), 'c'.isNibble(), new Nibble("7"), that "16" overflows,
and Nibble.of(0xC).bits and back.
Validation: on master, the module ends with "OutOfBounds:
numbers.Nibble overflow" at new Nibble("7"), and before that the table
gives 0 for all sixteen values; with the fix, NibbleTest passes. After
xdk:installDist, check passes, with the Ecstasy libraries' tests:
lib_json's JsonTest passes 175 and lib_metrics' MetricsTest 4;
:javatools:test passes 457 tests, the 42 existing skips; spotlessCheck
passes.
Problems found and fixed:
- Found while testing native toString() (#722), whose test makes its
Nibbles from an Int64 because of this.
Limits: Nibble(Byte[]) still fails: Nibble's own constructor asserts one
byte, and Number's makes 8 bits of it, which Nibble's bits constructor
refuses; that is the library's to settle. Nothing else in the template
assumes a whole number of bytes.
Contributor
Author
|
Agreed: the interpreter keeps its natural code, and speed is the JIT's job. Closing. One thing it found that is independent of |
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
xConstrainedInteger, the native template of the fixed-width integers,
handled a Nibble's 4 bits as if they filled a byte:
- constructFromBits() read the bits as the bytes they are packed in,
from the most significant bit down, so a Nibble's bits were the high
half of a byte: [1, 0, 0, 1] read as 0x90, and Nibble's mask then left
0. Nibble makes its table of values that way, so Nibble.of(Int),
Nibble.of(Char), IntLiteral.toNibble() and Char.isNibble() all gave 0,
for every value. It now shifts out the unused low bits.
- The bits property made a byte array of f_cNumBits / 8 bytes, none for
a Nibble, and failed with an IllegalStateException. It now puts the
value in the high bits of its byte, as constructFromBits() reads them.
- constructFromString(), which answers Nibble(String), checked the value
by its size in whole bytes, so every Nibble overflowed. A value
narrower than a byte is now checked against its range.
Tests: the new NibbleTest runs a module, in a JVM of its own so that its
runtime does not stay in the test JVM, that checks a Nibble made from
its bits, Nibble.of() of 0 to F as numbers and as hexits,
0xA.toNibble(), 'c'.isNibble(), new Nibble("7"), that "16" overflows,
and Nibble.of(0xC).bits and back.
Validation: on master, the module ends with "OutOfBounds:
numbers.Nibble overflow" at new Nibble("7"), and before that the table
gives 0 for all sixteen values; with the fix, NibbleTest passes. After
xdk:installDist, check passes, with the Ecstasy libraries' tests:
lib_json's JsonTest passes 175 and lib_metrics' MetricsTest 4;
:javatools:test passes 457 tests, the 42 existing skips; spotlessCheck
passes.
Problems found and fixed:
- Found while testing native toString() (#722), whose test makes its
Nibbles from an Int64 because of this.
Limits: Nibble(Byte[]) still fails: Nibble's own constructor asserts one
byte, and Number's makes 8 bits of it, which Nibble's bits constructor
refuses; that is the library's to settle. Nothing else in the template
assumes a whole number of bytes.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 27, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Oct 27, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 28, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Oct 28, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 28, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Oct 28, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 2, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 2, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 4, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 4, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 5, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 5, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 9, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 9, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 11, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 11, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 22, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 22, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 25, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 25, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 25, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 25, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 25, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 25, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 26, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 26, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 26, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 26, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 27, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 27, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 28, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 28, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every
String+of an integer, aCharor aStringruns Ecstasy code to make the operand's text. For an integer, that means aStringBufferand one call per digit. A loop of 200,000 iterations that joins five values (anInt, aChar, aStringand aUInt8) takes about 16.3 seconds a round on master; with this change it takes 0.14 to 0.3 seconds.Root cause
xString.invokeAddmakes its operand's text withUtils.callToString(), which builds it natively only when the type'stoString()is native. ForInt8toUInt64,Nibble,CharandStringit isn't, so it runsStringable'stoString(), orString'stoString() = this.Marking them native wasn't enough on its own.
ClassTemplate.markNativeMethod()doesn't find atoString()for these classes, because a const class getsConst, and through itStringable, with no contribution thatfindMethodDeep()follows. It reports "Missing method" and leaves the Ecstasy code in place.Change
xConstrainedInteger, the template ofInt8toUInt64andNibble, markstoString()native and builds it as decimal, unsigned for the unsigned types.xNibblebuilds its digit, as itstoChar()does.xCharbuilds the one char that aChar[]holds for theChar, andxStringanswers theStringitself.markNativeMethod()also looks throughConstfor a const class, and makes the native override as it does for any other inherited method.Validation
testToString()inmanualTests'numbers.x, which CI runs with the other manual tests. For each value it asserts thattoString(),"" + valueand the value's ownappendTo()all give the expected text:Int8toInt64andUInt8toUInt64, plus0and-7;Nibble0,9,AandF;'a',U+00E9,"text"and"";Charbeyond the Basic Multilingual Plane, what itsappendTo()writes.toString()from the Ecstasy one, so atoString()that failed to be marked native would show only as "Missing method" in the run's output; the run here has none. Without themarkNativeMethod()change, all ten types print it.xdk:installDist:checkpasses, including the Ecstasy library tests (lib_json'sJsonTest175,lib_metrics'MetricsTest4);:javatools:testpasses 456 tests, the 42 existing skips;TestNumberspasses throughmanualTests:runOne;spotlessCheckpasses.Limits
Int128,UInt128,IntN,UIntN, the floating-point and decimal types, andBooleankeep theirtoString().Charbeyond the Basic Multilingual Plane still reads as the one char that aChar[]holds for it, as before.$"..."template appends withappendTo(), which isn't changed.Nibblemade from its bits is0, and so is everything made throughNibble's value table, such asNibble.of(). The test here makes itsNibbles from anInt64, so that it doesn't depend on Give a Nibble the value of its four bits #723.