mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +02:00
Fix up PDOM to index ACE+TAO exception free.
This commit is contained in:
parent
0a054c0a7d
commit
ccaf9b361a
7 changed files with 31 additions and 12 deletions
|
@ -88,4 +88,4 @@ public class AutomatedIntegrationSuite extends TestSuite {
|
|||
return suite;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -54,7 +54,7 @@ public class PDOM extends PlatformObject
|
|||
|
||||
private Database db;
|
||||
|
||||
public static final int VERSION = 9;
|
||||
public static final int VERSION = 10;
|
||||
// 0 - the beginning of it all
|
||||
// 1 - first change to kick off upgrades
|
||||
// 2 - added file inclusions
|
||||
|
@ -65,6 +65,7 @@ public class PDOM extends PlatformObject
|
|||
// 7 - class key
|
||||
// 8 - enumerators
|
||||
// 9 - base classes
|
||||
// 10 - typedefs, types on C++ variables
|
||||
|
||||
public static final int LINKAGES = Database.DATA_AREA;
|
||||
public static final int FILE_INDEX = Database.DATA_AREA + 4;
|
||||
|
|
|
@ -82,6 +82,11 @@ public abstract class PDOMNode implements IPDOMNode{
|
|||
return pdom.getDB().getInt(record + TYPE);
|
||||
}
|
||||
|
||||
public PDOMNode getParentNode() throws CoreException {
|
||||
int parentrec = pdom.getDB().getInt(record + PARENT);
|
||||
return parentrec != 0 ? getLinkage().getNode(parentrec) : null;
|
||||
}
|
||||
|
||||
public PDOMLinkage getLinkage() throws CoreException {
|
||||
return getLinkage(pdom, record);
|
||||
}
|
||||
|
|
|
@ -45,12 +45,13 @@ public class PDOMPointerType extends PDOMNode implements IPointerType,
|
|||
|
||||
// type
|
||||
IType targetType = ((ITypeContainer)type).getType();
|
||||
int typeRec = 0;
|
||||
if (type != null) {
|
||||
PDOMNode targetTypeNode = getLinkage().addType(this, targetType);
|
||||
if (targetTypeNode != null) {
|
||||
db.putInt(record + TYPE, targetTypeNode.getRecord());
|
||||
}
|
||||
if (targetTypeNode != null)
|
||||
typeRec = targetTypeNode.getRecord();
|
||||
}
|
||||
db.putInt(record + TYPE, typeRec);
|
||||
|
||||
// flags
|
||||
byte flags = 0;
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
|||
import org.eclipse.cdt.core.parser.util.ArrayUtil;
|
||||
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage;
|
||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMMember;
|
||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMMemberOwner;
|
||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
||||
|
@ -214,13 +215,15 @@ public class PDOMCPPClassType extends PDOMMemberOwner implements ICPPClassType,
|
|||
}
|
||||
|
||||
public boolean isGloballyQualified() throws DOMException {
|
||||
throw new PDOMNotImplementedError();
|
||||
try {
|
||||
return getParentNode() instanceof PDOMLinkage;
|
||||
} catch (CoreException e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public ICPPClassType getClassType() {
|
||||
return null;
|
||||
// TODO - do we need the real type?
|
||||
// throw new PDOMNotImplementedError();
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICPPMethod[] getImplicitMethods() {
|
||||
|
@ -287,4 +290,4 @@ public class PDOMCPPClassType extends PDOMMemberOwner implements ICPPClassType,
|
|||
throw new PDOMNotImplementedError();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -37,6 +37,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceAlias;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateDefinition;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.gnu.cpp.GPPLanguage;
|
||||
|
@ -221,6 +222,9 @@ public class PDOMCPPLinkage extends PDOMLinkage {
|
|||
protected int getBindingType(IBinding binding) {
|
||||
if (binding instanceof ICPPVariable)
|
||||
return CPPVARIABLE;
|
||||
else if (binding instanceof ICPPTemplateDefinition)
|
||||
// this must be before class type
|
||||
return 0;
|
||||
else if (binding instanceof ICPPFunction)
|
||||
return CPPFUNCTION;
|
||||
else if (binding instanceof ICPPClassType)
|
||||
|
@ -395,4 +399,4 @@ public class PDOMCPPLinkage extends PDOMLinkage {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -197,7 +197,12 @@ public class PDOMCPPMethod extends PDOMMember implements ICPPMethod, ICPPFunctio
|
|||
}
|
||||
|
||||
public boolean isSameType(IType type) {
|
||||
throw new PDOMNotImplementedError();
|
||||
if (type == this)
|
||||
return true;
|
||||
if (type instanceof PDOMCPPMethod)
|
||||
return getRecord() == ((PDOMCPPMethod)type).getRecordSize();
|
||||
// TODO further analysis to compare with DOM objects
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue