瀏覽代碼

VariableDeclaration#type renamed to dataType.

au@andreasunger.net 14 年之前
父節點
當前提交
9a86cb6b5f
共有 12 個文件被更改,包括 82 次插入82 次删除
  1. 4 4
      org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.codegen.c/src/org/eclipselabs/mscript/codegen/c/CompoundGenerator.java
  2. 6 6
      org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.codegen.c/src/org/eclipselabs/mscript/codegen/c/MscriptGenerator.java
  3. 1 1
      org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/model/IL.ecore
  4. 1 1
      org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/model/IL.genmodel
  5. 20 20
      org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/il/ILPackage.java
  6. 10 10
      org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/il/VariableDeclaration.java
  7. 3 3
      org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/il/impl/ILPackageImpl.java
  8. 26 26
      org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/il/impl/VariableDeclarationImpl.java
  9. 2 2
      org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/il/transform/FunctionDefinitionTransformer.java
  10. 6 6
      org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/internal/il/transform/DataTypeAdaptor.java
  11. 1 1
      org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/interpreter/StaticInterpreterContext.java
  12. 2 2
      org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/interpreter/Variable.java

+ 4 - 4
org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.codegen.c/src/org/eclipselabs/mscript/codegen/c/CompoundGenerator.java

@@ -71,7 +71,7 @@ public class CompoundGenerator implements ICompoundGenerator {
 				writer.print("{\n");
 			}
 			for (LocalVariableDeclaration localVariableDeclaration : compound.getLocalVariableDeclarations()) {
-				writer.print(MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), localVariableDeclaration.getType(), localVariableDeclaration.getName(), false));
+				writer.print(MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), localVariableDeclaration.getDataType(), localVariableDeclaration.getName(), false));
 				writer.print(";\n");
 			}
 			for (Statement statement : compound.getStatements()) {
@@ -89,7 +89,7 @@ public class CompoundGenerator implements ICompoundGenerator {
 		@Override
 		public Boolean caseLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration) {
 			if (localVariableDeclaration.getInitializer() != null) {
-				writeAssignment(localVariableDeclaration.getType(), localVariableDeclaration.getName(), localVariableDeclaration.getInitializer());
+				writeAssignment(localVariableDeclaration.getDataType(), localVariableDeclaration.getName(), localVariableDeclaration.getInitializer());
 			}
 			return true;
 		}
@@ -99,7 +99,7 @@ public class CompoundGenerator implements ICompoundGenerator {
 		 */
 		@Override
 		public Boolean caseAssignment(Assignment assignment) {
-			writeAssignment(assignment.getTarget().getType(), new VariableAccessGenerator(context.getComputationModel(), variableAccessStrategy, assignment).generate(), assignment.getAssignedExpression());
+			writeAssignment(assignment.getTarget().getDataType(), new VariableAccessGenerator(context.getComputationModel(), variableAccessStrategy, assignment).generate(), assignment.getAssignedExpression());
 			return true;
 		}
 		
@@ -133,7 +133,7 @@ public class CompoundGenerator implements ICompoundGenerator {
 			}
 			
 			String itVarName = iterationVariableDeclaration.getName();
-			String itVarDecl = MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), iterationVariableDeclaration.getType(), itVarName, false);
+			String itVarDecl = MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), iterationVariableDeclaration.getDataType(), itVarName, false);
 			int size = collectionArrayType.getSize();
 			
 			writer.println("{");

+ 6 - 6
org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.codegen.c/src/org/eclipselabs/mscript/codegen/c/MscriptGenerator.java

