Example usage for org.aspectj.apache.bcel.generic Type getSize

List of usage examples for org.aspectj.apache.bcel.generic Type getSize

Introduction

In this page you can find the example usage for org.aspectj.apache.bcel.generic Type getSize.

Prototype

public int getSize() 

Source Link

Usage

From source file:br.jabuti.graph.datastructure.ig.VMLocal.java

License:Open Source License

/** <p> Places a given type in a given spot </p>
        // w w  w.ja  v a 2 s.c om
 @param e The type to be placed in the spot
 @param l The spot to store the type
 */
public void add(Type e, int l) {
    int t = e == null ? 1 : e.getSize();

    for (int i = 0; i < t; i++) {
        v[l++] = e;
    }
}

From source file:br.jabuti.graph.datastructure.ig.VMStack.java

License:Open Source License

/** Pushs al element in the stack. Each element may take
 more than one spot in the stack, depending on the type
 stored in the element, exactly like is done in the  VM.
 For example an element that stores a double element will take
 the two top spots in the stack// w  ww  .  j a  v a2s . c om
        
 @param e The element to be inserted in the top of the stack
 */

public void push(VMStackElement e) {
    Type t = e.type;

    for (int i = 0; i < t.getSize(); i++) {
        v[++topc] = e;
    }
}

From source file:br.jabuti.graph.datastructure.ig.VMStack.java

License:Open Source License

/** Removes the element from the top of the stack. It may
 required to remove more than one spot from the stack if the
 top element occupies more than one spot.
        /*from   ww w  .  ja  v a  2  s  .c om*/
 */
public void pop() {
    Type t = top().type;

    for (int i = 0; i < t.getSize(); i++) {
        v[topc--] = null;
    }
}