Skip to content

Commit

Permalink
Fix unreachable specializations
Browse files Browse the repository at this point in the history
  • Loading branch information
DSouzaM committed Oct 30, 2024
1 parent e88833d commit 5a3a24b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static void doit(VirtualFrame frame, CFieldObject self, Object inst, Object valu
cDataSetNode.execute(frame, dst, self.proto, self.setfunc, value, self.index, self.size, dst.b_ptr.withOffset(self.offset));
}

@Specialization(guards = "!isNoValue(value)")
@Specialization(guards = "isNoValue(value)")
@InliningCutoff
static void doit(CFieldObject self, Object inst, Object value,
@Cached PRaiseNode raiseNode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,21 +168,6 @@ static int doNativeCharSequence(PString x,
return doString(materializeNode.execute(inliningTarget, x), codePointLengthNode);
}

@Specialization(guards = {"x.isNativeCharSequence()", "x.isNativeMaterialized()"})
static int nativeString(PString x,
@Shared @Cached TruffleString.CodePointLengthNode codePointLengthNode) {
return doString(x.getNativeCharSequence().getMaterialized(), codePointLengthNode);
}

@Specialization(guards = {"x.isNativeCharSequence()", "!x.isNativeMaterialized()"}, replaces = "nativeString", limit = "3")
static int nativeStringMat(@SuppressWarnings("unused") PString x,
@Bind("this") Node inliningTarget,
@Bind("x.getNativeCharSequence()") NativeCharSequence ncs,
@CachedLibrary("ncs") InteropLibrary lib,
@Cached CastToJavaIntExactNode castToJavaIntNode) {
return ncs.length(inliningTarget, lib, castToJavaIntNode);
}

@Specialization
@InliningCutoff
static int doNativeObject(PythonNativeObject x,
Expand Down

0 comments on commit 5a3a24b

Please sign in to comment.