Java Code Examples for com.android.dx.rop.type.Type#getInitializedType()

The following examples show how to use com.android.dx.rop.type.Type#getInitializedType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OneLocalsArray.java    From Box with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
public void makeInitialized(Type type) {
    int len = locals.length;

    if (len == 0) {
        // We have to check for this before checking for immutability.
        return;
    }

    throwIfImmutable();

    Type initializedType = type.getInitializedType();

    for (int i = 0; i < len; i++) {
        if (locals[i] == type) {
            locals[i] = initializedType;
        }
    }
}
 
Example 2
Source File: ExecutionStack.java    From Box with Apache License 2.0 6 votes vote down vote up
/**
 * Replaces all the occurrences of the given uninitialized type in
 * this stack with its initialized equivalent.
 *
 * @param type {@code non-null;} type to replace
 */
public void makeInitialized(Type type) {
    if (stackPtr == 0) {
        // We have to check for this before checking for immutability.
        return;
    }

    throwIfImmutable();

    Type initializedType = type.getInitializedType();

    for (int i = 0; i < stackPtr; i++) {
        if (stack[i] == type) {
            stack[i] = initializedType;
        }
    }
}
 
Example 3
Source File: OneLocalsArray.java    From Box with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
public void makeInitialized(Type type) {
    int len = locals.length;

    if (len == 0) {
        // We have to check for this before checking for immutability.
        return;
    }

    throwIfImmutable();

    Type initializedType = type.getInitializedType();

    for (int i = 0; i < len; i++) {
        if (locals[i] == type) {
            locals[i] = initializedType;
        }
    }
}
 
Example 4
Source File: ExecutionStack.java    From Box with Apache License 2.0 6 votes vote down vote up
/**
 * Replaces all the occurrences of the given uninitialized type in
 * this stack with its initialized equivalent.
 *
 * @param type {@code non-null;} type to replace
 */
public void makeInitialized(Type type) {
    if (stackPtr == 0) {
        // We have to check for this before checking for immutability.
        return;
    }

    throwIfImmutable();

    Type initializedType = type.getInitializedType();

    for (int i = 0; i < stackPtr; i++) {
        if (stack[i] == type) {
            stack[i] = initializedType;
        }
    }
}
 
Example 5
Source File: OneLocalsArray.java    From J2ME-Loader with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
   @Override
public void makeInitialized(Type type) {
       int len = locals.length;

       if (len == 0) {
           // We have to check for this before checking for immutability.
           return;
       }

       throwIfImmutable();

       Type initializedType = type.getInitializedType();

       for (int i = 0; i < len; i++) {
           if (locals[i] == type) {
               locals[i] = initializedType;
           }
       }
   }
 
Example 6
Source File: ExecutionStack.java    From J2ME-Loader with Apache License 2.0 6 votes vote down vote up
/**
 * Replaces all the occurrences of the given uninitialized type in
 * this stack with its initialized equivalent.
 *
 * @param type {@code non-null;} type to replace
 */
public void makeInitialized(Type type) {
    if (stackPtr == 0) {
        // We have to check for this before checking for immutability.
        return;
    }

    throwIfImmutable();

    Type initializedType = type.getInitializedType();

    for (int i = 0; i < stackPtr; i++) {
        if (stack[i] == type) {
            stack[i] = initializedType;
        }
    }
}
 
Example 7
Source File: OneLocalsArray.java    From buck with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
public void makeInitialized(Type type) {
    int len = locals.length;

    if (len == 0) {
        // We have to check for this before checking for immutability.
        return;
    }

    throwIfImmutable();

    Type initializedType = type.getInitializedType();

    for (int i = 0; i < len; i++) {
        if (locals[i] == type) {
            locals[i] = initializedType;
        }
    }
}
 
Example 8
Source File: ExecutionStack.java    From buck with Apache License 2.0 6 votes vote down vote up
/**
 * Replaces all the occurrences of the given uninitialized type in
 * this stack with its initialized equivalent.
 *
 * @param type {@code non-null;} type to replace
 */
public void makeInitialized(Type type) {
    if (stackPtr == 0) {
        // We have to check for this before checking for immutability.
        return;
    }

    throwIfImmutable();

    Type initializedType = type.getInitializedType();

    for (int i = 0; i < stackPtr; i++) {
        if (stack[i] == type) {
            stack[i] = initializedType;
        }
    }
}