Skip to content

Commit 68f5a5f

Browse files
aardvark179eregon
authored andcommitted
Explicitly throw CompilerDirectives.shouldNotReachHere().
1 parent 3c01e67 commit 68f5a5f

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/main/java/org/truffleruby/core/kernel/TruffleKernelNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public static GetSpecialVariableStorage create() {
321321

322322
public void startSending(Reads variables, Reads frame) {
323323
if (variables == Reads.CALLER || frame == Reads.CALLER) {
324-
CompilerDirectives.shouldNotReachHere();
324+
throw CompilerDirectives.shouldNotReachHere();
325325
}
326326
if (frame == Reads.SELF) {
327327
replace(new ReadOwnFrameAndVariablesNode(), "Starting to read own frame and variables");

src/main/java/org/truffleruby/language/ReadOwnFrameAndVariablesNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public Object execute(Frame frame) {
2323

2424
public void startSending(Reads variables, Reads frame) {
2525
if (variables == Reads.CALLER || frame == Reads.CALLER) {
26-
CompilerDirectives.shouldNotReachHere();
26+
throw CompilerDirectives.shouldNotReachHere();
2727
}
2828
}
2929

src/main/java/org/truffleruby/language/ReadOwnFrameNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public Object execute(Frame frame) {
2020

2121
public void startSending(Reads variables, Reads frame) {
2222
if (variables == Reads.CALLER || frame == Reads.CALLER) {
23-
CompilerDirectives.shouldNotReachHere();
23+
throw CompilerDirectives.shouldNotReachHere();
2424
}
2525
if (variables == Reads.SELF) {
2626
replace(new ReadOwnFrameAndVariablesNode(), "Starting to read own frame and variables");

src/main/java/org/truffleruby/language/arguments/ReadCallerFrameAndVariablesNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected Object getDataFromFrame(MaterializedFrame frame) {
4545

4646
public void startSending(Reads variables, Reads frame) {
4747
if (variables == Reads.SELF || frame == Reads.SELF) {
48-
CompilerDirectives.shouldNotReachHere();
48+
throw CompilerDirectives.shouldNotReachHere();
4949
}
5050
}
5151

src/main/java/org/truffleruby/language/arguments/ReadCallerFrameNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected Object getDataFromFrame(MaterializedFrame frame) {
4343

4444
public void startSending(Reads variables, Reads frame) {
4545
if (variables == Reads.SELF || frame == Reads.SELF) {
46-
CompilerDirectives.shouldNotReachHere();
46+
throw CompilerDirectives.shouldNotReachHere();
4747
}
4848
if (variables == Reads.CALLER) {
4949
replace(new ReadCallerFrameAndVariablesNode(), "Starting to read caller frame and variables");

src/main/java/org/truffleruby/language/arguments/ReadCallerVariablesNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected Object getDataFromFrame(MaterializedFrame frame) {
4545

4646
public void startSending(Reads variables, Reads frame) {
4747
if (variables == Reads.SELF || frame == Reads.SELF) {
48-
CompilerDirectives.shouldNotReachHere();
48+
throw CompilerDirectives.shouldNotReachHere();
4949
}
5050
if (frame == Reads.CALLER) {
5151
replace(new ReadCallerFrameAndVariablesNode(), "Starting to read caller frame and variables");

0 commit comments

Comments
 (0)