Skip to content

Commit

Permalink
Merge pull request eclipse-openj9#21 from cathyzhyi/withfield-valhall…
Browse files Browse the repository at this point in the history
…a-sandbox

fix withfield with null
  • Loading branch information
Charlmzz authored Mar 31, 2020
2 parents a010c1e + a54d579 commit 7d395e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/compiler/ilgen/Walker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6095,6 +6095,9 @@ TR_J9ByteCodeIlGenerator::genWithField(uint16_t fieldCpIndex)
TR::Node *newFieldValue = pop();
TR::Node *originalObject = pop();

TR::Node *passThruNode = TR::Node::create(TR::PassThrough, 1, originalObject);
genTreeTop(genNullCheck(passThruNode));

loadClassObject(valueClass);
const TR::TypeLayout *typeLayout = comp()->typeLayout(valueClass);
size_t fieldCount = typeLayout->count();
Expand Down

0 comments on commit 7d395e2

Please sign in to comment.