Refactored packagename to net.sourceforge.phpdt.internal.compiler.ast
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / Reference.java
index cb8a551..035cee0 100644 (file)
@@ -1,23 +1,19 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
- * are made available under the terms of the Common Public License v0.5 
+ * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
+ * http://www.eclipse.org/legal/cpl-v10.html
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
- ******************************************************************************/
+ *******************************************************************************/
 package net.sourceforge.phpdt.internal.compiler.ast;
 
-import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream;
 import net.sourceforge.phpdt.internal.compiler.flow.FlowContext;
 import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo;
 import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
 import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding;
-import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding;
-import net.sourceforge.phpdt.internal.compiler.problem.ShouldNotImplement;
-import net.sourceforge.phpdt.internal.compiler.util.Util;
 
 public abstract class Reference extends Expression  {
 /**
@@ -26,9 +22,8 @@ public abstract class Reference extends Expression  {
 public Reference() {
        super();
 }
-public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound) {
-       throw new ShouldNotImplement(Util.bind("ast.variableShouldProvide")); //$NON-NLS-1$
-}
+public abstract FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound);
+
 public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
        return flowInfo;
 }
@@ -37,43 +32,40 @@ public FieldBinding fieldBinding() {
        //  (ref.bits & BindingIds.FIELD != 0)()
        return null ;
 }
-public void fieldStore(CodeStream codeStream, FieldBinding fieldBinding, MethodBinding syntheticWriteAccessor, boolean valueRequired) {
+//public void fieldStore(CodeStream codeStream, FieldBinding fieldBinding, MethodBinding syntheticWriteAccessor, boolean valueRequired) {
+//
+//     if (fieldBinding.isStatic()) {
+//             if (valueRequired) {
+//                     if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
+//                             codeStream.dup2();
+//                     } else {
+//                             codeStream.dup();
+//                     }
+//             }
+//             if (syntheticWriteAccessor == null) {
+//                     codeStream.putstatic(fieldBinding);
+//             } else {
+//                     codeStream.invokestatic(syntheticWriteAccessor);
+//             }
+//     } else { // Stack:  [owner][new field value]  ---> [new field value][owner][new field value]
+//             if (valueRequired) {
+//                     if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
+//                             codeStream.dup2_x1();
+//                     } else {
+//                             codeStream.dup_x1();
+//                     }
+//             }
+//             if (syntheticWriteAccessor == null) {
+//                     codeStream.putfield(fieldBinding);
+//             } else {
+//                     codeStream.invokestatic(syntheticWriteAccessor);
+//             }
+//     }
+//}
+//public abstract void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired);
+//
+//public abstract void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired);
+//
+//public abstract void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired);
 
-       if (fieldBinding.isStatic()) {
-               if (valueRequired) {
-                       if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
-                               codeStream.dup2();
-                       } else {
-                               codeStream.dup();
-                       }
-               }
-               if (syntheticWriteAccessor == null) {
-                       codeStream.putstatic(fieldBinding);
-               } else {
-                       codeStream.invokestatic(syntheticWriteAccessor);
-               }
-       } else { // Stack:  [owner][new field value]  ---> [new field value][owner][new field value]
-               if (valueRequired) {
-                       if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
-                               codeStream.dup2_x1();
-                       } else {
-                               codeStream.dup_x1();
-                       }
-               }
-               if (syntheticWriteAccessor == null) {
-                       codeStream.putfield(fieldBinding);
-               } else {
-                       codeStream.invokestatic(syntheticWriteAccessor);
-               }
-       }
-}
-public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {
-       throw new ShouldNotImplement(Util.bind("ast.compoundPreShouldProvide")); //$NON-NLS-1$
-}
-public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired) {
-       throw new ShouldNotImplement(Util.bind("ast.compoundVariableShouldProvide")); //$NON-NLS-1$
-}
-public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) {
-       throw new ShouldNotImplement(Util.bind("ast.postIncrShouldProvide")); //$NON-NLS-1$
-}
 }