Deterministic order of descriptors preserves name indexing for different serializer runs

This commit is contained in:
Andrey Breslav
2013-06-03 18:27:13 +04:00
committed by Alexander Udalov
parent 696b627cf4
commit de1f114b27
201 changed files with 171 additions and 132 deletions
@@ -19,7 +19,6 @@ import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
import java.util.regex.Pattern;
@@ -42,7 +41,7 @@ public class BuiltInsSerializer {
FqName fqName = FqName.topLevel(Name.identifier(KotlinBuiltIns.BUILT_INS_PACKAGE_NAME_STRING));
NamespaceDescriptor namespace = module.getNamespace(fqName);
assert namespace != null : "No built-ins namespace: " + fqName;
Collection<DeclarationDescriptor> allDescriptors = namespace.getMemberScope().getAllDescriptors();
List<DeclarationDescriptor> allDescriptors = DescriptorSerializer.sort(namespace.getMemberScope().getAllDescriptors());
final File destDir = new File(DEST_DIR);
if (!FileUtil.delete(destDir)) {