All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.qbicc.runtime.stackwalk.JavaStackFrameCache Maven / Gradle / Ivy

There is a newer version: 0.77.0
Show newest version
package org.qbicc.runtime.stackwalk;

import org.qbicc.runtime.AutoQueued;

import java.util.Arrays;

@SuppressWarnings("unused")
public class JavaStackFrameCache implements JavaStackFrameVisitor {
    private final int[] sourceCodeIndexList;

    @AutoQueued
    JavaStackFrameCache(final int frameCount) {
        this.sourceCodeIndexList = new int[frameCount];
    }

    @AutoQueued
    public Object getSourceCodeIndexList() {
        return Arrays.copyOf(sourceCodeIndexList, sourceCodeIndexList.length);
    }

    @Override
    @AutoQueued
    public void visitFrame(final int frameIndex, final int scIndex) {
        sourceCodeIndexList[frameIndex] = scIndex;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy