Skip to content

Commit

Permalink
Merge pull request dotnet#550 from pgavlin/GetValueFromRuntimeHandle
Browse files Browse the repository at this point in the history
Stub out getValueFromRuntimeHandle.
  • Loading branch information
pgavlin committed May 7, 2015
2 parents e793ba7 + be3a522 commit 8188ea7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/Reader/readerir.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,8 @@ class GenIR : public ReaderBase {

IRNode *getTypeFromHandle(IRNode *HandleNode) override;

IRNode *getValueFromRuntimeHandle(IRNode *Arg1) override {
throw NotYetImplementedException("getValueFromRuntimeHandle");
};
IRNode *getValueFromRuntimeHandle(IRNode *Arg1) override;

IRNode *arrayGetDimLength(IRNode *Arg1, IRNode *Arg2,
CORINFO_CALL_INFO *CallInfo) override {
throw NotYetImplementedException("arrayGetDimLength");
Expand Down
12 changes: 12 additions & 0 deletions lib/Reader/readerir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3882,6 +3882,18 @@ IRNode *GenIR::getTypeFromHandle(IRNode *Arg1) {
return (IRNode *)LLVMBuilder->CreateLoad(FieldAddress, IsVolatile);
}

IRNode *GenIR::getValueFromRuntimeHandle(IRNode *Arg1) {
// TODO: other JITs either
// a) do not optimize this path, or
// b) only optimize here if the incoming argument is the result of lowering
// a ldtoken instruction.
//
// We don't yet have the ability do detect (b) yet; stick with (a) in the
// meantime.

return nullptr;
}

CORINFO_CLASS_HANDLE GenIR::inferThisClass(IRNode *ThisArgument) {
Type *Ty = ((Value *)ThisArgument)->getType();
assert(Ty->isPointerTy());
Expand Down

0 comments on commit 8188ea7

Please sign in to comment.