mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
Remove the redundant ISerializableExecution interface
Change-Id: If7b2fdcf372685c9a251d92e6e24ed40188e449a
This commit is contained in:
parent
4405ae2580
commit
3f3b8b2ee7
26 changed files with 70 additions and 102 deletions
|
@ -1,24 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik
|
|
||||||
* Rapperswil, University of applied sciences 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
|
|
||||||
*******************************************************************************/
|
|
||||||
package org.eclipse.cdt.internal.core.dom.parser;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.CoreException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Interface for marshalling ICPPExecution objects for storage in the index.
|
|
||||||
*/
|
|
||||||
public interface ISerializableExecution {
|
|
||||||
/**
|
|
||||||
* Marshals an ICPPExecution object for storage in the index.
|
|
||||||
*
|
|
||||||
* @param buffer The buffer that will hold the marshalled ICPPExecution object.
|
|
||||||
* @param includeValue Specifies whether nested IValue objects should be marshalled as well.
|
|
||||||
* */
|
|
||||||
void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException;
|
|
||||||
}
|
|
|
@ -18,6 +18,7 @@ import org.eclipse.cdt.core.dom.ast.IType;
|
||||||
import org.eclipse.cdt.core.dom.ast.IValue;
|
import org.eclipse.cdt.core.dom.ast.IValue;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||||
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -118,7 +119,7 @@ public interface ITypeMarshalBuffer {
|
||||||
IValue unmarshalValue() throws CoreException;
|
IValue unmarshalValue() throws CoreException;
|
||||||
IBinding unmarshalBinding() throws CoreException;
|
IBinding unmarshalBinding() throws CoreException;
|
||||||
ICPPEvaluation unmarshalEvaluation() throws CoreException;
|
ICPPEvaluation unmarshalEvaluation() throws CoreException;
|
||||||
ISerializableExecution unmarshalExecution() throws CoreException;
|
ICPPExecution unmarshalExecution() throws CoreException;
|
||||||
ICPPTemplateArgument unmarshalTemplateArgument() throws CoreException;
|
ICPPTemplateArgument unmarshalTemplateArgument() throws CoreException;
|
||||||
int getByte() throws CoreException;
|
int getByte() throws CoreException;
|
||||||
int getFixedInt() throws CoreException;
|
int getFixedInt() throws CoreException;
|
||||||
|
@ -144,7 +145,7 @@ public interface ITypeMarshalBuffer {
|
||||||
void marshalValue(IValue value) throws CoreException;
|
void marshalValue(IValue value) throws CoreException;
|
||||||
void marshalBinding(IBinding binding) throws CoreException;
|
void marshalBinding(IBinding binding) throws CoreException;
|
||||||
void marshalEvaluation(ICPPEvaluation eval, boolean includeValue) throws CoreException;
|
void marshalEvaluation(ICPPEvaluation eval, boolean includeValue) throws CoreException;
|
||||||
void marshalExecution(ISerializableExecution exec, boolean includeValue) throws CoreException;
|
void marshalExecution(ICPPExecution exec, boolean includeValue) throws CoreException;
|
||||||
void marshalTemplateArgument(ICPPTemplateArgument arg) throws CoreException;
|
void marshalTemplateArgument(ICPPTemplateArgument arg) throws CoreException;
|
||||||
void putByte(byte data);
|
void putByte(byte data);
|
||||||
void putFixedInt(int data);
|
void putFixedInt(int data);
|
||||||
|
|
|
@ -8,14 +8,15 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||||
|
|
||||||
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.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ActivationRecord;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ActivationRecord;
|
||||||
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assists in executing statements for constexpr evaluation
|
* Assists in executing statements for constexpr evaluation
|
||||||
*/
|
*/
|
||||||
public interface ICPPExecution extends ISerializableExecution {
|
public interface ICPPExecution {
|
||||||
/**
|
/**
|
||||||
* Instantiates the execution with the provided template parameter map and pack offset.
|
* Instantiates the execution with the provided template parameter map and pack offset.
|
||||||
* The context is used to replace templates with their specialization, where appropriate.
|
* The context is used to replace templates with their specialization, where appropriate.
|
||||||
|
@ -32,4 +33,12 @@ public interface ICPPExecution extends ISerializableExecution {
|
||||||
* @return the computed execution
|
* @return the computed execution
|
||||||
*/
|
*/
|
||||||
ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context);
|
ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Marshals an ICPPExecution object for storage in the index.
|
||||||
|
*
|
||||||
|
* @param buffer The buffer that will hold the marshalled ICPPExecution object.
|
||||||
|
* @param includeValue Specifies whether nested IValue objects should be marshalled as well.
|
||||||
|
* */
|
||||||
|
void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||||
|
@ -31,7 +30,7 @@ public class ExecBreak implements ICPPExecution {
|
||||||
buffer.putShort(ITypeMarshalBuffer.EXEC_BREAK);
|
buffer.putShort(ITypeMarshalBuffer.EXEC_BREAK);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
return new ExecBreak();
|
return new ExecBreak();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
|
@ -53,8 +52,8 @@ public class ExecCase implements ICPPExecution {
|
||||||
buffer.marshalEvaluation(caseExprEval, includeValue);
|
buffer.marshalEvaluation(caseExprEval, includeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
ICPPEvaluation caseExprEval = (ICPPEvaluation) buffer.unmarshalEvaluation();
|
ICPPEvaluation caseExprEval = buffer.unmarshalEvaluation();
|
||||||
return new ExecCase(caseExprEval);
|
return new ExecCase(caseExprEval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTStatement;
|
import org.eclipse.cdt.core.dom.ast.IASTStatement;
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||||
|
@ -71,11 +70,11 @@ public class ExecCompoundStatement implements ICPPExecution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
int len = buffer.getInt();
|
int len = buffer.getInt();
|
||||||
ICPPExecution[] executions = new ICPPExecution[len];
|
ICPPExecution[] executions = new ICPPExecution[len];
|
||||||
for (int i = 0; i < executions.length; i++) {
|
for (int i = 0; i < executions.length; i++) {
|
||||||
executions[i] = (ICPPExecution) buffer.unmarshalExecution();
|
executions[i] = buffer.unmarshalExecution();
|
||||||
}
|
}
|
||||||
return new ExecCompoundStatement(executions);
|
return new ExecCompoundStatement(executions);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
|
@ -54,12 +53,12 @@ public class ExecConstructorChain implements ICPPExecution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
int len = buffer.getInt();
|
int len = buffer.getInt();
|
||||||
Map<IBinding, ICPPEvaluation> ccInitializers = new HashMap<>();
|
Map<IBinding, ICPPEvaluation> ccInitializers = new HashMap<>();
|
||||||
for (int i = 0; i < len; i++) {
|
for (int i = 0; i < len; i++) {
|
||||||
IBinding member = buffer.unmarshalBinding();
|
IBinding member = buffer.unmarshalBinding();
|
||||||
ICPPEvaluation memberEval = (ICPPEvaluation) buffer.unmarshalEvaluation();
|
ICPPEvaluation memberEval = buffer.unmarshalEvaluation();
|
||||||
ccInitializers.put(member, memberEval);
|
ccInitializers.put(member, memberEval);
|
||||||
}
|
}
|
||||||
return new ExecConstructorChain(ccInitializers);
|
return new ExecConstructorChain(ccInitializers);
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||||
|
@ -31,7 +30,7 @@ public class ExecContinue implements ICPPExecution {
|
||||||
buffer.putShort(ITypeMarshalBuffer.EXEC_CONTINUE);
|
buffer.putShort(ITypeMarshalBuffer.EXEC_CONTINUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
return new ExecContinue();
|
return new ExecContinue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||||
|
@ -46,8 +45,8 @@ public class ExecDeclarationStatement implements ICPPExecution {
|
||||||
buffer.marshalExecution(declarationExec, includeValue);
|
buffer.marshalExecution(declarationExec, includeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
ICPPExecution declarationExec = (ICPPExecution) buffer.unmarshalExecution();
|
ICPPExecution declarationExec = buffer.unmarshalExecution();
|
||||||
return new ExecDeclarationStatement(declarationExec);
|
return new ExecDeclarationStatement(declarationExec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.CompositeValue;
|
import org.eclipse.cdt.internal.core.dom.parser.CompositeValue;
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPBasicType;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPBasicType;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPQualifierType;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPQualifierType;
|
||||||
|
@ -249,9 +248,9 @@ public final class ExecDeclarator implements ICPPExecution {
|
||||||
buffer.marshalEvaluation(initializerEval, includeValue);
|
buffer.marshalEvaluation(initializerEval, includeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
ICPPBinding declaredBinding = (ICPPBinding) buffer.unmarshalBinding();
|
ICPPBinding declaredBinding = (ICPPBinding) buffer.unmarshalBinding();
|
||||||
ICPPEvaluation initializerEval = (ICPPEvaluation) buffer.unmarshalEvaluation();
|
ICPPEvaluation initializerEval = buffer.unmarshalEvaluation();
|
||||||
return new ExecDeclarator(declaredBinding, initializerEval);
|
return new ExecDeclarator(declaredBinding, initializerEval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||||
|
@ -31,7 +30,7 @@ public class ExecDefault implements ICPPExecution {
|
||||||
buffer.putShort(ITypeMarshalBuffer.EXEC_DEFAULT);
|
buffer.putShort(ITypeMarshalBuffer.EXEC_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
return new ExecDefault();
|
return new ExecDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
|
@ -59,9 +58,9 @@ public class ExecDo implements ICPPExecution {
|
||||||
buffer.marshalExecution(bodyExec, includeValue);
|
buffer.marshalExecution(bodyExec, includeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
ICPPEvaluation conditionEval = (ICPPEvaluation) buffer.unmarshalEvaluation();
|
ICPPEvaluation conditionEval = buffer.unmarshalEvaluation();
|
||||||
ICPPExecution bodyExec = (ICPPExecution) buffer.unmarshalExecution();
|
ICPPExecution bodyExec = buffer.unmarshalExecution();
|
||||||
return new ExecDo(conditionEval, bodyExec);
|
return new ExecDo(conditionEval, bodyExec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
|
@ -47,8 +46,8 @@ public class ExecExpressionStatement implements ICPPExecution {
|
||||||
buffer.marshalEvaluation(exprEval, includeValue);
|
buffer.marshalEvaluation(exprEval, includeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
ICPPEvaluation exprEval = (ICPPEvaluation) buffer.unmarshalEvaluation();
|
ICPPEvaluation exprEval = buffer.unmarshalEvaluation();
|
||||||
return new ExecExpressionStatement(exprEval);
|
return new ExecExpressionStatement(exprEval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
|
@ -98,12 +97,12 @@ public class ExecFor implements ICPPExecution {
|
||||||
buffer.marshalExecution(bodyExec, includeValue);
|
buffer.marshalExecution(bodyExec, includeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
ICPPExecution initializerExec = (ICPPExecution) buffer.unmarshalExecution();
|
ICPPExecution initializerExec = buffer.unmarshalExecution();
|
||||||
ICPPEvaluation conditionExprEval = (ICPPEvaluation) buffer.unmarshalEvaluation();
|
ICPPEvaluation conditionExprEval = buffer.unmarshalEvaluation();
|
||||||
ExecSimpleDeclaration conditionDeclExec = (ExecSimpleDeclaration) buffer.unmarshalExecution();
|
ExecSimpleDeclaration conditionDeclExec = (ExecSimpleDeclaration) buffer.unmarshalExecution();
|
||||||
ICPPEvaluation iterationEval = (ICPPEvaluation) buffer.unmarshalEvaluation();
|
ICPPEvaluation iterationEval = buffer.unmarshalEvaluation();
|
||||||
ICPPExecution bodyExec = (ICPPExecution) buffer.unmarshalExecution();
|
ICPPExecution bodyExec = buffer.unmarshalExecution();
|
||||||
return new ExecFor(initializerExec, conditionExprEval, conditionDeclExec, iterationEval, bodyExec);
|
return new ExecFor(initializerExec, conditionExprEval, conditionDeclExec, iterationEval, bodyExec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
|
@ -67,11 +66,11 @@ public class ExecIf implements ICPPExecution {
|
||||||
buffer.marshalExecution(elseClauseExec, includeValue);
|
buffer.marshalExecution(elseClauseExec, includeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
ICPPEvaluation conditionExprEval = (ICPPEvaluation) buffer.unmarshalEvaluation();
|
ICPPEvaluation conditionExprEval = buffer.unmarshalEvaluation();
|
||||||
ExecSimpleDeclaration conditionDeclExec = (ExecSimpleDeclaration) buffer.unmarshalExecution();
|
ExecSimpleDeclaration conditionDeclExec = (ExecSimpleDeclaration) buffer.unmarshalExecution();
|
||||||
ICPPExecution thenClauseExec = (ICPPExecution) buffer.unmarshalExecution();
|
ICPPExecution thenClauseExec = buffer.unmarshalExecution();
|
||||||
ICPPExecution elseClauseExec = (ICPPExecution) buffer.unmarshalExecution();
|
ICPPExecution elseClauseExec = buffer.unmarshalExecution();
|
||||||
return new ExecIf(conditionExprEval, conditionDeclExec, thenClauseExec, elseClauseExec);
|
return new ExecIf(conditionExprEval, conditionDeclExec, thenClauseExec, elseClauseExec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,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.ICPPFunction;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType;
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
|
@ -186,12 +185,12 @@ public class ExecRangeBasedFor implements ICPPExecution {
|
||||||
buffer.marshalExecution(bodyExec, includeValue);
|
buffer.marshalExecution(bodyExec, includeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
ExecSimpleDeclaration declarationExec = (ExecSimpleDeclaration) buffer.unmarshalExecution();
|
ExecSimpleDeclaration declarationExec = (ExecSimpleDeclaration) buffer.unmarshalExecution();
|
||||||
ICPPEvaluation initClauseEval = (ICPPEvaluation) buffer.unmarshalEvaluation();
|
ICPPEvaluation initClauseEval = buffer.unmarshalEvaluation();
|
||||||
ICPPFunction begin = (ICPPFunction) buffer.unmarshalBinding();
|
ICPPFunction begin = (ICPPFunction) buffer.unmarshalBinding();
|
||||||
ICPPFunction end = (ICPPFunction) buffer.unmarshalBinding();
|
ICPPFunction end = (ICPPFunction) buffer.unmarshalBinding();
|
||||||
ICPPExecution bodyExec = (ICPPExecution) buffer.unmarshalExecution();
|
ICPPExecution bodyExec = buffer.unmarshalExecution();
|
||||||
return new ExecRangeBasedFor(declarationExec, initClauseEval, begin, end, bodyExec);
|
return new ExecRangeBasedFor(declarationExec, initClauseEval, begin, end, bodyExec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
|
@ -51,8 +50,8 @@ public class ExecReturn implements ICPPExecution {
|
||||||
buffer.marshalEvaluation(retVal, includeValue);
|
buffer.marshalEvaluation(retVal, includeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
ICPPEvaluation retVal = (ICPPEvaluation) buffer.unmarshalEvaluation();
|
ICPPEvaluation retVal = buffer.unmarshalEvaluation();
|
||||||
return new ExecReturn(retVal);
|
return new ExecReturn(retVal);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -8,7 +8,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||||
|
@ -53,11 +52,11 @@ public class ExecSimpleDeclaration implements ICPPExecution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
int len = buffer.getInt();
|
int len = buffer.getInt();
|
||||||
ICPPExecution[] declaratorExecutions = new ICPPExecution[len];
|
ICPPExecution[] declaratorExecutions = new ICPPExecution[len];
|
||||||
for (int i = 0; i < declaratorExecutions.length; i++) {
|
for (int i = 0; i < declaratorExecutions.length; i++) {
|
||||||
declaratorExecutions[i] = (ICPPExecution) buffer.unmarshalExecution();
|
declaratorExecutions[i] = buffer.unmarshalExecution();
|
||||||
}
|
}
|
||||||
return new ExecSimpleDeclaration(declaratorExecutions);
|
return new ExecSimpleDeclaration(declaratorExecutions);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.IValue;
|
import org.eclipse.cdt.core.dom.ast.IValue;
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
|
@ -103,13 +102,13 @@ public class ExecSwitch implements ICPPExecution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
ICPPEvaluation controllerExprEval = (ICPPEvaluation) buffer.unmarshalEvaluation();
|
ICPPEvaluation controllerExprEval = buffer.unmarshalEvaluation();
|
||||||
ExecSimpleDeclaration controllerDeclExec = (ExecSimpleDeclaration) buffer.unmarshalExecution();
|
ExecSimpleDeclaration controllerDeclExec = (ExecSimpleDeclaration) buffer.unmarshalExecution();
|
||||||
int len = buffer.getInt();
|
int len = buffer.getInt();
|
||||||
ICPPExecution[] bodyStmtExecutions = new ICPPExecution[len];
|
ICPPExecution[] bodyStmtExecutions = new ICPPExecution[len];
|
||||||
for (int i = 0; i < bodyStmtExecutions.length; i++) {
|
for (int i = 0; i < bodyStmtExecutions.length; i++) {
|
||||||
bodyStmtExecutions[i] = (ICPPExecution) buffer.unmarshalExecution();
|
bodyStmtExecutions[i] = buffer.unmarshalExecution();
|
||||||
}
|
}
|
||||||
return new ExecSwitch(controllerExprEval, controllerDeclExec, bodyStmtExecutions);
|
return new ExecSwitch(controllerExprEval, controllerDeclExec, bodyStmtExecutions);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEvaluationContext;
|
||||||
|
@ -74,10 +73,10 @@ public class ExecWhile implements ICPPExecution {
|
||||||
buffer.marshalExecution(bodyExec, includeValue);
|
buffer.marshalExecution(bodyExec, includeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static ICPPExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
ICPPEvaluation conditionExprEval = (ICPPEvaluation) buffer.unmarshalEvaluation();
|
ICPPEvaluation conditionExprEval = buffer.unmarshalEvaluation();
|
||||||
ExecSimpleDeclaration conditionDeclExec = (ExecSimpleDeclaration) buffer.unmarshalExecution();
|
ExecSimpleDeclaration conditionDeclExec = (ExecSimpleDeclaration) buffer.unmarshalExecution();
|
||||||
ICPPExecution bodyExec = (ICPPExecution) buffer.unmarshalExecution();
|
ICPPExecution bodyExec = buffer.unmarshalExecution();
|
||||||
return new ExecWhile(conditionExprEval, conditionDeclExec, bodyExec);
|
return new ExecWhile(conditionExprEval, conditionDeclExec, bodyExec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.ICPPTemplateArgument;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
|
||||||
import org.eclipse.cdt.core.parser.util.CharArrayUtils;
|
import org.eclipse.cdt.core.parser.util.CharArrayUtils;
|
||||||
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.ISerializableType;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer;
|
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.ICPPEvaluation;
|
||||||
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
|
||||||
class SignatureBuilder implements ITypeMarshalBuffer {
|
class SignatureBuilder implements ITypeMarshalBuffer {
|
||||||
|
@ -92,7 +92,7 @@ class SignatureBuilder implements ITypeMarshalBuffer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void marshalExecution(ISerializableExecution exec, boolean includeValue) throws CoreException {
|
public void marshalExecution(ICPPExecution exec, boolean includeValue) throws CoreException {
|
||||||
if (exec == null) {
|
if (exec == null) {
|
||||||
putShort(NULL_TYPE);
|
putShort(NULL_TYPE);
|
||||||
} else {
|
} else {
|
||||||
|
@ -178,7 +178,7 @@ class SignatureBuilder implements ITypeMarshalBuffer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ISerializableExecution unmarshalExecution() throws CoreException {
|
public ICPPExecution unmarshalExecution() throws CoreException {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.index.IIndexLinkage;
|
||||||
import org.eclipse.cdt.core.parser.util.CharArrayMap;
|
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.ASTInternal;
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.ProblemBinding;
|
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.dom.parser.cpp.ICPPEvaluation;
|
||||||
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||||
import org.eclipse.cdt.internal.core.index.IIndexBindingConstants;
|
import org.eclipse.cdt.internal.core.index.IIndexBindingConstants;
|
||||||
import org.eclipse.cdt.internal.core.index.IIndexScope;
|
import org.eclipse.cdt.internal.core.index.IIndexScope;
|
||||||
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
||||||
|
@ -430,7 +430,7 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage
|
||||||
public abstract IType unmarshalType(ITypeMarshalBuffer buffer) throws CoreException;
|
public abstract IType unmarshalType(ITypeMarshalBuffer buffer) throws CoreException;
|
||||||
public abstract IBinding unmarshalBinding(ITypeMarshalBuffer buffer) throws CoreException;
|
public abstract IBinding unmarshalBinding(ITypeMarshalBuffer buffer) throws CoreException;
|
||||||
public abstract ICPPEvaluation unmarshalEvaluation(ITypeMarshalBuffer typeMarshalBuffer) throws CoreException;
|
public abstract ICPPEvaluation unmarshalEvaluation(ITypeMarshalBuffer typeMarshalBuffer) throws CoreException;
|
||||||
public abstract ISerializableExecution unmarshalExecution(ITypeMarshalBuffer typeMarhsalBuffer) throws CoreException;
|
public abstract ICPPExecution unmarshalExecution(ITypeMarshalBuffer typeMarhsalBuffer) throws CoreException;
|
||||||
|
|
||||||
public void storeType(long offset, IType type) throws CoreException {
|
public void storeType(long offset, IType type) throws CoreException {
|
||||||
final Database db= getDB();
|
final Database db= getDB();
|
||||||
|
@ -694,13 +694,13 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage
|
||||||
return buffer.unmarshalEvaluation();
|
return buffer.unmarshalEvaluation();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void storeExecution(long offset, ISerializableExecution exec) throws CoreException {
|
public void storeExecution(long offset, ICPPExecution exec) throws CoreException {
|
||||||
final Database db = getDB();
|
final Database db = getDB();
|
||||||
deleteExecution(db, offset);
|
deleteExecution(db, offset);
|
||||||
storeExecution(db, offset, exec);
|
storeExecution(db, offset, exec);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void storeExecution(Database db, long offset, ISerializableExecution exec) throws CoreException {
|
private void storeExecution(Database db, long offset, ICPPExecution exec) throws CoreException {
|
||||||
if (exec != null) {
|
if (exec != null) {
|
||||||
TypeMarshalBuffer bc = new TypeMarshalBuffer(this);
|
TypeMarshalBuffer bc = new TypeMarshalBuffer(this);
|
||||||
bc.marshalExecution(exec, true);
|
bc.marshalExecution(exec, true);
|
||||||
|
@ -712,7 +712,7 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage
|
||||||
deleteSerializedData(db, offset, Database.EXECUTION_SIZE);
|
deleteSerializedData(db, offset, Database.EXECUTION_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ISerializableExecution loadExecution(long offset) throws CoreException {
|
public ICPPExecution loadExecution(long offset) throws CoreException {
|
||||||
TypeMarshalBuffer buffer = loadBuffer(offset, Database.EXECUTION_SIZE);
|
TypeMarshalBuffer buffer = loadBuffer(offset, Database.EXECUTION_SIZE);
|
||||||
if (buffer == null)
|
if (buffer == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -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.CompositeValue;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.DependentValue;
|
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.FloatingPointValue;
|
||||||
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.ISerializableType;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer;
|
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.IntegralValue;
|
||||||
|
@ -32,6 +31,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ProblemType;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateNonTypeArgument;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateNonTypeArgument;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateTypeArgument;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateTypeArgument;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
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.pdom.db.Database;
|
import org.eclipse.cdt.internal.core.pdom.db.Database;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ public final class TypeMarshalBuffer implements ITypeMarshalBuffer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void marshalExecution(ISerializableExecution exec, boolean includeValue) throws CoreException {
|
public void marshalExecution(ICPPExecution exec, boolean includeValue) throws CoreException {
|
||||||
if (exec == null) {
|
if (exec == null) {
|
||||||
putShort(NULL_TYPE);
|
putShort(NULL_TYPE);
|
||||||
} else {
|
} else {
|
||||||
|
@ -182,7 +182,7 @@ public final class TypeMarshalBuffer implements ITypeMarshalBuffer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ISerializableExecution unmarshalExecution() throws CoreException {
|
public ICPPExecution unmarshalExecution() throws CoreException {
|
||||||
return fLinkage.unmarshalExecution(this);
|
return fLinkage.unmarshalExecution(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.dom.ast.IVariable;
|
||||||
import org.eclipse.cdt.core.index.IIndexBinding;
|
import org.eclipse.cdt.core.index.IIndexBinding;
|
||||||
import org.eclipse.cdt.internal.core.dom.ast.tag.TagManager;
|
import org.eclipse.cdt.internal.core.dom.ast.tag.TagManager;
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.ProblemType;
|
import org.eclipse.cdt.internal.core.dom.parser.ProblemType;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.c.CArrayType;
|
import org.eclipse.cdt.internal.core.dom.parser.c.CArrayType;
|
||||||
|
@ -35,6 +34,7 @@ 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.CPointerType;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.c.CQualifierType;
|
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.dom.parser.cpp.ICPPEvaluation;
|
||||||
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||||
import org.eclipse.cdt.internal.core.index.IIndexBindingConstants;
|
import org.eclipse.cdt.internal.core.index.IIndexBindingConstants;
|
||||||
import org.eclipse.cdt.internal.core.index.IIndexCBindingConstants;
|
import org.eclipse.cdt.internal.core.index.IIndexCBindingConstants;
|
||||||
import org.eclipse.cdt.internal.core.index.composite.CompositeIndexBinding;
|
import org.eclipse.cdt.internal.core.index.composite.CompositeIndexBinding;
|
||||||
|
@ -387,7 +387,7 @@ class PDOMCLinkage extends PDOMLinkage implements IIndexCBindingConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ISerializableExecution unmarshalExecution(ITypeMarshalBuffer buffer)
|
public ICPPExecution unmarshalExecution(ITypeMarshalBuffer buffer)
|
||||||
throws CoreException {
|
throws CoreException {
|
||||||
throw new CoreException(CCorePlugin.createStatus("Cannot unmarshal an execution, first byte=" + buffer.getByte())); //$NON-NLS-1$
|
throw new CoreException(CCorePlugin.createStatus("Cannot unmarshal an execution, first byte=" + buffer.getByte())); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.Util;
|
||||||
import org.eclipse.cdt.internal.core.dom.ast.tag.TagManager;
|
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.ASTInternal;
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.ProblemType;
|
import org.eclipse.cdt.internal.core.dom.parser.ProblemType;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPArrayType;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPArrayType;
|
||||||
|
@ -1619,7 +1618,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ISerializableExecution unmarshalExecution(ITypeMarshalBuffer buffer) throws CoreException {
|
public ICPPExecution unmarshalExecution(ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
short firstBytes = buffer.getShort();
|
short firstBytes = buffer.getShort();
|
||||||
if(firstBytes == TypeMarshalBuffer.NULL_TYPE)
|
if(firstBytes == TypeMarshalBuffer.NULL_TYPE)
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -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.IASTName;
|
||||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||||
import org.eclipse.cdt.core.dom.ast.IType;
|
import org.eclipse.cdt.core.dom.ast.IType;
|
||||||
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.ITypeMarshalBuffer;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
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.pdom.PDOM;
|
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.Database;
|
||||||
import org.eclipse.cdt.internal.core.pdom.db.IBTreeComparator;
|
import org.eclipse.cdt.internal.core.pdom.db.IBTreeComparator;
|
||||||
|
@ -299,7 +299,7 @@ public class QtPDOMLinkage extends PDOMLinkage {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ISerializableExecution unmarshalExecution(ITypeMarshalBuffer typeMarhsalBuffer) throws CoreException {
|
public ICPPExecution unmarshalExecution(ITypeMarshalBuffer typeMarhsalBuffer) throws CoreException {
|
||||||
throw new CoreException(Activator.error("Qt Linkage does not marshal executions")); //$NON-NLS-1$
|
throw new CoreException(Activator.error("Qt Linkage does not marshal executions")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue