diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DependentValue.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DependentValue.java index 3874cb9bcd1..836ace90d70 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DependentValue.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DependentValue.java @@ -73,7 +73,7 @@ public class DependentValue implements IValue { } public static IValue unmarshal(short firstBytes, ITypeMarshalBuffer buf) throws CoreException { - ISerializableEvaluation eval= buf.unmarshalEvaluation(); + ICPPEvaluation eval= buf.unmarshalEvaluation(); if (eval instanceof ICPPEvaluation) return new DependentValue((ICPPEvaluation) eval); return IntegralValue.UNKNOWN; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableEvaluation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableEvaluation.java deleted file mode 100644 index ee53de2e5f3..00000000000 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableEvaluation.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2012 Wind River Systems, Inc. and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Markus Schorn - initial API and implementation - *******************************************************************************/ -package org.eclipse.cdt.internal.core.dom.parser; - -import org.eclipse.core.runtime.CoreException; - -/** - * Interface for marshalling ICPPEvaluation objects for storage in the index. - */ -public interface ISerializableEvaluation { - /** - * Marshals an ICPPEvaluation object for storage in the index. - * - * @param buffer The buffer that will hold the marshalled ICPPEvaluation object. - * @param includeValue Specifies whether nested IValue objects should be marshalled as well. - * */ - void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException; -} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ITypeMarshalBuffer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ITypeMarshalBuffer.java index a375788c6ee..274fa27ccfc 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ITypeMarshalBuffer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ITypeMarshalBuffer.java @@ -17,6 +17,7 @@ import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IValue; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; import org.eclipse.core.runtime.CoreException; /** @@ -116,7 +117,7 @@ public interface ITypeMarshalBuffer { IType unmarshalType() throws CoreException; IValue unmarshalValue() throws CoreException; IBinding unmarshalBinding() throws CoreException; - ISerializableEvaluation unmarshalEvaluation() throws CoreException; + ICPPEvaluation unmarshalEvaluation() throws CoreException; ISerializableExecution unmarshalExecution() throws CoreException; ICPPTemplateArgument unmarshalTemplateArgument() throws CoreException; int getByte() throws CoreException; @@ -142,7 +143,7 @@ public interface ITypeMarshalBuffer { void marshalType(IType type) throws CoreException; void marshalValue(IValue value) throws CoreException; void marshalBinding(IBinding binding) throws CoreException; - void marshalEvaluation(ISerializableEvaluation eval, boolean includeValue) throws CoreException; + void marshalEvaluation(ICPPEvaluation eval, boolean includeValue) throws CoreException; void marshalExecution(ISerializableExecution exec, boolean includeValue) throws CoreException; void marshalTemplateArgument(ICPPTemplateArgument arg) throws CoreException; void putByte(byte data); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluation.java index f3953fa3693..78bead1b726 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluation.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluation.java @@ -18,13 +18,14 @@ import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IValue; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; +import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ActivationRecord; +import org.eclipse.core.runtime.CoreException; /** * Assists in evaluating expressions. */ -public interface ICPPEvaluation extends ISerializableEvaluation { +public interface ICPPEvaluation { public static final ICPPEvaluation[] EMPTY_ARRAY = {}; boolean isInitializerList(); @@ -167,4 +168,12 @@ public interface ICPPEvaluation extends ISerializableEvaluation { * Otherwise returns {@code null}. */ IBinding getTemplateDefinition(); + + /** + * Marshals an ICPPEvaluation object for storage in the index. + * + * @param buffer The buffer that will hold the marshalled ICPPEvaluation object. + * @param includeValue Specifies whether nested IValue objects should be marshalled as well. + * */ + void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinary.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinary.java index 49c57142750..455fc6ac8d4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinary.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinary.java @@ -69,7 +69,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; import org.eclipse.cdt.core.dom.ast.cpp.ICPPPointerToMemberType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; @@ -411,10 +410,10 @@ public class EvalBinary extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { int op= buffer.getByte(); - ICPPEvaluation arg1= (ICPPEvaluation) buffer.unmarshalEvaluation(); - ICPPEvaluation arg2= (ICPPEvaluation) buffer.unmarshalEvaluation(); + ICPPEvaluation arg1= buffer.unmarshalEvaluation(); + ICPPEvaluation arg2= buffer.unmarshalEvaluation(); IBinding templateDefinition= buffer.unmarshalBinding(); return new EvalBinary(op, arg1, arg2, templateDefinition); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinaryTypeId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinaryTypeId.java index 18a8d9226c1..35b8d2e1a5e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinaryTypeId.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinaryTypeId.java @@ -21,7 +21,6 @@ import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IValue; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; import org.eclipse.cdt.internal.core.dom.parser.ValueFactory; @@ -124,7 +123,7 @@ public class EvalBinaryTypeId extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { int op= buffer.getByte(); IType arg1= buffer.unmarshalType(); IType arg2= buffer.unmarshalType(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinding.java index a64cb2789ae..98ca0ea229d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinding.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinding.java @@ -41,7 +41,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable; import org.eclipse.cdt.core.index.IIndexBinding; import org.eclipse.cdt.internal.core.dom.parser.ASTQueries; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; @@ -375,7 +374,7 @@ public class EvalBinding extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { if ((firstBytes & ITypeMarshalBuffer.FLAG1) != 0) { ICPPFunction parameterOwner= (ICPPFunction) buffer.unmarshalBinding(); int parameterPosition= buffer.getInt(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalComma.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalComma.java index 3622638db8d..6233706911a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalComma.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalComma.java @@ -23,7 +23,6 @@ import org.eclipse.cdt.core.dom.ast.IValue; import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; @@ -184,11 +183,11 @@ public class EvalComma extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { int len= buffer.getInt(); ICPPEvaluation[] args = new ICPPEvaluation[len]; for (int i = 0; i < args.length; i++) { - args[i]= (ICPPEvaluation) buffer.unmarshalEvaluation(); + args[i]= buffer.unmarshalEvaluation(); } IBinding templateDefinition = buffer.unmarshalBinding(); return new EvalComma(args, templateDefinition); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompositeAccess.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompositeAccess.java index ec6fa6211c5..4840e3e62c7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompositeAccess.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompositeAccess.java @@ -21,7 +21,6 @@ import org.eclipse.cdt.core.dom.ast.IValue; import org.eclipse.cdt.core.dom.ast.cpp.ICPPBasicType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; @@ -158,8 +157,8 @@ public final class EvalCompositeAccess implements ICPPEvaluation { buffer.putInt(elementId); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPEvaluation parent = (ICPPEvaluation) buffer.unmarshalEvaluation(); + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + ICPPEvaluation parent = buffer.unmarshalEvaluation(); int elementId = buffer.getInt(); return new EvalCompositeAccess(parent, elementId); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompoundStatementExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompoundStatementExpression.java index bea0862a89f..6b112a1a4e6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompoundStatementExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompoundStatementExpression.java @@ -19,7 +19,6 @@ import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IValue; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; import org.eclipse.cdt.internal.core.dom.parser.cpp.InstantiationContext; @@ -96,8 +95,8 @@ public class EvalCompoundStatementExpression extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPEvaluation arg= (ICPPEvaluation) buffer.unmarshalEvaluation(); + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + ICPPEvaluation arg= buffer.unmarshalEvaluation(); IBinding templateDefinition= buffer.unmarshalBinding(); return new EvalCompoundStatementExpression(arg, templateDefinition); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConditional.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConditional.java index 3e345a19312..19157cc6ec7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConditional.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConditional.java @@ -32,7 +32,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; @@ -341,12 +340,12 @@ public class EvalConditional extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { boolean pth= (firstBytes & ITypeMarshalBuffer.FLAG1) != 0; boolean nth= (firstBytes & ITypeMarshalBuffer.FLAG2) != 0; - ICPPEvaluation cond= (ICPPEvaluation) buffer.unmarshalEvaluation(); - ICPPEvaluation pos= (ICPPEvaluation) buffer.unmarshalEvaluation(); - ICPPEvaluation neg= (ICPPEvaluation) buffer.unmarshalEvaluation(); + ICPPEvaluation cond= buffer.unmarshalEvaluation(); + ICPPEvaluation pos= buffer.unmarshalEvaluation(); + ICPPEvaluation neg= buffer.unmarshalEvaluation(); IBinding templateDefinition= buffer.unmarshalBinding(); return new EvalConditional(cond, pos, neg, pth, nth, templateDefinition); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java index 553fe9ef0dd..53bbda0b64e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java @@ -35,7 +35,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.CompositeValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFieldReference; @@ -303,13 +302,13 @@ public final class EvalConstructor extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { IType type = buffer.unmarshalType(); ICPPConstructor constructor = (ICPPConstructor) buffer.unmarshalBinding(); int len = buffer.getInt(); ICPPEvaluation[] arguments = new ICPPEvaluation[len]; for (int i = 0; i < arguments.length; i++) { - arguments[i] = (ICPPEvaluation) buffer.unmarshalEvaluation(); + arguments[i] = buffer.unmarshalEvaluation(); } IBinding templateDefinition = buffer.unmarshalBinding(); return new EvalConstructor(type, constructor, arguments, templateDefinition); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFixed.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFixed.java index 3240a27b7f3..e560748b1c3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFixed.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFixed.java @@ -23,7 +23,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameterPackType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; @@ -164,7 +163,7 @@ public final class EvalFixed extends CPPEvaluation { } } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { final boolean readValue= (firstBytes & ITypeMarshalBuffer.FLAG1) != 0; IValue value; ValueCategory cat; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFunctionCall.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFunctionCall.java index e17bcd39091..d8547445f0d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFunctionCall.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFunctionCall.java @@ -38,7 +38,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.CompositeValue; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFunction; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; @@ -186,14 +185,14 @@ public final class EvalFunctionCall extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { int len = buffer.getInt(); ICPPEvaluation[] args = new ICPPEvaluation[len]; for (int i = 0; i < args.length; i++) { - args[i] = (ICPPEvaluation) buffer.unmarshalEvaluation(); + args[i] = buffer.unmarshalEvaluation(); } - ICPPEvaluation implicitThis = (ICPPEvaluation) buffer.unmarshalEvaluation(); + ICPPEvaluation implicitThis = buffer.unmarshalEvaluation(); IBinding templateDefinition = buffer.unmarshalBinding(); return new EvalFunctionCall(args, implicitThis, templateDefinition); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFunctionSet.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFunctionSet.java index db745d6bde1..2ad68300930 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFunctionSet.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFunctionSet.java @@ -31,7 +31,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.core.parser.util.ArrayUtil; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper; @@ -214,7 +213,7 @@ public class EvalFunctionSet extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { final boolean qualified= (firstBytes & FLAG_QUALIFIED) != 0; final boolean addressOf= (firstBytes & FLAG_ADDRESS_OF) != 0; if ((firstBytes & FLAG_HAS_FUNCTION_SET) != 0) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java index 9827261bbe2..61d66faa032 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java @@ -51,7 +51,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateNonTypeParameter; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.ASTQueries; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPDeferredFunction; @@ -193,11 +192,11 @@ public class EvalID extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { final boolean addressOf= (firstBytes & ITypeMarshalBuffer.FLAG1) != 0; final boolean qualified= (firstBytes & ITypeMarshalBuffer.FLAG2) != 0; final boolean isPointerDeref= (firstBytes & ITypeMarshalBuffer.FLAG4) != 0; - ICPPEvaluation fieldOwner= (ICPPEvaluation) buffer.unmarshalEvaluation(); + ICPPEvaluation fieldOwner= buffer.unmarshalEvaluation(); char[] name= buffer.getCharArray(); IBinding nameOwner= buffer.unmarshalBinding(); ICPPTemplateArgument[] args= null; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalInitList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalInitList.java index e355e1dfb66..4c13df20e11 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalInitList.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalInitList.java @@ -21,7 +21,6 @@ import org.eclipse.cdt.core.dom.ast.IValue; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.CompositeValue; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; @@ -122,11 +121,11 @@ public class EvalInitList extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { int len= buffer.getInt(); ICPPEvaluation[] args = new ICPPEvaluation[len]; for (int i = 0; i < args.length; i++) { - args[i]= (ICPPEvaluation) buffer.unmarshalEvaluation(); + args[i]= buffer.unmarshalEvaluation(); } IBinding templateDefinition= buffer.unmarshalBinding(); return new EvalInitList(args, templateDefinition); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalMemberAccess.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalMemberAccess.java index dd697980824..bca7ef7db9e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalMemberAccess.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalMemberAccess.java @@ -44,7 +44,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.CompositeValue; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; @@ -366,7 +365,7 @@ public class EvalMemberAccess extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { boolean isDeref = (firstBytes & ITypeMarshalBuffer.FLAG1) != 0; ValueCategory ownerValueCat; @@ -380,7 +379,7 @@ public class EvalMemberAccess extends CPPDependentEvaluation { IType ownerType = buffer.unmarshalType(); IBinding member = buffer.unmarshalBinding(); - ICPPEvaluation ownerEval = (ICPPEvaluation) buffer.unmarshalEvaluation(); + ICPPEvaluation ownerEval = buffer.unmarshalEvaluation(); IBinding templateDefinition = buffer.unmarshalBinding(); return new EvalMemberAccess(ownerType, ownerValueCat, member, ownerEval, isDeref, templateDefinition); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalParameterPack.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalParameterPack.java index 9f124fef521..8cfa1383d45 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalParameterPack.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalParameterPack.java @@ -17,7 +17,6 @@ import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IValue; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPParameterPackType; @@ -129,8 +128,8 @@ public class EvalParameterPack extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPEvaluation expansionPattern = (ICPPEvaluation) buffer.unmarshalEvaluation(); + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + ICPPEvaluation expansionPattern = buffer.unmarshalEvaluation(); IBinding templateDefinition = buffer.unmarshalBinding(); return new EvalParameterPack(expansionPattern, templateDefinition); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalPointer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalPointer.java index ea7d6bb77c3..e0157ad9159 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalPointer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalPointer.java @@ -12,7 +12,6 @@ import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPPointerType; @@ -126,7 +125,7 @@ public final class EvalPointer extends EvalReference { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { boolean subValue = (firstBytes & ITypeMarshalBuffer.FLAG1) != 0; if (subValue) { EvalCompositeAccess referredSubValue = (EvalCompositeAccess) buffer.unmarshalEvaluation(); @@ -135,7 +134,7 @@ public final class EvalPointer extends EvalReference { return new EvalPointer(new ActivationRecord(), referredSubValue, templateDefinition, position); } else { IBinding referredBinding = buffer.unmarshalBinding(); - ICPPEvaluation value = (ICPPEvaluation) buffer.unmarshalEvaluation(); + ICPPEvaluation value = buffer.unmarshalEvaluation(); ActivationRecord record = new ActivationRecord(); record.update(referredBinding, value); IBinding templateDefinition = buffer.unmarshalBinding(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalReference.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalReference.java index d7797b2cd8d..a794f73768e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalReference.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalReference.java @@ -14,7 +14,6 @@ import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IValue; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; import org.eclipse.cdt.internal.core.dom.parser.cpp.InstantiationContext; @@ -159,7 +158,7 @@ public class EvalReference extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { boolean subValue = (firstBytes & ITypeMarshalBuffer.FLAG1) != 0; if (subValue) { EvalCompositeAccess referredSubValue = (EvalCompositeAccess) buffer.unmarshalEvaluation(); @@ -167,7 +166,7 @@ public class EvalReference extends CPPDependentEvaluation { return new EvalReference(new ActivationRecord(), referredSubValue, templateDefinition); } else { IBinding referredBinding = buffer.unmarshalBinding(); - ICPPEvaluation value = (ICPPEvaluation) buffer.unmarshalEvaluation(); + ICPPEvaluation value = buffer.unmarshalEvaluation(); ActivationRecord record = new ActivationRecord(); record.update(referredBinding, value); IBinding templateDefinition = buffer.unmarshalBinding(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalTypeId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalTypeId.java index 982a4bd69c9..06bc9d7356b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalTypeId.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalTypeId.java @@ -35,7 +35,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.core.parser.util.ArrayUtil; import org.eclipse.cdt.internal.core.dom.parser.CompositeValue; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFunction; @@ -351,14 +350,14 @@ public class EvalTypeId extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { IType type= buffer.unmarshalType(); ICPPEvaluation[] args= null; int len= buffer.getInt(); args = new ICPPEvaluation[len]; for (int i = 0; i < args.length; i++) { - args[i]= (ICPPEvaluation) buffer.unmarshalEvaluation(); + args[i]= buffer.unmarshalEvaluation(); } IBinding templateDefinition= buffer.unmarshalBinding(); boolean forNewExpression = (firstBytes & ITypeMarshalBuffer.FLAG1) != 0; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java index e97c75ae03b..5a847ba01b4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java @@ -53,7 +53,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember; import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; @@ -367,10 +366,10 @@ public class EvalUnary extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { int op= buffer.getByte(); - ICPPEvaluation arg= (ICPPEvaluation) buffer.unmarshalEvaluation(); + ICPPEvaluation arg= buffer.unmarshalEvaluation(); IBinding binding= buffer.unmarshalBinding(); IBinding templateDefinition= buffer.unmarshalBinding(); return new EvalUnary(op, arg, binding, templateDefinition); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnaryTypeID.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnaryTypeID.java index 237b36aca2b..93f0ad62977 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnaryTypeID.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnaryTypeID.java @@ -45,7 +45,6 @@ import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IValue; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.IntegralValue; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; @@ -199,7 +198,7 @@ public class EvalUnaryTypeID extends CPPDependentEvaluation { marshalTemplateDefinition(buffer); } - public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { + public static ICPPEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { int op= buffer.getByte(); IType arg= buffer.unmarshalType(); IBinding templateDefinition= buffer.unmarshalBinding(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SignatureBuilder.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SignatureBuilder.java index c38912b1ce0..6c5b28b9a5f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SignatureBuilder.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SignatureBuilder.java @@ -18,10 +18,10 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter; import org.eclipse.cdt.core.parser.util.CharArrayUtils; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ISerializableExecution; import org.eclipse.cdt.internal.core.dom.parser.ISerializableType; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; import org.eclipse.core.runtime.CoreException; class SignatureBuilder implements ITypeMarshalBuffer { @@ -83,7 +83,7 @@ class SignatureBuilder implements ITypeMarshalBuffer { } @Override - public void marshalEvaluation(ISerializableEvaluation eval, boolean includeValues) throws CoreException { + public void marshalEvaluation(ICPPEvaluation eval, boolean includeValues) throws CoreException { if (eval == null) { putShort(NULL_TYPE); } else { @@ -173,7 +173,7 @@ class SignatureBuilder implements ITypeMarshalBuffer { } @Override - public ISerializableEvaluation unmarshalEvaluation() throws CoreException { + public ICPPEvaluation unmarshalEvaluation() throws CoreException { throw new UnsupportedOperationException(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfDependentExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfDependentExpression.java index f88cf646e1f..687ba79c864 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfDependentExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfDependentExpression.java @@ -14,7 +14,6 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IType; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ISerializableType; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; @@ -67,9 +66,9 @@ public class TypeOfDependentExpression extends CPPUnknownBinding implements ICPP } public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ISerializableEvaluation eval= buffer.unmarshalEvaluation(); - if (eval instanceof ICPPEvaluation) - return new TypeOfDependentExpression((ICPPEvaluation) eval); + ICPPEvaluation eval= buffer.unmarshalEvaluation(); + if (eval != null) + return new TypeOfDependentExpression(eval); return ProblemType.UNKNOWN_FOR_EXPRESSION; } 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 6138e949b10..ef637908f10 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 @@ -39,10 +39,10 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPUsingDirective; import org.eclipse.cdt.core.index.IIndexLinkage; import org.eclipse.cdt.core.parser.util.CharArrayMap; import org.eclipse.cdt.internal.core.dom.parser.ASTInternal; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ISerializableExecution; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.ProblemBinding; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; import org.eclipse.cdt.internal.core.index.IIndexBindingConstants; import org.eclipse.cdt.internal.core.index.IIndexScope; import org.eclipse.cdt.internal.core.pdom.PDOM; @@ -429,7 +429,7 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage public abstract PDOMBinding addTypeBinding(IBinding binding) throws CoreException; public abstract IType unmarshalType(ITypeMarshalBuffer buffer) throws CoreException; public abstract IBinding unmarshalBinding(ITypeMarshalBuffer buffer) throws CoreException; - public abstract ISerializableEvaluation unmarshalEvaluation(ITypeMarshalBuffer typeMarshalBuffer) throws CoreException; + public abstract ICPPEvaluation unmarshalEvaluation(ITypeMarshalBuffer typeMarshalBuffer) throws CoreException; public abstract ISerializableExecution unmarshalExecution(ITypeMarshalBuffer typeMarhsalBuffer) throws CoreException; public void storeType(long offset, IType type) throws CoreException { @@ -669,13 +669,13 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage return buffer.unmarshalValue(); } - public void storeEvaluation(long offset, ISerializableEvaluation eval) throws CoreException { + public void storeEvaluation(long offset, ICPPEvaluation eval) throws CoreException { final Database db= getDB(); deleteEvaluation(db, offset); storeEvaluation(db, offset, eval); } - private void storeEvaluation(Database db, long offset, ISerializableEvaluation eval) throws CoreException { + private void storeEvaluation(Database db, long offset, ICPPEvaluation eval) throws CoreException { if (eval != null) { TypeMarshalBuffer bc= new TypeMarshalBuffer(this); bc.marshalEvaluation(eval, true); @@ -687,7 +687,7 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage deleteSerializedData(db, offset, Database.EVALUATION_SIZE); } - public ISerializableEvaluation loadEvaluation(long offset) throws CoreException { + public ICPPEvaluation loadEvaluation(long offset) throws CoreException { TypeMarshalBuffer buffer = loadBuffer(offset, Database.EVALUATION_SIZE); if (buffer == null) return null; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/TypeMarshalBuffer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/TypeMarshalBuffer.java index 42288599aaa..25182077924 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/TypeMarshalBuffer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/TypeMarshalBuffer.java @@ -23,7 +23,6 @@ import org.eclipse.cdt.internal.core.dom.parser.CStringValue; import org.eclipse.cdt.internal.core.dom.parser.CompositeValue; import org.eclipse.cdt.internal.core.dom.parser.DependentValue; import org.eclipse.cdt.internal.core.dom.parser.FloatingPointValue; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ISerializableExecution; import org.eclipse.cdt.internal.core.dom.parser.ISerializableType; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; @@ -160,7 +159,7 @@ public final class TypeMarshalBuffer implements ITypeMarshalBuffer { } @Override - public void marshalEvaluation(ISerializableEvaluation eval, boolean includeValues) throws CoreException { + public void marshalEvaluation(ICPPEvaluation eval, boolean includeValues) throws CoreException { if (eval == null) { putShort(NULL_TYPE); } else { @@ -178,7 +177,7 @@ public final class TypeMarshalBuffer implements ITypeMarshalBuffer { } @Override - public ISerializableEvaluation unmarshalEvaluation() throws CoreException { + public ICPPEvaluation unmarshalEvaluation() throws CoreException { return fLinkage.unmarshalEvaluation(this); } @@ -238,7 +237,7 @@ public final class TypeMarshalBuffer implements ITypeMarshalBuffer { int oldPos = fPos; short firstBytes = getShort(); if (firstBytes == VALUE) { - return new CPPTemplateNonTypeArgument((ICPPEvaluation) unmarshalEvaluation(), null); + return new CPPTemplateNonTypeArgument(unmarshalEvaluation(), null); } else { fPos = oldPos; IType type = unmarshalType(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java index 0f1d910e471..bf112f9221f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java @@ -26,7 +26,6 @@ import org.eclipse.cdt.core.dom.ast.ITypedef; import org.eclipse.cdt.core.dom.ast.IVariable; import org.eclipse.cdt.core.index.IIndexBinding; import org.eclipse.cdt.internal.core.dom.ast.tag.TagManager; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ISerializableExecution; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; @@ -35,6 +34,7 @@ import org.eclipse.cdt.internal.core.dom.parser.c.CBasicType; import org.eclipse.cdt.internal.core.dom.parser.c.CFunctionType; import org.eclipse.cdt.internal.core.dom.parser.c.CPointerType; import org.eclipse.cdt.internal.core.dom.parser.c.CQualifierType; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; import org.eclipse.cdt.internal.core.index.IIndexBindingConstants; import org.eclipse.cdt.internal.core.index.IIndexCBindingConstants; import org.eclipse.cdt.internal.core.index.composite.CompositeIndexBinding; @@ -381,7 +381,7 @@ class PDOMCLinkage extends PDOMLinkage implements IIndexCBindingConstants { } @Override - public ISerializableEvaluation unmarshalEvaluation(ITypeMarshalBuffer buffer) + public ICPPEvaluation unmarshalEvaluation(ITypeMarshalBuffer buffer) throws CoreException { throw new CoreException(CCorePlugin.createStatus("Cannot unmarshal an evaluation, first byte=" + buffer.getByte())); //$NON-NLS-1$ } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java index f4c622e3088..4818ce30e73 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java @@ -86,7 +86,6 @@ import org.eclipse.cdt.core.parser.util.ArrayUtil; import org.eclipse.cdt.internal.core.Util; import org.eclipse.cdt.internal.core.dom.ast.tag.TagManager; import org.eclipse.cdt.internal.core.dom.parser.ASTInternal; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ISerializableExecution; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; @@ -108,6 +107,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownClassInstance; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownMember; import org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDeferredClassInstance; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalEnumerator; @@ -1569,7 +1569,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { } @Override - public ISerializableEvaluation unmarshalEvaluation(ITypeMarshalBuffer buffer) throws CoreException { + public ICPPEvaluation unmarshalEvaluation(ITypeMarshalBuffer buffer) throws CoreException { short firstBytes= buffer.getShort(); if (firstBytes == TypeMarshalBuffer.NULL_TYPE) return null; diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java index 097de0081af..0cc32d2c064 100644 --- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java +++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java @@ -17,9 +17,9 @@ import org.eclipse.cdt.core.dom.ILinkage; import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IType; -import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ISerializableExecution; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; import org.eclipse.cdt.internal.core.pdom.PDOM; import org.eclipse.cdt.internal.core.pdom.db.Database; import org.eclipse.cdt.internal.core.pdom.db.IBTreeComparator; @@ -294,7 +294,7 @@ public class QtPDOMLinkage extends PDOMLinkage { } @Override - public ISerializableEvaluation unmarshalEvaluation(ITypeMarshalBuffer typeMarshalBuffer) throws CoreException { + public ICPPEvaluation unmarshalEvaluation(ITypeMarshalBuffer typeMarshalBuffer) throws CoreException { throw new CoreException(Activator.error("Qt Linkage does not marshal evaluations")); //$NON-NLS-1$ }