Skip to content

Commit 172a517

Browse files
committed
Fix typos, null check, and exception class.
1 parent 13ba0da commit 172a517

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

src/main/java/org/truffleruby/core/basicobject/BasicObjectNodes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ public InternalMethod getMethod() {
331331

332332
@Override
333333
public Object inlineExecute(Frame callerFrame, Object self, Object[] args, Object block) {
334-
if (args != null && args.length > 0) {
334+
if (args.length > 0) {
335335
throw new InlinedMethodNode.RewriteException();
336336
}
337337
return execute();
@@ -636,7 +636,7 @@ public static AllocateNode create() {
636636
@Specialization(guards = "!rubyClass.isSingleton")
637637
protected RubyBasicObject allocate(RubyClass rubyClass) {
638638
final RubyBasicObject instance = new RubyBasicObject(rubyClass, getLanguage().basicObjectShape);
639-
AllocationTracing.traceBsicObjectAllocation(instance, rubyClass, this);
639+
AllocationTracing.traceBasicObjectAllocation(instance, rubyClass, this);
640640
return instance;
641641
}
642642

src/main/java/org/truffleruby/core/inlined/InlinedMethodNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
*/
1010
package org.truffleruby.core.inlined;
1111

12-
import com.oracle.truffle.api.exception.AbstractTruffleException;
1312
import com.oracle.truffle.api.frame.Frame;
13+
import com.oracle.truffle.api.nodes.ControlFlowException;
1414

1515
import org.truffleruby.builtins.CoreMethodArrayArgumentsNode;
1616
import org.truffleruby.language.methods.InternalMethod;
@@ -21,7 +21,7 @@ public abstract class InlinedMethodNode extends CoreMethodArrayArgumentsNode {
2121

2222
public abstract InternalMethod getMethod();
2323

24-
public static class RewriteException extends AbstractTruffleException {
24+
public static class RewriteException extends ControlFlowException {
2525

2626
private static final long serialVersionUID = -4128190563044417424L;
2727
}

src/main/java/org/truffleruby/language/objects/AllocationTracing.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private static void traceBoundary(RubyLanguage language, RubyContext context, Ob
7676
}
7777
}
7878

79-
public static void traceBsicObjectAllocation(RubyDynamicObject instance, RubyDynamicObject rubyClass,
79+
public static void traceBasicObjectAllocation(RubyDynamicObject instance, RubyDynamicObject rubyClass,
8080
RubyContextSourceNode node) {
8181
RubyLanguage language = node.getLanguage();
8282
RubyContext context = node.getContext();
@@ -118,10 +118,8 @@ public static void callTraceInlineAllocation(RubyLanguage language, RubyContext
118118
final SourceSection allocatingSourceSection = context
119119
.getCallStack()
120120
.getTopMostUserSourceSection(node.getEncapsulatingSourceSection());
121-
final String className = LogicalClassNode.getUncached().execute(klass).fields
122-
.getName();
123121

124-
callAllocationTrace(language, context, instance, allocatingSourceSection, "__allocate__", className);
122+
callAllocationTrace(language, context, instance, allocatingSourceSection, "__allocate__", "Class");
125123
}
126124

127125
@TruffleBoundary

0 commit comments

Comments
 (0)