X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Initializer.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Initializer.java index 4c5f8d6..16bc51a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Initializer.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Initializer.java @@ -18,10 +18,13 @@ import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; import net.sourceforge.phpdt.internal.compiler.parser.UnitParser; public class Initializer extends FieldDeclaration { - + public Block block; + public int lastFieldID; + public int bodyStart; + public Initializer(Block block, int modifiers) { this.block = block; this.modifiers = modifiers; @@ -29,31 +32,30 @@ public class Initializer extends FieldDeclaration { declarationSourceStart = sourceStart = bodyStart = block.sourceStart; } - public FlowInfo analyseCode( - MethodScope currentScope, - FlowContext flowContext, - FlowInfo flowInfo) { + public FlowInfo analyseCode(MethodScope currentScope, + FlowContext flowContext, FlowInfo flowInfo) { return block.analyseCode(currentScope, flowContext, flowInfo); } /** - * Code generation for a non-static initializer: - * standard block code gen - * - * @param currentScope net.sourceforge.phpdt.internal.compiler.lookup.BlockScope - * @param codeStream net.sourceforge.phpdt.internal.compiler.codegen.CodeStream + * Code generation for a non-static initializer: standard block code gen + * + * @param currentScope + * net.sourceforge.phpdt.internal.compiler.lookup.BlockScope + * @param codeStream + * net.sourceforge.phpdt.internal.compiler.codegen.CodeStream */ -// public void generateCode(BlockScope currentScope, CodeStream codeStream) { -// -// if ((bits & IsReachableMASK) == 0) { -// return; -// } -// int pc = codeStream.position; -// block.generateCode(currentScope, codeStream); -// codeStream.recordPositionsFrom(pc, this.sourceStart); -// } - + // public void generateCode(BlockScope currentScope, CodeStream codeStream) + // { + // + // if ((bits & IsReachableMASK) == 0) { + // return; + // } + // int pc = codeStream.position; + // block.generateCode(currentScope, codeStream); + // codeStream.recordPositionsFrom(pc, this.sourceStart); + // } public boolean isField() { return false; @@ -64,12 +66,10 @@ public class Initializer extends FieldDeclaration { return (modifiers & AccStatic) != 0; } - public void parseStatements( - UnitParser parser, - TypeDeclaration type, - CompilationUnitDeclaration unit) { + public void parseStatements(UnitParser parser, TypeDeclaration type, + CompilationUnitDeclaration unit) { - //fill up the method body with statement + // fill up the method body with statement parser.parse(this, type, unit); } @@ -81,9 +81,9 @@ public class Initializer extends FieldDeclaration { if (isStatic()) { ReferenceBinding declaringType = scope.enclosingSourceType(); if (declaringType.isNestedType() && !declaringType.isStatic()) - scope.problemReporter().innerTypesCannotDeclareStaticInitializers( - declaringType, - this); + scope.problemReporter() + .innerTypesCannotDeclareStaticInitializers( + declaringType, this); } block.resolve(scope); } finally {