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.phpeclipse.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.
25 public abstract FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound);
27 public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
30 public FieldBinding fieldBinding() {
31 //this method should be sent one FIELD-tagged references
32 // (ref.bits & BindingIds.FIELD != 0)()
35 //public void fieldStore(CodeStream codeStream, FieldBinding fieldBinding, MethodBinding syntheticWriteAccessor, boolean valueRequired) {
37 // if (fieldBinding.isStatic()) {
38 // if (valueRequired) {
39 // if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
45 // if (syntheticWriteAccessor == null) {
46 // codeStream.putstatic(fieldBinding);
48 // codeStream.invokestatic(syntheticWriteAccessor);
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();
55 // codeStream.dup_x1();
58 // if (syntheticWriteAccessor == null) {
59 // codeStream.putfield(fieldBinding);
61 // codeStream.invokestatic(syntheticWriteAccessor);
65 //public abstract void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired);
67 //public abstract void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired);
69 //public abstract void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired);