Skip to content

Commit 6ab9956

Browse files
committed
[GR-45043] Cleanup after migrating to Prism. Part 2
PullRequest: truffleruby/4153
2 parents dd0c59d + 72b109d commit 6ab9956

27 files changed

+321
-337
lines changed

doc/user/compatibility.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ The JVM enforces a maximum array size of 2<sup>31</sup>-1 (by storing the size i
121121
That is, Strings must be smaller than 2GB. This is the same restriction as JRuby.
122122
A possible workaround could be to use natively-allocated strings, but it would be a large effort to support every Ruby String operation on native strings.
123123

124+
### Strings in UTF-16 and UTF-32 encoding
125+
126+
TruffleRuby does not support UTF-16 strings with an odd number of bytes (in native endianness). Similarly, with UTF-32 it needs to be a multiple of 4. This is necessary for optimizations, compression, invariants, etc.
127+
124128
### Threads detect interrupts at different points
125129

126130
TruffleRuby threads may detect that they have been interrupted at different points in the program compared to where they would on MRI.

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_else_branch.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ ast: |
9595
attributes:
9696
flags = 0
9797
frameSlot = 2 # %case_0
98-
sourceCharIndex = 0
99-
sourceLength = 89
98+
sourceCharIndex = -1
99+
sourceLength = 0
100100
type = FRAME_LOCAL
101101
elseBody =
102102
IfElseNodeGen
@@ -127,8 +127,8 @@ ast: |
127127
attributes:
128128
flags = 0
129129
frameSlot = 2 # %case_0
130-
sourceCharIndex = 0
131-
sourceLength = 89
130+
sourceCharIndex = -1
131+
sourceLength = 0
132132
type = FRAME_LOCAL
133133
elseBody =
134134
StringLiteralNode

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_multiple_values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ ast: |
9595
attributes:
9696
flags = 0
9797
frameSlot = 2 # %case_0
98-
sourceCharIndex = 0
99-
sourceLength = 39
98+
sourceCharIndex = -1
99+
sourceLength = 0
100100
type = FRAME_LOCAL
101101
right =
102102
InlinedCaseEqualNodeGen
@@ -120,8 +120,8 @@ ast: |
120120
attributes:
121121
flags = 0
122122
frameSlot = 2 # %case_0
123-
sourceCharIndex = 0
124-
sourceLength = 39
123+
sourceCharIndex = -1
124+
sourceLength = 0
125125
type = FRAME_LOCAL
126126
elseBody =
127127
NilLiteralNode

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_single_value.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ ast: |
9494
attributes:
9595
flags = 0
9696
frameSlot = 2 # %case_0
97-
sourceCharIndex = 0
98-
sourceLength = 74
97+
sourceCharIndex = -1
98+
sourceLength = 0
9999
type = FRAME_LOCAL
100100
elseBody =
101101
IfElseNodeGen
@@ -126,8 +126,8 @@ ast: |
126126
attributes:
127127
flags = 0
128128
frameSlot = 2 # %case_0
129-
sourceCharIndex = 0
130-
sourceLength = 74
129+
sourceCharIndex = -1
130+
sourceLength = 0
131131
type = FRAME_LOCAL
132132
elseBody =
133133
NilLiteralNode

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_splat_operator.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ ast: |
7171
attributes:
7272
flags = 0
7373
frameSlot = 2 # %case_0
74-
sourceCharIndex = 0
75-
sourceLength = 28
74+
sourceCharIndex = -1
75+
sourceLength = 0
7676
type = FRAME_LOCAL
7777
]
7878
receiver =

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_splat_operator_and_following_element.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ ast: |
9494
attributes:
9595
flags = 0
9696
frameSlot = 2 # %case_0
97-
sourceCharIndex = 0
98-
sourceLength = 32
97+
sourceCharIndex = -1
98+
sourceLength = 0
9999
type = FRAME_LOCAL
100100
]
101101
receiver =

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_splat_operator_and_following_elements.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ ast: |
100100
attributes:
101101
flags = 0
102102
frameSlot = 2 # %case_0
103-
sourceCharIndex = 0
104-
sourceLength = 40
103+
sourceCharIndex = -1
104+
sourceLength = 0
105105
type = FRAME_LOCAL
106106
]
107107
receiver =

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_splat_operator_and_preceding_and_following_element.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ ast: |
109109
attributes:
110110
flags = 0
111111
frameSlot = 2 # %case_0
112-
sourceCharIndex = 0
113-
sourceLength = 40
112+
sourceCharIndex = -1
113+
sourceLength = 0
114114
type = FRAME_LOCAL
115115
]
116116
receiver =

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_splat_operator_and_preceding_and_following_elements.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ ast: |
123123
attributes:
124124
flags = 0
125125
frameSlot = 2 # %case_0
126-
sourceCharIndex = 0
127-
sourceLength = 54
126+
sourceCharIndex = -1
127+
sourceLength = 0
128128
type = FRAME_LOCAL
129129
]
130130
receiver =

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_splat_operator_and_preceding_element.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ ast: |
9494
attributes:
9595
flags = 0
9696
frameSlot = 2 # %case_0
97-
sourceCharIndex = 0
98-
sourceLength = 32
97+
sourceCharIndex = -1
98+
sourceLength = 0
9999
type = FRAME_LOCAL
100100
]
101101
receiver =

0 commit comments

Comments
 (0)