Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Implement adding null check for this call #202

Merged
merged 1 commit into from
Feb 25, 2015
Merged
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
22 changes: 12 additions & 10 deletions lib/Reader/readerir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2967,10 +2967,6 @@ IRNode *GenIR::genCall(ReaderCallTargetData *CallTargetInfo,
throw NotYetImplementedException("Tail call");
}

if (CallTargetInfo->needsNullCheck()) {
throw NotYetImplementedException("Call needs null check");
}

if (SigInfo->hasTypeArg()) {
throw NotYetImplementedException("Call HasTypeArg");
}
Expand All @@ -2992,12 +2988,18 @@ IRNode *GenIR::genCall(ReaderCallTargetData *CallTargetInfo,
throw NotYetImplementedException("Call has value type args");
}

if ((I == 0) && CallTargetInfo->isNewObj()) {
// Memory and a representative node for the 'this' pointer for newobj
// has not been created yet. Pass a null value of the right type for now;
// it will be replaced by the real value in canonNewObjCall.
ASSERT(ArgNode == NULL);
ArgNode = (IRNode *)Constant::getNullValue(ArgType);
if (I == 0) {
if (CallTargetInfo->isNewObj()) {
// Memory and a representative node for the 'this' pointer for newobj
// has not been created yet. Pass a null value of the right type for now;
// it will be replaced by the real value in canonNewObjCall.
ASSERT(ArgNode == NULL);
ArgNode = (IRNode *)Constant::getNullValue(ArgType);
} else if (CallTargetInfo->needsNullCheck()) {
// Insert this Ptr null check if required
ASSERT(SigInfo->hasThis());
ArgNode = genNullCheck(ArgNode, NewIR);
}
}
IRNode *Arg = convertFromStackType(ArgNode, CorType, ArgType);
Arguments.push_back(Arg);
Expand Down
909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Add1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/And1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/AndRef.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Args4.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Args5.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/AsgAdd1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/AsgAnd1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/AsgOr1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/AsgSub1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/AsgXor1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/BinaryRMW.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/Call1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/CnsBool.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/CnsLng1.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblAdd.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblAddConst.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblArea.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblArray.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblAvg2.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblAvg6.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblCall1.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblCall2.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblDist.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblDiv.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblDivConst.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblFillArray.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblMul.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblMulConst.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblNeg.error.txt

Large diffs are not rendered by default.

1,028 changes: 968 additions & 60 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblRoots.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblSub.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblSubConst.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/DblVar.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Eq1.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPAdd.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPAddConst.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPArea.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPArray.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPAvg2.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPAvg6.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPCall1.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPCall2.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPConvDbl2Lng.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPConvF2F.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPConvF2I.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPConvF2Lng.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPConvI2F.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPDist.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPDiv.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPDivConst.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPError.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPFillArray.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPMath.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPMul.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPMulConst.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPNeg.error.txt

Large diffs are not rendered by default.

1,028 changes: 968 additions & 60 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPRoots.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPSmall.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPSub.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPSubConst.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FPVar.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/FactorialRec.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/FibLoop.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/FiboRec.error.txt

Large diffs are not rendered by default.

1,028 changes: 968 additions & 60 deletions test/BaseLine/JIT/CodeGenBringUpTests/Gcd.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Ge1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Gt1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Ind1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/InitObj.error.txt

Large diffs are not rendered by default.

1,096 changes: 1,054 additions & 42 deletions test/BaseLine/JIT/CodeGenBringUpTests/InstanceCalls.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/IntArraySum.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/IntConv.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrue1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueEqDbl.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueEqFP.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueEqInt1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueGeDbl.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueGeFP.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueGeInt1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueGtDbl.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueGtFP.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueGtInt1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueLeDbl.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueLeFP.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueLeInt1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueLtDbl.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueLtFP.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueLtInt1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueNeDbl.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueNeFP.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/JTrueNeInt1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Jmp1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Le1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/LeftShift.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/LngConv.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/LongArgsAndReturn.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Lt1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Ne1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/NegRMW.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/NestedCall.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/NotAndNeg.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/NotRMW.error.txt

Large diffs are not rendered by default.

948 changes: 909 additions & 39 deletions test/BaseLine/JIT/CodeGenBringUpTests/ObjAlloc.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/OpMembersOfStructLocal.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Or1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/OrRef.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/RightShiftRef.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/CodeGenBringUpTests/StaticCalls.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/StructFldAddr.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/StructInstMethod.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Sub1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/SubRef.error.txt

Large diffs are not rendered by default.

1,028 changes: 968 additions & 60 deletions test/BaseLine/JIT/CodeGenBringUpTests/Swap.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Switch.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Unbox.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/Xor1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/XorRef.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/addref.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/div1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/divref.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/mul1.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/mul2.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/mul3.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/mul4.error.txt

Large diffs are not rendered by default.

909 changes: 871 additions & 38 deletions test/BaseLine/JIT/CodeGenBringUpTests/rem1.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/Directed/Arrays/complex1.error.txt

Large diffs are not rendered by default.

1,026 changes: 967 additions & 59 deletions test/BaseLine/JIT/Directed/Arrays/simple1.error.txt

Large diffs are not rendered by default.