@@ -97,7 +97,7 @@ public class MscriptGenerator {
 	
 	private void writeContextStructureMember(StatefulVariableDeclaration variableDeclaration) {
 		String name = variableDeclaration.getName();
-		DataType dataType = variableDeclaration.getType();
+		DataType dataType = variableDeclaration.getDataType();
 		if (variableDeclaration.getCircularBufferSize() > 1) {
 			int bufferSize = variableDeclaration.getCircularBufferSize();
 			writer.printf("%s[%d];\n",
@@ -193,11 +193,11 @@ public class MscriptGenerator {
 		writer.printf("void %s(%s_Context *context", functionDefinition.getName(), functionDefinition.getName());
 		for (InputVariableDeclaration inputVariableDeclaration : functionDefinition.getInputVariableDeclarations()) {
 			if (consumesInput(inputVariableDeclaration, true)) {
-				writer.printf(", %s", MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), inputVariableDeclaration.getType(), inputVariableDeclaration.getName(), false));
+				writer.printf(", %s", MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), inputVariableDeclaration.getDataType(), inputVariableDeclaration.getName(), false));
 			}
 		}
 		for (OutputVariableDeclaration outputVariableDeclaration: functionDefinition.getOutputVariableDeclarations()) {
-			writer.printf(", %s", MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), outputVariableDeclaration.getType(), outputVariableDeclaration.getName(), true));
+			writer.printf(", %s", MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), outputVariableDeclaration.getDataType(), outputVariableDeclaration.getName(), true));
 		}
 		writer.print(")");
 	}
@@ -234,7 +234,7 @@ public class MscriptGenerator {
 		writer.printf("void %s_update(%s_Context *context", functionDefinition.getName(), functionDefinition.getName());
 		for (InputVariableDeclaration inputVariableDeclaration : functionDefinition.getInputVariableDeclarations()) {
 			if (consumesInput(inputVariableDeclaration, false) || updatesInputContext(inputVariableDeclaration)) {
-				writer.printf(", %s", MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), inputVariableDeclaration.getType(), inputVariableDeclaration.getName(), false));
+				writer.printf(", %s", MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), inputVariableDeclaration.getDataType(), inputVariableDeclaration.getName(), false));
 			}
 		}
 		writer.print(")");
@@ -318,7 +318,7 @@ public class MscriptGenerator {
 			} else {
 				writer.print(", ");
 			}
-			writer.print(MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), inputVariableDeclaration.getType(), inputVariableDeclaration.getName(), false));
+			writer.print(MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), inputVariableDeclaration.getDataType(), inputVariableDeclaration.getName(), false));
 		}
 		for (OutputVariableDeclaration outputVariableDeclaration: functionDefinition.getOutputVariableDeclarations()) {
 			if (first) {
@@ -326,7 +326,7 @@ public class MscriptGenerator {
 			} else {
 				writer.print(", ");
 			}
-			writer.print(MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), outputVariableDeclaration.getType(), outputVariableDeclaration.getName(), true));
+			writer.print(MscriptGeneratorUtil.getCVariableDeclaration(context.getComputationModel(), outputVariableDeclaration.getDataType(), outputVariableDeclaration.getName(), true));
 		}
 		writer.print(")");
 	}

+ 1 - 1
org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/model/IL.ecore

@@ -35,7 +35,7 @@
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="VariableDeclaration" abstract="true">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="ecore:EClass ../../org.eclipselabs.mscript.typesystem/model/TypeSystem.ecore#//DataType"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="dataType" eType="ecore:EClass ../../org.eclipselabs.mscript.typesystem/model/TypeSystem.ecore#//DataType"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="StatefulVariableDeclaration" abstract="true"
       eSuperTypes="#//VariableDeclaration">

+ 1 - 1
org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/model/IL.genmodel

@@ -28,7 +28,7 @@
     </genClasses>
     <genClasses ecoreClass="IL.ecore#//VariableDeclaration">
       <genFeatures createChild="false" ecoreFeature="ecore:EAttribute IL.ecore#//VariableDeclaration/name"/>
-      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference IL.ecore#//VariableDeclaration/type"/>
+      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference IL.ecore#//VariableDeclaration/dataType"/>
     </genClasses>
     <genClasses image="false" ecoreClass="IL.ecore#//StatefulVariableDeclaration">
       <genFeatures createChild="false" ecoreFeature="ecore:EAttribute IL.ecore#//StatefulVariableDeclaration/circularBufferSize"/>

+ 20 - 20
org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/il/ILPackage.java

