Skip to content

Commit 3163bbd

Browse files
committed
Convert ExtractRubyTagHelperNode to DSL inlinable
1 parent e14b04e commit 3163bbd

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/main/java/org/truffleruby/cext/CExtNodes.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,56 +1540,58 @@ public abstract static class ExtractRubyTag extends CoreMethodArrayArgumentsNode
15401540
@Specialization
15411541
protected int extractRubyTag(CapturedException captured,
15421542
@Cached ExtractRubyTagHelperNode helperNode) {
1543-
return helperNode.execute(captured.getException());
1543+
return helperNode.execute(this, captured.getException());
15441544
}
15451545
}
15461546

1547+
@GenerateInline
1548+
@GenerateCached(false)
15471549
public abstract static class ExtractRubyTagHelperNode extends RubyBaseNode {
15481550

1549-
public abstract int execute(Throwable e);
1551+
public abstract int execute(Node node, Throwable e);
15501552

15511553
@Specialization
1552-
protected int dynamicReturnTag(DynamicReturnException e) {
1554+
protected static int dynamicReturnTag(DynamicReturnException e) {
15531555
return RUBY_TAG_RETURN;
15541556
}
15551557

15561558
@Specialization
1557-
protected int localReturnTag(LocalReturnException e) {
1559+
protected static int localReturnTag(LocalReturnException e) {
15581560
return RUBY_TAG_RETURN;
15591561
}
15601562

15611563
@Specialization
1562-
protected int breakTag(BreakException e) {
1564+
protected static int breakTag(BreakException e) {
15631565
return RUBY_TAG_BREAK;
15641566
}
15651567

15661568
@Specialization
1567-
protected int nextTag(NextException e) {
1569+
protected static int nextTag(NextException e) {
15681570
return RUBY_TAG_NEXT;
15691571
}
15701572

15711573
@Specialization
1572-
protected int retryTag(RetryException e) {
1574+
protected static int retryTag(RetryException e) {
15731575
return RUBY_TAG_RETRY;
15741576
}
15751577

15761578
@Specialization
1577-
protected int redoTag(RedoException e) {
1579+
protected static int redoTag(RedoException e) {
15781580
return RUBY_TAG_REDO;
15791581
}
15801582

15811583
@Specialization
1582-
protected int raiseTag(RaiseException e) {
1584+
protected static int raiseTag(RaiseException e) {
15831585
return RUBY_TAG_RAISE;
15841586
}
15851587

15861588
@Specialization
1587-
protected int throwTag(ThrowException e) {
1589+
protected static int throwTag(ThrowException e) {
15881590
return RUBY_TAG_THROW;
15891591
}
15901592

15911593
@Fallback
1592-
protected int noTag(Throwable e) {
1594+
protected static int noTag(Throwable e) {
15931595
return 0;
15941596
}
15951597
}

0 commit comments

Comments
 (0)