<commit_before>//
// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

//
// Symbol table for parsing.  Most functionaliy and main ideas
// are documented in the header file.
//

#if defined(_MSC_VER)
#pragma warning(disable: 4718)
#endif

#include "compiler/SymbolTable.h"

#include <stdio.h>
#include <algorithm>
#include <climits>

int TSymbolTableLevel::uniqueId = 0;

TType::TType(const TPublicType &p) :
            type(p.type), precision(p.precision), qualifier(p.qualifier), primarySize(p.primarySize), secondarySize(p.secondarySize), array(p.array), layoutQualifier(p.layoutQualifier), arraySize(p.arraySize),
            interfaceBlock(0), structure(0)
{
    if (p.userDef) {
        structure = p.userDef->getStruct();
    }
}

//
// Recursively generate mangled names.
//
TString TType::buildMangledName() const
{
    TString mangledName;
    if (isMatrix())
        mangledName += 'm';
    else if (isVector())
        mangledName += 'v';

    switch (type)
    {
      case EbtFloat:                mangledName += 'f';      break;
      case EbtInt:                  mangledName += 'i';      break;
      case EbtBool:                 mangledName += 'b';      break;
      case EbtSampler2D:            mangledName += "s2";     break;
      case EbtSampler3D:            mangledName += "s3";     break;
      case EbtSamplerCube:          mangledName += "sC";     break;
      case EbtSampler2DArray:       mangledName += "s2a";    break;
      case EbtISampler2D:           mangledName += "is2";    break;
      case EbtISampler3D:           mangledName += "is3";    break;
      case EbtISamplerCube:         mangledName += "isC";    break;
      case EbtISampler2DArray:      mangledName += "is2a";   break;
      case EbtUSampler2D:           mangledName += "us2";    break;
      case EbtUSampler3D:           mangledName += "us3";    break;
      case EbtUSamplerCube:         mangledName += "usC";    break;
      case EbtUSampler2DArray:      mangledName += "us2a";   break;
      case EbtSampler2DShadow:      mangledName += "s2s";    break;
      case EbtSamplerCubeShadow:    mangledName += "sCs";    break;
      case EbtSampler2DArrayShadow: mangledName += "s2as";   break;
      case EbtStruct:               mangledName += structure->mangledName(); break;
      case EbtInterfaceBlock:       mangledName += interfaceBlock->mangledName(); break;<commit_msg>Add a missing case to build manged names of uint types.<commit_after>//
// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

//
// Symbol table for parsing.  Most functionaliy and main ideas
// are documented in the header file.
//

#if defined(_MSC_VER)
#pragma warning(disable: 4718)
#endif

#include "compiler/SymbolTable.h"

#include <stdio.h>
#include <algorithm>
#include <climits>

int TSymbolTableLevel::uniqueId = 0;

TType::TType(const TPublicType &p) :
            type(p.type), precision(p.precision), qualifier(p.qualifier), primarySize(p.primarySize), secondarySize(p.secondarySize), array(p.array), layoutQualifier(p.layoutQualifier), arraySize(p.arraySize),
            interfaceBlock(0), structure(0)
{
    if (p.userDef) {
        structure = p.userDef->getStruct();
    }
}

//
// Recursively generate mangled names.
//
TString TType::buildMangledName() const
{
    TString mangledName;
    if (isMatrix())
        mangledName += 'm';
    else if (isVector())
        mangledName += 'v';

    switch (type)
    {
      case EbtFloat:                mangledName += 'f';      break;
      case EbtInt:                  mangledName += 'i';      break;
      case EbtUInt:                 mangledName += 'u';      break;
      case EbtBool:                 mangledName += 'b';      break;
      case EbtSampler2D:            mangledName += "s2";     break;
      case EbtSampler3D:            mangledName += "s3";     break;
      case EbtSamplerCube:          mangledName += "sC";     break;
      case EbtSampler2DArray:       mangledName += "s2a";    break;
      case EbtISampler2D:           mangledName += "is2";    break;
      case EbtISampler3D:           mangledName += "is3";    break;
      case EbtISamplerCube:         mangledName += "isC";    break;
      case EbtISampler2DArray:      mangledName += "is2a";   break;
      case EbtUSampler2D:           mangledName += "us2";    break;
      case EbtUSampler3D:           mangledName += "us3";    break;
      case EbtUSamplerCube:         mangledName += "usC";    break;
      case EbtUSampler2DArray:      mangledName += "us2a";   break;
      case EbtSampler2DShadow:      mangledName += "s2s";    break;
      case EbtSamplerCubeShadow:    mangledName += "sCs";    break;
      case EbtSampler2DArrayShadow: mangledName += "s2as";   break;
      case EbtStruct:               mangledName += structure->mangledName(); break;
      case EbtInterfaceBlock:       mangledName += interfaceBlock->mangledName(); break;
{'fraction_non_alphanumeric': 0.11513029949436017, 'fraction_numerical': 0.014391287436795021, 'mean_word_length': 2.4082173624917163, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '6512479', 'n_tokens_mistral': 1666, 'n_tokens_neox': 1620, 'n_words': 412}