Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMPrettyPrinter.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/PDOMNodeLinkedList.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/TypeMarshalBuffer.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/ApplyVisitor.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/FindBinding.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/NamedNodeCollector.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMNode.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecializationSpecialization.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespace.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespaceAlias.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPSpecialization.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDirective.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMTemplateParameterArray.java7
14 files changed, 24 insertions, 23 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMPrettyPrinter.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMPrettyPrinter.java
index d4eb0c08d05..eb53bcc5a82 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMPrettyPrinter.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMPrettyPrinter.java
@@ -25,7 +25,7 @@ import org.eclipse.core.runtime.CoreException;
/**
* Dump the contents of the PDOM index to stdout (for when you need
- * a lo-fidelity debugging tool)
+ * a low-fidelity debugging tool)
*/
public class PDOMPrettyPrinter implements IPDOMVisitor {
StringBuilder indent = new StringBuilder();
@@ -89,7 +89,7 @@ public class PDOMPrettyPrinter implements IPDOMVisitor {
public boolean visit(long record) throws CoreException {
if (record == 0)
return false;
- PDOMNode node = linkage.getNode(record);
+ PDOMNode node = PDOMNode.load(pdom, record);
if (v.visit(node))
node.accept(v);
v.leave(node);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/PDOMNodeLinkedList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/PDOMNodeLinkedList.java
index 0afea8d21de..9803e99271b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/PDOMNodeLinkedList.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/PDOMNodeLinkedList.java
@@ -65,7 +65,7 @@ public class PDOMNodeLinkedList {
}
node= null;
} else {
- node= linkage.getNode(record);
+ node= PDOMNode.load(linkage.getPDOM(), record);
}
if (visitor.visit(node) && node != null) {
node.accept(visitor);
@@ -102,7 +102,7 @@ public class PDOMNodeLinkedList {
}
return null;
} else {
- return linkage.getNode(record);
+ return PDOMNode.load(linkage.getPDOM(), record);
}
}
} while ((item = db.getRecPtr(item + ListItem.NEXT)) != firstItem);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/TypeMarshalBuffer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/TypeMarshalBuffer.java
index bb3af31e2a7..7db1e97c803 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/TypeMarshalBuffer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/TypeMarshalBuffer.java
@@ -103,7 +103,7 @@ public final class TypeMarshalBuffer implements ITypeMarshalBuffer {
if (firstBytes == BINDING_TYPE) {
fPos += 1;
long rec= getRecordPointer();
- return (IBinding) fLinkage.getNode(rec);
+ return (IBinding) PDOMNode.load(fLinkage.getPDOM(), rec);
} else if (firstBytes == NULL_TYPE || firstBytes == UNSTORABLE_TYPE) {
return null;
}
@@ -133,7 +133,7 @@ public final class TypeMarshalBuffer implements ITypeMarshalBuffer {
if (firstBytes == BINDING_TYPE) {
fPos += 1;
long rec= getRecordPointer();
- return (IType) fLinkage.getNode(rec);
+ return (IType) PDOMNode.load(fLinkage.getPDOM(), rec);
} else if (firstBytes == NULL_TYPE) {
return null;
} else if (firstBytes == UNSTORABLE_TYPE) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/ApplyVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/ApplyVisitor.java
index 6e63870e2a6..043154bc51c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/ApplyVisitor.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/ApplyVisitor.java
@@ -46,7 +46,7 @@ public class ApplyVisitor implements IBTreeVisitor, IPDOMVisitor {
public boolean visit(long record) throws CoreException {
if (record == 0)
return true;
- PDOMNode node= linkage.getNode(record);
+ PDOMNode node= PDOMNode.load(linkage.getPDOM(), record);
if(node instanceof PDOMBinding) {
((PDOMBinding)node).accept(visitor);
((PDOMBinding)node).accept(this);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/FindBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/FindBinding.java
index b23f0efcb30..d774b4b947b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/FindBinding.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/FindBinding.java
@@ -89,7 +89,7 @@ public class FindBinding {
// IBTreeVisitor
@Override
public boolean visit(long record) throws CoreException {
- final PDOMNamedNode nnode = (PDOMNamedNode) fLinkage.getNode(record);
+ final PDOMNamedNode nnode = (PDOMNamedNode) PDOMNode.load(fLinkage.getPDOM(), record);
if (nnode instanceof PDOMBinding) {
final PDOMBinding binding = (PDOMBinding) nnode;
if (matches(binding)) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/NamedNodeCollector.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/NamedNodeCollector.java
index be12fa0e7a7..ba65f98b4a2 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/NamedNodeCollector.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/NamedNodeCollector.java
@@ -121,7 +121,7 @@ public class NamedNodeCollector implements IBTreeVisitor, IPDOMVisitor {
if (record == 0)
return true;
- PDOMNode node= linkage.getNode(record);
+ PDOMNode node= PDOMNode.load(linkage.getPDOM(), record);
if (node instanceof PDOMNamedNode) {
return addNode((PDOMNamedNode) node);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java
index f89d33844ec..3daaf303623 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java
@@ -158,7 +158,7 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage
}
@Override
public boolean visit(long record) throws CoreException {
- PDOMNode node= getNode(record);
+ PDOMNode node= PDOMNode.load(fPDOM, record);
if (node != null) {
if (visitor.visit(node))
node.accept(visitor);
@@ -176,7 +176,7 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage
}
public final PDOMBinding getBinding(long record) throws CoreException {
- final PDOMNode node= getNode(record);
+ final PDOMNode node= PDOMNode.load(fPDOM, record);
if (node instanceof PDOMBinding)
return (PDOMBinding) node;
return null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMNode.java
index 5044d2e04cc..72bc239343c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMNode.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMNode.java
@@ -198,7 +198,7 @@ public abstract class PDOMNode implements IInternalPDOMNode {
public PDOMNode getParentNode() throws CoreException {
long parentrec = getParentNodeRec();
- return parentrec != 0 ? getLinkage().getNode(parentrec) : null;
+ return parentrec != 0 ? load(getPDOM(), parentrec) : null;
}
public void addChild(PDOMNode child) throws CoreException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecializationSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecializationSpecialization.java
index ed8a17e93f5..12f2051c0d0 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecializationSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecializationSpecialization.java
@@ -104,7 +104,7 @@ class PDOMCPPClassTemplatePartialSpecializationSpecialization extends PDOMCPPCla
if (fPrimaryTemplate == null) {
try {
long specializedRec = getDB().getRecPtr(record + PRIMARY_TEMPLATE);
- fPrimaryTemplate= (ICPPClassTemplate) getLinkage().getNode(specializedRec);
+ fPrimaryTemplate= (ICPPClassTemplate) PDOMNode.load(getPDOM(), specializedRec);
} catch (CoreException e) {
CCorePlugin.log(e);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespace.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespace.java
index f2127a19dd1..2e94b55a729 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespace.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespace.java
@@ -252,7 +252,7 @@ class PDOMCPPNamespace extends PDOMCPPBinding
}
@Override
public boolean visit(long record) throws CoreException {
- preresult.add(getLinkage().getNode(record));
+ preresult.add(PDOMNode.load(getPDOM(), record));
return true;
}
});
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespaceAlias.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespaceAlias.java
index 15b1016d5da..9db5d015825 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespaceAlias.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespaceAlias.java
@@ -109,9 +109,9 @@ class PDOMCPPNamespaceAlias extends PDOMCPPBinding implements ICPPNamespaceAlias
@Override
public IBinding getBinding() {
try {
- return (IBinding) getLinkage().getNode(getPDOM().getDB().getRecPtr(record + NAMESPACE_BINDING));
- } catch(CoreException ce) {
- CCorePlugin.log(ce);
+ return (IBinding) PDOMNode.load(getPDOM(), getPDOM().getDB().getRecPtr(record + NAMESPACE_BINDING));
+ } catch (CoreException e) {
+ CCorePlugin.log(e);
}
return null;
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPSpecialization.java
index 1a5f9cfa0aa..3e825f7be11 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPSpecialization.java
@@ -78,7 +78,7 @@ abstract class PDOMCPPSpecialization extends PDOMCPPBinding implements ICPPSpeci
}
protected IPDOMBinding loadSpecializedBinding(long specializedRec) throws CoreException {
- return (IPDOMBinding) getLinkage().getNode(specializedRec);
+ return (IPDOMBinding) PDOMNode.load(getPDOM(), specializedRec);
}
@Override
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDirective.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDirective.java
index 641d095b5e6..530a357dd49 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDirective.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDirective.java
@@ -66,7 +66,7 @@ public class PDOMCPPUsingDirective implements ICPPUsingDirective, IPDOMNode {
public ICPPNamespaceScope getNominatedScope() {
try {
long rec = fLinkage.getDB().getRecPtr(fRecord + NOMINATED_NAMESPACE);
- PDOMNode node= fLinkage.getNode(rec);
+ PDOMNode node= PDOMNode.load(fLinkage.getPDOM(), rec);
if (node instanceof ICPPNamespace) {
return ((ICPPNamespace) node).getNamespaceScope();
}
@@ -85,7 +85,7 @@ public class PDOMCPPUsingDirective implements ICPPUsingDirective, IPDOMNode {
try {
long rec = fLinkage.getDB().getRecPtr(fRecord + CONTAINER_NAMESPACE);
if (rec != 0) {
- PDOMNode node= fLinkage.getNode(rec);
+ PDOMNode node= PDOMNode.load(fLinkage.getPDOM(), rec);
if (node instanceof PDOMCPPNamespace) {
return (PDOMCPPNamespace) node;
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMTemplateParameterArray.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMTemplateParameterArray.java
index 5914455be6d..417a48ddfa2 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMTemplateParameterArray.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMTemplateParameterArray.java
@@ -15,6 +15,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateNonTypeParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTemplateParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.db.Database;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
@@ -46,8 +47,8 @@ public class PDOMTemplateParameterArray {
* Restores an array of template arguments from the database.
*/
public static IPDOMCPPTemplateParameter[] getArray(PDOMNode parent, long rec) throws CoreException {
- final PDOMLinkage linkage= parent.getLinkage();
- final Database db= linkage.getDB();
+ final PDOM pdom= parent.getPDOM();
+ final Database db= pdom.getDB();
final short len= db.getShort(rec);
Assert.isTrue(len >= 0 && len <= (Database.MAX_MALLOC_SIZE - 2) / 8);
@@ -59,7 +60,7 @@ public class PDOMTemplateParameterArray {
IPDOMCPPTemplateParameter[] result= new IPDOMCPPTemplateParameter[len];
for (int i= 0; i < len; i++) {
final long nodeRec= db.getRecPtr(rec); rec += 4;
- result[i]= nodeRec == 0 ? null : (IPDOMCPPTemplateParameter) linkage.getNode(nodeRec);
+ result[i]= nodeRec == 0 ? null : (IPDOMCPPTemplateParameter) PDOMNode.load(pdom, nodeRec);
}
return result;
}

Back to the top