A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / codegen / CaseLabel.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.codegen;
12
13 public class CaseLabel extends Label {
14         public int instructionPosition = POS_NOT_SET;
15
16         public int backwardsBranch = POS_NOT_SET;
17         /**
18          * CaseLabel constructor comment.
19          * 
20          * @param codeStream
21          *            net.sourceforge.phpdt.internal.compiler.codegen.CodeStream
22          */
23         // public CaseLabel(CodeStream codeStream) {
24         // super(codeStream);
25         // }
26         /*
27          * Put down a refernece to the array at the location in the codestream.
28          */
29         // void branch() {
30         // if (position == POS_NOT_SET) {
31         // addForwardReference(codeStream.position);
32         // // Leave 4 bytes free to generate the jump offset afterwards
33         // codeStream.position += 4;
34         // codeStream.classFileOffset += 4;
35         // } else { //Position is set. Write it!
36         // codeStream.writeSignedWord(position - codeStream.position + 1);
37         // }
38         // }
39         // /*
40         // * Put down a refernece to the array at the location in the codestream.
41         // */
42         // void branchWide() {
43         // if (position == POS_NOT_SET) {
44         // addForwardReference(codeStream.position);
45         // // Leave 4 bytes free to generate the jump offset afterwards
46         // codeStream.position += 4;
47         // } else { //Position is set. Write it!
48         // codeStream.writeSignedWord(position - codeStream.position + 1);
49         // }
50         // }
51         // public boolean isStandardLabel(){
52         // return false;
53         // }
54         // /*
55         // * Put down a reference to the array at the location in the codestream.
56         // */
57         // public void place() {
58         // position = codeStream.position;
59         // if (instructionPosition == POS_NOT_SET)
60         // backwardsBranch = position;
61         // else {
62         // int offset = position - instructionPosition;
63         // for (int i = 0; i < forwardReferenceCount; i++) {
64         // codeStream.writeSignedWord(forwardReferences[i], offset);
65         // }
66         // // add the label int the codeStream labels collection
67         // codeStream.addLabel(this);
68         // }
69         // }
70         /*
71          * Put down a refernece to the array at the location in the codestream.
72          */
73         // void placeInstruction() {
74         // if (instructionPosition == POS_NOT_SET) {
75         // instructionPosition = codeStream.position;
76         // if (backwardsBranch != POS_NOT_SET) {
77         // int offset = backwardsBranch - instructionPosition;
78         // for (int i = 0; i < forwardReferenceCount; i++)
79         // codeStream.writeSignedWord(forwardReferences[i], offset);
80         // backwardsBranch = POS_NOT_SET;
81         // }
82         // }
83         // }
84 }