summaryrefslogtreecommitdiff
path: root/src/lookup.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-01-16 16:02:04 -0500
committerAdrian Thurston <thurston@complang.org>2015-01-16 16:02:04 -0500
commit59180fc43e2a9c983df2609a956f6dfa707f786a (patch)
treefb81a6ecbec1e050a3d5b40da53d0b7167aa122e /src/lookup.cc
parent469cb252fc376e0efed20aa583c1df87c196e634 (diff)
downloadcolm-59180fc43e2a9c983df2609a956f6dfa707f786a.tar.gz
brought back the pointer deref for reverse load
Resurrected the pointer deref instruction for loading during reverse execution. Fixed the lastPtrInQual computation for structs and generics. Removed the deref syntax.
Diffstat (limited to 'src/lookup.cc')
-rw-r--r--src/lookup.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lookup.cc b/src/lookup.cc
index 8d08ba2a..5514c00a 100644
--- a/src/lookup.cc
+++ b/src/lookup.cc
@@ -79,13 +79,13 @@ VarRefLookup LangVarRef::lookupQualification( Compiler *pd, NameScope *rootScope
/* Check for references. When loop is done we will have the last one
* present, if any. */
- if ( qualUT->typeId == TYPE_PTR )
+ if ( qualUT->ptr() )
lastPtrInQual = qi.pos();
if ( qi->form == QualItem::Dot ) {
/* Cannot dot a reference. Iterator yes (access of the iterator
* not the current) */
- if ( qualUT->typeId == TYPE_PTR )
+ if ( qualUT->ptr() )
error(loc) << "dot cannot be used to access a pointer" << endp;
}
else if ( qi->form == QualItem::Arrow ) {