@@ -324,13 +324,13 @@ public interface ILPackage extends EPackage {
 	int VARIABLE_DECLARATION__NAME = 0;
 
 	/**
-	 * The feature id for the '<em><b>Type</b></em>' reference.
+	 * The feature id for the '<em><b>Data Type</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int VARIABLE_DECLARATION__TYPE = 1;
+	int VARIABLE_DECLARATION__DATA_TYPE = 1;
 
 	/**
 	 * The number of structural features of the '<em>Variable Declaration</em>' class.
@@ -351,13 +351,13 @@ public interface ILPackage extends EPackage {
 	int STATEFUL_VARIABLE_DECLARATION__NAME = VARIABLE_DECLARATION__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Type</b></em>' reference.
+	 * The feature id for the '<em><b>Data Type</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int STATEFUL_VARIABLE_DECLARATION__TYPE = VARIABLE_DECLARATION__TYPE;
+	int STATEFUL_VARIABLE_DECLARATION__DATA_TYPE = VARIABLE_DECLARATION__DATA_TYPE;
 
 	/**
 	 * The feature id for the '<em><b>Circular Buffer Size</b></em>' attribute.
@@ -397,13 +397,13 @@ public interface ILPackage extends EPackage {
 	int TEMPLATE_VARIABLE_DECLARATION__NAME = VARIABLE_DECLARATION__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Type</b></em>' reference.
+	 * The feature id for the '<em><b>Data Type</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int TEMPLATE_VARIABLE_DECLARATION__TYPE = VARIABLE_DECLARATION__TYPE;
+	int TEMPLATE_VARIABLE_DECLARATION__DATA_TYPE = VARIABLE_DECLARATION__DATA_TYPE;
 
 	/**
 	 * The feature id for the '<em><b>Value</b></em>' attribute.
@@ -433,13 +433,13 @@ public interface ILPackage extends EPackage {
 	int INPUT_VARIABLE_DECLARATION__NAME = STATEFUL_VARIABLE_DECLARATION__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Type</b></em>' reference.
+	 * The feature id for the '<em><b>Data Type</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int INPUT_VARIABLE_DECLARATION__TYPE = STATEFUL_VARIABLE_DECLARATION__TYPE;
+	int INPUT_VARIABLE_DECLARATION__DATA_TYPE = STATEFUL_VARIABLE_DECLARATION__DATA_TYPE;
 
 	/**
 	 * The feature id for the '<em><b>Circular Buffer Size</b></em>' attribute.
@@ -478,13 +478,13 @@ public interface ILPackage extends EPackage {
 	int OUTPUT_VARIABLE_DECLARATION__NAME = STATEFUL_VARIABLE_DECLARATION__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Type</b></em>' reference.
+	 * The feature id for the '<em><b>Data Type</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int OUTPUT_VARIABLE_DECLARATION__TYPE = STATEFUL_VARIABLE_DECLARATION__TYPE;
+	int OUTPUT_VARIABLE_DECLARATION__DATA_TYPE = STATEFUL_VARIABLE_DECLARATION__DATA_TYPE;
 
 	/**
 	 * The feature id for the '<em><b>Circular Buffer Size</b></em>' attribute.
@@ -524,13 +524,13 @@ public interface ILPackage extends EPackage {
 	int INSTANCE_VARIABLE_DECLARATION__NAME = STATEFUL_VARIABLE_DECLARATION__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Type</b></em>' reference.
+	 * The feature id for the '<em><b>Data Type</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int INSTANCE_VARIABLE_DECLARATION__TYPE = STATEFUL_VARIABLE_DECLARATION__TYPE;
+	int INSTANCE_VARIABLE_DECLARATION__DATA_TYPE = STATEFUL_VARIABLE_DECLARATION__DATA_TYPE;
 
 	/**
 	 * The feature id for the '<em><b>Circular Buffer Size</b></em>' attribute.
@@ -560,13 +560,13 @@ public interface ILPackage extends EPackage {
 	int LOCAL_VARIABLE_DECLARATION__NAME = VARIABLE_DECLARATION__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Type</b></em>' reference.
+	 * The feature id for the '<em><b>Data Type</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int LOCAL_VARIABLE_DECLARATION__TYPE = VARIABLE_DECLARATION__TYPE;
+	int LOCAL_VARIABLE_DECLARATION__DATA_TYPE = VARIABLE_DECLARATION__DATA_TYPE;
 
 	/**
 	 * The feature id for the '<em><b>Initializer</b></em>' containment reference.
@@ -1183,15 +1183,15 @@ public interface ILPackage extends EPackage {
 	EAttribute getVariableDeclaration_Name();
 
 	/**
-	 * Returns the meta object for the reference '{@link org.eclipselabs.mscript.language.il.VariableDeclaration#getType <em>Type</em>}'.
+	 * Returns the meta object for the reference '{@link org.eclipselabs.mscript.language.il.VariableDeclaration#getDataType <em>Data Type</em>}'.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @return the meta object for the reference '<em>Type</em>'.
-	 * @see org.eclipselabs.mscript.language.il.VariableDeclaration#getType()
+	 * @return the meta object for the reference '<em>Data Type</em>'.
+	 * @see org.eclipselabs.mscript.language.il.VariableDeclaration#getDataType()
 	 * @see #getVariableDeclaration()
 	 * @generated
 	 */
-	EReference getVariableDeclaration_Type();
+	EReference getVariableDeclaration_DataType();
 
 	/**
 	 * Returns the meta object for class '{@link org.eclipselabs.mscript.language.il.StatefulVariableDeclaration <em>Stateful Variable Declaration</em>}'.
@@ -1777,12 +1777,12 @@ public interface ILPackage extends EPackage {
 		EAttribute VARIABLE_DECLARATION__NAME = eINSTANCE.getVariableDeclaration_Name();
 
 		/**
-		 * The meta object literal for the '<em><b>Type</b></em>' reference feature.
+		 * The meta object literal for the '<em><b>Data Type</b></em>' reference feature.
 		 * <!-- begin-user-doc -->
 		 * <!-- end-user-doc -->
 		 * @generated
 		 */
-		EReference VARIABLE_DECLARATION__TYPE = eINSTANCE.getVariableDeclaration_Type();
+		EReference VARIABLE_DECLARATION__DATA_TYPE = eINSTANCE.getVariableDeclaration_DataType();
 
 		/**
 		 * The meta object literal for the '{@link org.eclipselabs.mscript.language.il.impl.StatefulVariableDeclarationImpl <em>Stateful Variable Declaration</em>}' class.

+ 10 - 10
org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/il/VariableDeclaration.java

@@ -18,7 +18,7 @@ import org.eclipselabs.mscript.typesystem.DataType;
  * The following features are supported:
  * <ul>
  *   <li>{@link org.eclipselabs.mscript.language.il.VariableDeclaration#getName <em>Name</em>}</li>
- *   <li>{@link org.eclipselabs.mscript.language.il.VariableDeclaration#getType <em>Type</em>}</li>
+ *   <li>{@link org.eclipselabs.mscript.language.il.VariableDeclaration#getDataType <em>Data Type</em>}</li>
  * </ul>
  * </p>
  *
@@ -54,29 +54,29 @@ public interface VariableDeclaration extends EObject {
 	void setName(String value);
 
 	/**
-	 * Returns the value of the '<em><b>Type</b></em>' reference.
+	 * Returns the value of the '<em><b>Data Type</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <p>
 	 * If the meaning of the '<em>Type</em>' reference isn't clear,
 	 * there really should be more of a description here...
 	 * </p>
 	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Type</em>' reference.
-	 * @see #setType(DataType)
-	 * @see org.eclipselabs.mscript.language.il.ILPackage#getVariableDeclaration_Type()
+	 * @return the value of the '<em>Data Type</em>' reference.
+	 * @see #setDataType(DataType)
+	 * @see org.eclipselabs.mscript.language.il.ILPackage#getVariableDeclaration_DataType()
 	 * @model
 	 * @generated
 	 */
-	DataType getType();
+	DataType getDataType();
 
 	/**
-	 * Sets the value of the '{@link org.eclipselabs.mscript.language.il.VariableDeclaration#getType <em>Type</em>}' reference.
+	 * Sets the value of the '{@link org.eclipselabs.mscript.language.il.VariableDeclaration#getDataType <em>Data Type</em>}' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @param value the new value of the '<em>Type</em>' reference.
-	 * @see #getType()
+	 * @param value the new value of the '<em>Data Type</em>' reference.
+	 * @see #getDataType()
 	 * @generated
 	 */
-	void setType(DataType value);
+	void setDataType(DataType value);
 
 } // VariableDeclaration

