Package org.teavm.common

Examples of org.teavm.common.RecordArrayBuilder$SubArray


    @Override
    public void addSuccessors(SourceLocation location, SourceLocation[] successors) {
        int fileIndex = files.index(location.getFileName());
        while (cfgs.size() <= fileIndex) {
            cfgs.add(new RecordArrayBuilder(1, 1));
        }
        RecordArrayBuilder cfg = cfgs.get(fileIndex);
        while (cfg.size() <= location.getLine()) {
            cfg.add();
        }
        RecordArrayBuilder.Record record = cfg.get(location.getLine());
        if (record.get(0) == 0) {
            record.set(0, 1);
        }
        RecordArrayBuilder.SubArray array = record.getArray(0);
        for (SourceLocation succ : successors) {
View Full Code Here


        }
    }

    private RecordArrayBuilder compress(RecordArrayBuilder builder) {
        int lastValue = 0;
        RecordArrayBuilder compressed = new RecordArrayBuilder(builder.getRecordSize(), builder.getArraysPerRecord());
        for (int i = 0; i < builder.size(); ++i) {
            RecordArrayBuilder.Record record = builder.get(i);
            if (i == 0 || lastValue != record.get(2)) {
                lastValue = record.get(2);
                RecordArrayBuilder.Record compressedRecord = compressed.add();
                for (int j = 0; j < builder.getRecordSize(); ++j) {
                    compressedRecord.set(j, record.get(j));
                }
            }
        }
View Full Code Here

            debugInformation.classMapping = compress(classMapping).build();
            debugInformation.methodMapping = compress(methodMapping).build();
            debugInformation.callSiteMapping = callSiteMapping.build();
            debugInformation.variableMappings = new RecordArray[variableNames.list.size()];
            for (int var : variableMappings.keySet()) {
                RecordArrayBuilder mapping = variableMappings.get(var);
                compressAndSortArrays(mapping);
                debugInformation.variableMappings[var] = mapping.build();
            }

            List<DebugInformation.ClassMetadata> builtMetadata = new ArrayList<>(classes.list.size());
            for (int i = 0; i < classes.list.size(); ++i) {
                if (i >= classesMetadata.size()) {
View Full Code Here

TOP

Related Classes of org.teavm.common.RecordArrayBuilder$SubArray

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.