Skip to content

Commit

Permalink
Removes findCallContext()
Browse files Browse the repository at this point in the history
Issue: #17
  • Loading branch information
0x7CFE committed May 25, 2016
1 parent 4b2e1a8 commit 719e6ec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
1 change: 0 additions & 1 deletion include/inference.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ class TypeSystem {
TypeSystem(SmalltalkVM& vm) : m_vm(vm), m_lastContextIndex(0) {}

typedef TSymbol* TSelector;
CallContext* findCallContext(TSelector selector, const Type& arguments);

InferContext* inferMessage(TSelector selector, const Type& arguments);

Expand Down
20 changes: 0 additions & 20 deletions src/TypeAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,26 +554,6 @@ void TypeAnalyzer::walkComplete() {
// std::printf("walk complete\n");
}

CallContext* TypeSystem::findCallContext(TSelector selector, const Type& arguments) {
assert(selector);

if (arguments.getKind() != Type::tkArray || arguments.getSubTypes().empty())
return 0;

if (arguments[0].getKind() == Type::tkUndefined || arguments[0].getKind() == Type::tkPolytype)
return 0;

const TContextCache::iterator iMap = m_contextCache.find(selector);
if (iMap == m_contextCache.end())
return 0;

const TContextMap::iterator iContext = iMap->second.find(arguments);
if (iContext == iMap->second.end())
return 0;

return iContext->second;
}

ControlGraph* TypeSystem::getControlGraph(TMethod* method) {
TGraphCache::iterator iGraph = m_graphCache.find(method);
if (iGraph != m_graphCache.end())
Expand Down

0 comments on commit 719e6ec

Please sign in to comment.