Package org.eclipse.jdt.internal.debug.eval.ast.instructions

Examples of org.eclipse.jdt.internal.debug.eval.ast.instructions.LocalVariableCreation


    if (typeBinding.isArray()) {
      // the expression returns an array
      int idIndex = fUniqueIdIndex++;
      String arrayIdentifier = "#a" + idIndex; //$NON-NLS-1$
      String varIdentifier = "#i" + idIndex; //$NON-NLS-1$
      push(new LocalVariableCreation(arrayIdentifier, typeSignature, 1,
          isParamPrimitiveType, true, fCounter));
      node.getExpression().accept(this);
      storeInstruction();
      push(new LocalVariableCreation(varIdentifier,
          "I", 0, true, true, fCounter)); //$NON-NLS-1$
      push(new PushInt(0));
      storeInstruction();
      storeInstruction();
      push(new LocalVariableCreation(paramIdentifier, typeSignature, 0,
          isParamPrimitiveType, false, fCounter));
      storeInstruction();

      push(new LessOperator(Instruction.T_int, Instruction.T_int,
          fCounter));
      push(new PushLocalVariable(varIdentifier));
      storeInstruction();
      push(new PushArrayLength(fCounter));
      push(new PushLocalVariable(arrayIdentifier));
      storeInstruction();
      storeInstruction();
      storeInstruction();

      // conditional jump will be added here

      push(new NoOp(fCounter));
      push(new AssignmentOperator(paramTypeId, paramTypeId, fCounter));
      push(new PushLocalVariable(paramIdentifier));
      storeInstruction();
      push(new org.eclipse.jdt.internal.debug.eval.ast.instructions.ArrayAccess(
          fCounter));
      push(new PushLocalVariable(arrayIdentifier));
      storeInstruction();
      push(new PostfixPlusPlusOperator(Instruction.T_int, fCounter));
      push(new PushLocalVariable(varIdentifier));
      storeInstruction();
      storeInstruction();
      storeInstruction();
      if (checkAutoBoxing(typeBinding.getElementType(), paramBinding)) {
        storeInstruction();
      }
      storeInstruction();
      addPopInstruction();
      node.getBody().accept(this);
      storeInstruction();

      // jump will be added here

    } else {
      // the expression returns a collection
      String iteratorIdentifier = "#i" + fUniqueIdIndex++; //$NON-NLS-1$
      push(new LocalVariableCreation(iteratorIdentifier,
          "Ljava/util/Iterator;", 0, false, true, fCounter)); //$NON-NLS-1$
      push(new SendMessage(
          "iterator", "()Ljava/util/Iterator;", 0, null, fCounter)); //$NON-NLS-1$//$NON-NLS-2$
      node.getExpression().accept(this);
      storeInstruction();
      storeInstruction();
      push(new LocalVariableCreation(paramIdentifier, typeSignature, 0,
          isParamPrimitiveType, false, fCounter));
      storeInstruction();

      push(new SendMessage("hasNext", "()Z", 0, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
      push(new PushLocalVariable(iteratorIdentifier));
View Full Code Here


      int typeDimension = typeBinding.getDimensions();
      if (typeDimension != 0) {
        typeBinding = typeBinding.getElementType();
      }
      Expression initializer = node.getInitializer();
      push(new LocalVariableCreation(node.getName().getIdentifier(),
          getTypeSignature(typeBinding), typeDimension,
          typeBinding.isPrimitive(), initializer != null, fCounter));
      if (initializer != null) {
        initializer.accept(this);
      }
View Full Code Here

    if (typeDimension != 0) {
      elementBinding = elementBinding.getElementType();
    }

    Expression initializer = node.getInitializer();
    push(new LocalVariableCreation(node.getName().getIdentifier(),
        getTypeSignature(elementBinding), typeDimension,
        elementBinding.isPrimitive(), initializer != null, fCounter));
    if (initializer != null) {
      initializer.accept(this);
      ITypeBinding expBindnig = initializer.resolveTypeBinding();
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.debug.eval.ast.instructions.LocalVariableCreation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.