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;
17 import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding;
19 public abstract class Reference extends Expression {
21 * BaseLevelReference constructor comment.
26 public abstract FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound);
28 public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
31 public FieldBinding fieldBinding() {
32 //this method should be sent one FIELD-tagged references
33 // (ref.bits & BindingIds.FIELD != 0)()
36 //public void fieldStore(CodeStream codeStream, FieldBinding fieldBinding, MethodBinding syntheticWriteAccessor, boolean valueRequired) {
38 // if (fieldBinding.isStatic()) {
39 // if (valueRequired) {
40 // if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
46 // if (syntheticWriteAccessor == null) {
47 // codeStream.putstatic(fieldBinding);
49 // codeStream.invokestatic(syntheticWriteAccessor);
51 // } else { // Stack: [owner][new field value] ---> [new field value][owner][new field value]
52 // if (valueRequired) {
53 // if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
54 // codeStream.dup2_x1();
56 // codeStream.dup_x1();
59 // if (syntheticWriteAccessor == null) {
60 // codeStream.putfield(fieldBinding);
62 // codeStream.invokestatic(syntheticWriteAccessor);
66 //public abstract void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired);
68 //public abstract void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired);
70 //public abstract void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired);