<commit_before>package net.sandius.rembulan.compiler.gen.block;

import net.sandius.rembulan.compiler.gen.Slots;
import net.sandius.rembulan.util.Check;
import net.sandius.rembulan.util.IntVector;

public class Capture extends Linear implements LocalVariableEffect {

	public final IntVector indices;

	public Capture(IntVector indices) {
		Check.notNull(indices);
		this.indices = indices;
	}

	@Override
	public String toString() {
		return "Capture(" + indices.toString(",") + ")";
	}

	@Override
	protected Slots effect(Slots in) {
		Slots s = in;
		for (int i = 0; i < indices.length(); i++) {
			s = s.capture(indices.get(i));
		}
		return s;
	}

}<commit_msg>Using integer sets in capture nodes.<commit_after>package net.sandius.rembulan.compiler.gen.block;

import net.sandius.rembulan.compiler.gen.Slots;
import net.sandius.rembulan.util.Check;
import net.sandius.rembulan.util.IntContainer;
import net.sandius.rembulan.util.IntSet;

public class Capture extends Linear implements LocalVariableEffect {

	public final IntSet indices;

	public Capture(IntContainer indices) {
		Check.notNull(indices);
		this.indices = IntSet.empty().plus(indices);
	}

	@Override
	public String toString() {
		return "Capture(" + indices.toString(",") + ")";
	}

	@Override
	protected Slots effect(Slots in) {
		Slots s = in;
		for (int i = 0; i < indices.length(); i++) {
			s = s.capture(indices.get(i));
		}
		return s;
	}

}
{'fraction_non_alphanumeric': 0.1323943661971831, 'fraction_numerical': 0.0014084507042253522, 'mean_word_length': 4.362264150943396, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7664167', 'n_tokens_mistral': 518, 'n_tokens_neox': 490, 'n_words': 109}