+ 3 - 3
org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/il/impl/ILPackageImpl.java

@@ -422,7 +422,7 @@ public class ILPackageImpl extends EPackageImpl implements ILPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getVariableDeclaration_Type() {
+	public EReference getVariableDeclaration_DataType() {
 		return (EReference)variableDeclarationEClass.getEStructuralFeatures().get(1);
 	}
 
@@ -834,7 +834,7 @@ public class ILPackageImpl extends EPackageImpl implements ILPackage {
 
 		variableDeclarationEClass = createEClass(VARIABLE_DECLARATION);
 		createEAttribute(variableDeclarationEClass, VARIABLE_DECLARATION__NAME);
-		createEReference(variableDeclarationEClass, VARIABLE_DECLARATION__TYPE);
+		createEReference(variableDeclarationEClass, VARIABLE_DECLARATION__DATA_TYPE);
 
 		statefulVariableDeclarationEClass = createEClass(STATEFUL_VARIABLE_DECLARATION);
 		createEAttribute(statefulVariableDeclarationEClass, STATEFUL_VARIABLE_DECLARATION__CIRCULAR_BUFFER_SIZE);
@@ -970,7 +970,7 @@ public class ILPackageImpl extends EPackageImpl implements ILPackage {
 
 		initEClass(variableDeclarationEClass, VariableDeclaration.class, "VariableDeclaration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getVariableDeclaration_Name(), ecorePackage.getEString(), "name", null, 0, 1, VariableDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEReference(getVariableDeclaration_Type(), theTypeSystemPackage.getDataType(), null, "type", null, 0, 1, VariableDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getVariableDeclaration_DataType(), theTypeSystemPackage.getDataType(), null, "dataType", null, 0, 1, VariableDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(statefulVariableDeclarationEClass, StatefulVariableDeclaration.class, "StatefulVariableDeclaration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getStatefulVariableDeclaration_CircularBufferSize(), ecorePackage.getEInt(), "circularBufferSize", "1", 0, 1, StatefulVariableDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+ 26 - 26
org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/il/impl/VariableDeclarationImpl.java

@@ -23,7 +23,7 @@ import org.eclipselabs.mscript.typesystem.DataType;
  * The following features are implemented:
  * <ul>
  *   <li>{@link org.eclipselabs.mscript.language.il.impl.VariableDeclarationImpl#getName <em>Name</em>}</li>
- *   <li>{@link org.eclipselabs.mscript.language.il.impl.VariableDeclarationImpl#getType <em>Type</em>}</li>
+ *   <li>{@link org.eclipselabs.mscript.language.il.impl.VariableDeclarationImpl#getDataType <em>Data Type</em>}</li>
  * </ul>
  * </p>
  *
@@ -51,14 +51,14 @@ public abstract class VariableDeclarationImpl extends EObjectImpl implements Var
 	protected String name = NAME_EDEFAULT;
 
 	/**
-	 * The cached value of the '{@link #getType() <em>Type</em>}' reference.
+	 * The cached value of the '{@link #getDataType() <em>Data Type</em>}' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getType()
+	 * @see #getDataType()
 	 * @generated
 	 * @ordered
 	 */
-	protected DataType type;
+	protected DataType dataType;
 
 	/**
 	 * <!-- begin-user-doc -->
@@ -105,16 +105,16 @@ public abstract class VariableDeclarationImpl extends EObjectImpl implements Var
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public DataType getType() {
-		if (type != null && type.eIsProxy()) {
-			InternalEObject oldType = (InternalEObject)type;
-			type = (DataType)eResolveProxy(oldType);
-			if (type != oldType) {
+	public DataType getDataType() {
+		if (dataType != null && dataType.eIsProxy()) {
+			InternalEObject oldDataType = (InternalEObject)dataType;
+			dataType = (DataType)eResolveProxy(oldDataType);
+			if (dataType != oldDataType) {
 				if (eNotificationRequired())
-					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ILPackage.VARIABLE_DECLARATION__TYPE, oldType, type));
+					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ILPackage.VARIABLE_DECLARATION__DATA_TYPE, oldDataType, dataType));
 			}
 		}
-		return type;
+		return dataType;
 	}
 
 	/**
@@ -122,8 +122,8 @@ public abstract class VariableDeclarationImpl extends EObjectImpl implements Var
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public DataType basicGetType() {
-		return type;
+	public DataType basicGetDataType() {
+		return dataType;
 	}
 
 	/**
@@ -131,11 +131,11 @@ public abstract class VariableDeclarationImpl extends EObjectImpl implements Var
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public void setType(DataType newType) {
-		DataType oldType = type;
-		type = newType;
+	public void setDataType(DataType newDataType) {
+		DataType oldDataType = dataType;
+		dataType = newDataType;
 		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, ILPackage.VARIABLE_DECLARATION__TYPE, oldType, type));
+			eNotify(new ENotificationImpl(this, Notification.SET, ILPackage.VARIABLE_DECLARATION__DATA_TYPE, oldDataType, dataType));
 	}
 
 	/**
@@ -148,9 +148,9 @@ public abstract class VariableDeclarationImpl extends EObjectImpl implements Var
 		switch (featureID) {
 			case ILPackage.VARIABLE_DECLARATION__NAME:
 				return getName();
-			case ILPackage.VARIABLE_DECLARATION__TYPE:
-				if (resolve) return getType();
-				return basicGetType();
+			case ILPackage.VARIABLE_DECLARATION__DATA_TYPE:
+				if (resolve) return getDataType();
+				return basicGetDataType();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -166,8 +166,8 @@ public abstract class VariableDeclarationImpl extends EObjectImpl implements Var
 			case ILPackage.VARIABLE_DECLARATION__NAME:
 				setName((String)newValue);
 				return;
-			case ILPackage.VARIABLE_DECLARATION__TYPE:
-				setType((DataType)newValue);
+			case ILPackage.VARIABLE_DECLARATION__DATA_TYPE:
+				setDataType((DataType)newValue);
 				return;
 		}
 		super.eSet(featureID, newValue);
@@ -184,8 +184,8 @@ public abstract class VariableDeclarationImpl extends EObjectImpl implements Var
 			case ILPackage.VARIABLE_DECLARATION__NAME:
 				setName(NAME_EDEFAULT);
 				return;
-			case ILPackage.VARIABLE_DECLARATION__TYPE:
-				setType((DataType)null);
+			case ILPackage.VARIABLE_DECLARATION__DATA_TYPE:
+				setDataType((DataType)null);
 				return;
 		}
 		super.eUnset(featureID);
@@ -201,8 +201,8 @@ public abstract class VariableDeclarationImpl extends EObjectImpl implements Var
 		switch (featureID) {
 			case ILPackage.VARIABLE_DECLARATION__NAME:
 				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
-			case ILPackage.VARIABLE_DECLARATION__TYPE:
-				return type != null;
+			case ILPackage.VARIABLE_DECLARATION__DATA_TYPE:
+				return dataType != null;
 		}
 		return super.eIsSet(featureID);
 	}

+ 2 - 2
org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/il/transform/FunctionDefinitionTransformer.java

@@ -97,7 +97,7 @@ public class FunctionDefinitionTransformer implements IFunctionDefinitionTransfo
 			templateVariableDeclaration.setName(parameterDeclaration.getName());
 			if (templateArgumentIterator.hasNext()) {
 				IValue value = templateArgumentIterator.next();
-				templateVariableDeclaration.setType(EcoreUtil.copy(value.getDataType()));
+				templateVariableDeclaration.setDataType(EcoreUtil.copy(value.getDataType()));
 				templateVariableDeclaration.setValue(value);
 			}
 			VariableDescriptor variableDescriptor = functionDescriptor.getVariableDescriptor(parameterDeclaration.getName());
@@ -112,7 +112,7 @@ public class FunctionDefinitionTransformer implements IFunctionDefinitionTransfo
 			InputVariableDeclaration inputVariableDeclaration = ILFactory.eINSTANCE.createInputVariableDeclaration();
 			inputVariableDeclaration.setName(parameterDeclaration.getName());
 			if (inputParameterDataTypesIterator.hasNext()) {
-				inputVariableDeclaration.setType(EcoreUtil.copy(inputParameterDataTypesIterator.next()));
+				inputVariableDeclaration.setDataType(EcoreUtil.copy(inputParameterDataTypesIterator.next()));
 			}
 			VariableDescriptor variableDescriptor = functionDescriptor.getVariableDescriptor(parameterDeclaration.getName());
 			if (variableDescriptor != null) {

+ 6 - 6
org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/internal/il/transform/DataTypeAdaptor.java

@@ -166,23 +166,23 @@ public class DataTypeAdaptor extends ILSwitch<Boolean> {
 	}
 		
 	private boolean updateDataType(VariableDeclaration variableDeclaration, DataType dataType) {
-		if (variableDeclaration.getType() == null) {
-			variableDeclaration.setType(dataType);
+		if (variableDeclaration.getDataType() == null) {
+			variableDeclaration.setDataType(dataType);
 			return true;
 		}
 		
-		if (variableDeclaration.getType() == dataType) {
+		if (variableDeclaration.getDataType() == dataType) {
 			return true;
 		}
 
-		DataType leftHandDataType = TypeSystemUtil.getLeftHandDataType(variableDeclaration.getType(), dataType);
+		DataType leftHandDataType = TypeSystemUtil.getLeftHandDataType(variableDeclaration.getDataType(), dataType);
 		if (leftHandDataType == null) {
 			status.add(new Status(IStatus.ERROR, LanguagePlugin.PLUGIN_ID, "Incompatible data types"));
 			return false;
 		}
 		
 		if (leftHandDataType == dataType) {
-			variableDeclaration.setType(leftHandDataType);
+			variableDeclaration.setDataType(leftHandDataType);
 			return false;
 		}
 		
@@ -496,7 +496,7 @@ public class DataTypeAdaptor extends ILSwitch<Boolean> {
 			 */
 			@Override
 			public DataType caseVariableReference(VariableReference variableReference) {
-				DataType dataType = variableReference.getTarget().getType();
+				DataType dataType = variableReference.getTarget().getDataType();
 				if (dataType == null) {
 					throw new RuntimeException("Data type not set");
 				}

+ 1 - 1
org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/interpreter/StaticInterpreterContext.java

@@ -70,7 +70,7 @@ public class StaticInterpreterContext extends InterpreterContext {
 			}
 
 			for (InputVariableDeclaration inputVariableDeclaration : functionDefinition.getInputVariableDeclarations()) {
-				IValue value = new AnyValue(getComputationContext(), inputVariableDeclaration.getType());
+				IValue value = new AnyValue(getComputationContext(), inputVariableDeclaration.getDataType());
 				IVariable variable = new Variable(inputVariableDeclaration);
 				variable.setValue(0, value);
 				variables.put(variable.getDeclaration(), variable);

+ 2 - 2
org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.language/src/org/eclipselabs/mscript/language/interpreter/Variable.java

@@ -57,8 +57,8 @@ public class Variable implements IVariable {
 	 * @see org.eclipselabs.mscript.execution.IVariable#setValue(org.eclipselabs.mscript.execution.value.IValue)
 	 */
 	public void setValue(int stepIndex, IValue value) {
-		if (declaration != null && declaration.getType() != null) {
-			value = value.convert(declaration.getType());
+		if (declaration != null && declaration.getDataType() != null) {
+			value = value.convert(declaration.getDataType());
 		}
 		values.set(stepIndex, value);
 	}