Set version 1.1.9
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / Reference.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.internal.compiler.ast;
12
13 import net.sourceforge.phpdt.internal.compiler.flow.FlowContext;
14 import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo;
15 import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
16 import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding;
17
18 public abstract class Reference extends Expression  {
19 /**
20  * BaseLevelReference constructor comment.
21  */
22 public Reference() {
23         super();
24 }
25 public abstract FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound);
26
27 public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
28         return flowInfo;
29 }
30 public FieldBinding fieldBinding() {
31         //this method should be sent one FIELD-tagged references
32         //  (ref.bits & BindingIds.FIELD != 0)()
33         return null ;
34 }
35 //public void fieldStore(CodeStream codeStream, FieldBinding fieldBinding, MethodBinding syntheticWriteAccessor, boolean valueRequired) {
36 //
37 //      if (fieldBinding.isStatic()) {
38 //              if (valueRequired) {
39 //                      if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
40 //                              codeStream.dup2();
41 //                      } else {
42 //                              codeStream.dup();
43 //                      }
44 //              }
45 //              if (syntheticWriteAccessor == null) {
46 //                      codeStream.putstatic(fieldBinding);
47 //              } else {
48 //                      codeStream.invokestatic(syntheticWriteAccessor);
49 //              }
50 //      } else { // Stack:  [owner][new field value]  ---> [new field value][owner][new field value]
51 //              if (valueRequired) {
52 //                      if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
53 //                              codeStream.dup2_x1();
54 //                      } else {
55 //                              codeStream.dup_x1();
56 //                      }
57 //              }
58 //              if (syntheticWriteAccessor == null) {
59 //                      codeStream.putfield(fieldBinding);
60 //              } else {
61 //                      codeStream.invokestatic(syntheticWriteAccessor);
62 //              }
63 //      }
64 //}
65 //public abstract void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired);
66 //
67 //public abstract void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired);
68 //
69 //public abstract void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired);
70
71 }