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
 
   9  *     IBM Corporation - initial API and implementation
 
  10  *******************************************************************************/
 
  11 package net.sourceforge.phpdt.internal.compiler.ast;
 
  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;
 
  18 public abstract class Reference extends Expression {
 
  20          * BaseLevelReference constructor comment.
 
  26         public abstract FlowInfo analyseAssignment(BlockScope currentScope,
 
  27                         FlowContext flowContext, FlowInfo flowInfo, Assignment assignment,
 
  30         public FlowInfo analyseCode(BlockScope currentScope,
 
  31                         FlowContext flowContext, FlowInfo flowInfo) {
 
  35         public FieldBinding fieldBinding() {
 
  36                 // this method should be sent one FIELD-tagged references
 
  37                 // (ref.bits & BindingIds.FIELD != 0)()
 
  40         // public void fieldStore(CodeStream codeStream, FieldBinding fieldBinding,
 
  41         // MethodBinding syntheticWriteAccessor, boolean valueRequired) {
 
  43         // if (fieldBinding.isStatic()) {
 
  44         // if (valueRequired) {
 
  45         // if ((fieldBinding.type == LongBinding) || (fieldBinding.type ==
 
  52         // if (syntheticWriteAccessor == null) {
 
  53         // codeStream.putstatic(fieldBinding);
 
  55         // codeStream.invokestatic(syntheticWriteAccessor);
 
  57         // } else { // Stack: [owner][new field value] ---> [new field
 
  58         // value][owner][new field value]
 
  59         // if (valueRequired) {
 
  60         // if ((fieldBinding.type == LongBinding) || (fieldBinding.type ==
 
  62         // codeStream.dup2_x1();
 
  64         // codeStream.dup_x1();
 
  67         // if (syntheticWriteAccessor == null) {
 
  68         // codeStream.putfield(fieldBinding);
 
  70         // codeStream.invokestatic(syntheticWriteAccessor);
 
  74         // public abstract void generateAssignment(BlockScope currentScope,
 
  75         // CodeStream codeStream, Assignment assignment, boolean valueRequired);
 
  77         // public abstract void generateCompoundAssignment(BlockScope currentScope,
 
  78         // CodeStream codeStream, Expression expression, int operator, int
 
  79         // assignmentImplicitConversion, boolean valueRequired);
 
  81         // public abstract void generatePostIncrement(BlockScope currentScope,
 
  82         // CodeStream codeStream, CompoundAssignment postIncrement, boolean