Skip to content

Commit

Permalink
Fixes sendToSuper
Browse files Browse the repository at this point in the history
Issue: #17
Issue: #92
  • Loading branch information
0x7CFE committed Jul 21, 2016
1 parent a532ac0 commit 9741b46
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions src/JITRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,6 @@ void JITRuntime::sendMessage(TContext* callingContext, TSymbol* message, TObject

if (! compiledMethodFunction) {
type::Type argumentsType = type::createArgumentsType(messageArguments);
if (receiverClass)
argumentsType[0].set(receiverClass);

// If function was not found in the cache looking it in the LLVM directly
const std::string& functionName = type::getQualifiedMethodName(method, argumentsType);
Expand Down
5 changes: 1 addition & 4 deletions src/TypeAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1271,10 +1271,7 @@ InferContext* TypeSystem::inferMessage(
receiver = self.getValue()->cast<TClass>();
}

if (sendToSuper)
receiver = receiver->parentClass;

TMethod* const method = m_vm.lookupMethod(selector, receiver);
TMethod* const method = m_vm.lookupMethod(selector, sendToSuper ? receiver->parentClass : receiver);

if (! method) { // TODO Redirect to #doesNotUnderstand: statically
std::printf("Lookup failed for %s::?>>%s...\n",
Expand Down

0 comments on commit 9741b46

Please sign in to comment.