Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2136,11 +2136,9 @@ private void putPoolConstant(VirtualFrame frame, int top, char cpi, int opcode)
} else if (constant instanceof StringConstant) {
assert opcode == LDC || opcode == LDC_W;
StaticObject internedString = pool.resolvedStringAt(cpi);
Meta meta = getMeta();
StaticObject obj = meta.toGuestString(meta.toHostString(internedString));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fhowar I don't know why you added this and whether it is really necessary.
The constant op code does not need it and all other exceptions should be handled in the markObjectWithIfTaint method, IMHO.

SPouT.markObjectWithIFTaint(obj);
SPouT.markObjectWithIFTaint(internedString);
//TODO: (annotate string and maybe clone?)
putObject(frame, top, obj);
putObject(frame, top, internedString);
} else if (constant instanceof ClassConstant) {
assert opcode == LDC || opcode == LDC_W;
Klass klass = pool.resolvedKlassAt(getDeclaringKlass(), cpi);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1568,6 +1568,10 @@ public static StaticObject stringConcat(StaticObject self, StaticObject other, M

@CompilerDirectives.TruffleBoundary
public static Object stringEquals(StaticObject self, StaticObject other, Meta meta) {
// other might be null
if(!other.isString()){
return false;
}
String cSelf = meta.toHostString(self);
String cOther = meta.toHostString(other);
boolean areEqual = cSelf.equals(cOther);
Expand Down