_Z14ImportCallbackPvPKcS1_PPcS3_Pm:
   26|     65|                     char** found_here, char **buf, size_t *buflen) {
   27|       |  // Don't load file and mark it as failure.
   28|     65|  *buf = NULL;
   29|     65|  *buflen = 0;
   30|     65|  return 1;
   31|     65|}
_Z20ConvertJsonnetToJsonRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
   33|  8.93k|std::string ConvertJsonnetToJson(const std::string& jsonnet) {
   34|  8.93k|  JsonnetVm* jvm = jsonnet_make();
   35|  8.93k|  jsonnet_import_callback(jvm, ImportCallback, jvm);
   36|  8.93k|  int error = 0;
   37|  8.93k|  char* res =
   38|  8.93k|      jsonnet_evaluate_snippet(jvm, /*filename=*/"", jsonnet.c_str(), &error);
   39|       |
   40|  8.93k|  std::string json;
   41|  8.93k|  if (error == 0 && res != nullptr) {
  ------------------
  |  Branch (41:7): [True: 1.71k, False: 7.22k]
  |  Branch (41:21): [True: 1.71k, False: 0]
  ------------------
   42|  1.71k|    json = res;
   43|  1.71k|  }
   44|       |
   45|  8.93k|  if (res) {
  ------------------
  |  Branch (45:7): [True: 8.93k, False: 0]
  ------------------
   46|  8.93k|    jsonnet_realloc(jvm, res, 0);
   47|  8.93k|  }
   48|  8.93k|  jsonnet_destroy(jvm);
   49|  8.93k|  return json;
   50|  8.93k|}
LLVMFuzzerTestOneInput:
   52|  8.93k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   53|  8.93k|  std::string fuzz_jsonnet(reinterpret_cast<const char*>(data), size);
   54|  8.93k|  ConvertJsonnetToJson(fuzz_jsonnet);
   55|  8.93k|  return 0;
   56|  8.93k|}

libjsonnet.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1014|      2|{
 1015|      2|    std::map<BinaryOp, int> r;
 1016|       |
 1017|      2|    r[BOP_MULT] = 5;
 1018|      2|    r[BOP_DIV] = 5;
 1019|      2|    r[BOP_PERCENT] = 5;
 1020|       |
 1021|      2|    r[BOP_PLUS] = 6;
 1022|      2|    r[BOP_MINUS] = 6;
 1023|       |
 1024|      2|    r[BOP_SHIFT_L] = 7;
 1025|      2|    r[BOP_SHIFT_R] = 7;
 1026|       |
 1027|      2|    r[BOP_GREATER] = 8;
 1028|      2|    r[BOP_GREATER_EQ] = 8;
 1029|      2|    r[BOP_LESS] = 8;
 1030|      2|    r[BOP_LESS_EQ] = 8;
 1031|      2|    r[BOP_IN] = 8;
 1032|       |
 1033|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1034|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1035|       |
 1036|      2|    r[BOP_BITWISE_AND] = 10;
 1037|       |
 1038|      2|    r[BOP_BITWISE_XOR] = 11;
 1039|       |
 1040|      2|    r[BOP_BITWISE_OR] = 12;
 1041|       |
 1042|      2|    r[BOP_AND] = 13;
 1043|       |
 1044|      2|    r[BOP_OR] = 14;
 1045|       |
 1046|      2|    return r;
 1047|      2|}
libjsonnet.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1050|      2|{
 1051|      2|    std::map<std::string, UnaryOp> r;
 1052|      2|    r["!"] = UOP_NOT;
 1053|      2|    r["~"] = UOP_BITWISE_NOT;
 1054|      2|    r["+"] = UOP_PLUS;
 1055|      2|    r["-"] = UOP_MINUS;
 1056|      2|    return r;
 1057|      2|}
libjsonnet.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1060|      2|{
 1061|      2|    std::map<std::string, BinaryOp> r;
 1062|       |
 1063|      2|    r["*"] = BOP_MULT;
 1064|      2|    r["/"] = BOP_DIV;
 1065|      2|    r["%"] = BOP_PERCENT;
 1066|       |
 1067|      2|    r["+"] = BOP_PLUS;
 1068|      2|    r["-"] = BOP_MINUS;
 1069|       |
 1070|      2|    r["<<"] = BOP_SHIFT_L;
 1071|      2|    r[">>"] = BOP_SHIFT_R;
 1072|       |
 1073|      2|    r[">"] = BOP_GREATER;
 1074|      2|    r[">="] = BOP_GREATER_EQ;
 1075|      2|    r["<"] = BOP_LESS;
 1076|      2|    r["<="] = BOP_LESS_EQ;
 1077|      2|    r["in"] = BOP_IN;
 1078|       |
 1079|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1080|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1081|       |
 1082|      2|    r["&"] = BOP_BITWISE_AND;
 1083|      2|    r["^"] = BOP_BITWISE_XOR;
 1084|      2|    r["|"] = BOP_BITWISE_OR;
 1085|       |
 1086|      2|    r["&&"] = BOP_AND;
 1087|      2|    r["||"] = BOP_OR;
 1088|      2|    return r;
 1089|      2|}
_ZN7jsonnet8internal9AllocatorD2Ev:
  991|  8.93k|    {
  992|   111M|        for (auto x : allocated) {
  ------------------
  |  Branch (992:21): [True: 111M, False: 8.93k]
  ------------------
  993|   111M|            delete x;
  994|   111M|        }
  995|  8.93k|        allocated.clear();
  996|  2.41M|        for (const auto &x : internedIdentifiers) {
  ------------------
  |  Branch (996:28): [True: 2.41M, False: 8.93k]
  ------------------
  997|  2.41M|            delete x.second;
  998|  2.41M|        }
  999|  8.93k|        internedIdentifiers.clear();
 1000|  8.93k|    }
_ZN7jsonnet8internal10IdentifierC2ERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  111|  2.99M|    Identifier(const UString &name) : name(name) {}
_ZN7jsonnet8internal3ASTC2ERKNS0_13LocationRangeENS0_7ASTTypeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEE:
  131|   106M|    {
  132|   106M|    }
_ZN7jsonnet8internal3ASTD2Ev:
  133|   111M|    virtual ~AST(void) {}
_ZN7jsonnet8internal8ArgParamC2ERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEEPKNS0_10IdentifierES9_:
  157|   718k|    {
  158|   718k|    }
_ZN7jsonnet8internal8ArgParamC2EPNS0_3ASTERKNSt3__16vectorINS0_13FodderElementENS4_9allocatorIS6_EEEE:
  162|  7.54M|    {
  163|  7.54M|    }
_ZN7jsonnet8internal8ArgParamC2ERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEEPKNS0_10IdentifierES9_PNS0_3ASTES9_:
  168|  15.7M|    {
  169|  15.7M|    }
_ZN7jsonnet8internal17ComprehensionSpecC2ENS1_4KindERKNSt3__16vectorINS0_13FodderElementENS3_9allocatorIS5_EEEESA_PKNS0_10IdentifierESA_PNS0_3ASTE:
  191|   511k|    {
  192|   511k|    }
_ZN7jsonnet8internal5ApplyC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_RKNS6_INS0_8ArgParamENS8_ISF_EEEEbSC_SC_b:
  215|  10.8M|    {
  216|  10.8M|    }
_ZN7jsonnet8internal10ApplyBraceC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESE_:
  225|  89.6k|    {
  226|  89.6k|    }
_ZN7jsonnet8internal5Array7ElementC2EPNS0_3ASTERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEE:
  234|  3.71M|        Element(AST *expr, const Fodder &comma_fodder) : expr(expr), commaFodder(comma_fodder) {}
_ZN7jsonnet8internal5ArrayC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS6_INS1_7ElementENS8_ISD_EEEEbSC_:
  246|  1.57M|    {
  247|  1.57M|    }
_ZN7jsonnet8internal18ArrayComprehensionC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_bRKNS6_INS0_17ComprehensionSpecENS8_ISF_EEEESC_:
  266|   326k|    {
  267|   326k|        assert(specs.size() > 0);
  268|   326k|    }
_ZN7jsonnet8internal6AssertC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_SE_SC_SE_:
  290|   350k|    {
  291|   350k|    }
_ZN7jsonnet8internal6BinaryC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_NS0_8BinaryOpESE_:
  366|  8.75M|    {
  367|  8.75M|    }
_ZN7jsonnet8internal15BuiltinFunctionC2ERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERKNS5_6vectorIPKNS0_10IdentifierENS9_ISH_EEEE:
  380|   332k|    {
  381|   332k|    }
_ZN7jsonnet8internal11ConditionalC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_SE_SC_SE_:
  404|  4.18M|    {
  405|  4.18M|    }
_ZN7jsonnet8internal6DollarC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEE:
  410|  45.3k|    Dollar(const LocationRange &lr, const Fodder &open_fodder) : AST(lr, AST_DOLLAR, open_fodder) {}
_ZN7jsonnet8internal5ErrorC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTE:
  418|  1.43M|    {
  419|  1.43M|    }
_ZN7jsonnet8internal8FunctionC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEESC_RKNS6_INS0_8ArgParamENS8_ISD_EEEEbSC_PNS0_3ASTE:
  438|  2.22M|    {
  439|  2.22M|    }
_ZN7jsonnet8internal6ImportC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_13LiteralStringE:
  449|    295|    {
  450|    295|    }
_ZN7jsonnet8internal9ImportstrC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_13LiteralStringE:
  458|    520|    {
  459|    520|    }
_ZN7jsonnet8internal9ImportbinC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_13LiteralStringE:
  467|    687|    {
  468|    687|    }
_ZN7jsonnet8internal5IndexC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_SC_PKNS0_10IdentifierE:
  498|  6.04M|    {
  499|  6.04M|    }
_ZN7jsonnet8internal5IndexC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_bSE_SC_SE_SC_SE_SC_:
  515|  5.00M|    {
  516|  5.00M|    }
_ZN7jsonnet8internal5Local4BindC2ERKNSt3__16vectorINS0_13FodderElementENS3_9allocatorIS5_EEEEPKNS0_10IdentifierESA_PNS0_3ASTEbSA_RKNS4_INS0_8ArgParamENS6_ISG_EEEEbSA_SA_:
  545|  3.53M|        {
  546|  3.53M|        }
_ZN7jsonnet8internal5LocalC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS6_INS1_4BindENS8_ISD_EEEEPNS0_3ASTE:
  553|  4.05M|    {
  554|  4.05M|    }
_ZN7jsonnet8internal14LiteralBooleanC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEb:
  562|   909k|    {
  563|   909k|    }
_ZN7jsonnet8internal11LiteralNullC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEE:
  570|   436k|    {
  571|   436k|    }
_ZN7jsonnet8internal13LiteralNumberC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS5_12basic_stringIcNS5_11char_traitsIcEENS8_IcEEEE:
  582|  6.83M|    {
  583|  6.83M|    }
_ZN7jsonnet8internal13LiteralStringC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS5_12basic_stringIDiNS5_11char_traitsIDiEENS8_IDiEEEENS1_9TokenKindERKNSD_IcNSE_IcEENS8_IcEEEESP_:
  601|  16.6M|    {
  602|  16.6M|    }
_ZN7jsonnet8internal11ObjectFieldC2ENS1_4KindERKNSt3__16vectorINS0_13FodderElementENS3_9allocatorIS5_EEEESA_SA_SA_NS1_4HideEbbPNS0_3ASTEPKNS0_10IdentifierERKNS0_13LocationRangeERKNS4_INS0_8ArgParamENS6_ISK_EEEEbSA_SD_SD_SA_:
  683|  2.30M|    {
  684|       |        // Enforce what is written in comments above.
  685|  2.30M|        assert(kind != ASSERT || (hide == VISIBLE && !superSugar && !methodSugar));
  686|      0|        assert(kind != LOCAL || (hide == VISIBLE && !superSugar));
  687|      0|        assert(kind != FIELD_ID || (id != nullptr && expr1 == nullptr));
  688|      0|        assert(kind == FIELD_ID || kind == LOCAL || id == nullptr);
  689|      0|        assert(methodSugar || (params.size() == 0 && !trailingComma));
  690|      0|        assert(kind == ASSERT || expr3 == nullptr);
  691|  2.30M|    }
_ZN7jsonnet8internal11ObjectField5LocalERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEES9_S9_S9_bPKNS0_10IdentifierERKNS3_INS0_8ArgParamENS5_ISD_EEEEbS9_PNS0_3ASTES9_:
  697|  60.0k|    {
  698|  60.0k|        return ObjectField(LOCAL,
  699|  60.0k|                           fodder1,
  700|  60.0k|                           fodder2,
  701|  60.0k|                           fodder_l,
  702|  60.0k|                           fodder_r,
  703|  60.0k|                           VISIBLE,
  704|  60.0k|                           false,
  705|  60.0k|                           method_sugar,
  706|  60.0k|                           nullptr,
  707|  60.0k|                           id,
  708|  60.0k|                           LocationRange(),
  709|  60.0k|                           params,
  710|  60.0k|                           trailing_comma,
  711|  60.0k|                           op_fodder,
  712|  60.0k|                           body,
  713|  60.0k|                           nullptr,
  714|  60.0k|                           comma_fodder);
  715|  60.0k|    }
_ZN7jsonnet8internal11ObjectField5LocalERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEES9_PKNS0_10IdentifierES9_PNS0_3ASTES9_:
  718|  35.2k|    {
  719|  35.2k|        return ObjectField(LOCAL,
  720|  35.2k|                           fodder1,
  721|  35.2k|                           fodder2,
  722|  35.2k|                           Fodder{},
  723|  35.2k|                           Fodder{},
  724|  35.2k|                           VISIBLE,
  725|  35.2k|                           false,
  726|  35.2k|                           false,
  727|  35.2k|                           nullptr,
  728|  35.2k|                           id,
  729|  35.2k|                           LocationRange(),
  730|  35.2k|                           ArgParams{},
  731|  35.2k|                           false,
  732|  35.2k|                           op_fodder,
  733|  35.2k|                           body,
  734|  35.2k|                           nullptr,
  735|  35.2k|                           comma_fodder);
  736|  35.2k|    }
_ZN7jsonnet8internal11ObjectField6AssertERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEEPNS0_3ASTES9_SB_S9_:
  763|   191k|    {
  764|   191k|        return ObjectField(ASSERT,
  765|   191k|                           fodder1,
  766|   191k|                           Fodder{},
  767|   191k|                           Fodder{},
  768|   191k|                           Fodder{},
  769|   191k|                           VISIBLE,
  770|   191k|                           false,
  771|   191k|                           false,
  772|   191k|                           nullptr,
  773|   191k|                           nullptr,
  774|   191k|                           LocationRange(),
  775|   191k|                           ArgParams{},
  776|   191k|                           false,
  777|   191k|                           op_fodder,
  778|   191k|                           body,
  779|   191k|                           msg,
  780|   191k|                           comma_fodder);
  781|   191k|    }
_ZN7jsonnet8internal6ObjectC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS6_INS0_11ObjectFieldENS8_ISD_EEEEbSC_:
  800|   505k|    {
  801|   505k|        assert(fields.size() > 0 || !trailing_comma);
  802|   505k|        if (fields.size() > 0)
  ------------------
  |  Branch (802:13): [True: 413k, False: 92.2k]
  ------------------
  803|   413k|            assert(trailing_comma || fields[fields.size() - 1].commaFodder.size() == 0);
  804|   505k|    }
_ZN7jsonnet8internal15DesugaredObject5FieldC2ENS0_11ObjectField4HideEPNS0_3ASTES6_:
  818|  2.24M|        {
  819|  2.24M|        }
_ZN7jsonnet8internal15DesugaredObjectC2ERKNS0_13LocationRangeERKNSt3__14listIPNS0_3ASTENS5_9allocatorIS8_EEEERKNS5_6vectorINS1_5FieldENS9_ISF_EEEE:
  826|   494k|    {
  827|   494k|    }
_ZN7jsonnet8internal19ObjectComprehensionC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS6_INS0_11ObjectFieldENS8_ISD_EEEEbRKNS6_INS0_17ComprehensionSpecENS8_ISI_EEEESC_:
  845|  43.5k|    {
  846|  43.5k|    }
_ZN7jsonnet8internal25ObjectComprehensionSimpleC2ERKNS0_13LocationRangeEPNS0_3ASTES6_PKNS0_10IdentifierES6_:
  862|  43.1k|    {
  863|  43.1k|    }
_ZN7jsonnet8internal6ParensC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_:
  873|   410k|    {
  874|   410k|    }
_ZN7jsonnet8internal4SelfC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEE:
  879|  74.5k|    Self(const LocationRange &lr, const Fodder &open_fodder) : AST(lr, AST_SELF, open_fodder) {}
_ZN7jsonnet8internal10SuperIndexC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEESC_PNS0_3ASTESC_PKNS0_10IdentifierE:
  899|  28.1k|    {
  900|  28.1k|    }
_ZN7jsonnet8internal7InSuperC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_SC_:
  915|  26.3k|    {
  916|  26.3k|    }
_ZN7jsonnet8internal5UnaryC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEENS0_7UnaryOpEPNS0_3ASTE:
  941|   747k|    {
  942|   747k|    }
_ZN7jsonnet8internal3VarC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPKNS0_10IdentifierE:
  950|  34.1M|    {
  951|  34.1M|    }
_ZN7jsonnet8internal9Allocator14makeIdentifierERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  981|  65.1M|    {
  982|  65.1M|        auto it = internedIdentifiers.find(name);
  983|  65.1M|        if (it != internedIdentifiers.end()) {
  ------------------
  |  Branch (983:13): [True: 62.7M, False: 2.41M]
  ------------------
  984|  62.7M|            return it->second;
  985|  62.7M|        }
  986|  2.41M|        auto r = new Identifier(name);
  987|  2.41M|        internedIdentifiers[name] = r;
  988|  2.41M|        return r;
  989|  65.1M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1014|      2|{
 1015|      2|    std::map<BinaryOp, int> r;
 1016|       |
 1017|      2|    r[BOP_MULT] = 5;
 1018|      2|    r[BOP_DIV] = 5;
 1019|      2|    r[BOP_PERCENT] = 5;
 1020|       |
 1021|      2|    r[BOP_PLUS] = 6;
 1022|      2|    r[BOP_MINUS] = 6;
 1023|       |
 1024|      2|    r[BOP_SHIFT_L] = 7;
 1025|      2|    r[BOP_SHIFT_R] = 7;
 1026|       |
 1027|      2|    r[BOP_GREATER] = 8;
 1028|      2|    r[BOP_GREATER_EQ] = 8;
 1029|      2|    r[BOP_LESS] = 8;
 1030|      2|    r[BOP_LESS_EQ] = 8;
 1031|      2|    r[BOP_IN] = 8;
 1032|       |
 1033|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1034|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1035|       |
 1036|      2|    r[BOP_BITWISE_AND] = 10;
 1037|       |
 1038|      2|    r[BOP_BITWISE_XOR] = 11;
 1039|       |
 1040|      2|    r[BOP_BITWISE_OR] = 12;
 1041|       |
 1042|      2|    r[BOP_AND] = 13;
 1043|       |
 1044|      2|    r[BOP_OR] = 14;
 1045|       |
 1046|      2|    return r;
 1047|      2|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1050|      2|{
 1051|      2|    std::map<std::string, UnaryOp> r;
 1052|      2|    r["!"] = UOP_NOT;
 1053|      2|    r["~"] = UOP_BITWISE_NOT;
 1054|      2|    r["+"] = UOP_PLUS;
 1055|      2|    r["-"] = UOP_MINUS;
 1056|      2|    return r;
 1057|      2|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1060|      2|{
 1061|      2|    std::map<std::string, BinaryOp> r;
 1062|       |
 1063|      2|    r["*"] = BOP_MULT;
 1064|      2|    r["/"] = BOP_DIV;
 1065|      2|    r["%"] = BOP_PERCENT;
 1066|       |
 1067|      2|    r["+"] = BOP_PLUS;
 1068|      2|    r["-"] = BOP_MINUS;
 1069|       |
 1070|      2|    r["<<"] = BOP_SHIFT_L;
 1071|      2|    r[">>"] = BOP_SHIFT_R;
 1072|       |
 1073|      2|    r[">"] = BOP_GREATER;
 1074|      2|    r[">="] = BOP_GREATER_EQ;
 1075|      2|    r["<"] = BOP_LESS;
 1076|      2|    r["<="] = BOP_LESS_EQ;
 1077|      2|    r["in"] = BOP_IN;
 1078|       |
 1079|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1080|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1081|       |
 1082|      2|    r["&"] = BOP_BITWISE_AND;
 1083|      2|    r["^"] = BOP_BITWISE_XOR;
 1084|      2|    r["|"] = BOP_BITWISE_OR;
 1085|       |
 1086|      2|    r["&&"] = BOP_AND;
 1087|      2|    r["||"] = BOP_OR;
 1088|      2|    return r;
 1089|      2|}
_ZN7jsonnet8internal9Allocator4makeINS0_6AssertEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SF_SG_SF_EEEPT_DpOT0_:
  963|   350k|    {
  964|   350k|        auto r = new T(std::forward<Args>(args)...);
  965|   350k|        allocated.push_back(r);
  966|   350k|        return r;
  967|   350k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ErrorEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  963|   544k|    {
  964|   544k|        auto r = new T(std::forward<Args>(args)...);
  965|   544k|        allocated.push_back(r);
  966|   544k|        return r;
  967|   544k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SF_SG_SF_EEEPT_DpOT0_:
  963|  2.71M|    {
  964|  2.71M|        auto r = new T(std::forward<Args>(args)...);
  965|  2.71M|        allocated.push_back(r);
  966|  2.71M|        return r;
  967|  2.71M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SF_SA_DnEEEPT_DpOT0_:
  963|  34.1k|    {
  964|  34.1k|        auto r = new T(std::forward<Args>(args)...);
  965|  34.1k|        allocated.push_back(r);
  966|  34.1k|        return r;
  967|  34.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_8FunctionEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERSA_RNS6_INS0_8ArgParamENS8_ISE_EEEERbSD_RPNS0_3ASTEEEEPT_DpOT0_:
  963|   180k|    {
  964|   180k|        auto r = new T(std::forward<Args>(args)...);
  965|   180k|        allocated.push_back(r);
  966|   180k|        return r;
  967|   180k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6ImportEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_13LiteralStringEEEEPT_DpOT0_:
  963|    295|    {
  964|    295|        auto r = new T(std::forward<Args>(args)...);
  965|    295|        allocated.push_back(r);
  966|    295|        return r;
  967|    295|    }
_ZN7jsonnet8internal9Allocator4makeINS0_9ImportstrEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_13LiteralStringEEEEPT_DpOT0_:
  963|    520|    {
  964|    520|        auto r = new T(std::forward<Args>(args)...);
  965|    520|        allocated.push_back(r);
  966|    520|        return r;
  967|    520|    }
_ZN7jsonnet8internal9Allocator4makeINS0_9ImportbinEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_13LiteralStringEEEEPT_DpOT0_:
  963|    687|    {
  964|    687|        auto r = new T(std::forward<Args>(args)...);
  965|    687|        allocated.push_back(r);
  966|    687|        return r;
  967|    687|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS3_4BindENS8_ISD_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  963|  2.04M|    {
  964|  2.04M|        auto r = new T(std::forward<Args>(args)...);
  965|  2.04M|        allocated.push_back(r);
  966|  2.04M|        return r;
  967|  2.04M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5UnaryEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS0_7UnaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  963|   508k|    {
  964|   508k|        auto r = new T(std::forward<Args>(args)...);
  965|   508k|        allocated.push_back(r);
  966|   508k|        return r;
  967|   508k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6ObjectEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS0_11ObjectFieldENS8_ISD_EEEERbRSA_EEEPT_DpOT0_:
  963|   505k|    {
  964|   505k|        auto r = new T(std::forward<Args>(args)...);
  965|   505k|        allocated.push_back(r);
  966|   505k|        return r;
  967|   505k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_19ObjectComprehensionEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS0_11ObjectFieldENS8_ISD_EEEERbRNS6_INS0_17ComprehensionSpecENS8_ISI_EEEERSA_EEEPT_DpOT0_:
  963|  43.5k|    {
  964|  43.5k|        auto r = new T(std::forward<Args>(args)...);
  965|  43.5k|        allocated.push_back(r);
  966|  43.5k|        return r;
  967|  43.5k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS6_12basic_stringIDiNS6_11char_traitsIDiEENS9_IDiEEEENS3_9TokenKindERA1_KcSL_EEEPT_DpOT0_:
  963|  61.3k|    {
  964|  61.3k|        auto r = new T(std::forward<Args>(args)...);
  965|  61.3k|        allocated.push_back(r);
  966|  61.3k|        return r;
  967|  61.3k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS6_12basic_stringIDiNS6_11char_traitsIDiEENS9_IDiEEEENS3_9TokenKindERNSD_IcNSE_IcEENS9_IcEEEESM_EEEPT_DpOT0_:
  963|  2.11k|    {
  964|  2.11k|        auto r = new T(std::forward<Args>(args)...);
  965|  2.11k|        allocated.push_back(r);
  966|  2.11k|        return r;
  967|  2.11k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEENS6_INS3_7ElementENS8_ISC_EEEEbSB_EEEPT_DpOT0_:
  963|   188k|    {
  964|   188k|        auto r = new T(std::forward<Args>(args)...);
  965|   188k|        allocated.push_back(r);
  966|   188k|        return r;
  967|   188k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_18ArrayComprehensionEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTESB_RbRNS6_INS0_17ComprehensionSpecENS8_ISG_EEEESB_EEEPT_DpOT0_:
  963|   283k|    {
  964|   283k|        auto r = new T(std::forward<Args>(args)...);
  965|   283k|        allocated.push_back(r);
  966|   283k|        return r;
  967|   283k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS3_7ElementENS8_ISC_EEEERbSB_EEEPT_DpOT0_:
  963|   694k|    {
  964|   694k|        auto r = new T(std::forward<Args>(args)...);
  965|   694k|        allocated.push_back(r);
  966|   694k|        return r;
  967|   694k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6ParensEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTESB_EEEPT_DpOT0_:
  963|   410k|    {
  964|   410k|        auto r = new T(std::forward<Args>(args)...);
  965|   410k|        allocated.push_back(r);
  966|   410k|        return r;
  967|   410k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralNumberEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS5_12basic_stringIcNS5_11char_traitsIcEENS8_IcEEEEEEEPT_DpOT0_:
  963|  6.09M|    {
  964|  6.09M|        auto r = new T(std::forward<Args>(args)...);
  965|  6.09M|        allocated.push_back(r);
  966|  6.09M|        return r;
  967|  6.09M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEENS5_12basic_stringIDiNS5_11char_traitsIDiEENS8_IDiEEEENS3_9TokenKindERA1_KcSK_EEEPT_DpOT0_:
  963|  4.21M|    {
  964|  4.21M|        auto r = new T(std::forward<Args>(args)...);
  965|  4.21M|        allocated.push_back(r);
  966|  4.21M|        return r;
  967|  4.21M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEENS5_12basic_stringIDiNS5_11char_traitsIDiEENS8_IDiEEEENS3_9TokenKindERNSC_IcNSD_IcEENS8_IcEEEESL_EEEPT_DpOT0_:
  963|  1.07k|    {
  964|  1.07k|        auto r = new T(std::forward<Args>(args)...);
  965|  1.07k|        allocated.push_back(r);
  966|  1.07k|        return r;
  967|  1.07k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_14LiteralBooleanEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEbEEEPT_DpOT0_:
  963|   726k|    {
  964|   726k|        auto r = new T(std::forward<Args>(args)...);
  965|   726k|        allocated.push_back(r);
  966|   726k|        return r;
  967|   726k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11LiteralNullEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEEEEPT_DpOT0_:
  963|   145k|    {
  964|   145k|        auto r = new T(std::forward<Args>(args)...);
  965|   145k|        allocated.push_back(r);
  966|   145k|        return r;
  967|   145k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6DollarEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEEEEPT_DpOT0_:
  963|  45.3k|    {
  964|  45.3k|        auto r = new T(std::forward<Args>(args)...);
  965|  45.3k|        allocated.push_back(r);
  966|  45.3k|        return r;
  967|  45.3k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPKNS0_10IdentifierEEEEPT_DpOT0_:
  963|  26.5M|    {
  964|  26.5M|        auto r = new T(std::forward<Args>(args)...);
  965|  26.5M|        allocated.push_back(r);
  966|  26.5M|        return r;
  967|  26.5M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_4SelfEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEEEEPT_DpOT0_:
  963|  38.0k|    {
  964|  38.0k|        auto r = new T(std::forward<Args>(args)...);
  965|  38.0k|        allocated.push_back(r);
  966|  38.0k|        return r;
  967|  38.0k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_10SuperIndexEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEESB_RPNS0_3ASTESB_RPKNS0_10IdentifierEEEEPT_DpOT0_:
  963|  2.22k|    {
  964|  2.22k|        auto r = new T(std::forward<Args>(args)...);
  965|  2.22k|        allocated.push_back(r);
  966|  2.22k|        return r;
  967|  2.22k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_RbSF_SG_SF_SG_SF_SG_EEEPT_DpOT0_:
  963|  1.44M|    {
  964|  1.44M|        auto r = new T(std::forward<Args>(args)...);
  965|  1.44M|        allocated.push_back(r);
  966|  1.44M|        return r;
  967|  1.44M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SG_RPKNS0_10IdentifierEEEEPT_DpOT0_:
  963|  6.04M|    {
  964|  6.04M|        auto r = new T(std::forward<Args>(args)...);
  965|  6.04M|        allocated.push_back(r);
  966|  6.04M|        return r;
  967|  6.04M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_RNS6_INS0_8ArgParamENS8_ISH_EEEERbSG_SG_SL_EEEPT_DpOT0_:
  963|  6.88M|    {
  964|  6.88M|        auto r = new T(std::forward<Args>(args)...);
  965|  6.88M|        allocated.push_back(r);
  966|  6.88M|        return r;
  967|  6.88M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_10ApplyBraceEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTESF_EEEPT_DpOT0_:
  963|  89.6k|    {
  964|  89.6k|        auto r = new T(std::forward<Args>(args)...);
  965|  89.6k|        allocated.push_back(r);
  966|  89.6k|        return r;
  967|  89.6k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_7InSuperEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SG_EEEPT_DpOT0_:
  963|    420|    {
  964|    420|        auto r = new T(std::forward<Args>(args)...);
  965|    420|        allocated.push_back(r);
  966|    420|        return r;
  967|    420|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_RNS0_8BinaryOpESF_EEEPT_DpOT0_:
  963|  7.45M|    {
  964|  7.45M|        auto r = new T(std::forward<Args>(args)...);
  965|  7.45M|        allocated.push_back(r);
  966|  7.45M|        return r;
  967|  7.45M|    }
static_analysis.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1014|      2|{
 1015|      2|    std::map<BinaryOp, int> r;
 1016|       |
 1017|      2|    r[BOP_MULT] = 5;
 1018|      2|    r[BOP_DIV] = 5;
 1019|      2|    r[BOP_PERCENT] = 5;
 1020|       |
 1021|      2|    r[BOP_PLUS] = 6;
 1022|      2|    r[BOP_MINUS] = 6;
 1023|       |
 1024|      2|    r[BOP_SHIFT_L] = 7;
 1025|      2|    r[BOP_SHIFT_R] = 7;
 1026|       |
 1027|      2|    r[BOP_GREATER] = 8;
 1028|      2|    r[BOP_GREATER_EQ] = 8;
 1029|      2|    r[BOP_LESS] = 8;
 1030|      2|    r[BOP_LESS_EQ] = 8;
 1031|      2|    r[BOP_IN] = 8;
 1032|       |
 1033|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1034|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1035|       |
 1036|      2|    r[BOP_BITWISE_AND] = 10;
 1037|       |
 1038|      2|    r[BOP_BITWISE_XOR] = 11;
 1039|       |
 1040|      2|    r[BOP_BITWISE_OR] = 12;
 1041|       |
 1042|      2|    r[BOP_AND] = 13;
 1043|       |
 1044|      2|    r[BOP_OR] = 14;
 1045|       |
 1046|      2|    return r;
 1047|      2|}
static_analysis.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1050|      2|{
 1051|      2|    std::map<std::string, UnaryOp> r;
 1052|      2|    r["!"] = UOP_NOT;
 1053|      2|    r["~"] = UOP_BITWISE_NOT;
 1054|      2|    r["+"] = UOP_PLUS;
 1055|      2|    r["-"] = UOP_MINUS;
 1056|      2|    return r;
 1057|      2|}
static_analysis.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1060|      2|{
 1061|      2|    std::map<std::string, BinaryOp> r;
 1062|       |
 1063|      2|    r["*"] = BOP_MULT;
 1064|      2|    r["/"] = BOP_DIV;
 1065|      2|    r["%"] = BOP_PERCENT;
 1066|       |
 1067|      2|    r["+"] = BOP_PLUS;
 1068|      2|    r["-"] = BOP_MINUS;
 1069|       |
 1070|      2|    r["<<"] = BOP_SHIFT_L;
 1071|      2|    r[">>"] = BOP_SHIFT_R;
 1072|       |
 1073|      2|    r[">"] = BOP_GREATER;
 1074|      2|    r[">="] = BOP_GREATER_EQ;
 1075|      2|    r["<"] = BOP_LESS;
 1076|      2|    r["<="] = BOP_LESS_EQ;
 1077|      2|    r["in"] = BOP_IN;
 1078|       |
 1079|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1080|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1081|       |
 1082|      2|    r["&"] = BOP_BITWISE_AND;
 1083|      2|    r["^"] = BOP_BITWISE_XOR;
 1084|      2|    r["|"] = BOP_BITWISE_OR;
 1085|       |
 1086|      2|    r["&&"] = BOP_AND;
 1087|      2|    r["||"] = BOP_OR;
 1088|      2|    return r;
 1089|      2|}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1014|      2|{
 1015|      2|    std::map<BinaryOp, int> r;
 1016|       |
 1017|      2|    r[BOP_MULT] = 5;
 1018|      2|    r[BOP_DIV] = 5;
 1019|      2|    r[BOP_PERCENT] = 5;
 1020|       |
 1021|      2|    r[BOP_PLUS] = 6;
 1022|      2|    r[BOP_MINUS] = 6;
 1023|       |
 1024|      2|    r[BOP_SHIFT_L] = 7;
 1025|      2|    r[BOP_SHIFT_R] = 7;
 1026|       |
 1027|      2|    r[BOP_GREATER] = 8;
 1028|      2|    r[BOP_GREATER_EQ] = 8;
 1029|      2|    r[BOP_LESS] = 8;
 1030|      2|    r[BOP_LESS_EQ] = 8;
 1031|      2|    r[BOP_IN] = 8;
 1032|       |
 1033|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1034|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1035|       |
 1036|      2|    r[BOP_BITWISE_AND] = 10;
 1037|       |
 1038|      2|    r[BOP_BITWISE_XOR] = 11;
 1039|       |
 1040|      2|    r[BOP_BITWISE_OR] = 12;
 1041|       |
 1042|      2|    r[BOP_AND] = 13;
 1043|       |
 1044|      2|    r[BOP_OR] = 14;
 1045|       |
 1046|      2|    return r;
 1047|      2|}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1050|      2|{
 1051|      2|    std::map<std::string, UnaryOp> r;
 1052|      2|    r["!"] = UOP_NOT;
 1053|      2|    r["~"] = UOP_BITWISE_NOT;
 1054|      2|    r["+"] = UOP_PLUS;
 1055|      2|    r["-"] = UOP_MINUS;
 1056|      2|    return r;
 1057|      2|}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1060|      2|{
 1061|      2|    std::map<std::string, BinaryOp> r;
 1062|       |
 1063|      2|    r["*"] = BOP_MULT;
 1064|      2|    r["/"] = BOP_DIV;
 1065|      2|    r["%"] = BOP_PERCENT;
 1066|       |
 1067|      2|    r["+"] = BOP_PLUS;
 1068|      2|    r["-"] = BOP_MINUS;
 1069|       |
 1070|      2|    r["<<"] = BOP_SHIFT_L;
 1071|      2|    r[">>"] = BOP_SHIFT_R;
 1072|       |
 1073|      2|    r[">"] = BOP_GREATER;
 1074|      2|    r[">="] = BOP_GREATER_EQ;
 1075|      2|    r["<"] = BOP_LESS;
 1076|      2|    r["<="] = BOP_LESS_EQ;
 1077|      2|    r["in"] = BOP_IN;
 1078|       |
 1079|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1080|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1081|       |
 1082|      2|    r["&"] = BOP_BITWISE_AND;
 1083|      2|    r["^"] = BOP_BITWISE_XOR;
 1084|      2|    r["|"] = BOP_BITWISE_OR;
 1085|       |
 1086|      2|    r["&&"] = BOP_AND;
 1087|      2|    r["||"] = BOP_OR;
 1088|      2|    return r;
 1089|      2|}
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJNS0_13LocationRangeENSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  963|  3.81k|    {
  964|  3.81k|        auto r = new T(std::forward<Args>(args)...);
  965|  3.81k|        allocated.push_back(r);
  966|  3.81k|        return r;
  967|  3.81k|    }
vm.cpp:_ZN7jsonnet8internalL10bop_stringENS0_8BinaryOpE:
  323|    199|{
  324|    199|    switch (bop) {
  325|      3|        case BOP_MULT: return "*";
  ------------------
  |  Branch (325:9): [True: 3, False: 196]
  ------------------
  326|      7|        case BOP_DIV: return "/";
  ------------------
  |  Branch (326:9): [True: 7, False: 192]
  ------------------
  327|      0|        case BOP_PERCENT: return "%";
  ------------------
  |  Branch (327:9): [True: 0, False: 199]
  ------------------
  328|       |
  329|     80|        case BOP_PLUS: return "+";
  ------------------
  |  Branch (329:9): [True: 80, False: 119]
  ------------------
  330|      5|        case BOP_MINUS: return "-";
  ------------------
  |  Branch (330:9): [True: 5, False: 194]
  ------------------
  331|       |
  332|      2|        case BOP_SHIFT_L: return "<<";
  ------------------
  |  Branch (332:9): [True: 2, False: 197]
  ------------------
  333|      1|        case BOP_SHIFT_R: return ">>";
  ------------------
  |  Branch (333:9): [True: 1, False: 198]
  ------------------
  334|       |
  335|     16|        case BOP_GREATER: return ">";
  ------------------
  |  Branch (335:9): [True: 16, False: 183]
  ------------------
  336|     14|        case BOP_GREATER_EQ: return ">=";
  ------------------
  |  Branch (336:9): [True: 14, False: 185]
  ------------------
  337|     28|        case BOP_LESS: return "<";
  ------------------
  |  Branch (337:9): [True: 28, False: 171]
  ------------------
  338|      8|        case BOP_LESS_EQ: return "<=";
  ------------------
  |  Branch (338:9): [True: 8, False: 191]
  ------------------
  339|      0|        case BOP_IN: return "in";
  ------------------
  |  Branch (339:9): [True: 0, False: 199]
  ------------------
  340|       |
  341|      0|        case BOP_MANIFEST_EQUAL: return "==";
  ------------------
  |  Branch (341:9): [True: 0, False: 199]
  ------------------
  342|      0|        case BOP_MANIFEST_UNEQUAL: return "!=";
  ------------------
  |  Branch (342:9): [True: 0, False: 199]
  ------------------
  343|       |
  344|      9|        case BOP_BITWISE_AND: return "&";
  ------------------
  |  Branch (344:9): [True: 9, False: 190]
  ------------------
  345|      8|        case BOP_BITWISE_XOR: return "^";
  ------------------
  |  Branch (345:9): [True: 8, False: 191]
  ------------------
  346|      8|        case BOP_BITWISE_OR: return "|";
  ------------------
  |  Branch (346:9): [True: 8, False: 191]
  ------------------
  347|       |
  348|      1|        case BOP_AND: return "&&";
  ------------------
  |  Branch (348:9): [True: 1, False: 198]
  ------------------
  349|      9|        case BOP_OR: return "||";
  ------------------
  |  Branch (349:9): [True: 9, False: 190]
  ------------------
  350|       |
  351|      0|        default:
  ------------------
  |  Branch (351:9): [True: 0, False: 199]
  ------------------
  352|      0|            std::cerr << "INTERNAL ERROR: Unrecognised binary operator: " << bop << std::endl;
  353|      0|            std::abort();
  354|    199|    }
  355|    199|}
vm.cpp:_ZN7jsonnet8internalL10uop_stringENS0_7UnaryOpE:
  922|    103|{
  923|    103|    switch (uop) {
  924|     51|        case UOP_PLUS: return "+";
  ------------------
  |  Branch (924:9): [True: 51, False: 52]
  ------------------
  925|     15|        case UOP_MINUS: return "-";
  ------------------
  |  Branch (925:9): [True: 15, False: 88]
  ------------------
  926|      5|        case UOP_BITWISE_NOT: return "~";
  ------------------
  |  Branch (926:9): [True: 5, False: 98]
  ------------------
  927|     32|        case UOP_NOT: return "!";
  ------------------
  |  Branch (927:9): [True: 32, False: 71]
  ------------------
  928|       |
  929|      0|        default:
  ------------------
  |  Branch (929:9): [True: 0, False: 103]
  ------------------
  930|      0|            std::cerr << "INTERNAL ERROR: Unrecognised unary operator: " << uop << std::endl;
  931|      0|            std::abort();
  932|    103|    }
  933|    103|}
desugarer.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1014|      2|{
 1015|      2|    std::map<BinaryOp, int> r;
 1016|       |
 1017|      2|    r[BOP_MULT] = 5;
 1018|      2|    r[BOP_DIV] = 5;
 1019|      2|    r[BOP_PERCENT] = 5;
 1020|       |
 1021|      2|    r[BOP_PLUS] = 6;
 1022|      2|    r[BOP_MINUS] = 6;
 1023|       |
 1024|      2|    r[BOP_SHIFT_L] = 7;
 1025|      2|    r[BOP_SHIFT_R] = 7;
 1026|       |
 1027|      2|    r[BOP_GREATER] = 8;
 1028|      2|    r[BOP_GREATER_EQ] = 8;
 1029|      2|    r[BOP_LESS] = 8;
 1030|      2|    r[BOP_LESS_EQ] = 8;
 1031|      2|    r[BOP_IN] = 8;
 1032|       |
 1033|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1034|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1035|       |
 1036|      2|    r[BOP_BITWISE_AND] = 10;
 1037|       |
 1038|      2|    r[BOP_BITWISE_XOR] = 11;
 1039|       |
 1040|      2|    r[BOP_BITWISE_OR] = 12;
 1041|       |
 1042|      2|    r[BOP_AND] = 13;
 1043|       |
 1044|      2|    r[BOP_OR] = 14;
 1045|       |
 1046|      2|    return r;
 1047|      2|}
desugarer.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1050|      2|{
 1051|      2|    std::map<std::string, UnaryOp> r;
 1052|      2|    r["!"] = UOP_NOT;
 1053|      2|    r["~"] = UOP_BITWISE_NOT;
 1054|      2|    r["+"] = UOP_PLUS;
 1055|      2|    r["-"] = UOP_MINUS;
 1056|      2|    return r;
 1057|      2|}
desugarer.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1060|      2|{
 1061|      2|    std::map<std::string, BinaryOp> r;
 1062|       |
 1063|      2|    r["*"] = BOP_MULT;
 1064|      2|    r["/"] = BOP_DIV;
 1065|      2|    r["%"] = BOP_PERCENT;
 1066|       |
 1067|      2|    r["+"] = BOP_PLUS;
 1068|      2|    r["-"] = BOP_MINUS;
 1069|       |
 1070|      2|    r["<<"] = BOP_SHIFT_L;
 1071|      2|    r[">>"] = BOP_SHIFT_R;
 1072|       |
 1073|      2|    r[">"] = BOP_GREATER;
 1074|      2|    r[">="] = BOP_GREATER_EQ;
 1075|      2|    r["<"] = BOP_LESS;
 1076|      2|    r["<="] = BOP_LESS_EQ;
 1077|      2|    r["in"] = BOP_IN;
 1078|       |
 1079|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1080|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1081|       |
 1082|      2|    r["&"] = BOP_BITWISE_AND;
 1083|      2|    r["^"] = BOP_BITWISE_XOR;
 1084|      2|    r["|"] = BOP_BITWISE_OR;
 1085|       |
 1086|      2|    r["&&"] = BOP_AND;
 1087|      2|    r["||"] = BOP_OR;
 1088|      2|    return r;
 1089|      2|}
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_NS0_8BinaryOpESF_EEEPT_DpOT0_:
  963|  83.2k|    {
  964|  83.2k|        auto r = new T(std::forward<Args>(args)...);
  965|  83.2k|        allocated.push_back(r);
  966|  83.2k|        return r;
  967|  83.2k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralNumberEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERA4_KcEEEPT_DpOT0_:
  963|   695k|    {
  964|   695k|        auto r = new T(std::forward<Args>(args)...);
  965|   695k|        allocated.push_back(r);
  966|   695k|        return r;
  967|   695k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_3VarESD_NS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  963|   326k|    {
  964|   326k|        auto r = new T(std::forward<Args>(args)...);
  965|   326k|        allocated.push_back(r);
  966|   326k|        return r;
  967|   326k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  963|   509k|    {
  964|   509k|        auto r = new T(std::forward<Args>(args)...);
  965|   509k|        allocated.push_back(r);
  966|   509k|        return r;
  967|   509k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpEPNS0_5ArrayEEEEPT_DpOT0_:
  963|   326k|    {
  964|   326k|        auto r = new T(std::forward<Args>(args)...);
  965|   326k|        allocated.push_back(r);
  966|   326k|        return r;
  967|   326k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_7ElementENS9_ISE_EEEEbSD_EEEPT_DpOT0_:
  963|   326k|    {
  964|   326k|        auto r = new T(std::forward<Args>(args)...);
  965|   326k|        allocated.push_back(r);
  966|   326k|        return r;
  967|   326k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS8_INS0_8ArgParamENSA_ISH_EEEEbSE_SE_bEEEPT_DpOT0_:
  963|   542k|    {
  964|   542k|        auto r = new T(std::forward<Args>(args)...);
  965|   542k|        allocated.push_back(r);
  966|   542k|        return r;
  967|   542k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERKPNS0_3ASTESD_RSF_SD_SI_EEEPT_DpOT0_:
  963|   150k|    {
  964|   150k|        auto r = new T(std::forward<Args>(args)...);
  965|   150k|        allocated.push_back(r);
  966|   150k|        return r;
  967|   150k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISE_EEEEPNS0_11ConditionalEEEEPT_DpOT0_:
  963|   359k|    {
  964|   359k|        auto r = new T(std::forward<Args>(args)...);
  965|   359k|        allocated.push_back(r);
  966|   359k|        return r;
  967|   359k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_8FunctionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESD_NS7_INS0_8ArgParamENS9_ISE_EEEEbSD_PNS0_11ConditionalEEEEPT_DpOT0_:
  963|   359k|    {
  964|   359k|        auto r = new T(std::forward<Args>(args)...);
  965|   359k|        allocated.push_back(r);
  966|   359k|        return r;
  967|   359k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_6BinaryESD_RPNS0_3ASTESD_PNS0_5LocalEEEEPT_DpOT0_:
  963|   359k|    {
  964|   359k|        auto r = new T(std::forward<Args>(args)...);
  965|   359k|        allocated.push_back(r);
  966|   359k|        return r;
  967|   359k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpEPNS0_5ApplyEEEEPT_DpOT0_:
  963|   359k|    {
  964|   359k|        auto r = new T(std::forward<Args>(args)...);
  965|   359k|        allocated.push_back(r);
  966|   359k|        return r;
  967|   359k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISE_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  963|   364k|    {
  964|   364k|        auto r = new T(std::forward<Args>(args)...);
  965|   364k|        allocated.push_back(r);
  966|   364k|        return r;
  967|   364k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bSG_SE_DnSE_DnSE_EEEPT_DpOT0_:
  963|   359k|    {
  964|   359k|        auto r = new T(std::forward<Args>(args)...);
  965|   359k|        allocated.push_back(r);
  966|   359k|        return r;
  967|   359k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5ApplyESD_SF_SD_PNS0_5ErrorEEEEPT_DpOT0_:
  963|   359k|    {
  964|   359k|        auto r = new T(std::forward<Args>(args)...);
  965|   359k|        allocated.push_back(r);
  966|   359k|        return r;
  967|   359k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEENS8_INS3_7ElementENSA_ISF_EEEEbSE_EEEPT_DpOT0_:
  963|   326k|    {
  964|   326k|        auto r = new T(std::forward<Args>(args)...);
  965|   326k|        allocated.push_back(r);
  966|   326k|        return r;
  967|   326k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERKNS7_12basic_stringIDiNS7_11char_traitsIDiEENSA_IDiEEEENS3_9TokenKindERA1_KcSP_EEEPT_DpOT0_:
  963|  12.3M|    {
  964|  12.3M|        auto r = new T(std::forward<Args>(args)...);
  965|  12.3M|        allocated.push_back(r);
  966|  12.3M|        return r;
  967|  12.3M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ErrorEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  963|   892k|    {
  964|   892k|        auto r = new T(std::forward<Args>(args)...);
  965|   892k|        allocated.push_back(r);
  966|   892k|        return r;
  967|   892k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_SF_SH_SF_EEEPT_DpOT0_:
  963|   350k|    {
  964|   350k|        auto r = new T(std::forward<Args>(args)...);
  965|   350k|        allocated.push_back(r);
  966|   350k|        return r;
  967|   350k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bPNS0_13LiteralStringESE_DnSE_DnSE_EEEPT_DpOT0_:
  963|  3.10M|    {
  964|  3.10M|        auto r = new T(std::forward<Args>(args)...);
  965|  3.10M|        allocated.push_back(r);
  966|  3.10M|        return r;
  967|  3.10M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_RNS7_INS0_8ArgParamENS9_ISI_EEEEbSH_SH_bEEEPT_DpOT0_:
  963|   244k|    {
  964|   244k|        auto r = new T(std::forward<Args>(args)...);
  965|   244k|        allocated.push_back(r);
  966|   244k|        return r;
  967|   244k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_5IndexESE_NS8_INS0_8ArgParamENSA_ISH_EEEEbSE_SE_bEEEPT_DpOT0_:
  963|  1.98M|    {
  964|  1.98M|        auto r = new T(std::forward<Args>(args)...);
  965|  1.98M|        allocated.push_back(r);
  966|  1.98M|        return r;
  967|  1.98M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5UnaryEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS0_7UnaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  963|   238k|    {
  964|   238k|        auto r = new T(std::forward<Args>(args)...);
  965|   238k|        allocated.push_back(r);
  966|   238k|        return r;
  967|   238k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11LiteralNullEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEEEEPT_DpOT0_:
  963|   290k|    {
  964|   290k|        auto r = new T(std::forward<Args>(args)...);
  965|   290k|        allocated.push_back(r);
  966|   290k|        return r;
  967|   290k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  963|  7.33M|    {
  964|  7.33M|        auto r = new T(std::forward<Args>(args)...);
  965|  7.33M|        allocated.push_back(r);
  966|  7.33M|        return r;
  967|  7.33M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5IndexESD_NS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  963|   880k|    {
  964|   880k|        auto r = new T(std::forward<Args>(args)...);
  965|   880k|        allocated.push_back(r);
  966|   880k|        return r;
  967|   880k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_8FunctionEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESC_RNS7_INS0_8ArgParamENS9_ISD_EEEEbSC_RPNS0_3ASTEEEEPT_DpOT0_:
  963|   649k|    {
  964|   649k|        auto r = new T(std::forward<Args>(args)...);
  965|   649k|        allocated.push_back(r);
  966|   649k|        return r;
  967|   649k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_4SelfEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEEEEPT_DpOT0_:
  963|  36.5k|    {
  964|  36.5k|        auto r = new T(std::forward<Args>(args)...);
  965|  36.5k|        allocated.push_back(r);
  966|  36.5k|        return r;
  967|  36.5k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTESD_PNS0_14LiteralBooleanESD_PNS0_5ErrorEEEEPT_DpOT0_:
  963|   183k|    {
  964|   183k|        auto r = new T(std::forward<Args>(args)...);
  965|   183k|        allocated.push_back(r);
  966|   183k|        return r;
  967|   183k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_14LiteralBooleanEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEbEEEPT_DpOT0_:
  963|   183k|    {
  964|   183k|        auto r = new T(std::forward<Args>(args)...);
  965|   183k|        allocated.push_back(r);
  966|   183k|        return r;
  967|   183k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_8FunctionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERSB_RNS7_INS0_8ArgParamENS9_ISF_EEEERbSE_RPNS0_3ASTEEEEPT_DpOT0_:
  963|  1.04M|    {
  964|  1.04M|        auto r = new T(std::forward<Args>(args)...);
  965|  1.04M|        allocated.push_back(r);
  966|  1.04M|        return r;
  967|  1.04M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  963|   172k|    {
  964|   172k|        auto r = new T(std::forward<Args>(args)...);
  965|   172k|        allocated.push_back(r);
  966|   172k|        return r;
  967|   172k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_7InSuperESD_PNS0_6BinaryESD_PNS0_3ASTEEEEPT_DpOT0_:
  963|  25.9k|    {
  964|  25.9k|        auto r = new T(std::forward<Args>(args)...);
  965|  25.9k|        allocated.push_back(r);
  966|  25.9k|        return r;
  967|  25.9k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_7InSuperEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTESD_SD_EEEPT_DpOT0_:
  963|  25.9k|    {
  964|  25.9k|        auto r = new T(std::forward<Args>(args)...);
  965|  25.9k|        allocated.push_back(r);
  966|  25.9k|        return r;
  967|  25.9k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_10SuperIndexESD_NS0_8BinaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  963|  25.9k|    {
  964|  25.9k|        auto r = new T(std::forward<Args>(args)...);
  965|  25.9k|        allocated.push_back(r);
  966|  25.9k|        return r;
  967|  25.9k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_10SuperIndexEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESD_PNS0_3ASTESD_DnEEEPT_DpOT0_:
  963|  25.9k|    {
  964|  25.9k|        auto r = new T(std::forward<Args>(args)...);
  965|  25.9k|        allocated.push_back(r);
  966|  25.9k|        return r;
  967|  25.9k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_15DesugaredObjectEJRNS0_13LocationRangeERNSt3__14listIPNS0_3ASTENS6_9allocatorIS9_EEEERNS6_6vectorINS3_5FieldENSA_ISF_EEEEEEEPT_DpOT0_:
  963|   494k|    {
  964|   494k|        auto r = new T(std::forward<Args>(args)...);
  965|   494k|        allocated.push_back(r);
  966|   494k|        return r;
  967|   494k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERNS7_INS3_4BindENS9_ISE_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  963|  1.27M|    {
  964|  1.27M|        auto r = new T(std::forward<Args>(args)...);
  965|  1.27M|        allocated.push_back(r);
  966|  1.27M|        return r;
  967|  1.27M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bPNS0_13LiteralNumberESE_DnSE_DnSE_EEEPT_DpOT0_:
  963|  46.1k|    {
  964|  46.1k|        auto r = new T(std::forward<Args>(args)...);
  965|  46.1k|        allocated.push_back(r);
  966|  46.1k|        return r;
  967|  46.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralNumberEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEENS7_12basic_stringIcNS7_11char_traitsIcEENSA_IcEEEEEEEPT_DpOT0_:
  963|  46.1k|    {
  964|  46.1k|        auto r = new T(std::forward<Args>(args)...);
  965|  46.1k|        allocated.push_back(r);
  966|  46.1k|        return r;
  967|  46.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_18ArrayComprehensionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5ArrayESD_bRNS7_INS0_17ComprehensionSpecENS9_ISG_EEEESD_EEEPT_DpOT0_:
  963|  43.1k|    {
  964|  43.1k|        auto r = new T(std::forward<Args>(args)...);
  965|  43.1k|        allocated.push_back(r);
  966|  43.1k|        return r;
  967|  43.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERNS7_INS3_7ElementENS9_ISE_EEEEbSD_EEEPT_DpOT0_:
  963|  43.1k|    {
  964|  43.1k|        auto r = new T(std::forward<Args>(args)...);
  965|  43.1k|        allocated.push_back(r);
  966|  43.1k|        return r;
  967|  43.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_25ObjectComprehensionSimpleEJRNS0_13LocationRangeEPNS0_5IndexEPNS0_5LocalERPKNS0_10IdentifierERPNS0_3ASTEEEEPT_DpOT0_:
  963|  43.1k|    {
  964|  43.1k|        auto r = new T(std::forward<Args>(args)...);
  965|  43.1k|        allocated.push_back(r);
  966|  43.1k|        return r;
  967|  43.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bRPNS0_3ASTESE_DnSE_DnSE_EEEPT_DpOT0_:
  963|  43.1k|    {
  964|  43.1k|        auto r = new T(std::forward<Args>(args)...);
  965|  43.1k|        allocated.push_back(r);
  966|  43.1k|        return r;
  967|  43.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_15BuiltinFunctionEJRKNS0_13LocationRangeENSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEERNS7_6vectorIPKNS0_10IdentifierENSB_ISH_EEEEEEEPT_DpOT0_:
  963|   332k|    {
  964|   332k|        auto r = new T(std::forward<Args>(args)...);
  965|   332k|        allocated.push_back(r);
  966|   332k|        return r;
  967|   332k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISD_EEEEPNS0_11ConditionalEEEEPT_DpOT0_:
  963|  4.72k|    {
  964|  4.72k|        auto r = new T(std::forward<Args>(args)...);
  965|  4.72k|        allocated.push_back(r);
  966|  4.72k|        return r;
  967|  4.72k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRKNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_5ApplyERKSC_SF_SD_PNS0_3VarEEEEPT_DpOT0_:
  963|  4.72k|    {
  964|  4.72k|        auto r = new T(std::forward<Args>(args)...);
  965|  4.72k|        allocated.push_back(r);
  966|  4.72k|        return r;
  967|  4.72k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_3VarESD_RNS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  963|  4.72k|    {
  964|  4.72k|        auto r = new T(std::forward<Args>(args)...);
  965|  4.72k|        allocated.push_back(r);
  966|  4.72k|        return r;
  967|  4.72k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJRKNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  963|  9.45k|    {
  964|  9.45k|        auto r = new T(std::forward<Args>(args)...);
  965|  9.45k|        allocated.push_back(r);
  966|  9.45k|        return r;
  967|  9.45k|    }
formatter.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1014|      2|{
 1015|      2|    std::map<BinaryOp, int> r;
 1016|       |
 1017|      2|    r[BOP_MULT] = 5;
 1018|      2|    r[BOP_DIV] = 5;
 1019|      2|    r[BOP_PERCENT] = 5;
 1020|       |
 1021|      2|    r[BOP_PLUS] = 6;
 1022|      2|    r[BOP_MINUS] = 6;
 1023|       |
 1024|      2|    r[BOP_SHIFT_L] = 7;
 1025|      2|    r[BOP_SHIFT_R] = 7;
 1026|       |
 1027|      2|    r[BOP_GREATER] = 8;
 1028|      2|    r[BOP_GREATER_EQ] = 8;
 1029|      2|    r[BOP_LESS] = 8;
 1030|      2|    r[BOP_LESS_EQ] = 8;
 1031|      2|    r[BOP_IN] = 8;
 1032|       |
 1033|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1034|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1035|       |
 1036|      2|    r[BOP_BITWISE_AND] = 10;
 1037|       |
 1038|      2|    r[BOP_BITWISE_XOR] = 11;
 1039|       |
 1040|      2|    r[BOP_BITWISE_OR] = 12;
 1041|       |
 1042|      2|    r[BOP_AND] = 13;
 1043|       |
 1044|      2|    r[BOP_OR] = 14;
 1045|       |
 1046|      2|    return r;
 1047|      2|}
formatter.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1050|      2|{
 1051|      2|    std::map<std::string, UnaryOp> r;
 1052|      2|    r["!"] = UOP_NOT;
 1053|      2|    r["~"] = UOP_BITWISE_NOT;
 1054|      2|    r["+"] = UOP_PLUS;
 1055|      2|    r["-"] = UOP_MINUS;
 1056|      2|    return r;
 1057|      2|}
formatter.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1060|      2|{
 1061|      2|    std::map<std::string, BinaryOp> r;
 1062|       |
 1063|      2|    r["*"] = BOP_MULT;
 1064|      2|    r["/"] = BOP_DIV;
 1065|      2|    r["%"] = BOP_PERCENT;
 1066|       |
 1067|      2|    r["+"] = BOP_PLUS;
 1068|      2|    r["-"] = BOP_MINUS;
 1069|       |
 1070|      2|    r["<<"] = BOP_SHIFT_L;
 1071|      2|    r[">>"] = BOP_SHIFT_R;
 1072|       |
 1073|      2|    r[">"] = BOP_GREATER;
 1074|      2|    r[">="] = BOP_GREATER_EQ;
 1075|      2|    r["<"] = BOP_LESS;
 1076|      2|    r["<="] = BOP_LESS_EQ;
 1077|      2|    r["in"] = BOP_IN;
 1078|       |
 1079|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1080|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1081|       |
 1082|      2|    r["&"] = BOP_BITWISE_AND;
 1083|      2|    r["^"] = BOP_BITWISE_XOR;
 1084|      2|    r["|"] = BOP_BITWISE_OR;
 1085|       |
 1086|      2|    r["&&"] = BOP_AND;
 1087|      2|    r["||"] = BOP_OR;
 1088|      2|    return r;
 1089|      2|}
pass.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1014|      2|{
 1015|      2|    std::map<BinaryOp, int> r;
 1016|       |
 1017|      2|    r[BOP_MULT] = 5;
 1018|      2|    r[BOP_DIV] = 5;
 1019|      2|    r[BOP_PERCENT] = 5;
 1020|       |
 1021|      2|    r[BOP_PLUS] = 6;
 1022|      2|    r[BOP_MINUS] = 6;
 1023|       |
 1024|      2|    r[BOP_SHIFT_L] = 7;
 1025|      2|    r[BOP_SHIFT_R] = 7;
 1026|       |
 1027|      2|    r[BOP_GREATER] = 8;
 1028|      2|    r[BOP_GREATER_EQ] = 8;
 1029|      2|    r[BOP_LESS] = 8;
 1030|      2|    r[BOP_LESS_EQ] = 8;
 1031|      2|    r[BOP_IN] = 8;
 1032|       |
 1033|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1034|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1035|       |
 1036|      2|    r[BOP_BITWISE_AND] = 10;
 1037|       |
 1038|      2|    r[BOP_BITWISE_XOR] = 11;
 1039|       |
 1040|      2|    r[BOP_BITWISE_OR] = 12;
 1041|       |
 1042|      2|    r[BOP_AND] = 13;
 1043|       |
 1044|      2|    r[BOP_OR] = 14;
 1045|       |
 1046|      2|    return r;
 1047|      2|}
pass.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1050|      2|{
 1051|      2|    std::map<std::string, UnaryOp> r;
 1052|      2|    r["!"] = UOP_NOT;
 1053|      2|    r["~"] = UOP_BITWISE_NOT;
 1054|      2|    r["+"] = UOP_PLUS;
 1055|      2|    r["-"] = UOP_MINUS;
 1056|      2|    return r;
 1057|      2|}
pass.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1060|      2|{
 1061|      2|    std::map<std::string, BinaryOp> r;
 1062|       |
 1063|      2|    r["*"] = BOP_MULT;
 1064|      2|    r["/"] = BOP_DIV;
 1065|      2|    r["%"] = BOP_PERCENT;
 1066|       |
 1067|      2|    r["+"] = BOP_PLUS;
 1068|      2|    r["-"] = BOP_MINUS;
 1069|       |
 1070|      2|    r["<<"] = BOP_SHIFT_L;
 1071|      2|    r[">>"] = BOP_SHIFT_R;
 1072|       |
 1073|      2|    r[">"] = BOP_GREATER;
 1074|      2|    r[">="] = BOP_GREATER_EQ;
 1075|      2|    r["<"] = BOP_LESS;
 1076|      2|    r["<="] = BOP_LESS_EQ;
 1077|      2|    r["in"] = BOP_IN;
 1078|       |
 1079|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1080|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1081|       |
 1082|      2|    r["&"] = BOP_BITWISE_AND;
 1083|      2|    r["^"] = BOP_BITWISE_XOR;
 1084|      2|    r["|"] = BOP_BITWISE_OR;
 1085|       |
 1086|      2|    r["&&"] = BOP_AND;
 1087|      2|    r["||"] = BOP_OR;
 1088|      2|    return r;
 1089|      2|}
_ZN7jsonnet8internal9Allocator5cloneINS0_5ApplyEEEPT_S5_:
  971|   140k|    {
  972|   140k|        auto r = new T(*ast);
  973|   140k|        allocated.push_back(r);
  974|   140k|        return r;
  975|   140k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5ArrayEEEPT_S5_:
  971|  15.6k|    {
  972|  15.6k|        auto r = new T(*ast);
  973|  15.6k|        allocated.push_back(r);
  974|  15.6k|        return r;
  975|  15.6k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_6BinaryEEEPT_S5_:
  971|   557k|    {
  972|   557k|        auto r = new T(*ast);
  973|   557k|        allocated.push_back(r);
  974|   557k|        return r;
  975|   557k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_11ConditionalEEEPT_S5_:
  971|   287k|    {
  972|   287k|        auto r = new T(*ast);
  973|   287k|        allocated.push_back(r);
  974|   287k|        return r;
  975|   287k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_15DesugaredObjectEEEPT_S5_:
  971|   543k|    {
  972|   543k|        auto r = new T(*ast);
  973|   543k|        allocated.push_back(r);
  974|   543k|        return r;
  975|   543k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5ErrorEEEPT_S5_:
  971|  11.8k|    {
  972|  11.8k|        auto r = new T(*ast);
  973|  11.8k|        allocated.push_back(r);
  974|  11.8k|        return r;
  975|  11.8k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_8FunctionEEEPT_S5_:
  971|  49.1k|    {
  972|  49.1k|        auto r = new T(*ast);
  973|  49.1k|        allocated.push_back(r);
  974|  49.1k|        return r;
  975|  49.1k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_6ImportEEEPT_S5_:
  971|    632|    {
  972|    632|        auto r = new T(*ast);
  973|    632|        allocated.push_back(r);
  974|    632|        return r;
  975|    632|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_9ImportstrEEEPT_S5_:
  971|    354|    {
  972|    354|        auto r = new T(*ast);
  973|    354|        allocated.push_back(r);
  974|    354|        return r;
  975|    354|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_9ImportbinEEEPT_S5_:
  971|    326|    {
  972|    326|        auto r = new T(*ast);
  973|    326|        allocated.push_back(r);
  974|    326|        return r;
  975|    326|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5IndexEEEPT_S5_:
  971|  90.7k|    {
  972|  90.7k|        auto r = new T(*ast);
  973|  90.7k|        allocated.push_back(r);
  974|  90.7k|        return r;
  975|  90.7k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_7InSuperEEEPT_S5_:
  971|   164k|    {
  972|   164k|        auto r = new T(*ast);
  973|   164k|        allocated.push_back(r);
  974|   164k|        return r;
  975|   164k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_14LiteralBooleanEEEPT_S5_:
  971|  4.96k|    {
  972|  4.96k|        auto r = new T(*ast);
  973|  4.96k|        allocated.push_back(r);
  974|  4.96k|        return r;
  975|  4.96k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_11LiteralNullEEEPT_S5_:
  971|  12.9k|    {
  972|  12.9k|        auto r = new T(*ast);
  973|  12.9k|        allocated.push_back(r);
  974|  12.9k|        return r;
  975|  12.9k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_13LiteralNumberEEEPT_S5_:
  971|   280k|    {
  972|   280k|        auto r = new T(*ast);
  973|   280k|        allocated.push_back(r);
  974|   280k|        return r;
  975|   280k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_13LiteralStringEEEPT_S5_:
  971|   820k|    {
  972|   820k|        auto r = new T(*ast);
  973|   820k|        allocated.push_back(r);
  974|   820k|        return r;
  975|   820k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5LocalEEEPT_S5_:
  971|  65.7k|    {
  972|  65.7k|        auto r = new T(*ast);
  973|  65.7k|        allocated.push_back(r);
  974|  65.7k|        return r;
  975|  65.7k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_25ObjectComprehensionSimpleEEEPT_S5_:
  971|    474|    {
  972|    474|        auto r = new T(*ast);
  973|    474|        allocated.push_back(r);
  974|    474|        return r;
  975|    474|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_4SelfEEEPT_S5_:
  971|  14.4k|    {
  972|  14.4k|        auto r = new T(*ast);
  973|  14.4k|        allocated.push_back(r);
  974|  14.4k|        return r;
  975|  14.4k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_10SuperIndexEEEPT_S5_:
  971|   165k|    {
  972|   165k|        auto r = new T(*ast);
  973|   165k|        allocated.push_back(r);
  974|   165k|        return r;
  975|   165k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5UnaryEEEPT_S5_:
  971|   781k|    {
  972|   781k|        auto r = new T(*ast);
  973|   781k|        allocated.push_back(r);
  974|   781k|        return r;
  975|   781k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_3VarEEEPT_S5_:
  971|   728k|    {
  972|   728k|        auto r = new T(*ast);
  973|   728k|        allocated.push_back(r);
  974|   728k|        return r;
  975|   728k|    }

_ZN7jsonnet8internal20jsonnet_builtin_declEm:
   41|   332k|{
   42|   332k|    switch (builtin) {
   43|  8.53k|        case 0: return {U"makeArray", {U"sz", U"func"}};
  ------------------
  |  Branch (43:9): [True: 8.53k, False: 324k]
  ------------------
   44|  8.53k|        case 1: return {U"pow", {U"x", U"n"}};
  ------------------
  |  Branch (44:9): [True: 8.53k, False: 324k]
  ------------------
   45|  8.53k|        case 2: return {U"floor", {U"x"}};
  ------------------
  |  Branch (45:9): [True: 8.53k, False: 324k]
  ------------------
   46|  8.53k|        case 3: return {U"ceil", {U"x"}};
  ------------------
  |  Branch (46:9): [True: 8.53k, False: 324k]
  ------------------
   47|  8.53k|        case 4: return {U"sqrt", {U"x"}};
  ------------------
  |  Branch (47:9): [True: 8.53k, False: 324k]
  ------------------
   48|  8.53k|        case 5: return {U"sin", {U"x"}};
  ------------------
  |  Branch (48:9): [True: 8.53k, False: 324k]
  ------------------
   49|  8.53k|        case 6: return {U"cos", {U"x"}};
  ------------------
  |  Branch (49:9): [True: 8.53k, False: 324k]
  ------------------
   50|  8.53k|        case 7: return {U"tan", {U"x"}};
  ------------------
  |  Branch (50:9): [True: 8.53k, False: 324k]
  ------------------
   51|  8.53k|        case 8: return {U"asin", {U"x"}};
  ------------------
  |  Branch (51:9): [True: 8.53k, False: 324k]
  ------------------
   52|  8.53k|        case 9: return {U"acos", {U"x"}};
  ------------------
  |  Branch (52:9): [True: 8.53k, False: 324k]
  ------------------
   53|  8.53k|        case 10: return {U"atan", {U"x"}};
  ------------------
  |  Branch (53:9): [True: 8.53k, False: 324k]
  ------------------
   54|  8.53k|        case 11: return {U"type", {U"x"}};
  ------------------
  |  Branch (54:9): [True: 8.53k, False: 324k]
  ------------------
   55|  8.53k|        case 12: return {U"filter", {U"func", U"arr"}};
  ------------------
  |  Branch (55:9): [True: 8.53k, False: 324k]
  ------------------
   56|  8.53k|        case 13: return {U"objectHasEx", {U"obj", U"f", U"inc_hidden"}};
  ------------------
  |  Branch (56:9): [True: 8.53k, False: 324k]
  ------------------
   57|  8.53k|        case 14: return {U"length", {U"x"}};
  ------------------
  |  Branch (57:9): [True: 8.53k, False: 324k]
  ------------------
   58|  8.53k|        case 15: return {U"objectFieldsEx", {U"obj", U"inc_hidden"}};
  ------------------
  |  Branch (58:9): [True: 8.53k, False: 324k]
  ------------------
   59|  8.53k|        case 16: return {U"codepoint", {U"str"}};
  ------------------
  |  Branch (59:9): [True: 8.53k, False: 324k]
  ------------------
   60|  8.53k|        case 17: return {U"char", {U"n"}};
  ------------------
  |  Branch (60:9): [True: 8.53k, False: 324k]
  ------------------
   61|  8.53k|        case 18: return {U"log", {U"n"}};
  ------------------
  |  Branch (61:9): [True: 8.53k, False: 324k]
  ------------------
   62|  8.53k|        case 19: return {U"exp", {U"n"}};
  ------------------
  |  Branch (62:9): [True: 8.53k, False: 324k]
  ------------------
   63|  8.53k|        case 20: return {U"mantissa", {U"n"}};
  ------------------
  |  Branch (63:9): [True: 8.53k, False: 324k]
  ------------------
   64|  8.53k|        case 21: return {U"exponent", {U"n"}};
  ------------------
  |  Branch (64:9): [True: 8.53k, False: 324k]
  ------------------
   65|  8.53k|        case 22: return {U"modulo", {U"a", U"b"}};
  ------------------
  |  Branch (65:9): [True: 8.53k, False: 324k]
  ------------------
   66|  8.53k|        case 23: return {U"extVar", {U"x"}};
  ------------------
  |  Branch (66:9): [True: 8.53k, False: 324k]
  ------------------
   67|  8.53k|        case 24: return {U"primitiveEquals", {U"a", U"b"}};
  ------------------
  |  Branch (67:9): [True: 8.53k, False: 324k]
  ------------------
   68|  8.53k|        case 25: return {U"native", {U"name"}};
  ------------------
  |  Branch (68:9): [True: 8.53k, False: 324k]
  ------------------
   69|  8.53k|        case 26: return {U"md5", {U"str"}};
  ------------------
  |  Branch (69:9): [True: 8.53k, False: 324k]
  ------------------
   70|  8.53k|        case 27: return {U"trace", {U"str", U"rest"}};
  ------------------
  |  Branch (70:9): [True: 8.53k, False: 324k]
  ------------------
   71|  8.53k|        case 28: return {U"splitLimit", {U"str", U"c", U"maxsplits"}};
  ------------------
  |  Branch (71:9): [True: 8.53k, False: 324k]
  ------------------
   72|  8.53k|        case 29: return {U"substr", {U"str", U"from", U"len"}};
  ------------------
  |  Branch (72:9): [True: 8.53k, False: 324k]
  ------------------
   73|  8.53k|        case 30: return {U"range", {U"from", U"to"}};
  ------------------
  |  Branch (73:9): [True: 8.53k, False: 324k]
  ------------------
   74|  8.53k|        case 31: return {U"strReplace", {U"str", U"from", U"to"}};
  ------------------
  |  Branch (74:9): [True: 8.53k, False: 324k]
  ------------------
   75|  8.53k|        case 32: return {U"asciiLower", {U"str"}};
  ------------------
  |  Branch (75:9): [True: 8.53k, False: 324k]
  ------------------
   76|  8.53k|        case 33: return {U"asciiUpper", {U"str"}};
  ------------------
  |  Branch (76:9): [True: 8.53k, False: 324k]
  ------------------
   77|  8.53k|        case 34: return {U"join", {U"sep", U"arr"}};
  ------------------
  |  Branch (77:9): [True: 8.53k, False: 324k]
  ------------------
   78|  8.53k|        case 35: return {U"parseJson", {U"str"}};
  ------------------
  |  Branch (78:9): [True: 8.53k, False: 324k]
  ------------------
   79|  8.53k|        case 36: return {U"parseYaml", {U"str"}};
  ------------------
  |  Branch (79:9): [True: 8.53k, False: 324k]
  ------------------
   80|  8.53k|        case 37: return {U"encodeUTF8", {U"str"}};
  ------------------
  |  Branch (80:9): [True: 8.53k, False: 324k]
  ------------------
   81|  8.53k|        case 38: return {U"decodeUTF8", {U"arr"}};
  ------------------
  |  Branch (81:9): [True: 8.53k, False: 324k]
  ------------------
   82|      0|        default:
  ------------------
  |  Branch (82:9): [True: 0, False: 332k]
  ------------------
   83|      0|            std::cerr << "INTERNAL ERROR: Unrecognized builtin function: " << builtin << std::endl;
   84|      0|            std::abort();
   85|   332k|    }
   86|       |    // Quiet, compiler.
   87|      0|    return BuiltinDecl();
   88|   332k|}
_ZN7jsonnet8internal13makeStdlibASTEPNS0_9AllocatorENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
 1006|  3.81k|DesugaredObject *makeStdlibAST(Allocator *alloc, std::string filename) {
 1007|  3.81k|    Desugarer desugarer(alloc);
 1008|  3.81k|    return desugarer.stdlibAST(filename);
 1009|  3.81k|}
_ZN7jsonnet8internal15jsonnet_desugarEPNS0_9AllocatorERPNS0_3ASTEPNSt3__13mapINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENS0_5VmExtENS6_4lessISD_EENSB_INS6_4pairIKSD_SE_EEEEEE:
 1012|  5.31k|{
 1013|  5.31k|    Desugarer desugarer(alloc);
 1014|  5.31k|    desugarer.desugarFile(ast, tlas);
 1015|  5.31k|}
_ZN7jsonnet8internal9DesugarerC2EPNS0_9AllocatorE:
  222|  9.12k|    Desugarer(Allocator *alloc) : alloc(alloc) {}
_ZN7jsonnet8internal9Desugarer9stdlibASTENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  913|  8.53k|    DesugaredObject *stdlibAST(std::string filename) {
  914|       |        // Now, implement the std library by wrapping in a local construct.
  915|  8.53k|        Tokens tokens = jsonnet_lex("std.jsonnet", STD_CODE);
  916|  8.53k|        AST *std_ast = jsonnet_parse(alloc, tokens);
  917|  8.53k|        desugar(std_ast, 0);
  918|  8.53k|        auto *std_obj = dynamic_cast<DesugaredObject *>(std_ast);
  919|  8.53k|        if (std_obj == nullptr) {
  ------------------
  |  Branch (919:13): [True: 0, False: 8.53k]
  ------------------
  920|      0|            std::cerr << "INTERNAL ERROR: std.jsonnet not an object." << std::endl;
  921|      0|            std::abort();
  922|      0|        }
  923|       |
  924|       |        // Bind 'std' builtins that are implemented natively.
  925|  8.53k|        DesugaredObject::Fields &fields = std_obj->fields;
  926|   341k|        for (unsigned long c = 0; c <= max_builtin; ++c) {
  ------------------
  |  Branch (926:35): [True: 332k, False: 8.53k]
  ------------------
  927|   332k|            const auto &decl = jsonnet_builtin_decl(c);
  928|   332k|            Identifiers params;
  929|   332k|            for (const auto &p : decl.params)
  ------------------
  |  Branch (929:32): [True: 478k, False: 332k]
  ------------------
  930|   478k|                params.push_back(id(p));
  931|   332k|            auto name = str(decl.name);
  932|   332k|            auto fn = make<BuiltinFunction>(E, encode_utf8(decl.name), params);
  933|   332k|            auto field = std::find_if(fields.begin(), fields.end(),
  934|   332k|                [=](const DesugaredObject::Field& f) {
  935|   332k|                    return static_cast<LiteralString*>(f.name)->value == decl.name;
  936|   332k|                });
  937|   332k|            if (field != fields.end()) {
  ------------------
  |  Branch (937:17): [True: 59.7k, False: 273k]
  ------------------
  938|  59.7k|                field->body = fn;
  939|   273k|            } else {
  940|   273k|                fields.emplace_back(ObjectField::HIDDEN, name, fn);
  941|   273k|            }
  942|   332k|        }
  943|  8.53k|        fields.emplace_back(
  944|  8.53k|            ObjectField::HIDDEN, str(U"thisFile"), str(decode_utf8(filename)));
  945|  8.53k|        return std_obj;
  946|  8.53k|    }
_ZN7jsonnet8internal9Desugarer7desugarERPNS0_3ASTEj:
  679|  70.7M|    {
  680|  70.7M|        if (auto *ast = dynamic_cast<Apply *>(ast_)) {
  ------------------
  |  Branch (680:19): [True: 6.89M, False: 63.8M]
  ------------------
  681|  6.89M|            desugar(ast->target, obj_level);
  682|  6.89M|            for (ArgParam &arg : ast->args)
  ------------------
  |  Branch (682:32): [True: 11.4M, False: 6.89M]
  ------------------
  683|  11.4M|                desugar(arg.expr, obj_level);
  684|       |
  685|  63.8M|        } else if (auto *ast = dynamic_cast<ApplyBrace *>(ast_)) {
  ------------------
  |  Branch (685:26): [True: 83.3k, False: 63.7M]
  ------------------
  686|  83.3k|            desugar(ast->left, obj_level);
  687|  83.3k|            desugar(ast->right, obj_level);
  688|  83.3k|            ast_ =
  689|  83.3k|                make<Binary>(ast->location, ast->openFodder, ast->left, EF, BOP_PLUS, ast->right);
  690|       |
  691|  63.7M|        } else if (auto *ast = dynamic_cast<Array *>(ast_)) {
  ------------------
  |  Branch (691:26): [True: 926k, False: 62.8M]
  ------------------
  692|   926k|            for (auto &el : ast->elements)
  ------------------
  |  Branch (692:27): [True: 3.12M, False: 926k]
  ------------------
  693|  3.12M|                desugar(el.expr, obj_level);
  694|       |
  695|  62.8M|        } else if (auto *ast = dynamic_cast<ArrayComprehension *>(ast_)) {
  ------------------
  |  Branch (695:26): [True: 326k, False: 62.4M]
  ------------------
  696|   326k|            for (ComprehensionSpec &spec : ast->specs)
  ------------------
  |  Branch (696:42): [True: 509k, False: 326k]
  ------------------
  697|   509k|                desugar(spec.expr, obj_level);
  698|   326k|            desugar(ast->body, obj_level + 1);
  699|       |
  700|   326k|            ast_ = makeArrayComprehension(ast);
  701|       |
  702|  62.4M|        } else if (auto *ast = dynamic_cast<Assert *>(ast_)) {
  ------------------
  |  Branch (702:26): [True: 350k, False: 62.1M]
  ------------------
  703|   350k|            desugar(ast->cond, obj_level);
  704|   350k|            if (ast->message == nullptr) {
  ------------------
  |  Branch (704:17): [True: 26.0k, False: 324k]
  ------------------
  705|  26.0k|                ast->message = str(U"Assertion failed.");
  706|  26.0k|            }
  707|   350k|            desugar(ast->message, obj_level);
  708|   350k|            desugar(ast->rest, obj_level);
  709|       |
  710|       |            // if cond then rest else error msg
  711|   350k|            AST *branch_false = make<Error>(ast->location, EF, ast->message);
  712|   350k|            ast_ = make<Conditional>(
  713|   350k|                ast->location, ast->openFodder, ast->cond, EF, ast->rest, EF, branch_false);
  714|       |
  715|  62.1M|        } else if (auto *ast = dynamic_cast<Binary *>(ast_)) {
  ------------------
  |  Branch (715:26): [True: 7.47M, False: 54.6M]
  ------------------
  716|  7.47M|            desugar(ast->left, obj_level);
  717|  7.47M|            desugar(ast->right, obj_level);
  718|       |
  719|  7.47M|            bool invert = false;
  720|       |
  721|  7.47M|            switch (ast->op) {
  722|   244k|                case BOP_PERCENT: {
  ------------------
  |  Branch (722:17): [True: 244k, False: 7.23M]
  ------------------
  723|   244k|                    AST *f_mod = make<Index>(
  724|   244k|                        E, EF, std(), EF, false, str(U"mod"), EF, nullptr, EF, nullptr, EF);
  725|   244k|                    ArgParams args = {{ast->left, EF}, {ast->right, EF}};
  726|   244k|                    ast_ = make<Apply>(
  727|   244k|                        ast->location, ast->openFodder, f_mod, EF, args, false, EF, EF, false);
  728|   244k|                } break;
  729|       |
  730|   238k|                case BOP_MANIFEST_UNEQUAL: invert = true;
  ------------------
  |  Branch (730:17): [True: 238k, False: 7.23M]
  ------------------
  731|       |                /* fallthrough */
  732|  1.61M|                case BOP_MANIFEST_EQUAL: {
  ------------------
  |  Branch (732:17): [True: 1.37M, False: 6.09M]
  ------------------
  733|  1.61M|                    ast_ = equals(ast->location, ast->left, ast->right);
  734|  1.61M|                    if (invert)
  ------------------
  |  Branch (734:25): [True: 238k, False: 1.37M]
  ------------------
  735|   238k|                        ast_ = make<Unary>(ast->location, ast->openFodder, UOP_NOT, ast_);
  736|  1.61M|                } break;
  737|       |
  738|  5.61M|                default:;
  ------------------
  |  Branch (738:17): [True: 5.61M, False: 1.86M]
  ------------------
  739|       |                    // Otherwise don't change it.
  740|  7.47M|            }
  741|       |
  742|  54.6M|        } else if (dynamic_cast<const BuiltinFunction *>(ast_)) {
  ------------------
  |  Branch (742:20): [True: 0, False: 54.6M]
  ------------------
  743|       |            // Nothing to do.
  744|       |
  745|  54.6M|        } else if (auto *ast = dynamic_cast<Conditional *>(ast_)) {
  ------------------
  |  Branch (745:26): [True: 2.76M, False: 51.8M]
  ------------------
  746|  2.76M|            desugar(ast->cond, obj_level);
  747|  2.76M|            desugar(ast->branchTrue, obj_level);
  748|  2.76M|            if (ast->branchFalse == nullptr)
  ------------------
  |  Branch (748:17): [True: 34.1k, False: 2.73M]
  ------------------
  749|  34.1k|                ast->branchFalse = null();
  750|  2.76M|            desugar(ast->branchFalse, obj_level);
  751|       |
  752|  51.8M|        } else if (auto *ast = dynamic_cast<Dollar *>(ast_)) {
  ------------------
  |  Branch (752:26): [True: 41.7k, False: 51.8M]
  ------------------
  753|  41.7k|            if (obj_level == 0) {
  ------------------
  |  Branch (753:17): [True: 273, False: 41.4k]
  ------------------
  754|    273|                throw StaticError(ast->location, "No top-level object found.");
  755|    273|            }
  756|  41.4k|            ast_ = var(id(U"$"));
  757|       |
  758|  51.8M|        } else if (auto *ast = dynamic_cast<Error *>(ast_)) {
  ------------------
  |  Branch (758:26): [True: 548k, False: 51.2M]
  ------------------
  759|   548k|            desugar(ast->expr, obj_level);
  760|       |
  761|  51.2M|        } else if (auto *ast = dynamic_cast<Function *>(ast_)) {
  ------------------
  |  Branch (761:26): [True: 183k, False: 51.1M]
  ------------------
  762|   183k|            desugar(ast->body, obj_level);
  763|   183k|            desugarParams(ast->params, obj_level);
  764|       |
  765|  51.1M|        } else if (auto *ast = dynamic_cast<Import *>(ast_)) {
  ------------------
  |  Branch (765:26): [True: 213, False: 51.1M]
  ------------------
  766|       |            // TODO(dcunnin): Abstract this into a template function if it becomes more common.
  767|    213|            AST *file = ast->file;
  768|    213|            desugar(file, obj_level);
  769|    213|            ast->file = dynamic_cast<LiteralString *>(file);
  770|       |
  771|  51.1M|        } else if (auto *ast = dynamic_cast<Importstr *>(ast_)) {
  ------------------
  |  Branch (771:26): [True: 460, False: 51.1M]
  ------------------
  772|       |            // TODO(dcunnin): Abstract this into a template function if it becomes more common.
  773|    460|            AST *file = ast->file;
  774|    460|            desugar(file, obj_level);
  775|    460|            ast->file = dynamic_cast<LiteralString *>(file);
  776|       |
  777|  51.1M|        } else if (auto *ast = dynamic_cast<Importbin *>(ast_)) {
  ------------------
  |  Branch (777:26): [True: 513, False: 51.1M]
  ------------------
  778|       |            // TODO(dcunnin): Abstract this into a template function if it becomes more common.
  779|    513|            AST *file = ast->file;
  780|    513|            desugar(file, obj_level);
  781|    513|            ast->file = dynamic_cast<LiteralString *>(file);
  782|       |
  783|  51.1M|        } else if (auto *ast = dynamic_cast<InSuper *>(ast_)) {
  ------------------
  |  Branch (783:26): [True: 9.68k, False: 51.0M]
  ------------------
  784|  9.68k|            desugar(ast->element, obj_level);
  785|       |
  786|  51.0M|        } else if (auto *ast = dynamic_cast<Index *>(ast_)) {
  ------------------
  |  Branch (786:26): [True: 7.51M, False: 43.5M]
  ------------------
  787|  7.51M|            desugar(ast->target, obj_level);
  788|  7.51M|            if (ast->isSlice) {
  ------------------
  |  Branch (788:17): [True: 156k, False: 7.36M]
  ------------------
  789|   156k|                if (ast->index == nullptr)
  ------------------
  |  Branch (789:21): [True: 20.1k, False: 136k]
  ------------------
  790|  20.1k|                    ast->index = null();
  791|   156k|                desugar(ast->index, obj_level);
  792|       |
  793|   156k|                if (ast->end == nullptr)
  ------------------
  |  Branch (793:21): [True: 88.1k, False: 68.7k]
  ------------------
  794|  88.1k|                    ast->end = null();
  795|   156k|                desugar(ast->end, obj_level);
  796|       |
  797|   156k|                if (ast->step == nullptr)
  ------------------
  |  Branch (797:21): [True: 148k, False: 8.93k]
  ------------------
  798|   148k|                    ast->step = null();
  799|   156k|                desugar(ast->step, obj_level);
  800|       |
  801|   156k|                ast_ = make<Apply>(
  802|   156k|                    ast->location,
  803|   156k|                    EF,
  804|   156k|                    make<Index>(
  805|   156k|                        E, EF, std(), EF, false, str(U"slice"), EF, nullptr, EF, nullptr, EF),
  806|   156k|                    EF,
  807|   156k|                    ArgParams{
  808|   156k|                        {ast->target, EF},
  809|   156k|                        {ast->index, EF},
  810|   156k|                        {ast->end, EF},
  811|   156k|                        {ast->step, EF},
  812|   156k|                    },
  813|   156k|                    false,  // trailing comma
  814|   156k|                    EF,
  815|   156k|                    EF,
  816|   156k|                    false  // tailstrict
  817|   156k|                );
  818|  7.36M|            } else {
  819|  7.36M|                if (ast->id != nullptr) {
  ------------------
  |  Branch (819:21): [True: 6.04M, False: 1.31M]
  ------------------
  820|  6.04M|                    assert(ast->index == nullptr);
  821|      0|                    ast->index = str(ast->id->name);
  822|  6.04M|                    ast->id = nullptr;
  823|  6.04M|                }
  824|      0|                desugar(ast->index, obj_level);
  825|  7.36M|            }
  826|       |
  827|  43.5M|        } else if (auto *ast = dynamic_cast<Local *>(ast_)) {
  ------------------
  |  Branch (827:26): [True: 2.05M, False: 41.5M]
  ------------------
  828|  2.05M|            for (auto &bind : ast->binds)
  ------------------
  |  Branch (828:29): [True: 2.17M, False: 2.05M]
  ------------------
  829|  2.17M|                desugar(bind.body, obj_level);
  830|  2.05M|            desugar(ast->body, obj_level);
  831|       |
  832|  2.17M|            for (auto &bind : ast->binds) {
  ------------------
  |  Branch (832:29): [True: 2.17M, False: 2.05M]
  ------------------
  833|  2.17M|                if (bind.functionSugar) {
  ------------------
  |  Branch (833:21): [True: 649k, False: 1.52M]
  ------------------
  834|   649k|                    desugarParams(bind.params, obj_level);
  835|   649k|                    bind.body = make<Function>(ast->location,
  836|   649k|                                               ast->openFodder,
  837|   649k|                                               bind.parenLeftFodder,
  838|   649k|                                               bind.params,
  839|   649k|                                               false,
  840|   649k|                                               bind.parenRightFodder,
  841|   649k|                                               bind.body);
  842|   649k|                    bind.functionSugar = false;
  843|   649k|                    bind.params.clear();
  844|   649k|                }
  845|  2.17M|            }
  846|       |
  847|  41.5M|        } else if (dynamic_cast<const LiteralBoolean *>(ast_)) {
  ------------------
  |  Branch (847:20): [True: 726k, False: 40.7M]
  ------------------
  848|       |            // Nothing to do.
  849|       |
  850|  40.7M|        } else if (dynamic_cast<const LiteralNumber *>(ast_)) {
  ------------------
  |  Branch (850:20): [True: 5.20M, False: 35.5M]
  ------------------
  851|       |            // Nothing to do.
  852|       |
  853|  35.5M|        } else if (auto *ast = dynamic_cast<LiteralString *>(ast_)) {
  ------------------
  |  Branch (853:26): [True: 10.3M, False: 25.2M]
  ------------------
  854|  10.3M|            if ((ast->tokenKind != LiteralString::BLOCK) &&
  ------------------
  |  Branch (854:17): [True: 10.3M, False: 1.17k]
  ------------------
  855|  10.3M|                (ast->tokenKind != LiteralString::VERBATIM_DOUBLE) &&
  ------------------
  |  Branch (855:17): [True: 10.3M, False: 1.23k]
  ------------------
  856|  10.3M|                (ast->tokenKind != LiteralString::VERBATIM_SINGLE)) {
  ------------------
  |  Branch (856:17): [True: 10.3M, False: 3.47k]
  ------------------
  857|  10.3M|                ast->value = jsonnet_string_unescape(ast->location, ast->value);
  858|  10.3M|            }
  859|  10.3M|            ast->tokenKind = LiteralString::DOUBLE;
  860|  10.3M|            ast->blockIndent.clear();
  861|       |
  862|  25.2M|        } else if (dynamic_cast<const LiteralNull *>(ast_)) {
  ------------------
  |  Branch (862:20): [True: 436k, False: 24.7M]
  ------------------
  863|       |            // Nothing to do.
  864|       |
  865|  24.7M|        } else if (auto *ast = dynamic_cast<DesugaredObject *>(ast_)) {
  ------------------
  |  Branch (865:26): [True: 12.2k, False: 24.7M]
  ------------------
  866|  12.2k|            for (auto &field : ast->fields) {
  ------------------
  |  Branch (866:30): [True: 11.0k, False: 12.2k]
  ------------------
  867|  11.0k|                desugar(field.name, obj_level);
  868|  11.0k|                desugar(field.body, obj_level + 1);
  869|  11.0k|            }
  870|  12.2k|            for (AST *assert : ast->asserts) {
  ------------------
  |  Branch (870:30): [True: 601, False: 12.2k]
  ------------------
  871|    601|                desugar(assert, obj_level + 1);
  872|    601|            }
  873|       |
  874|  24.7M|        } else if (auto *ast = dynamic_cast<Object *>(ast_)) {
  ------------------
  |  Branch (874:26): [True: 494k, False: 24.2M]
  ------------------
  875|   494k|            ast_ = makeObject(ast, obj_level);
  876|       |
  877|  24.2M|        } else if (auto *ast = dynamic_cast<ObjectComprehension *>(ast_)) {
  ------------------
  |  Branch (877:26): [True: 43.1k, False: 24.2M]
  ------------------
  878|  43.1k|            ast_ = makeObjectComprehension(ast, obj_level);
  879|       |
  880|  24.2M|        } else if (auto *ast = dynamic_cast<ObjectComprehensionSimple *>(ast_)) {
  ------------------
  |  Branch (880:26): [True: 276, False: 24.2M]
  ------------------
  881|    276|            desugar(ast->field, obj_level);
  882|    276|            desugar(ast->value, obj_level + 1);
  883|    276|            desugar(ast->array, obj_level);
  884|       |
  885|  24.2M|        } else if (auto *ast = dynamic_cast<Parens *>(ast_)) {
  ------------------
  |  Branch (885:26): [True: 410k, False: 23.8M]
  ------------------
  886|       |            // Strip parens.
  887|   410k|            desugar(ast->expr, obj_level);
  888|   410k|            ast_ = ast->expr;
  889|       |
  890|  23.8M|        } else if (dynamic_cast<const Self *>(ast_)) {
  ------------------
  |  Branch (890:20): [True: 71.9k, False: 23.7M]
  ------------------
  891|       |            // Nothing to do.
  892|       |
  893|  23.7M|        } else if (auto *ast = dynamic_cast<SuperIndex *>(ast_)) {
  ------------------
  |  Branch (893:26): [True: 10.7k, False: 23.7M]
  ------------------
  894|  10.7k|            if (ast->id != nullptr) {
  ------------------
  |  Branch (894:17): [True: 1.21k, False: 9.53k]
  ------------------
  895|  1.21k|                assert(ast->index == nullptr);
  896|      0|                ast->index = str(ast->id->name);
  897|  1.21k|                ast->id = nullptr;
  898|  1.21k|            }
  899|      0|            desugar(ast->index, obj_level);
  900|       |
  901|  23.7M|        } else if (auto *ast = dynamic_cast<Unary *>(ast_)) {
  ------------------
  |  Branch (901:26): [True: 502k, False: 23.2M]
  ------------------
  902|   502k|            desugar(ast->expr, obj_level);
  903|       |
  904|  23.2M|        } else if (dynamic_cast<const Var *>(ast_)) {
  ------------------
  |  Branch (904:20): [True: 23.2M, False: 0]
  ------------------
  905|       |            // Nothing to do.
  906|       |
  907|  23.2M|        } else {
  908|      0|            std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_ << std::endl;
  909|      0|            std::abort();
  910|      0|        }
  911|  70.7M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_6BinaryEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_NS0_8BinaryOpESF_EEEPT_DpOT0_:
  106|  83.2k|    {
  107|  83.2k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  83.2k|    }
_ZN7jsonnet8internal9Desugarer22makeArrayComprehensionEPNS0_18ArrayComprehensionE:
  410|   326k|    AST* makeArrayComprehension(ArrayComprehension *ast) {
  411|   326k|        int n = ast->specs.size();
  412|   326k|        AST *zero = make<LiteralNumber>(E, EF, "0.0");
  413|   326k|        AST *one = make<LiteralNumber>(E, EF, "1.0");
  414|   326k|        auto *_r = id(U"$r");
  415|   326k|        auto *_l = id(U"$l");
  416|   326k|        std::vector<const Identifier *> _i(n);
  417|   835k|        for (int i = 0; i < n; ++i) {
  ------------------
  |  Branch (417:25): [True: 509k, False: 326k]
  ------------------
  418|   509k|            UStringStream ss;
  419|   509k|            ss << U"$i_" << i;
  420|   509k|            _i[i] = id(ss.str());
  421|   509k|        }
  422|   326k|        std::vector<const Identifier *> _aux(n);
  423|   835k|        for (int i = 0; i < n; ++i) {
  ------------------
  |  Branch (423:25): [True: 509k, False: 326k]
  ------------------
  424|   509k|            UStringStream ss;
  425|   509k|            ss << U"$aux_" << i;
  426|   509k|            _aux[i] = id(ss.str());
  427|   509k|        }
  428|       |
  429|       |        // Build it from the inside out.  We keep wrapping 'in' with more ASTs.
  430|   326k|        assert(ast->specs[0].kind == ComprehensionSpec::FOR);
  431|       |
  432|      0|        int last_for = n - 1;
  433|   476k|        while (ast->specs[last_for].kind != ComprehensionSpec::FOR)
  ------------------
  |  Branch (433:16): [True: 150k, False: 326k]
  ------------------
  434|   150k|            last_for--;
  435|       |        // $aux_{last_for}($i_{last_for} + 1, $r + [body])
  436|   326k|        AST *in = make<Apply>(
  437|   326k|            ast->body->location,
  438|   326k|            EF,
  439|   326k|            var(_aux[last_for]),
  440|   326k|            EF,
  441|   326k|            ArgParams{{make<Binary>(E, EF, var(_i[last_for]), EF, BOP_PLUS, one), EF},
  442|   326k|                {make<Binary>(E, EF, var(_r), EF, BOP_PLUS, singleton(ast->body)), EF}},
  443|   326k|            false,  // trailingComma
  444|   326k|            EF,
  445|   326k|            EF,
  446|   326k|            true  // tailstrict
  447|   326k|        );
  448|   835k|        for (int i = n - 1; i >= 0; --i) {
  ------------------
  |  Branch (448:29): [True: 509k, False: 326k]
  ------------------
  449|   509k|            const ComprehensionSpec &spec = ast->specs[i];
  450|   509k|            AST *out;
  451|   509k|            if (i > 0) {
  ------------------
  |  Branch (451:17): [True: 183k, False: 326k]
  ------------------
  452|   183k|                int prev_for = i - 1;
  453|   393M|                while (ast->specs[prev_for].kind != ComprehensionSpec::FOR)
  ------------------
  |  Branch (453:24): [True: 393M, False: 183k]
  ------------------
  454|   393M|                    prev_for--;
  455|       |
  456|       |                // aux_{prev_for}($i_{prev_for} + 1, $r)
  457|   183k|                out = make<Apply>(  // False branch.
  458|   183k|                    E,
  459|   183k|                    EF,
  460|   183k|                    var(_aux[prev_for]),
  461|   183k|                    EF,
  462|   183k|                    ArgParams{{
  463|   183k|                        make<Binary>(E, EF, var(_i[prev_for]), EF, BOP_PLUS, one),
  464|   183k|                            EF,
  465|   183k|                            },
  466|   183k|                      {
  467|   183k|                        var(_r),
  468|   183k|                            EF,
  469|   183k|                            }},
  470|   183k|                    false,  // trailingComma
  471|   183k|                    EF,
  472|   183k|                    EF,
  473|   183k|                    true  // tailstrict
  474|   183k|                );
  475|   326k|            } else {
  476|   326k|                out = var(_r);
  477|   326k|            }
  478|   509k|            switch (spec.kind) {
  ------------------
  |  Branch (478:21): [True: 0, False: 509k]
  ------------------
  479|   150k|                case ComprehensionSpec::IF: {
  ------------------
  |  Branch (479:17): [True: 150k, False: 359k]
  ------------------
  480|       |                  /*
  481|       |                    if [[[...cond...]]] then
  482|       |                    [[[...in...]]]
  483|       |                    else
  484|       |                    [[[...out...]]]
  485|       |                  */
  486|   150k|                    in = make<Conditional>(ast->location,
  487|   150k|                                           EF,
  488|   150k|                                           spec.expr,
  489|   150k|                                           EF,
  490|   150k|                                           in,  // True branch.
  491|   150k|                                           EF,
  492|   150k|                                           out);  // False branch.
  493|   150k|                } break;
  494|   359k|                case ComprehensionSpec::FOR: {
  ------------------
  |  Branch (494:17): [True: 359k, False: 150k]
  ------------------
  495|       |                    /*
  496|       |                      local $l = [[[...array...]]]
  497|       |                      aux_{i}(i_{i}, r) =
  498|       |                      if i_{i} >= std.length($l) then
  499|       |                      [[[...out...]]]
  500|       |                      else
  501|       |                      local [[[...var...]]] = $l[i_{i}];
  502|       |                      [[[...in...]]];
  503|       |                      if std.type($l) == "array" then
  504|       |                      aux_{i}(0, $r) tailstrict
  505|       |                      else
  506|       |                      error "In comprehension, can only iterate over array..";
  507|       |                    */
  508|   359k|                    in = make<Local>(
  509|   359k|                        ast->location,
  510|   359k|                        EF,
  511|   359k|                        Local::Binds{
  512|   359k|                          bind(_l, spec.expr),  // Need to check expr is an array
  513|   359k|                              bind(_aux[i],
  514|   359k|                                   make<Function>(
  515|   359k|                                       ast->location,
  516|   359k|                                       EF,
  517|   359k|                                       EF,
  518|   359k|                                       ArgParams{{EF, _i[i], EF}, {EF, _r, EF}},
  519|   359k|                                       false,  // trailingComma
  520|   359k|                                       EF,
  521|   359k|                                       make<Conditional>(ast->location,
  522|   359k|                                                         EF,
  523|   359k|                                                         make<Binary>(E,
  524|   359k|                                                                      EF,
  525|   359k|                                                                      var(_i[i]),
  526|   359k|                                                                      EF,
  527|   359k|                                                                      BOP_GREATER_EQ,
  528|   359k|                                                                      length(var(_l))),
  529|   359k|                                                         EF,
  530|   359k|                                                         out,
  531|   359k|                                                         EF,
  532|   359k|                                                         make<Local>(
  533|   359k|                                                             ast->location,
  534|   359k|                                                             EF,
  535|   359k|                                                             singleBind(spec.var,
  536|   359k|                                                                        make<Index>(E,
  537|   359k|                                                                                    EF,
  538|   359k|                                                                                    var(_l),
  539|   359k|                                                                                    EF,
  540|   359k|                                                                                    false,
  541|   359k|                                                                                    var(_i[i]),
  542|   359k|                                                                                    EF,
  543|   359k|                                                                                    nullptr,
  544|   359k|                                                                                    EF,
  545|   359k|                                                                                    nullptr,
  546|   359k|                                                                                    EF)),
  547|   359k|                                                             in))))},
  548|   359k|                        make<Conditional>(
  549|   359k|                            ast->location,
  550|   359k|                            EF,
  551|   359k|                            equals(ast->location, type(var(_l)), str(U"array")),
  552|   359k|                            EF,
  553|   359k|                            make<Apply>(
  554|   359k|                                E,
  555|   359k|                                EF,
  556|   359k|                                var(_aux[i]),
  557|   359k|                                EF,
  558|   359k|                                ArgParams{{zero, EF},
  559|   359k|                                  {
  560|   359k|                                    i == 0 ? make<Array>(
  ------------------
  |  Branch (560:37): [True: 326k, False: 33.0k]
  ------------------
  561|   326k|                                        E, EF, Array::Elements{}, false, EF)
  562|   359k|                                        : static_cast<AST *>(var(_r)),
  563|   359k|                                        EF,
  564|   359k|                                        }},
  565|   359k|                                false,  // trailingComma
  566|   359k|                                EF,
  567|   359k|                                EF,
  568|   359k|                                true),  // tailstrict
  569|   359k|                            EF,
  570|   359k|                            error(ast->location,
  571|   359k|                                  U"In comprehension, can only iterate over array.")));
  572|   359k|                } break;
  573|   509k|            }
  574|   509k|        }
  575|       |
  576|   326k|        return in;
  577|   326k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_13LiteralNumberEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERA4_KcEEEPT_DpOT0_:
  106|   695k|    {
  107|   695k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   695k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_3VarESD_NS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  106|   326k|    {
  107|   326k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   326k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  106|   509k|    {
  107|   509k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   509k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpEPNS0_5ArrayEEEEPT_DpOT0_:
  106|   326k|    {
  107|   326k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   326k|    }
_ZN7jsonnet8internal9Desugarer9singletonEPNS0_3ASTE:
  156|   326k|    {
  157|   326k|        return make<Array>(
  158|   326k|            body->location, EF, Array::Elements{Array::Element(body, EF)}, false, EF);
  159|   326k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ArrayEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_7ElementENS9_ISE_EEEEbSD_EEEPT_DpOT0_:
  106|   326k|    {
  107|   326k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   326k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ApplyEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS8_INS0_8ArgParamENSA_ISH_EEEEbSE_SE_bEEEPT_DpOT0_:
  106|   542k|    {
  107|   542k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   542k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERKPNS0_3ASTESD_RSF_SD_SI_EEEPT_DpOT0_:
  106|   150k|    {
  107|   150k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   150k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISE_EEEEPNS0_11ConditionalEEEEPT_DpOT0_:
  106|   359k|    {
  107|   359k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   359k|    }
_ZN7jsonnet8internal9Desugarer4bindEPKNS0_10IdentifierEPNS0_3ASTE:
  146|  1.37M|    {
  147|  1.37M|        return Local::Bind(EF, id, EF, body, false, EF, ArgParams{}, false, EF, EF);
  148|  1.37M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_8FunctionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESD_NS7_INS0_8ArgParamENS9_ISE_EEEEbSD_PNS0_11ConditionalEEEEPT_DpOT0_:
  106|   359k|    {
  107|   359k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   359k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_6BinaryESD_RPNS0_3ASTESD_PNS0_5LocalEEEEPT_DpOT0_:
  106|   359k|    {
  107|   359k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   359k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpEPNS0_5ApplyEEEEPT_DpOT0_:
  106|   359k|    {
  107|   359k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   359k|    }
_ZN7jsonnet8internal9Desugarer6lengthEPNS0_3ASTE:
  192|   359k|    {
  193|   359k|        return stdFunc(U"length", v);
  194|   359k|    }
_ZN7jsonnet8internal9Desugarer7stdFuncERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEEPNS0_3ASTE:
  162|   723k|    {
  163|   723k|        return make<Apply>(
  164|   723k|            v->location,
  165|   723k|            EF,
  166|   723k|            make<Index>(E, EF, std(), EF, false, str(name), EF, nullptr, EF, nullptr, EF),
  167|   723k|            EF,
  168|   723k|            ArgParams{{v, EF}},
  169|   723k|            false,  // trailingComma
  170|   723k|            EF,
  171|   723k|            EF,
  172|   723k|            true  // tailstrict
  173|   723k|        );
  174|   723k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISE_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  106|   364k|    {
  107|   364k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   364k|    }
_ZN7jsonnet8internal9Desugarer10singleBindEPKNS0_10IdentifierEPNS0_3ASTE:
  151|   368k|    {
  152|   368k|        return {bind(id, body)};
  153|   368k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bSG_SE_DnSE_DnSE_EEEPT_DpOT0_:
  106|   359k|    {
  107|   359k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   359k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5ApplyESD_SF_SD_PNS0_5ErrorEEEEPT_DpOT0_:
  106|   359k|    {
  107|   359k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   359k|    }
_ZN7jsonnet8internal9Desugarer4typeEPNS0_3ASTE:
  197|   364k|    {
  198|   364k|        return stdFunc(U"type", v);
  199|   364k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ArrayEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEENS8_INS3_7ElementENSA_ISF_EEEEbSE_EEEPT_DpOT0_:
  106|   326k|    {
  107|   326k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   326k|    }
_ZN7jsonnet8internal9Desugarer5errorERKNS0_13LocationRangeERKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEE:
  217|   359k|    {
  218|   359k|        return error(str(loc, msg));
  219|   359k|    }
_ZN7jsonnet8internal9Desugarer5errorEPNS0_3ASTE:
  212|   542k|    {
  213|   542k|        return make<Error>(msg->location, EF, msg);
  214|   542k|    }
_ZN7jsonnet8internal9Desugarer3strERKNS0_13LocationRangeERKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEE:
  126|  2.44M|    {
  127|  2.44M|        return make<LiteralString>(loc, EF, s, LiteralString::DOUBLE, "", "");
  128|  2.44M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_13LiteralStringEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERKNS7_12basic_stringIDiNS7_11char_traitsIDiEENSA_IDiEEEENS3_9TokenKindERA1_KcSP_EEEPT_DpOT0_:
  106|  12.3M|    {
  107|  12.3M|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  12.3M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ErrorEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  106|   892k|    {
  107|   892k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   892k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_SF_SH_SF_EEEPT_DpOT0_:
  106|   350k|    {
  107|   350k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   350k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bPNS0_13LiteralStringESE_DnSE_DnSE_EEEPT_DpOT0_:
  106|  3.10M|    {
  107|  3.10M|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  3.10M|    }
_ZN7jsonnet8internal9Desugarer3stdEv:
  141|  3.10M|    {
  142|  3.10M|        return var(id(U"std"));
  143|  3.10M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ApplyEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_RNS7_INS0_8ArgParamENS9_ISI_EEEEbSH_SH_bEEEPT_DpOT0_:
  106|   244k|    {
  107|   244k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   244k|    }
_ZN7jsonnet8internal9Desugarer6equalsERKNS0_13LocationRangeEPNS0_3ASTES6_:
  207|  1.97M|    {
  208|  1.97M|        return stdFunc(loc, U"equals", a, b);
  209|  1.97M|    }
_ZN7jsonnet8internal9Desugarer7stdFuncERKNS0_13LocationRangeERKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEEPNS0_3ASTESF_:
  177|  1.98M|    {
  178|  1.98M|        return make<Apply>(
  179|  1.98M|            loc,
  180|  1.98M|            EF,
  181|  1.98M|            make<Index>(E, EF, std(), EF, false, str(name), EF, nullptr, EF, nullptr, EF),
  182|  1.98M|            EF,
  183|  1.98M|            ArgParams{{a, EF}, {b, EF}},
  184|  1.98M|            false,  // trailingComma
  185|  1.98M|            EF,
  186|  1.98M|            EF,
  187|  1.98M|            true  // tailstrict
  188|  1.98M|        );
  189|  1.98M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ApplyEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_5IndexESE_NS8_INS0_8ArgParamENSA_ISH_EEEEbSE_SE_bEEEPT_DpOT0_:
  106|  1.98M|    {
  107|  1.98M|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  1.98M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5UnaryEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS0_7UnaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  106|   238k|    {
  107|   238k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   238k|    }
_ZN7jsonnet8internal9Desugarer4nullEv:
  131|   290k|    {
  132|   290k|        return make<LiteralNull>(E, EF);
  133|   290k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11LiteralNullEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEEEEPT_DpOT0_:
  106|   290k|    {
  107|   290k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   290k|    }
_ZN7jsonnet8internal9Desugarer3varEPKNS0_10IdentifierE:
  136|  7.33M|    {
  137|  7.33M|        return make<Var>(E, EF, ident);
  138|  7.33M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_3VarEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  106|  7.33M|    {
  107|  7.33M|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  7.33M|    }
_ZN7jsonnet8internal9Desugarer13desugarParamsERNSt3__16vectorINS0_8ArgParamENS2_9allocatorIS4_EEEEj:
  225|  3.12M|    {
  226|  3.69M|        for (auto &param : params) {
  ------------------
  |  Branch (226:26): [True: 3.69M, False: 3.12M]
  ------------------
  227|  3.69M|            if (param.expr) {
  ------------------
  |  Branch (227:17): [True: 184k, False: 3.51M]
  ------------------
  228|       |                // Default arg.
  229|   184k|                desugar(param.expr, obj_level);
  230|   184k|            }
  231|  3.69M|        }
  232|  3.12M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5IndexESD_NS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  106|   880k|    {
  107|   880k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   880k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_8FunctionEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESC_RNS7_INS0_8ArgParamENS9_ISD_EEEEbSC_RPNS0_3ASTEEEEPT_DpOT0_:
  106|   649k|    {
  107|   649k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   649k|    }
_ZN7jsonnet8internal9Desugarer10makeObjectEPNS0_6ObjectEj:
  579|   494k|    AST* makeObject(Object *ast, unsigned obj_level) {
  580|       |        // Hidden variable to allow outer/top binding.
  581|   494k|        if (obj_level == 0) {
  ------------------
  |  Branch (581:13): [True: 35.0k, False: 459k]
  ------------------
  582|  35.0k|            const Identifier *hidden_var = id(U"$");
  583|  35.0k|            auto *body = make<Self>(E, EF);
  584|  35.0k|            ast->fields.push_back(ObjectField::Local(EF, EF, hidden_var, EF, body, EF));
  585|  35.0k|        }
  586|       |
  587|   494k|        SuperVars svs = desugarFields(ast, ast->fields, obj_level);
  588|       |
  589|   494k|        DesugaredObject::Fields new_fields;
  590|   494k|        ASTs new_asserts;
  591|  2.15M|        for (const ObjectField &field : ast->fields) {
  ------------------
  |  Branch (591:39): [True: 2.15M, False: 494k]
  ------------------
  592|  2.15M|            if (field.kind == ObjectField::ASSERT) {
  ------------------
  |  Branch (592:17): [True: 183k, False: 1.96M]
  ------------------
  593|   183k|                new_asserts.push_back(field.expr2);
  594|  1.96M|            } else if (field.kind == ObjectField::FIELD_EXPR) {
  ------------------
  |  Branch (594:24): [True: 1.96M, False: 0]
  ------------------
  595|  1.96M|                new_fields.emplace_back(field.hide, field.expr1, field.expr2);
  596|  1.96M|            } else {
  597|      0|                std::cerr << "INTERNAL ERROR: field should have been desugared: " << field.kind
  598|      0|                          << std::endl;
  599|      0|            }
  600|  2.15M|        }
  601|       |
  602|   494k|        AST* retval = make<DesugaredObject>(ast->location, new_asserts, new_fields);
  603|   494k|        if (svs.size() > 0) {
  ------------------
  |  Branch (603:13): [True: 1.99k, False: 492k]
  ------------------
  604|  1.99k|            Local::Binds binds;
  605|   149k|            for (const auto &pair : svs) {
  ------------------
  |  Branch (605:35): [True: 149k, False: 1.99k]
  ------------------
  606|   149k|                if (pair.second == nullptr) {
  ------------------
  |  Branch (606:21): [True: 1.28k, False: 147k]
  ------------------
  607|       |                    // Self binding
  608|  1.28k|                    binds.push_back(bind(pair.first, make<Self>(E, EF)));
  609|   147k|                } else {
  610|       |                    // Super binding
  611|   147k|                    binds.push_back(bind(pair.first, pair.second));
  612|   147k|                }
  613|   149k|            }
  614|  1.99k|            retval = make<Local>(ast->location, EF, binds, retval);
  615|  1.99k|        }
  616|       |
  617|   494k|        return retval;
  618|   494k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_4SelfEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEEEEPT_DpOT0_:
  106|  36.5k|    {
  107|  36.5k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  36.5k|    }
_ZN7jsonnet8internal9Desugarer13desugarFieldsEPNS0_3ASTERNSt3__16vectorINS0_11ObjectFieldENS4_9allocatorIS6_EEEEj:
  239|   537k|    {
  240|       |        // Desugar children
  241|  2.28M|        for (auto &field : fields) {
  ------------------
  |  Branch (241:26): [True: 2.28M, False: 537k]
  ------------------
  242|  2.28M|            if (field.expr1 != nullptr)
  ------------------
  |  Branch (242:17): [True: 104k, False: 2.18M]
  ------------------
  243|   104k|                desugar(field.expr1, obj_level);
  244|  2.28M|            desugar(field.expr2, obj_level + 1);
  245|  2.28M|            if (field.expr3 != nullptr)
  ------------------
  |  Branch (245:17): [True: 1.92k, False: 2.28M]
  ------------------
  246|  1.92k|                desugar(field.expr3, obj_level + 1);
  247|  2.28M|            desugarParams(field.params, obj_level + 1);
  248|  2.28M|        }
  249|       |
  250|       |        // Simplify asserts
  251|  2.28M|        for (auto &field : fields) {
  ------------------
  |  Branch (251:26): [True: 2.28M, False: 537k]
  ------------------
  252|  2.28M|            if (field.kind != ObjectField::ASSERT)
  ------------------
  |  Branch (252:17): [True: 2.10M, False: 183k]
  ------------------
  253|  2.10M|                continue;
  254|   183k|            AST *msg = field.expr3;
  255|   183k|            field.expr3 = nullptr;
  256|   183k|            if (msg == nullptr) {
  ------------------
  |  Branch (256:17): [True: 181k, False: 1.92k]
  ------------------
  257|       |                // The location is what appears in the stacktrace.
  258|   181k|                msg = str(field.expr2->location, U"Object assertion failed.");
  259|   181k|            }
  260|       |
  261|       |            // if expr2 then true else error msg
  262|   183k|            field.expr2 = make<Conditional>(field.expr2->location,
  263|   183k|                                            EF,
  264|   183k|                                            field.expr2,
  265|   183k|                                            EF,
  266|   183k|                                            make<LiteralBoolean>(E, EF, true),
  267|   183k|                                            EF,
  268|   183k|                                            error(msg));
  269|   183k|        }
  270|       |
  271|       |        // Remove methods
  272|  2.28M|        for (auto &field : fields) {
  ------------------
  |  Branch (272:26): [True: 2.28M, False: 537k]
  ------------------
  273|  2.28M|            if (!field.methodSugar)
  ------------------
  |  Branch (273:17): [True: 1.24M, False: 1.04M]
  ------------------
  274|  1.24M|                continue;
  275|  1.04M|            field.expr2 = make<Function>(field.expr2->location,
  276|  1.04M|                                         EF,
  277|  1.04M|                                         field.fodderL,
  278|  1.04M|                                         field.params,
  279|  1.04M|                                         field.trailingComma,
  280|  1.04M|                                         field.fodderR,
  281|  1.04M|                                         field.expr2);
  282|  1.04M|            field.methodSugar = false;
  283|  1.04M|            field.params.clear();
  284|  1.04M|        }
  285|       |
  286|       |        // Remove object-level locals
  287|   537k|        auto copy = fields;
  288|   537k|        fields.clear();
  289|   537k|        Local::Binds binds;
  290|  2.28M|        for (auto &local : copy) {
  ------------------
  |  Branch (290:26): [True: 2.28M, False: 537k]
  ------------------
  291|  2.28M|            if (local.kind != ObjectField::LOCAL)
  ------------------
  |  Branch (291:17): [True: 2.19M, False: 94.9k]
  ------------------
  292|  2.19M|                continue;
  293|  94.9k|            binds.push_back(bind(local.id, local.expr2));
  294|  94.9k|        }
  295|  2.28M|        for (auto &field : copy) {
  ------------------
  |  Branch (295:26): [True: 2.28M, False: 537k]
  ------------------
  296|  2.28M|            if (field.kind == ObjectField::LOCAL)
  ------------------
  |  Branch (296:17): [True: 94.9k, False: 2.19M]
  ------------------
  297|  94.9k|                continue;
  298|  2.19M|            if (!binds.empty())
  ------------------
  |  Branch (298:17): [True: 1.23M, False: 959k]
  ------------------
  299|  1.23M|                field.expr2 = make<Local>(field.expr2->location, EF, binds, field.expr2);
  300|  2.19M|            fields.push_back(field);
  301|  2.19M|        }
  302|       |
  303|       |        // Change all to FIELD_EXPR
  304|  2.19M|        for (auto &field : fields) {
  ------------------
  |  Branch (304:26): [True: 2.19M, False: 537k]
  ------------------
  305|  2.19M|            switch (field.kind) {
  ------------------
  |  Branch (305:21): [True: 0, False: 2.19M]
  ------------------
  306|   183k|                case ObjectField::ASSERT:
  ------------------
  |  Branch (306:17): [True: 183k, False: 2.01M]
  ------------------
  307|       |                    // Nothing to do.
  308|   183k|                    break;
  309|       |
  310|  1.90M|                case ObjectField::FIELD_ID:
  ------------------
  |  Branch (310:17): [True: 1.90M, False: 287k]
  ------------------
  311|  1.90M|                    field.expr1 = str(field.idLocation, field.id->name);
  312|  1.90M|                    field.kind = ObjectField::FIELD_EXPR;
  313|  1.90M|                    break;
  314|       |
  315|  45.9k|                case ObjectField::FIELD_EXPR:
  ------------------
  |  Branch (315:17): [True: 45.9k, False: 2.14M]
  ------------------
  316|       |                    // Nothing to do.
  317|  45.9k|                    break;
  318|       |
  319|  58.7k|                case ObjectField::FIELD_STR:
  ------------------
  |  Branch (319:17): [True: 58.7k, False: 2.13M]
  ------------------
  320|       |                    // Just set the flag.
  321|  58.7k|                    field.kind = ObjectField::FIELD_EXPR;
  322|  58.7k|                    break;
  323|       |
  324|      0|                case ObjectField::LOCAL:
  ------------------
  |  Branch (324:17): [True: 0, False: 2.19M]
  ------------------
  325|      0|                    std::cerr << "Locals should be removed by now." << std::endl;
  326|      0|                    abort();
  327|  2.19M|            }
  328|  2.19M|        }
  329|       |
  330|       |        /** Replaces all occurrences of self, super[f] and e in super with variables.
  331|       |         *
  332|       |         * Returns all variables and original expressions via super_vars.
  333|       |         */
  334|   537k|        class SubstituteSelfSuper : public CompilerPass {
  335|   537k|            Desugarer *desugarer;
  336|   537k|            SuperVars &superVars;
  337|   537k|            unsigned &counter;
  338|   537k|            const Identifier *newSelf;
  339|       |
  340|   537k|           public:
  341|   537k|            SubstituteSelfSuper(Desugarer *desugarer, SuperVars &super_vars, unsigned &counter)
  342|   537k|                : CompilerPass(*desugarer->alloc),
  343|   537k|                  desugarer(desugarer),
  344|   537k|                  superVars(super_vars),
  345|   537k|                  counter(counter),
  346|   537k|                  newSelf(nullptr)
  347|   537k|            {
  348|   537k|            }
  349|   537k|            void visitExpr(AST *&expr)
  350|   537k|            {
  351|   537k|                if (dynamic_cast<Self *>(expr)) {
  352|   537k|                    if (newSelf == nullptr) {
  353|   537k|                        newSelf = desugarer->id(U"$outer_self");
  354|   537k|                        superVars.emplace_back(newSelf, nullptr);
  355|   537k|                    }
  356|   537k|                    expr = alloc.make<Var>(expr->location, expr->openFodder, newSelf);
  357|   537k|                } else if (auto *super_index = dynamic_cast<SuperIndex *>(expr)) {
  358|   537k|                    UStringStream ss;
  359|   537k|                    ss << U"$outer_super_index" << (counter++);
  360|   537k|                    const Identifier *super_var = desugarer->id(ss.str());
  361|       |                    // Desugaring of expr should already have occurred.
  362|   537k|                    assert(super_index->index != nullptr);
  363|       |                    // Re-use super_index since we're replacing it here.
  364|   537k|                    superVars.emplace_back(super_var, super_index);
  365|   537k|                    expr = alloc.make<Var>(expr->location, expr->openFodder, super_var);
  366|   537k|                } else if (auto *in_super = dynamic_cast<InSuper *>(expr)) {
  367|   537k|                    UStringStream ss;
  368|   537k|                    ss << U"$outer_in_super" << (counter++);
  369|   537k|                    const Identifier *in_super_var = desugarer->id(ss.str());
  370|       |                    // Re-use in_super since we're replacing it here.
  371|   537k|                    superVars.emplace_back(in_super_var, in_super);
  372|   537k|                    expr = alloc.make<Var>(expr->location, expr->openFodder, in_super_var);
  373|   537k|                }
  374|   537k|                CompilerPass::visitExpr(expr);
  375|   537k|            }
  376|   537k|        };
  377|       |
  378|   537k|        SuperVars super_vars;
  379|   537k|        unsigned counter = 0;
  380|       |
  381|       |        // Remove +:
  382|  2.19M|        for (auto &field : fields) {
  ------------------
  |  Branch (382:26): [True: 2.19M, False: 537k]
  ------------------
  383|  2.19M|            if (!field.superSugar)
  ------------------
  |  Branch (383:17): [True: 2.16M, False: 25.9k]
  ------------------
  384|  2.16M|                continue;
  385|       |            // We have to bind self/super from expr1 outside the class, as we copy the expression
  386|       |            // into the field body.
  387|       |            // Clone it so that we maintain the AST as a tree.
  388|  25.9k|            AST *index = clone(field.expr1);
  389|       |            // This will remove self/super.
  390|  25.9k|            SubstituteSelfSuper(this, super_vars, counter).expr(index);
  391|  25.9k|            field.expr2 = make<Conditional>(
  392|  25.9k|                ast->location,
  393|  25.9k|                EF,
  394|  25.9k|                make<InSuper>(ast->location, EF, index, EF, EF),
  395|  25.9k|                EF,
  396|  25.9k|                make<Binary>(ast->location,
  397|  25.9k|                             EF,
  398|  25.9k|                             make<SuperIndex>(ast->location, EF, EF, clone(index), EF, nullptr),
  399|  25.9k|                             EF,
  400|  25.9k|                             BOP_PLUS,
  401|  25.9k|                             field.expr2),
  402|  25.9k|                EF,
  403|  25.9k|                clone(field.expr2));
  404|  25.9k|            field.superSugar = false;
  405|  25.9k|        }
  406|       |
  407|   537k|        return super_vars;
  408|   537k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTESD_PNS0_14LiteralBooleanESD_PNS0_5ErrorEEEEPT_DpOT0_:
  106|   183k|    {
  107|   183k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   183k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_14LiteralBooleanEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEbEEEPT_DpOT0_:
  106|   183k|    {
  107|   183k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   183k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_8FunctionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERSB_RNS7_INS0_8ArgParamENS9_ISF_EEEERbSE_RPNS0_3ASTEEEEPT_DpOT0_:
  106|  1.04M|    {
  107|  1.04M|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  1.04M|    }
_ZN7jsonnet8internal9Desugarer5cloneEPNS0_3ASTE:
  111|  77.7k|    {
  112|  77.7k|        return clone_ast(*alloc, ast);
  113|  77.7k|    }
_ZZN7jsonnet8internal9Desugarer13desugarFieldsEPNS0_3ASTERNSt3__16vectorINS0_11ObjectFieldENS4_9allocatorIS6_EEEEjEN19SubstituteSelfSuperC2EPS1_RNS5_INS4_4pairIPKNS0_10IdentifierES3_EENS7_ISH_EEEERj:
  347|  25.9k|            {
  348|  25.9k|            }
_ZZN7jsonnet8internal9Desugarer13desugarFieldsEPNS0_3ASTERNSt3__16vectorINS0_11ObjectFieldENS4_9allocatorIS6_EEEEjEN19SubstituteSelfSuper9visitExprERS3_:
  350|   884k|            {
  351|   884k|                if (dynamic_cast<Self *>(expr)) {
  ------------------
  |  Branch (351:21): [True: 5.92k, False: 878k]
  ------------------
  352|  5.92k|                    if (newSelf == nullptr) {
  ------------------
  |  Branch (352:25): [True: 1.36k, False: 4.55k]
  ------------------
  353|  1.36k|                        newSelf = desugarer->id(U"$outer_self");
  354|  1.36k|                        superVars.emplace_back(newSelf, nullptr);
  355|  1.36k|                    }
  356|  5.92k|                    expr = alloc.make<Var>(expr->location, expr->openFodder, newSelf);
  357|   878k|                } else if (auto *super_index = dynamic_cast<SuperIndex *>(expr)) {
  ------------------
  |  Branch (357:34): [True: 83.8k, False: 794k]
  ------------------
  358|  83.8k|                    UStringStream ss;
  359|  83.8k|                    ss << U"$outer_super_index" << (counter++);
  360|  83.8k|                    const Identifier *super_var = desugarer->id(ss.str());
  361|       |                    // Desugaring of expr should already have occurred.
  362|  83.8k|                    assert(super_index->index != nullptr);
  363|       |                    // Re-use super_index since we're replacing it here.
  364|      0|                    superVars.emplace_back(super_var, super_index);
  365|  83.8k|                    expr = alloc.make<Var>(expr->location, expr->openFodder, super_var);
  366|   794k|                } else if (auto *in_super = dynamic_cast<InSuper *>(expr)) {
  ------------------
  |  Branch (366:34): [True: 82.9k, False: 711k]
  ------------------
  367|  82.9k|                    UStringStream ss;
  368|  82.9k|                    ss << U"$outer_in_super" << (counter++);
  369|  82.9k|                    const Identifier *in_super_var = desugarer->id(ss.str());
  370|       |                    // Re-use in_super since we're replacing it here.
  371|  82.9k|                    superVars.emplace_back(in_super_var, in_super);
  372|  82.9k|                    expr = alloc.make<Var>(expr->location, expr->openFodder, in_super_var);
  373|  82.9k|                }
  374|      0|                CompilerPass::visitExpr(expr);
  375|   884k|            }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_7InSuperESD_PNS0_6BinaryESD_PNS0_3ASTEEEEPT_DpOT0_:
  106|  25.9k|    {
  107|  25.9k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  25.9k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_7InSuperEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTESD_SD_EEEPT_DpOT0_:
  106|  25.9k|    {
  107|  25.9k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  25.9k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_6BinaryEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_10SuperIndexESD_NS0_8BinaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  106|  25.9k|    {
  107|  25.9k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  25.9k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_10SuperIndexEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESD_PNS0_3ASTESD_DnEEEPT_DpOT0_:
  106|  25.9k|    {
  107|  25.9k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  25.9k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_15DesugaredObjectEJRNS0_13LocationRangeERNSt3__14listIPNS0_3ASTENS6_9allocatorIS9_EEEERNS6_6vectorINS3_5FieldENSA_ISF_EEEEEEEPT_DpOT0_:
  106|   494k|    {
  107|   494k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   494k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERNS7_INS3_4BindENS9_ISE_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  106|  1.27M|    {
  107|  1.27M|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  1.27M|    }
_ZN7jsonnet8internal9Desugarer23makeObjectComprehensionEPNS0_19ObjectComprehensionEj:
  620|  43.1k|    AST* makeObjectComprehension(ObjectComprehension *ast, unsigned obj_level) {
  621|       |        // Hidden variable to allow outer/top binding.
  622|  43.1k|        if (obj_level == 0) {
  ------------------
  |  Branch (622:13): [True: 195, False: 42.9k]
  ------------------
  623|    195|            const Identifier *hidden_var = id(U"$");
  624|    195|            auto *body = make<Self>(E, EF);
  625|    195|            ast->fields.push_back(ObjectField::Local(EF, EF, hidden_var, EF, body, EF));
  626|    195|        }
  627|       |
  628|  43.1k|        SuperVars svs = desugarFields(ast, ast->fields, obj_level);
  629|       |
  630|  43.1k|        AST *field = ast->fields.front().expr1;
  631|  43.1k|        AST *value = ast->fields.front().expr2;
  632|       |
  633|       |        /*  {
  634|       |            [arr[0]]: local x = arr[1], y = arr[2], z = arr[3]; val_expr
  635|       |            for arr in [ [key_expr, x, y, z] for ...  ]
  636|       |            }
  637|       |        */
  638|  43.1k|        auto *_arr = id(U"$arr");
  639|  43.1k|        AST *zero = make<LiteralNumber>(E, EF, "0.0");
  640|  43.1k|        int counter = 1;
  641|  43.1k|        Local::Binds binds;
  642|  43.1k|        Array::Elements arr_e{Array::Element(field, EF)};
  643|  63.4k|        for (ComprehensionSpec &spec : ast->specs) {
  ------------------
  |  Branch (643:38): [True: 63.4k, False: 43.1k]
  ------------------
  644|  63.4k|            if (spec.kind == ComprehensionSpec::FOR) {
  ------------------
  |  Branch (644:17): [True: 46.1k, False: 17.2k]
  ------------------
  645|  46.1k|                std::stringstream num;
  646|  46.1k|                num << counter++;
  647|  46.1k|                binds.push_back(bind(spec.var,
  648|  46.1k|                                     make<Index>(E,
  649|  46.1k|                                                 EF,
  650|  46.1k|                                                 var(_arr),
  651|  46.1k|                                                 EF,
  652|  46.1k|                                                 false,
  653|  46.1k|                                                 make<LiteralNumber>(E, EF, num.str()),
  654|  46.1k|                                                 EF,
  655|  46.1k|                                                 nullptr,
  656|  46.1k|                                                 EF,
  657|  46.1k|                                                 nullptr,
  658|  46.1k|                                                 EF)));
  659|  46.1k|                arr_e.emplace_back(var(spec.var), EF);
  660|  46.1k|            }
  661|  63.4k|        }
  662|  43.1k|        AST *arr = make<ArrayComprehension>(ast->location,
  663|  43.1k|                                            EF,
  664|  43.1k|                                            make<Array>(ast->location, EF, arr_e, false, EF),
  665|  43.1k|                                            EF,
  666|  43.1k|                                            false,
  667|  43.1k|                                            ast->specs,
  668|  43.1k|                                            EF);
  669|  43.1k|        desugar(arr, obj_level);
  670|  43.1k|        return make<ObjectComprehensionSimple>(
  671|  43.1k|            ast->location,
  672|  43.1k|            make<Index>(E, EF, var(_arr), EF, false, zero, EF, nullptr, EF, nullptr, EF),
  673|  43.1k|            make<Local>(ast->location, EF, binds, value),
  674|  43.1k|            _arr,
  675|  43.1k|            arr);
  676|  43.1k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bPNS0_13LiteralNumberESE_DnSE_DnSE_EEEPT_DpOT0_:
  106|  46.1k|    {
  107|  46.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  46.1k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_13LiteralNumberEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEENS7_12basic_stringIcNS7_11char_traitsIcEENSA_IcEEEEEEEPT_DpOT0_:
  106|  46.1k|    {
  107|  46.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  46.1k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_18ArrayComprehensionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5ArrayESD_bRNS7_INS0_17ComprehensionSpecENS9_ISG_EEEESD_EEEPT_DpOT0_:
  106|  43.1k|    {
  107|  43.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  43.1k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ArrayEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERNS7_INS3_7ElementENS9_ISE_EEEEbSD_EEEPT_DpOT0_:
  106|  43.1k|    {
  107|  43.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  43.1k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_25ObjectComprehensionSimpleEJRNS0_13LocationRangeEPNS0_5IndexEPNS0_5LocalERPKNS0_10IdentifierERPNS0_3ASTEEEEPT_DpOT0_:
  106|  43.1k|    {
  107|  43.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  43.1k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bRPNS0_3ASTESE_DnSE_DnSE_EEEPT_DpOT0_:
  106|  43.1k|    {
  107|  43.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  43.1k|    }
_ZN7jsonnet8internal9Desugarer2idERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  116|  5.55M|    {
  117|  5.55M|        return alloc->makeIdentifier(s);
  118|  5.55M|    }
_ZN7jsonnet8internal9Desugarer3strERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  121|  9.89M|    {
  122|  9.89M|        return make<LiteralString>(E, EF, s, LiteralString::DOUBLE, "", "");
  123|  9.89M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_15BuiltinFunctionEJRKNS0_13LocationRangeENSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEERNS7_6vectorIPKNS0_10IdentifierENSB_ISH_EEEEEEEPT_DpOT0_:
  106|   332k|    {
  107|   332k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|   332k|    }
_ZZN7jsonnet8internal9Desugarer9stdlibASTENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEENKUlRKNS0_15DesugaredObject5FieldEE_clESC_:
  934|  38.3M|                [=](const DesugaredObject::Field& f) {
  935|  38.3M|                    return static_cast<LiteralString*>(f.name)->value == decl.name;
  936|  38.3M|                });
_ZN7jsonnet8internal9Desugarer11desugarFileERPNS0_3ASTEPNSt3__13mapINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENS0_5VmExtENS5_4lessISC_EENSA_INS5_4pairIKSC_SD_EEEEEE:
  949|  5.31k|    {
  950|  5.31k|        desugar(ast, 0);
  951|       |
  952|  5.31k|        DesugaredObject *std_obj = stdlibAST(ast->location.file);
  953|       |
  954|  5.31k|        std::vector<std::string> empty;
  955|  5.31k|        auto line_end_blank = Fodder{{FodderElement::LINE_END, 1, 0, empty}};
  956|  5.31k|        auto line_end = Fodder{{FodderElement::LINE_END, 0, 0, empty}};
  957|       |
  958|       |        // local body = ast;
  959|       |        // if std.type(body) == "function") then
  960|       |        //     body(tlas...)
  961|       |        // else
  962|       |        //     body
  963|  5.31k|        if (tlas != nullptr) {
  ------------------
  |  Branch (963:13): [True: 4.72k, False: 586]
  ------------------
  964|  4.72k|            LocationRange tla_loc("Top-level function");
  965|  4.72k|            ArgParams args;
  966|  4.72k|            for (const auto &pair : *tlas) {
  ------------------
  |  Branch (966:35): [True: 0, False: 4.72k]
  ------------------
  967|      0|                AST *expr;
  968|      0|                if (pair.second.isCode) {
  ------------------
  |  Branch (968:21): [True: 0, False: 0]
  ------------------
  969|      0|                    Tokens tokens = jsonnet_lex("tla:" + pair.first, pair.second.data.c_str());
  970|      0|                    expr = jsonnet_parse(alloc, tokens);
  971|      0|                    desugar(expr, 0);
  972|      0|                } else {
  973|      0|                    expr = str(decode_utf8(pair.second.data));
  974|      0|                }
  975|       |                // Add them as named arguments, so order does not matter.
  976|      0|                args.emplace_back(EF, id(decode_utf8(pair.first)), EF, expr, EF);
  977|      0|            }
  978|  4.72k|            const Identifier *body = id(U"top_level");
  979|  4.72k|            ast =
  980|  4.72k|                make<Local>(ast->location,
  981|  4.72k|                            line_end_blank,
  982|  4.72k|                            singleBind(body, ast),
  983|  4.72k|                            make<Conditional>(E,
  984|  4.72k|                                              line_end,
  985|  4.72k|                                              primitiveEquals(E, type(var(body)), str(U"function")),
  986|  4.72k|                                              EF,
  987|  4.72k|                                              make<Apply>(tla_loc,
  988|  4.72k|                                                          EF,
  989|  4.72k|                                                          make<Var>(E, line_end, body),
  990|  4.72k|                                                          EF,
  991|  4.72k|                                                          args,
  992|  4.72k|                                                          false,  // trailing comma
  993|  4.72k|                                                          EF,
  994|  4.72k|                                                          EF,
  995|  4.72k|                                                          false  // tailstrict
  996|  4.72k|                                                          ),
  997|  4.72k|                                              line_end,
  998|  4.72k|                                              make<Var>(E, line_end, body)));
  999|  4.72k|        }
 1000|       |
 1001|       |        // local std = (std.jsonnet stuff); ast
 1002|  5.31k|        ast = make<Local>(ast->location, EF, singleBind(id(U"std"), std_obj), ast);
 1003|  5.31k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5LocalEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISD_EEEEPNS0_11ConditionalEEEEPT_DpOT0_:
  106|  4.72k|    {
  107|  4.72k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  4.72k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRKNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_5ApplyERKSC_SF_SD_PNS0_3VarEEEEPT_DpOT0_:
  106|  4.72k|    {
  107|  4.72k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  4.72k|    }
_ZN7jsonnet8internal9Desugarer15primitiveEqualsERKNS0_13LocationRangeEPNS0_3ASTES6_:
  202|  4.72k|    {
  203|  4.72k|        return stdFunc(loc, U"primitiveEquals", a, b);
  204|  4.72k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_3VarESD_RNS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  106|  4.72k|    {
  107|  4.72k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  4.72k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_3VarEJRKNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  106|  9.45k|    {
  107|  9.45k|        return alloc->make<T>(std::forward<Args>(args)...);
  108|  9.45k|    }

_ZN7jsonnet8internal7FmtOptsC2Ev:
   48|  8.93k|    {
   49|  8.93k|    }

_ZN7jsonnet8internal26allowed_at_end_of_operatorEc:
  174|  5.37M|bool allowed_at_end_of_operator(char c) {
  175|  5.37M|    switch (c) {
  ------------------
  |  Branch (175:13): [True: 3.72M, False: 1.64M]
  ------------------
  176|   834k|        case '+':
  ------------------
  |  Branch (176:9): [True: 834k, False: 4.53M]
  ------------------
  177|   912k|        case '-':
  ------------------
  |  Branch (177:9): [True: 77.8k, False: 5.29M]
  ------------------
  178|  1.58M|        case '~':
  ------------------
  |  Branch (178:9): [True: 669k, False: 4.70M]
  ------------------
  179|  1.60M|        case '!':
  ------------------
  |  Branch (179:9): [True: 23.4k, False: 5.34M]
  ------------------
  180|  1.64M|        case '$': return false;
  ------------------
  |  Branch (180:9): [True: 40.8k, False: 5.32M]
  ------------------
  181|  5.37M|    }
  182|  3.72M|    return true;
  183|  5.37M|}
_ZN7jsonnet8internal20lex_get_keyword_kindERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  207|  51.1M|{
  208|  51.1M|    auto it = keywords.find(identifier);
  209|  51.1M|    if (it == keywords.end())
  ------------------
  |  Branch (209:9): [True: 37.3M, False: 13.7M]
  ------------------
  210|  37.3M|        return Token::IDENTIFIER;
  211|  13.7M|    return it->second;
  212|  51.1M|}
_ZN7jsonnet8internal10lex_numberERPKcRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKNS0_8LocationE:
  215|  6.21M|{
  216|       |    // This function should be understood with reference to the linked image:
  217|       |    // https://www.json.org/img/number.png
  218|       |
  219|       |    // Note, we deviate from the json.org documentation as follows:
  220|       |    // There is no reason to lex negative numbers as atomic tokens, it is better to parse them
  221|       |    // as a unary operator combined with a numeric literal.  This avoids x-1 being tokenized as
  222|       |    // <identifier> <number> instead of the intended <identifier> <binop> <number>.
  223|       |
  224|  6.21M|    enum State {
  225|  6.21M|        BEGIN,
  226|  6.21M|        AFTER_ZERO,
  227|  6.21M|        AFTER_ONE_TO_NINE,
  228|  6.21M|        AFTER_DOT,
  229|  6.21M|        AFTER_DIGIT,
  230|  6.21M|        AFTER_E,
  231|  6.21M|        AFTER_EXP_SIGN,
  232|  6.21M|        AFTER_EXP_DIGIT
  233|  6.21M|    } state;
  234|       |
  235|  6.21M|    std::string r;
  236|       |
  237|  6.21M|    state = BEGIN;
  238|  13.4M|    while (true) {
  ------------------
  |  Branch (238:12): [Folded - Ignored]
  ------------------
  239|  13.4M|        switch (state) {
  ------------------
  |  Branch (239:17): [True: 0, False: 13.4M]
  ------------------
  240|  6.21M|            case BEGIN:
  ------------------
  |  Branch (240:13): [True: 6.21M, False: 7.24M]
  ------------------
  241|  6.21M|                switch (*c) {
  242|  1.21M|                    case '0': state = AFTER_ZERO; break;
  ------------------
  |  Branch (242:21): [True: 1.21M, False: 4.99M]
  ------------------
  243|       |
  244|  1.69M|                    case '1':
  ------------------
  |  Branch (244:21): [True: 1.69M, False: 4.52M]
  ------------------
  245|  2.02M|                    case '2':
  ------------------
  |  Branch (245:21): [True: 331k, False: 5.88M]
  ------------------
  246|  2.36M|                    case '3':
  ------------------
  |  Branch (246:21): [True: 339k, False: 5.87M]
  ------------------
  247|  3.14M|                    case '4':
  ------------------
  |  Branch (247:21): [True: 776k, False: 5.44M]
  ------------------
  248|  3.30M|                    case '5':
  ------------------
  |  Branch (248:21): [True: 165k, False: 6.05M]
  ------------------
  249|  4.14M|                    case '6':
  ------------------
  |  Branch (249:21): [True: 837k, False: 5.38M]
  ------------------
  250|  4.25M|                    case '7':
  ------------------
  |  Branch (250:21): [True: 112k, False: 6.10M]
  ------------------
  251|  4.66M|                    case '8':
  ------------------
  |  Branch (251:21): [True: 408k, False: 5.81M]
  ------------------
  252|  4.99M|                    case '9': state = AFTER_ONE_TO_NINE; break;
  ------------------
  |  Branch (252:21): [True: 331k, False: 5.88M]
  ------------------
  253|       |
  254|      0|                    default: throw StaticError(filename, begin, "couldn't lex number");
  ------------------
  |  Branch (254:21): [True: 0, False: 6.21M]
  ------------------
  255|  6.21M|                }
  256|  6.21M|                break;
  257|       |
  258|  6.21M|            case AFTER_ZERO:
  ------------------
  |  Branch (258:13): [True: 1.21M, False: 12.2M]
  ------------------
  259|  1.21M|                switch (*c) {
  260|  18.2k|                    case '.': state = AFTER_DOT; break;
  ------------------
  |  Branch (260:21): [True: 18.2k, False: 1.20M]
  ------------------
  261|       |
  262|    317|                    case 'e':
  ------------------
  |  Branch (262:21): [True: 317, False: 1.21M]
  ------------------
  263|    887|                    case 'E': state = AFTER_E; break;
  ------------------
  |  Branch (263:21): [True: 570, False: 1.21M]
  ------------------
  264|       |
  265|  1.20M|                    default: goto end;
  ------------------
  |  Branch (265:21): [True: 1.20M, False: 19.1k]
  ------------------
  266|  1.21M|                }
  267|  19.1k|                break;
  268|       |
  269|  5.94M|            case AFTER_ONE_TO_NINE:
  ------------------
  |  Branch (269:13): [True: 5.94M, False: 7.50M]
  ------------------
  270|  5.94M|                switch (*c) {
  271|  1.60k|                    case '.': state = AFTER_DOT; break;
  ------------------
  |  Branch (271:21): [True: 1.60k, False: 5.94M]
  ------------------
  272|       |
  273|  4.13k|                    case 'e':
  ------------------
  |  Branch (273:21): [True: 4.13k, False: 5.94M]
  ------------------
  274|  5.14k|                    case 'E': state = AFTER_E; break;
  ------------------
  |  Branch (274:21): [True: 1.01k, False: 5.94M]
  ------------------
  275|       |
  276|   292k|                    case '0':
  ------------------
  |  Branch (276:21): [True: 292k, False: 5.65M]
  ------------------
  277|   362k|                    case '1':
  ------------------
  |  Branch (277:21): [True: 70.2k, False: 5.87M]
  ------------------
  278|   503k|                    case '2':
  ------------------
  |  Branch (278:21): [True: 141k, False: 5.80M]
  ------------------
  279|   571k|                    case '3':
  ------------------
  |  Branch (279:21): [True: 67.4k, False: 5.88M]
  ------------------
  280|   676k|                    case '4':
  ------------------
  |  Branch (280:21): [True: 105k, False: 5.84M]
  ------------------
  281|   815k|                    case '5':
  ------------------
  |  Branch (281:21): [True: 139k, False: 5.81M]
  ------------------
  282|   870k|                    case '6':
  ------------------
  |  Branch (282:21): [True: 54.6k, False: 5.89M]
  ------------------
  283|   901k|                    case '7':
  ------------------
  |  Branch (283:21): [True: 31.3k, False: 5.91M]
  ------------------
  284|   915k|                    case '8':
  ------------------
  |  Branch (284:21): [True: 13.7k, False: 5.93M]
  ------------------
  285|   950k|                    case '9': state = AFTER_ONE_TO_NINE; break;
  ------------------
  |  Branch (285:21): [True: 35.1k, False: 5.91M]
  ------------------
  286|       |
  287|  4.99M|                    default: goto end;
  ------------------
  |  Branch (287:21): [True: 4.99M, False: 957k]
  ------------------
  288|  5.94M|                }
  289|   957k|                break;
  290|       |
  291|   957k|            case AFTER_DOT:
  ------------------
  |  Branch (291:13): [True: 19.8k, False: 13.4M]
  ------------------
  292|  19.8k|                switch (*c) {
  293|    547|                    case '0':
  ------------------
  |  Branch (293:21): [True: 547, False: 19.2k]
  ------------------
  294|    860|                    case '1':
  ------------------
  |  Branch (294:21): [True: 313, False: 19.5k]
  ------------------
  295|  1.10k|                    case '2':
  ------------------
  |  Branch (295:21): [True: 245, False: 19.5k]
  ------------------
  296|  1.37k|                    case '3':
  ------------------
  |  Branch (296:21): [True: 265, False: 19.5k]
  ------------------
  297|  2.11k|                    case '4':
  ------------------
  |  Branch (297:21): [True: 744, False: 19.0k]
  ------------------
  298|  19.2k|                    case '5':
  ------------------
  |  Branch (298:21): [True: 17.1k, False: 2.68k]
  ------------------
  299|  19.7k|                    case '6':
  ------------------
  |  Branch (299:21): [True: 504, False: 19.3k]
  ------------------
  300|  19.7k|                    case '7':
  ------------------
  |  Branch (300:21): [True: 11, False: 19.8k]
  ------------------
  301|  19.7k|                    case '8':
  ------------------
  |  Branch (301:21): [True: 24, False: 19.8k]
  ------------------
  302|  19.8k|                    case '9': state = AFTER_DIGIT; break;
  ------------------
  |  Branch (302:21): [True: 20, False: 19.8k]
  ------------------
  303|       |
  304|     16|                    default: {
  ------------------
  |  Branch (304:21): [True: 16, False: 19.8k]
  ------------------
  305|     16|                        std::stringstream ss;
  306|     16|                        ss << "couldn't lex number, junk after decimal point: " << *c;
  307|     16|                        throw StaticError(filename, begin, ss.str());
  308|  19.7k|                    }
  309|  19.8k|                }
  310|  19.8k|                break;
  311|       |
  312|  28.8k|            case AFTER_DIGIT:
  ------------------
  |  Branch (312:13): [True: 28.8k, False: 13.4M]
  ------------------
  313|  28.8k|                switch (*c) {
  314|    730|                    case 'e':
  ------------------
  |  Branch (314:21): [True: 730, False: 28.1k]
  ------------------
  315|  1.13k|                    case 'E': state = AFTER_E; break;
  ------------------
  |  Branch (315:21): [True: 408, False: 28.4k]
  ------------------
  316|       |
  317|  1.48k|                    case '0':
  ------------------
  |  Branch (317:21): [True: 1.48k, False: 27.3k]
  ------------------
  318|  1.98k|                    case '1':
  ------------------
  |  Branch (318:21): [True: 500, False: 28.3k]
  ------------------
  319|  2.51k|                    case '2':
  ------------------
  |  Branch (319:21): [True: 533, False: 28.3k]
  ------------------
  320|  3.24k|                    case '3':
  ------------------
  |  Branch (320:21): [True: 729, False: 28.1k]
  ------------------
  321|  6.18k|                    case '4':
  ------------------
  |  Branch (321:21): [True: 2.93k, False: 25.9k]
  ------------------
  322|  6.91k|                    case '5':
  ------------------
  |  Branch (322:21): [True: 737, False: 28.1k]
  ------------------
  323|  7.78k|                    case '6':
  ------------------
  |  Branch (323:21): [True: 867, False: 27.9k]
  ------------------
  324|  8.28k|                    case '7':
  ------------------
  |  Branch (324:21): [True: 497, False: 28.3k]
  ------------------
  325|  8.79k|                    case '8':
  ------------------
  |  Branch (325:21): [True: 516, False: 28.3k]
  ------------------
  326|  9.04k|                    case '9': state = AFTER_DIGIT; break;
  ------------------
  |  Branch (326:21): [True: 250, False: 28.6k]
  ------------------
  327|       |
  328|  18.6k|                    default: goto end;
  ------------------
  |  Branch (328:21): [True: 18.6k, False: 10.1k]
  ------------------
  329|  28.8k|                }
  330|  10.1k|                break;
  331|       |
  332|  10.1k|            case AFTER_E:
  ------------------
  |  Branch (332:13): [True: 7.17k, False: 13.4M]
  ------------------
  333|  7.17k|                switch (*c) {
  334|     91|                    case '+':
  ------------------
  |  Branch (334:21): [True: 91, False: 7.08k]
  ------------------
  335|  2.96k|                    case '-': state = AFTER_EXP_SIGN; break;
  ------------------
  |  Branch (335:21): [True: 2.87k, False: 4.29k]
  ------------------
  336|       |
  337|    862|                    case '0':
  ------------------
  |  Branch (337:21): [True: 862, False: 6.31k]
  ------------------
  338|  1.53k|                    case '1':
  ------------------
  |  Branch (338:21): [True: 671, False: 6.50k]
  ------------------
  339|  2.78k|                    case '2':
  ------------------
  |  Branch (339:21): [True: 1.25k, False: 5.92k]
  ------------------
  340|  2.98k|                    case '3':
  ------------------
  |  Branch (340:21): [True: 197, False: 6.97k]
  ------------------
  341|  3.09k|                    case '4':
  ------------------
  |  Branch (341:21): [True: 116, False: 7.05k]
  ------------------
  342|  3.44k|                    case '5':
  ------------------
  |  Branch (342:21): [True: 352, False: 6.82k]
  ------------------
  343|  3.53k|                    case '6':
  ------------------
  |  Branch (343:21): [True: 85, False: 7.08k]
  ------------------
  344|  3.82k|                    case '7':
  ------------------
  |  Branch (344:21): [True: 289, False: 6.88k]
  ------------------
  345|  3.92k|                    case '8':
  ------------------
  |  Branch (345:21): [True: 97, False: 7.07k]
  ------------------
  346|  4.16k|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (346:21): [True: 247, False: 6.92k]
  ------------------
  347|       |
  348|     40|                    default: {
  ------------------
  |  Branch (348:21): [True: 40, False: 7.13k]
  ------------------
  349|     40|                        std::stringstream ss;
  350|     40|                        ss << "couldn't lex number, junk after 'E': " << *c;
  351|     40|                        throw StaticError(filename, begin, ss.str());
  352|  3.92k|                    }
  353|  7.17k|                }
  354|  7.13k|                break;
  355|       |
  356|  7.13k|            case AFTER_EXP_SIGN:
  ------------------
  |  Branch (356:13): [True: 2.96k, False: 13.4M]
  ------------------
  357|  2.96k|                switch (*c) {
  358|     39|                    case '0':
  ------------------
  |  Branch (358:21): [True: 39, False: 2.92k]
  ------------------
  359|    396|                    case '1':
  ------------------
  |  Branch (359:21): [True: 357, False: 2.60k]
  ------------------
  360|    456|                    case '2':
  ------------------
  |  Branch (360:21): [True: 60, False: 2.90k]
  ------------------
  361|  1.10k|                    case '3':
  ------------------
  |  Branch (361:21): [True: 651, False: 2.31k]
  ------------------
  362|  1.12k|                    case '4':
  ------------------
  |  Branch (362:21): [True: 14, False: 2.95k]
  ------------------
  363|  1.13k|                    case '5':
  ------------------
  |  Branch (363:21): [True: 15, False: 2.95k]
  ------------------
  364|  1.13k|                    case '6':
  ------------------
  |  Branch (364:21): [True: 2, False: 2.96k]
  ------------------
  365|  2.94k|                    case '7':
  ------------------
  |  Branch (365:21): [True: 1.80k, False: 1.16k]
  ------------------
  366|  2.94k|                    case '8':
  ------------------
  |  Branch (366:21): [True: 2, False: 2.96k]
  ------------------
  367|  2.95k|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (367:21): [True: 11, False: 2.95k]
  ------------------
  368|       |
  369|     11|                    default: {
  ------------------
  |  Branch (369:21): [True: 11, False: 2.95k]
  ------------------
  370|     11|                        std::stringstream ss;
  371|     11|                        ss << "couldn't lex number, junk after exponent sign: " << *c;
  372|     11|                        throw StaticError(filename, begin, ss.str());
  373|  2.94k|                    }
  374|  2.96k|                }
  375|  2.95k|                break;
  376|       |
  377|  12.8k|            case AFTER_EXP_DIGIT:
  ------------------
  |  Branch (377:13): [True: 12.8k, False: 13.4M]
  ------------------
  378|  12.8k|                switch (*c) {
  379|    775|                    case '0':
  ------------------
  |  Branch (379:21): [True: 775, False: 12.0k]
  ------------------
  380|  1.06k|                    case '1':
  ------------------
  |  Branch (380:21): [True: 287, False: 12.5k]
  ------------------
  381|  1.46k|                    case '2':
  ------------------
  |  Branch (381:21): [True: 400, False: 12.4k]
  ------------------
  382|  1.96k|                    case '3':
  ------------------
  |  Branch (382:21): [True: 506, False: 12.2k]
  ------------------
  383|  2.34k|                    case '4':
  ------------------
  |  Branch (383:21): [True: 380, False: 12.4k]
  ------------------
  384|  2.86k|                    case '5':
  ------------------
  |  Branch (384:21): [True: 516, False: 12.2k]
  ------------------
  385|  2.90k|                    case '6':
  ------------------
  |  Branch (385:21): [True: 41, False: 12.7k]
  ------------------
  386|  3.54k|                    case '7':
  ------------------
  |  Branch (386:21): [True: 641, False: 12.1k]
  ------------------
  387|  4.64k|                    case '8':
  ------------------
  |  Branch (387:21): [True: 1.09k, False: 11.7k]
  ------------------
  388|  5.68k|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (388:21): [True: 1.04k, False: 11.7k]
  ------------------
  389|       |
  390|  7.12k|                    default: goto end;
  ------------------
  |  Branch (390:21): [True: 7.12k, False: 5.68k]
  ------------------
  391|  12.8k|                }
  392|  5.68k|                break;
  393|  13.4M|        }
  394|  7.24M|        r += *c;
  395|  7.24M|        c++;
  396|  7.24M|    }
  397|  6.21M|end:
  398|  6.21M|    return r;
  399|  6.21M|}
_ZN7jsonnet8internal11jsonnet_lexERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKc:
  427|  17.4k|{
  428|  17.4k|    unsigned long line_number = 1;
  429|  17.4k|    const char *line_start = input;
  430|       |
  431|  17.4k|    Tokens r;
  432|       |
  433|  17.4k|    const char *c = input;
  434|       |
  435|  17.4k|    Fodder fodder;
  436|  17.4k|    bool fresh_line = true;  // Are we tokenizing from the beginning of a new line?
  437|       |
  438|   127M|    while (*c != '\0') {
  ------------------
  |  Branch (438:12): [True: 127M, False: 8.06k]
  ------------------
  439|       |        // Used to ensure we have actually advanced the pointer by the end of the iteration.
  440|   127M|        const char *original_c = c;
  441|       |
  442|   127M|        Token::Kind kind;
  443|   127M|        std::string data;
  444|   127M|        std::string string_block_indent;
  445|   127M|        std::string string_block_term_indent;
  446|       |
  447|   127M|        unsigned new_lines, indent;
  448|   127M|        lex_ws(c, new_lines, indent, line_start, line_number);
  449|       |
  450|       |        // If it's the end of the file, discard final whitespace.
  451|   127M|        if (*c == '\0')
  ------------------
  |  Branch (451:13): [True: 8.77k, False: 127M]
  ------------------
  452|  8.77k|            break;
  453|       |
  454|   127M|        if (new_lines > 0) {
  ------------------
  |  Branch (454:13): [True: 12.6M, False: 115M]
  ------------------
  455|       |            // Otherwise store whitespace in fodder.
  456|  12.6M|            unsigned blanks = new_lines - 1;
  457|  12.6M|            fodder.emplace_back(FodderElement::LINE_END, blanks, indent, EMPTY);
  458|  12.6M|            fresh_line = true;
  459|  12.6M|        }
  460|       |
  461|   127M|        Location begin(line_number, c - line_start + 1);
  462|       |
  463|   127M|        switch (*c) {
  464|       |            // The following operators should never be combined with subsequent symbols.
  465|   559k|            case '{':
  ------------------
  |  Branch (465:13): [True: 559k, False: 127M]
  ------------------
  466|   559k|                kind = Token::BRACE_L;
  467|   559k|                c++;
  468|   559k|                break;
  469|       |
  470|   552k|            case '}':
  ------------------
  |  Branch (470:13): [True: 552k, False: 127M]
  ------------------
  471|   552k|                kind = Token::BRACE_R;
  472|   552k|                c++;
  473|   552k|                break;
  474|       |
  475|  2.67M|            case '[':
  ------------------
  |  Branch (475:13): [True: 2.67M, False: 125M]
  ------------------
  476|  2.67M|                kind = Token::BRACKET_L;
  477|  2.67M|                c++;
  478|  2.67M|                break;
  479|       |
  480|  2.66M|            case ']':
  ------------------
  |  Branch (480:13): [True: 2.66M, False: 125M]
  ------------------
  481|  2.66M|                kind = Token::BRACKET_R;
  482|  2.66M|                c++;
  483|  2.66M|                break;
  484|       |
  485|  11.8M|            case ',':
  ------------------
  |  Branch (485:13): [True: 11.8M, False: 116M]
  ------------------
  486|  11.8M|                kind = Token::COMMA;
  487|  11.8M|                c++;
  488|  11.8M|                break;
  489|       |
  490|  6.04M|            case '.':
  ------------------
  |  Branch (490:13): [True: 6.04M, False: 121M]
  ------------------
  491|  6.04M|                kind = Token::DOT;
  492|  6.04M|                c++;
  493|  6.04M|                break;
  494|       |
  495|  9.17M|            case '(':
  ------------------
  |  Branch (495:13): [True: 9.17M, False: 118M]
  ------------------
  496|  9.17M|                kind = Token::PAREN_L;
  497|  9.17M|                c++;
  498|  9.17M|                break;
  499|       |
  500|  9.16M|            case ')':
  ------------------
  |  Branch (500:13): [True: 9.16M, False: 118M]
  ------------------
  501|  9.16M|                kind = Token::PAREN_R;
  502|  9.16M|                c++;
  503|  9.16M|                break;
  504|       |
  505|  2.40M|            case ';':
  ------------------
  |  Branch (505:13): [True: 2.40M, False: 125M]
  ------------------
  506|  2.40M|                kind = Token::SEMICOLON;
  507|  2.40M|                c++;
  508|  2.40M|                break;
  509|       |
  510|       |            // Numeric literals.
  511|  1.21M|            case '0':
  ------------------
  |  Branch (511:13): [True: 1.21M, False: 126M]
  ------------------
  512|  2.91M|            case '1':
  ------------------
  |  Branch (512:13): [True: 1.69M, False: 126M]
  ------------------
  513|  3.24M|            case '2':
  ------------------
  |  Branch (513:13): [True: 331k, False: 127M]
  ------------------
  514|  3.58M|            case '3':
  ------------------
  |  Branch (514:13): [True: 339k, False: 127M]
  ------------------
  515|  4.36M|            case '4':
  ------------------
  |  Branch (515:13): [True: 776k, False: 127M]
  ------------------
  516|  4.52M|            case '5':
  ------------------
  |  Branch (516:13): [True: 165k, False: 127M]
  ------------------
  517|  5.36M|            case '6':
  ------------------
  |  Branch (517:13): [True: 837k, False: 127M]
  ------------------
  518|  5.47M|            case '7':
  ------------------
  |  Branch (518:13): [True: 112k, False: 127M]
  ------------------
  519|  5.88M|            case '8':
  ------------------
  |  Branch (519:13): [True: 408k, False: 127M]
  ------------------
  520|  6.21M|            case '9':
  ------------------
  |  Branch (520:13): [True: 331k, False: 127M]
  ------------------
  521|  6.21M|                kind = Token::NUMBER;
  522|  6.21M|                data = lex_number(c, filename, begin);
  523|  6.21M|                break;
  524|       |
  525|       |            // UString literals.
  526|  89.9k|            case '"': {
  ------------------
  |  Branch (526:13): [True: 89.9k, False: 127M]
  ------------------
  527|  89.9k|                c++;
  528|  23.7M|                for (;; ++c) {
  529|  23.7M|                    if (*c == '\0') {
  ------------------
  |  Branch (529:25): [True: 29, False: 23.7M]
  ------------------
  530|     29|                        throw StaticError(filename, begin, "unterminated string");
  531|     29|                    }
  532|  23.7M|                    if (*c == '"') {
  ------------------
  |  Branch (532:25): [True: 89.8k, False: 23.6M]
  ------------------
  533|  89.8k|                        break;
  534|  89.8k|                    }
  535|  23.6M|                    if (*c == '\\' && *(c + 1) != '\0') {
  ------------------
  |  Branch (535:25): [True: 157k, False: 23.5M]
  |  Branch (535:39): [True: 157k, False: 1]
  ------------------
  536|   157k|                        data += *c;
  537|   157k|                        ++c;
  538|   157k|                    }
  539|  23.6M|                    if (*c == '\n') {
  ------------------
  |  Branch (539:25): [True: 2.64M, False: 21.0M]
  ------------------
  540|       |                        // Maintain line/column counters.
  541|  2.64M|                        line_number++;
  542|  2.64M|                        line_start = c + 1;
  543|  2.64M|                    }
  544|  23.6M|                    data += *c;
  545|  23.6M|                }
  546|  89.8k|                c++;  // Advance beyond the ".
  547|  89.8k|                kind = Token::STRING_DOUBLE;
  548|  89.8k|            } break;
  549|       |
  550|       |            // UString literals.
  551|  4.18M|            case '\'': {
  ------------------
  |  Branch (551:13): [True: 4.18M, False: 123M]
  ------------------
  552|  4.18M|                c++;
  553|  52.8M|                for (;; ++c) {
  554|  52.8M|                    if (*c == '\0') {
  ------------------
  |  Branch (554:25): [True: 40, False: 52.8M]
  ------------------
  555|     40|                        throw StaticError(filename, begin, "unterminated string");
  556|     40|                    }
  557|  52.8M|                    if (*c == '\'') {
  ------------------
  |  Branch (557:25): [True: 4.18M, False: 48.6M]
  ------------------
  558|  4.18M|                        break;
  559|  4.18M|                    }
  560|  48.6M|                    if (*c == '\\' && *(c + 1) != '\0') {
  ------------------
  |  Branch (560:25): [True: 412k, False: 48.2M]
  |  Branch (560:39): [True: 412k, False: 1]
  ------------------
  561|   412k|                        data += *c;
  562|   412k|                        ++c;
  563|   412k|                    }
  564|  48.6M|                    if (*c == '\n') {
  ------------------
  |  Branch (564:25): [True: 1.69M, False: 46.9M]
  ------------------
  565|       |                        // Maintain line/column counters.
  566|  1.69M|                        line_number++;
  567|  1.69M|                        line_start = c + 1;
  568|  1.69M|                    }
  569|  48.6M|                    data += *c;
  570|  48.6M|                }
  571|  4.18M|                c++;  // Advance beyond the '.
  572|  4.18M|                kind = Token::STRING_SINGLE;
  573|  4.18M|            } break;
  574|       |
  575|       |            // Verbatim string literals.
  576|       |            // ' and " quoting is interpreted here, unlike non-verbatim strings
  577|       |            // where it is done later by jsonnet_string_unescape.  This is OK
  578|       |            // in this case because no information is lost by resoving the
  579|       |            // repeated quote into a single quote, so we can go back to the
  580|       |            // original form in the formatter.
  581|  6.70k|            case '@': {
  ------------------
  |  Branch (581:13): [True: 6.70k, False: 127M]
  ------------------
  582|  6.70k|                c++;
  583|  6.70k|                if (*c != '"' && *c != '\'') {
  ------------------
  |  Branch (583:21): [True: 4.96k, False: 1.74k]
  |  Branch (583:34): [True: 10, False: 4.95k]
  ------------------
  584|     10|                    std::stringstream ss;
  585|     10|                    ss << "couldn't lex verbatim string, junk after '@': " << *c;
  586|     10|                    throw StaticError(filename, begin, ss.str());
  587|     10|                }
  588|  6.69k|                const char quot = *c;
  589|  6.69k|                c++;  // Advance beyond the opening quote.
  590|  49.4k|                for (;; ++c) {
  591|  49.4k|                    if (*c == '\0') {
  ------------------
  |  Branch (591:25): [True: 22, False: 49.4k]
  ------------------
  592|     22|                        throw StaticError(filename, begin, "unterminated verbatim string");
  593|     22|                    }
  594|  49.4k|                    if (*c == quot) {
  ------------------
  |  Branch (594:25): [True: 7.60k, False: 41.8k]
  ------------------
  595|  7.60k|                        if (*(c + 1) == quot) {
  ------------------
  |  Branch (595:29): [True: 927, False: 6.67k]
  ------------------
  596|    927|                            c++;
  597|  6.67k|                        } else {
  598|  6.67k|                            break;
  599|  6.67k|                        }
  600|  7.60k|                    }
  601|  42.7k|                    data += *c;
  602|  42.7k|                }
  603|  6.67k|                c++;  // Advance beyond the closing quote.
  604|  6.67k|                if (quot == '"') {
  ------------------
  |  Branch (604:21): [True: 1.73k, False: 4.94k]
  ------------------
  605|  1.73k|                    kind = Token::VERBATIM_STRING_DOUBLE;
  606|  4.94k|                } else {
  607|  4.94k|                    kind = Token::VERBATIM_STRING_SINGLE;
  608|  4.94k|                }
  609|  6.67k|            } break;
  610|       |
  611|       |            // Keywords
  612|  72.2M|            default:
  ------------------
  |  Branch (612:13): [True: 72.2M, False: 55.5M]
  ------------------
  613|  72.2M|                if (is_identifier_first(*c)) {
  ------------------
  |  Branch (613:21): [True: 51.1M, False: 21.1M]
  ------------------
  614|  51.1M|                    std::string id;
  615|   279M|                    for (; is_identifier(*c); ++c)
  ------------------
  |  Branch (615:28): [True: 228M, False: 51.1M]
  ------------------
  616|   228M|                        id += *c;
  617|  51.1M|                    kind = lex_get_keyword_kind(id);
  618|  51.1M|                    data = id;
  619|       |
  620|  51.1M|                } else if (is_symbol(*c) || *c == '#') {
  ------------------
  |  Branch (620:28): [True: 15.6M, False: 5.51M]
  |  Branch (620:45): [True: 5.51M, False: 182]
  ------------------
  621|       |                    // Single line C++ and Python style comments.
  622|  21.1M|                    if (*c == '#' || (*c == '/' && *(c + 1) == '/')) {
  ------------------
  |  Branch (622:25): [True: 5.51M, False: 15.6M]
  |  Branch (622:39): [True: 2.76M, False: 12.8M]
  |  Branch (622:52): [True: 770k, False: 1.99M]
  ------------------
  623|  6.28M|                        std::vector<std::string> comment(1);
  624|  6.28M|                        unsigned blanks;
  625|  6.28M|                        unsigned indent;
  626|  6.28M|                        lex_until_newline(c, comment[0], blanks, indent, line_start, line_number);
  627|  6.28M|                        auto kind = fresh_line ? FodderElement::PARAGRAPH : FodderElement::LINE_END;
  ------------------
  |  Branch (627:37): [True: 6.28M, False: 2.35k]
  ------------------
  628|  6.28M|                        fodder.emplace_back(kind, blanks, indent, comment);
  629|  6.28M|                        fresh_line = true;
  630|  6.28M|                        continue;  // We've not got a token, just fodder, so keep scanning.
  631|  6.28M|                    }
  632|       |
  633|       |                    // Multi-line C style comment.
  634|  14.8M|                    if (*c == '/' && *(c + 1) == '*') {
  ------------------
  |  Branch (634:25): [True: 1.99M, False: 12.8M]
  |  Branch (634:38): [True: 1.91M, False: 80.8k]
  ------------------
  635|  1.91M|                        unsigned margin = c - line_start;
  636|       |
  637|  1.91M|                        const char *initial_c = c;
  638|  1.91M|                        c += 2;  // Avoid matching /*/: skip the /* before starting the search for
  639|       |                                 // */.
  640|       |
  641|  50.0M|                        while (!(*c == '*' && *(c + 1) == '/')) {
  ------------------
  |  Branch (641:34): [True: 4.21M, False: 45.8M]
  |  Branch (641:47): [True: 1.91M, False: 2.29M]
  ------------------
  642|  48.1M|                            if (*c == '\0') {
  ------------------
  |  Branch (642:33): [True: 87, False: 48.1M]
  ------------------
  643|     87|                                auto msg = "multi-line comment has no terminating */.";
  644|     87|                                throw StaticError(filename, begin, msg);
  645|     87|                            }
  646|  48.1M|                            if (*c == '\n') {
  ------------------
  |  Branch (646:33): [True: 8.59M, False: 39.5M]
  ------------------
  647|       |                                // Just keep track of the line / column counters.
  648|  8.59M|                                line_number++;
  649|  8.59M|                                line_start = c + 1;
  650|  8.59M|                            }
  651|  48.1M|                            ++c;
  652|  48.1M|                        }
  653|  1.91M|                        c += 2;  // Move the pointer to the char after the closing '/'.
  654|       |
  655|  1.91M|                        std::string comment(initial_c,
  656|  1.91M|                                            c - initial_c);  // Includes the "/*" and "*/".
  657|       |
  658|       |                        // Lex whitespace after comment
  659|  1.91M|                        unsigned new_lines_after, indent_after;
  660|  1.91M|                        lex_ws(c, new_lines_after, indent_after, line_start, line_number);
  661|  1.91M|                        std::vector<std::string> lines;
  662|  1.91M|                        if (comment.find('\n') >= comment.length()) {
  ------------------
  |  Branch (662:29): [True: 1.63M, False: 285k]
  ------------------
  663|       |                            // Comment looks like /* foo */
  664|  1.63M|                            lines.push_back(comment);
  665|  1.63M|                            fodder.emplace_back(FodderElement::INTERSTITIAL, 0, 0, lines);
  666|  1.63M|                            if (new_lines_after > 0) {
  ------------------
  |  Branch (666:33): [True: 1.62M, False: 6.80k]
  ------------------
  667|  1.62M|                                fodder.emplace_back(FodderElement::LINE_END,
  668|  1.62M|                                                    new_lines_after - 1,
  669|  1.62M|                                                    indent_after,
  670|  1.62M|                                                    EMPTY);
  671|  1.62M|                                fresh_line = true;
  672|  1.62M|                            }
  673|  1.63M|                        } else {
  674|   285k|                            lines = line_split(comment, margin);
  675|   285k|                            assert(lines[0][0] == '/');
  676|       |                            // Little hack to support PARAGRAPHs with * down the LHS:
  677|       |                            // Add a space to lines that start with a '*'
  678|      0|                            bool all_star = true;
  679|  8.86M|                            for (auto &l : lines) {
  ------------------
  |  Branch (679:42): [True: 8.86M, False: 285k]
  ------------------
  680|  8.86M|                                if (l[0] != '*')
  ------------------
  |  Branch (680:37): [True: 8.79M, False: 65.6k]
  ------------------
  681|  8.79M|                                    all_star = false;
  682|  8.86M|                            }
  683|   285k|                            if (all_star) {
  ------------------
  |  Branch (683:33): [True: 0, False: 285k]
  ------------------
  684|      0|                                for (auto &l : lines) {
  ------------------
  |  Branch (684:46): [True: 0, False: 0]
  ------------------
  685|      0|                                    if (l[0] == '*')
  ------------------
  |  Branch (685:41): [True: 0, False: 0]
  ------------------
  686|      0|                                        l = " " + l;
  687|      0|                                }
  688|      0|                            }
  689|   285k|                            if (new_lines_after == 0) {
  ------------------
  |  Branch (689:33): [True: 7.30k, False: 278k]
  ------------------
  690|       |                                // Ensure a line end after the paragraph.
  691|  7.30k|                                new_lines_after = 1;
  692|  7.30k|                                indent_after = 0;
  693|  7.30k|                            }
  694|   285k|                            fodder_push_back(fodder,
  695|   285k|                                             FodderElement(FodderElement::PARAGRAPH,
  696|   285k|                                                           new_lines_after - 1,
  697|   285k|                                                           indent_after,
  698|   285k|                                                           lines));
  699|   285k|                            fresh_line = true;
  700|   285k|                        }
  701|      0|                        continue;  // We've not got a token, just fodder, so keep scanning.
  702|  1.91M|                    }
  703|       |
  704|       |                    // Text block
  705|  12.9M|                    if (*c == '|' && *(c + 1) == '|' && *(c + 2) == '|') {
  ------------------
  |  Branch (705:25): [True: 236k, False: 12.6M]
  |  Branch (705:38): [True: 183k, False: 52.7k]
  |  Branch (705:57): [True: 4.45k, False: 179k]
  ------------------
  706|  4.45k|                        c += 3;  // Skip the "|||".
  707|  4.84k|                        while (is_horz_ws(*c)) ++c;  // Chomp whitespace at end of line.
  ------------------
  |  Branch (707:32): [True: 390, False: 4.45k]
  ------------------
  708|  4.45k|                        if (*c != '\n') {
  ------------------
  |  Branch (708:29): [True: 32, False: 4.42k]
  ------------------
  709|     32|                            auto msg = "text block syntax requires new line after |||.";
  710|     32|                            throw StaticError(filename, begin, msg);
  711|     32|                        }
  712|  4.42k|                        std::stringstream block;
  713|  4.42k|                        c++;  // Skip the "\n"
  714|  4.42k|                        line_number++;
  715|       |                        // Skip any blank lines at the beginning of the block.
  716|  5.02k|                        while (*c == '\n') {
  ------------------
  |  Branch (716:32): [True: 600, False: 4.42k]
  ------------------
  717|    600|                            line_number++;
  718|    600|                            ++c;
  719|    600|                            block << '\n';
  720|    600|                        }
  721|  4.42k|                        line_start = c;
  722|  4.42k|                        const char *first_line = c;
  723|  4.42k|                        int ws_chars = whitespace_check(first_line, c);
  724|  4.42k|                        string_block_indent = std::string(first_line, ws_chars);
  725|  4.42k|                        if (ws_chars == 0) {
  ------------------
  |  Branch (725:29): [True: 18, False: 4.40k]
  ------------------
  726|     18|                            auto msg = "text block's first line must start with whitespace.";
  727|     18|                            throw StaticError(filename, begin, msg);
  728|     18|                        }
  729|  5.71k|                        while (true) {
  ------------------
  |  Branch (729:32): [Folded - Ignored]
  ------------------
  730|  5.71k|                            assert(ws_chars > 0);
  731|       |                            // Read up to the \n
  732|  25.9M|                            for (c = &c[ws_chars]; *c != '\n'; ++c) {
  ------------------
  |  Branch (732:52): [True: 25.9M, False: 5.64k]
  ------------------
  733|  25.9M|                                if (*c == '\0')
  ------------------
  |  Branch (733:37): [True: 63, False: 25.9M]
  ------------------
  734|     63|                                    throw StaticError(filename, begin, "unexpected EOF");
  735|  25.9M|                                block << *c;
  736|  25.9M|                            }
  737|       |                            // Add the \n
  738|  5.64k|                            block << '\n';
  739|  5.64k|                            ++c;
  740|  5.64k|                            line_number++;
  741|  5.64k|                            line_start = c;
  742|       |                            // Skip any blank lines
  743|  6.32k|                            while (*c == '\n') {
  ------------------
  |  Branch (743:36): [True: 677, False: 5.64k]
  ------------------
  744|    677|                                line_number++;
  745|    677|                                ++c;
  746|    677|                                block << '\n';
  747|    677|                            }
  748|       |                            // Examine next line
  749|  5.64k|                            ws_chars = whitespace_check(first_line, c);
  750|  5.64k|                            if (ws_chars == 0) {
  ------------------
  |  Branch (750:33): [True: 4.34k, False: 1.30k]
  ------------------
  751|       |                                // End of text block
  752|       |                                // Skip over any whitespace
  753|  34.7k|                                while (*c == ' ' || *c == '\t') {
  ------------------
  |  Branch (753:40): [True: 2.48k, False: 32.2k]
  |  Branch (753:53): [True: 27.9k, False: 4.34k]
  ------------------
  754|  30.3k|                                    string_block_term_indent += *c;
  755|  30.3k|                                    ++c;
  756|  30.3k|                                }
  757|       |                                // Expect |||
  758|  4.34k|                                if (!(*c == '|' && *(c + 1) == '|' && *(c + 2) == '|')) {
  ------------------
  |  Branch (758:39): [True: 4.28k, False: 63]
  |  Branch (758:52): [True: 4.26k, False: 12]
  |  Branch (758:71): [True: 4.25k, False: 11]
  ------------------
  759|     86|                                    auto msg = "text block not terminated with |||";
  760|     86|                                    throw StaticError(filename, begin, msg);
  761|     86|                                }
  762|  4.25k|                                c += 3;  // Leave after the last |
  763|  4.25k|                                data = block.str();
  764|  4.25k|                                kind = Token::STRING_BLOCK;
  765|  4.25k|                                break;  // Out of the while loop.
  766|  4.34k|                            }
  767|  5.64k|                        }
  768|       |
  769|  4.25k|                        break;  // Out of the switch.
  770|  4.40k|                    }
  771|       |
  772|  12.9M|                    const char *operator_begin = c;
  773|  37.1M|                    for (; is_symbol(*c); ++c) {
  ------------------
  |  Branch (773:28): [True: 24.2M, False: 12.9M]
  ------------------
  774|       |                        // Not allowed // in operators
  775|  24.2M|                        if (*c == '/' && *(c + 1) == '/')
  ------------------
  |  Branch (775:29): [True: 82.0k, False: 24.1M]
  |  Branch (775:42): [True: 324, False: 81.7k]
  ------------------
  776|    324|                            break;
  777|       |                        // Not allowed /* in operators
  778|  24.2M|                        if (*c == '/' && *(c + 1) == '*')
  ------------------
  |  Branch (778:29): [True: 81.7k, False: 24.1M]
  |  Branch (778:42): [True: 770, False: 80.9k]
  ------------------
  779|    770|                            break;
  780|       |                        // Not allowed ||| in operators
  781|  24.2M|                        if (*c == '|' && *(c + 1) == '|' && *(c + 2) == '|')
  ------------------
  |  Branch (781:29): [True: 412k, False: 23.8M]
  |  Branch (781:42): [True: 179k, False: 232k]
  |  Branch (781:61): [True: 291, False: 179k]
  ------------------
  782|    291|                            break;
  783|  24.2M|                    }
  784|       |                    // Not allowed to end with a + - ~ ! unless a single char.
  785|       |                    // So, wind it back if we need to (but not too far).
  786|  14.5M|                    while (c > operator_begin + 1 && !allowed_at_end_of_operator(*(c - 1))) {
  ------------------
  |  Branch (786:28): [True: 5.37M, False: 9.19M]
  |  Branch (786:54): [True: 1.64M, False: 3.72M]
  ------------------
  787|  1.64M|                        c--;
  788|  1.64M|                    }
  789|  12.9M|                    data += std::string(operator_begin, c);
  790|  12.9M|                    if (data == "$") {
  ------------------
  |  Branch (790:25): [True: 46.3k, False: 12.8M]
  ------------------
  791|  46.3k|                        kind = Token::DOLLAR;
  792|  46.3k|                        data = "";
  793|  12.8M|                    } else {
  794|  12.8M|                        kind = Token::OPERATOR;
  795|  12.8M|                    }
  796|  12.9M|                } else {
  797|    182|                    std::stringstream ss;
  798|    182|                    ss << "Could not lex the character ";
  799|    182|                    auto uc = (unsigned char)(*c);
  800|    182|                    if (*c < 32)
  ------------------
  |  Branch (800:25): [True: 166, False: 16]
  ------------------
  801|    166|                        ss << "code " << unsigned(uc);
  802|     16|                    else
  803|     16|                        ss << "'" << *c << "'";
  804|    182|                    throw StaticError(filename, begin, ss.str());
  805|    182|                }
  806|   127M|        }
  807|       |
  808|       |        // Ensure that a bug in the above code does not cause an infinite memory consuming loop due
  809|       |        // to pushing empty tokens.
  810|   119M|        if (c == original_c) {
  ------------------
  |  Branch (810:13): [True: 0, False: 119M]
  ------------------
  811|      0|            throw StaticError(filename, begin, "internal lexing error:  pointer did not advance");
  812|      0|        }
  813|       |
  814|   119M|        Location end(line_number, (c + 1) - line_start);
  815|   119M|        r.emplace_back(kind,
  816|   119M|                       fodder,
  817|   119M|                       data,
  818|   119M|                       string_block_indent,
  819|   119M|                       string_block_term_indent,
  820|   119M|                       LocationRange(filename, begin, end));
  821|   119M|        fodder.clear();
  822|   119M|        fresh_line = false;
  823|   119M|    }
  824|       |
  825|  16.8k|    Location begin(line_number, c - line_start + 1);
  826|  16.8k|    Location end(line_number, (c + 1) - line_start + 1);
  827|  16.8k|    r.emplace_back(Token::END_OF_FILE, fodder, "", "", "", LocationRange(filename, begin, end));
  828|  16.8k|    return r;
  829|  17.4k|}
lexer.cpp:_ZN7jsonnet8internalL6lex_wsERPKcRjS4_S3_Rm:
   81|   136M|{
   82|   136M|    indent = 0;
   83|   136M|    new_lines = 0;
   84|   307M|    for (; *c != '\0' && is_ws(*c); c++) {
  ------------------
  |  Branch (84:12): [True: 307M, False: 9.52k]
  |  Branch (84:26): [True: 171M, False: 136M]
  ------------------
   85|   171M|        switch (*c) {
  ------------------
  |  Branch (85:17): [True: 0, False: 171M]
  ------------------
   86|  1.89M|            case '\r':
  ------------------
  |  Branch (86:13): [True: 1.89M, False: 169M]
  ------------------
   87|       |                // Ignore.
   88|  1.89M|                break;
   89|       |
   90|  25.7M|            case '\n':
  ------------------
  |  Branch (90:13): [True: 25.7M, False: 146M]
  ------------------
   91|  25.7M|                indent = 0;
   92|  25.7M|                new_lines++;
   93|  25.7M|                line_number++;
   94|  25.7M|                line_start = c + 1;
   95|  25.7M|                break;
   96|       |
   97|   144M|            case ' ': indent += 1; break;
  ------------------
  |  Branch (97:13): [True: 144M, False: 27.7M]
  ------------------
   98|       |
   99|       |            // This only works for \t at the beginning of lines, but we strip it everywhere else
  100|       |            // anyway.  The only case where this will cause a problem is spaces followed by \t
  101|       |            // at the beginning of a line.  However that is rare, ill-advised, and if re-indentation
  102|       |            // is enabled it will be fixed later.
  103|  80.9k|            case '\t': indent += 8; break;
  ------------------
  |  Branch (103:13): [True: 80.9k, False: 171M]
  ------------------
  104|   171M|        }
  105|   171M|    }
  106|   136M|}
lexer.cpp:_ZN7jsonnet8internalL5is_wsEc:
   39|   307M|{
   40|   307M|    return c == '\n' || is_horz_ws(c);
  ------------------
  |  Branch (40:12): [True: 25.7M, False: 282M]
  |  Branch (40:25): [True: 146M, False: 136M]
  ------------------
   41|   307M|}
lexer.cpp:_ZN7jsonnet8internalL19is_identifier_firstEc:
  143|   351M|{
  144|   351M|    return is_upper(c) || is_lower(c) || c == '_';
  ------------------
  |  Branch (144:12): [True: 6.58M, False: 345M]
  |  Branch (144:27): [True: 262M, False: 82.9M]
  |  Branch (144:42): [True: 3.66M, False: 79.2M]
  ------------------
  145|   351M|}
lexer.cpp:_ZN7jsonnet8internalL8is_upperEc:
  128|   351M|{
  129|   351M|    return c >= 'A' && c <= 'Z';
  ------------------
  |  Branch (129:12): [True: 275M, False: 76.1M]
  |  Branch (129:24): [True: 6.58M, False: 269M]
  ------------------
  130|   351M|}
lexer.cpp:_ZN7jsonnet8internalL8is_lowerEc:
  133|   345M|{
  134|   345M|    return c >= 'a' && c <= 'z';
  ------------------
  |  Branch (134:12): [True: 262M, False: 82.6M]
  |  Branch (134:24): [True: 262M, False: 306k]
  ------------------
  135|   345M|}
lexer.cpp:_ZN7jsonnet8internalL13is_identifierEc:
  148|   279M|{
  149|   279M|    return is_identifier_first(c) || is_number(c);
  ------------------
  |  Branch (149:12): [True: 221M, False: 58.1M]
  |  Branch (149:38): [True: 6.98M, False: 51.1M]
  ------------------
  150|   279M|}
lexer.cpp:_ZN7jsonnet8internalL9is_numberEc:
  138|  58.1M|{
  139|  58.1M|    return c >= '0' && c <= '9';
  ------------------
  |  Branch (139:12): [True: 11.5M, False: 46.6M]
  |  Branch (139:24): [True: 6.98M, False: 4.54M]
  ------------------
  140|  58.1M|}
lexer.cpp:_ZN7jsonnet8internalL9is_symbolEc:
  153|  58.2M|{
  154|  58.2M|    switch (c) {
  ------------------
  |  Branch (154:13): [True: 18.4M, False: 39.8M]
  ------------------
  155|  1.10M|        case '!':
  ------------------
  |  Branch (155:9): [True: 1.10M, False: 57.1M]
  ------------------
  156|  1.25M|        case '$':
  ------------------
  |  Branch (156:9): [True: 147k, False: 58.1M]
  ------------------
  157|  7.29M|        case ':':
  ------------------
  |  Branch (157:9): [True: 6.04M, False: 52.2M]
  ------------------
  158|  8.00M|        case '~':
  ------------------
  |  Branch (158:9): [True: 704k, False: 57.5M]
  ------------------
  159|  15.4M|        case '+':
  ------------------
  |  Branch (159:9): [True: 7.40M, False: 50.8M]
  ------------------
  160|  16.4M|        case '-':
  ------------------
  |  Branch (160:9): [True: 1.02M, False: 57.2M]
  ------------------
  161|  17.5M|        case '&':
  ------------------
  |  Branch (161:9): [True: 1.11M, False: 57.1M]
  ------------------
  162|  18.1M|        case '|':
  ------------------
  |  Branch (162:9): [True: 648k, False: 57.6M]
  ------------------
  163|  18.2M|        case '^':
  ------------------
  |  Branch (163:9): [True: 42.2k, False: 58.2M]
  ------------------
  164|  33.6M|        case '=':
  ------------------
  |  Branch (164:9): [True: 15.4M, False: 42.8M]
  ------------------
  165|  34.7M|        case '<':
  ------------------
  |  Branch (165:9): [True: 1.10M, False: 57.1M]
  ------------------
  166|  36.2M|        case '>':
  ------------------
  |  Branch (166:9): [True: 1.40M, False: 56.8M]
  ------------------
  167|  36.4M|        case '*':
  ------------------
  |  Branch (167:9): [True: 282k, False: 57.9M]
  ------------------
  168|  39.3M|        case '/':
  ------------------
  |  Branch (168:9): [True: 2.85M, False: 55.4M]
  ------------------
  169|  39.8M|        case '%': return true;
  ------------------
  |  Branch (169:9): [True: 492k, False: 57.7M]
  ------------------
  170|  58.2M|    }
  171|  18.4M|    return false;
  172|  58.2M|}
lexer.cpp:_ZN7jsonnet8internalL17lex_until_newlineERPKcRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERjSC_S3_Rm:
  113|  6.28M|{
  114|  6.28M|    const char *original_c = c;
  115|  6.28M|    const char *last_non_space = c;
  116|  50.1M|    for (; *c != '\0' && *c != '\n'; c++) {
  ------------------
  |  Branch (116:12): [True: 50.1M, False: 280]
  |  Branch (116:26): [True: 43.8M, False: 6.28M]
  ------------------
  117|  43.8M|        if (!is_horz_ws(*c))
  ------------------
  |  Branch (117:13): [True: 37.1M, False: 6.67M]
  ------------------
  118|  37.1M|            last_non_space = c;
  119|  43.8M|    }
  120|  6.28M|    text = std::string(original_c, last_non_space - original_c + 1);
  121|       |    // Consume subsequent whitespace including the '\n'.
  122|  6.28M|    unsigned new_lines;
  123|  6.28M|    lex_ws(c, new_lines, indent, line_start, line_number);
  124|  6.28M|    blanks = new_lines == 0 ? 0 : new_lines - 1;
  ------------------
  |  Branch (124:14): [True: 280, False: 6.28M]
  ------------------
  125|  6.28M|}
lexer.cpp:_ZN7jsonnet8internalL10line_splitERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj:
   60|   285k|{
   61|   285k|    std::vector<std::string> ret;
   62|   285k|    std::stringstream ss;
   63|  44.3M|    for (size_t i = 0; i < s.length(); ++i) {
  ------------------
  |  Branch (63:24): [True: 44.0M, False: 285k]
  ------------------
   64|  44.0M|        if (s[i] == '\n') {
  ------------------
  |  Branch (64:13): [True: 8.58M, False: 35.4M]
  ------------------
   65|  8.58M|            ret.emplace_back(strip_ws(ss.str(), margin));
   66|  8.58M|            ss.str("");
   67|  35.4M|        } else {
   68|  35.4M|            ss << s[i];
   69|  35.4M|        }
   70|  44.0M|    }
   71|   285k|    ret.emplace_back(strip_ws(ss.str(), margin));
   72|   285k|    return ret;
   73|   285k|}
lexer.cpp:_ZN7jsonnet8internalL8strip_wsERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj:
   45|  8.86M|{
   46|  8.86M|    if (s.size() == 0)
  ------------------
  |  Branch (46:9): [True: 7.72M, False: 1.13M]
  ------------------
   47|  7.72M|        return s;  // Avoid underflow below.
   48|  1.13M|    size_t i = 0;
   49|  3.21M|    while (i < s.length() && is_horz_ws(s[i]) && i < margin)
  ------------------
  |  Branch (49:12): [True: 3.21M, False: 1.72k]
  |  Branch (49:30): [True: 2.39M, False: 823k]
  |  Branch (49:50): [True: 2.07M, False: 312k]
  ------------------
   50|  2.07M|        i++;
   51|  1.13M|    size_t j = s.size();
   52|  1.24M|    while (j > i && is_horz_ws(s[j - 1])) {
  ------------------
  |  Branch (52:12): [True: 1.23M, False: 5.16k]
  |  Branch (52:21): [True: 104k, False: 1.13M]
  ------------------
   53|   104k|        j--;
   54|   104k|    }
   55|  1.13M|    return std::string(&s[i], &s[j]);
   56|  8.86M|}
lexer.cpp:_ZN7jsonnet8internalL10is_horz_wsEc:
   33|   330M|{
   34|   330M|    return c == ' ' || c == '\t' || c == '\r';
  ------------------
  |  Branch (34:12): [True: 153M, False: 177M]
  |  Branch (34:24): [True: 98.4k, False: 177M]
  |  Branch (34:37): [True: 1.98M, False: 175M]
  ------------------
   35|   330M|}
lexer.cpp:_ZN7jsonnet8internalL16whitespace_checkEPKcS2_:
  404|  10.0k|{
  405|  10.0k|    int i = 0;
  406|   208k|    while (a[i] == ' ' || a[i] == '\t') {
  ------------------
  |  Branch (406:12): [True: 159k, False: 49.0k]
  |  Branch (406:27): [True: 43.3k, False: 5.73k]
  ------------------
  407|   202k|        if (b[i] != a[i])
  ------------------
  |  Branch (407:13): [True: 4.34k, False: 198k]
  ------------------
  408|  4.34k|            return 0;
  409|   198k|        i++;
  410|   198k|    }
  411|  5.73k|    return i;
  412|  10.0k|}

_ZN7jsonnet8internal13FodderElementC2ENS1_4KindEjjRKNSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEE:
   93|  22.4M|    {
   94|  22.4M|        assert(kind != LINE_END || comment.size() <= 1);
   95|      0|        assert(kind != INTERSTITIAL || (blanks == 0 && indent == 0 && comment.size() == 1));
   96|      0|        assert(kind != PARAGRAPH || comment.size() >= 1);
   97|  22.4M|    }
_ZNK7jsonnet8internal5Token6data32Ev:
  299|  41.6M|    {
  300|  41.6M|        return decode_utf8(data);
  301|  41.6M|    }
_ZN7jsonnet8internal5TokenC2ENS1_4KindERKNSt3__16vectorINS0_13FodderElementENS3_9allocatorIS5_EEEERKNS3_12basic_stringIcNS3_11char_traitsIcEENS6_IcEEEESH_SH_RKNS0_13LocationRangeE:
  314|   119M|    {
  315|   119M|    }
_ZN7jsonnet8internal5Token8toStringENS1_4KindE:
  320|  1.41k|    {
  321|  1.41k|        switch (v) {
  322|     23|            case BRACE_L: return "\"{\"";
  ------------------
  |  Branch (322:13): [True: 23, False: 1.38k]
  ------------------
  323|     76|            case BRACE_R: return "\"}\"";
  ------------------
  |  Branch (323:13): [True: 76, False: 1.33k]
  ------------------
  324|      2|            case BRACKET_L: return "\"[\"";
  ------------------
  |  Branch (324:13): [True: 2, False: 1.41k]
  ------------------
  325|    124|            case BRACKET_R: return "\"]\"";
  ------------------
  |  Branch (325:13): [True: 124, False: 1.28k]
  ------------------
  326|     76|            case COMMA: return "\",\"";
  ------------------
  |  Branch (326:13): [True: 76, False: 1.33k]
  ------------------
  327|     18|            case DOLLAR: return "\"$\"";
  ------------------
  |  Branch (327:13): [True: 18, False: 1.39k]
  ------------------
  328|     19|            case DOT: return "\".\"";
  ------------------
  |  Branch (328:13): [True: 19, False: 1.39k]
  ------------------
  329|       |
  330|      0|            case PAREN_L: return "\"(\"";
  ------------------
  |  Branch (330:13): [True: 0, False: 1.41k]
  ------------------
  331|     47|            case PAREN_R: return "\")\"";
  ------------------
  |  Branch (331:13): [True: 47, False: 1.36k]
  ------------------
  332|     33|            case SEMICOLON: return "\";\"";
  ------------------
  |  Branch (332:13): [True: 33, False: 1.37k]
  ------------------
  333|       |
  334|    165|            case IDENTIFIER: return "IDENTIFIER";
  ------------------
  |  Branch (334:13): [True: 165, False: 1.24k]
  ------------------
  335|     39|            case NUMBER: return "NUMBER";
  ------------------
  |  Branch (335:13): [True: 39, False: 1.37k]
  ------------------
  336|    192|            case OPERATOR: return "OPERATOR";
  ------------------
  |  Branch (336:13): [True: 192, False: 1.22k]
  ------------------
  337|     20|            case STRING_SINGLE: return "STRING_SINGLE";
  ------------------
  |  Branch (337:13): [True: 20, False: 1.39k]
  ------------------
  338|     18|            case STRING_DOUBLE: return "STRING_DOUBLE";
  ------------------
  |  Branch (338:13): [True: 18, False: 1.39k]
  ------------------
  339|      2|            case VERBATIM_STRING_SINGLE: return "VERBATIM_STRING_SINGLE";
  ------------------
  |  Branch (339:13): [True: 2, False: 1.41k]
  ------------------
  340|      4|            case VERBATIM_STRING_DOUBLE: return "VERBATIM_STRING_DOUBLE";
  ------------------
  |  Branch (340:13): [True: 4, False: 1.40k]
  ------------------
  341|      6|            case STRING_BLOCK: return "STRING_BLOCK";
  ------------------
  |  Branch (341:13): [True: 6, False: 1.40k]
  ------------------
  342|       |
  343|      1|            case ASSERT: return "assert";
  ------------------
  |  Branch (343:13): [True: 1, False: 1.41k]
  ------------------
  344|      1|            case ELSE: return "else";
  ------------------
  |  Branch (344:13): [True: 1, False: 1.41k]
  ------------------
  345|      0|            case ERROR: return "error";
  ------------------
  |  Branch (345:13): [True: 0, False: 1.41k]
  ------------------
  346|      0|            case FALSE: return "false";
  ------------------
  |  Branch (346:13): [True: 0, False: 1.41k]
  ------------------
  347|      5|            case FOR: return "for";
  ------------------
  |  Branch (347:13): [True: 5, False: 1.40k]
  ------------------
  348|      2|            case FUNCTION: return "function";
  ------------------
  |  Branch (348:13): [True: 2, False: 1.41k]
  ------------------
  349|      2|            case IF: return "if";
  ------------------
  |  Branch (349:13): [True: 2, False: 1.41k]
  ------------------
  350|      0|            case IMPORT: return "import";
  ------------------
  |  Branch (350:13): [True: 0, False: 1.41k]
  ------------------
  351|      1|            case IMPORTSTR: return "importstr";
  ------------------
  |  Branch (351:13): [True: 1, False: 1.41k]
  ------------------
  352|      1|            case IMPORTBIN: return "importbin";
  ------------------
  |  Branch (352:13): [True: 1, False: 1.41k]
  ------------------
  353|     21|            case IN: return "in";
  ------------------
  |  Branch (353:13): [True: 21, False: 1.39k]
  ------------------
  354|      0|            case LOCAL: return "local";
  ------------------
  |  Branch (354:13): [True: 0, False: 1.41k]
  ------------------
  355|      1|            case NULL_LIT: return "null";
  ------------------
  |  Branch (355:13): [True: 1, False: 1.41k]
  ------------------
  356|      1|            case SELF: return "self";
  ------------------
  |  Branch (356:13): [True: 1, False: 1.41k]
  ------------------
  357|      1|            case SUPER: return "super";
  ------------------
  |  Branch (357:13): [True: 1, False: 1.41k]
  ------------------
  358|      3|            case TAILSTRICT: return "tailstrict";
  ------------------
  |  Branch (358:13): [True: 3, False: 1.40k]
  ------------------
  359|      3|            case THEN: return "then";
  ------------------
  |  Branch (359:13): [True: 3, False: 1.40k]
  ------------------
  360|      3|            case TRUE: return "true";
  ------------------
  |  Branch (360:13): [True: 3, False: 1.40k]
  ------------------
  361|       |
  362|    502|            case END_OF_FILE: return "end of file";
  ------------------
  |  Branch (362:13): [True: 502, False: 910]
  ------------------
  363|      0|            default:
  ------------------
  |  Branch (363:13): [True: 0, False: 1.41k]
  ------------------
  364|      0|                std::cerr << "INTERNAL ERROR: Unknown token kind: " << v << std::endl;
  365|      0|                std::abort();
  366|  1.41k|        }
  367|  1.41k|    }
parser.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS0_5Token4KindE:
  387|    787|{
  388|    787|    o << Token::toString(v);
  389|    787|    return o;
  390|    787|}
parser.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_5TokenE:
  393|    664|{
  394|    664|    if (v.data == "") {
  ------------------
  |  Branch (394:9): [True: 471, False: 193]
  ------------------
  395|    471|        o << Token::toString(v.kind);
  396|    471|    } else if (v.kind == Token::OPERATOR) {
  ------------------
  |  Branch (396:16): [True: 39, False: 154]
  ------------------
  397|     39|        o << "\"" << v.data << "\"";
  398|    154|    } else {
  399|    154|        o << "(" << Token::toString(v.kind) << ", \"" << v.data << "\")";
  400|    154|    }
  401|    664|    return o;
  402|    664|}
lexer.cpp:_ZN7jsonnet8internalL16fodder_push_backERNSt3__16vectorINS0_13FodderElementENS1_9allocatorIS3_EEEERKS3_:
  143|   285k|{
  144|   285k|    if (fodder_has_clean_endline(a) && elem.kind == FodderElement::LINE_END) {
  ------------------
  |  Branch (144:9): [True: 273k, False: 12.1k]
  |  Branch (144:40): [True: 0, False: 273k]
  ------------------
  145|      0|        if (elem.comment.size() > 0) {
  ------------------
  |  Branch (145:13): [True: 0, False: 0]
  ------------------
  146|       |            // The line end had a comment, so create a single line paragraph for it.
  147|      0|            a.emplace_back(FodderElement::PARAGRAPH, elem.blanks, elem.indent, elem.comment);
  148|      0|        } else {
  149|       |            // Merge it into the previous line end.
  150|      0|            a.back().indent = elem.indent;
  151|      0|            a.back().blanks += elem.blanks;
  152|      0|        }
  153|   285k|    } else {
  154|   285k|        if (!fodder_has_clean_endline(a) && elem.kind == FodderElement::PARAGRAPH) {
  ------------------
  |  Branch (154:13): [True: 12.1k, False: 273k]
  |  Branch (154:45): [True: 12.1k, False: 0]
  ------------------
  155|  12.1k|            a.emplace_back(FodderElement::LINE_END, 0, elem.indent, std::vector<std::string>());
  156|  12.1k|        }
  157|   285k|        a.push_back(elem);
  158|   285k|    }
  159|   285k|}
lexer.cpp:_ZN7jsonnet8internalL24fodder_has_clean_endlineERKNSt3__16vectorINS0_13FodderElementENS1_9allocatorIS3_EEEE:
  134|   570k|{
  135|   570k|    return !fodder.empty() && fodder.back().kind != FodderElement::INTERSTITIAL;
  ------------------
  |  Branch (135:12): [True: 549k, False: 21.3k]
  |  Branch (135:31): [True: 546k, False: 3.02k]
  ------------------
  136|   570k|}

jsonnet_version:
  302|  17.8k|{
  303|  17.8k|    return LIB_JSONNET_VERSION;
  ------------------
  |  |   34|  17.8k|#define LIB_JSONNET_VERSION "v0.20.0"
  ------------------
  304|  17.8k|}
jsonnet_make:
  307|  8.93k|{
  308|  8.93k|    TRY
  ------------------
  |  |  287|  8.93k|#define TRY try {
  ------------------
  309|  8.93k|        return new JsonnetVm();
  310|  8.93k|    CATCH("jsonnet_make")
  ------------------
  |  |  289|  8.93k|    }                                                                                         \
  |  |  290|  8.93k|    catch (const std::bad_alloc &)                                                            \
  |  |  291|  8.93k|    {                                                                                         \
  |  |  292|      0|        memory_panic();                                                                       \
  |  |  293|      0|    }                                                                                         \
  |  |  294|  8.93k|    catch (const std::exception &e)                                                           \
  |  |  295|  8.93k|    {                                                                                         \
  |  |  296|      0|        std::cerr << "Something went wrong during " func ", please report this: " << e.what() \
  |  |  297|      0|                  << std::endl;                                                               \
  |  |  298|      0|        abort();                                                                              \
  |  |  299|      0|    }
  ------------------
  311|      0|    return nullptr;
  312|  8.93k|}
jsonnet_destroy:
  315|  8.93k|{
  316|  8.93k|    TRY
  ------------------
  |  |  287|  8.93k|#define TRY try {
  ------------------
  317|  8.93k|        delete vm;
  318|  8.93k|    CATCH("jsonnet_destroy")
  ------------------
  |  |  289|  8.93k|    }                                                                                         \
  |  |  290|  8.93k|    catch (const std::bad_alloc &)                                                            \
  |  |  291|  8.93k|    {                                                                                         \
  |  |  292|      0|        memory_panic();                                                                       \
  |  |  293|      0|    }                                                                                         \
  |  |  294|  8.93k|    catch (const std::exception &e)                                                           \
  |  |  295|  8.93k|    {                                                                                         \
  |  |  296|      0|        std::cerr << "Something went wrong during " func ", please report this: " << e.what() \
  |  |  297|      0|                  << std::endl;                                                               \
  |  |  298|      0|        abort();                                                                              \
  |  |  299|      0|    }
  ------------------
  319|  8.93k|}
jsonnet_import_callback:
  342|  8.93k|{
  343|  8.93k|    vm->importCallback = cb;
  344|  8.93k|    vm->importCallbackContext = ctx;
  345|  8.93k|}
jsonnet_evaluate_snippet:
  682|  8.93k|{
  683|  8.93k|    TRY
  ------------------
  |  |  287|  8.93k|#define TRY try {
  ------------------
  684|  8.93k|        return jsonnet_evaluate_snippet_aux(vm, filename, snippet, error, REGULAR);
  685|  8.93k|    CATCH("jsonnet_evaluate_snippet")
  ------------------
  |  |  289|  8.93k|    }                                                                                         \
  |  |  290|  8.93k|    catch (const std::bad_alloc &)                                                            \
  |  |  291|  8.93k|    {                                                                                         \
  |  |  292|      0|        memory_panic();                                                                       \
  |  |  293|      0|    }                                                                                         \
  |  |  294|  8.93k|    catch (const std::exception &e)                                                           \
  |  |  295|  8.93k|    {                                                                                         \
  |  |  296|      0|        std::cerr << "Something went wrong during " func ", please report this: " << e.what() \
  |  |  297|      0|                  << std::endl;                                                               \
  |  |  298|      0|        abort();                                                                              \
  |  |  299|      0|    }
  ------------------
  686|      0|    return nullptr;  // Never happens.
  687|  8.93k|}
jsonnet_realloc:
  708|  17.8k|{
  709|  17.8k|    (void)vm;
  710|  17.8k|    if (str == nullptr) {
  ------------------
  |  Branch (710:9): [True: 8.93k, False: 8.93k]
  ------------------
  711|  8.93k|        if (sz == 0)
  ------------------
  |  Branch (711:13): [True: 0, False: 8.93k]
  ------------------
  712|      0|            return nullptr;
  713|  8.93k|        auto *r = static_cast<char *>(::malloc(sz));
  714|  8.93k|        if (r == nullptr)
  ------------------
  |  Branch (714:13): [True: 0, False: 8.93k]
  ------------------
  715|      0|            memory_panic();
  716|  8.93k|        return r;
  717|  8.93k|    } else {
  718|  8.93k|        if (sz == 0) {
  ------------------
  |  Branch (718:13): [True: 8.93k, False: 0]
  ------------------
  719|  8.93k|            ::free(str);
  720|  8.93k|            return nullptr;
  721|  8.93k|        } else {
  722|      0|            auto *r = static_cast<char *>(::realloc(str, sz));
  723|      0|            if (r == nullptr)
  ------------------
  |  Branch (723:17): [True: 0, False: 0]
  ------------------
  724|      0|                memory_panic();
  725|      0|            return r;
  726|      0|        }
  727|  8.93k|    }
  728|  17.8k|}
_ZN9JsonnetVmC2Ev:
  205|  8.93k|    {
  206|  8.93k|        jpaths.emplace_back("/usr/share/jsonnet-" + std::string(jsonnet_version()) + "/");
  207|  8.93k|        jpaths.emplace_back("/usr/local/share/jsonnet-" + std::string(jsonnet_version()) + "/");
  208|  8.93k|    }
libjsonnet.cpp:_ZL11from_stringP9JsonnetVmRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   60|  8.93k|{
   61|  8.93k|    char *r = jsonnet_realloc(vm, nullptr, v.length() + 1);
   62|  8.93k|    std::memcpy(r, v.c_str(), v.length() + 1);
   63|  8.93k|    return r;
   64|  8.93k|}
libjsonnet.cpp:_ZL28jsonnet_evaluate_snippet_auxP9JsonnetVmPKcS2_PiN12_GLOBAL__N_18EvalKindE:
  502|  8.93k|{
  503|  8.93k|    try {
  504|  8.93k|        Allocator alloc;
  505|  8.93k|        AST *expr;
  506|  8.93k|        Tokens tokens = jsonnet_lex(filename, snippet);
  507|       |
  508|  8.93k|        expr = jsonnet_parse(&alloc, tokens);
  509|       |
  510|  8.93k|        jsonnet_desugar(&alloc, expr, &vm->tla);
  511|       |
  512|  8.93k|        unsigned max_stack = vm->maxStack;
  513|       |
  514|       |        // For the stdlib desugaring.
  515|  8.93k|        max_stack++;
  516|       |
  517|       |        // For the TLA desugaring.
  518|  8.93k|        max_stack++;
  519|       |
  520|  8.93k|        jsonnet_static_analysis(expr);
  521|  8.93k|        switch (kind) {
  522|  3.81k|            case REGULAR: {
  ------------------
  |  Branch (522:13): [True: 3.81k, False: 5.12k]
  ------------------
  523|  3.81k|                std::string json_str = jsonnet_vm_execute(&alloc,
  524|  3.81k|                                                          expr,
  525|  3.81k|                                                          vm->ext,
  526|  3.81k|                                                          max_stack,
  527|  3.81k|                                                          vm->gcMinObjects,
  528|  3.81k|                                                          vm->gcGrowthTrigger,
  529|  3.81k|                                                          vm->nativeCallbacks,
  530|  3.81k|                                                          vm->importCallback,
  531|  3.81k|                                                          vm->importCallbackContext,
  532|  3.81k|                                                          vm->stringOutput);
  533|  3.81k|                json_str += "\n";
  534|  3.81k|                *error = false;
  535|  3.81k|                return from_string(vm, json_str);
  536|      0|            } break;
  537|       |
  538|      0|            case MULTI: {
  ------------------
  |  Branch (538:13): [True: 0, False: 8.93k]
  ------------------
  539|      0|                std::map<std::string, std::string> files =
  540|      0|                    jsonnet_vm_execute_multi(&alloc,
  541|      0|                                             expr,
  542|      0|                                             vm->ext,
  543|      0|                                             max_stack,
  544|      0|                                             vm->gcMinObjects,
  545|      0|                                             vm->gcGrowthTrigger,
  546|      0|                                             vm->nativeCallbacks,
  547|      0|                                             vm->importCallback,
  548|      0|                                             vm->importCallbackContext,
  549|      0|                                             vm->stringOutput);
  550|      0|                size_t sz = 1;  // final sentinel
  551|      0|                for (const auto &pair : files) {
  ------------------
  |  Branch (551:39): [True: 0, False: 0]
  ------------------
  552|      0|                    sz += pair.first.length() + 1;   // include sentinel
  553|      0|                    sz += pair.second.length() + 2;  // Add a '\n' as well as sentinel
  554|      0|                }
  555|      0|                char *buf = (char *)::malloc(sz);
  556|      0|                if (buf == nullptr)
  ------------------
  |  Branch (556:21): [True: 0, False: 0]
  ------------------
  557|      0|                    memory_panic();
  558|      0|                std::ptrdiff_t i = 0;
  559|      0|                for (const auto &pair : files) {
  ------------------
  |  Branch (559:39): [True: 0, False: 0]
  ------------------
  560|      0|                    memcpy(&buf[i], pair.first.c_str(), pair.first.length() + 1);
  561|      0|                    i += pair.first.length() + 1;
  562|      0|                    memcpy(&buf[i], pair.second.c_str(), pair.second.length());
  563|      0|                    i += pair.second.length();
  564|      0|                    buf[i] = '\n';
  565|      0|                    i++;
  566|      0|                    buf[i] = '\0';
  567|      0|                    i++;
  568|      0|                }
  569|      0|                buf[i] = '\0';  // final sentinel
  570|      0|                *error = false;
  571|      0|                return buf;
  572|      0|            } break;
  573|       |
  574|      0|            case STREAM: {
  ------------------
  |  Branch (574:13): [True: 0, False: 8.93k]
  ------------------
  575|      0|                std::vector<std::string> documents =
  576|      0|                    jsonnet_vm_execute_stream(&alloc,
  577|      0|                                              expr,
  578|      0|                                              vm->ext,
  579|      0|                                              max_stack,
  580|      0|                                              vm->gcMinObjects,
  581|      0|                                              vm->gcGrowthTrigger,
  582|      0|                                              vm->nativeCallbacks,
  583|      0|                                              vm->importCallback,
  584|      0|                                              vm->importCallbackContext,
  585|      0|                                              vm->stringOutput);
  586|      0|                size_t sz = 1;  // final sentinel
  587|      0|                for (const auto &doc : documents) {
  ------------------
  |  Branch (587:38): [True: 0, False: 0]
  ------------------
  588|      0|                    sz += doc.length() + 2;  // Add a '\n' as well as sentinel
  589|      0|                }
  590|      0|                char *buf = (char *)::malloc(sz);
  591|      0|                if (buf == nullptr)
  ------------------
  |  Branch (591:21): [True: 0, False: 0]
  ------------------
  592|      0|                    memory_panic();
  593|      0|                std::ptrdiff_t i = 0;
  594|      0|                for (const auto &doc : documents) {
  ------------------
  |  Branch (594:38): [True: 0, False: 0]
  ------------------
  595|      0|                    memcpy(&buf[i], doc.c_str(), doc.length());
  596|      0|                    i += doc.length();
  597|      0|                    buf[i] = '\n';
  598|      0|                    i++;
  599|      0|                    buf[i] = '\0';
  600|      0|                    i++;
  601|      0|                }
  602|      0|                buf[i] = '\0';  // final sentinel
  603|      0|                *error = false;
  604|      0|                return buf;
  605|      0|            } break;
  606|       |
  607|      0|            default:
  ------------------
  |  Branch (607:13): [True: 0, False: 8.93k]
  ------------------
  608|      0|                fputs("INTERNAL ERROR: bad value of 'kind', probably memory corruption.\n", stderr);
  609|      0|                abort();
  610|  8.93k|        }
  611|       |
  612|  8.93k|    } catch (StaticError &e) {
  613|  5.12k|        std::stringstream ss;
  614|  5.12k|        ss << "STATIC ERROR: " << e << std::endl;
  615|  5.12k|        *error = true;
  616|  5.12k|        return from_string(vm, ss.str());
  617|       |
  618|  5.12k|    } catch (RuntimeError &e) {
  619|  2.09k|        std::stringstream ss;
  620|  2.09k|        ss << "RUNTIME ERROR: " << e.msg << std::endl;
  621|  2.09k|        const long max_above = vm->maxTrace / 2;
  622|  2.09k|        const long max_below = vm->maxTrace - max_above;
  623|  2.09k|        const long sz = e.stackTrace.size();
  624|   356k|        for (long i = 0; i < sz; ++i) {
  ------------------
  |  Branch (624:26): [True: 354k, False: 2.09k]
  ------------------
  625|   354k|            const auto &f = e.stackTrace[i];
  626|   354k|            if (vm->maxTrace > 0 && i >= max_above && i < sz - max_below) {
  ------------------
  |  Branch (626:17): [True: 354k, False: 0]
  |  Branch (626:37): [True: 341k, False: 13.2k]
  |  Branch (626:55): [True: 331k, False: 9.69k]
  ------------------
  627|   331k|                if (i == max_above)
  ------------------
  |  Branch (627:21): [True: 869, False: 330k]
  ------------------
  628|    869|                    ss << "\t..." << std::endl;
  629|   331k|            } else {
  630|  22.9k|                ss << "\t" << f.location << "\t" << f.name << std::endl;
  631|  22.9k|            }
  632|   354k|        }
  633|  2.09k|        *error = true;
  634|  2.09k|        return from_string(vm, ss.str());
  635|  2.09k|    }
  636|       |
  637|      0|    return nullptr;  // Quiet, compiler.
  638|  8.93k|}

_ZN7jsonnet8internal22jsonnet_unparse_numberEd:
   37|  4.67M|{
   38|  4.67M|    std::stringstream ss;
   39|  4.67M|    if (v == floor(v)) {
  ------------------
  |  Branch (39:9): [True: 4.54M, False: 129k]
  ------------------
   40|  4.54M|        ss << std::fixed << std::setprecision(0) << v;
   41|  4.54M|    } else {
   42|       |        // See "What Every Computer Scientist Should Know About Floating-Point Arithmetic"
   43|       |        // Theorem 15
   44|       |        // https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
   45|   129k|        ss << std::setprecision(17);
   46|   129k|        ss << v;
   47|   129k|    }
   48|  4.67M|    return ss.str();
   49|  4.67M|}
_ZN7jsonnet8internal13jsonnet_parseEPNS0_9AllocatorERNSt3__14listINS0_5TokenENS3_9allocatorIS5_EEEE:
 1123|  16.8k|{
 1124|  16.8k|    Parser parser(tokens, alloc);
 1125|  16.8k|    AST *expr = parser.parse(MAX_PRECEDENCE);
 1126|  16.8k|    if (tokens.front().kind != Token::END_OF_FILE) {
  ------------------
  |  Branch (1126:9): [True: 258, False: 16.5k]
  ------------------
 1127|    258|        std::stringstream ss;
 1128|    258|        ss << "did not expect: " << tokens.front();
 1129|    258|        throw StaticError(tokens.front().location, ss.str());
 1130|    258|    }
 1131|       |
 1132|  16.5k|    return expr;
 1133|  16.8k|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16ParserC2ERNSt3__14listINS0_5TokenENS3_9allocatorIS5_EEEEPNS0_9AllocatorE:
  145|  16.8k|    Parser(Tokens &tokens, Allocator *alloc) : tokens(tokens), alloc(alloc) {}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser5parseEj:
  909|  46.2M|    {
  910|  46.2M|        AST *ast = maybeParseGreedy();
  911|       |        // There cannot be an operator after a greedy parse.
  912|  46.2M|        if (ast != nullptr) return ast;
  ------------------
  |  Branch (912:13): [True: 5.87M, False: 40.4M]
  ------------------
  913|       |
  914|       |        // If we get here, we could be parsing an infix construct.
  915|       |
  916|       |        // Allocate this on the heap to control stack growth.
  917|  40.4M|        std::unique_ptr<Token> begin_(new Token(peek()));
  918|  40.4M|        const Token &begin = *begin_;
  919|       |
  920|  40.4M|        AST *lhs = parseTerminalBracketsOrUnary();
  921|       |
  922|  40.4M|        return parseInfix(lhs, begin, max_precedence);
  923|  46.2M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser16maybeParseGreedyEv:
  749|  46.2M|    {
  750|       |        // Allocate this on the heap to control stack growth.
  751|  46.2M|        std::unique_ptr<Token> begin_(new Token(peek()));
  752|  46.2M|        const Token &begin = *begin_;
  753|       |
  754|  46.2M|        switch (begin.kind) {
  755|       |            // These cases have effectively MAX_PRECEDENCE as the first
  756|       |            // call to parse will parse them.
  757|   351k|            case Token::ASSERT: {
  ------------------
  |  Branch (757:13): [True: 351k, False: 45.9M]
  ------------------
  758|   351k|                pop();
  759|   351k|                AST *cond = parse(MAX_PRECEDENCE);
  760|   351k|                Fodder colonFodder;
  761|   351k|                AST *msg = nullptr;
  762|   351k|                if (peek().kind == Token::OPERATOR && peek().data == ":") {
  ------------------
  |  Branch (762:21): [True: 324k, False: 26.5k]
  |  Branch (762:55): [True: 324k, False: 1]
  ------------------
  763|   324k|                    Token colon = pop();
  764|   324k|                    colonFodder = colon.fodder;
  765|   324k|                    msg = parse(MAX_PRECEDENCE);
  766|   324k|                }
  767|   351k|                Token semicolon = popExpect(Token::SEMICOLON);
  768|   351k|                AST *rest = parse(MAX_PRECEDENCE);
  769|   351k|                return alloc->make<Assert>(span(begin, rest),
  770|   351k|                                           begin.fodder,
  771|   351k|                                           cond,
  772|   351k|                                           colonFodder,
  773|   351k|                                           msg,
  774|   351k|                                           semicolon.fodder,
  775|   351k|                                           rest);
  776|      0|            }
  777|       |
  778|   544k|            case Token::ERROR: {
  ------------------
  |  Branch (778:13): [True: 544k, False: 45.7M]
  ------------------
  779|   544k|                pop();
  780|   544k|                AST *expr = parse(MAX_PRECEDENCE);
  781|   544k|                return alloc->make<Error>(span(begin, expr), begin.fodder, expr);
  782|      0|            }
  783|       |
  784|  2.74M|            case Token::IF: {
  ------------------
  |  Branch (784:13): [True: 2.74M, False: 43.5M]
  ------------------
  785|  2.74M|                pop();
  786|  2.74M|                AST *cond = parse(MAX_PRECEDENCE);
  787|  2.74M|                Token then = popExpect(Token::THEN);
  788|  2.74M|                AST *branch_true = parse(MAX_PRECEDENCE);
  789|  2.74M|                if (peek().kind == Token::ELSE) {
  ------------------
  |  Branch (789:21): [True: 2.71M, False: 34.6k]
  ------------------
  790|  2.71M|                    Token else_ = pop();
  791|  2.71M|                    AST *branch_false = parse(MAX_PRECEDENCE);
  792|  2.71M|                    return alloc->make<Conditional>(span(begin, branch_false),
  793|  2.71M|                                                    begin.fodder,
  794|  2.71M|                                                    cond,
  795|  2.71M|                                                    then.fodder,
  796|  2.71M|                                                    branch_true,
  797|  2.71M|                                                    else_.fodder,
  798|  2.71M|                                                    branch_false);
  799|  2.71M|                }
  800|  34.6k|                return alloc->make<Conditional>(span(begin, branch_true),
  801|  34.6k|                                                begin.fodder,
  802|  34.6k|                                                cond,
  803|  34.6k|                                                then.fodder,
  804|  34.6k|                                                branch_true,
  805|  34.6k|                                                Fodder{},
  806|  34.6k|                                                nullptr);
  807|  2.74M|            }
  808|       |
  809|   180k|            case Token::FUNCTION: {
  ------------------
  |  Branch (809:13): [True: 180k, False: 46.1M]
  ------------------
  810|   180k|                pop();  // Still available in 'begin'.
  811|   180k|                Token paren_l = pop();
  812|   180k|                if (paren_l.kind == Token::PAREN_L) {
  ------------------
  |  Branch (812:21): [True: 180k, False: 8]
  ------------------
  813|   180k|                    std::vector<AST *> params_asts;
  814|   180k|                    bool got_comma;
  815|   180k|                    Fodder paren_r_fodder;
  816|   180k|                    ArgParams params = parseParams("function parameter", got_comma, paren_r_fodder);
  817|   180k|                    AST *body = parse(MAX_PRECEDENCE);
  818|   180k|                    return alloc->make<Function>(span(begin, body),
  819|   180k|                                                 begin.fodder,
  820|   180k|                                                 paren_l.fodder,
  821|   180k|                                                 params,
  822|   180k|                                                 got_comma,
  823|   180k|                                                 paren_r_fodder,
  824|   180k|                                                 body);
  825|   180k|                } else {
  826|      8|                    std::stringstream ss;
  827|      8|                    ss << "expected ( but got " << paren_l;
  828|      8|                    throw StaticError(paren_l.location, ss.str());
  829|      8|                }
  830|   180k|            }
  831|       |
  832|    513|            case Token::IMPORT: {
  ------------------
  |  Branch (832:13): [True: 513, False: 46.2M]
  ------------------
  833|    513|                pop();
  834|    513|                AST *body = parse(MAX_PRECEDENCE);
  835|    513|                if (body->type == AST_LITERAL_STRING) {
  ------------------
  |  Branch (835:21): [True: 296, False: 217]
  ------------------
  836|    296|                    auto *lit = static_cast<LiteralString *>(body);
  837|    296|                    if (lit->tokenKind == LiteralString::BLOCK) {
  ------------------
  |  Branch (837:25): [True: 1, False: 295]
  ------------------
  838|      1|                        throw StaticError(lit->location,
  839|      1|                                          "Cannot use text blocks in import statements.");
  840|      1|                    }
  841|    295|                    return alloc->make<Import>(span(begin, body), begin.fodder, lit);
  842|    296|                } else {
  843|    217|                    std::stringstream ss;
  844|    217|                    ss << "computed imports are not allowed.";
  845|    217|                    throw StaticError(body->location, ss.str());
  846|    217|                }
  847|    513|            }
  848|       |
  849|    600|            case Token::IMPORTSTR: {
  ------------------
  |  Branch (849:13): [True: 600, False: 46.2M]
  ------------------
  850|    600|                pop();
  851|    600|                AST *body = parse(MAX_PRECEDENCE);
  852|    600|                if (body->type == AST_LITERAL_STRING) {
  ------------------
  |  Branch (852:21): [True: 521, False: 79]
  ------------------
  853|    521|                    auto *lit = static_cast<LiteralString *>(body);
  854|    521|                    if (lit->tokenKind == LiteralString::BLOCK) {
  ------------------
  |  Branch (854:25): [True: 1, False: 520]
  ------------------
  855|      1|                        throw StaticError(lit->location,
  856|      1|                                          "Cannot use text blocks in import statements.");
  857|      1|                    }
  858|    520|                    return alloc->make<Importstr>(span(begin, body), begin.fodder, lit);
  859|    521|                } else {
  860|     79|                    std::stringstream ss;
  861|     79|                    ss << "computed imports are not allowed.";
  862|     79|                    throw StaticError(body->location, ss.str());
  863|     79|                }
  864|    600|            }
  865|       |
  866|    726|            case Token::IMPORTBIN: {
  ------------------
  |  Branch (866:13): [True: 726, False: 46.2M]
  ------------------
  867|    726|                pop();
  868|    726|                AST *body = parse(MAX_PRECEDENCE);
  869|    726|                if (body->type == AST_LITERAL_STRING) {
  ------------------
  |  Branch (869:21): [True: 687, False: 39]
  ------------------
  870|    687|                    auto *lit = static_cast<LiteralString *>(body);
  871|    687|                    if (lit->tokenKind == LiteralString::BLOCK) {
  ------------------
  |  Branch (871:25): [True: 0, False: 687]
  ------------------
  872|      0|                        throw StaticError(lit->location,
  873|      0|                                          "Cannot use text blocks in import statements.");
  874|      0|                    }
  875|    687|                    return alloc->make<Importbin>(span(begin, body), begin.fodder, lit);
  876|    687|                } else {
  877|     39|                    std::stringstream ss;
  878|     39|                    ss << "computed imports are not allowed.";
  879|     39|                    throw StaticError(body->location, ss.str());
  880|     39|                }
  881|    726|            }
  882|       |
  883|  2.05M|            case Token::LOCAL: {
  ------------------
  |  Branch (883:13): [True: 2.05M, False: 44.2M]
  ------------------
  884|  2.05M|                pop();
  885|  2.05M|                Local::Binds binds;
  886|  2.16M|                do {
  887|  2.16M|                    Token delim = parseBind(binds);
  888|  2.16M|                    if (delim.kind != Token::SEMICOLON && delim.kind != Token::COMMA) {
  ------------------
  |  Branch (888:25): [True: 111k, False: 2.05M]
  |  Branch (888:59): [True: 25, False: 111k]
  ------------------
  889|     25|                        std::stringstream ss;
  890|     25|                        ss << "expected , or ; but got " << delim;
  891|     25|                        throw StaticError(delim.location, ss.str());
  892|     25|                    }
  893|  2.16M|                    if (delim.kind == Token::SEMICOLON)
  ------------------
  |  Branch (893:25): [True: 2.05M, False: 111k]
  ------------------
  894|  2.05M|                        break;
  895|  2.16M|                } while (true);
  ------------------
  |  Branch (895:26): [Folded - Ignored]
  ------------------
  896|  2.05M|                AST *body = parse(MAX_PRECEDENCE);
  897|  2.05M|                return alloc->make<Local>(span(begin, body), begin.fodder, binds, body);
  898|  2.05M|            }
  899|       |
  900|  40.4M|            default:
  ------------------
  |  Branch (900:13): [True: 40.4M, False: 5.87M]
  ------------------
  901|  40.4M|            return nullptr;
  902|  46.2M|        }
  903|  46.2M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser3popEv:
  101|   119M|    {
  102|   119M|        Token tok = peek();
  103|   119M|        tokens.pop_front();
  104|   119M|        return tok;
  105|   119M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser9popExpectENS0_5Token4KindEPKc:
  126|  18.2M|    {
  127|  18.2M|        Token tok = pop();
  128|  18.2M|        if (tok.kind != k) {
  ------------------
  |  Branch (128:13): [True: 314, False: 18.2M]
  ------------------
  129|    314|            std::stringstream ss;
  130|    314|            ss << "expected token " << k << " but got " << tok;
  131|    314|            throw StaticError(tok.location, ss.str());
  132|    314|        }
  133|  18.2M|        if (data != nullptr && tok.data != data) {
  ------------------
  |  Branch (133:13): [True: 2.22M, False: 16.0M]
  |  Branch (133:32): [True: 9, False: 2.22M]
  ------------------
  134|      9|            std::stringstream ss;
  135|      9|            ss << "expected operator " << data << " but got " << tok.data;
  136|      9|            throw StaticError(tok.location, ss.str());
  137|      9|        }
  138|  18.2M|        return tok;
  139|  18.2M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14spanERKNS0_5TokenEPNS0_3ASTE:
   84|  13.8M|{
   85|  13.8M|    return LocationRange(begin.location.file, begin.location.begin, end->location.end);
   86|  13.8M|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser11parseParamsERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERbRNS3_6vectorINS0_13FodderElementENS7_ISE_EEEE:
  199|  1.87M|    {
  200|  1.87M|        ArgParams params;
  201|  1.87M|        Token paren_r = parseArgs(params, element_kind, got_comma);
  202|       |
  203|       |        // Check they're all identifiers
  204|       |        // parseArgs returns f(x) with x as an expression.  Convert it here.
  205|  3.69M|        for (auto &p : params) {
  ------------------
  |  Branch (205:22): [True: 3.69M, False: 1.87M]
  ------------------
  206|  3.69M|            if (p.id == nullptr) {
  ------------------
  |  Branch (206:17): [True: 3.50M, False: 185k]
  ------------------
  207|  3.50M|                if (p.expr->type != AST_VAR) {
  ------------------
  |  Branch (207:21): [True: 5, False: 3.50M]
  ------------------
  208|      5|                    throw StaticError(p.expr->location, "could not parse parameter here.");
  209|      5|                }
  210|  3.50M|                auto *pv = static_cast<Var *>(p.expr);
  211|  3.50M|                p.id = pv->id;
  212|  3.50M|                p.idFodder = pv->openFodder;
  213|  3.50M|                p.expr = nullptr;
  214|  3.50M|            }
  215|  3.69M|        }
  216|       |
  217|  1.87M|        close_fodder = paren_r.fodder;
  218|       |
  219|  1.87M|        return params;
  220|  1.87M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser9parseArgsERNSt3__16vectorINS0_8ArgParamENS3_9allocatorIS5_EEEERKNS3_12basic_stringIcNS3_11char_traitsIcEENS6_IcEEEERb:
  156|  8.75M|    {
  157|  8.75M|        got_comma = false;
  158|  8.75M|        bool first = true;
  159|  24.5M|        do {
  160|  24.5M|            Token next = peek();
  161|  24.5M|            if (next.kind == Token::PAREN_R) {
  ------------------
  |  Branch (161:17): [True: 8.75M, False: 15.7M]
  ------------------
  162|       |                // got_comma can be true or false here.
  163|  8.75M|                return pop();
  164|  8.75M|            }
  165|  15.7M|            if (!first && !got_comma) {
  ------------------
  |  Branch (165:17): [True: 7.03M, False: 8.75M]
  |  Branch (165:27): [True: 148, False: 7.03M]
  ------------------
  166|    148|                std::stringstream ss;
  167|    148|                ss << "expected a comma before next " << element_kind << ".";
  168|    148|                throw StaticError(next.location, ss.str());
  169|    148|            }
  170|       |            // Either id=expr or id or expr, but note that expr could be id==1 so this needs
  171|       |            // look-ahead.
  172|  15.7M|            Fodder id_fodder;
  173|  15.7M|            const Identifier *id = nullptr;
  174|  15.7M|            Fodder eq_fodder;
  175|  15.7M|            if (peek().kind == Token::IDENTIFIER) {
  ------------------
  |  Branch (175:17): [True: 13.1M, False: 2.67M]
  ------------------
  176|  13.1M|                Token maybe_eq = doublePeek();
  177|  13.1M|                if (maybe_eq.kind == Token::OPERATOR && maybe_eq.data == "=") {
  ------------------
  |  Branch (177:21): [True: 1.36M, False: 11.7M]
  |  Branch (177:57): [True: 212k, False: 1.15M]
  ------------------
  178|   212k|                    id_fodder = peek().fodder;
  179|   212k|                    id = alloc->makeIdentifier(peek().data32());
  180|   212k|                    eq_fodder = maybe_eq.fodder;
  181|   212k|                    pop();  // id
  182|   212k|                    pop();  // eq
  183|   212k|                }
  184|  13.1M|            }
  185|  15.7M|            AST *expr = parse(MAX_PRECEDENCE);
  186|  15.7M|            got_comma = false;
  187|  15.7M|            first = false;
  188|  15.7M|            Fodder comma_fodder;
  189|  15.7M|            if (peek().kind == Token::COMMA) {
  ------------------
  |  Branch (189:17): [True: 7.03M, False: 8.75M]
  ------------------
  190|  7.03M|                Token comma = pop();
  191|  7.03M|                comma_fodder = comma.fodder;
  192|  7.03M|                got_comma = true;
  193|  7.03M|            }
  194|  15.7M|            args.emplace_back(id_fodder, id, eq_fodder, expr, comma_fodder);
  195|  15.7M|        } while (true);
  ------------------
  |  Branch (195:18): [Folded - Ignored]
  ------------------
  196|  8.75M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser10doublePeekEv:
  119|  13.1M|    {
  120|  13.1M|        Tokens::iterator it = tokens.begin();  // First one.
  121|  13.1M|        it++;                                  // Now pointing at the second one.
  122|  13.1M|        return *(it);
  123|  13.1M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser9parseBindERNSt3__16vectorINS0_5Local4BindENS3_9allocatorIS6_EEEE:
  223|  2.16M|    {
  224|  2.16M|        Token var_id = popExpect(Token::IDENTIFIER);
  225|  2.16M|        auto *id = alloc->makeIdentifier(var_id.data32());
  226|  2.16M|        for (const auto &bind : binds) {
  ------------------
  |  Branch (226:31): [True: 299k, False: 2.16M]
  ------------------
  227|   299k|            if (bind.var == id)
  ------------------
  |  Branch (227:17): [True: 4, False: 299k]
  ------------------
  228|      4|                throw StaticError(var_id.location, "duplicate local var: " + var_id.data);
  229|   299k|        }
  230|  2.16M|        bool is_function = false;
  231|  2.16M|        ArgParams params;
  232|  2.16M|        bool trailing_comma = false;
  233|  2.16M|        Fodder fodder_l, fodder_r;
  234|  2.16M|        if (peek().kind == Token::PAREN_L) {
  ------------------
  |  Branch (234:13): [True: 649k, False: 1.51M]
  ------------------
  235|   649k|            Token paren_l = pop();
  236|   649k|            fodder_l = paren_l.fodder;
  237|   649k|            params = parseParams("function parameter", trailing_comma, fodder_r);
  238|   649k|            is_function = true;
  239|   649k|        }
  240|  2.16M|        Token eq = popExpect(Token::OPERATOR, "=");
  241|  2.16M|        AST *body = parse(MAX_PRECEDENCE);
  242|  2.16M|        Token delim = pop();
  243|  2.16M|        binds.emplace_back(var_id.fodder,
  244|  2.16M|                           id,
  245|  2.16M|                           eq.fodder,
  246|  2.16M|                           body,
  247|  2.16M|                           is_function,
  248|  2.16M|                           fodder_l,
  249|  2.16M|                           params,
  250|  2.16M|                           trailing_comma,
  251|  2.16M|                           fodder_r,
  252|  2.16M|                           delim.fodder);
  253|  2.16M|        return delim;
  254|  2.16M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser4peekEv:
  113|   382M|    {
  114|   382M|        return tokens.front();
  115|   382M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser28parseTerminalBracketsOrUnaryEv:
  573|  40.4M|    {
  574|  40.4M|        Token tok = pop();
  575|  40.4M|        switch (tok.kind) {
  ------------------
  |  Branch (575:17): [True: 0, False: 40.4M]
  ------------------
  576|      0|            case Token::ASSERT:
  ------------------
  |  Branch (576:13): [True: 0, False: 40.4M]
  ------------------
  577|     15|            case Token::BRACE_R:
  ------------------
  |  Branch (577:13): [True: 15, False: 40.4M]
  ------------------
  578|     24|            case Token::BRACKET_R:
  ------------------
  |  Branch (578:13): [True: 9, False: 40.4M]
  ------------------
  579|     59|            case Token::COMMA:
  ------------------
  |  Branch (579:13): [True: 35, False: 40.4M]
  ------------------
  580|     74|            case Token::DOT:
  ------------------
  |  Branch (580:13): [True: 15, False: 40.4M]
  ------------------
  581|     75|            case Token::ELSE:
  ------------------
  |  Branch (581:13): [True: 1, False: 40.4M]
  ------------------
  582|     75|            case Token::ERROR:
  ------------------
  |  Branch (582:13): [True: 0, False: 40.4M]
  ------------------
  583|     77|            case Token::FOR:
  ------------------
  |  Branch (583:13): [True: 2, False: 40.4M]
  ------------------
  584|     77|            case Token::FUNCTION:
  ------------------
  |  Branch (584:13): [True: 0, False: 40.4M]
  ------------------
  585|     77|            case Token::IF:
  ------------------
  |  Branch (585:13): [True: 0, False: 40.4M]
  ------------------
  586|     80|            case Token::IN:
  ------------------
  |  Branch (586:13): [True: 3, False: 40.4M]
  ------------------
  587|     80|            case Token::IMPORT:
  ------------------
  |  Branch (587:13): [True: 0, False: 40.4M]
  ------------------
  588|     80|            case Token::IMPORTSTR:
  ------------------
  |  Branch (588:13): [True: 0, False: 40.4M]
  ------------------
  589|     80|            case Token::IMPORTBIN:
  ------------------
  |  Branch (589:13): [True: 0, False: 40.4M]
  ------------------
  590|     80|            case Token::LOCAL:
  ------------------
  |  Branch (590:13): [True: 0, False: 40.4M]
  ------------------
  591|     97|            case Token::PAREN_R:
  ------------------
  |  Branch (591:13): [True: 17, False: 40.4M]
  ------------------
  592|    103|            case Token::SEMICOLON:
  ------------------
  |  Branch (592:13): [True: 6, False: 40.4M]
  ------------------
  593|    105|            case Token::TAILSTRICT:
  ------------------
  |  Branch (593:13): [True: 2, False: 40.4M]
  ------------------
  594|    106|            case Token::THEN: throw unexpected(tok, "parsing terminal");
  ------------------
  |  Branch (594:13): [True: 1, False: 40.4M]
  ------------------
  595|       |
  596|    762|            case Token::END_OF_FILE: throw StaticError(tok.location, "unexpected end of file.");
  ------------------
  |  Branch (596:13): [True: 762, False: 40.4M]
  ------------------
  597|       |
  598|   513k|            case Token::OPERATOR: {
  ------------------
  |  Branch (598:13): [True: 513k, False: 39.9M]
  ------------------
  599|   513k|                UnaryOp uop;
  600|   513k|                if (!op_is_unary(tok.data, uop)) {
  ------------------
  |  Branch (600:21): [True: 251, False: 513k]
  ------------------
  601|    251|                    std::stringstream ss;
  602|    251|                    ss << "not a unary operator: " << tok.data;
  603|    251|                    throw StaticError(tok.location, ss.str());
  604|    251|                }
  605|   513k|                AST *expr = parse(UNARY_PRECEDENCE);
  606|   513k|                return alloc->make<Unary>(span(tok, expr), tok.fodder, uop, expr);
  607|   513k|            }
  608|   464k|            case Token::BRACE_L: {
  ------------------
  |  Branch (608:13): [True: 464k, False: 39.9M]
  ------------------
  609|   464k|                AST *obj;
  610|   464k|                parseObjectRemainder(obj, tok);
  611|   464k|                return obj;
  612|   513k|            }
  613|       |
  614|  1.17M|            case Token::BRACKET_L: {
  ------------------
  |  Branch (614:13): [True: 1.17M, False: 39.2M]
  ------------------
  615|  1.17M|                Token next = peek();
  616|  1.17M|                if (next.kind == Token::BRACKET_R) {
  ------------------
  |  Branch (616:21): [True: 188k, False: 981k]
  ------------------
  617|   188k|                    Token bracket_r = pop();
  618|   188k|                    return alloc->make<Array>(
  619|   188k|                        span(tok, next), tok.fodder, Array::Elements{}, false, bracket_r.fodder);
  620|   188k|                }
  621|   981k|                AST *first = parse(MAX_PRECEDENCE);
  622|   981k|                bool got_comma = false;
  623|   981k|                Fodder comma_fodder;
  624|   981k|                next = peek();
  625|   981k|                if (!got_comma && next.kind == Token::COMMA) {
  ------------------
  |  Branch (625:21): [True: 978k, False: 2.46k]
  |  Branch (625:35): [True: 135k, False: 842k]
  ------------------
  626|   135k|                    Token comma = pop();
  627|   135k|                    comma_fodder = comma.fodder;
  628|   135k|                    next = peek();
  629|   135k|                    got_comma = true;
  630|   135k|                }
  631|       |
  632|   981k|                if (next.kind == Token::FOR) {
  ------------------
  |  Branch (632:21): [True: 283k, False: 697k]
  ------------------
  633|       |                    // It's a comprehension
  634|   283k|                    Token for_token = pop();
  635|   283k|                    std::vector<ComprehensionSpec> specs;
  636|   283k|                    Token last = parseComprehensionSpecs(Token::BRACKET_R, for_token.fodder, specs);
  637|   283k|                    return alloc->make<ArrayComprehension>(span(tok, last),
  638|   283k|                                                           tok.fodder,
  639|   283k|                                                           first,
  640|   283k|                                                           comma_fodder,
  641|   283k|                                                           got_comma,
  642|   283k|                                                           specs,
  643|   283k|                                                           last.fodder);
  644|   283k|                }
  645|       |
  646|       |                // Not a comprehension: It can have more elements.
  647|   697k|                Array::Elements elements;
  648|   697k|                elements.emplace_back(first, comma_fodder);
  649|  3.30M|                do {
  650|  3.30M|                    if (next.kind == Token::BRACKET_R) {
  ------------------
  |  Branch (650:25): [True: 694k, False: 2.60M]
  ------------------
  651|   694k|                        Token bracket_r = pop();
  652|   694k|                        return alloc->make<Array>(
  653|   694k|                            span(tok, next), tok.fodder, elements, got_comma, bracket_r.fodder);
  654|   694k|                    }
  655|  2.60M|                    if (!got_comma) {
  ------------------
  |  Branch (655:25): [True: 275, False: 2.60M]
  ------------------
  656|    275|                        std::stringstream ss;
  657|    275|                        ss << "expected a comma before next array element.";
  658|    275|                        throw StaticError(next.location, ss.str());
  659|    275|                    }
  660|  2.60M|                    AST *expr = parse(MAX_PRECEDENCE);
  661|  2.60M|                    comma_fodder.clear();
  662|  2.60M|                    got_comma = false;
  663|  2.60M|                    next = peek();
  664|  2.60M|                    if (next.kind == Token::COMMA) {
  ------------------
  |  Branch (664:25): [True: 2.49M, False: 118k]
  ------------------
  665|  2.49M|                        Token comma = pop();
  666|  2.49M|                        comma_fodder = comma.fodder;
  667|  2.49M|                        next = peek();
  668|  2.49M|                        got_comma = true;
  669|  2.49M|                    }
  670|  2.60M|                    elements.emplace_back(expr, comma_fodder);
  671|  2.60M|                } while (true);
  ------------------
  |  Branch (671:26): [Folded - Ignored]
  ------------------
  672|   697k|            }
  673|       |
  674|   415k|            case Token::PAREN_L: {
  ------------------
  |  Branch (674:13): [True: 412k, False: 40.0M]
  ------------------
  675|   415k|                auto *inner = parse(MAX_PRECEDENCE);
  676|   415k|                Token close = popExpect(Token::PAREN_R);
  677|   415k|                return alloc->make<Parens>(span(tok, close), tok.fodder, inner, close.fodder);
  678|   697k|            }
  679|       |
  680|       |            // Literals
  681|  6.09M|            case Token::NUMBER: return alloc->make<LiteralNumber>(span(tok), tok.fodder, tok.data);
  ------------------
  |  Branch (681:13): [True: 6.09M, False: 34.3M]
  ------------------
  682|       |
  683|  4.15M|            case Token::STRING_SINGLE:
  ------------------
  |  Branch (683:13): [True: 4.15M, False: 36.2M]
  ------------------
  684|  4.15M|                return alloc->make<LiteralString>(
  685|  4.15M|                    span(tok), tok.fodder, tok.data32(), LiteralString::SINGLE, "", "");
  686|  55.5k|            case Token::STRING_DOUBLE:
  ------------------
  |  Branch (686:13): [True: 55.5k, False: 40.3M]
  ------------------
  687|  55.5k|                return alloc->make<LiteralString>(
  688|  55.5k|                    span(tok), tok.fodder, tok.data32(), LiteralString::DOUBLE, "", "");
  689|  1.07k|            case Token::STRING_BLOCK:
  ------------------
  |  Branch (689:13): [True: 1.07k, False: 40.4M]
  ------------------
  690|  1.07k|                return alloc->make<LiteralString>(span(tok),
  691|  1.07k|                                                  tok.fodder,
  692|  1.07k|                                                  tok.data32(),
  693|  1.07k|                                                  LiteralString::BLOCK,
  694|  1.07k|                                                  tok.stringBlockIndent,
  695|  1.07k|                                                  tok.stringBlockTermIndent);
  696|  4.26k|            case Token::VERBATIM_STRING_SINGLE:
  ------------------
  |  Branch (696:13): [True: 4.26k, False: 40.4M]
  ------------------
  697|  4.26k|                return alloc->make<LiteralString>(
  698|  4.26k|                    span(tok), tok.fodder, tok.data32(), LiteralString::VERBATIM_SINGLE, "", "");
  699|  1.37k|            case Token::VERBATIM_STRING_DOUBLE:
  ------------------
  |  Branch (699:13): [True: 1.37k, False: 40.4M]
  ------------------
  700|  1.37k|                return alloc->make<LiteralString>(
  701|  1.37k|                    span(tok), tok.fodder, tok.data32(), LiteralString::VERBATIM_DOUBLE, "", "");
  702|       |
  703|   418k|            case Token::FALSE: return alloc->make<LiteralBoolean>(span(tok), tok.fodder, false);
  ------------------
  |  Branch (703:13): [True: 418k, False: 40.0M]
  ------------------
  704|       |
  705|   307k|            case Token::TRUE: return alloc->make<LiteralBoolean>(span(tok), tok.fodder, true);
  ------------------
  |  Branch (705:13): [True: 307k, False: 40.1M]
  ------------------
  706|       |
  707|   145k|            case Token::NULL_LIT: return alloc->make<LiteralNull>(span(tok), tok.fodder);
  ------------------
  |  Branch (707:13): [True: 145k, False: 40.2M]
  ------------------
  708|       |
  709|       |            // Variables
  710|  45.3k|            case Token::DOLLAR: return alloc->make<Dollar>(span(tok), tok.fodder);
  ------------------
  |  Branch (710:13): [True: 45.3k, False: 40.3M]
  ------------------
  711|       |
  712|  26.5M|            case Token::IDENTIFIER:
  ------------------
  |  Branch (712:13): [True: 26.5M, False: 13.8M]
  ------------------
  713|  26.5M|                return alloc->make<Var>(span(tok), tok.fodder, alloc->makeIdentifier(tok.data32()));
  714|       |
  715|  38.0k|            case Token::SELF: return alloc->make<Self>(span(tok), tok.fodder);
  ------------------
  |  Branch (715:13): [True: 38.0k, False: 40.3M]
  ------------------
  716|       |
  717|  2.43k|            case Token::SUPER: {
  ------------------
  |  Branch (717:13): [True: 2.43k, False: 40.4M]
  ------------------
  718|  2.43k|                Token next = pop();
  719|  2.43k|                AST *index = nullptr;
  720|  2.43k|                const Identifier *id = nullptr;
  721|  2.43k|                Fodder id_fodder;
  722|  2.43k|                switch (next.kind) {
  723|  1.41k|                    case Token::DOT: {
  ------------------
  |  Branch (723:21): [True: 1.41k, False: 1.02k]
  ------------------
  724|  1.41k|                        Token field_id = popExpect(Token::IDENTIFIER);
  725|  1.41k|                        id_fodder = field_id.fodder;
  726|  1.41k|                        id = alloc->makeIdentifier(field_id.data32());
  727|  1.41k|                    } break;
  728|  1.01k|                    case Token::BRACKET_L: {
  ------------------
  |  Branch (728:21): [True: 1.01k, False: 1.42k]
  ------------------
  729|  1.01k|                        index = parse(MAX_PRECEDENCE);
  730|  1.01k|                        Token bracket_r = popExpect(Token::BRACKET_R);
  731|  1.01k|                        id_fodder = bracket_r.fodder;  // Not id_fodder, but use the same var.
  732|  1.01k|                    } break;
  733|     12|                    default: throw StaticError(tok.location, "expected . or [ after super.");
  ------------------
  |  Branch (733:21): [True: 12, False: 2.42k]
  ------------------
  734|  2.43k|                }
  735|  2.22k|                return alloc->make<SuperIndex>(
  736|  2.22k|                    span(tok), tok.fodder, next.fodder, index, id_fodder, id);
  737|  2.43k|            }
  738|  40.4M|        }
  739|       |
  740|      0|        std::cerr << "INTERNAL ERROR: Unknown tok kind: " << tok.kind << std::endl;
  741|      0|        std::abort();
  742|      0|        return nullptr;  // Quiet, compiler.
  743|  40.4M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser10unexpectedERKNS0_5TokenERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
   94|    414|    {
   95|    414|        std::stringstream ss;
   96|    414|        ss << "unexpected: " << tok.kind << " while " << while_;
   97|    414|        return StaticError(tok.location, ss.str());
   98|    414|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111op_is_unaryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERNS0_7UnaryOpE:
   56|   513k|{
   57|   513k|    auto it = unary_map.find(op);
   58|   513k|    if (it == unary_map.end())
  ------------------
  |  Branch (58:9): [True: 251, False: 513k]
  ------------------
   59|    251|        return false;
   60|   513k|    uop = it->second;
   61|   513k|    return true;
   62|   513k|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser20parseObjectRemainderERPNS0_3ASTERKNS0_5TokenE:
  257|   555k|    {
  258|   555k|        ObjectFields fields;
  259|   555k|        std::set<std::string> literal_fields;  // For duplicate fields detection.
  260|   555k|        std::set<const Identifier *> binds;    // For duplicate locals detection.
  261|       |
  262|   555k|        bool got_comma = false;
  263|   555k|        bool first = true;
  264|   555k|        Token next = pop();
  265|       |
  266|  2.82M|        do {
  267|  2.82M|            if (next.kind == Token::BRACE_R) {
  ------------------
  |  Branch (267:17): [True: 505k, False: 2.32M]
  ------------------
  268|   505k|                obj = alloc->make<Object>(
  269|   505k|                    span(tok, next), tok.fodder, fields, got_comma, next.fodder);
  270|   505k|                return next;
  271|       |
  272|  2.32M|            } else if (next.kind == Token::FOR) {
  ------------------
  |  Branch (272:24): [True: 43.7k, False: 2.27M]
  ------------------
  273|       |                // It's a comprehension
  274|  43.7k|                unsigned num_fields = 0;
  275|  43.7k|                unsigned num_asserts = 0;
  276|  43.7k|                const ObjectField *field_ptr = nullptr;
  277|  43.9k|                for (const auto &field : fields) {
  ------------------
  |  Branch (277:40): [True: 43.9k, False: 43.7k]
  ------------------
  278|  43.9k|                    if (field.kind == ObjectField::LOCAL)
  ------------------
  |  Branch (278:25): [True: 21, False: 43.9k]
  ------------------
  279|     21|                        continue;
  280|  43.9k|                    if (field.kind == ObjectField::ASSERT) {
  ------------------
  |  Branch (280:25): [True: 231, False: 43.6k]
  ------------------
  281|    231|                        num_asserts++;
  282|    231|                        continue;
  283|    231|                    }
  284|  43.6k|                    field_ptr = &field;
  285|  43.6k|                    num_fields++;
  286|  43.6k|                }
  287|  43.7k|                if (num_asserts > 0) {
  ------------------
  |  Branch (287:21): [True: 13, False: 43.7k]
  ------------------
  288|     13|                    auto msg = "object comprehension cannot have asserts.";
  289|     13|                    throw StaticError(next.location, msg);
  290|     13|                }
  291|  43.7k|                if (num_fields != 1) {
  ------------------
  |  Branch (291:21): [True: 10, False: 43.6k]
  ------------------
  292|     10|                    auto msg = "object comprehension can only have one field.";
  293|     10|                    throw StaticError(next.location, msg);
  294|     10|                }
  295|  43.6k|                const ObjectField &field = *field_ptr;
  296|       |
  297|  43.6k|                if (field.hide != ObjectField::INHERIT) {
  ------------------
  |  Branch (297:21): [True: 1, False: 43.6k]
  ------------------
  298|      1|                    auto msg = "object comprehensions cannot have hidden fields.";
  299|      1|                    throw StaticError(next.location, msg);
  300|      1|                }
  301|       |
  302|  43.6k|                if (field.kind != ObjectField::FIELD_EXPR) {
  ------------------
  |  Branch (302:21): [True: 1, False: 43.6k]
  ------------------
  303|      1|                    auto msg = "object comprehensions can only have [e] fields.";
  304|      1|                    throw StaticError(next.location, msg);
  305|      1|                }
  306|       |
  307|  43.6k|                std::vector<ComprehensionSpec> specs;
  308|  43.6k|                Token last = parseComprehensionSpecs(Token::BRACE_R, next.fodder, specs);
  309|  43.6k|                obj = alloc->make<ObjectComprehension>(
  310|  43.6k|                    span(tok, last), tok.fodder, fields, got_comma, specs, last.fodder);
  311|       |
  312|  43.6k|                return last;
  313|  43.6k|            }
  314|       |
  315|  2.27M|            if (!got_comma && !first)
  ------------------
  |  Branch (315:17): [True: 463k, False: 1.81M]
  |  Branch (315:31): [True: 181, False: 462k]
  ------------------
  316|    181|                throw StaticError(next.location, "expected a comma before next field.");
  317|       |
  318|  2.27M|            first = false;
  319|  2.27M|            got_comma = false;
  320|       |
  321|  2.27M|            switch (next.kind) {
  322|  48.0k|                case Token::BRACKET_L:
  ------------------
  |  Branch (322:17): [True: 48.0k, False: 2.22M]
  ------------------
  323|  1.96M|                case Token::IDENTIFIER:
  ------------------
  |  Branch (323:17): [True: 1.91M, False: 363k]
  ------------------
  324|  1.98M|                case Token::STRING_DOUBLE:
  ------------------
  |  Branch (324:17): [True: 25.6k, False: 2.25M]
  ------------------
  325|  2.02M|                case Token::STRING_SINGLE:
  ------------------
  |  Branch (325:17): [True: 34.8k, False: 2.24M]
  ------------------
  326|  2.02M|                case Token::STRING_BLOCK:
  ------------------
  |  Branch (326:17): [True: 2.11k, False: 2.27M]
  ------------------
  327|  2.02M|                case Token::VERBATIM_STRING_DOUBLE:
  ------------------
  |  Branch (327:17): [True: 307, False: 2.27M]
  ------------------
  328|  2.02M|                case Token::VERBATIM_STRING_SINGLE: {
  ------------------
  |  Branch (328:17): [True: 519, False: 2.27M]
  ------------------
  329|  2.02M|                    ObjectField::Kind kind;
  330|  2.02M|                    AST *expr1 = nullptr;
  331|  2.02M|                    const Identifier *id = nullptr;
  332|  2.02M|                    Fodder fodder1, fodder2;
  333|  2.02M|                    LocationRange idLocation;
  334|  2.02M|                    if (next.kind == Token::IDENTIFIER) {
  ------------------
  |  Branch (334:25): [True: 1.91M, False: 111k]
  ------------------
  335|  1.91M|                        fodder1 = next.fodder;
  336|  1.91M|                        kind = ObjectField::FIELD_ID;
  337|  1.91M|                        id = alloc->makeIdentifier(next.data32());
  338|  1.91M|                        idLocation = next.location;
  339|  1.91M|                    } else if (next.kind == Token::STRING_DOUBLE) {
  ------------------
  |  Branch (339:32): [True: 25.6k, False: 85.8k]
  ------------------
  340|  25.6k|                        kind = ObjectField::FIELD_STR;
  341|  25.6k|                        expr1 = alloc->make<LiteralString>(next.location,
  342|  25.6k|                                                           next.fodder,
  343|  25.6k|                                                           next.data32(),
  344|  25.6k|                                                           LiteralString::DOUBLE,
  345|  25.6k|                                                           "",
  346|  25.6k|                                                           "");
  347|  85.8k|                    } else if (next.kind == Token::STRING_SINGLE) {
  ------------------
  |  Branch (347:32): [True: 34.8k, False: 50.9k]
  ------------------
  348|  34.8k|                        kind = ObjectField::FIELD_STR;
  349|  34.8k|                        expr1 = alloc->make<LiteralString>(next.location,
  350|  34.8k|                                                           next.fodder,
  351|  34.8k|                                                           next.data32(),
  352|  34.8k|                                                           LiteralString::SINGLE,
  353|  34.8k|                                                           "",
  354|  34.8k|                                                           "");
  355|  50.9k|                    } else if (next.kind == Token::STRING_BLOCK) {
  ------------------
  |  Branch (355:32): [True: 2.11k, False: 48.8k]
  ------------------
  356|  2.11k|                        kind = ObjectField::FIELD_STR;
  357|  2.11k|                        expr1 = alloc->make<LiteralString>(next.location,
  358|  2.11k|                                                           next.fodder,
  359|  2.11k|                                                           next.data32(),
  360|  2.11k|                                                           LiteralString::BLOCK,
  361|  2.11k|                                                           next.stringBlockIndent,
  362|  2.11k|                                                           next.stringBlockTermIndent);
  363|  48.8k|                    } else if (next.kind == Token::VERBATIM_STRING_SINGLE) {
  ------------------
  |  Branch (363:32): [True: 519, False: 48.3k]
  ------------------
  364|    519|                        kind = ObjectField::FIELD_STR;
  365|    519|                        expr1 = alloc->make<LiteralString>(next.location,
  366|    519|                                                           next.fodder,
  367|    519|                                                           next.data32(),
  368|    519|                                                           LiteralString::VERBATIM_SINGLE,
  369|    519|                                                           "",
  370|    519|                                                           "");
  371|  48.3k|                    } else if (next.kind == Token::VERBATIM_STRING_DOUBLE) {
  ------------------
  |  Branch (371:32): [True: 307, False: 48.0k]
  ------------------
  372|    307|                        kind = ObjectField::FIELD_STR;
  373|    307|                        expr1 = alloc->make<LiteralString>(next.location,
  374|    307|                                                           next.fodder,
  375|    307|                                                           next.data32(),
  376|    307|                                                           LiteralString::VERBATIM_DOUBLE,
  377|    307|                                                           "",
  378|    307|                                                           "");
  379|  48.0k|                    } else {
  380|  48.0k|                        kind = ObjectField::FIELD_EXPR;
  381|  48.0k|                        fodder1 = next.fodder;
  382|  48.0k|                        expr1 = parse(MAX_PRECEDENCE);
  383|  48.0k|                        Token bracket_r = popExpect(Token::BRACKET_R);
  384|  48.0k|                        fodder2 = bracket_r.fodder;
  385|  48.0k|                    }
  386|       |
  387|  2.02M|                    bool is_method = false;
  388|  2.02M|                    bool meth_comma = false;
  389|  2.02M|                    ArgParams params;
  390|  2.02M|                    Fodder fodder_l;
  391|  2.02M|                    Fodder fodder_r;
  392|  2.02M|                    if (peek().kind == Token::PAREN_L) {
  ------------------
  |  Branch (392:25): [True: 1.03M, False: 990k]
  ------------------
  393|  1.03M|                        Token paren_l = pop();
  394|  1.03M|                        fodder_l = paren_l.fodder;
  395|  1.03M|                        params = parseParams("method parameter", meth_comma, fodder_r);
  396|  1.03M|                        is_method = true;
  397|  1.03M|                    }
  398|       |
  399|  2.02M|                    bool plus_sugar = false;
  400|       |
  401|  2.02M|                    Token op = popExpect(Token::OPERATOR);
  402|  2.02M|                    const char *od = op.data.c_str();
  403|  2.02M|                    if (*od == '+') {
  ------------------
  |  Branch (403:25): [True: 31.0k, False: 1.99M]
  ------------------
  404|  31.0k|                        plus_sugar = true;
  405|  31.0k|                        od++;
  406|  31.0k|                    }
  407|  2.02M|                    unsigned colons = 0;
  408|  5.07M|                    for (; *od != '\0'; ++od) {
  ------------------
  |  Branch (408:28): [True: 3.04M, False: 2.02M]
  ------------------
  409|  3.04M|                        if (*od != ':') {
  ------------------
  |  Branch (409:29): [True: 27, False: 3.04M]
  ------------------
  410|     27|                            throw StaticError(
  411|     27|                                next.location,
  412|     27|                                "expected one of :, ::, :::, +:, +::, +:::, got: " + op.data);
  413|     27|                        }
  414|  3.04M|                        ++colons;
  415|  3.04M|                    }
  416|  2.02M|                    ObjectField::Hide field_hide;
  417|  2.02M|                    switch (colons) {
  418|   997k|                        case 1: field_hide = ObjectField::INHERIT; break;
  ------------------
  |  Branch (418:25): [True: 997k, False: 1.02M]
  ------------------
  419|       |
  420|  1.02M|                        case 2: field_hide = ObjectField::HIDDEN; break;
  ------------------
  |  Branch (420:25): [True: 1.02M, False: 1.00M]
  ------------------
  421|       |
  422|     38|                        case 3: field_hide = ObjectField::VISIBLE; break;
  ------------------
  |  Branch (422:25): [True: 38, False: 2.02M]
  ------------------
  423|       |
  424|     18|                        default:
  ------------------
  |  Branch (424:25): [True: 18, False: 2.02M]
  ------------------
  425|     18|                            throw StaticError(
  426|     18|                                next.location,
  427|     18|                                "expected one of :, ::, :::, +:, +::, +:::, got: " + op.data);
  428|  2.02M|                    }
  429|       |
  430|       |                    // Basic checks for invalid Jsonnet code.
  431|  2.02M|                    if (is_method && plus_sugar) {
  ------------------
  |  Branch (431:25): [True: 1.03M, False: 989k]
  |  Branch (431:38): [True: 1, False: 1.03M]
  ------------------
  432|      1|                        throw StaticError(next.location,
  433|      1|                                          "cannot use +: syntax sugar in a method: " + next.data);
  434|      1|                    }
  435|  2.02M|                    if (kind != ObjectField::FIELD_EXPR) {
  ------------------
  |  Branch (435:25): [True: 1.97M, False: 46.8k]
  ------------------
  436|  1.97M|                        if (!literal_fields.insert(next.data).second) {
  ------------------
  |  Branch (436:29): [True: 11, False: 1.97M]
  ------------------
  437|     11|                            throw StaticError(next.location, "duplicate field: " + next.data);
  438|     11|                        }
  439|  1.97M|                    }
  440|       |
  441|  2.02M|                    AST *body = parse(MAX_PRECEDENCE);
  442|       |
  443|  2.02M|                    Fodder comma_fodder;
  444|  2.02M|                    next = pop();
  445|  2.02M|                    if (next.kind == Token::COMMA) {
  ------------------
  |  Branch (445:25): [True: 1.70M, False: 319k]
  ------------------
  446|  1.70M|                        comma_fodder = next.fodder;
  447|  1.70M|                        next = pop();
  448|  1.70M|                        got_comma = true;
  449|  1.70M|                    }
  450|  2.02M|                    fields.emplace_back(kind,
  451|  2.02M|                                        fodder1,
  452|  2.02M|                                        fodder2,
  453|  2.02M|                                        fodder_l,
  454|  2.02M|                                        fodder_r,
  455|  2.02M|                                        field_hide,
  456|  2.02M|                                        plus_sugar,
  457|  2.02M|                                        is_method,
  458|  2.02M|                                        expr1,
  459|  2.02M|                                        id,
  460|  2.02M|                                        idLocation,
  461|  2.02M|                                        params,
  462|  2.02M|                                        meth_comma,
  463|  2.02M|                                        op.fodder,
  464|  2.02M|                                        body,
  465|  2.02M|                                        nullptr,
  466|  2.02M|                                        comma_fodder);
  467|  2.02M|                } break;
  468|       |
  469|  60.2k|                case Token::LOCAL: {
  ------------------
  |  Branch (469:17): [True: 60.2k, False: 2.21M]
  ------------------
  470|  60.2k|                    Fodder local_fodder = next.fodder;
  471|  60.2k|                    Token var_id = popExpect(Token::IDENTIFIER);
  472|  60.2k|                    auto *id = alloc->makeIdentifier(var_id.data32());
  473|       |
  474|  60.2k|                    if (binds.find(id) != binds.end()) {
  ------------------
  |  Branch (474:25): [True: 1, False: 60.2k]
  ------------------
  475|      1|                        throw StaticError(var_id.location, "duplicate local var: " + var_id.data);
  476|      1|                    }
  477|  60.2k|                    bool is_method = false;
  478|  60.2k|                    bool func_comma = false;
  479|  60.2k|                    ArgParams params;
  480|  60.2k|                    Fodder paren_l_fodder;
  481|  60.2k|                    Fodder paren_r_fodder;
  482|  60.2k|                    if (peek().kind == Token::PAREN_L) {
  ------------------
  |  Branch (482:25): [True: 8.83k, False: 51.3k]
  ------------------
  483|  8.83k|                        Token paren_l = pop();
  484|  8.83k|                        paren_l_fodder = paren_l.fodder;
  485|  8.83k|                        is_method = true;
  486|  8.83k|                        params = parseParams("function parameter", func_comma, paren_r_fodder);
  487|  8.83k|                    }
  488|  60.2k|                    Token eq = popExpect(Token::OPERATOR, "=");
  489|  60.2k|                    AST *body = parse(MAX_PRECEDENCE);
  490|  60.2k|                    binds.insert(id);
  491|       |
  492|  60.2k|                    Fodder comma_fodder;
  493|  60.2k|                    next = pop();
  494|  60.2k|                    if (next.kind == Token::COMMA) {
  ------------------
  |  Branch (494:25): [True: 59.7k, False: 411]
  ------------------
  495|  59.7k|                        comma_fodder = next.fodder;
  496|  59.7k|                        next = pop();
  497|  59.7k|                        got_comma = true;
  498|  59.7k|                    }
  499|  60.2k|                    fields.push_back(ObjectField::Local(local_fodder,
  500|  60.2k|                                                        var_id.fodder,
  501|  60.2k|                                                        paren_l_fodder,
  502|  60.2k|                                                        paren_r_fodder,
  503|  60.2k|                                                        is_method,
  504|  60.2k|                                                        id,
  505|  60.2k|                                                        params,
  506|  60.2k|                                                        func_comma,
  507|  60.2k|                                                        eq.fodder,
  508|  60.2k|                                                        body,
  509|  60.2k|                                                        comma_fodder));
  510|       |
  511|  60.2k|                } break;
  512|       |
  513|   191k|                case Token::ASSERT: {
  ------------------
  |  Branch (513:17): [True: 191k, False: 2.08M]
  ------------------
  514|   191k|                    Fodder assert_fodder = next.fodder;
  515|   191k|                    AST *cond = parse(MAX_PRECEDENCE);
  516|   191k|                    AST *msg = nullptr;
  517|   191k|                    Fodder colon_fodder;
  518|   191k|                    if (peek().kind == Token::OPERATOR && peek().data == ":") {
  ------------------
  |  Branch (518:25): [True: 2.51k, False: 189k]
  |  Branch (518:59): [True: 2.51k, False: 1]
  ------------------
  519|  2.51k|                        Token colon = pop();
  520|  2.51k|                        colon_fodder = colon.fodder;
  521|  2.51k|                        msg = parse(MAX_PRECEDENCE);
  522|  2.51k|                    }
  523|       |
  524|   191k|                    Fodder comma_fodder;
  525|   191k|                    next = pop();
  526|   191k|                    if (next.kind == Token::COMMA) {
  ------------------
  |  Branch (526:25): [True: 188k, False: 3.43k]
  ------------------
  527|   188k|                        comma_fodder = next.fodder;
  528|   188k|                        next = pop();
  529|   188k|                        got_comma = true;
  530|   188k|                    }
  531|   191k|                    fields.push_back(
  532|   191k|                        ObjectField::Assert(assert_fodder, cond, colon_fodder, msg, comma_fodder));
  533|   191k|                } break;
  534|       |
  535|    118|                default: throw unexpected(next, "parsing field definition");
  ------------------
  |  Branch (535:17): [True: 118, False: 2.27M]
  ------------------
  536|  2.27M|            }
  537|       |
  538|  2.27M|        } while (true);
  ------------------
  |  Branch (538:18): [Folded - Ignored]
  ------------------
  539|   555k|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14spanERKNS0_5TokenES4_:
   79|  16.5M|{
   80|  16.5M|    return LocationRange(begin.location.file, begin.location.begin, end.location.end);
   81|  16.5M|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser23parseComprehensionSpecsENS0_5Token4KindENSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS0_17ComprehensionSpecENS8_ISB_EEEE:
  544|   327k|    {
  545|   361k|        while (true) {
  ------------------
  |  Branch (545:16): [Folded - Ignored]
  ------------------
  546|   361k|            LocationRange l;
  547|   361k|            Token id_token = popExpect(Token::IDENTIFIER);
  548|   361k|            const Identifier *id = alloc->makeIdentifier(id_token.data32());
  549|   361k|            Token in_token = popExpect(Token::IN);
  550|   361k|            AST *arr = parse(MAX_PRECEDENCE);
  551|   361k|            specs.emplace_back(
  552|   361k|                ComprehensionSpec::FOR, for_fodder, id_token.fodder, id, in_token.fodder, arr);
  553|       |
  554|   361k|            Token maybe_if = pop();
  555|   512k|            for (; maybe_if.kind == Token::IF; maybe_if = pop()) {
  ------------------
  |  Branch (555:20): [True: 150k, False: 361k]
  ------------------
  556|   150k|                AST *cond = parse(MAX_PRECEDENCE);
  557|   150k|                specs.emplace_back(
  558|   150k|                    ComprehensionSpec::IF, maybe_if.fodder, Fodder{}, nullptr, Fodder{}, cond);
  559|   150k|            }
  560|   361k|            if (maybe_if.kind == end) {
  ------------------
  |  Branch (560:17): [True: 326k, False: 34.6k]
  ------------------
  561|   326k|                return maybe_if;
  562|   326k|            }
  563|  34.6k|            if (maybe_if.kind != Token::FOR) {
  ------------------
  |  Branch (563:17): [True: 59, False: 34.5k]
  ------------------
  564|     59|                std::stringstream ss;
  565|     59|                ss << "expected for, if or " << end << " after for clause, got: " << maybe_if;
  566|     59|                throw StaticError(maybe_if.location, ss.str());
  567|     59|            }
  568|  34.5k|            for_fodder = maybe_if.fodder;
  569|  34.5k|        }
  570|   327k|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14spanERKNS0_5TokenE:
   74|  37.8M|{
   75|  37.8M|    return LocationRange(begin.location.file, begin.location.begin, begin.location.end);
   76|  37.8M|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser10parseInfixEPNS0_3ASTERKNS0_5TokenEj:
  926|  40.4M|    {
  927|  62.3M|        while (true) {
  ------------------
  |  Branch (927:16): [Folded - Ignored]
  ------------------
  928|       |
  929|  62.3M|            BinaryOp bop = BOP_PLUS;
  930|  62.3M|            unsigned op_precedence = 0;
  931|       |
  932|  62.3M|            switch (peek().kind) {
  933|       |                // Logical / arithmetic binary operator.
  934|   101k|                case Token::IN:
  ------------------
  |  Branch (934:17): [True: 101k, False: 62.2M]
  ------------------
  935|  9.52M|                case Token::OPERATOR:
  ------------------
  |  Branch (935:17): [True: 9.41M, False: 52.9M]
  ------------------
  936|       |                    // These occur if the outer statement was an assert or array slice.
  937|       |                    // Either way, we terminate the parsing here.
  938|  9.52M|                    if (peek().data == ":" || peek().data == "::") {
  ------------------
  |  Branch (938:25): [True: 687k, False: 8.83M]
  |  Branch (938:47): [True: 710, False: 8.83M]
  ------------------
  939|   688k|                        return lhs;
  940|   688k|                    }
  941|  8.83M|                    if (!op_is_binary(peek().data, bop)) {
  ------------------
  |  Branch (941:25): [True: 164, False: 8.83M]
  ------------------
  942|    164|                        std::stringstream ss;
  943|    164|                        ss << "not a binary operator: " << peek().data;
  944|    164|                        throw StaticError(peek().location, ss.str());
  945|    164|                    }
  946|  8.83M|                    op_precedence = precedence_map[bop];
  947|  8.83M|                    break;
  948|       |
  949|       |                // Index, Apply
  950|  6.04M|                case Token::DOT:
  ------------------
  |  Branch (950:17): [True: 6.04M, False: 56.2M]
  ------------------
  951|  7.49M|                case Token::BRACKET_L:
  ------------------
  |  Branch (951:17): [True: 1.45M, False: 60.8M]
  ------------------
  952|  14.3M|                case Token::PAREN_L:
  ------------------
  |  Branch (952:17): [True: 6.88M, False: 55.4M]
  ------------------
  953|  14.4M|                case Token::BRACE_L:
  ------------------
  |  Branch (953:17): [True: 91.2k, False: 62.2M]
  ------------------
  954|  14.4M|                    op_precedence = APPLY_PRECEDENCE;
  955|  14.4M|                    break;
  956|       |
  957|  38.3M|                default:
  ------------------
  |  Branch (957:17): [True: 38.3M, False: 23.9M]
  ------------------
  958|       |                    // This happens when we reach EOF or the terminating token of an outer context.
  959|  38.3M|                    return lhs;
  960|  62.3M|            }
  961|       |
  962|       |            // If higher precedence than the outer recursive call, let that handle it.
  963|  23.3M|            if (op_precedence >= max_precedence)
  ------------------
  |  Branch (963:17): [True: 1.37M, False: 21.9M]
  ------------------
  964|  1.37M|                return lhs;
  965|       |
  966|  21.9M|            Token op = pop();
  967|       |
  968|  21.9M|            switch (op.kind) {
  969|  1.45M|                case Token::BRACKET_L: {
  ------------------
  |  Branch (969:17): [True: 1.45M, False: 20.4M]
  ------------------
  970|  1.45M|                    bool is_slice;
  971|  1.45M|                    AST *first = nullptr;
  972|  1.45M|                    Fodder second_fodder;
  973|  1.45M|                    AST *second = nullptr;
  974|  1.45M|                    Fodder third_fodder;
  975|  1.45M|                    AST *third = nullptr;
  976|       |
  977|  1.45M|                    if (peek().kind == Token::BRACKET_R)
  ------------------
  |  Branch (977:25): [True: 2, False: 1.45M]
  ------------------
  978|      2|                        throw unexpected(pop(), "parsing index");
  979|       |
  980|  1.45M|                    if (peek().data != ":" && peek().data != "::") {
  ------------------
  |  Branch (980:25): [True: 1.43M, False: 21.5k]
  |  Branch (980:47): [True: 1.43M, False: 860]
  ------------------
  981|  1.43M|                        first = parse(MAX_PRECEDENCE);
  982|  1.43M|                    }
  983|       |
  984|  1.45M|                    if (peek().kind == Token::OPERATOR && peek().data == "::") {
  ------------------
  |  Branch (984:25): [True: 159k, False: 1.29M]
  |  Branch (984:59): [True: 1.03k, False: 158k]
  ------------------
  985|       |                        // Handle ::
  986|  1.03k|                        is_slice = true;
  987|  1.03k|                        Token joined = pop();
  988|  1.03k|                        second_fodder = joined.fodder;
  989|       |
  990|  1.03k|                        if (peek().kind != Token::BRACKET_R)
  ------------------
  |  Branch (990:29): [True: 717, False: 313]
  ------------------
  991|    717|                            third = parse(MAX_PRECEDENCE);
  992|       |
  993|  1.45M|                    } else if (peek().kind != Token::BRACKET_R) {
  ------------------
  |  Branch (993:32): [True: 158k, False: 1.29M]
  ------------------
  994|   158k|                        is_slice = true;
  995|   158k|                        Token delim = pop();
  996|   158k|                        if (delim.data != ":")
  ------------------
  |  Branch (996:29): [True: 138, False: 158k]
  ------------------
  997|    138|                            throw unexpected(delim, "parsing slice");
  998|       |
  999|   158k|                        second_fodder = delim.fodder;
 1000|       |
 1001|   158k|                        if (peek().data != ":" && peek().kind != Token::BRACKET_R)
  ------------------
  |  Branch (1001:29): [True: 158k, False: 226]
  |  Branch (1001:51): [True: 70.0k, False: 88.3k]
  ------------------
 1002|  70.0k|                            second = parse(MAX_PRECEDENCE);
 1003|       |
 1004|   158k|                        if (peek().kind != Token::BRACKET_R) {
  ------------------
  |  Branch (1004:29): [True: 9.36k, False: 149k]
  ------------------
 1005|  9.36k|                            Token delim = pop();
 1006|  9.36k|                            if (delim.data != ":")
  ------------------
  |  Branch (1006:33): [True: 50, False: 9.31k]
  ------------------
 1007|     50|                                throw unexpected(delim, "parsing slice");
 1008|       |
 1009|  9.31k|                            third_fodder = delim.fodder;
 1010|       |
 1011|  9.31k|                            if (peek().kind != Token::BRACKET_R)
  ------------------
  |  Branch (1011:33): [True: 9.07k, False: 246]
  ------------------
 1012|  9.07k|                                third = parse(MAX_PRECEDENCE);
 1013|  9.31k|                        }
 1014|  1.29M|                    } else {
 1015|  1.29M|                        is_slice = false;
 1016|  1.29M|                    }
 1017|  1.45M|                    Token end = popExpect(Token::BRACKET_R);
 1018|  1.45M|                    lhs = alloc->make<Index>(span(begin, end),
 1019|  1.45M|                                             EMPTY_FODDER,
 1020|  1.45M|                                             lhs,
 1021|  1.45M|                                             op.fodder,
 1022|  1.45M|                                             is_slice,
 1023|  1.45M|                                             first,
 1024|  1.45M|                                             second_fodder,
 1025|  1.45M|                                             second,
 1026|  1.45M|                                             third_fodder,
 1027|  1.45M|                                             third,
 1028|  1.45M|                                             end.fodder);
 1029|  1.45M|                    break;
 1030|  1.45M|                }
 1031|  6.04M|                case Token::DOT: {
  ------------------
  |  Branch (1031:17): [True: 6.04M, False: 15.8M]
  ------------------
 1032|  6.04M|                    Token field_id = popExpect(Token::IDENTIFIER);
 1033|  6.04M|                    const Identifier *id = alloc->makeIdentifier(field_id.data32());
 1034|  6.04M|                    lhs = alloc->make<Index>(span(begin, field_id),
 1035|  6.04M|                                             EMPTY_FODDER,
 1036|  6.04M|                                             lhs,
 1037|  6.04M|                                             op.fodder,
 1038|  6.04M|                                             field_id.fodder,
 1039|  6.04M|                                             id);
 1040|  6.04M|                    break;
 1041|  1.45M|                }
 1042|  6.88M|                case Token::PAREN_L: {
  ------------------
  |  Branch (1042:17): [True: 6.88M, False: 15.0M]
  ------------------
 1043|  6.88M|                    ArgParams args;
 1044|  6.88M|                    bool got_comma;
 1045|  6.88M|                    Token end = parseArgs(args, "function argument", got_comma);
 1046|  6.88M|                    bool got_named = false;
 1047|  11.5M|                    for (const auto& arg : args) {
  ------------------
  |  Branch (1047:42): [True: 11.5M, False: 6.88M]
  ------------------
 1048|  11.5M|                        if (arg.id != nullptr) {
  ------------------
  |  Branch (1048:29): [True: 26.1k, False: 11.5M]
  ------------------
 1049|  26.1k|                            got_named = true;
 1050|  11.5M|                        } else {
 1051|  11.5M|                            if (got_named) {
  ------------------
  |  Branch (1051:33): [True: 3, False: 11.5M]
  ------------------
 1052|      3|                                throw StaticError(arg.expr->location, "Positional argument after a named argument is not allowed");
 1053|      3|                            }
 1054|  11.5M|                        }
 1055|  11.5M|                    }
 1056|  6.88M|                    bool tailstrict = false;
 1057|  6.88M|                    Fodder tailstrict_fodder;
 1058|  6.88M|                    if (peek().kind == Token::TAILSTRICT) {
  ------------------
  |  Branch (1058:25): [True: 341k, False: 6.54M]
  ------------------
 1059|   341k|                        Token tailstrict_token = pop();
 1060|   341k|                        tailstrict_fodder = tailstrict_token.fodder;
 1061|   341k|                        tailstrict = true;
 1062|   341k|                    }
 1063|  6.88M|                    lhs = alloc->make<Apply>(span(begin, end),
 1064|  6.88M|                                             EMPTY_FODDER,
 1065|  6.88M|                                             lhs,
 1066|  6.88M|                                             op.fodder,
 1067|  6.88M|                                             args,
 1068|  6.88M|                                             got_comma,
 1069|  6.88M|                                             end.fodder,
 1070|  6.88M|                                             tailstrict_fodder,
 1071|  6.88M|                                             tailstrict);
 1072|  6.88M|                    break;
 1073|  6.88M|                }
 1074|  91.2k|                case Token::BRACE_L: {
  ------------------
  |  Branch (1074:17): [True: 91.2k, False: 21.8M]
  ------------------
 1075|  91.2k|                    AST *obj;
 1076|  91.2k|                    Token end = parseObjectRemainder(obj, op);
 1077|  91.2k|                    lhs = alloc->make<ApplyBrace>(span(begin, end), EMPTY_FODDER, lhs, obj);
 1078|  91.2k|                    break;
 1079|  6.88M|                }
 1080|       |
 1081|  71.1k|                case Token::IN: {
  ------------------
  |  Branch (1081:17): [True: 71.1k, False: 21.8M]
  ------------------
 1082|  71.1k|                    if (peek().kind == Token::SUPER) {
  ------------------
  |  Branch (1082:25): [True: 420, False: 70.6k]
  ------------------
 1083|    420|                        Token super = pop();
 1084|    420|                        lhs = alloc->make<InSuper>(
 1085|    420|                            span(begin, super), EMPTY_FODDER, lhs, op.fodder, super.fodder);
 1086|  70.6k|                    } else {
 1087|  70.6k|                        AST *rhs = parse(op_precedence);
 1088|  70.6k|                        lhs = alloc->make<Binary>(
 1089|  70.6k|                            span(begin, rhs), EMPTY_FODDER, lhs, op.fodder, bop, rhs);
 1090|  70.6k|                    }
 1091|  71.1k|                    break;
 1092|  6.88M|                }
 1093|       |
 1094|  7.38M|                case Token::OPERATOR: {
  ------------------
  |  Branch (1094:17): [True: 7.38M, False: 14.5M]
  ------------------
 1095|  7.38M|                    AST *rhs = parse(op_precedence);
 1096|  7.38M|                    lhs = alloc->make<Binary>(
 1097|  7.38M|                        span(begin, rhs), EMPTY_FODDER, lhs, op.fodder, bop, rhs);
 1098|  7.38M|                    break;
 1099|  6.88M|                }
 1100|       |
 1101|      0|                default: {
  ------------------
  |  Branch (1101:17): [True: 0, False: 21.9M]
  ------------------
 1102|      0|                    std::cerr << "Should not be here." << std::endl;
 1103|      0|                    abort();
 1104|  6.88M|                }
 1105|  21.9M|            }
 1106|  21.9M|        }
 1107|       |
 1108|       |        // (1 & ((1 + (1 * 1)) + 1)) & 1
 1109|       |        //
 1110|       |        //
 1111|       |
 1112|       |/*
 1113|       |        // Allocate this on the heap to control stack growth.
 1114|       |        std::unique_ptr<Token> begin_(new Token(peek()));
 1115|       |        const Token &begin = *begin_;
 1116|       |*/
 1117|  40.4M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_112op_is_binaryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERNS0_8BinaryOpE:
   65|  8.83M|{
   66|  8.83M|    auto it = binary_map.find(op);
   67|  8.83M|    if (it == binary_map.end())
  ------------------
  |  Branch (67:9): [True: 164, False: 8.83M]
  ------------------
   68|    164|        return false;
   69|  8.83M|    bop = it->second;
   70|  8.83M|    return true;
   71|  8.83M|}

_ZN7jsonnet8internal12CompilerPass6fodderERNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEE:
   22|  9.31M|{
   23|  9.31M|    for (auto &f : fodder)
  ------------------
  |  Branch (23:18): [True: 725k, False: 9.31M]
  ------------------
   24|   725k|        fodderElement(f);
   25|  9.31M|}
_ZN7jsonnet8internal12CompilerPass6paramsERNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEERNS3_INS0_8ArgParamENS5_IS9_EEEES8_:
   43|   221k|{
   44|   221k|    fodder(fodder_l);
   45|   299k|    for (auto &param : params) {
  ------------------
  |  Branch (45:22): [True: 299k, False: 221k]
  ------------------
   46|   299k|        fodder(param.idFodder);
   47|   299k|        if (param.expr) {
  ------------------
  |  Branch (47:13): [True: 252k, False: 46.3k]
  ------------------
   48|   252k|            fodder(param.eqFodder);
   49|   252k|            expr(param.expr);
   50|   252k|        }
   51|   299k|        fodder(param.commaFodder);
   52|   299k|    }
   53|   221k|    fodder(fodder_r);
   54|   221k|}
_ZN7jsonnet8internal12CompilerPass4exprERPNS0_3ASTE:
  110|  5.62M|{
  111|  5.62M|    fodder(ast_->openFodder);
  112|  5.62M|    visitExpr(ast_);
  113|  5.62M|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5ApplyE:
  116|   168k|{
  117|   168k|    expr(ast->target);
  118|   168k|    params(ast->fodderL, ast->args, ast->fodderR);
  119|   168k|    if (ast->tailstrict) {
  ------------------
  |  Branch (119:9): [True: 55.7k, False: 112k]
  ------------------
  120|  55.7k|        fodder(ast->tailstrictFodder);
  121|  55.7k|    }
  122|   168k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5ArrayE:
  131|  17.4k|{
  132|  26.8k|    for (auto &element : ast->elements) {
  ------------------
  |  Branch (132:24): [True: 26.8k, False: 17.4k]
  ------------------
  133|  26.8k|        expr(element.expr);
  134|  26.8k|        fodder(element.commaFodder);
  135|  26.8k|    }
  136|  17.4k|    fodder(ast->closeFodder);
  137|  17.4k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_6BinaryE:
  159|   677k|{
  160|   677k|    expr(ast->left);
  161|   677k|    fodder(ast->opFodder);
  162|   677k|    expr(ast->right);
  163|   677k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_11ConditionalE:
  166|   352k|{
  167|   352k|    expr(ast->cond);
  168|   352k|    fodder(ast->thenFodder);
  169|   352k|    if (ast->branchFalse != nullptr) {
  ------------------
  |  Branch (169:9): [True: 352k, False: 0]
  ------------------
  170|   352k|        expr(ast->branchTrue);
  171|   352k|        fodder(ast->elseFodder);
  172|   352k|        expr(ast->branchFalse);
  173|   352k|    } else {
  174|      0|        expr(ast->branchTrue);
  175|      0|    }
  176|   352k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5ErrorE:
  179|  16.0k|{
  180|  16.0k|    expr(ast->expr);
  181|  16.0k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_8FunctionE:
  184|  53.5k|{
  185|  53.5k|    params(ast->parenLeftFodder, ast->params, ast->parenRightFodder);
  186|  53.5k|    expr(ast->body);
  187|  53.5k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_6ImportE:
  190|    644|{
  191|    644|    visit(ast->file);
  192|    644|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_9ImportstrE:
  195|    354|{
  196|    354|    visit(ast->file);
  197|    354|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_9ImportbinE:
  200|    326|{
  201|    326|    visit(ast->file);
  202|    326|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_7InSuperE:
  205|   164k|{
  206|   164k|    expr(ast->element);
  207|   164k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5IndexE:
  210|   114k|{
  211|   114k|    expr(ast->target);
  212|   114k|    if (ast->id != nullptr) {
  ------------------
  |  Branch (212:9): [True: 0, False: 114k]
  ------------------
  213|   114k|    } else {
  214|   114k|        if (ast->isSlice) {
  ------------------
  |  Branch (214:13): [True: 0, False: 114k]
  ------------------
  215|      0|            if (ast->index != nullptr)
  ------------------
  |  Branch (215:17): [True: 0, False: 0]
  ------------------
  216|      0|                expr(ast->index);
  217|      0|            if (ast->end != nullptr)
  ------------------
  |  Branch (217:17): [True: 0, False: 0]
  ------------------
  218|      0|                expr(ast->end);
  219|      0|            if (ast->step != nullptr)
  ------------------
  |  Branch (219:17): [True: 0, False: 0]
  ------------------
  220|      0|                expr(ast->step);
  221|   114k|        } else {
  222|   114k|            expr(ast->index);
  223|   114k|        }
  224|   114k|    }
  225|   114k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5LocalE:
  228|  77.5k|{
  229|  77.5k|    assert(ast->binds.size() > 0);
  230|   304k|    for (auto &bind : ast->binds) {
  ------------------
  |  Branch (230:21): [True: 304k, False: 77.5k]
  ------------------
  231|   304k|        fodder(bind.varFodder);
  232|   304k|        if (bind.functionSugar) {
  ------------------
  |  Branch (232:13): [True: 0, False: 304k]
  ------------------
  233|      0|            params(bind.parenLeftFodder, bind.params, bind.parenRightFodder);
  234|      0|        }
  235|   304k|        fodder(bind.opFodder);
  236|   304k|        expr(bind.body);
  237|   304k|        fodder(bind.closeFodder);
  238|   304k|    }
  239|  77.5k|    expr(ast->body);
  240|  77.5k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_15DesugaredObjectE:
  249|   653k|{
  250|   653k|    for (AST *assert : ast->asserts) {
  ------------------
  |  Branch (250:22): [True: 5.78k, False: 653k]
  ------------------
  251|  5.78k|        expr(assert);
  252|  5.78k|    }
  253|   653k|    for (auto &field : ast->fields) {
  ------------------
  |  Branch (253:22): [True: 393k, False: 653k]
  ------------------
  254|   393k|        expr(field.name);
  255|   393k|        expr(field.body);
  256|   393k|    }
  257|   653k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_25ObjectComprehensionSimpleE:
  267|    644|{
  268|    644|    expr(ast->field);
  269|    644|    expr(ast->value);
  270|    644|    expr(ast->array);
  271|    644|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_10SuperIndexE:
  280|   165k|{
  281|   165k|    if (ast->id != nullptr) {
  ------------------
  |  Branch (281:9): [True: 0, False: 165k]
  ------------------
  282|   165k|    } else {
  283|   165k|        expr(ast->index);
  284|   165k|    }
  285|   165k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5UnaryE:
  288|   854k|{
  289|   854k|    expr(ast->expr);
  290|   854k|}
_ZN7jsonnet8internal12CompilerPass9visitExprERPNS0_3ASTE:
  300|  5.62M|{
  301|  5.62M|    switch(ast_->type) {
  302|   168k|        VISIT(ast_, AST_APPLY, Apply);
  ------------------
  |  |  293|   168k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 168k, False: 5.45M]
  |  |  ------------------
  |  |  294|   168k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   168k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   168k|     visit(ast); \
  |  |  297|   168k|   } break
  ------------------
  303|      0|        VISIT(ast_, AST_APPLY_BRACE, ApplyBrace);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 5.62M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  304|  17.4k|        VISIT(ast_, AST_ARRAY, Array);
  ------------------
  |  |  293|  17.4k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 17.4k, False: 5.60M]
  |  |  ------------------
  |  |  294|  17.4k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  17.4k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  17.4k|     visit(ast); \
  |  |  297|  17.4k|   } break
  ------------------
  305|      0|        VISIT(ast_, AST_ARRAY_COMPREHENSION, ArrayComprehension);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 5.62M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  306|       |        // VISIT(ast_, AST_ARRAY_COMPREHENSION, ArrayComprehensionSimple);
  307|      0|        VISIT(ast_, AST_ASSERT, Assert);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 5.62M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  308|   677k|        VISIT(ast_, AST_BINARY, Binary);
  ------------------
  |  |  293|   677k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 677k, False: 4.94M]
  |  |  ------------------
  |  |  294|   677k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   677k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   677k|     visit(ast); \
  |  |  297|   677k|   } break
  ------------------
  309|      0|        VISIT(ast_, AST_BUILTIN_FUNCTION, BuiltinFunction);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 5.62M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  310|   352k|        VISIT(ast_, AST_CONDITIONAL, Conditional);
  ------------------
  |  |  293|   352k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 352k, False: 5.26M]
  |  |  ------------------
  |  |  294|   352k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   352k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   352k|     visit(ast); \
  |  |  297|   352k|   } break
  ------------------
  311|   653k|        VISIT(ast_, AST_DESUGARED_OBJECT, DesugaredObject);
  ------------------
  |  |  293|   653k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 653k, False: 4.96M]
  |  |  ------------------
  |  |  294|   653k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   653k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   653k|     visit(ast); \
  |  |  297|   653k|   } break
  ------------------
  312|      0|        VISIT(ast_, AST_DOLLAR, Dollar);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 5.62M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  313|  16.0k|        VISIT(ast_, AST_ERROR, Error);
  ------------------
  |  |  293|  16.0k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 16.0k, False: 5.60M]
  |  |  ------------------
  |  |  294|  16.0k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  16.0k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  16.0k|     visit(ast); \
  |  |  297|  16.0k|   } break
  ------------------
  314|  53.5k|        VISIT(ast_, AST_FUNCTION, Function);
  ------------------
  |  |  293|  53.5k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 53.5k, False: 5.56M]
  |  |  ------------------
  |  |  294|  53.5k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  53.5k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  53.5k|     visit(ast); \
  |  |  297|  53.5k|   } break
  ------------------
  315|    644|        VISIT(ast_, AST_IMPORT, Import);
  ------------------
  |  |  293|    644|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 644, False: 5.62M]
  |  |  ------------------
  |  |  294|    644|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|    644|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|    644|     visit(ast); \
  |  |  297|    644|   } break
  ------------------
  316|    354|        VISIT(ast_, AST_IMPORTSTR, Importstr);
  ------------------
  |  |  293|    354|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 354, False: 5.62M]
  |  |  ------------------
  |  |  294|    354|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|    354|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|    354|     visit(ast); \
  |  |  297|    354|   } break
  ------------------
  317|    326|        VISIT(ast_, AST_IMPORTBIN, Importbin);
  ------------------
  |  |  293|    326|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 326, False: 5.62M]
  |  |  ------------------
  |  |  294|    326|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|    326|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|    326|     visit(ast); \
  |  |  297|    326|   } break
  ------------------
  318|   114k|        VISIT(ast_, AST_INDEX, Index);
  ------------------
  |  |  293|   114k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 114k, False: 5.50M]
  |  |  ------------------
  |  |  294|   114k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   114k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   114k|     visit(ast); \
  |  |  297|   114k|   } break
  ------------------
  319|   164k|        VISIT(ast_, AST_IN_SUPER, InSuper);
  ------------------
  |  |  293|   164k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 164k, False: 5.45M]
  |  |  ------------------
  |  |  294|   164k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   164k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   164k|     visit(ast); \
  |  |  297|   164k|   } break
  ------------------
  320|  5.83k|        VISIT(ast_, AST_LITERAL_BOOLEAN, LiteralBoolean);
  ------------------
  |  |  293|  5.83k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 5.83k, False: 5.61M]
  |  |  ------------------
  |  |  294|  5.83k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  5.83k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  5.83k|     visit(ast); \
  |  |  297|  5.83k|   } break
  ------------------
  321|  13.1k|        VISIT(ast_, AST_LITERAL_NULL, LiteralNull);
  ------------------
  |  |  293|  13.1k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 13.1k, False: 5.60M]
  |  |  ------------------
  |  |  294|  13.1k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  13.1k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  13.1k|     visit(ast); \
  |  |  297|  13.1k|   } break
  ------------------
  322|   325k|        VISIT(ast_, AST_LITERAL_NUMBER, LiteralNumber);
  ------------------
  |  |  293|   325k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 325k, False: 5.29M]
  |  |  ------------------
  |  |  294|   325k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   325k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   325k|     visit(ast); \
  |  |  297|   325k|   } break
  ------------------
  323|   948k|        VISIT(ast_, AST_LITERAL_STRING, LiteralString);
  ------------------
  |  |  293|   948k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 948k, False: 4.67M]
  |  |  ------------------
  |  |  294|   948k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   948k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   948k|     visit(ast); \
  |  |  297|   948k|   } break
  ------------------
  324|  77.5k|        VISIT(ast_, AST_LOCAL, Local);
  ------------------
  |  |  293|  77.5k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 77.5k, False: 5.54M]
  |  |  ------------------
  |  |  294|  77.5k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  77.5k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  77.5k|     visit(ast); \
  |  |  297|  77.5k|   } break
  ------------------
  325|      0|        VISIT(ast_, AST_OBJECT, Object);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 5.62M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  326|      0|        VISIT(ast_, AST_OBJECT_COMPREHENSION, ObjectComprehension);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 5.62M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  327|    644|        VISIT(ast_, AST_OBJECT_COMPREHENSION_SIMPLE, ObjectComprehensionSimple);
  ------------------
  |  |  293|    644|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 644, False: 5.62M]
  |  |  ------------------
  |  |  294|    644|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|    644|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|    644|     visit(ast); \
  |  |  297|    644|   } break
  ------------------
  328|      0|        VISIT(ast_, AST_PARENS, Parens);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 5.62M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  329|  14.4k|        VISIT(ast_, AST_SELF, Self);
  ------------------
  |  |  293|  14.4k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 14.4k, False: 5.60M]
  |  |  ------------------
  |  |  294|  14.4k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  14.4k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  14.4k|     visit(ast); \
  |  |  297|  14.4k|   } break
  ------------------
  330|   165k|        VISIT(ast_, AST_SUPER_INDEX, SuperIndex);
  ------------------
  |  |  293|   165k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 165k, False: 5.45M]
  |  |  ------------------
  |  |  294|   165k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   165k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   165k|     visit(ast); \
  |  |  297|   165k|   } break
  ------------------
  331|   854k|        VISIT(ast_, AST_UNARY, Unary);
  ------------------
  |  |  293|   854k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 854k, False: 4.76M]
  |  |  ------------------
  |  |  294|   854k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   854k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   854k|     visit(ast); \
  |  |  297|   854k|   } break
  ------------------
  332|   996k|        VISIT(ast_, AST_VAR, Var);
  ------------------
  |  |  293|   996k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 996k, False: 4.62M]
  |  |  ------------------
  |  |  294|   996k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   996k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   996k|     visit(ast); \
  |  |  297|   996k|   } break
  ------------------
  333|      0|        default:
  ------------------
  |  Branch (333:9): [True: 0, False: 5.62M]
  ------------------
  334|      0|            std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_ << std::endl;
  335|      0|            std::abort();
  336|      0|            break;
  337|  5.62M|    }
  338|  5.62M|}
_ZN7jsonnet8internal9ClonePass4exprERPNS0_3ASTE:
  361|  4.73M|{
  362|  4.73M|    switch(ast_->type) {
  363|   140k|        CLONE(ast_, AST_APPLY, Apply);
  ------------------
  |  |  354|   140k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 140k, False: 4.59M]
  |  |  ------------------
  |  |  355|   140k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|   140k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|   140k|     var = alloc.clone(ast); \
  |  |  358|   140k|   } break
  ------------------
  364|      0|        CLONE(ast_, AST_APPLY_BRACE, ApplyBrace);
  ------------------
  |  |  354|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 0, False: 4.73M]
  |  |  ------------------
  |  |  355|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|      0|     var = alloc.clone(ast); \
  |  |  358|      0|   } break
  ------------------
  365|  15.6k|        CLONE(ast_, AST_ARRAY, Array);
  ------------------
  |  |  354|  15.6k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 15.6k, False: 4.72M]
  |  |  ------------------
  |  |  355|  15.6k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|  15.6k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|  15.6k|     var = alloc.clone(ast); \
  |  |  358|  15.6k|   } break
  ------------------
  366|      0|        CLONE(ast_, AST_ARRAY_COMPREHENSION, ArrayComprehension);
  ------------------
  |  |  354|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 0, False: 4.73M]
  |  |  ------------------
  |  |  355|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|      0|     var = alloc.clone(ast); \
  |  |  358|      0|   } break
  ------------------
  367|       |        // CLONE(ast_, AST_ARRAY_COMPREHENSION, ArrayComprehensionSimple);
  368|      0|        CLONE(ast_, AST_ASSERT, Assert);
  ------------------
  |  |  354|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 0, False: 4.73M]
  |  |  ------------------
  |  |  355|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|      0|     var = alloc.clone(ast); \
  |  |  358|      0|   } break
  ------------------
  369|   557k|        CLONE(ast_, AST_BINARY, Binary);
  ------------------
  |  |  354|   557k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 557k, False: 4.18M]
  |  |  ------------------
  |  |  355|   557k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|   557k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|   557k|     var = alloc.clone(ast); \
  |  |  358|   557k|   } break
  ------------------
  370|      0|        CLONE(ast_, AST_BUILTIN_FUNCTION, BuiltinFunction);
  ------------------
  |  |  354|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 0, False: 4.73M]
  |  |  ------------------
  |  |  355|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|      0|     var = alloc.clone(ast); \
  |  |  358|      0|   } break
  ------------------
  371|   287k|        CLONE(ast_, AST_CONDITIONAL, Conditional);
  ------------------
  |  |  354|   287k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 287k, False: 4.45M]
  |  |  ------------------
  |  |  355|   287k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|   287k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|   287k|     var = alloc.clone(ast); \
  |  |  358|   287k|   } break
  ------------------
  372|   543k|        CLONE(ast_, AST_DESUGARED_OBJECT, DesugaredObject);
  ------------------
  |  |  354|   543k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 543k, False: 4.19M]
  |  |  ------------------
  |  |  355|   543k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|   543k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|   543k|     var = alloc.clone(ast); \
  |  |  358|   543k|   } break
  ------------------
  373|      0|        CLONE(ast_, AST_DOLLAR, Dollar);
  ------------------
  |  |  354|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 0, False: 4.73M]
  |  |  ------------------
  |  |  355|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|      0|     var = alloc.clone(ast); \
  |  |  358|      0|   } break
  ------------------
  374|  11.8k|        CLONE(ast_, AST_ERROR, Error);
  ------------------
  |  |  354|  11.8k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 11.8k, False: 4.72M]
  |  |  ------------------
  |  |  355|  11.8k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|  11.8k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|  11.8k|     var = alloc.clone(ast); \
  |  |  358|  11.8k|   } break
  ------------------
  375|  49.1k|        CLONE(ast_, AST_FUNCTION, Function);
  ------------------
  |  |  354|  49.1k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 49.1k, False: 4.68M]
  |  |  ------------------
  |  |  355|  49.1k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|  49.1k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|  49.1k|     var = alloc.clone(ast); \
  |  |  358|  49.1k|   } break
  ------------------
  376|    632|        CLONE(ast_, AST_IMPORT, Import);
  ------------------
  |  |  354|    632|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 632, False: 4.73M]
  |  |  ------------------
  |  |  355|    632|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|    632|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|    632|     var = alloc.clone(ast); \
  |  |  358|    632|   } break
  ------------------
  377|    354|        CLONE(ast_, AST_IMPORTSTR, Importstr);
  ------------------
  |  |  354|    354|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 354, False: 4.73M]
  |  |  ------------------
  |  |  355|    354|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|    354|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|    354|     var = alloc.clone(ast); \
  |  |  358|    354|   } break
  ------------------
  378|    326|        CLONE(ast_, AST_IMPORTBIN, Importbin);
  ------------------
  |  |  354|    326|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 326, False: 4.73M]
  |  |  ------------------
  |  |  355|    326|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|    326|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|    326|     var = alloc.clone(ast); \
  |  |  358|    326|   } break
  ------------------
  379|  90.7k|        CLONE(ast_, AST_INDEX, Index);
  ------------------
  |  |  354|  90.7k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 90.7k, False: 4.64M]
  |  |  ------------------
  |  |  355|  90.7k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|  90.7k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|  90.7k|     var = alloc.clone(ast); \
  |  |  358|  90.7k|   } break
  ------------------
  380|   164k|        CLONE(ast_, AST_IN_SUPER, InSuper);
  ------------------
  |  |  354|   164k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 164k, False: 4.57M]
  |  |  ------------------
  |  |  355|   164k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|   164k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|   164k|     var = alloc.clone(ast); \
  |  |  358|   164k|   } break
  ------------------
  381|  4.96k|        CLONE(ast_, AST_LITERAL_BOOLEAN, LiteralBoolean);
  ------------------
  |  |  354|  4.96k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 4.96k, False: 4.73M]
  |  |  ------------------
  |  |  355|  4.96k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|  4.96k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|  4.96k|     var = alloc.clone(ast); \
  |  |  358|  4.96k|   } break
  ------------------
  382|  12.9k|        CLONE(ast_, AST_LITERAL_NULL, LiteralNull);
  ------------------
  |  |  354|  12.9k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 12.9k, False: 4.72M]
  |  |  ------------------
  |  |  355|  12.9k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|  12.9k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|  12.9k|     var = alloc.clone(ast); \
  |  |  358|  12.9k|   } break
  ------------------
  383|   280k|        CLONE(ast_, AST_LITERAL_NUMBER, LiteralNumber);
  ------------------
  |  |  354|   280k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 280k, False: 4.45M]
  |  |  ------------------
  |  |  355|   280k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|   280k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|   280k|     var = alloc.clone(ast); \
  |  |  358|   280k|   } break
  ------------------
  384|   820k|        CLONE(ast_, AST_LITERAL_STRING, LiteralString);
  ------------------
  |  |  354|   820k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 820k, False: 3.91M]
  |  |  ------------------
  |  |  355|   820k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|   820k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|   820k|     var = alloc.clone(ast); \
  |  |  358|   820k|   } break
  ------------------
  385|  65.7k|        CLONE(ast_, AST_LOCAL, Local);
  ------------------
  |  |  354|  65.7k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 65.7k, False: 4.67M]
  |  |  ------------------
  |  |  355|  65.7k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|  65.7k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|  65.7k|     var = alloc.clone(ast); \
  |  |  358|  65.7k|   } break
  ------------------
  386|      0|        CLONE(ast_, AST_OBJECT, Object);
  ------------------
  |  |  354|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 0, False: 4.73M]
  |  |  ------------------
  |  |  355|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|      0|     var = alloc.clone(ast); \
  |  |  358|      0|   } break
  ------------------
  387|      0|        CLONE(ast_, AST_OBJECT_COMPREHENSION, ObjectComprehension);
  ------------------
  |  |  354|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 0, False: 4.73M]
  |  |  ------------------
  |  |  355|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|      0|     var = alloc.clone(ast); \
  |  |  358|      0|   } break
  ------------------
  388|    474|        CLONE(ast_, AST_OBJECT_COMPREHENSION_SIMPLE, ObjectComprehensionSimple);
  ------------------
  |  |  354|    474|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 474, False: 4.73M]
  |  |  ------------------
  |  |  355|    474|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|    474|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|    474|     var = alloc.clone(ast); \
  |  |  358|    474|   } break
  ------------------
  389|      0|        CLONE(ast_, AST_PARENS, Parens);
  ------------------
  |  |  354|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 0, False: 4.73M]
  |  |  ------------------
  |  |  355|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|      0|     var = alloc.clone(ast); \
  |  |  358|      0|   } break
  ------------------
  390|  14.4k|        CLONE(ast_, AST_SELF, Self);
  ------------------
  |  |  354|  14.4k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 14.4k, False: 4.72M]
  |  |  ------------------
  |  |  355|  14.4k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|  14.4k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|  14.4k|     var = alloc.clone(ast); \
  |  |  358|  14.4k|   } break
  ------------------
  391|   165k|        CLONE(ast_, AST_SUPER_INDEX, SuperIndex);
  ------------------
  |  |  354|   165k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 165k, False: 4.57M]
  |  |  ------------------
  |  |  355|   165k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|   165k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|   165k|     var = alloc.clone(ast); \
  |  |  358|   165k|   } break
  ------------------
  392|   781k|        CLONE(ast_, AST_UNARY, Unary);
  ------------------
  |  |  354|   781k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 781k, False: 3.95M]
  |  |  ------------------
  |  |  355|   781k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|   781k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|   781k|     var = alloc.clone(ast); \
  |  |  358|   781k|   } break
  ------------------
  393|   728k|        CLONE(ast_, AST_VAR, Var);
  ------------------
  |  |  354|   728k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (354:4): [True: 728k, False: 4.00M]
  |  |  ------------------
  |  |  355|   728k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  356|   728k|     auto *ast = static_cast<astClass *>(var); \
  |  |  357|   728k|     var = alloc.clone(ast); \
  |  |  358|   728k|   } break
  ------------------
  394|      0|        default:
  ------------------
  |  Branch (394:9): [True: 0, False: 4.73M]
  ------------------
  395|      0|            std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_ << std::endl;
  396|      0|            std::abort();
  397|      0|            break;
  398|  4.73M|    }
  399|       |
  400|  4.73M|    CompilerPass::expr(ast_);
  401|  4.73M|}
_ZN7jsonnet8internal9clone_astERNS0_9AllocatorEPNS0_3ASTE:
  404|  77.7k|{
  405|  77.7k|    AST *r = ast;
  406|  77.7k|    ClonePass(alloc).expr(r);
  407|  77.7k|    return r;
  408|  77.7k|}
_ZN7jsonnet8internal9ClonePassC2ERNS0_9AllocatorE:
  349|  77.7k|    ClonePass(Allocator &alloc) : CompilerPass(alloc) {}

_ZN7jsonnet8internal12CompilerPassC2ERNS0_9AllocatorE:
   32|   103k|    CompilerPass(Allocator &alloc) : alloc(alloc) {}
_ZN7jsonnet8internal12CompilerPass13fodderElementERNS0_13FodderElementE:
   34|   725k|    virtual void fodderElement(FodderElement &) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_14LiteralBooleanE:
   82|  5.83k|    virtual void visit(LiteralBoolean *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_13LiteralNumberE:
   84|   325k|    virtual void visit(LiteralNumber *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_13LiteralStringE:
   86|   949k|    virtual void visit(LiteralString *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_11LiteralNullE:
   88|  13.1k|    virtual void visit(LiteralNull *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_4SelfE:
  100|  14.4k|    virtual void visit(Self *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_3VarE:
  106|   996k|    virtual void visit(Var *) {}

vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14HeapC2Ejd:
  333|  3.81k|    {
  334|  3.81k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_18type_strENS1_5Value4TypeE:
   74|    428|{
   75|    428|    switch (t) {
   76|      2|        case Value::NULL_TYPE: return "null";
  ------------------
  |  Branch (76:9): [True: 2, False: 426]
  ------------------
   77|     81|        case Value::BOOLEAN: return "boolean";
  ------------------
  |  Branch (77:9): [True: 81, False: 347]
  ------------------
   78|    117|        case Value::NUMBER: return "number";
  ------------------
  |  Branch (78:9): [True: 117, False: 311]
  ------------------
   79|     21|        case Value::ARRAY: return "array";
  ------------------
  |  Branch (79:9): [True: 21, False: 407]
  ------------------
   80|      9|        case Value::FUNCTION: return "function";
  ------------------
  |  Branch (80:9): [True: 9, False: 419]
  ------------------
   81|    113|        case Value::OBJECT: return "object";
  ------------------
  |  Branch (81:9): [True: 113, False: 315]
  ------------------
   82|     85|        case Value::STRING: return "string";
  ------------------
  |  Branch (82:9): [True: 85, False: 343]
  ------------------
   83|      0|        default:
  ------------------
  |  Branch (83:9): [True: 0, False: 428]
  ------------------
   84|      0|            std::cerr << "INTERNAL ERROR: Unknown type: " << t << std::endl;
   85|      0|            std::abort();
   86|      0|            return "";  // Quiet, compiler.
   87|    428|    }
   88|    428|}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_18type_strERKNS1_5ValueE:
   92|    428|{
   93|    428|    return type_str(v.t);
   94|    428|}
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_15Value6isHeapEv:
   67|  70.5M|    {
   68|  70.5M|        return t & 0x10;
   69|  70.5M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_19HeapThunkC2EPKNS0_10IdentifierEPNS1_10HeapObjectEjPKNS0_3ASTE:
  139|  51.6M|    {
  140|  51.6M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapEntityC2ENS2_4TypeE:
   41|   115M|    HeapEntity(Type type_) : type(type_) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapEntityD2Ev:
   42|   115M|    virtual ~HeapEntity() {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap9checkHeapEv:
  465|   115M|    {
  466|   115M|        return numEntities > gcTuneMinObjects &&
  ------------------
  |  Branch (466:16): [True: 38.6M, False: 77.0M]
  ------------------
  467|   115M|               numEntities > gcTuneGrowthTrigger * lastNumEntities;
  ------------------
  |  Branch (467:16): [True: 132k, False: 38.5M]
  ------------------
  468|   115M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap8markFromEPNS1_10HeapEntityE:
  351|  88.8M|    {
  352|  88.8M|        assert(from != nullptr);
  353|      0|        const GarbageCollectionMark thisMark = lastMark + 1;
  354|  88.8M|        struct State {
  355|  88.8M|            HeapEntity *ent;
  356|  88.8M|            std::vector<HeapEntity *> children;
  357|  88.8M|            State(HeapEntity *ent) : ent(ent) {}
  358|  88.8M|        };
  359|       |
  360|  88.8M|        std::vector<State> stack;
  361|  88.8M|        stack.emplace_back(from);
  362|       |
  363|   378M|        while (stack.size() > 0) {
  ------------------
  |  Branch (363:16): [True: 289M, False: 88.8M]
  ------------------
  364|   289M|            size_t curr_index = stack.size() - 1;
  365|   289M|            State &s = stack[curr_index];
  366|   289M|            HeapEntity *curr = s.ent;
  367|   289M|            if (curr->mark != thisMark) {
  ------------------
  |  Branch (367:17): [True: 76.4M, False: 212M]
  ------------------
  368|  76.4M|                curr->mark = thisMark;
  369|       |
  370|  76.4M|                switch(curr->type) {
  371|  10.6M|                    case HeapEntity::SIMPLE_OBJECT: {
  ------------------
  |  Branch (371:21): [True: 10.6M, False: 65.8M]
  ------------------
  372|  10.6M|                        assert(dynamic_cast<HeapSimpleObject *>(curr));
  373|      0|                        auto *obj = static_cast<HeapSimpleObject *>(curr);
  374|  10.6M|                        for (auto upv : obj->upValues)
  ------------------
  |  Branch (374:39): [True: 6.76M, False: 10.6M]
  ------------------
  375|  6.76M|                            addIfHeapEntity(upv.second, s.children);
  376|  10.6M|                        break;
  377|      0|                    }
  378|  7.64M|                    case HeapEntity::EXTENDED_OBJECT: {
  ------------------
  |  Branch (378:21): [True: 7.64M, False: 68.8M]
  ------------------
  379|  7.64M|                        assert(dynamic_cast<HeapExtendedObject *>(curr));
  380|      0|                        auto *obj = static_cast<HeapExtendedObject *>(curr);
  381|  7.64M|                        addIfHeapEntity(obj->left, s.children);
  382|  7.64M|                        addIfHeapEntity(obj->right, s.children);
  383|  7.64M|                        break;
  384|      0|                    }
  385|      0|                    case HeapEntity::COMPREHENSION_OBJECT: {
  ------------------
  |  Branch (385:21): [True: 0, False: 76.4M]
  ------------------
  386|      0|                        assert(dynamic_cast<HeapComprehensionObject *>(curr));
  387|      0|                        auto *obj = static_cast<HeapComprehensionObject *>(curr);
  388|      0|                        for (auto upv : obj->upValues)
  ------------------
  |  Branch (388:39): [True: 0, False: 0]
  ------------------
  389|      0|                            addIfHeapEntity(upv.second, s.children);
  390|      0|                        for (auto upv : obj->compValues)
  ------------------
  |  Branch (390:39): [True: 0, False: 0]
  ------------------
  391|      0|                            addIfHeapEntity(upv.second, s.children);
  392|      0|                        break;
  393|      0|                    }
  394|   681k|                    case HeapEntity::ARRAY: {
  ------------------
  |  Branch (394:21): [True: 681k, False: 75.7M]
  ------------------
  395|   681k|                        assert(dynamic_cast<HeapArray *>(curr));
  396|      0|                        auto *arr = static_cast<HeapArray *>(curr);
  397|   681k|                        for (auto el : arr->elements)
  ------------------
  |  Branch (397:38): [True: 13.0M, False: 681k]
  ------------------
  398|  13.0M|                            addIfHeapEntity(el, s.children);
  399|   681k|                        break;
  400|      0|                    }
  401|  2.66M|                    case HeapEntity::CLOSURE: {
  ------------------
  |  Branch (401:21): [True: 2.66M, False: 73.8M]
  ------------------
  402|  2.66M|                        assert(dynamic_cast<HeapClosure *>(curr));
  403|      0|                        auto *func = static_cast<HeapClosure *>(curr);
  404|  2.66M|                        for (auto upv : func->upValues)
  ------------------
  |  Branch (404:39): [True: 4.83M, False: 2.66M]
  ------------------
  405|  4.83M|                            addIfHeapEntity(upv.second, s.children);
  406|  2.66M|                        if (func->self)
  ------------------
  |  Branch (406:29): [True: 2.38M, False: 283k]
  ------------------
  407|  2.38M|                            addIfHeapEntity(func->self, s.children);
  408|  2.66M|                        break;
  409|      0|                    }
  410|  52.5M|                    case HeapEntity::THUNK: {
  ------------------
  |  Branch (410:21): [True: 52.5M, False: 23.9M]
  ------------------
  411|  52.5M|                        assert(dynamic_cast<HeapThunk *>(curr));
  412|      0|                        auto *thunk = static_cast<HeapThunk *>(curr);
  413|  52.5M|                        if (thunk->filled) {
  ------------------
  |  Branch (413:29): [True: 13.5M, False: 39.0M]
  ------------------
  414|  13.5M|                            if (thunk->content.isHeap())
  ------------------
  |  Branch (414:33): [True: 8.83M, False: 4.67M]
  ------------------
  415|  8.83M|                                addIfHeapEntity(thunk->content.v.h, s.children);
  416|  39.0M|                        } else {
  417|  39.0M|                            for (auto upv : thunk->upValues)
  ------------------
  |  Branch (417:43): [True: 11.4M, False: 39.0M]
  ------------------
  418|  11.4M|                                addIfHeapEntity(upv.second, s.children);
  419|  39.0M|                            if (thunk->self)
  ------------------
  |  Branch (419:33): [True: 37.5M, False: 1.43M]
  ------------------
  420|  37.5M|                                addIfHeapEntity(thunk->self, s.children);
  421|  39.0M|                        }
  422|  52.5M|                        break;
  423|      0|                    }
  424|  2.31M|                    case HeapEntity::STRING:
  ------------------
  |  Branch (424:21): [True: 2.31M, False: 74.1M]
  ------------------
  425|  2.31M|                        assert(dynamic_cast<HeapString *>(curr));
  426|      0|                        break;
  427|      0|                    default:
  ------------------
  |  Branch (427:21): [True: 0, False: 76.4M]
  ------------------
  428|      0|                        assert(false);
  429|      0|                        break;
  430|  76.4M|                }
  431|  76.4M|            }
  432|       |
  433|   289M|            if (s.children.size() > 0) {
  ------------------
  |  Branch (433:17): [True: 100M, False: 189M]
  ------------------
  434|   100M|                HeapEntity *next = s.children[s.children.size() - 1];
  435|   100M|                s.children.pop_back();
  436|   100M|                stack.emplace_back(next);  // CAUTION: s invalidated here
  437|   189M|            } else {
  438|   189M|                stack.pop_back();  // CAUTION: s invalidated here
  439|   189M|            }
  440|   289M|        }
  441|  88.8M|    }
vm.cpp:_ZZN7jsonnet8internal12_GLOBAL__N_14Heap8markFromEPNS1_10HeapEntityEEN5StateC2ES4_:
  357|   189M|            State(HeapEntity *ent) : ent(ent) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap15addIfHeapEntityEPNS1_10HeapEntityERNSt3__16vectorIS4_NS5_9allocatorIS4_EEEE:
  322|   100M|    {
  323|   100M|        vec.push_back(v);
  324|   100M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap8markFromENS1_5ValueE:
  344|  56.7M|    {
  345|  56.7M|        if (v.isHeap())
  ------------------
  |  Branch (345:13): [True: 9.57M, False: 47.1M]
  ------------------
  346|  9.57M|            markFrom(v.v.h);
  347|  56.7M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap5sweepEv:
  445|   136k|    {
  446|   136k|        lastMark++;
  447|       |        // Heap shrinks during this loop.  Do not cache entities.size().
  448|   192M|        for (unsigned long i = 0; i < entities.size(); ++i) {
  ------------------
  |  Branch (448:35): [True: 192M, False: 136k]
  ------------------
  449|   192M|            HeapEntity *x = entities[i];
  450|   192M|            if (x->mark != lastMark) {
  ------------------
  |  Branch (450:17): [True: 115M, False: 76.4M]
  ------------------
  451|   115M|                delete x;
  452|   115M|                if (i != entities.size() - 1) {
  ------------------
  |  Branch (452:21): [True: 115M, False: 109k]
  ------------------
  453|       |                    // Swap it with the back.
  454|   115M|                    entities[i] = entities[entities.size() - 1];
  455|   115M|                }
  456|   115M|                entities.pop_back();
  457|   115M|                --i;
  458|   115M|            }
  459|   192M|        }
  460|   136k|        lastNumEntities = numEntities = entities.size();
  461|   136k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_19HeapThunk4fillERKNS1_5ValueE:
  143|  29.5M|    {
  144|  29.5M|        content = v;
  145|  29.5M|        filled = true;
  146|  29.5M|        self = nullptr;
  147|  29.5M|        upValues.clear();
  148|  29.5M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapArrayEJRKNSt3__16vectorIPNS1_9HeapThunkENS5_9allocatorIS8_EEEEEEEPT_DpOT0_:
  477|  2.57M|    {
  478|  2.57M|        T *r = new T(std::forward<Args>(args)...);
  479|  2.57M|        entities.push_back(r);
  480|  2.57M|        r->mark = lastMark;
  481|  2.57M|        numEntities = entities.size();
  482|  2.57M|        return r;
  483|  2.57M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_19HeapArrayC2ERKNSt3__16vectorIPNS1_9HeapThunkENS3_9allocatorIS6_EEEE:
  158|  2.57M|    {
  159|  2.57M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_10HeapStringEJRKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEEEEEPT_DpOT0_:
  477|  46.7M|    {
  478|  46.7M|        T *r = new T(std::forward<Args>(args)...);
  479|  46.7M|        entities.push_back(r);
  480|  46.7M|        r->mark = lastMark;
  481|  46.7M|        numEntities = entities.size();
  482|  46.7M|        return r;
  483|  46.7M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapStringC2ERKNSt3__112basic_stringIDiNS3_11char_traitsIDiEENS3_9allocatorIDiEEEE:
  281|  46.7M|    HeapString(const UString &value) : HeapEntity(STRING), value(value) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierEDniDnEEEPT_DpOT0_:
  477|   248k|    {
  478|   248k|        T *r = new T(std::forward<Args>(args)...);
  479|   248k|        entities.push_back(r);
  480|   248k|        r->mark = lastMark;
  481|   248k|        numEntities = entities.size();
  482|   248k|        return r;
  483|   248k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111HeapClosure5ParamC2EPKNS0_10IdentifierEPKNS0_3ASTE:
  259|  19.3M|        Param(const Identifier *id, const AST *def) : id(id), def(def) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_11HeapClosureEJNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS5_4lessIS9_EENS5_9allocatorINS5_4pairIKS9_SB_EEEEEEDniRKNS5_6vectorINS4_5ParamENSE_ISL_EEEERPNS0_3ASTERKNS5_12basic_stringIcNS5_11char_traitsIcEENSE_IcEEEEEEEPT_DpOT0_:
  477|  9.66M|    {
  478|  9.66M|        T *r = new T(std::forward<Args>(args)...);
  479|  9.66M|        entities.push_back(r);
  480|  9.66M|        r->mark = lastMark;
  481|  9.66M|        numEntities = entities.size();
  482|  9.66M|        return r;
  483|  9.66M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111HeapClosureC2ERKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS3_4lessIS7_EENS3_9allocatorINS3_4pairIKS7_S9_EEEEEEPNS1_10HeapObjectEjRKNS3_6vectorINS2_5ParamENSC_ISN_EEEEPKNS0_3ASTERKNS3_12basic_stringIcNS3_11char_traitsIcEENSC_IcEEEE:
  274|  11.7M|    {
  275|  11.7M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_114HeapLeafObjectC2ENS1_10HeapEntity4TypeE:
  164|  1.68M|    HeapLeafObject(Type type) : HeapObject(type) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapObjectC2ENS1_10HeapEntity4TypeE:
  107|  2.92M|    HeapObject(Type type) : HeapEntity(type) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJDnDniPKNS0_3ASTEEEEPT_DpOT0_:
  477|  3.81k|    {
  478|  3.81k|        T *r = new T(std::forward<Args>(args)...);
  479|  3.81k|        entities.push_back(r);
  480|  3.81k|        r->mark = lastMark;
  481|  3.81k|        numEntities = entities.size();
  482|  3.81k|        return r;
  483|  3.81k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJPNS0_10IdentifierERPNS1_10HeapObjectEiRKPNS0_3ASTEEEEPT_DpOT0_:
  477|   582k|    {
  478|   582k|        T *r = new T(std::forward<Args>(args)...);
  479|   582k|        entities.push_back(r);
  480|   582k|        r->mark = lastMark;
  481|   582k|        numEntities = entities.size();
  482|   582k|        return r;
  483|   582k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14HeapD2Ev:
  337|  3.81k|    {
  338|       |        // Nothing is marked, everything will be collected.
  339|  3.81k|        sweep();
  340|  3.81k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  477|  30.4M|    {
  478|  30.4M|        T *r = new T(std::forward<Args>(args)...);
  479|  30.4M|        entities.push_back(r);
  480|  30.4M|        r->mark = lastMark;
  481|  30.4M|        numEntities = entities.size();
  482|  30.4M|        return r;
  483|  30.4M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_11HeapClosureEJRKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS5_4lessIS9_EENS5_9allocatorINS5_4pairIKS9_SB_EEEEEERPNS1_10HeapObjectERjRKNS5_6vectorINS4_5ParamENSE_ISR_EEEERPNS0_3ASTERA1_KcEEEPT_DpOT0_:
  477|  2.10M|    {
  478|  2.10M|        T *r = new T(std::forward<Args>(args)...);
  479|  2.10M|        entities.push_back(r);
  480|  2.10M|        r->mark = lastMark;
  481|  2.10M|        numEntities = entities.size();
  482|  2.10M|        return r;
  483|  2.10M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRKPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  477|  20.0M|    {
  478|  20.0M|        T *r = new T(std::forward<Args>(args)...);
  479|  20.0M|        entities.push_back(r);
  480|  20.0M|        r->mark = lastMark;
  481|  20.0M|        numEntities = entities.size();
  482|  20.0M|        return r;
  483|  20.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_16HeapSimpleObjectEJRNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS5_4lessIS9_EENS5_9allocatorINS5_4pairIKS9_SB_EEEEEERNS6_IS9_NS4_5FieldESD_NSE_INSF_ISG_SL_EEEEEERNS5_4listIPNS0_3ASTENSE_ISS_EEEEEEEPT_DpOT0_:
  477|  1.68M|    {
  478|  1.68M|        T *r = new T(std::forward<Args>(args)...);
  479|  1.68M|        entities.push_back(r);
  480|  1.68M|        r->mark = lastMark;
  481|  1.68M|        numEntities = entities.size();
  482|  1.68M|        return r;
  483|  1.68M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116HeapSimpleObjectC2ERKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS3_4lessIS7_EENS3_9allocatorINS3_4pairIKS7_S9_EEEEEENS4_IS7_NS2_5FieldESB_NSC_INSD_ISE_SK_EEEEEENS3_4listIPNS0_3ASTENSC_ISQ_EEEE:
  195|  1.68M|    {
  196|  1.68M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPKNS0_3ASTEEEEPT_DpOT0_:
  477|    198|    {
  478|    198|        T *r = new T(std::forward<Args>(args)...);
  479|    198|        entities.push_back(r);
  480|    198|        r->mark = lastMark;
  481|    198|        numEntities = entities.size();
  482|    198|        return r;
  483|    198|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_18HeapExtendedObjectEJRPNS1_10HeapObjectES7_EEEPT_DpOT0_:
  477|  1.24M|    {
  478|  1.24M|        T *r = new T(std::forward<Args>(args)...);
  479|  1.24M|        entities.push_back(r);
  480|  1.24M|        r->mark = lastMark;
  481|  1.24M|        numEntities = entities.size();
  482|  1.24M|        return r;
  483|  1.24M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_118HeapExtendedObjectC2EPNS1_10HeapObjectES4_:
  209|  1.24M|    {
  210|  1.24M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRPNS0_3ASTEEEEPT_DpOT0_:
  477|   335k|    {
  478|   335k|        T *r = new T(std::forward<Args>(args)...);
  479|   335k|        entities.push_back(r);
  480|   335k|        r->mark = lastMark;
  481|   335k|        numEntities = entities.size();
  482|   335k|        return r;
  483|   335k|    }

_ZN7jsonnet8internal23jsonnet_static_analysisEPNS0_3ASTE:
  228|  8.53k|{
  229|  8.53k|    static_analysis(ast, false, IdSet{});
  230|  8.53k|}
static_analysis.cpp:_ZN7jsonnet8internalL15static_analysisEPNS0_3ASTEbRKNSt3__13setIPKNS0_10IdentifierENS3_4lessIS7_EENS3_9allocatorIS7_EEEE:
   41|   261M|{
   42|   261M|    IdSet r;
   43|       |
   44|   261M|    switch (ast_->type) {
   45|  23.5M|    case AST_APPLY: {
  ------------------
  |  Branch (45:5): [True: 23.5M, False: 238M]
  ------------------
   46|  23.5M|        assert(dynamic_cast<Apply *>(ast_));
   47|      0|        auto* ast = static_cast<Apply *>(ast_);
   48|  23.5M|        append(r, static_analysis(ast->target, in_object, vars));
   49|  23.5M|        for (const auto &arg : ast->args)
  ------------------
  |  Branch (49:30): [True: 38.7M, False: 23.5M]
  ------------------
   50|  38.7M|            append(r, static_analysis(arg.expr, in_object, vars));
   51|  23.5M|    } break;
   52|      0|    case AST_APPLY_BRACE: {
  ------------------
  |  Branch (52:5): [True: 0, False: 261M]
  ------------------
   53|      0|        assert(dynamic_cast<ApplyBrace *>(ast_));
   54|       |        // Nothing to do.
   55|      0|    } break;
   56|  5.36M|    case AST_ARRAY: {
  ------------------
  |  Branch (56:5): [True: 5.36M, False: 256M]
  ------------------
   57|  5.36M|        assert(dynamic_cast<Array *>(ast_));
   58|      0|        auto* ast = static_cast<Array *>(ast_);
   59|  5.36M|        for (auto &el : ast->elements)
  ------------------
  |  Branch (59:23): [True: 8.08M, False: 5.36M]
  ------------------
   60|  8.08M|            append(r, static_analysis(el.expr, in_object, vars));
   61|  5.36M|    } break;
   62|  23.7M|    case AST_BINARY: {
  ------------------
  |  Branch (62:5): [True: 23.7M, False: 238M]
  ------------------
   63|  23.7M|        assert(dynamic_cast<Binary *>(ast_));
   64|      0|        auto* ast = static_cast<Binary *>(ast_);
   65|  23.7M|        append(r, static_analysis(ast->left, in_object, vars));
   66|  23.7M|        append(r, static_analysis(ast->right, in_object, vars));
   67|  23.7M|    } break;
   68|   332k|    case AST_BUILTIN_FUNCTION: {
  ------------------
  |  Branch (68:5): [True: 332k, False: 261M]
  ------------------
   69|   332k|        assert(dynamic_cast<BuiltinFunction *>(ast_));
   70|       |        // Nothing to do.
   71|   332k|    } break;
   72|  9.77M|    case AST_CONDITIONAL: {
  ------------------
  |  Branch (72:5): [True: 9.77M, False: 252M]
  ------------------
   73|  9.77M|        assert(dynamic_cast<Conditional *>(ast_));
   74|      0|        auto* ast = static_cast<Conditional *>(ast_);
   75|  9.77M|        append(r, static_analysis(ast->cond, in_object, vars));
   76|  9.77M|        append(r, static_analysis(ast->branchTrue, in_object, vars));
   77|  9.77M|        append(r, static_analysis(ast->branchFalse, in_object, vars));
   78|  9.77M|    } break;
   79|  5.12M|    case AST_ERROR: {
  ------------------
  |  Branch (79:5): [True: 5.12M, False: 256M]
  ------------------
   80|  5.12M|        assert(dynamic_cast<Error *>(ast_));
   81|      0|        auto* ast = static_cast<Error *>(ast_);
   82|  5.12M|        append(r, static_analysis(ast->expr, in_object, vars));
   83|  5.12M|    } break;
   84|  5.93M|    case AST_FUNCTION: {
  ------------------
  |  Branch (84:5): [True: 5.93M, False: 255M]
  ------------------
   85|  5.93M|        assert(dynamic_cast<Function *>(ast_));
   86|      0|        auto* ast = static_cast<Function *>(ast_);
   87|  5.93M|        auto new_vars = vars;
   88|  5.93M|        IdSet params;
   89|  10.8M|        for (const auto &p : ast->params) {
  ------------------
  |  Branch (89:28): [True: 10.8M, False: 5.93M]
  ------------------
   90|  10.8M|            if (params.find(p.id) != params.end()) {
  ------------------
  |  Branch (90:17): [True: 22, False: 10.8M]
  ------------------
   91|     22|                std::string msg = "Duplicate function parameter: " + encode_utf8(p.id->name);
   92|     22|                throw StaticError(ast_->location, msg);
   93|     22|            }
   94|  10.8M|            params.insert(p.id);
   95|  10.8M|            new_vars.insert(p.id);
   96|  10.8M|        }
   97|       |
   98|  5.93M|        auto fv = static_analysis(ast->body, in_object, new_vars);
   99|  10.8M|        for (const auto &p : ast->params) {
  ------------------
  |  Branch (99:28): [True: 10.8M, False: 5.93M]
  ------------------
  100|  10.8M|            if (p.expr != nullptr)
  ------------------
  |  Branch (100:17): [True: 185k, False: 10.6M]
  ------------------
  101|   185k|                append(fv, static_analysis(p.expr, in_object, new_vars));
  102|  10.8M|        }
  103|  5.93M|        for (const auto &p : ast->params)
  ------------------
  |  Branch (103:28): [True: 10.8M, False: 5.93M]
  ------------------
  104|  10.8M|            fv.erase(p.id);
  105|  5.93M|        append(r, fv);
  106|  5.93M|    } break;
  107|    391|    case AST_IMPORT: {
  ------------------
  |  Branch (107:5): [True: 391, False: 261M]
  ------------------
  108|    391|        assert(dynamic_cast<Import *>(ast_));
  109|       |        // Nothing to do.
  110|    391|    } break;
  111|    387|    case AST_IMPORTSTR: {
  ------------------
  |  Branch (111:5): [True: 387, False: 261M]
  ------------------
  112|    387|        assert(dynamic_cast<Importstr *>(ast_));
  113|       |        // Nothing to do.
  114|    387|    } break;
  115|    416|    case AST_IMPORTBIN: {
  ------------------
  |  Branch (115:5): [True: 416, False: 261M]
  ------------------
  116|    416|        assert(dynamic_cast<Importbin *>(ast_));
  117|       |        // Nothing to do.
  118|    416|    } break;
  119|   145k|    case AST_IN_SUPER: {
  ------------------
  |  Branch (119:5): [True: 145k, False: 261M]
  ------------------
  120|   145k|        assert(dynamic_cast<const InSuper *>(ast_));
  121|      0|        auto* ast = static_cast<const InSuper *>(ast_);
  122|   145k|        if (!in_object)
  ------------------
  |  Branch (122:13): [True: 1, False: 145k]
  ------------------
  123|      1|            throw StaticError(ast_->location, "Can't use super outside of an object.");
  124|   145k|        append(r, static_analysis(ast->element, in_object, vars));
  125|   145k|    } break;
  126|  25.6M|    case AST_INDEX: {
  ------------------
  |  Branch (126:5): [True: 25.6M, False: 236M]
  ------------------
  127|  25.6M|        assert(dynamic_cast<const Index *>(ast_));
  128|      0|        auto* ast = static_cast<const Index *>(ast_);
  129|  25.6M|        append(r, static_analysis(ast->target, in_object, vars));
  130|  25.6M|        append(r, static_analysis(ast->index, in_object, vars));
  131|  25.6M|    } break;
  132|  12.4M|    case AST_LOCAL: {
  ------------------
  |  Branch (132:5): [True: 12.4M, False: 249M]
  ------------------
  133|  12.4M|        assert(dynamic_cast<const Local *>(ast_));
  134|      0|        auto* ast = static_cast<const Local *>(ast_);
  135|  12.4M|        IdSet ast_vars;
  136|  20.8M|        for (const auto &bind : ast->binds) {
  ------------------
  |  Branch (136:31): [True: 20.8M, False: 12.4M]
  ------------------
  137|  20.8M|            ast_vars.insert(bind.var);
  138|  20.8M|        }
  139|  12.4M|        auto new_vars = vars;
  140|  12.4M|        append(new_vars, ast_vars);
  141|  12.4M|        IdSet fvs;
  142|  20.8M|        for (const auto &bind : ast->binds) {
  ------------------
  |  Branch (142:31): [True: 20.8M, False: 12.4M]
  ------------------
  143|  20.8M|            append(fvs, static_analysis(bind.body, in_object, new_vars));
  144|  20.8M|        }
  145|       |
  146|  12.4M|        append(fvs, static_analysis(ast->body, in_object, new_vars));
  147|       |
  148|  12.4M|        for (const auto &bind : ast->binds)
  ------------------
  |  Branch (148:31): [True: 20.8M, False: 12.4M]
  ------------------
  149|  20.8M|            fvs.erase(bind.var);
  150|       |
  151|  12.4M|        append(r, fvs);
  152|  12.4M|    } break;
  153|   875k|    case AST_LITERAL_BOOLEAN: {
  ------------------
  |  Branch (153:5): [True: 875k, False: 260M]
  ------------------
  154|   875k|        assert(dynamic_cast<const LiteralBoolean *>(ast_));
  155|       |        // Nothing to do.
  156|   875k|    } break;
  157|  17.3M|    case AST_LITERAL_NUMBER: {
  ------------------
  |  Branch (157:5): [True: 17.3M, False: 244M]
  ------------------
  158|  17.3M|        assert(dynamic_cast<const LiteralNumber *>(ast_));
  159|       |        // Nothing to do.
  160|  17.3M|    } break;
  161|  45.9M|    case AST_LITERAL_STRING: {
  ------------------
  |  Branch (161:5): [True: 45.9M, False: 215M]
  ------------------
  162|  45.9M|        assert(dynamic_cast<const LiteralString *>(ast_));
  163|       |        // Nothing to do.
  164|  45.9M|    } break;
  165|   411k|    case AST_LITERAL_NULL: {
  ------------------
  |  Branch (165:5): [True: 411k, False: 261M]
  ------------------
  166|   411k|        assert(dynamic_cast<const LiteralNull *>(ast_));
  167|       |        // Nothing to do.
  168|   411k|    } break;
  169|  1.81M|    case AST_DESUGARED_OBJECT: {
  ------------------
  |  Branch (169:5): [True: 1.81M, False: 259M]
  ------------------
  170|  1.81M|        assert(dynamic_cast<DesugaredObject *>(ast_));
  171|      0|        auto* ast = static_cast<DesugaredObject *>(ast_);
  172|  7.23M|        for (auto &field : ast->fields) {
  ------------------
  |  Branch (172:26): [True: 7.23M, False: 1.81M]
  ------------------
  173|  7.23M|            append(r, static_analysis(field.name, in_object, vars));
  174|  7.23M|            append(r, static_analysis(field.body, true, vars));
  175|  7.23M|        }
  176|  1.81M|        for (AST *assert : ast->asserts) {
  ------------------
  |  Branch (176:26): [True: 184k, False: 1.81M]
  ------------------
  177|   184k|            append(r, static_analysis(assert, true, vars));
  178|   184k|        }
  179|  1.81M|    } break;
  180|   998k|    case AST_OBJECT_COMPREHENSION_SIMPLE: {
  ------------------
  |  Branch (180:5): [True: 998k, False: 260M]
  ------------------
  181|   998k|        assert(dynamic_cast<ObjectComprehensionSimple *>(ast_));
  182|      0|        auto* ast = static_cast<ObjectComprehensionSimple *>(ast_);
  183|   998k|        auto new_vars = vars;
  184|   998k|        new_vars.insert(ast->id);
  185|   998k|        append(r, static_analysis(ast->field, false, new_vars));
  186|   998k|        append(r, static_analysis(ast->value, true, new_vars));
  187|   998k|        r.erase(ast->id);
  188|   998k|        append(r, static_analysis(ast->array, in_object, vars));
  189|   998k|    } break;
  190|  2.16M|    case AST_SELF: {
  ------------------
  |  Branch (190:5): [True: 2.16M, False: 259M]
  ------------------
  191|  2.16M|        assert(dynamic_cast<const Self *>(ast_));
  192|  2.16M|        if (!in_object)
  ------------------
  |  Branch (192:13): [True: 2, False: 2.16M]
  ------------------
  193|      2|            throw StaticError(ast_->location, "Can't use self outside of an object.");
  194|  2.16M|    } break;
  195|  2.16M|    case AST_SUPER_INDEX: {
  ------------------
  |  Branch (195:5): [True: 145k, False: 261M]
  ------------------
  196|   145k|        assert(dynamic_cast<const SuperIndex *>(ast_));
  197|      0|        auto* ast = static_cast<const SuperIndex *>(ast_);
  198|   145k|        if (!in_object)
  ------------------
  |  Branch (198:13): [True: 4, False: 145k]
  ------------------
  199|      4|            throw StaticError(ast_->location, "Can't use super outside of an object.");
  200|   145k|        append(r, static_analysis(ast->index, in_object, vars));
  201|   145k|    } break;
  202|   877k|    case AST_UNARY: {
  ------------------
  |  Branch (202:5): [True: 877k, False: 260M]
  ------------------
  203|   877k|        assert(dynamic_cast<const Unary *>(ast_));
  204|      0|        auto* ast = static_cast<const Unary *>(ast_);
  205|   877k|        append(r, static_analysis(ast->expr, in_object, vars));
  206|   877k|    } break;
  207|  79.1M|    case AST_VAR: {
  ------------------
  |  Branch (207:5): [True: 79.1M, False: 182M]
  ------------------
  208|  79.1M|        assert(dynamic_cast<const Var *>(ast_));
  209|      0|        auto* ast = static_cast<const Var *>(ast_);
  210|  79.1M|        if (vars.find(ast->id) == vars.end()) {
  ------------------
  |  Branch (210:13): [True: 887, False: 79.1M]
  ------------------
  211|    887|            throw StaticError(ast->location, "Unknown variable: " + encode_utf8(ast->id->name));
  212|    887|        }
  213|  79.1M|        r.insert(ast->id);
  214|  79.1M|    } break;
  215|      0|    default:
  ------------------
  |  Branch (215:5): [True: 0, False: 261M]
  ------------------
  216|      0|        std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_ << std::endl;
  217|      0|        std::abort();
  218|      0|        break;
  219|   261M|    }
  220|       |
  221|   261M|    for (auto *id : r)
  ------------------
  |  Branch (221:19): [True: 345M, False: 261M]
  ------------------
  222|   345M|        ast_->freeVariables.push_back(id);
  223|       |
  224|   261M|    return r;
  225|   261M|}
static_analysis.cpp:_ZN7jsonnet8internalL6appendERNSt3__13setIPKNS0_10IdentifierENS1_4lessIS5_EENS1_9allocatorIS5_EEEERKSA_:
   29|   286M|{
   30|   286M|    r.insert(s.begin(), s.end());
   31|   286M|}

libjsonnet.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_11StaticErrorE:
  108|  5.12k|{
  109|  5.12k|    o << err.toString();
  110|  5.12k|    return o;
  111|  5.12k|}
_ZNK7jsonnet8internal11StaticError8toStringEv:
   97|  5.12k|    {
   98|  5.12k|        std::stringstream ss;
   99|  5.12k|        if (location.isSet()) {
  ------------------
  |  Branch (99:13): [True: 5.12k, False: 2]
  ------------------
  100|  5.12k|            ss << location << ":";
  101|  5.12k|        }
  102|  5.12k|        ss << " " << msg;
  103|  5.12k|        return ss.str();
  104|  5.12k|    }
_ZNK7jsonnet8internal13LocationRange5isSetEv:
   58|   457k|    {
   59|   457k|        return begin.isSet();
   60|   457k|    }
_ZNK7jsonnet8internal8Location5isSetEv:
   31|   457k|    {
   32|   457k|        return line != 0;
   33|   457k|    }
libjsonnet.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_13LocationRangeE:
   64|  28.0k|{
   65|  28.0k|    if (loc.file.length() > 0)
  ------------------
  |  Branch (65:9): [True: 12.3k, False: 15.7k]
  ------------------
   66|  12.3k|        o << loc.file;
   67|  28.0k|    if (loc.isSet()) {
  ------------------
  |  Branch (67:9): [True: 26.7k, False: 1.31k]
  ------------------
   68|  26.7k|        if (loc.file.length() > 0)
  ------------------
  |  Branch (68:13): [True: 11.1k, False: 15.6k]
  ------------------
   69|  11.1k|            o << ":";
   70|  26.7k|        if (loc.begin.line == loc.end.line) {
  ------------------
  |  Branch (70:13): [True: 24.8k, False: 1.97k]
  ------------------
   71|  24.8k|            if (loc.begin.column == loc.end.column - 1) {
  ------------------
  |  Branch (71:17): [True: 6.96k, False: 17.8k]
  ------------------
   72|  6.96k|                o << loc.begin;
   73|  17.8k|            } else {
   74|  17.8k|                o << loc.begin << "-" << loc.end.column;
   75|  17.8k|            }
   76|  24.8k|        } else {
   77|  1.97k|            o << "(" << loc.begin << ")-(" << loc.end << ")";
   78|  1.97k|        }
   79|  26.7k|    }
   80|  28.0k|    return o;
   81|  28.0k|}
libjsonnet.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_8LocationE:
   41|  28.7k|{
   42|  28.7k|    o << loc.line << ":" << loc.column;
   43|  28.7k|    return o;
   44|  28.7k|}
_ZN7jsonnet8internal8LocationC2Ev:
   28|  5.36M|    Location(void) : line(0), column(0) {}
_ZN7jsonnet8internal8LocationC2Emm:
   29|   247M|    Location(unsigned long line, unsigned long column) : line(line), column(column) {}
_ZNK7jsonnet8internal8Location9successorEv:
   35|    636|    {
   36|    636|        return Location(this->line, this->column + 1);
   37|    636|    }
_ZN7jsonnet8internal13LocationRangeC2Ev:
   50|  2.67M|    LocationRange(void) {}
_ZN7jsonnet8internal13LocationRangeC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   52|  7.60k|    LocationRange(const std::string &msg) : file(msg) {}
_ZN7jsonnet8internal13LocationRangeC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS0_8LocationESD_:
   55|   187M|    {
   56|   187M|    }
_ZN7jsonnet8internal11StaticErrorC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS0_8LocationESA_:
   89|    636|    {
   90|    636|    }
_ZN7jsonnet8internal11StaticErrorC2ERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
   93|  4.49k|    {
   94|  4.49k|    }

_ZN7jsonnet8internal22jsonnet_string_unparseERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEEb:
   25|   453k|{
   26|   453k|    UStringStream ss;
   27|   453k|    ss << (single ? U'\'' : U'\"');
  ------------------
  |  Branch (27:12): [True: 0, False: 453k]
  ------------------
   28|   453k|    ss << jsonnet_string_escape(str, single);
   29|   453k|    ss << (single ? U'\'' : U'\"');
  ------------------
  |  Branch (29:12): [True: 0, False: 453k]
  ------------------
   30|   453k|    return ss.str();
   31|   453k|}
_ZN7jsonnet8internal21jsonnet_string_escapeERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEEb:
   34|   453k|{
   35|   453k|    UStringStream ss;
   36|   144M|    for (std::size_t i = 0; i < str.length(); ++i) {
  ------------------
  |  Branch (36:29): [True: 144M, False: 453k]
  ------------------
   37|   144M|        char32_t c = str[i];
   38|   144M|        switch (c) {
   39|   790k|            case U'\"': ss << (single ? U"\"" : U"\\\""); break;
  ------------------
  |  Branch (39:13): [True: 790k, False: 143M]
  |  Branch (39:32): [True: 0, False: 790k]
  ------------------
   40|  52.4k|            case U'\'': ss << (single ? U"\\\'" : U"\'"); break;
  ------------------
  |  Branch (40:13): [True: 52.4k, False: 144M]
  |  Branch (40:32): [True: 0, False: 52.4k]
  ------------------
   41|  3.97M|            case U'\\': ss << U"\\\\"; break;
  ------------------
  |  Branch (41:13): [True: 3.97M, False: 140M]
  ------------------
   42|   327k|            case U'\b': ss << U"\\b"; break;
  ------------------
  |  Branch (42:13): [True: 327k, False: 144M]
  ------------------
   43|  28.1k|            case U'\f': ss << U"\\f"; break;
  ------------------
  |  Branch (43:13): [True: 28.1k, False: 144M]
  ------------------
   44|  2.51M|            case U'\n': ss << U"\\n"; break;
  ------------------
  |  Branch (44:13): [True: 2.51M, False: 142M]
  ------------------
   45|  1.55M|            case U'\r': ss << U"\\r"; break;
  ------------------
  |  Branch (45:13): [True: 1.55M, False: 142M]
  ------------------
   46|  1.30M|            case U'\t': ss << U"\\t"; break;
  ------------------
  |  Branch (46:13): [True: 1.30M, False: 143M]
  ------------------
   47|    769|            case U'\0': ss << U"\\u0000"; break;
  ------------------
  |  Branch (47:13): [True: 769, False: 144M]
  ------------------
   48|   133M|            default: {
  ------------------
  |  Branch (48:13): [True: 133M, False: 10.5M]
  ------------------
   49|   133M|                if (c < 0x20 || (c >= 0x7f && c <= 0x9f)) {
  ------------------
  |  Branch (49:21): [True: 46.6M, False: 87.3M]
  |  Branch (49:34): [True: 13.8M, False: 73.5M]
  |  Branch (49:47): [True: 2.06M, False: 11.7M]
  ------------------
   50|       |                    // Unprintable, use \u
   51|  48.7M|                    std::stringstream ss8;
   52|  48.7M|                    ss8 << "\\u" << std::hex << std::setfill('0') << std::setw(4)
   53|  48.7M|                        << (unsigned long)(c);
   54|  48.7M|                    ss << decode_utf8(ss8.str());
   55|  85.2M|                } else {
   56|       |                    // Printable, write verbatim
   57|  85.2M|                    ss << c;
   58|  85.2M|                }
   59|   133M|            }
   60|   144M|        }
   61|   144M|    }
   62|   453k|    return ss.str();
   63|   453k|}
_ZN7jsonnet8internal28jsonnet_string_parse_unicodeERKNS0_13LocationRangeEPKDi:
   66|  24.6k|{
   67|  24.6k|    unsigned long codepoint = 0;
   68|       |    // Expect 4 hex digits.
   69|   123k|    for (unsigned i = 0; i < 4; ++i) {
  ------------------
  |  Branch (69:26): [True: 98.5k, False: 24.5k]
  ------------------
   70|  98.5k|        auto x = (unsigned char)(c[i]);
   71|  98.5k|        unsigned digit;
   72|  98.5k|        if (x == '\0') {
  ------------------
  |  Branch (72:13): [True: 27, False: 98.5k]
  ------------------
   73|     27|            auto msg = "Truncated unicode escape sequence in string literal.";
   74|     27|            throw StaticError(loc, msg);
   75|  98.5k|        } else if (x >= '0' && x <= '9') {
  ------------------
  |  Branch (75:20): [True: 98.4k, False: 20]
  |  Branch (75:32): [True: 79.4k, False: 19.0k]
  ------------------
   76|  79.4k|            digit = x - '0';
   77|  79.4k|        } else if (x >= 'a' && x <= 'f') {
  ------------------
  |  Branch (77:20): [True: 6.48k, False: 12.5k]
  |  Branch (77:32): [True: 6.46k, False: 24]
  ------------------
   78|  6.46k|            digit = x - 'a' + 10;
   79|  12.5k|        } else if (x >= 'A' && x <= 'F') {
  ------------------
  |  Branch (79:20): [True: 12.5k, False: 33]
  |  Branch (79:32): [True: 12.4k, False: 47]
  ------------------
   80|  12.4k|            digit = x - 'A' + 10;
   81|  12.4k|        } else {
   82|     80|            std::stringstream ss;
   83|     80|            ss << "Malformed unicode escape character, "
   84|     80|               << "should be hex: '" << x << "'";
   85|     80|            throw StaticError(loc, ss.str());
   86|     80|        }
   87|  98.4k|        codepoint *= 16;
   88|  98.4k|        codepoint += digit;
   89|  98.4k|    }
   90|  24.5k|    return codepoint;
   91|  24.6k|}
_ZN7jsonnet8internal16is_bmp_codepointEm:
   94|  24.1k|{
   95|  24.1k|    return codepoint < 0xd800 || (codepoint >= 0xe000 && codepoint < 0x10000);
  ------------------
  |  Branch (95:12): [True: 22.6k, False: 1.41k]
  |  Branch (95:35): [True: 921, False: 493]
  |  Branch (95:58): [True: 921, False: 0]
  ------------------
   96|  24.1k|}
_ZN7jsonnet8internal23decode_utf16_surrogatesERKNS0_13LocationRangeEmm:
   99|    457|{
  100|    457|    if (high >= 0xd800 && high < 0xdc00 && low >= 0xdc00 && low < 0xe000) {
  ------------------
  |  Branch (100:9): [True: 457, False: 0]
  |  Branch (100:27): [True: 455, False: 2]
  |  Branch (100:44): [True: 437, False: 18]
  |  Branch (100:61): [True: 433, False: 4]
  ------------------
  101|    433|        return 0x10000 + ((high & 0x03ff) << 10) + (low & 0x03ff);
  102|    433|    } else {
  103|     24|        std::stringstream ss;
  104|     24|        ss << "Invalid UTF-16 bytes";
  105|     24|        throw StaticError(loc, ss.str());
  106|     24|    }
  107|    457|}
_ZN7jsonnet8internal23jsonnet_string_unescapeERKNS0_13LocationRangeERKNSt3__112basic_stringIDiNS4_11char_traitsIDiEENS4_9allocatorIDiEEEE:
  110|  10.3M|{
  111|  10.3M|    UString r;
  112|  10.3M|    const char32_t *s_ptr = s.c_str();
  113|   115M|    for (const char32_t *c = s_ptr; *c != U'\0'; ++c) {
  ------------------
  |  Branch (113:37): [True: 105M, False: 10.3M]
  ------------------
  114|   105M|        switch (*c) {
  115|   526k|            case '\\':
  ------------------
  |  Branch (115:13): [True: 526k, False: 104M]
  ------------------
  116|   526k|                switch (*(++c)) {
  117|  20.2k|                    case '"':
  ------------------
  |  Branch (117:21): [True: 20.2k, False: 506k]
  ------------------
  118|  20.6k|                    case '\'': r += *c; break;
  ------------------
  |  Branch (118:21): [True: 360, False: 526k]
  ------------------
  119|       |
  120|   161k|                    case '\\': r += *c; break;
  ------------------
  |  Branch (120:21): [True: 161k, False: 364k]
  ------------------
  121|       |
  122|    523|                    case '/': r += *c; break;
  ------------------
  |  Branch (122:21): [True: 523, False: 526k]
  ------------------
  123|       |
  124|  16.4k|                    case 'b': r += '\b'; break;
  ------------------
  |  Branch (124:21): [True: 16.4k, False: 510k]
  ------------------
  125|       |
  126|  21.3k|                    case 'f': r += '\f'; break;
  ------------------
  |  Branch (126:21): [True: 21.3k, False: 505k]
  ------------------
  127|       |
  128|   239k|                    case 'n': r += '\n'; break;
  ------------------
  |  Branch (128:21): [True: 239k, False: 286k]
  ------------------
  129|       |
  130|  17.5k|                    case 'r': r += '\r'; break;
  ------------------
  |  Branch (130:21): [True: 17.5k, False: 509k]
  ------------------
  131|       |
  132|  24.2k|                    case 't': r += '\t'; break;
  ------------------
  |  Branch (132:21): [True: 24.2k, False: 502k]
  ------------------
  133|       |
  134|  24.2k|                    case 'u': {
  ------------------
  |  Branch (134:21): [True: 24.2k, False: 502k]
  ------------------
  135|  24.2k|                        ++c;  // Consume the 'u'.
  136|  24.2k|                        unsigned long codepoint = jsonnet_string_parse_unicode(loc, c);
  137|       |
  138|       |                        // Leave us on the last char, ready for the ++c at
  139|       |                        // the outer for loop.
  140|  24.2k|                        c += 3;
  141|  24.2k|                        if (!is_bmp_codepoint(codepoint)) {
  ------------------
  |  Branch (141:29): [True: 493, False: 23.7k]
  ------------------
  142|    493|                           if (*(++c) != '\\') {
  ------------------
  |  Branch (142:32): [True: 22, False: 471]
  ------------------
  143|     22|                                std::stringstream ss;
  144|     22|                                ss << "Invalid non-BMP Unicode escape in string literal";
  145|     22|                                throw StaticError(loc, ss.str());
  146|     22|                           }
  147|    471|                           if (*(++c) != 'u') {
  ------------------
  |  Branch (147:32): [True: 7, False: 464]
  ------------------
  148|      7|                                std::stringstream ss;
  149|      7|                                ss << "Invalid non-BMP Unicode escape in string literal";
  150|      7|                                throw StaticError(loc, ss.str());
  151|      7|                           }
  152|    464|                           ++c;
  153|    464|                           unsigned long codepoint2 = jsonnet_string_parse_unicode(loc, c);
  154|    464|                           c += 3;
  155|    464|                           codepoint = decode_utf16_surrogates(loc, codepoint, codepoint2);
  156|    464|                       }
  157|  24.1k|                       r += codepoint;
  158|  24.1k|                    } break;
  159|       |
  160|      2|                    case '\0': {
  ------------------
  |  Branch (160:21): [True: 2, False: 526k]
  ------------------
  161|      2|                        auto msg = "Truncated escape sequence in string literal.";
  162|      2|                        throw StaticError(loc, msg);
  163|  24.2k|                    }
  164|       |
  165|    151|                    default: {
  ------------------
  |  Branch (165:21): [True: 151, False: 526k]
  ------------------
  166|    151|                        std::stringstream ss;
  167|    151|                        std::string utf8;
  168|    151|                        encode_utf8(*c, utf8);
  169|    151|                        ss << "Unknown escape sequence in string literal: '" << utf8 << "'";
  170|    151|                        throw StaticError(loc, ss.str());
  171|  24.2k|                    }
  172|   526k|                }
  173|   526k|                break;
  174|       |
  175|   104M|            default:
  ------------------
  |  Branch (175:13): [True: 104M, False: 526k]
  ------------------
  176|       |                // Just a regular letter.
  177|   104M|                r += *c;
  178|   105M|        }
  179|   105M|    }
  180|  10.3M|    return r;
  181|  10.3M|}

_ZN7jsonnet8internal13UStringStreamlsERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  155|  64.2M|    {
  156|  64.2M|        buf.append(s);
  157|  64.2M|        return *this;
  158|  64.2M|    }
_ZN7jsonnet8internal13UStringStreamlsEPKDi:
  160|  17.3M|    {
  161|  17.3M|        buf.append(s);
  162|  17.3M|        return *this;
  163|  17.3M|    }
_ZN7jsonnet8internal13UStringStreamlsEDi:
  165|  86.1M|    {
  166|  86.1M|        buf.push_back(c);
  167|  86.1M|        return *this;
  168|  86.1M|    }
_ZN7jsonnet8internal13UStringStream3strEv:
  179|  7.08M|    {
  180|  7.08M|        return buf;
  181|  7.08M|    }
parser.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  41.6M|{
  141|  41.6M|    UString r;
  142|   306M|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 265M, False: 41.6M]
  ------------------
  143|   265M|        r.push_back(decode_utf8(s, i));
  144|  41.6M|    return r;
  145|  41.6M|}
parser.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|   265M|{
   76|   265M|    char c0 = str[i];
   77|   265M|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 262M, False: 2.54M]
  ------------------
   78|   262M|        return c0;
   79|   262M|    } else if ((c0 & 0xE0) == 0xC0) {  // 110yyyxx 10xxxxxx
  ------------------
  |  Branch (79:16): [True: 300k, False: 2.24M]
  ------------------
   80|   300k|        if (i + 1 >= str.length()) {
  ------------------
  |  Branch (80:13): [True: 895, False: 299k]
  ------------------
   81|    895|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|    895|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   82|    895|        }
   83|   299k|        char c1 = str[++i];
   84|   299k|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (84:13): [True: 292k, False: 7.70k]
  ------------------
   85|   292k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|   292k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   86|   292k|        }
   87|  7.70k|        return ((c0 & 0x1F) << 6ul) | (c1 & 0x3F);
   88|  2.24M|    } else if ((c0 & 0xF0) == 0xE0) {  // 1110yyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (88:16): [True: 98.8k, False: 2.14M]
  ------------------
   89|  98.8k|        if (i + 2 >= str.length()) {
  ------------------
  |  Branch (89:13): [True: 6.77k, False: 92.0k]
  ------------------
   90|  6.77k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  6.77k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   91|  6.77k|        }
   92|  92.0k|        char c1 = str[++i];
   93|  92.0k|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (93:13): [True: 57.5k, False: 34.5k]
  ------------------
   94|  57.5k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  57.5k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   95|  57.5k|        }
   96|  34.5k|        char c2 = str[++i];
   97|  34.5k|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (97:13): [True: 2.26k, False: 32.3k]
  ------------------
   98|  2.26k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  2.26k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   99|  2.26k|        }
  100|  32.3k|        return ((c0 & 0xF) << 12ul) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
  101|  2.14M|    } else if ((c0 & 0xF8) == 0xF0) {  // 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (101:16): [True: 181k, False: 1.96M]
  ------------------
  102|   181k|        if (i + 3 >= str.length()) {
  ------------------
  |  Branch (102:13): [True: 1.99k, False: 179k]
  ------------------
  103|  1.99k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  1.99k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  104|  1.99k|        }
  105|   179k|        char c1 = str[++i];
  106|   179k|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (106:13): [True: 35.3k, False: 143k]
  ------------------
  107|  35.3k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  35.3k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  108|  35.3k|        }
  109|   143k|        char c2 = str[++i];
  110|   143k|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (110:13): [True: 1.48k, False: 142k]
  ------------------
  111|  1.48k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  1.48k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  112|  1.48k|        }
  113|   142k|        char c3 = str[++i];
  114|   142k|        if ((c3 & 0xC0) != 0x80) {
  ------------------
  |  Branch (114:13): [True: 2.24k, False: 139k]
  ------------------
  115|  2.24k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  2.24k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  116|  2.24k|        }
  117|   139k|        return ((c0 & 0x7) << 24ul) | ((c1 & 0x3F) << 12ul) | ((c2 & 0x3F) << 6) | (c3 & 0x3F);
  118|  1.96M|    } else {
  119|  1.96M|        return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  1.96M|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  120|  1.96M|    }
  121|   265M|}
static_analysis.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEE:
  133|    909|{
  134|    909|    std::string r;
  135|    909|    encode_utf8(s, r);
  136|    909|    return r;
  137|    909|}
static_analysis.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEERNS2_IcNS3_IcEENS5_IcEEEE:
  127|    909|{
  128|    909|    for (char32_t cp : s)
  ------------------
  |  Branch (128:22): [True: 11.8M, False: 909]
  ------------------
  129|  11.8M|        encode_utf8(cp, r);
  130|    909|}
static_analysis.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|  11.8M|{
   34|  11.8M|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|  11.8M|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 0, False: 11.8M]
  ------------------
   35|      0|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|  11.8M|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|  11.8M|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 11.8M, False: 0]
  ------------------
   41|  11.8M|        s.push_back((char)x);
   42|  11.8M|        return 1;
   43|  11.8M|    } else if (x < 0x800) {  // note that capital 'Y' bits must be 0
  ------------------
  |  Branch (43:16): [True: 0, False: 0]
  ------------------
   44|      0|        bytes |= 0xC080;
   45|      0|        s.push_back((bytes >> 8) & 0xFF);
   46|      0|        s.push_back((bytes >> 0) & 0xFF);
   47|      0|        return 2;
   48|      0|    } else if (x < 0x10000) {  // note that 'z' bits must be 0
  ------------------
  |  Branch (48:16): [True: 0, False: 0]
  ------------------
   49|      0|        bytes |= 0xE08080;
   50|      0|        s.push_back((bytes >> 16) & 0xFF);
   51|      0|        s.push_back((bytes >> 8) & 0xFF);
   52|      0|        s.push_back((bytes >> 0) & 0xFF);
   53|      0|        return 3;
   54|      0|    } else if (x < 0x110000) {  // note that capital 'Z' bits must be 0
  ------------------
  |  Branch (54:16): [True: 0, False: 0]
  ------------------
   55|      0|        bytes |= 0xF0808080;
   56|      0|        s.push_back((bytes >> 24) & 0xFF);
   57|      0|        s.push_back((bytes >> 16) & 0xFF);
   58|      0|        s.push_back((bytes >> 8) & 0xFF);
   59|      0|        s.push_back((bytes >> 0) & 0xFF);
   60|      0|        return 4;
   61|      0|    } else {
   62|      0|        std::cerr << "Should never get here." << std::endl;
   63|      0|        abort();
   64|      0|    }
   65|  11.8M|}
vm.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  4.67M|{
  141|  4.67M|    UString r;
  142|  18.4M|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 13.7M, False: 4.67M]
  ------------------
  143|  13.7M|        r.push_back(decode_utf8(s, i));
  144|  4.67M|    return r;
  145|  4.67M|}
vm.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|  13.7M|{
   76|  13.7M|    char c0 = str[i];
   77|  13.7M|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 13.7M, False: 0]
  ------------------
   78|  13.7M|        return c0;
   79|  13.7M|    } else if ((c0 & 0xE0) == 0xC0) {  // 110yyyxx 10xxxxxx
  ------------------
  |  Branch (79:16): [True: 0, False: 0]
  ------------------
   80|      0|        if (i + 1 >= str.length()) {
  ------------------
  |  Branch (80:13): [True: 0, False: 0]
  ------------------
   81|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   82|      0|        }
   83|      0|        char c1 = str[++i];
   84|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (84:13): [True: 0, False: 0]
  ------------------
   85|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   86|      0|        }
   87|      0|        return ((c0 & 0x1F) << 6ul) | (c1 & 0x3F);
   88|      0|    } else if ((c0 & 0xF0) == 0xE0) {  // 1110yyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (88:16): [True: 0, False: 0]
  ------------------
   89|      0|        if (i + 2 >= str.length()) {
  ------------------
  |  Branch (89:13): [True: 0, False: 0]
  ------------------
   90|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   91|      0|        }
   92|      0|        char c1 = str[++i];
   93|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (93:13): [True: 0, False: 0]
  ------------------
   94|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   95|      0|        }
   96|      0|        char c2 = str[++i];
   97|      0|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  ------------------
   98|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   99|      0|        }
  100|      0|        return ((c0 & 0xF) << 12ul) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
  101|      0|    } else if ((c0 & 0xF8) == 0xF0) {  // 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (101:16): [True: 0, False: 0]
  ------------------
  102|      0|        if (i + 3 >= str.length()) {
  ------------------
  |  Branch (102:13): [True: 0, False: 0]
  ------------------
  103|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  104|      0|        }
  105|      0|        char c1 = str[++i];
  106|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (106:13): [True: 0, False: 0]
  ------------------
  107|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  108|      0|        }
  109|      0|        char c2 = str[++i];
  110|      0|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (110:13): [True: 0, False: 0]
  ------------------
  111|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  112|      0|        }
  113|      0|        char c3 = str[++i];
  114|      0|        if ((c3 & 0xC0) != 0x80) {
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  116|      0|        }
  117|      0|        return ((c0 & 0x7) << 24ul) | ((c1 & 0x3F) << 12ul) | ((c2 & 0x3F) << 6) | (c3 & 0x3F);
  118|      0|    } else {
  119|      0|        return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  120|      0|    }
  121|  13.7M|}
vm.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEE:
  133|   754k|{
  134|   754k|    std::string r;
  135|   754k|    encode_utf8(s, r);
  136|   754k|    return r;
  137|   754k|}
vm.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEERNS2_IcNS3_IcEENS5_IcEEEE:
  127|   754k|{
  128|   754k|    for (char32_t cp : s)
  ------------------
  |  Branch (128:22): [True: 95.5M, False: 754k]
  ------------------
  129|  95.5M|        encode_utf8(cp, r);
  130|   754k|}
vm.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|  95.5M|{
   34|  95.5M|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|  95.5M|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 30.0k, False: 95.5M]
  ------------------
   35|  30.0k|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  30.0k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|  95.5M|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|  95.5M|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 93.4M, False: 2.05M]
  ------------------
   41|  93.4M|        s.push_back((char)x);
   42|  93.4M|        return 1;
   43|  93.4M|    } else if (x < 0x800) {  // note that capital 'Y' bits must be 0
  ------------------
  |  Branch (43:16): [True: 1.73k, False: 2.05M]
  ------------------
   44|  1.73k|        bytes |= 0xC080;
   45|  1.73k|        s.push_back((bytes >> 8) & 0xFF);
   46|  1.73k|        s.push_back((bytes >> 0) & 0xFF);
   47|  1.73k|        return 2;
   48|  2.05M|    } else if (x < 0x10000) {  // note that 'z' bits must be 0
  ------------------
  |  Branch (48:16): [True: 2.05M, False: 1.74k]
  ------------------
   49|  2.05M|        bytes |= 0xE08080;
   50|  2.05M|        s.push_back((bytes >> 16) & 0xFF);
   51|  2.05M|        s.push_back((bytes >> 8) & 0xFF);
   52|  2.05M|        s.push_back((bytes >> 0) & 0xFF);
   53|  2.05M|        return 3;
   54|  2.05M|    } else if (x < 0x110000) {  // note that capital 'Z' bits must be 0
  ------------------
  |  Branch (54:16): [True: 1.74k, False: 0]
  ------------------
   55|  1.74k|        bytes |= 0xF0808080;
   56|  1.74k|        s.push_back((bytes >> 24) & 0xFF);
   57|  1.74k|        s.push_back((bytes >> 16) & 0xFF);
   58|  1.74k|        s.push_back((bytes >> 8) & 0xFF);
   59|  1.74k|        s.push_back((bytes >> 0) & 0xFF);
   60|  1.74k|        return 4;
   61|  1.74k|    } else {
   62|      0|        std::cerr << "Should never get here." << std::endl;
   63|      0|        abort();
   64|      0|    }
   65|  95.5M|}
_ZN7jsonnet8internal13UStringStreamlsIiEERS1_T_:
  171|  1.01M|    {
  172|  1.01M|        std::stringstream ss;
  173|  1.01M|        ss << c;
  174|  1.01M|        for (char c : ss.str())
  ------------------
  |  Branch (174:21): [True: 1.50M, False: 1.01M]
  ------------------
  175|  1.50M|            buf.push_back(char32_t(c));
  176|  1.01M|        return *this;
  177|  1.01M|    }
_ZN7jsonnet8internal13UStringStreamlsIjEERS1_T_:
  171|   166k|    {
  172|   166k|        std::stringstream ss;
  173|   166k|        ss << c;
  174|   166k|        for (char c : ss.str())
  ------------------
  |  Branch (174:21): [True: 568k, False: 166k]
  ------------------
  175|   568k|            buf.push_back(char32_t(c));
  176|   166k|        return *this;
  177|   166k|    }
desugarer.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEE:
  133|   332k|{
  134|   332k|    std::string r;
  135|   332k|    encode_utf8(s, r);
  136|   332k|    return r;
  137|   332k|}
desugarer.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEERNS2_IcNS3_IcEENS5_IcEEEE:
  127|   332k|{
  128|   332k|    for (char32_t cp : s)
  ------------------
  |  Branch (128:22): [True: 2.18M, False: 332k]
  ------------------
  129|  2.18M|        encode_utf8(cp, r);
  130|   332k|}
desugarer.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|  2.18M|{
   34|  2.18M|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|  2.18M|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 0, False: 2.18M]
  ------------------
   35|      0|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|  2.18M|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|  2.18M|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 2.18M, False: 0]
  ------------------
   41|  2.18M|        s.push_back((char)x);
   42|  2.18M|        return 1;
   43|  2.18M|    } else if (x < 0x800) {  // note that capital 'Y' bits must be 0
  ------------------
  |  Branch (43:16): [True: 0, False: 0]
  ------------------
   44|      0|        bytes |= 0xC080;
   45|      0|        s.push_back((bytes >> 8) & 0xFF);
   46|      0|        s.push_back((bytes >> 0) & 0xFF);
   47|      0|        return 2;
   48|      0|    } else if (x < 0x10000) {  // note that 'z' bits must be 0
  ------------------
  |  Branch (48:16): [True: 0, False: 0]
  ------------------
   49|      0|        bytes |= 0xE08080;
   50|      0|        s.push_back((bytes >> 16) & 0xFF);
   51|      0|        s.push_back((bytes >> 8) & 0xFF);
   52|      0|        s.push_back((bytes >> 0) & 0xFF);
   53|      0|        return 3;
   54|      0|    } else if (x < 0x110000) {  // note that capital 'Z' bits must be 0
  ------------------
  |  Branch (54:16): [True: 0, False: 0]
  ------------------
   55|      0|        bytes |= 0xF0808080;
   56|      0|        s.push_back((bytes >> 24) & 0xFF);
   57|      0|        s.push_back((bytes >> 16) & 0xFF);
   58|      0|        s.push_back((bytes >> 8) & 0xFF);
   59|      0|        s.push_back((bytes >> 0) & 0xFF);
   60|      0|        return 4;
   61|      0|    } else {
   62|      0|        std::cerr << "Should never get here." << std::endl;
   63|      0|        abort();
   64|      0|    }
   65|  2.18M|}
desugarer.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  8.53k|{
  141|  8.53k|    UString r;
  142|  54.2k|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 45.7k, False: 8.53k]
  ------------------
  143|  45.7k|        r.push_back(decode_utf8(s, i));
  144|  8.53k|    return r;
  145|  8.53k|}
desugarer.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|  45.7k|{
   76|  45.7k|    char c0 = str[i];
   77|  45.7k|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 45.7k, False: 0]
  ------------------
   78|  45.7k|        return c0;
   79|  45.7k|    } else if ((c0 & 0xE0) == 0xC0) {  // 110yyyxx 10xxxxxx
  ------------------
  |  Branch (79:16): [True: 0, False: 0]
  ------------------
   80|      0|        if (i + 1 >= str.length()) {
  ------------------
  |  Branch (80:13): [True: 0, False: 0]
  ------------------
   81|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   82|      0|        }
   83|      0|        char c1 = str[++i];
   84|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (84:13): [True: 0, False: 0]
  ------------------
   85|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   86|      0|        }
   87|      0|        return ((c0 & 0x1F) << 6ul) | (c1 & 0x3F);
   88|      0|    } else if ((c0 & 0xF0) == 0xE0) {  // 1110yyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (88:16): [True: 0, False: 0]
  ------------------
   89|      0|        if (i + 2 >= str.length()) {
  ------------------
  |  Branch (89:13): [True: 0, False: 0]
  ------------------
   90|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   91|      0|        }
   92|      0|        char c1 = str[++i];
   93|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (93:13): [True: 0, False: 0]
  ------------------
   94|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   95|      0|        }
   96|      0|        char c2 = str[++i];
   97|      0|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  ------------------
   98|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   99|      0|        }
  100|      0|        return ((c0 & 0xF) << 12ul) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
  101|      0|    } else if ((c0 & 0xF8) == 0xF0) {  // 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (101:16): [True: 0, False: 0]
  ------------------
  102|      0|        if (i + 3 >= str.length()) {
  ------------------
  |  Branch (102:13): [True: 0, False: 0]
  ------------------
  103|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  104|      0|        }
  105|      0|        char c1 = str[++i];
  106|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (106:13): [True: 0, False: 0]
  ------------------
  107|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  108|      0|        }
  109|      0|        char c2 = str[++i];
  110|      0|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (110:13): [True: 0, False: 0]
  ------------------
  111|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  112|      0|        }
  113|      0|        char c3 = str[++i];
  114|      0|        if ((c3 & 0xC0) != 0x80) {
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  116|      0|        }
  117|      0|        return ((c0 & 0x7) << 24ul) | ((c1 & 0x3F) << 12ul) | ((c2 & 0x3F) << 6) | (c3 & 0x3F);
  118|      0|    } else {
  119|      0|        return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  120|      0|    }
  121|  45.7k|}
string_utils.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  48.7M|{
  141|  48.7M|    UString r;
  142|   341M|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 292M, False: 48.7M]
  ------------------
  143|   292M|        r.push_back(decode_utf8(s, i));
  144|  48.7M|    return r;
  145|  48.7M|}
string_utils.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|   292M|{
   76|   292M|    char c0 = str[i];
   77|   292M|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 292M, False: 0]
  ------------------
   78|   292M|        return c0;
   79|   292M|    } else if ((c0 & 0xE0) == 0xC0) {  // 110yyyxx 10xxxxxx
  ------------------
  |  Branch (79:16): [True: 0, False: 0]
  ------------------
   80|      0|        if (i + 1 >= str.length()) {
  ------------------
  |  Branch (80:13): [True: 0, False: 0]
  ------------------
   81|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   82|      0|        }
   83|      0|        char c1 = str[++i];
   84|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (84:13): [True: 0, False: 0]
  ------------------
   85|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   86|      0|        }
   87|      0|        return ((c0 & 0x1F) << 6ul) | (c1 & 0x3F);
   88|      0|    } else if ((c0 & 0xF0) == 0xE0) {  // 1110yyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (88:16): [True: 0, False: 0]
  ------------------
   89|      0|        if (i + 2 >= str.length()) {
  ------------------
  |  Branch (89:13): [True: 0, False: 0]
  ------------------
   90|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   91|      0|        }
   92|      0|        char c1 = str[++i];
   93|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (93:13): [True: 0, False: 0]
  ------------------
   94|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   95|      0|        }
   96|      0|        char c2 = str[++i];
   97|      0|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  ------------------
   98|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   99|      0|        }
  100|      0|        return ((c0 & 0xF) << 12ul) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
  101|      0|    } else if ((c0 & 0xF8) == 0xF0) {  // 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (101:16): [True: 0, False: 0]
  ------------------
  102|      0|        if (i + 3 >= str.length()) {
  ------------------
  |  Branch (102:13): [True: 0, False: 0]
  ------------------
  103|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  104|      0|        }
  105|      0|        char c1 = str[++i];
  106|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (106:13): [True: 0, False: 0]
  ------------------
  107|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  108|      0|        }
  109|      0|        char c2 = str[++i];
  110|      0|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (110:13): [True: 0, False: 0]
  ------------------
  111|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  112|      0|        }
  113|      0|        char c3 = str[++i];
  114|      0|        if ((c3 & 0xC0) != 0x80) {
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  116|      0|        }
  117|      0|        return ((c0 & 0x7) << 24ul) | ((c1 & 0x3F) << 12ul) | ((c2 & 0x3F) << 6) | (c3 & 0x3F);
  118|      0|    } else {
  119|      0|        return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  120|      0|    }
  121|   292M|}
string_utils.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|    151|{
   34|    151|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|    151|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 4, False: 147]
  ------------------
   35|      4|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      4|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|    151|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|    151|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 93, False: 58]
  ------------------
   41|     93|        s.push_back((char)x);
   42|     93|        return 1;
   43|     93|    } else if (x < 0x800) {  // note that capital 'Y' bits must be 0
  ------------------
  |  Branch (43:16): [True: 4, False: 54]
  ------------------
   44|      4|        bytes |= 0xC080;
   45|      4|        s.push_back((bytes >> 8) & 0xFF);
   46|      4|        s.push_back((bytes >> 0) & 0xFF);
   47|      4|        return 2;
   48|     54|    } else if (x < 0x10000) {  // note that 'z' bits must be 0
  ------------------
  |  Branch (48:16): [True: 53, False: 1]
  ------------------
   49|     53|        bytes |= 0xE08080;
   50|     53|        s.push_back((bytes >> 16) & 0xFF);
   51|     53|        s.push_back((bytes >> 8) & 0xFF);
   52|     53|        s.push_back((bytes >> 0) & 0xFF);
   53|     53|        return 3;
   54|     53|    } else if (x < 0x110000) {  // note that capital 'Z' bits must be 0
  ------------------
  |  Branch (54:16): [True: 1, False: 0]
  ------------------
   55|      1|        bytes |= 0xF0808080;
   56|      1|        s.push_back((bytes >> 24) & 0xFF);
   57|      1|        s.push_back((bytes >> 16) & 0xFF);
   58|      1|        s.push_back((bytes >> 8) & 0xFF);
   59|      1|        s.push_back((bytes >> 0) & 0xFF);
   60|      1|        return 4;
   61|      1|    } else {
   62|      0|        std::cerr << "Should never get here." << std::endl;
   63|      0|        abort();
   64|      0|    }
   65|    151|}

_ZN7jsonnet8internal18jsonnet_vm_executeEPNS0_9AllocatorEPKNS0_3ASTERKNSt3__13mapINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENS0_5VmExtENS6_4lessISD_EENSB_INS6_4pairIKSD_SE_EEEEEEjddRKNS7_ISD_NS0_16VmNativeCallbackESG_NSB_INSH_ISI_SO_EEEEEEPFiPvPKcSW_PPcSY_PmESU_b:
 3334|  3.81k|{
 3335|  3.81k|    Interpreter vm(alloc,
 3336|  3.81k|                   ext_vars,
 3337|  3.81k|                   max_stack,
 3338|  3.81k|                   gc_min_objects,
 3339|  3.81k|                   gc_growth_trigger,
 3340|  3.81k|                   natives,
 3341|  3.81k|                   import_callback,
 3342|  3.81k|                   ctx);
 3343|  3.81k|    vm.evaluate(ast, 0);
 3344|  3.81k|    if (string_output) {
  ------------------
  |  Branch (3344:9): [True: 0, False: 3.81k]
  ------------------
 3345|      0|        return encode_utf8(vm.manifestString(LocationRange("During manifestation")));
 3346|  3.81k|    } else {
 3347|  3.81k|        return encode_utf8(vm.manifestJson(LocationRange("During manifestation"), true, U""));
 3348|  3.81k|    }
 3349|  3.81k|}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111InterpreterC2EPNS0_9AllocatorERKNSt3__13mapINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENS0_5VmExtENS5_4lessISC_EENSA_INS5_4pairIKSC_SD_EEEEEEjddRKNS6_ISC_NS0_16VmNativeCallbackESF_NSA_INSG_ISH_SN_EEEEEEPFiPvPKcSV_PPcSX_PmEST_:
  902|  3.81k|    {
  903|  3.81k|        scratch = makeNull();
  904|  3.81k|        builtins["makeArray"] = &Interpreter::builtinMakeArray;
  905|  3.81k|        builtins["pow"] = &Interpreter::builtinPow;
  906|  3.81k|        builtins["floor"] = &Interpreter::builtinFloor;
  907|  3.81k|        builtins["ceil"] = &Interpreter::builtinCeil;
  908|  3.81k|        builtins["sqrt"] = &Interpreter::builtinSqrt;
  909|  3.81k|        builtins["sin"] = &Interpreter::builtinSin;
  910|  3.81k|        builtins["cos"] = &Interpreter::builtinCos;
  911|  3.81k|        builtins["tan"] = &Interpreter::builtinTan;
  912|  3.81k|        builtins["asin"] = &Interpreter::builtinAsin;
  913|  3.81k|        builtins["acos"] = &Interpreter::builtinAcos;
  914|  3.81k|        builtins["atan"] = &Interpreter::builtinAtan;
  915|  3.81k|        builtins["type"] = &Interpreter::builtinType;
  916|  3.81k|        builtins["filter"] = &Interpreter::builtinFilter;
  917|  3.81k|        builtins["objectHasEx"] = &Interpreter::builtinObjectHasEx;
  918|  3.81k|        builtins["length"] = &Interpreter::builtinLength;
  919|  3.81k|        builtins["objectFieldsEx"] = &Interpreter::builtinObjectFieldsEx;
  920|  3.81k|        builtins["codepoint"] = &Interpreter::builtinCodepoint;
  921|  3.81k|        builtins["char"] = &Interpreter::builtinChar;
  922|  3.81k|        builtins["log"] = &Interpreter::builtinLog;
  923|  3.81k|        builtins["exp"] = &Interpreter::builtinExp;
  924|  3.81k|        builtins["mantissa"] = &Interpreter::builtinMantissa;
  925|  3.81k|        builtins["exponent"] = &Interpreter::builtinExponent;
  926|  3.81k|        builtins["modulo"] = &Interpreter::builtinModulo;
  927|  3.81k|        builtins["extVar"] = &Interpreter::builtinExtVar;
  928|  3.81k|        builtins["primitiveEquals"] = &Interpreter::builtinPrimitiveEquals;
  929|  3.81k|        builtins["native"] = &Interpreter::builtinNative;
  930|  3.81k|        builtins["md5"] = &Interpreter::builtinMd5;
  931|  3.81k|        builtins["trace"] = &Interpreter::builtinTrace;
  932|  3.81k|        builtins["splitLimit"] = &Interpreter::builtinSplitLimit;
  933|  3.81k|        builtins["substr"] = &Interpreter::builtinSubstr;
  934|  3.81k|        builtins["range"] = &Interpreter::builtinRange;
  935|  3.81k|        builtins["strReplace"] = &Interpreter::builtinStrReplace;
  936|  3.81k|        builtins["asciiLower"] = &Interpreter::builtinAsciiLower;
  937|  3.81k|        builtins["asciiUpper"] = &Interpreter::builtinAsciiUpper;
  938|  3.81k|        builtins["join"] = &Interpreter::builtinJoin;
  939|  3.81k|        builtins["parseJson"] = &Interpreter::builtinParseJson;
  940|  3.81k|        builtins["parseYaml"] = &Interpreter::builtinParseYaml;
  941|  3.81k|        builtins["encodeUTF8"] = &Interpreter::builtinEncodeUTF8;
  942|  3.81k|        builtins["decodeUTF8"] = &Interpreter::builtinDecodeUTF8;
  943|       |
  944|  3.81k|        DesugaredObject *stdlib = makeStdlibAST(alloc, "__internal__");
  945|  3.81k|        jsonnet_static_analysis(stdlib);
  946|  3.81k|        stdlibAST = stdlib; // stdlibAST is const, so we need to do analysis before this assignment
  947|  3.81k|        auto stdThunk = makeHeap<HeapThunk>(nullptr, nullptr, 0, static_cast<const AST*>(stdlibAST));
  948|  3.81k|        stack.newCall(stdThunk->body->location, stdThunk, stdThunk->self, stdThunk->offset, stdThunk->upValues);
  949|  3.81k|        evaluate(stdThunk->body, 0);
  950|  3.81k|        stdObject = dynamic_cast<HeapObject*>(scratch.v.h);
  951|  3.81k|        prepareSourceValThunks();
  952|  3.81k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15StackC2Ej:
  248|  3.81k|    Stack(unsigned limit) : calls(0), limit(limit) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeNullEv:
  624|   135k|    {
  625|   135k|        Value r;
  626|   135k|        r.t = Value::NULL_TYPE;
  627|   135k|        return r;
  628|   135k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack3topEv:
  281|   727M|    {
  282|   727M|        return stack.back();
  283|   727M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter19validateBuiltinArgsERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_6vectorINS1_5ValueENSA_ISG_EEEENSF_INSG_4TypeENSA_ISL_EEEE:
  976|   173k|    {
  977|   173k|        if (args.size() == params.size()) {
  ------------------
  |  Branch (977:13): [True: 173k, False: 0]
  ------------------
  978|   481k|            for (std::size_t i = 0; i < args.size(); ++i) {
  ------------------
  |  Branch (978:37): [True: 308k, False: 173k]
  ------------------
  979|   308k|                if (args[i].t != params[i])
  ------------------
  |  Branch (979:21): [True: 0, False: 308k]
  ------------------
  980|      0|                    goto bad;
  981|   308k|            }
  982|   173k|            return;
  983|   173k|        }
  984|      0|    bad:;
  985|      0|        std::stringstream ss;
  986|      0|        ss << "Builtin function " + name + " expected (";
  987|      0|        const char *prefix = "";
  988|      0|        for (auto p : params) {
  ------------------
  |  Branch (988:21): [True: 0, False: 0]
  ------------------
  989|      0|            ss << prefix << type_str(p);
  990|      0|            prefix = ", ";
  991|      0|        }
  992|      0|        ss << ") but got (";
  993|      0|        prefix = "";
  994|      0|        for (auto a : args) {
  ------------------
  |  Branch (994:21): [True: 0, False: 0]
  ------------------
  995|      0|            ss << prefix << type_str(a);
  996|      0|            prefix = ", ";
  997|      0|        }
  998|      0|        ss << ")";
  999|      0|        throw makeError(loc, ss.str());
 1000|   173k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter9makeErrorERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
  557|  1.28k|    {
  558|  1.28k|        return stack.makeError(loc, msg);
  559|  1.28k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack9makeErrorERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
  358|  2.09k|    {
  359|  2.09k|        std::vector<TraceFrame> stack_trace;
  360|  2.09k|        stack_trace.push_back(TraceFrame(loc));
  361|  1.45M|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (361:40): [True: 1.45M, False: 2.09k]
  ------------------
  362|  1.45M|            const auto &f = stack[i];
  363|  1.45M|            if (f.isCall()) {
  ------------------
  |  Branch (363:17): [True: 424k, False: 1.02M]
  ------------------
  364|   424k|                if (f.context != nullptr) {
  ------------------
  |  Branch (364:21): [True: 424k, False: 0]
  ------------------
  365|       |                    // Give the last line a name.
  366|   424k|                    stack_trace[stack_trace.size() - 1].name = getName(i, f.context);
  367|   424k|                }
  368|   424k|                if (f.location.isSet() || f.location.file.length() > 0)
  ------------------
  |  Branch (368:21): [True: 351k, False: 73.0k]
  |  Branch (368:43): [True: 1.15k, False: 71.8k]
  ------------------
  369|   352k|                    stack_trace.push_back(TraceFrame(f.location));
  370|   424k|            }
  371|  1.45M|        }
  372|  2.09k|        return RuntimeError(stack_trace, msg);
  373|  2.09k|    }
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_15Frame6isCallEv:
  231|   407M|    {
  232|   407M|        return kind == FRAME_CALL;
  233|   407M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack7getNameEjPKNS1_10HeapEntityE:
  303|   424k|    {
  304|   424k|        std::string name;
  305|  1.43M|        for (int i = from_here - 1; i >= 0; --i) {
  ------------------
  |  Branch (305:37): [True: 1.42M, False: 2.06k]
  ------------------
  306|  1.42M|            const auto &f = stack[i];
  307|  1.42M|            for (const auto &pair : f.bindings) {
  ------------------
  |  Branch (307:35): [True: 670k, False: 1.42M]
  ------------------
  308|   670k|                HeapThunk *thunk = pair.second;
  309|   670k|                if (!thunk->filled)
  ------------------
  |  Branch (309:21): [True: 313k, False: 357k]
  ------------------
  310|   313k|                    continue;
  311|   357k|                if (!thunk->content.isHeap())
  ------------------
  |  Branch (311:21): [True: 81.9k, False: 275k]
  ------------------
  312|  81.9k|                    continue;
  313|   275k|                if (e != thunk->content.v.h)
  ------------------
  |  Branch (313:21): [True: 187k, False: 87.1k]
  ------------------
  314|   187k|                    continue;
  315|  87.1k|                name = encode_utf8(pair.first->name);
  316|  87.1k|            }
  317|       |            // Do not go into the next call frame, keep local reasoning.
  318|  1.42M|            if (f.isCall())
  ------------------
  |  Branch (318:17): [True: 422k, False: 1.00M]
  ------------------
  319|   422k|                break;
  320|  1.42M|        }
  321|       |
  322|   424k|        if (name == "")
  ------------------
  |  Branch (322:13): [True: 337k, False: 87.1k]
  ------------------
  323|   337k|            name = "anonymous";
  324|   424k|        if (dynamic_cast<const HeapObject *>(e)) {
  ------------------
  |  Branch (324:13): [True: 248k, False: 175k]
  ------------------
  325|   248k|            return "object <" + name + ">";
  326|   248k|        } else if (auto *thunk = dynamic_cast<const HeapThunk *>(e)) {
  ------------------
  |  Branch (326:26): [True: 88.2k, False: 87.6k]
  ------------------
  327|  88.2k|            if (thunk->name == nullptr) {
  ------------------
  |  Branch (327:17): [True: 6.06k, False: 82.1k]
  ------------------
  328|  6.06k|                return "";  // Argument of builtin, or root (since top level functions).
  329|  82.1k|            } else {
  330|  82.1k|                return "thunk <" + encode_utf8(thunk->name->name) + ">";
  331|  82.1k|            }
  332|  88.2k|        } else {
  333|  87.6k|            const auto *func = static_cast<const HeapClosure *>(e);
  334|  87.6k|            if (func->body == nullptr) {
  ------------------
  |  Branch (334:17): [True: 0, False: 87.6k]
  ------------------
  335|      0|                return "builtin function <" + func->builtinName + ">";
  336|      0|            }
  337|  87.6k|            return "function <" + name + ">";
  338|  87.6k|        }
  339|   424k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack4markERNS1_4HeapE:
  274|   132k|    {
  275|  28.2M|        for (const auto &f : stack) {
  ------------------
  |  Branch (275:28): [True: 28.2M, False: 132k]
  ------------------
  276|  28.2M|            f.mark(heap);
  277|  28.2M|        }
  278|   132k|    }
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_15Frame4markERNS1_4HeapE:
  215|  28.2M|    {
  216|  28.2M|        heap.markFrom(val);
  217|  28.2M|        heap.markFrom(val2);
  218|  28.2M|        if (context)
  ------------------
  |  Branch (218:13): [True: 16.1M, False: 12.1M]
  ------------------
  219|  16.1M|            heap.markFrom(context);
  220|  28.2M|        if (self)
  ------------------
  |  Branch (220:13): [True: 16.1M, False: 12.1M]
  ------------------
  221|  16.1M|            heap.markFrom(self);
  222|  28.2M|        for (const auto &bind : bindings)
  ------------------
  |  Branch (222:31): [True: 24.6M, False: 28.2M]
  ------------------
  223|  24.6M|            heap.markFrom(bind.second);
  224|  28.2M|        for (const auto &el : elements)
  ------------------
  |  Branch (224:29): [True: 0, False: 28.2M]
  ------------------
  225|      0|            heap.markFrom(el.second);
  226|  28.2M|        for (const auto &th : thunks)
  ------------------
  |  Branch (226:29): [True: 1.88M, False: 28.2M]
  ------------------
  227|  1.88M|            heap.markFrom(th);
  228|  28.2M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10makeNumberEd:
  605|  12.0M|    {
  606|  12.0M|        Value r;
  607|  12.0M|        r.t = Value::NUMBER;
  608|  12.0M|        r.v.d = v;
  609|  12.0M|        return r;
  610|  12.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter9makeArrayERKNSt3__16vectorIPNS1_9HeapThunkENS3_9allocatorIS6_EEEE:
  631|  2.57M|    {
  632|  2.57M|        Value r;
  633|  2.57M|        r.t = Value::ARRAY;
  634|  2.57M|        r.v.h = makeHeap<HeapArray>(v);
  635|  2.57M|        return r;
  636|  2.57M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapArrayEJRKNSt3__16vectorIPNS1_9HeapThunkENS5_9allocatorIS8_EEEEEEEPT_DpOT0_:
  567|  2.57M|    {
  568|  2.57M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  569|  2.57M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (569:13): [True: 3.62k, False: 2.57M]
  ------------------
  570|       |            // Avoid the object we just made being collected.
  571|  3.62k|            heap.markFrom(r);
  572|       |
  573|       |            // Mark from the stack.
  574|  3.62k|            stack.mark(heap);
  575|       |
  576|       |            // Mark from the scratch register
  577|  3.62k|            heap.markFrom(scratch);
  578|       |
  579|       |            // Mark from cached imports
  580|  3.62k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (580:35): [True: 0, False: 3.62k]
  ------------------
  581|      0|                HeapThunk *thunk = pair.second->thunk;
  582|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (582:21): [True: 0, False: 0]
  ------------------
  583|      0|                    heap.markFrom(thunk);
  584|      0|            }
  585|       |
  586|   554k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (586:40): [True: 554k, False: 3.62k]
  ------------------
  587|   554k|                heap.markFrom(sourceVal.second);
  588|   554k|            }
  589|       |
  590|       |            // Delete unreachable objects.
  591|  3.62k|            heap.sweep();
  592|  3.62k|        }
  593|  2.57M|        return r;
  594|  2.57M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10builtinPowERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1036|  3.84k|    {
 1037|  3.84k|        validateBuiltinArgs(loc, "pow", args, {Value::NUMBER, Value::NUMBER});
 1038|  3.84k|        scratch = makeNumberCheck(loc, std::pow(args[0].v.d, args[1].v.d));
 1039|  3.84k|        return nullptr;
 1040|  3.84k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter15makeNumberCheckERKNS0_13LocationRangeEd:
  613|  10.2M|    {
  614|  10.2M|        if (std::isnan(v)) {
  ------------------
  |  Branch (614:13): [True: 0, False: 10.2M]
  ------------------
  615|      0|            throw makeError(loc, "not a number");
  616|      0|        }
  617|  10.2M|        if (std::isinf(v)) {
  ------------------
  |  Branch (617:13): [True: 7, False: 10.2M]
  ------------------
  618|      7|            throw makeError(loc, "overflow");
  619|      7|        }
  620|  10.2M|        return makeNumber(v);
  621|  10.2M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter12builtinFloorERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1043|  35.2k|    {
 1044|  35.2k|        validateBuiltinArgs(loc, "floor", args, {Value::NUMBER});
 1045|  35.2k|        scratch = makeNumberCheck(loc, std::floor(args[0].v.d));
 1046|  35.2k|        return nullptr;
 1047|  35.2k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11builtinTypeERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1106|  3.39M|    {
 1107|  3.39M|        switch (args[0].t) {
  ------------------
  |  Branch (1107:17): [True: 0, False: 3.39M]
  ------------------
 1108|   180k|            case Value::NULL_TYPE: scratch = makeString(U"null"); return nullptr;
  ------------------
  |  Branch (1108:13): [True: 180k, False: 3.21M]
  ------------------
 1109|       |
 1110|   133k|            case Value::BOOLEAN: scratch = makeString(U"boolean"); return nullptr;
  ------------------
  |  Branch (1110:13): [True: 133k, False: 3.26M]
  ------------------
 1111|       |
 1112|   294k|            case Value::NUMBER: scratch = makeString(U"number"); return nullptr;
  ------------------
  |  Branch (1112:13): [True: 294k, False: 3.10M]
  ------------------
 1113|       |
 1114|  91.6k|            case Value::ARRAY: scratch = makeString(U"array"); return nullptr;
  ------------------
  |  Branch (1114:13): [True: 91.6k, False: 3.30M]
  ------------------
 1115|       |
 1116|  1.39k|            case Value::FUNCTION: scratch = makeString(U"function"); return nullptr;
  ------------------
  |  Branch (1116:13): [True: 1.39k, False: 3.39M]
  ------------------
 1117|       |
 1118|   260k|            case Value::OBJECT: scratch = makeString(U"object"); return nullptr;
  ------------------
  |  Branch (1118:13): [True: 260k, False: 3.13M]
  ------------------
 1119|       |
 1120|  2.43M|            case Value::STRING: scratch = makeString(U"string"); return nullptr;
  ------------------
  |  Branch (1120:13): [True: 2.43M, False: 961k]
  ------------------
 1121|  3.39M|        }
 1122|      0|        return nullptr;  // Quiet, compiler.
 1123|  3.39M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10makeStringERKNSt3__112basic_stringIDiNS3_11char_traitsIDiEENS3_9allocatorIDiEEEE:
  675|  46.7M|    {
  676|  46.7M|        Value r;
  677|  46.7M|        r.t = Value::STRING;
  678|  46.7M|        r.v.h = makeHeap<HeapString>(v);
  679|  46.7M|        return r;
  680|  46.7M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_10HeapStringEJRKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEEEEEPT_DpOT0_:
  567|  46.7M|    {
  568|  46.7M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  569|  46.7M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (569:13): [True: 52.0k, False: 46.6M]
  ------------------
  570|       |            // Avoid the object we just made being collected.
  571|  52.0k|            heap.markFrom(r);
  572|       |
  573|       |            // Mark from the stack.
  574|  52.0k|            stack.mark(heap);
  575|       |
  576|       |            // Mark from the scratch register
  577|  52.0k|            heap.markFrom(scratch);
  578|       |
  579|       |            // Mark from cached imports
  580|  52.0k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (580:35): [True: 0, False: 52.0k]
  ------------------
  581|      0|                HeapThunk *thunk = pair.second->thunk;
  582|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (582:21): [True: 0, False: 0]
  ------------------
  583|      0|                    heap.markFrom(thunk);
  584|      0|            }
  585|       |
  586|  7.95M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (586:40): [True: 7.95M, False: 52.0k]
  ------------------
  587|  7.95M|                heap.markFrom(sourceVal.second);
  588|  7.95M|            }
  589|       |
  590|       |            // Delete unreachable objects.
  591|  52.0k|            heap.sweep();
  592|  52.0k|        }
  593|  46.7M|        return r;
  594|  46.7M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter18builtinObjectHasExERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1153|    436|    {
 1154|    436|        validateBuiltinArgs(
 1155|    436|            loc, "objectHasEx", args, {Value::OBJECT, Value::STRING, Value::BOOLEAN});
 1156|    436|        const auto *obj = static_cast<const HeapObject *>(args[0].v.h);
 1157|    436|        const auto *str = static_cast<const HeapString *>(args[1].v.h);
 1158|    436|        bool include_hidden = args[2].v.b;
 1159|    436|        bool found = false;
 1160|  1.28k|        for (const auto &field : objectFields(obj, !include_hidden)) {
  ------------------
  |  Branch (1160:32): [True: 1.28k, False: 27]
  ------------------
 1161|  1.28k|            if (field->name == str->value) {
  ------------------
  |  Branch (1161:17): [True: 409, False: 876]
  ------------------
 1162|    409|                found = true;
 1163|    409|                break;
 1164|    409|            }
 1165|  1.28k|        }
 1166|    436|        scratch = makeBoolean(found);
 1167|    436|        return nullptr;
 1168|    436|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter12objectFieldsEPKNS1_10HeapObjectEb:
  756|   354k|    {
  757|   354k|        std::set<const Identifier *> r;
  758|   891k|        for (const auto &pair : objectFieldsAux(obj_)) {
  ------------------
  |  Branch (758:31): [True: 891k, False: 354k]
  ------------------
  759|   891k|            if (!manifesting || pair.second != ObjectField::HIDDEN)
  ------------------
  |  Branch (759:17): [True: 1.80k, False: 890k]
  |  Branch (759:33): [True: 843k, False: 46.3k]
  ------------------
  760|   845k|                r.insert(pair.first);
  761|   891k|        }
  762|   354k|        return r;
  763|   354k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter15objectFieldsAuxEPKNS1_10HeapObjectE:
  726|  35.6M|    {
  727|  35.6M|        IdHideMap r;
  728|  35.6M|        if (auto *obj = dynamic_cast<const HeapSimpleObject *>(obj_)) {
  ------------------
  |  Branch (728:19): [True: 17.9M, False: 17.6M]
  ------------------
  729|  19.2M|            for (const auto &f : obj->fields) {
  ------------------
  |  Branch (729:32): [True: 19.2M, False: 17.9M]
  ------------------
  730|  19.2M|                r[f.first] = f.second.hide;
  731|  19.2M|            }
  732|       |
  733|  17.9M|        } else if (auto *obj = dynamic_cast<const HeapExtendedObject *>(obj_)) {
  ------------------
  |  Branch (733:26): [True: 17.6M, False: 0]
  ------------------
  734|  17.6M|            r = objectFieldsAux(obj->right);
  735|  38.5M|            for (const auto &pair : objectFieldsAux(obj->left)) {
  ------------------
  |  Branch (735:35): [True: 38.5M, False: 17.6M]
  ------------------
  736|  38.5M|                auto it = r.find(pair.first);
  737|  38.5M|                if (it == r.end()) {
  ------------------
  |  Branch (737:21): [True: 20.2M, False: 18.3M]
  ------------------
  738|       |                    // First time it is seen
  739|  20.2M|                    r[pair.first] = pair.second;
  740|  20.2M|                } else if (it->second == ObjectField::INHERIT) {
  ------------------
  |  Branch (740:28): [True: 18.1M, False: 212k]
  ------------------
  741|       |                    // Seen before, but with inherited visibility so use new visibility
  742|  18.1M|                    r[pair.first] = pair.second;
  743|  18.1M|                }
  744|  38.5M|            }
  745|       |
  746|  17.6M|        } else if (auto *obj = dynamic_cast<const HeapComprehensionObject *>(obj_)) {
  ------------------
  |  Branch (746:26): [True: 0, False: 0]
  ------------------
  747|      0|            for (const auto &f : obj->compValues)
  ------------------
  |  Branch (747:32): [True: 0, False: 0]
  ------------------
  748|      0|                r[f.first] = ObjectField::VISIBLE;
  749|      0|        }
  750|  35.6M|        return r;
  751|  35.6M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11makeBooleanEb:
  597|  13.5M|    {
  598|  13.5M|        Value r;
  599|  13.5M|        r.t = Value::BOOLEAN;
  600|  13.5M|        r.v.b = v;
  601|  13.5M|        return r;
  602|  13.5M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13builtinLengthERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1171|   672k|    {
 1172|   672k|        if (args.size() != 1) {
  ------------------
  |  Branch (1172:13): [True: 0, False: 672k]
  ------------------
 1173|      0|            throw makeError(loc, "length takes 1 parameter.");
 1174|      0|        }
 1175|   672k|        HeapEntity *e = args[0].v.h;
 1176|   672k|        switch (args[0].t) {
 1177|    124|            case Value::OBJECT: {
  ------------------
  |  Branch (1177:13): [True: 124, False: 672k]
  ------------------
 1178|    124|                auto fields = objectFields(static_cast<HeapObject *>(e), true);
 1179|    124|                scratch = makeNumber(fields.size());
 1180|    124|            } break;
 1181|       |
 1182|   163k|            case Value::ARRAY:
  ------------------
  |  Branch (1182:13): [True: 163k, False: 508k]
  ------------------
 1183|   163k|                scratch = makeNumber(static_cast<HeapArray *>(e)->elements.size());
 1184|   163k|                break;
 1185|       |
 1186|   508k|            case Value::STRING:
  ------------------
  |  Branch (1186:13): [True: 508k, False: 163k]
  ------------------
 1187|   508k|                scratch = makeNumber(static_cast<HeapString *>(e)->value.length());
 1188|   508k|                break;
 1189|       |
 1190|      0|            case Value::FUNCTION:
  ------------------
  |  Branch (1190:13): [True: 0, False: 672k]
  ------------------
 1191|      0|                scratch = makeNumber(static_cast<HeapClosure *>(e)->params.size());
 1192|      0|                break;
 1193|       |
 1194|     23|            default:
  ------------------
  |  Branch (1194:13): [True: 23, False: 672k]
  ------------------
 1195|     23|                throw makeError(loc,
 1196|     23|                                "length operates on strings, objects, "
 1197|     23|                                "and arrays, got " +
 1198|     23|                                    type_str(args[0]));
 1199|   672k|        }
 1200|   672k|        return nullptr;
 1201|   672k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter21builtinObjectFieldsExERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1204|  88.1k|    {
 1205|  88.1k|        validateBuiltinArgs(loc, "objectFieldsEx", args, {Value::OBJECT, Value::BOOLEAN});
 1206|  88.1k|        const auto *obj = static_cast<HeapObject *>(args[0].v.h);
 1207|  88.1k|        bool include_hidden = args[1].v.b;
 1208|       |        // Stash in a set first to sort them.
 1209|  88.1k|        std::set<UString> fields;
 1210|   248k|        for (const auto &field : objectFields(obj, !include_hidden)) {
  ------------------
  |  Branch (1210:32): [True: 248k, False: 88.1k]
  ------------------
 1211|   248k|            fields.insert(field->name);
 1212|   248k|        }
 1213|  88.1k|        scratch = makeArray({});
 1214|  88.1k|        auto &elements = static_cast<HeapArray *>(scratch.v.h)->elements;
 1215|   248k|        for (const auto &field : fields) {
  ------------------
  |  Branch (1215:32): [True: 248k, False: 88.1k]
  ------------------
 1216|   248k|            auto *th = makeHeap<HeapThunk>(idArrayElement, nullptr, 0, nullptr);
 1217|   248k|            elements.push_back(th);
 1218|   248k|            th->fill(makeString(field));
 1219|   248k|        }
 1220|  88.1k|        return nullptr;
 1221|  88.1k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierEDniDnEEEPT_DpOT0_:
  567|   248k|    {
  568|   248k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  569|   248k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (569:13): [True: 434, False: 248k]
  ------------------
  570|       |            // Avoid the object we just made being collected.
  571|    434|            heap.markFrom(r);
  572|       |
  573|       |            // Mark from the stack.
  574|    434|            stack.mark(heap);
  575|       |
  576|       |            // Mark from the scratch register
  577|    434|            heap.markFrom(scratch);
  578|       |
  579|       |            // Mark from cached imports
  580|    434|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (580:35): [True: 0, False: 434]
  ------------------
  581|      0|                HeapThunk *thunk = pair.second->thunk;
  582|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (582:21): [True: 0, False: 0]
  ------------------
  583|      0|                    heap.markFrom(thunk);
  584|      0|            }
  585|       |
  586|  66.4k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (586:40): [True: 66.4k, False: 434]
  ------------------
  587|  66.4k|                heap.markFrom(sourceVal.second);
  588|  66.4k|            }
  589|       |
  590|       |            // Delete unreachable objects.
  591|    434|            heap.sweep();
  592|    434|        }
  593|   248k|        return r;
  594|   248k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11builtinCharERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1238|  1.51k|    {
 1239|  1.51k|        validateBuiltinArgs(loc, "char", args, {Value::NUMBER});
 1240|  1.51k|        long l = long(args[0].v.d);
 1241|  1.51k|        if (l < 0) {
  ------------------
  |  Branch (1241:13): [True: 65, False: 1.45k]
  ------------------
 1242|     65|            std::stringstream ss;
 1243|     65|            ss << "codepoints must be >= 0, got " << l;
 1244|     65|            throw makeError(loc, ss.str());
 1245|     65|        }
 1246|  1.45k|        if (l >= JSONNET_CODEPOINT_MAX) {
  ------------------
  |  |   22|  1.45k|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (1246:13): [True: 40, False: 1.41k]
  ------------------
 1247|     40|            std::stringstream ss;
 1248|     40|            ss << "invalid unicode codepoint, got " << l;
 1249|     40|            throw makeError(loc, ss.str());
 1250|     40|        }
 1251|  1.41k|        char32_t c = l;
 1252|  1.41k|        scratch = makeString(UString(&c, 1));
 1253|  1.41k|        return nullptr;
 1254|  1.45k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10builtinLogERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1257|  3.77k|    {
 1258|  3.77k|        validateBuiltinArgs(loc, "log", args, {Value::NUMBER});
 1259|  3.77k|        scratch = makeNumberCheck(loc, std::log(args[0].v.d));
 1260|  3.77k|        return nullptr;
 1261|  3.77k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13builtinModuloERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1289|  40.1k|    {
 1290|  40.1k|        validateBuiltinArgs(loc, "modulo", args, {Value::NUMBER, Value::NUMBER});
 1291|  40.1k|        double a = args[0].v.d;
 1292|  40.1k|        double b = args[1].v.d;
 1293|  40.1k|        if (b == 0)
  ------------------
  |  Branch (1293:13): [True: 20, False: 40.1k]
  ------------------
 1294|     20|            throw makeError(loc, "division by zero.");
 1295|  40.1k|        scratch = makeNumberCheck(loc, std::fmod(a, b));
 1296|  40.1k|        return nullptr;
 1297|  40.1k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack3popEv:
  291|   139M|    {
  292|   139M|        if (top().isCall())
  ------------------
  |  Branch (292:13): [True: 53.2M, False: 86.0M]
  ------------------
  293|  53.2M|            calls--;
  294|   139M|        stack.pop_back();
  295|   139M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter22builtinPrimitiveEqualsERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1325|  5.41M|    {
 1326|  5.41M|        if (args.size() != 2) {
  ------------------
  |  Branch (1326:13): [True: 0, False: 5.41M]
  ------------------
 1327|      0|            std::stringstream ss;
 1328|      0|            ss << "primitiveEquals takes 2 parameters, got " << args.size();
 1329|      0|            throw makeError(loc, ss.str());
 1330|      0|        }
 1331|  5.41M|        if (args[0].t != args[1].t) {
  ------------------
  |  Branch (1331:13): [True: 0, False: 5.41M]
  ------------------
 1332|      0|            scratch = makeBoolean(false);
 1333|      0|            return nullptr;
 1334|      0|        }
 1335|  5.41M|        bool r;
 1336|  5.41M|        switch (args[0].t) {
 1337|  14.3k|            case Value::BOOLEAN: r = args[0].v.b == args[1].v.b; break;
  ------------------
  |  Branch (1337:13): [True: 14.3k, False: 5.39M]
  ------------------
 1338|       |
 1339|  90.1k|            case Value::NUMBER: r = args[0].v.d == args[1].v.d; break;
  ------------------
  |  Branch (1339:13): [True: 90.1k, False: 5.32M]
  ------------------
 1340|       |
 1341|  5.25M|            case Value::STRING:
  ------------------
  |  Branch (1341:13): [True: 5.25M, False: 160k]
  ------------------
 1342|  5.25M|                r = static_cast<HeapString *>(args[0].v.h)->value ==
 1343|  5.25M|                    static_cast<HeapString *>(args[1].v.h)->value;
 1344|  5.25M|                break;
 1345|       |
 1346|  55.9k|            case Value::NULL_TYPE: r = true; break;
  ------------------
  |  Branch (1346:13): [True: 55.9k, False: 5.35M]
  ------------------
 1347|       |
 1348|      0|            case Value::FUNCTION: throw makeError(loc, "cannot test equality of functions"); break;
  ------------------
  |  Branch (1348:13): [True: 0, False: 5.41M]
  ------------------
 1349|       |
 1350|      0|            default:
  ------------------
  |  Branch (1350:13): [True: 0, False: 5.41M]
  ------------------
 1351|      0|                throw makeError(loc,
 1352|      0|                                "primitiveEquals operates on primitive "
 1353|      0|                                "types, got " +
 1354|      0|                                    type_str(args[0]));
 1355|  5.41M|        }
 1356|  5.41M|        scratch = makeBoolean(r);
 1357|  5.41M|        return nullptr;
 1358|  5.41M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11makeBuiltinERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKNS3_6vectorINS1_11HeapClosure5ParamENS7_ISE_EEEE:
  657|  9.66M|    {
  658|  9.66M|        AST *body = nullptr;
  659|  9.66M|        Value r;
  660|  9.66M|        r.t = Value::FUNCTION;
  661|  9.66M|        r.v.h = makeHeap<HeapClosure>(BindingFrame(), nullptr, 0, params, body, name);
  662|  9.66M|        return r;
  663|  9.66M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_11HeapClosureEJNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS5_4lessIS9_EENS5_9allocatorINS5_4pairIKS9_SB_EEEEEEDniRKNS5_6vectorINS4_5ParamENSE_ISL_EEEERPNS0_3ASTERKNS5_12basic_stringIcNS5_11char_traitsIcEENSE_IcEEEEEEEPT_DpOT0_:
  567|  9.66M|    {
  568|  9.66M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  569|  9.66M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (569:13): [True: 15.9k, False: 9.64M]
  ------------------
  570|       |            // Avoid the object we just made being collected.
  571|  15.9k|            heap.markFrom(r);
  572|       |
  573|       |            // Mark from the stack.
  574|  15.9k|            stack.mark(heap);
  575|       |
  576|       |            // Mark from the scratch register
  577|  15.9k|            heap.markFrom(scratch);
  578|       |
  579|       |            // Mark from cached imports
  580|  15.9k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (580:35): [True: 0, False: 15.9k]
  ------------------
  581|      0|                HeapThunk *thunk = pair.second->thunk;
  582|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (582:21): [True: 0, False: 0]
  ------------------
  583|      0|                    heap.markFrom(thunk);
  584|      0|            }
  585|       |
  586|  2.44M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (586:40): [True: 2.44M, False: 15.9k]
  ------------------
  587|  2.44M|                heap.markFrom(sourceVal.second);
  588|  2.44M|            }
  589|       |
  590|       |            // Delete unreachable objects.
  591|  15.9k|            heap.sweep();
  592|  15.9k|        }
  593|  9.66M|        return r;
  594|  9.66M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13builtinSubstrERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1492|    645|    {
 1493|    645|        validateBuiltinArgs(loc, "substr", args, {Value::STRING, Value::NUMBER, Value::NUMBER});
 1494|    645|        const auto *str = static_cast<const HeapString *>(args[0].v.h);
 1495|    645|        long from = long(args[1].v.d);
 1496|    645|        long len = long(args[2].v.d);
 1497|    645|        if (from < 0) {
  ------------------
  |  Branch (1497:13): [True: 0, False: 645]
  ------------------
 1498|      0|            std::stringstream ss;
 1499|      0|            ss << "substr second parameter should be greater than zero, got " << from;
 1500|      0|            throw makeError(loc, ss.str());
 1501|      0|        }
 1502|    645|        if (len < 0) {
  ------------------
  |  Branch (1502:13): [True: 0, False: 645]
  ------------------
 1503|      0|            std::stringstream ss;
 1504|      0|            ss << "substr third parameter should be greater than zero, got " << len;
 1505|      0|            throw makeError(loc, ss.str());
 1506|      0|        }
 1507|    645|        if (static_cast<unsigned long>(from) > str->value.size()) {
  ------------------
  |  Branch (1507:13): [True: 0, False: 645]
  ------------------
 1508|      0|            scratch = makeString(UString());
 1509|      0|            return nullptr;
 1510|      0|        }
 1511|    645|        if (size_t(len + from) > str->value.size()) {
  ------------------
  |  Branch (1511:13): [True: 0, False: 645]
  ------------------
 1512|      0|          len = str->value.size() - from;
 1513|      0|        }
 1514|    645|        scratch = makeString(str->value.substr(from, len));
 1515|    645|        return nullptr;
 1516|    645|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJDnDniPKNS0_3ASTEEEEPT_DpOT0_:
  567|  3.81k|    {
  568|  3.81k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  569|  3.81k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (569:13): [True: 0, False: 3.81k]
  ------------------
  570|       |            // Avoid the object we just made being collected.
  571|      0|            heap.markFrom(r);
  572|       |
  573|       |            // Mark from the stack.
  574|      0|            stack.mark(heap);
  575|       |
  576|       |            // Mark from the scratch register
  577|      0|            heap.markFrom(scratch);
  578|       |
  579|       |            // Mark from cached imports
  580|      0|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (580:35): [True: 0, False: 0]
  ------------------
  581|      0|                HeapThunk *thunk = pair.second->thunk;
  582|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (582:21): [True: 0, False: 0]
  ------------------
  583|      0|                    heap.markFrom(thunk);
  584|      0|            }
  585|       |
  586|      0|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (586:40): [True: 0, False: 0]
  ------------------
  587|      0|                heap.markFrom(sourceVal.second);
  588|      0|            }
  589|       |
  590|       |            // Delete unreachable objects.
  591|      0|            heap.sweep();
  592|      0|        }
  593|  3.81k|        return r;
  594|  3.81k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack7newCallERKNS0_13LocationRangeEPNS1_10HeapEntityEPNS1_10HeapObjectEjRKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENSA_4lessISE_EENSA_9allocatorINSA_4pairIKSE_SG_EEEEEE:
  408|  54.0M|    {
  409|  54.0M|        tailCallTrimStack();
  410|  54.0M|        if (calls >= limit) {
  ------------------
  |  Branch (410:13): [True: 812, False: 54.0M]
  ------------------
  411|    812|            throw makeError(loc, "max stack frames exceeded.");
  412|    812|        }
  413|  54.0M|        stack.emplace_back(FRAME_CALL, loc);
  414|  54.0M|        calls++;
  415|  54.0M|        top().context = context;
  416|  54.0M|        top().self = self;
  417|  54.0M|        top().offset = offset;
  418|  54.0M|        top().bindings = up_values;
  419|  54.0M|        top().tailCall = false;
  420|       |
  421|  54.0M|#ifndef NDEBUG
  422|  54.0M|        for (const auto &bind : up_values) {
  ------------------
  |  Branch (422:31): [True: 46.5M, False: 54.0M]
  ------------------
  423|  46.5M|            if (bind.second == nullptr) {
  ------------------
  |  Branch (423:17): [True: 0, False: 46.5M]
  ------------------
  424|      0|                std::cerr << "INTERNAL ERROR: No binding for variable "
  425|      0|                          << encode_utf8(bind.first->name) << std::endl;
  426|      0|                std::abort();
  427|      0|            }
  428|  46.5M|        }
  429|  54.0M|#endif
  430|  54.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack17tailCallTrimStackEv:
  384|  54.0M|    {
  385|  54.9M|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (385:40): [True: 54.1M, False: 777k]
  ------------------
  386|  54.1M|            switch (stack[i].kind) {
  387|  15.8M|                case FRAME_CALL: {
  ------------------
  |  Branch (387:17): [True: 15.8M, False: 38.2M]
  ------------------
  388|  15.8M|                    if (!stack[i].tailCall || stack[i].thunks.size() > 0) {
  ------------------
  |  Branch (388:25): [True: 11.1M, False: 4.70M]
  |  Branch (388:47): [True: 4.37M, False: 331k]
  ------------------
  389|  15.5M|                        return;
  390|  15.5M|                    }
  391|       |                    // Remove all stack frames including this one.
  392|  1.12M|                    while (stack.size() > unsigned(i))
  ------------------
  |  Branch (392:28): [True: 795k, False: 331k]
  ------------------
  393|   795k|                        stack.pop_back();
  394|   331k|                    calls--;
  395|   331k|                    return;
  396|  15.8M|                } break;
  397|       |
  398|   937k|                case FRAME_LOCAL: break;
  ------------------
  |  Branch (398:17): [True: 937k, False: 53.2M]
  ------------------
  399|       |
  400|  37.3M|                default: return;
  ------------------
  |  Branch (400:17): [True: 37.3M, False: 16.8M]
  ------------------
  401|  54.1M|            }
  402|  54.1M|        }
  403|  54.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15FrameC2ERKNS1_9FrameKindERKNS0_13LocationRangeE:
  208|  66.4M|    {
  209|  66.4M|        val.t = Value::NULL_TYPE;
  210|  66.4M|        val2.t = Value::NULL_TYPE;
  211|  66.4M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter22prepareSourceValThunksEv:
  864|  3.81k|    void prepareSourceValThunks() {
  865|   582k|        for (const auto &field : stdlibAST->fields) {
  ------------------
  |  Branch (865:32): [True: 582k, False: 3.81k]
  ------------------
  866|   582k|            AST *nameAST = field.name;
  867|   582k|            if (nameAST->type != AST_LITERAL_STRING) {
  ------------------
  |  Branch (867:17): [True: 0, False: 582k]
  ------------------
  868|       |                // Skip any fields without a known name.
  869|      0|                continue;
  870|      0|            }
  871|   582k|            UString name = dynamic_cast<LiteralString *>(nameAST)->value;
  872|       |
  873|   582k|            sourceFuncIds.emplace_back(new Identifier(name));
  874|   582k|            auto *th = makeHeap<HeapThunk>(sourceFuncIds.back().get(), stdObject, 0, field.body);
  875|   582k|            sourceVals[encode_utf8(name)] = th;
  876|   582k|        }
  877|  3.81k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJPNS0_10IdentifierERPNS1_10HeapObjectEiRKPNS0_3ASTEEEEPT_DpOT0_:
  567|   582k|    {
  568|   582k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  569|   582k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (569:13): [True: 0, False: 582k]
  ------------------
  570|       |            // Avoid the object we just made being collected.
  571|      0|            heap.markFrom(r);
  572|       |
  573|       |            // Mark from the stack.
  574|      0|            stack.mark(heap);
  575|       |
  576|       |            // Mark from the scratch register
  577|      0|            heap.markFrom(scratch);
  578|       |
  579|       |            // Mark from cached imports
  580|      0|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (580:35): [True: 0, False: 0]
  ------------------
  581|      0|                HeapThunk *thunk = pair.second->thunk;
  582|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (582:21): [True: 0, False: 0]
  ------------------
  583|      0|                    heap.markFrom(thunk);
  584|      0|            }
  585|       |
  586|      0|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (586:40): [True: 0, False: 0]
  ------------------
  587|      0|                heap.markFrom(sourceVal.second);
  588|      0|            }
  589|       |
  590|       |            // Delete unreachable objects.
  591|      0|            heap.sweep();
  592|      0|        }
  593|   582k|        return r;
  594|   582k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15StackD2Ev:
  250|  3.81k|    ~Stack(void) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8evaluateEPKNS0_3ASTEj:
 1989|  5.07M|    {
 1990|   166M|    recurse:
 1991|       |
 1992|   166M|        switch (ast_->type) {
 1993|  13.3M|            case AST_APPLY: {
  ------------------
  |  Branch (1993:13): [True: 13.3M, False: 152M]
  ------------------
 1994|  13.3M|                const auto &ast = *static_cast<const Apply *>(ast_);
 1995|  13.3M|                stack.newFrame(FRAME_APPLY_TARGET, ast_);
 1996|  13.3M|                ast_ = ast.target;
 1997|  13.3M|                goto recurse;
 1998|      0|            } break;
 1999|       |
 2000|  1.28M|            case AST_ARRAY: {
  ------------------
  |  Branch (2000:13): [True: 1.28M, False: 165M]
  ------------------
 2001|  1.28M|                const auto &ast = *static_cast<const Array *>(ast_);
 2002|  1.28M|                HeapObject *self;
 2003|  1.28M|                unsigned offset;
 2004|  1.28M|                stack.getSelfBinding(self, offset);
 2005|  1.28M|                scratch = makeArray({});
 2006|  1.28M|                auto &elements = static_cast<HeapArray *>(scratch.v.h)->elements;
 2007|  7.26M|                for (const auto &el : ast.elements) {
  ------------------
  |  Branch (2007:37): [True: 7.26M, False: 1.28M]
  ------------------
 2008|  7.26M|                    auto *el_th = makeHeap<HeapThunk>(idArrayElement, self, offset, el.expr);
 2009|  7.26M|                    el_th->upValues = capture(el.expr->freeVariables);
 2010|  7.26M|                    elements.push_back(el_th);
 2011|  7.26M|                }
 2012|  1.28M|            } break;
 2013|       |
 2014|  9.75M|            case AST_BINARY: {
  ------------------
  |  Branch (2014:13): [True: 9.75M, False: 156M]
  ------------------
 2015|  9.75M|                const auto &ast = *static_cast<const Binary *>(ast_);
 2016|  9.75M|                stack.newFrame(FRAME_BINARY_LEFT, ast_);
 2017|  9.75M|                ast_ = ast.left;
 2018|  9.75M|                goto recurse;
 2019|      0|            } break;
 2020|       |
 2021|  9.66M|            case AST_BUILTIN_FUNCTION: {
  ------------------
  |  Branch (2021:13): [True: 9.66M, False: 156M]
  ------------------
 2022|  9.66M|                const auto &ast = *static_cast<const BuiltinFunction *>(ast_);
 2023|  9.66M|                HeapClosure::Params params;
 2024|  9.66M|                params.reserve(ast.params.size());
 2025|  15.2M|                for (const auto &p : ast.params) {
  ------------------
  |  Branch (2025:36): [True: 15.2M, False: 9.66M]
  ------------------
 2026|       |                    // None of the builtins have default args.
 2027|  15.2M|                    params.emplace_back(p, nullptr);
 2028|  15.2M|                }
 2029|  9.66M|                scratch = makeBuiltin(ast.name, params);
 2030|  9.66M|            } break;
 2031|       |
 2032|  11.0M|            case AST_CONDITIONAL: {
  ------------------
  |  Branch (2032:13): [True: 11.0M, False: 155M]
  ------------------
 2033|  11.0M|                const auto &ast = *static_cast<const Conditional *>(ast_);
 2034|  11.0M|                stack.newFrame(FRAME_IF, ast_);
 2035|  11.0M|                ast_ = ast.cond;
 2036|  11.0M|                goto recurse;
 2037|      0|            } break;
 2038|       |
 2039|  8.63k|            case AST_ERROR: {
  ------------------
  |  Branch (2039:13): [True: 8.63k, False: 166M]
  ------------------
 2040|  8.63k|                const auto &ast = *static_cast<const Error *>(ast_);
 2041|  8.63k|                stack.newFrame(FRAME_ERROR, ast_);
 2042|  8.63k|                ast_ = ast.expr;
 2043|  8.63k|                goto recurse;
 2044|      0|            } break;
 2045|       |
 2046|  2.10M|            case AST_FUNCTION: {
  ------------------
  |  Branch (2046:13): [True: 2.10M, False: 164M]
  ------------------
 2047|  2.10M|                const auto &ast = *static_cast<const Function *>(ast_);
 2048|  2.10M|                auto env = capture(ast.freeVariables);
 2049|  2.10M|                HeapObject *self;
 2050|  2.10M|                unsigned offset;
 2051|  2.10M|                stack.getSelfBinding(self, offset);
 2052|  2.10M|                HeapClosure::Params params;
 2053|  2.10M|                params.reserve(ast.params.size());
 2054|  4.14M|                for (const auto &p : ast.params) {
  ------------------
  |  Branch (2054:36): [True: 4.14M, False: 2.10M]
  ------------------
 2055|  4.14M|                    params.emplace_back(p.id, p.expr);
 2056|  4.14M|                }
 2057|  2.10M|                scratch = makeClosure(env, self, offset, params, ast.body);
 2058|  2.10M|            } break;
 2059|       |
 2060|     55|            case AST_IMPORT: {
  ------------------
  |  Branch (2060:13): [True: 55, False: 166M]
  ------------------
 2061|     55|                const auto &ast = *static_cast<const Import *>(ast_);
 2062|     55|                HeapThunk *thunk = import(ast.location, ast.file);
 2063|     55|                if (thunk->filled) {
  ------------------
  |  Branch (2063:21): [True: 0, False: 55]
  ------------------
 2064|      0|                    scratch = thunk->content;
 2065|     55|                } else {
 2066|     55|                    stack.newCall(ast.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 2067|     55|                    ast_ = thunk->body;
 2068|     55|                    goto recurse;
 2069|     55|                }
 2070|     55|            } break;
 2071|       |
 2072|      5|            case AST_IMPORTSTR: {
  ------------------
  |  Branch (2072:13): [True: 5, False: 166M]
  ------------------
 2073|      5|                const auto &ast = *static_cast<const Importstr *>(ast_);
 2074|      5|                const ImportCacheValue *value = importData(ast.location, ast.file);
 2075|      5|                scratch = makeString(decode_utf8(value->content));
 2076|      5|            } break;
 2077|       |
 2078|      5|            case AST_IMPORTBIN: {
  ------------------
  |  Branch (2078:13): [True: 5, False: 166M]
  ------------------
 2079|      5|                const auto &ast = *static_cast<const Importbin *>(ast_);
 2080|      5|                const ImportCacheValue *value = importData(ast.location, ast.file);
 2081|      5|                scratch = makeArray({});
 2082|      5|                auto &elements = static_cast<HeapArray *>(scratch.v.h)->elements;
 2083|      5|                elements.reserve(value->content.size());
 2084|      5|                for (const auto c : value->content) {
  ------------------
  |  Branch (2084:35): [True: 0, False: 5]
  ------------------
 2085|      0|                    auto *th = makeHeap<HeapThunk>(idArrayElement, nullptr, 0, nullptr);
 2086|      0|                    elements.push_back(th);
 2087|      0|                    th->fill(makeNumber(uint8_t(c)));
 2088|      0|                }
 2089|      5|            } break;
 2090|       |
 2091|  3.68M|            case AST_IN_SUPER: {
  ------------------
  |  Branch (2091:13): [True: 3.68M, False: 162M]
  ------------------
 2092|  3.68M|                const auto &ast = *static_cast<const InSuper *>(ast_);
 2093|  3.68M|                stack.newFrame(FRAME_IN_SUPER_ELEMENT, ast_);
 2094|  3.68M|                ast_ = ast.element;
 2095|  3.68M|                goto recurse;
 2096|     55|            } break;
 2097|       |
 2098|  12.7M|            case AST_INDEX: {
  ------------------
  |  Branch (2098:13): [True: 12.7M, False: 153M]
  ------------------
 2099|  12.7M|                const auto &ast = *static_cast<const Index *>(ast_);
 2100|  12.7M|                stack.newFrame(FRAME_INDEX_TARGET, ast_);
 2101|  12.7M|                ast_ = ast.target;
 2102|  12.7M|                goto recurse;
 2103|     55|            } break;
 2104|       |
 2105|  6.52M|            case AST_LOCAL: {
  ------------------
  |  Branch (2105:13): [True: 6.52M, False: 159M]
  ------------------
 2106|  6.52M|                const auto &ast = *static_cast<const Local *>(ast_);
 2107|  6.52M|                stack.newFrame(FRAME_LOCAL, ast_);
 2108|  6.52M|                Frame &f = stack.top();
 2109|       |                // First build all the thunks and bind them.
 2110|  6.52M|                HeapObject *self;
 2111|  6.52M|                unsigned offset;
 2112|  6.52M|                stack.getSelfBinding(self, offset);
 2113|  20.0M|                for (const auto &bind : ast.binds) {
  ------------------
  |  Branch (2113:39): [True: 20.0M, False: 6.52M]
  ------------------
 2114|       |                    // Note that these 2 lines must remain separate to avoid the GC running
 2115|       |                    // when bindings has a nullptr for key bind.first.
 2116|  20.0M|                    auto *th = makeHeap<HeapThunk>(bind.var, self, offset, bind.body);
 2117|  20.0M|                    f.bindings[bind.var] = th;
 2118|  20.0M|                }
 2119|       |                // Now capture the environment (including the new thunks, to make cycles).
 2120|  20.0M|                for (const auto &bind : ast.binds) {
  ------------------
  |  Branch (2120:39): [True: 20.0M, False: 6.52M]
  ------------------
 2121|  20.0M|                    auto *thunk = f.bindings[bind.var];
 2122|  20.0M|                    thunk->upValues = capture(bind.body->freeVariables);
 2123|  20.0M|                }
 2124|  6.52M|                ast_ = ast.body;
 2125|  6.52M|                goto recurse;
 2126|     55|            } break;
 2127|       |
 2128|   570k|            case AST_LITERAL_BOOLEAN: {
  ------------------
  |  Branch (2128:13): [True: 570k, False: 165M]
  ------------------
 2129|   570k|                const auto &ast = *static_cast<const LiteralBoolean *>(ast_);
 2130|   570k|                scratch = makeBoolean(ast.value);
 2131|   570k|            } break;
 2132|       |
 2133|  8.21M|            case AST_LITERAL_NUMBER: {
  ------------------
  |  Branch (2133:13): [True: 8.21M, False: 158M]
  ------------------
 2134|  8.21M|                const auto &ast = *static_cast<const LiteralNumber *>(ast_);
 2135|  8.21M|                scratch = makeNumberCheck(ast_->location, ast.value);
 2136|  8.21M|            } break;
 2137|       |
 2138|  39.8M|            case AST_LITERAL_STRING: {
  ------------------
  |  Branch (2138:13): [True: 39.8M, False: 126M]
  ------------------
 2139|  39.8M|                const auto &ast = *static_cast<const LiteralString *>(ast_);
 2140|  39.8M|                scratch = makeString(ast.value);
 2141|  39.8M|            } break;
 2142|       |
 2143|   132k|            case AST_LITERAL_NULL: {
  ------------------
  |  Branch (2143:13): [True: 132k, False: 166M]
  ------------------
 2144|   132k|                scratch = makeNull();
 2145|   132k|            } break;
 2146|       |
 2147|  1.68M|            case AST_DESUGARED_OBJECT: {
  ------------------
  |  Branch (2147:13): [True: 1.68M, False: 164M]
  ------------------
 2148|  1.68M|                const auto &ast = *static_cast<const DesugaredObject *>(ast_);
 2149|  1.68M|                if (ast.fields.empty()) {
  ------------------
  |  Branch (2149:21): [True: 364k, False: 1.31M]
  ------------------
 2150|   364k|                    auto env = capture(ast.freeVariables);
 2151|   364k|                    std::map<const Identifier *, HeapSimpleObject::Field> fields;
 2152|   364k|                    scratch = makeObject<HeapSimpleObject>(env, fields, ast.asserts);
 2153|  1.31M|                } else {
 2154|  1.31M|                    auto env = capture(ast.freeVariables);
 2155|  1.31M|                    stack.newFrame(FRAME_OBJECT, ast_);
 2156|  1.31M|                    auto fit = ast.fields.begin();
 2157|  1.31M|                    stack.top().fit = fit;
 2158|  1.31M|                    ast_ = fit->name;
 2159|  1.31M|                    goto recurse;
 2160|  1.31M|                }
 2161|  1.68M|            } break;
 2162|       |
 2163|   364k|            case AST_OBJECT_COMPREHENSION_SIMPLE: {
  ------------------
  |  Branch (2163:13): [True: 2, False: 166M]
  ------------------
 2164|      2|                const auto &ast = *static_cast<const ObjectComprehensionSimple *>(ast_);
 2165|      2|                stack.newFrame(FRAME_OBJECT_COMP_ARRAY, ast_);
 2166|      2|                ast_ = ast.array;
 2167|      2|                goto recurse;
 2168|  1.68M|            } break;
 2169|       |
 2170|  2.07M|            case AST_SELF: {
  ------------------
  |  Branch (2170:13): [True: 2.07M, False: 164M]
  ------------------
 2171|  2.07M|                scratch.t = Value::OBJECT;
 2172|  2.07M|                HeapObject *self;
 2173|  2.07M|                unsigned offset;
 2174|  2.07M|                stack.getSelfBinding(self, offset);
 2175|  2.07M|                scratch.v.h = self;
 2176|  2.07M|            } break;
 2177|       |
 2178|  3.57M|            case AST_SUPER_INDEX: {
  ------------------
  |  Branch (2178:13): [True: 3.57M, False: 162M]
  ------------------
 2179|  3.57M|                const auto &ast = *static_cast<const SuperIndex *>(ast_);
 2180|  3.57M|                stack.newFrame(FRAME_SUPER_INDEX, ast_);
 2181|  3.57M|                ast_ = ast.index;
 2182|  3.57M|                goto recurse;
 2183|  1.68M|            } break;
 2184|       |
 2185|  3.37M|            case AST_UNARY: {
  ------------------
  |  Branch (2185:13): [True: 3.37M, False: 163M]
  ------------------
 2186|  3.37M|                const auto &ast = *static_cast<const Unary *>(ast_);
 2187|  3.37M|                stack.newFrame(FRAME_UNARY, ast_);
 2188|  3.37M|                ast_ = ast.expr;
 2189|  3.37M|                goto recurse;
 2190|  1.68M|            } break;
 2191|       |
 2192|  36.7M|            case AST_VAR: {
  ------------------
  |  Branch (2192:13): [True: 36.7M, False: 129M]
  ------------------
 2193|  36.7M|                const auto &ast = *static_cast<const Var *>(ast_);
 2194|  36.7M|                auto *thunk = stack.lookUpVar(ast.id);
 2195|  36.7M|                if (thunk == nullptr) {
  ------------------
  |  Branch (2195:21): [True: 0, False: 36.7M]
  ------------------
 2196|      0|                    std::cerr << "INTERNAL ERROR: Could not bind variable: "
 2197|      0|                              << encode_utf8(ast.id->name) << " at "
 2198|      0|                              << ast.location << std::endl;
 2199|      0|                    std::abort();
 2200|      0|                }
 2201|  36.7M|                if (thunk->filled) {
  ------------------
  |  Branch (2201:21): [True: 27.0M, False: 9.68M]
  ------------------
 2202|  27.0M|                    scratch = thunk->content;
 2203|  27.0M|                } else {
 2204|  9.68M|                    stack.newCall(ast.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 2205|  9.68M|                    ast_ = thunk->body;
 2206|  9.68M|                    goto recurse;
 2207|  9.68M|                }
 2208|  36.7M|            } break;
 2209|       |
 2210|  27.0M|            default:
  ------------------
  |  Branch (2210:13): [True: 0, False: 166M]
  ------------------
 2211|      0|                std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_->type << std::endl;
 2212|      0|                std::abort();
 2213|   166M|        }
 2214|       |
 2215|       |        // To evaluate another AST, set ast to it, then goto recurse.
 2216|       |        // To pop, exit the switch or goto popframe
 2217|       |        // To change the frame and re-enter the switch, goto replaceframe
 2218|   187M|        while (stack.size() > initial_stack_size) {
  ------------------
  |  Branch (2218:16): [True: 182M, False: 5.05M]
  ------------------
 2219|   182M|            Frame &f = stack.top();
 2220|   182M|            switch (f.kind) {
 2221|  13.3M|                case FRAME_APPLY_TARGET: {
  ------------------
  |  Branch (2221:17): [True: 13.3M, False: 168M]
  ------------------
 2222|  13.3M|                    const auto &ast = *static_cast<const Apply *>(f.ast);
 2223|  13.3M|                    if (scratch.t != Value::FUNCTION) {
  ------------------
  |  Branch (2223:25): [True: 7, False: 13.3M]
  ------------------
 2224|      7|                        throw makeError(ast.location,
 2225|      7|                                        "only functions can be called, got " + type_str(scratch));
 2226|      7|                    }
 2227|  13.3M|                    auto *func = static_cast<HeapClosure *>(scratch.v.h);
 2228|       |
 2229|  13.3M|                    std::set<const Identifier *> params_needed;
 2230|  23.2M|                    for (const auto &param : func->params) {
  ------------------
  |  Branch (2230:44): [True: 23.2M, False: 13.3M]
  ------------------
 2231|  23.2M|                        params_needed.insert(param.id);
 2232|  23.2M|                    }
 2233|       |
 2234|       |                    // Create thunks for arguments.
 2235|  13.3M|                    std::vector<HeapThunk *> positional_args;
 2236|  13.3M|                    BindingFrame args;
 2237|  13.3M|                    bool got_named = false;
 2238|  36.6M|                    for (std::size_t i = 0; i < ast.args.size(); ++i) {
  ------------------
  |  Branch (2238:45): [True: 23.2M, False: 13.3M]
  ------------------
 2239|  23.2M|                        const auto &arg = ast.args[i];
 2240|       |
 2241|  23.2M|                        const Identifier *name;
 2242|  23.2M|                        if (arg.id != nullptr) {
  ------------------
  |  Branch (2242:29): [True: 0, False: 23.2M]
  ------------------
 2243|      0|                            got_named = true;
 2244|      0|                            name = arg.id;
 2245|  23.2M|                        } else {
 2246|  23.2M|                            if (got_named) {
  ------------------
  |  Branch (2246:33): [True: 0, False: 23.2M]
  ------------------
 2247|      0|                                std::stringstream ss;
 2248|      0|                                ss << "internal error: got positional param after named at index "
 2249|      0|                                   << i;
 2250|      0|                                throw makeError(ast.location, ss.str());
 2251|      0|                            }
 2252|  23.2M|                            if (i >= func->params.size()) {
  ------------------
  |  Branch (2252:33): [True: 1, False: 23.2M]
  ------------------
 2253|      1|                                std::stringstream ss;
 2254|      1|                                ss << "too many args, function has " << func->params.size()
 2255|      1|                                   << " parameter(s)";
 2256|      1|                                throw makeError(ast.location, ss.str());
 2257|      1|                            }
 2258|  23.2M|                            name = func->params[i].id;
 2259|  23.2M|                        }
 2260|       |                        // Special case for builtin functions -- leave identifier blank for
 2261|       |                        // them in the thunk.  This removes the thunk frame from the stacktrace.
 2262|  23.2M|                        const Identifier *name_ = func->body == nullptr ? nullptr : name;
  ------------------
  |  Branch (2262:51): [True: 15.2M, False: 8.01M]
  ------------------
 2263|  23.2M|                        HeapObject *self;
 2264|  23.2M|                        unsigned offset;
 2265|  23.2M|                        stack.getSelfBinding(self, offset);
 2266|  23.2M|                        auto *thunk = makeHeap<HeapThunk>(name_, self, offset, arg.expr);
 2267|  23.2M|                        thunk->upValues = capture(arg.expr->freeVariables);
 2268|       |                        // While making the thunks, keep them in a frame to avoid premature garbage
 2269|       |                        // collection.
 2270|  23.2M|                        f.thunks.push_back(thunk);
 2271|  23.2M|                        if (args.find(name) != args.end()) {
  ------------------
  |  Branch (2271:29): [True: 0, False: 23.2M]
  ------------------
 2272|      0|                            std::stringstream ss;
 2273|      0|                            ss << "binding parameter a second time: " << encode_utf8(name->name);
 2274|      0|                            throw makeError(ast.location, ss.str());
 2275|      0|                        }
 2276|  23.2M|                        args[name] = thunk;
 2277|  23.2M|                        if (params_needed.find(name) == params_needed.end()) {
  ------------------
  |  Branch (2277:29): [True: 0, False: 23.2M]
  ------------------
 2278|      0|                            std::stringstream ss;
 2279|      0|                            ss << "function has no parameter " << encode_utf8(name->name);
 2280|      0|                            throw makeError(ast.location, ss.str());
 2281|      0|                        }
 2282|  23.2M|                    }
 2283|       |
 2284|       |                    // For any func params for which there was no arg, create a thunk for those and
 2285|       |                    // bind the default argument.  Allow default thunks to see other params.  If no
 2286|       |                    // default argument than raise an error.
 2287|       |
 2288|       |                    // Raise errors for unbound params, create thunks (but don't fill in upvalues).
 2289|       |                    // This is a subset of f.thunks, so will not get garbage collected.
 2290|  13.3M|                    std::vector<HeapThunk *> def_arg_thunks;
 2291|  23.2M|                    for (const auto &param : func->params) {
  ------------------
  |  Branch (2291:44): [True: 23.2M, False: 13.3M]
  ------------------
 2292|  23.2M|                        if (args.find(param.id) != args.end())
  ------------------
  |  Branch (2292:29): [True: 23.2M, False: 222]
  ------------------
 2293|  23.2M|                            continue;
 2294|    222|                        if (param.def == nullptr) {
  ------------------
  |  Branch (2294:29): [True: 24, False: 198]
  ------------------
 2295|     24|                            std::stringstream ss;
 2296|     24|                            ss << "function parameter " << encode_utf8(param.id->name)
 2297|     24|                               << " not bound in call.";
 2298|     24|                            throw makeError(ast.location, ss.str());
 2299|     24|                        }
 2300|       |
 2301|       |                        // Special case for builtin functions -- leave identifier blank for
 2302|       |                        // them in the thunk.  This removes the thunk frame from the stacktrace.
 2303|    198|                        const Identifier *name_ = func->body == nullptr ? nullptr : param.id;
  ------------------
  |  Branch (2303:51): [True: 0, False: 198]
  ------------------
 2304|    198|                        auto *thunk =
 2305|    198|                            makeHeap<HeapThunk>(name_, func->self, func->offset, param.def);
 2306|    198|                        f.thunks.push_back(thunk);
 2307|    198|                        def_arg_thunks.push_back(thunk);
 2308|    198|                        args[param.id] = thunk;
 2309|    198|                    }
 2310|       |
 2311|  13.3M|                    BindingFrame up_values = func->upValues;
 2312|  13.3M|                    up_values.insert(args.begin(), args.end());
 2313|       |
 2314|       |                    // Fill in upvalues
 2315|  13.3M|                    for (HeapThunk *thunk : def_arg_thunks) {
  ------------------
  |  Branch (2315:43): [True: 15, False: 13.3M]
  ------------------
 2316|     15|                        thunk->upValues = up_values;
 2317|     15|                    }
 2318|       |
 2319|       |                    // Cache these, because pop will invalidate them.
 2320|  13.3M|                    std::vector<HeapThunk *> thunks_copy = f.thunks;
 2321|       |
 2322|  13.3M|                    const AST *f_ast = f.ast;
 2323|  13.3M|                    stack.pop();
 2324|       |
 2325|  13.3M|                    if (func->body == nullptr) {
  ------------------
  |  Branch (2325:25): [True: 9.66M, False: 3.73M]
  ------------------
 2326|       |                        // Built-in function.
 2327|       |                        // Give nullptr for self because no one looking at this frame will
 2328|       |                        // attempt to bind to self (it's native code).
 2329|  9.66M|                        stack.newFrame(FRAME_BUILTIN_FORCE_THUNKS, f_ast);
 2330|  9.66M|                        stack.top().thunks = thunks_copy;
 2331|  9.66M|                        stack.top().val = scratch;
 2332|  9.66M|                        goto replaceframe;
 2333|  9.66M|                    } else {
 2334|       |                        // User defined function.
 2335|  3.73M|                        stack.newCall(ast.location, func, func->self, func->offset, up_values);
 2336|  3.73M|                        if (ast.tailstrict) {
  ------------------
  |  Branch (2336:29): [True: 1.90M, False: 1.83M]
  ------------------
 2337|  1.90M|                            stack.top().tailCall = true;
 2338|  1.90M|                            if (thunks_copy.size() == 0) {
  ------------------
  |  Branch (2338:33): [True: 0, False: 1.90M]
  ------------------
 2339|       |                                // No need to force thunks, proceed straight to body.
 2340|      0|                                ast_ = func->body;
 2341|      0|                                goto recurse;
 2342|  1.90M|                            } else {
 2343|       |                                // The check for args.size() > 0
 2344|  1.90M|                                stack.top().thunks = thunks_copy;
 2345|  1.90M|                                stack.top().val = scratch;
 2346|  1.90M|                                goto replaceframe;
 2347|  1.90M|                            }
 2348|  1.90M|                        } else {
 2349|  1.83M|                            ast_ = func->body;
 2350|  1.83M|                            goto recurse;
 2351|  1.83M|                        }
 2352|  3.73M|                    }
 2353|  13.3M|                } break;
 2354|       |
 2355|  9.58M|                case FRAME_BINARY_LEFT: {
  ------------------
  |  Branch (2355:17): [True: 9.58M, False: 172M]
  ------------------
 2356|  9.58M|                    const auto &ast = *static_cast<const Binary *>(f.ast);
 2357|  9.58M|                    const Value &lhs = scratch;
 2358|  9.58M|                    if (lhs.t == Value::BOOLEAN) {
  ------------------
  |  Branch (2358:25): [True: 204k, False: 9.37M]
  ------------------
 2359|       |                        // Handle short-cut semantics
 2360|   204k|                        switch (ast.op) {
 2361|  76.9k|                            case BOP_AND: {
  ------------------
  |  Branch (2361:29): [True: 76.9k, False: 127k]
  ------------------
 2362|  76.9k|                                if (!lhs.v.b) {
  ------------------
  |  Branch (2362:37): [True: 21.4k, False: 55.4k]
  ------------------
 2363|  21.4k|                                    scratch = makeBoolean(false);
 2364|  21.4k|                                    goto popframe;
 2365|  21.4k|                                }
 2366|  76.9k|                            } break;
 2367|       |
 2368|   125k|                            case BOP_OR: {
  ------------------
  |  Branch (2368:29): [True: 125k, False: 78.9k]
  ------------------
 2369|   125k|                                if (lhs.v.b) {
  ------------------
  |  Branch (2369:37): [True: 2.48k, False: 122k]
  ------------------
 2370|  2.48k|                                    scratch = makeBoolean(true);
 2371|  2.48k|                                    goto popframe;
 2372|  2.48k|                                }
 2373|   125k|                            } break;
 2374|       |
 2375|   122k|                            default:;
  ------------------
  |  Branch (2375:29): [True: 1.97k, False: 202k]
  ------------------
 2376|   204k|                        }
 2377|   204k|                    }
 2378|  9.55M|                    stack.top().kind = FRAME_BINARY_RIGHT;
 2379|  9.55M|                    stack.top().val = lhs;
 2380|  9.55M|                    ast_ = ast.right;
 2381|  9.55M|                    goto recurse;
 2382|  9.58M|                } break;
 2383|       |
 2384|  9.55M|                case FRAME_BINARY_RIGHT: {
  ------------------
  |  Branch (2384:17): [True: 9.55M, False: 172M]
  ------------------
 2385|  9.55M|                    stack.top().val2 = scratch;
 2386|  9.55M|                    stack.top().kind = FRAME_BINARY_OP;
 2387|  9.55M|                }
 2388|       |                // Falls through.
 2389|  9.55M|                case FRAME_BINARY_OP: {
  ------------------
  |  Branch (2389:17): [True: 24, False: 182M]
  ------------------
 2390|  9.55M|                    const auto &ast = *static_cast<const Binary *>(f.ast);
 2391|  9.55M|                    const Value &lhs = stack.top().val;
 2392|  9.55M|                    const Value &rhs = stack.top().val2;
 2393|       |
 2394|       |                    // Handle cases where the LHS and RHS are not the same type.
 2395|  9.55M|                    if (lhs.t == Value::STRING || rhs.t == Value::STRING) {
  ------------------
  |  Branch (2395:25): [True: 2.82M, False: 6.72M]
  |  Branch (2395:51): [True: 5.72k, False: 6.71M]
  ------------------
 2396|  2.83M|                        if (ast.op == BOP_PLUS) {
  ------------------
  |  Branch (2396:29): [True: 2.79M, False: 34.3k]
  ------------------
 2397|       |                            // Handle co-ercions for string processing.
 2398|  2.79M|                            stack.top().kind = FRAME_STRING_CONCAT;
 2399|  2.79M|                            stack.top().val2 = rhs;
 2400|  2.79M|                            goto replaceframe;
 2401|  2.79M|                        }
 2402|  2.83M|                    }
 2403|  6.75M|                    switch (ast.op) {
 2404|       |                        // Equality can be used when the types don't match.
 2405|      0|                        case BOP_MANIFEST_EQUAL:
  ------------------
  |  Branch (2405:25): [True: 0, False: 6.75M]
  ------------------
 2406|      0|                            std::cerr << "INTERNAL ERROR: Equals not desugared" << std::endl;
 2407|      0|                            abort();
 2408|       |
 2409|       |                        // Equality can be used when the types don't match.
 2410|      0|                        case BOP_MANIFEST_UNEQUAL:
  ------------------
  |  Branch (2410:25): [True: 0, False: 6.75M]
  ------------------
 2411|      0|                            std::cerr << "INTERNAL ERROR: Notequals not desugared" << std::endl;
 2412|      0|                            abort();
 2413|       |
 2414|       |                        // e in e
 2415|  5.97k|                        case BOP_IN: {
  ------------------
  |  Branch (2415:25): [True: 5.97k, False: 6.74M]
  ------------------
 2416|  5.97k|                            if (lhs.t != Value::STRING) {
  ------------------
  |  Branch (2416:33): [True: 25, False: 5.94k]
  ------------------
 2417|     25|                                throw makeError(ast.location,
 2418|     25|                                                "the left hand side of the 'in' operator should be "
 2419|     25|                                                "a string,  got " +
 2420|     25|                                                    type_str(lhs));
 2421|     25|                            }
 2422|  5.94k|                            auto *field = static_cast<HeapString *>(lhs.v.h);
 2423|  5.94k|                            switch (rhs.t) {
 2424|  5.94k|                                case Value::OBJECT: {
  ------------------
  |  Branch (2424:33): [True: 5.94k, False: 2]
  ------------------
 2425|  5.94k|                                    auto *obj = static_cast<HeapObject *>(rhs.v.h);
 2426|  5.94k|                                    auto *fid = alloc->makeIdentifier(field->value);
 2427|  5.94k|                                    unsigned unused_found_at = 0;
 2428|  5.94k|                                    bool in = findObject(fid, obj, 0, unused_found_at);
 2429|  5.94k|                                    scratch = makeBoolean(in);
 2430|  5.94k|                                } break;
 2431|       |
 2432|      2|                                default:
  ------------------
  |  Branch (2432:33): [True: 2, False: 5.94k]
  ------------------
 2433|      2|                                    throw makeError(
 2434|      2|                                        ast.location,
 2435|      2|                                        "the right hand side of the 'in' operator should be"
 2436|      2|                                        " an object, got " +
 2437|      2|                                            type_str(rhs));
 2438|  5.94k|                            }
 2439|  5.94k|                            goto popframe;
 2440|  5.94k|                        }
 2441|       |
 2442|  6.74M|                        default:;
  ------------------
  |  Branch (2442:25): [True: 6.74M, False: 5.97k]
  ------------------
 2443|  6.75M|                    }
 2444|       |                    // Everything else requires matching types.
 2445|  6.74M|                    if (lhs.t != rhs.t) {
  ------------------
  |  Branch (2445:25): [True: 123, False: 6.74M]
  ------------------
 2446|    123|                        throw makeError(ast.location,
 2447|    123|                                        "binary operator " + bop_string(ast.op) +
 2448|    123|                                            " requires "
 2449|    123|                                            "matching types, got " +
 2450|    123|                                            type_str(lhs) + " and " + type_str(rhs) + ".");
 2451|    123|                    }
 2452|  6.74M|                    switch (lhs.t) {
  ------------------
  |  Branch (2452:29): [True: 0, False: 6.74M]
  ------------------
 2453|  1.20M|                        case Value::ARRAY:
  ------------------
  |  Branch (2453:25): [True: 1.20M, False: 5.53M]
  ------------------
 2454|  1.20M|                            if (ast.op == BOP_PLUS) {
  ------------------
  |  Branch (2454:33): [True: 1.20M, False: 68]
  ------------------
 2455|  1.20M|                                auto *arr_l = static_cast<HeapArray *>(lhs.v.h);
 2456|  1.20M|                                auto *arr_r = static_cast<HeapArray *>(rhs.v.h);
 2457|  1.20M|                                std::vector<HeapThunk *> elements;
 2458|  1.20M|                                for (auto *el : arr_l->elements)
  ------------------
  |  Branch (2458:47): [True: 125M, False: 1.20M]
  ------------------
 2459|   125M|                                    elements.push_back(el);
 2460|  1.20M|                                for (auto *el : arr_r->elements)
  ------------------
  |  Branch (2460:47): [True: 1.60M, False: 1.20M]
  ------------------
 2461|  1.60M|                                    elements.push_back(el);
 2462|  1.20M|                                scratch = makeArray(elements);
 2463|  1.20M|                            } else if (ast.op == BOP_LESS || ast.op == BOP_LESS_EQ || ast.op == BOP_GREATER || ast.op == BOP_GREATER_EQ) {
  ------------------
  |  Branch (2463:40): [True: 16, False: 52]
  |  Branch (2463:62): [True: 14, False: 38]
  |  Branch (2463:87): [True: 9, False: 29]
  |  Branch (2463:112): [True: 24, False: 5]
  ------------------
 2464|     63|                                HeapThunk *func;
 2465|     63|                                switch(ast.op) {
 2466|     16|                                case BOP_LESS:
  ------------------
  |  Branch (2466:33): [True: 16, False: 47]
  ------------------
 2467|     16|                                    func = sourceVals["__array_less"];
 2468|     16|                                    break;
 2469|     14|                                case BOP_LESS_EQ:
  ------------------
  |  Branch (2469:33): [True: 14, False: 49]
  ------------------
 2470|     14|                                    func = sourceVals["__array_less_or_equal"];
 2471|     14|                                    break;
 2472|      9|                                case BOP_GREATER:
  ------------------
  |  Branch (2472:33): [True: 9, False: 54]
  ------------------
 2473|      9|                                    func = sourceVals["__array_greater"];
 2474|      9|                                    break;
 2475|     24|                                case BOP_GREATER_EQ:
  ------------------
  |  Branch (2475:33): [True: 24, False: 39]
  ------------------
 2476|     24|                                    func = sourceVals["__array_greater_or_equal"];
 2477|     24|                                    break;
 2478|      0|                                default:
  ------------------
  |  Branch (2478:33): [True: 0, False: 63]
  ------------------
 2479|      0|                                    JSONNET_UNREACHABLE();
  ------------------
  |  |   43|      0|  do {                                                             \
  |  |   44|      0|    std::cerr << __FILE__ << ":" << __LINE__                       \
  |  |   45|      0|              << ": INTERNAL ERROR: reached unreachable code path" \
  |  |   46|      0|              << std::endl;                                        \
  |  |   47|      0|    abort();                                                       \
  |  |   48|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2480|     63|                                }
 2481|     63|                                if (!func->filled) {
  ------------------
  |  Branch (2481:37): [True: 24, False: 39]
  ------------------
 2482|     24|                                    stack.newCall(ast.location, func, func->self, func->offset, func->upValues);
 2483|     24|                                    ast_ = func->body;
 2484|     24|                                    goto recurse;
 2485|     24|                                }
 2486|     39|                                auto *lhs_th = makeHeap<HeapThunk>(idInternal, f.self, f.offset, ast.left);
 2487|     39|                                lhs_th->fill(lhs);
 2488|     39|                                f.thunks.push_back(lhs_th);
 2489|     39|                                auto *rhs_th = makeHeap<HeapThunk>(idInternal, f.self, f.offset, ast.right);
 2490|     39|                                rhs_th->fill(rhs);
 2491|     39|                                f.thunks.push_back(rhs_th);
 2492|     39|                                const AST *orig_ast = ast_;
 2493|     39|                                stack.pop();
 2494|     39|                                ast_ = callSourceVal(orig_ast, func, {lhs_th, rhs_th});
 2495|     39|                                goto recurse;
 2496|     63|                            } else {
 2497|      5|                                throw makeError(ast.location,
 2498|      5|                                                "binary operator " + bop_string(ast.op) +
 2499|      5|                                                    " does not operate on arrays.");
 2500|      5|                            }
 2501|  1.20M|                            break;
 2502|       |
 2503|  1.20M|                        case Value::BOOLEAN:
  ------------------
  |  Branch (2503:25): [True: 177k, False: 6.57M]
  ------------------
 2504|   177k|                            switch (ast.op) {
 2505|  54.7k|                                case BOP_AND: scratch = makeBoolean(lhs.v.b && rhs.v.b); break;
  ------------------
  |  Branch (2505:33): [True: 54.7k, False: 122k]
  |  Branch (2505:69): [True: 54.7k, False: 0]
  |  Branch (2505:80): [True: 40.7k, False: 14.0k]
  ------------------
 2506|       |
 2507|   122k|                                case BOP_OR: scratch = makeBoolean(lhs.v.b || rhs.v.b); break;
  ------------------
  |  Branch (2507:33): [True: 122k, False: 54.8k]
  |  Branch (2507:68): [True: 0, False: 122k]
  |  Branch (2507:79): [True: 2.41k, False: 120k]
  ------------------
 2508|       |
 2509|     38|                                default:
  ------------------
  |  Branch (2509:33): [True: 38, False: 177k]
  ------------------
 2510|     38|                                    throw makeError(ast.location,
 2511|     38|                                                    "binary operator " + bop_string(ast.op) +
 2512|     38|                                                        " does not operate on booleans.");
 2513|   177k|                            }
 2514|   177k|                            break;
 2515|       |
 2516|  4.09M|                        case Value::NUMBER:
  ------------------
  |  Branch (2516:25): [True: 4.09M, False: 2.65M]
  ------------------
 2517|  4.09M|                            switch (ast.op) {
 2518|   410k|                                case BOP_PLUS:
  ------------------
  |  Branch (2518:33): [True: 410k, False: 3.67M]
  ------------------
 2519|   410k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d + rhs.v.d);
 2520|   410k|                                    break;
 2521|       |
 2522|  1.42M|                                case BOP_MINUS:
  ------------------
  |  Branch (2522:33): [True: 1.42M, False: 2.67M]
  ------------------
 2523|  1.42M|                                    scratch = makeNumberCheck(ast.location, lhs.v.d - rhs.v.d);
 2524|  1.42M|                                    break;
 2525|       |
 2526|  56.5k|                                case BOP_MULT:
  ------------------
  |  Branch (2526:33): [True: 56.5k, False: 4.03M]
  ------------------
 2527|  56.5k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d * rhs.v.d);
 2528|  56.5k|                                    break;
 2529|       |
 2530|  32.7k|                                case BOP_DIV:
  ------------------
  |  Branch (2530:33): [True: 32.7k, False: 4.05M]
  ------------------
 2531|  32.7k|                                    if (rhs.v.d == 0)
  ------------------
  |  Branch (2531:41): [True: 6, False: 32.7k]
  ------------------
 2532|      6|                                        throw makeError(ast.location, "division by zero.");
 2533|  32.7k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d / rhs.v.d);
 2534|  32.7k|                                    break;
 2535|       |
 2536|       |                                    // No need to check doubles made from longs
 2537|       |
 2538|    317|                                case BOP_SHIFT_L: {
  ------------------
  |  Branch (2538:33): [True: 317, False: 4.09M]
  ------------------
 2539|    317|                                    if (rhs.v.d < 0)
  ------------------
  |  Branch (2539:41): [True: 1, False: 316]
  ------------------
 2540|      1|                                        throw makeError(ast.location, "shift by negative exponent.");
 2541|    316|                                    int64_t long_l = lhs.v.d;
 2542|    316|                                    int64_t long_r = rhs.v.d;
 2543|    316|                                    long_r = long_r % 64;
 2544|    316|                                    scratch = makeNumber(long_l << long_r);
 2545|    316|                                } break;
 2546|       |
 2547|  94.8k|                                case BOP_SHIFT_R: {
  ------------------
  |  Branch (2547:33): [True: 94.8k, False: 3.99M]
  ------------------
 2548|  94.8k|                                    if (rhs.v.d < 0)
  ------------------
  |  Branch (2548:41): [True: 1, False: 94.8k]
  ------------------
 2549|      1|                                        throw makeError(ast.location, "shift by negative exponent.");
 2550|  94.8k|                                    int64_t long_l = lhs.v.d;
 2551|  94.8k|                                    int64_t long_r = rhs.v.d;
 2552|  94.8k|                                    long_r = long_r % 64;
 2553|  94.8k|                                    scratch = makeNumber(long_l >> long_r);
 2554|  94.8k|                                } break;
 2555|       |
 2556|   190k|                                case BOP_BITWISE_AND: {
  ------------------
  |  Branch (2556:33): [True: 190k, False: 3.90M]
  ------------------
 2557|   190k|                                    int64_t long_l = lhs.v.d;
 2558|   190k|                                    int64_t long_r = rhs.v.d;
 2559|   190k|                                    scratch = makeNumber(long_l & long_r);
 2560|   190k|                                } break;
 2561|       |
 2562|  63.3k|                                case BOP_BITWISE_XOR: {
  ------------------
  |  Branch (2562:33): [True: 63.3k, False: 4.02M]
  ------------------
 2563|  63.3k|                                    int64_t long_l = lhs.v.d;
 2564|  63.3k|                                    int64_t long_r = rhs.v.d;
 2565|  63.3k|                                    scratch = makeNumber(long_l ^ long_r);
 2566|  63.3k|                                } break;
 2567|       |
 2568|    549|                                case BOP_BITWISE_OR: {
  ------------------
  |  Branch (2568:33): [True: 549, False: 4.08M]
  ------------------
 2569|    549|                                    int64_t long_l = lhs.v.d;
 2570|    549|                                    int64_t long_r = rhs.v.d;
 2571|    549|                                    scratch = makeNumber(long_l | long_r);
 2572|    549|                                } break;
 2573|       |
 2574|  1.19M|                                case BOP_LESS_EQ: scratch = makeBoolean(lhs.v.d <= rhs.v.d); break;
  ------------------
  |  Branch (2574:33): [True: 1.19M, False: 2.89M]
  ------------------
 2575|       |
 2576|   443k|                                case BOP_GREATER_EQ:
  ------------------
  |  Branch (2576:33): [True: 443k, False: 3.64M]
  ------------------
 2577|   443k|                                    scratch = makeBoolean(lhs.v.d >= rhs.v.d);
 2578|   443k|                                    break;
 2579|       |
 2580|   157k|                                case BOP_LESS: scratch = makeBoolean(lhs.v.d < rhs.v.d); break;
  ------------------
  |  Branch (2580:33): [True: 157k, False: 3.93M]
  ------------------
 2581|       |
 2582|  23.5k|                                case BOP_GREATER: scratch = makeBoolean(lhs.v.d > rhs.v.d); break;
  ------------------
  |  Branch (2582:33): [True: 23.5k, False: 4.06M]
  ------------------
 2583|       |
 2584|      8|                                default:
  ------------------
  |  Branch (2584:33): [True: 8, False: 4.09M]
  ------------------
 2585|      8|                                    throw makeError(ast.location,
 2586|      8|                                                    "binary operator " + bop_string(ast.op) +
 2587|      8|                                                        " does not operate on numbers.");
 2588|  4.09M|                            }
 2589|  4.09M|                            break;
 2590|       |
 2591|  4.09M|                        case Value::FUNCTION:
  ------------------
  |  Branch (2591:25): [True: 1, False: 6.74M]
  ------------------
 2592|      1|                            throw makeError(ast.location,
 2593|      1|                                            "binary operator " + bop_string(ast.op) +
 2594|      1|                                                " does not operate on functions.");
 2595|       |
 2596|      2|                        case Value::NULL_TYPE:
  ------------------
  |  Branch (2596:25): [True: 2, False: 6.74M]
  ------------------
 2597|      2|                            throw makeError(ast.location,
 2598|      2|                                            "binary operator " + bop_string(ast.op) +
 2599|      2|                                                " does not operate on null.");
 2600|       |
 2601|  1.24M|                        case Value::OBJECT: {
  ------------------
  |  Branch (2601:25): [True: 1.24M, False: 5.50M]
  ------------------
 2602|  1.24M|                            if (ast.op != BOP_PLUS) {
  ------------------
  |  Branch (2602:33): [True: 9, False: 1.24M]
  ------------------
 2603|      9|                                throw makeError(ast.location,
 2604|      9|                                                "binary operator " + bop_string(ast.op) +
 2605|      9|                                                    " does not operate on objects.");
 2606|      9|                            }
 2607|  1.24M|                            auto *lhs_obj = static_cast<HeapObject *>(lhs.v.h);
 2608|  1.24M|                            auto *rhs_obj = static_cast<HeapObject *>(rhs.v.h);
 2609|  1.24M|                            scratch = makeObject<HeapExtendedObject>(lhs_obj, rhs_obj);
 2610|  1.24M|                        } break;
 2611|       |
 2612|  28.3k|                        case Value::STRING: {
  ------------------
  |  Branch (2612:25): [True: 28.3k, False: 6.71M]
  ------------------
 2613|  28.3k|                            const UString &lhs_str = static_cast<HeapString *>(lhs.v.h)->value;
 2614|  28.3k|                            const UString &rhs_str = static_cast<HeapString *>(rhs.v.h)->value;
 2615|  28.3k|                            switch (ast.op) {
 2616|      0|                                case BOP_PLUS: scratch = makeString(lhs_str + rhs_str); break;
  ------------------
  |  Branch (2616:33): [True: 0, False: 28.3k]
  ------------------
 2617|       |
 2618|  1.78k|                                case BOP_LESS_EQ: scratch = makeBoolean(lhs_str <= rhs_str); break;
  ------------------
  |  Branch (2618:33): [True: 1.78k, False: 26.5k]
  ------------------
 2619|       |
 2620|  18.8k|                                case BOP_GREATER_EQ:
  ------------------
  |  Branch (2620:33): [True: 18.8k, False: 9.44k]
  ------------------
 2621|  18.8k|                                    scratch = makeBoolean(lhs_str >= rhs_str);
 2622|  18.8k|                                    break;
 2623|       |
 2624|  2.25k|                                case BOP_LESS: scratch = makeBoolean(lhs_str < rhs_str); break;
  ------------------
  |  Branch (2624:33): [True: 2.25k, False: 26.0k]
  ------------------
 2625|       |
 2626|  5.38k|                                case BOP_GREATER: scratch = makeBoolean(lhs_str > rhs_str); break;
  ------------------
  |  Branch (2626:33): [True: 5.38k, False: 22.9k]
  ------------------
 2627|       |
 2628|     13|                                default:
  ------------------
  |  Branch (2628:33): [True: 13, False: 28.2k]
  ------------------
 2629|     13|                                    throw makeError(ast.location,
 2630|     13|                                                    "binary operator " + bop_string(ast.op) +
 2631|     13|                                                        " does not operate on strings.");
 2632|  28.3k|                            }
 2633|  28.3k|                        } break;
 2634|  6.74M|                    }
 2635|  6.74M|                } break;
 2636|       |
 2637|  6.74M|                case FRAME_BUILTIN_FILTER: {
  ------------------
  |  Branch (2637:17): [True: 0, False: 182M]
  ------------------
 2638|      0|                    const auto &ast = *static_cast<const Apply *>(f.ast);
 2639|      0|                    auto *func = static_cast<HeapClosure *>(f.val.v.h);
 2640|      0|                    auto *arr = static_cast<HeapArray *>(f.val2.v.h);
 2641|      0|                    if (scratch.t != Value::BOOLEAN) {
  ------------------
  |  Branch (2641:25): [True: 0, False: 0]
  ------------------
 2642|      0|                        throw makeError(
 2643|      0|                            ast.location,
 2644|      0|                            "filter function must return boolean, got: " + type_str(scratch));
 2645|      0|                    }
 2646|      0|                    if (scratch.v.b)
  ------------------
  |  Branch (2646:25): [True: 0, False: 0]
  ------------------
 2647|      0|                        f.thunks.push_back(arr->elements[f.elementId]);
 2648|      0|                    f.elementId++;
 2649|       |                    // Iterate through arr, calling the function on each.
 2650|      0|                    if (f.elementId == arr->elements.size()) {
  ------------------
  |  Branch (2650:25): [True: 0, False: 0]
  ------------------
 2651|      0|                        scratch = makeArray(f.thunks);
 2652|      0|                    } else {
 2653|      0|                        auto *thunk = arr->elements[f.elementId];
 2654|      0|                        BindingFrame bindings = func->upValues;
 2655|      0|                        bindings[func->params[0].id] = thunk;
 2656|      0|                        stack.newCall(ast.location, func, func->self, func->offset, bindings);
 2657|      0|                        ast_ = func->body;
 2658|      0|                        goto recurse;
 2659|      0|                    }
 2660|      0|                } break;
 2661|       |
 2662|  24.8M|                case FRAME_BUILTIN_FORCE_THUNKS: {
  ------------------
  |  Branch (2662:17): [True: 24.8M, False: 157M]
  ------------------
 2663|  24.8M|                    const auto &ast = *static_cast<const Apply *>(f.ast);
 2664|  24.8M|                    auto *func = static_cast<HeapClosure *>(f.val.v.h);
 2665|  24.8M|                    if (f.elementId == f.thunks.size()) {
  ------------------
  |  Branch (2665:25): [True: 9.65M, False: 15.2M]
  ------------------
 2666|       |                        // All thunks forced, now the builtin implementations.
 2667|  9.65M|                        const LocationRange &loc = ast.location;
 2668|  9.65M|                        const std::string &builtin_name = func->builtinName;
 2669|  9.65M|                        std::vector<Value> args;
 2670|  15.2M|                        for (auto *th : f.thunks) {
  ------------------
  |  Branch (2670:39): [True: 15.2M, False: 9.65M]
  ------------------
 2671|  15.2M|                            args.push_back(th->content);
 2672|  15.2M|                        }
 2673|  9.65M|                        BuiltinMap::const_iterator bit = builtins.find(builtin_name);
 2674|  9.65M|                        if (bit != builtins.end()) {
  ------------------
  |  Branch (2674:29): [True: 9.65M, False: 0]
  ------------------
 2675|  9.65M|                            const AST *new_ast = (this->*bit->second)(loc, args);
 2676|  9.65M|                            if (new_ast != nullptr) {
  ------------------
  |  Branch (2676:33): [True: 0, False: 9.65M]
  ------------------
 2677|      0|                                ast_ = new_ast;
 2678|      0|                                goto recurse;
 2679|      0|                            }
 2680|  9.65M|                            break;
 2681|  9.65M|                        }
 2682|      0|                        VmNativeCallbackMap::const_iterator nit =
 2683|      0|                            nativeCallbacks.find(builtin_name);
 2684|       |                        // TODO(dcunnin): Support arrays.
 2685|       |                        // TODO(dcunnin): Support objects.
 2686|      0|                        std::vector<JsonnetJsonValue> args2;
 2687|      0|                        for (const Value &arg : args) {
  ------------------
  |  Branch (2687:47): [True: 0, False: 0]
  ------------------
 2688|      0|                            switch (arg.t) {
 2689|      0|                                case Value::STRING:
  ------------------
  |  Branch (2689:33): [True: 0, False: 0]
  ------------------
 2690|      0|                                    args2.emplace_back(
 2691|      0|                                        JsonnetJsonValue::STRING,
 2692|      0|                                        encode_utf8(static_cast<HeapString *>(arg.v.h)->value),
 2693|      0|                                        0);
 2694|      0|                                    break;
 2695|       |
 2696|      0|                                case Value::BOOLEAN:
  ------------------
  |  Branch (2696:33): [True: 0, False: 0]
  ------------------
 2697|      0|                                    args2.emplace_back(
 2698|      0|                                        JsonnetJsonValue::BOOL, "", arg.v.b ? 1.0 : 0.0);
  ------------------
  |  Branch (2698:69): [True: 0, False: 0]
  ------------------
 2699|      0|                                    break;
 2700|       |
 2701|      0|                                case Value::NUMBER:
  ------------------
  |  Branch (2701:33): [True: 0, False: 0]
  ------------------
 2702|      0|                                    args2.emplace_back(JsonnetJsonValue::NUMBER, "", arg.v.d);
 2703|      0|                                    break;
 2704|       |
 2705|      0|                                case Value::NULL_TYPE:
  ------------------
  |  Branch (2705:33): [True: 0, False: 0]
  ------------------
 2706|      0|                                    args2.emplace_back(JsonnetJsonValue::NULL_KIND, "", 0);
 2707|      0|                                    break;
 2708|       |
 2709|      0|                                default:
  ------------------
  |  Branch (2709:33): [True: 0, False: 0]
  ------------------
 2710|      0|                                    throw makeError(ast.location,
 2711|      0|                                                    "native extensions can only take primitives.");
 2712|      0|                            }
 2713|      0|                        }
 2714|      0|                        std::vector<const JsonnetJsonValue *> args3;
 2715|      0|                        for (size_t i = 0; i < args2.size(); ++i) {
  ------------------
  |  Branch (2715:44): [True: 0, False: 0]
  ------------------
 2716|      0|                            args3.push_back(&args2[i]);
 2717|      0|                        }
 2718|      0|                        if (nit == nativeCallbacks.end()) {
  ------------------
  |  Branch (2718:29): [True: 0, False: 0]
  ------------------
 2719|      0|                            throw makeError(ast.location,
 2720|      0|                                            "unrecognized builtin name: " + builtin_name);
 2721|      0|                        }
 2722|      0|                        const VmNativeCallback &cb = nit->second;
 2723|       |
 2724|      0|                        int succ;
 2725|      0|                        std::unique_ptr<JsonnetJsonValue> r(cb.cb(cb.ctx, args3.data(), &succ));
 2726|       |
 2727|      0|                        if (succ) {
  ------------------
  |  Branch (2727:29): [True: 0, False: 0]
  ------------------
 2728|      0|                            bool unused;
 2729|      0|                            jsonToHeap(r, unused, scratch);
 2730|      0|                        } else {
 2731|      0|                            if (r->kind != JsonnetJsonValue::STRING) {
  ------------------
  |  Branch (2731:33): [True: 0, False: 0]
  ------------------
 2732|      0|                                throw makeError(
 2733|      0|                                    ast.location,
 2734|      0|                                    "native extension returned an error that was not a string.");
 2735|      0|                            }
 2736|      0|                            std::string rs = r->string;
 2737|      0|                            throw makeError(ast.location, rs);
 2738|      0|                        }
 2739|       |
 2740|  15.2M|                    } else {
 2741|       |                        // Not all arguments forced yet.
 2742|  15.2M|                        HeapThunk *th = f.thunks[f.elementId++];
 2743|  15.2M|                        if (!th->filled) {
  ------------------
  |  Branch (2743:29): [True: 15.2M, False: 0]
  ------------------
 2744|  15.2M|                            stack.newCall(ast.location, th, th->self, th->offset, th->upValues);
 2745|  15.2M|                            ast_ = th->body;
 2746|  15.2M|                            goto recurse;
 2747|  15.2M|                        }
 2748|  15.2M|                    }
 2749|  24.8M|                } break;
 2750|       |
 2751|  54.6M|                case FRAME_CALL: {
  ------------------
  |  Branch (2751:17): [True: 54.6M, False: 127M]
  ------------------
 2752|  54.6M|                    if (auto *thunk = dynamic_cast<HeapThunk *>(f.context)) {
  ------------------
  |  Branch (2752:31): [True: 29.3M, False: 25.3M]
  ------------------
 2753|       |                        // If we called a thunk, cache result.
 2754|  29.3M|                        thunk->fill(scratch);
 2755|  29.3M|                    } else if (auto *closure = dynamic_cast<HeapClosure *>(f.context)) {
  ------------------
  |  Branch (2755:38): [True: 9.59M, False: 15.7M]
  ------------------
 2756|  9.59M|                        if (f.elementId < f.thunks.size()) {
  ------------------
  |  Branch (2756:29): [True: 4.37M, False: 5.21M]
  ------------------
 2757|       |                            // If tailstrict, force thunks
 2758|  4.37M|                            HeapThunk *th = f.thunks[f.elementId++];
 2759|  4.37M|                            if (!th->filled) {
  ------------------
  |  Branch (2759:33): [True: 4.37M, False: 0]
  ------------------
 2760|  4.37M|                                stack.newCall(f.location, th, th->self, th->offset, th->upValues);
 2761|  4.37M|                                ast_ = th->body;
 2762|  4.37M|                                goto recurse;
 2763|  4.37M|                            }
 2764|  5.21M|                        } else if (f.thunks.size() == 0) {
  ------------------
  |  Branch (2764:36): [True: 3.31M, False: 1.89M]
  ------------------
 2765|       |                            // Body has now been executed
 2766|  3.31M|                        } else {
 2767|       |                            // Execute the body
 2768|  1.89M|                            f.thunks.clear();
 2769|  1.89M|                            f.elementId = 0;
 2770|  1.89M|                            ast_ = closure->body;
 2771|  1.89M|                            goto recurse;
 2772|  1.89M|                        }
 2773|  9.59M|                    }
 2774|       |                    // Result of call is in scratch, just pop.
 2775|  54.6M|                } break;
 2776|       |
 2777|  48.3M|                case FRAME_ERROR: {
  ------------------
  |  Branch (2777:17): [True: 985, False: 182M]
  ------------------
 2778|    985|                    const auto &ast = *static_cast<const Error *>(f.ast);
 2779|    985|                    UString msg;
 2780|    985|                    if (scratch.t == Value::STRING) {
  ------------------
  |  Branch (2780:25): [True: 441, False: 544]
  ------------------
 2781|    441|                        msg = static_cast<HeapString *>(scratch.v.h)->value;
 2782|    544|                    } else {
 2783|    544|                        msg = toString(ast.location);
 2784|    544|                    }
 2785|    985|                    throw makeError(ast.location, encode_utf8(msg));
 2786|  54.6M|                } break;
 2787|       |
 2788|  11.0M|                case FRAME_IF: {
  ------------------
  |  Branch (2788:17): [True: 11.0M, False: 171M]
  ------------------
 2789|  11.0M|                    const auto &ast = *static_cast<const Conditional *>(f.ast);
 2790|  11.0M|                    if (scratch.t != Value::BOOLEAN) {
  ------------------
  |  Branch (2790:25): [True: 28, False: 11.0M]
  ------------------
 2791|     28|                        throw makeError(
 2792|     28|                            ast.location,
 2793|     28|                            "condition must be boolean, got " + type_str(scratch) + ".");
 2794|     28|                    }
 2795|  11.0M|                    ast_ = scratch.v.b ? ast.branchTrue : ast.branchFalse;
  ------------------
  |  Branch (2795:28): [True: 4.55M, False: 6.44M]
  ------------------
 2796|  11.0M|                    stack.pop();
 2797|  11.0M|                    goto recurse;
 2798|  11.0M|                } break;
 2799|       |
 2800|  3.57M|                case FRAME_SUPER_INDEX: {
  ------------------
  |  Branch (2800:17): [True: 3.57M, False: 178M]
  ------------------
 2801|  3.57M|                    const auto &ast = *static_cast<const SuperIndex *>(f.ast);
 2802|  3.57M|                    HeapObject *self;
 2803|  3.57M|                    unsigned offset;
 2804|  3.57M|                    stack.getSelfBinding(self, offset);
 2805|  3.57M|                    offset++;
 2806|  3.57M|                    if (offset >= countLeaves(self)) {
  ------------------
  |  Branch (2806:25): [True: 2, False: 3.57M]
  ------------------
 2807|      2|                        throw makeError(ast.location,
 2808|      2|                                        "attempt to use super when there is no super class.");
 2809|      2|                    }
 2810|  3.57M|                    if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (2810:25): [True: 0, False: 3.57M]
  ------------------
 2811|      0|                        throw makeError(
 2812|      0|                            ast.location,
 2813|      0|                            "super index must be string, got " + type_str(scratch) + ".");
 2814|      0|                    }
 2815|       |
 2816|  3.57M|                    const UString &index_name = static_cast<HeapString *>(scratch.v.h)->value;
 2817|  3.57M|                    auto *fid = alloc->makeIdentifier(index_name);
 2818|  3.57M|                    stack.pop();
 2819|  3.57M|                    ast_ = objectIndex(ast.location, self, fid, offset);
 2820|  3.57M|                    goto recurse;
 2821|  3.57M|                } break;
 2822|       |
 2823|  3.68M|                case FRAME_IN_SUPER_ELEMENT: {
  ------------------
  |  Branch (2823:17): [True: 3.68M, False: 178M]
  ------------------
 2824|  3.68M|                    const auto &ast = *static_cast<const InSuper *>(f.ast);
 2825|  3.68M|                    HeapObject *self;
 2826|  3.68M|                    unsigned offset;
 2827|  3.68M|                    stack.getSelfBinding(self, offset);
 2828|  3.68M|                    offset++;
 2829|  3.68M|                    if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (2829:25): [True: 1, False: 3.68M]
  ------------------
 2830|      1|                        throw makeError(ast.location,
 2831|      1|                                        "left hand side of e in super must be string, got " +
 2832|      1|                                            type_str(scratch) + ".");
 2833|      1|                    }
 2834|  3.68M|                    if (offset >= countLeaves(self)) {
  ------------------
  |  Branch (2834:25): [True: 55.9k, False: 3.62M]
  ------------------
 2835|       |                        // There is no super object.
 2836|  55.9k|                        scratch = makeBoolean(false);
 2837|  3.62M|                    } else {
 2838|  3.62M|                        const UString &element_name = static_cast<HeapString *>(scratch.v.h)->value;
 2839|  3.62M|                        auto *fid = alloc->makeIdentifier(element_name);
 2840|  3.62M|                        unsigned unused_found_at = 0;
 2841|  3.62M|                        bool in = findObject(fid, self, offset, unused_found_at);
 2842|  3.62M|                        scratch = makeBoolean(in);
 2843|  3.62M|                    }
 2844|  3.68M|                } break;
 2845|       |
 2846|  12.7M|                case FRAME_INDEX_INDEX: {
  ------------------
  |  Branch (2846:17): [True: 12.7M, False: 169M]
  ------------------
 2847|  12.7M|                    const auto &ast = *static_cast<const Index *>(f.ast);
 2848|  12.7M|                    const Value &target = f.val;
 2849|  12.7M|                    if (target.t == Value::ARRAY) {
  ------------------
  |  Branch (2849:25): [True: 56.9k, False: 12.6M]
  ------------------
 2850|  56.9k|                        const auto *array = static_cast<HeapArray *>(target.v.h);
 2851|  56.9k|                        if (scratch.t == Value::STRING) {
  ------------------
  |  Branch (2851:29): [True: 7, False: 56.9k]
  ------------------
 2852|      7|                            const UString &str = static_cast<HeapString *>(scratch.v.h)->value;
 2853|      7|                            throw makeError(
 2854|      7|                                ast.location,
 2855|      7|                                "attempted index an array with string \""
 2856|      7|                                + encode_utf8(jsonnet_string_escape(str, false)) + "\".");
 2857|      7|                        }
 2858|  56.9k|                        if (scratch.t != Value::NUMBER) {
  ------------------
  |  Branch (2858:29): [True: 7, False: 56.9k]
  ------------------
 2859|      7|                            throw makeError(
 2860|      7|                                ast.location,
 2861|      7|                                "array index must be number, got " + type_str(scratch) + ".");
 2862|      7|                        }
 2863|  56.9k|                        double index = ::floor(scratch.v.d);
 2864|  56.9k|                        long sz = array->elements.size();
 2865|  56.9k|                        if (index < 0 || index >= sz) {
  ------------------
  |  Branch (2865:29): [True: 1, False: 56.9k]
  |  Branch (2865:42): [True: 5, False: 56.9k]
  ------------------
 2866|      6|                            std::stringstream ss;
 2867|      6|                            ss << "array bounds error: " << index << " not within [0, " << sz
 2868|      6|                               << ")";
 2869|      6|                            throw makeError(ast.location, ss.str());
 2870|      6|                        }
 2871|  56.9k|                        if (scratch.v.d != index) {
  ------------------
  |  Branch (2871:29): [True: 6, False: 56.9k]
  ------------------
 2872|      6|                            std::stringstream ss;
 2873|      6|                            ss << "array index was not integer: " << scratch.v.d;
 2874|      6|                            throw makeError(ast.location, ss.str());
 2875|      6|                        }
 2876|       |                        // index < sz <= SIZE_T_MAX
 2877|  56.9k|                        auto *thunk = array->elements[size_t(index)];
 2878|  56.9k|                        if (thunk->filled) {
  ------------------
  |  Branch (2878:29): [True: 13.2k, False: 43.7k]
  ------------------
 2879|  13.2k|                            scratch = thunk->content;
 2880|  43.7k|                        } else {
 2881|  43.7k|                            stack.pop();
 2882|  43.7k|                            stack.newCall(
 2883|  43.7k|                                ast.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 2884|  43.7k|                            ast_ = thunk->body;
 2885|  43.7k|                            goto recurse;
 2886|  43.7k|                        }
 2887|  12.6M|                    } else if (target.t == Value::OBJECT) {
  ------------------
  |  Branch (2887:32): [True: 12.2M, False: 418k]
  ------------------
 2888|  12.2M|                        auto *obj = static_cast<HeapObject *>(target.v.h);
 2889|  12.2M|                        assert(obj != nullptr);
 2890|  12.2M|                        if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (2890:29): [True: 5, False: 12.2M]
  ------------------
 2891|      5|                            throw makeError(
 2892|      5|                                ast.location,
 2893|      5|                                "object index must be string, got " + type_str(scratch) + ".");
 2894|      5|                        }
 2895|  12.2M|                        const UString &index_name = static_cast<HeapString *>(scratch.v.h)->value;
 2896|  12.2M|                        auto *fid = alloc->makeIdentifier(index_name);
 2897|  12.2M|                        stack.pop();
 2898|  12.2M|                        ast_ = objectIndex(ast.location, obj, fid, 0);
 2899|  12.2M|                        goto recurse;
 2900|  12.2M|                    } else if (target.t == Value::STRING) {
  ------------------
  |  Branch (2900:32): [True: 418k, False: 0]
  ------------------
 2901|   418k|                        auto *obj = static_cast<HeapString *>(target.v.h);
 2902|   418k|                        assert(obj != nullptr);
 2903|   418k|                        if (scratch.t != Value::NUMBER) {
  ------------------
  |  Branch (2903:29): [True: 1, False: 418k]
  ------------------
 2904|      1|                            throw makeError(
 2905|      1|                                ast.location,
 2906|      1|                                "string index must be a number, got " + type_str(scratch) + ".");
 2907|      1|                        }
 2908|   418k|                        long sz = obj->value.length();
 2909|   418k|                        long i = (long)scratch.v.d;
 2910|   418k|                        if (i < 0 || i >= sz) {
  ------------------
  |  Branch (2910:29): [True: 71, False: 418k]
  |  Branch (2910:38): [True: 58, False: 418k]
  ------------------
 2911|    129|                            std::stringstream ss;
 2912|    129|                            ss << "string bounds error: " << i << " not within [0, " << sz << ")";
 2913|    129|                            throw makeError(ast.location, ss.str());
 2914|    129|                        }
 2915|   418k|                        char32_t ch[] = {obj->value[i], U'\0'};
 2916|   418k|                        scratch = makeString(ch);
 2917|   418k|                    } else {
 2918|      0|                        std::cerr << "INTERNAL ERROR: not object / array / string." << std::endl;
 2919|      0|                        abort();
 2920|      0|                    }
 2921|  12.7M|                } break;
 2922|       |
 2923|  12.7M|                case FRAME_INDEX_TARGET: {
  ------------------
  |  Branch (2923:17): [True: 12.7M, False: 169M]
  ------------------
 2924|  12.7M|                    const auto &ast = *static_cast<const Index *>(f.ast);
 2925|  12.7M|                    if (scratch.t != Value::ARRAY && scratch.t != Value::OBJECT &&
  ------------------
  |  Branch (2925:25): [True: 12.6M, False: 56.9k]
  |  Branch (2925:54): [True: 418k, False: 12.2M]
  ------------------
 2926|  12.7M|                        scratch.t != Value::STRING) {
  ------------------
  |  Branch (2926:25): [True: 10, False: 418k]
  ------------------
 2927|     10|                        throw makeError(ast.location,
 2928|     10|                                        "can only index objects, strings, and arrays, got " +
 2929|     10|                                            type_str(scratch) + ".");
 2930|     10|                    }
 2931|  12.7M|                    f.val = scratch;
 2932|  12.7M|                    f.kind = FRAME_INDEX_INDEX;
 2933|  12.7M|                    if (scratch.t == Value::OBJECT) {
  ------------------
  |  Branch (2933:25): [True: 12.2M, False: 475k]
  ------------------
 2934|  12.2M|                        auto *self = static_cast<HeapObject *>(scratch.v.h);
 2935|  12.2M|                        if (!stack.alreadyExecutingInvariants(self)) {
  ------------------
  |  Branch (2935:29): [True: 12.2M, False: 84]
  ------------------
 2936|  12.2M|                            stack.newFrame(FRAME_INVARIANTS, ast.location);
 2937|  12.2M|                            Frame &f2 = stack.top();
 2938|  12.2M|                            f2.self = self;
 2939|  12.2M|                            unsigned counter = 0;
 2940|  12.2M|                            objectInvariants(self, self, counter, f2.thunks);
 2941|  12.2M|                            if (f2.thunks.size() > 0) {
  ------------------
  |  Branch (2941:33): [True: 2.37k, False: 12.2M]
  ------------------
 2942|  2.37k|                                auto *thunk = f2.thunks[0];
 2943|  2.37k|                                f2.elementId = 1;
 2944|  2.37k|                                stack.newCall(ast.location,
 2945|  2.37k|                                              thunk,
 2946|  2.37k|                                              thunk->self,
 2947|  2.37k|                                              thunk->offset,
 2948|  2.37k|                                              thunk->upValues);
 2949|  2.37k|                                ast_ = thunk->body;
 2950|  2.37k|                                goto recurse;
 2951|  2.37k|                            }
 2952|  12.2M|                        }
 2953|  12.2M|                    }
 2954|  12.7M|                    ast_ = ast.index;
 2955|  12.7M|                    goto recurse;
 2956|  12.7M|                } break;
 2957|       |
 2958|  12.3M|                case FRAME_INVARIANTS: {
  ------------------
  |  Branch (2958:17): [True: 12.3M, False: 169M]
  ------------------
 2959|  12.3M|                    if (f.elementId >= f.thunks.size()) {
  ------------------
  |  Branch (2959:25): [True: 12.2M, False: 75.6k]
  ------------------
 2960|  12.2M|                        if (stack.size() == initial_stack_size + 1) {
  ------------------
  |  Branch (2960:29): [True: 15.4k, False: 12.2M]
  ------------------
 2961|       |                            // Just pop, evaluate was invoked by runInvariants.
 2962|  15.4k|                            break;
 2963|  15.4k|                        }
 2964|  12.2M|                        stack.pop();
 2965|  12.2M|                        Frame &f2 = stack.top();
 2966|  12.2M|                        const auto &ast = *static_cast<const Index *>(f2.ast);
 2967|  12.2M|                        ast_ = ast.index;
 2968|  12.2M|                        goto recurse;
 2969|  12.2M|                    }
 2970|  75.6k|                    auto *thunk = f.thunks[f.elementId++];
 2971|  75.6k|                    stack.newCall(f.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 2972|  75.6k|                    ast_ = thunk->body;
 2973|  75.6k|                    goto recurse;
 2974|  12.3M|                } break;
 2975|       |
 2976|  5.98M|                case FRAME_LOCAL: {
  ------------------
  |  Branch (2976:17): [True: 5.98M, False: 176M]
  ------------------
 2977|       |                    // Result of execution is in scratch already.
 2978|  5.98M|                } break;
 2979|       |
 2980|  2.79M|                case FRAME_OBJECT: {
  ------------------
  |  Branch (2980:17): [True: 2.79M, False: 179M]
  ------------------
 2981|  2.79M|                    const auto &ast = *static_cast<const DesugaredObject *>(f.ast);
 2982|  2.79M|                    if (scratch.t != Value::NULL_TYPE) {
  ------------------
  |  Branch (2982:25): [True: 2.79M, False: 0]
  ------------------
 2983|  2.79M|                        if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (2983:29): [True: 6, False: 2.79M]
  ------------------
 2984|      6|                            throw makeError(ast.location, "field name was not a string.");
 2985|      6|                        }
 2986|  2.79M|                        const auto &fname = static_cast<const HeapString *>(scratch.v.h)->value;
 2987|  2.79M|                        const Identifier *fid = alloc->makeIdentifier(fname);
 2988|  2.79M|                        if (f.objectFields.find(fid) != f.objectFields.end()) {
  ------------------
  |  Branch (2988:29): [True: 7, False: 2.79M]
  ------------------
 2989|      7|                            std::string msg =
 2990|      7|                                "duplicate field name: \"" + encode_utf8(fname) + "\"";
 2991|      7|                            throw makeError(ast.location, msg);
 2992|      7|                        }
 2993|  2.79M|                        f.objectFields[fid].hide = f.fit->hide;
 2994|  2.79M|                        f.objectFields[fid].body = f.fit->body;
 2995|  2.79M|                    }
 2996|  2.79M|                    f.fit++;
 2997|  2.79M|                    if (f.fit != ast.fields.end()) {
  ------------------
  |  Branch (2997:25): [True: 1.47M, False: 1.31M]
  ------------------
 2998|  1.47M|                        ast_ = f.fit->name;
 2999|  1.47M|                        goto recurse;
 3000|  1.47M|                    } else {
 3001|  1.31M|                        auto env = capture(ast.freeVariables);
 3002|  1.31M|                        scratch = makeObject<HeapSimpleObject>(env, f.objectFields, ast.asserts);
 3003|  1.31M|                    }
 3004|  2.79M|                } break;
 3005|       |
 3006|  1.31M|                case FRAME_OBJECT_COMP_ARRAY: {
  ------------------
  |  Branch (3006:17): [True: 0, False: 182M]
  ------------------
 3007|      0|                    const auto &ast = *static_cast<const ObjectComprehensionSimple *>(f.ast);
 3008|      0|                    const Value &arr_v = scratch;
 3009|      0|                    if (scratch.t != Value::ARRAY) {
  ------------------
  |  Branch (3009:25): [True: 0, False: 0]
  ------------------
 3010|      0|                        throw makeError(ast.location,
 3011|      0|                                        "object comprehension needs array, got " + type_str(arr_v));
 3012|      0|                    }
 3013|      0|                    const auto *arr = static_cast<const HeapArray *>(arr_v.v.h);
 3014|      0|                    if (arr->elements.size() == 0) {
  ------------------
  |  Branch (3014:25): [True: 0, False: 0]
  ------------------
 3015|       |                        // Degenerate case.  Just create the object now.
 3016|      0|                        scratch = makeObject<HeapComprehensionObject>(
 3017|      0|                            BindingFrame{}, ast.value, ast.id, BindingFrame{});
 3018|      0|                    } else {
 3019|      0|                        f.kind = FRAME_OBJECT_COMP_ELEMENT;
 3020|      0|                        f.val = scratch;
 3021|      0|                        f.bindings[ast.id] = arr->elements[0];
 3022|      0|                        f.elementId = 0;
 3023|      0|                        ast_ = ast.field;
 3024|      0|                        goto recurse;
 3025|      0|                    }
 3026|      0|                } break;
 3027|       |
 3028|      0|                case FRAME_OBJECT_COMP_ELEMENT: {
  ------------------
  |  Branch (3028:17): [True: 0, False: 182M]
  ------------------
 3029|      0|                    const auto &ast = *static_cast<const ObjectComprehensionSimple *>(f.ast);
 3030|      0|                    const auto *arr = static_cast<const HeapArray *>(f.val.v.h);
 3031|      0|                    if (scratch.t != Value::NULL_TYPE) {
  ------------------
  |  Branch (3031:25): [True: 0, False: 0]
  ------------------
 3032|      0|                        if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (3032:29): [True: 0, False: 0]
  ------------------
 3033|      0|                            std::stringstream ss;
 3034|      0|                            ss << "field must be string, got: " << type_str(scratch);
 3035|      0|                            throw makeError(ast.location, ss.str());
 3036|      0|                        }
 3037|      0|                        const auto &fname = static_cast<const HeapString *>(scratch.v.h)->value;
 3038|      0|                        const Identifier *fid = alloc->makeIdentifier(fname);
 3039|      0|                        if (f.elements.find(fid) != f.elements.end()) {
  ------------------
  |  Branch (3039:29): [True: 0, False: 0]
  ------------------
 3040|      0|                            throw makeError(ast.location,
 3041|      0|                                            "duplicate field name: \"" + encode_utf8(fname) + "\"");
 3042|      0|                        }
 3043|      0|                        f.elements[fid] = arr->elements[f.elementId];
 3044|      0|                    }
 3045|      0|                    f.elementId++;
 3046|       |
 3047|      0|                    if (f.elementId == arr->elements.size()) {
  ------------------
  |  Branch (3047:25): [True: 0, False: 0]
  ------------------
 3048|      0|                        auto env = capture(ast.freeVariables);
 3049|      0|                        scratch =
 3050|      0|                            makeObject<HeapComprehensionObject>(env, ast.value, ast.id, f.elements);
 3051|      0|                    } else {
 3052|      0|                        f.bindings[ast.id] = arr->elements[f.elementId];
 3053|      0|                        ast_ = ast.field;
 3054|      0|                        goto recurse;
 3055|      0|                    }
 3056|      0|                } break;
 3057|       |
 3058|  2.79M|                case FRAME_STRING_CONCAT: {
  ------------------
  |  Branch (3058:17): [True: 2.79M, False: 179M]
  ------------------
 3059|  2.79M|                    const auto &ast = *static_cast<const Binary *>(f.ast);
 3060|  2.79M|                    const Value &lhs = stack.top().val;
 3061|  2.79M|                    UString output;
 3062|  2.79M|                    if (lhs.t == Value::STRING) {
  ------------------
  |  Branch (3062:25): [True: 2.79M, False: 5.68k]
  ------------------
 3063|  2.79M|                        output.append(static_cast<const HeapString *>(lhs.v.h)->value);
 3064|  2.79M|                    } else {
 3065|  5.68k|                        scratch = lhs;
 3066|  5.68k|                        output.append(toString(ast.left->location));
 3067|  5.68k|                    }
 3068|  2.79M|                    const Value &rhs = stack.top().val2;
 3069|  2.79M|                    if (rhs.t == Value::STRING) {
  ------------------
  |  Branch (3069:25): [True: 2.70M, False: 96.1k]
  ------------------
 3070|  2.70M|                        output.append(static_cast<const HeapString *>(rhs.v.h)->value);
 3071|  2.70M|                    } else {
 3072|  96.1k|                        scratch = rhs;
 3073|  96.1k|                        output.append(toString(ast.right->location));
 3074|  96.1k|                    }
 3075|  2.79M|                    scratch = makeString(output);
 3076|  2.79M|                } break;
 3077|       |
 3078|  2.63M|                case FRAME_UNARY: {
  ------------------
  |  Branch (3078:17): [True: 2.63M, False: 179M]
  ------------------
 3079|  2.63M|                    const auto &ast = *static_cast<const Unary *>(f.ast);
 3080|  2.63M|                    switch (scratch.t) {
 3081|  1.85M|                        case Value::BOOLEAN:
  ------------------
  |  Branch (3081:25): [True: 1.85M, False: 788k]
  ------------------
 3082|  1.85M|                            if (ast.op == UOP_NOT) {
  ------------------
  |  Branch (3082:33): [True: 1.85M, False: 1]
  ------------------
 3083|  1.85M|                                scratch = makeBoolean(!scratch.v.b);
 3084|  1.85M|                            } else {
 3085|      1|                                throw makeError(ast.location,
 3086|      1|                                                "unary operator " + uop_string(ast.op) +
 3087|      1|                                                    " does not operate on booleans.");
 3088|      1|                            }
 3089|  1.85M|                            break;
 3090|       |
 3091|  1.85M|                        case Value::NUMBER:
  ------------------
  |  Branch (3091:25): [True: 788k, False: 1.85M]
  ------------------
 3092|   788k|                            switch (ast.op) {
 3093|  8.08k|                                case UOP_PLUS: break;
  ------------------
  |  Branch (3093:33): [True: 8.08k, False: 780k]
  ------------------
 3094|       |
 3095|   618k|                                case UOP_MINUS: scratch = makeNumber(-scratch.v.d); break;
  ------------------
  |  Branch (3095:33): [True: 618k, False: 170k]
  ------------------
 3096|       |
 3097|   162k|                                case UOP_BITWISE_NOT:
  ------------------
  |  Branch (3097:33): [True: 162k, False: 626k]
  ------------------
 3098|   162k|                                    scratch = makeNumber(~(long)(scratch.v.d));
 3099|   162k|                                    break;
 3100|       |
 3101|     29|                                default:
  ------------------
  |  Branch (3101:33): [True: 29, False: 788k]
  ------------------
 3102|     29|                                    throw makeError(ast.location,
 3103|     29|                                                    "unary operator " + uop_string(ast.op) +
 3104|     29|                                                        " does not operate on numbers.");
 3105|   788k|                            }
 3106|   788k|                            break;
 3107|       |
 3108|   788k|                        default:
  ------------------
  |  Branch (3108:25): [True: 73, False: 2.63M]
  ------------------
 3109|     73|                            throw makeError(ast.location,
 3110|     73|                                            "unary operator " + uop_string(ast.op) +
 3111|     73|                                                " does not operate on type " + type_str(scratch));
 3112|  2.63M|                    }
 3113|  2.63M|                } break;
 3114|       |
 3115|  2.63M|                case FRAME_BUILTIN_JOIN_STRINGS: {
  ------------------
  |  Branch (3115:17): [True: 0, False: 182M]
  ------------------
 3116|      0|                    joinString(f.first, f.str, f.val, f.elementId, scratch);
 3117|      0|                    f.elementId++;
 3118|      0|                    auto *ast = joinStrings();
 3119|      0|                    if (ast != nullptr) {
  ------------------
  |  Branch (3119:25): [True: 0, False: 0]
  ------------------
 3120|      0|                        ast_ = ast;
 3121|      0|                        goto recurse;
 3122|      0|                    }
 3123|      0|                } break;
 3124|       |
 3125|      0|                case FRAME_BUILTIN_JOIN_ARRAYS: {
  ------------------
  |  Branch (3125:17): [True: 0, False: 182M]
  ------------------
 3126|      0|                    joinArray(f.first, f.thunks, f.val, f.elementId, scratch);
 3127|      0|                    f.elementId++;
 3128|      0|                    auto *ast = joinArrays();
 3129|      0|                    if (ast != nullptr) {
  ------------------
  |  Branch (3129:25): [True: 0, False: 0]
  ------------------
 3130|      0|                        ast_ = ast;
 3131|      0|                        goto recurse;
 3132|      0|                    }
 3133|      0|                } break;
 3134|       |
 3135|      0|                 case FRAME_BUILTIN_DECODE_UTF8: {
  ------------------
  |  Branch (3135:18): [True: 0, False: 182M]
  ------------------
 3136|      0|                    auto *ast = decodeUTF8();
 3137|      0|                    if (ast != nullptr) {
  ------------------
  |  Branch (3137:25): [True: 0, False: 0]
  ------------------
 3138|      0|                        ast_ = ast;
 3139|      0|                        goto recurse;
 3140|      0|                    }
 3141|      0|                } break;
 3142|       |
 3143|      0|                default:
  ------------------
  |  Branch (3143:17): [True: 0, False: 182M]
  ------------------
 3144|      0|                    std::cerr << "INTERNAL ERROR: Unknown FrameKind:  " << f.kind << std::endl;
 3145|      0|                    std::abort();
 3146|   182M|            }
 3147|       |
 3148|  81.6M|        popframe:;
 3149|       |
 3150|  81.6M|            stack.pop();
 3151|       |
 3152|  96.0M|        replaceframe:;
 3153|  96.0M|        }
 3154|  91.3M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack8newFrameIJNS1_9FrameKindEPKNS0_3ASTEEEEvDpT_:
  378|  75.0M|    {
  379|  75.0M|        stack.emplace_back(args...);
  380|  75.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15FrameC2ERKNS1_9FrameKindEPKNS0_3ASTE:
  194|  75.0M|    {
  195|  75.0M|        val.t = Value::NULL_TYPE;
  196|  75.0M|        val2.t = Value::NULL_TYPE;
  197|  75.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack14getSelfBindingERPNS1_10HeapObjectERj:
  434|  42.4M|    {
  435|  42.4M|        self = nullptr;
  436|  42.4M|        offset = 0;
  437|   139M|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (437:40): [True: 139M, False: 15.2k]
  ------------------
  438|   139M|            if (stack[i].isCall()) {
  ------------------
  |  Branch (438:17): [True: 42.4M, False: 96.9M]
  ------------------
  439|  42.4M|                self = stack[i].self;
  440|  42.4M|                offset = stack[i].offset;
  441|  42.4M|                return;
  442|  42.4M|            }
  443|   139M|        }
  444|  42.4M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  567|  30.4M|    {
  568|  30.4M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  569|  30.4M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (569:13): [True: 33.4k, False: 30.4M]
  ------------------
  570|       |            // Avoid the object we just made being collected.
  571|  33.4k|            heap.markFrom(r);
  572|       |
  573|       |            // Mark from the stack.
  574|  33.4k|            stack.mark(heap);
  575|       |
  576|       |            // Mark from the scratch register
  577|  33.4k|            heap.markFrom(scratch);
  578|       |
  579|       |            // Mark from cached imports
  580|  33.4k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (580:35): [True: 0, False: 33.4k]
  ------------------
  581|      0|                HeapThunk *thunk = pair.second->thunk;
  582|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (582:21): [True: 0, False: 0]
  ------------------
  583|      0|                    heap.markFrom(thunk);
  584|      0|            }
  585|       |
  586|  5.11M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (586:40): [True: 5.11M, False: 33.4k]
  ------------------
  587|  5.11M|                heap.markFrom(sourceVal.second);
  588|  5.11M|            }
  589|       |
  590|       |            // Delete unreachable objects.
  591|  33.4k|            heap.sweep();
  592|  33.4k|        }
  593|  30.4M|        return r;
  594|  30.4M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter7captureERKNSt3__16vectorIPKNS0_10IdentifierENS3_9allocatorIS7_EEEE:
  840|  55.6M|    {
  841|  55.6M|        BindingFrame env;
  842|   682M|        for (auto fv : free_vars) {
  ------------------
  |  Branch (842:22): [True: 682M, False: 55.6M]
  ------------------
  843|   682M|            auto *th = stack.lookUpVar(fv);
  844|   682M|            env[fv] = th;
  845|   682M|        }
  846|  55.6M|        return env;
  847|  55.6M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11makeClosureERKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS3_4lessIS7_EENS3_9allocatorINS3_4pairIKS7_S9_EEEEEEPNS1_10HeapObjectEjRKNS3_6vectorINS1_11HeapClosure5ParamENSC_ISO_EEEEPNS0_3ASTE:
  640|  2.10M|    {
  641|  2.10M|        Value r;
  642|  2.10M|        r.t = Value::FUNCTION;
  643|  2.10M|        r.v.h = makeHeap<HeapClosure>(env, self, offset, params, body, "");
  644|  2.10M|        return r;
  645|  2.10M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_11HeapClosureEJRKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS5_4lessIS9_EENS5_9allocatorINS5_4pairIKS9_SB_EEEEEERPNS1_10HeapObjectERjRKNS5_6vectorINS4_5ParamENSE_ISR_EEEERPNS0_3ASTERA1_KcEEEPT_DpOT0_:
  567|  2.10M|    {
  568|  2.10M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  569|  2.10M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (569:13): [True: 2.59k, False: 2.10M]
  ------------------
  570|       |            // Avoid the object we just made being collected.
  571|  2.59k|            heap.markFrom(r);
  572|       |
  573|       |            // Mark from the stack.
  574|  2.59k|            stack.mark(heap);
  575|       |
  576|       |            // Mark from the scratch register
  577|  2.59k|            heap.markFrom(scratch);
  578|       |
  579|       |            // Mark from cached imports
  580|  2.59k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (580:35): [True: 0, False: 2.59k]
  ------------------
  581|      0|                HeapThunk *thunk = pair.second->thunk;
  582|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (582:21): [True: 0, False: 0]
  ------------------
  583|      0|                    heap.markFrom(thunk);
  584|      0|            }
  585|       |
  586|   396k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (586:40): [True: 396k, False: 2.59k]
  ------------------
  587|   396k|                heap.markFrom(sourceVal.second);
  588|   396k|            }
  589|       |
  590|       |            // Delete unreachable objects.
  591|  2.59k|            heap.sweep();
  592|  2.59k|        }
  593|  2.10M|        return r;
  594|  2.10M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter6importERKNS0_13LocationRangeEPKNS0_13LiteralStringE:
  775|     55|    {
  776|     55|        ImportCacheValue *input = importData(loc, file);
  777|     55|        if (input->thunk == nullptr) {
  ------------------
  |  Branch (777:13): [True: 0, False: 55]
  ------------------
  778|      0|            Tokens tokens = jsonnet_lex(input->foundHere, input->content.c_str());
  779|      0|            AST *expr = jsonnet_parse(alloc, tokens);
  780|      0|            jsonnet_desugar(alloc, expr, nullptr);
  781|      0|            jsonnet_static_analysis(expr);
  782|       |            // If no errors then populate cache.
  783|      0|            auto *thunk = makeHeap<HeapThunk>(idImport, nullptr, 0, expr);
  784|      0|            input->thunk = thunk;
  785|      0|        }
  786|     55|        return input->thunk;
  787|     55|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10importDataERKNS0_13LocationRangeEPKNS0_13LiteralStringE:
  799|     65|    {
  800|     65|        std::string dir = dir_name(loc.file);
  801|       |
  802|     65|        const UString &path = file->value;
  803|       |
  804|     65|        std::pair<std::string, UString> key(dir, path);
  805|     65|        ImportCacheValue *cached_value = cachedImports[key];
  806|     65|        if (cached_value != nullptr)
  ------------------
  |  Branch (806:13): [True: 0, False: 65]
  ------------------
  807|      0|            return cached_value;
  808|       |
  809|     65|        char *found_here_cptr;
  810|     65|        char *buf = NULL;
  811|     65|        size_t buflen = 0;
  812|     65|        int result = importCallback(importCallbackContext,
  813|     65|                                    dir.c_str(),
  814|     65|                                    encode_utf8(path).c_str(),
  815|     65|                                    &found_here_cptr,
  816|     65|                                    &buf,
  817|     65|                                    &buflen);
  818|       |
  819|     65|        std::string input(buf, buflen);
  820|     65|        ::free(buf);
  821|       |
  822|     65|        if (result == 1) {  // failure
  ------------------
  |  Branch (822:13): [True: 65, False: 0]
  ------------------
  823|     65|            std::string epath = encode_utf8(jsonnet_string_escape(path, false));
  824|     65|            std::string msg = "couldn't open import \"" + epath + "\": ";
  825|     65|            msg += input;
  826|     65|            throw makeError(loc, msg);
  827|     65|        }
  828|       |
  829|      0|        auto *input_ptr = new ImportCacheValue();
  830|      0|        input_ptr->foundHere = found_here_cptr;
  831|      0|        input_ptr->content = input;
  832|      0|        input_ptr->thunk = nullptr;  // May be filled in later by import().
  833|      0|        ::free(found_here_cptr);
  834|      0|        cachedImports[key] = input_ptr;
  835|      0|        return input_ptr;
  836|     65|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_18dir_nameERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   57|     65|{
   58|     65|    size_t last_slash = path.rfind('/');
   59|     65|    if (last_slash != std::string::npos) {
  ------------------
  |  Branch (59:9): [True: 0, False: 65]
  ------------------
   60|      0|        return path.substr(0, last_slash + 1);
   61|      0|    }
   62|     65|    return "";
   63|     65|}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRKPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  567|  20.0M|    {
  568|  20.0M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  569|  20.0M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (569:13): [True: 19.7k, False: 19.9M]
  ------------------
  570|       |            // Avoid the object we just made being collected.
  571|  19.7k|            heap.markFrom(r);
  572|       |
  573|       |            // Mark from the stack.
  574|  19.7k|            stack.mark(heap);
  575|       |
  576|       |            // Mark from the scratch register
  577|  19.7k|            heap.markFrom(scratch);
  578|       |
  579|       |            // Mark from cached imports
  580|  19.7k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (580:35): [True: 0, False: 19.7k]
  ------------------
  581|      0|                HeapThunk *thunk = pair.second->thunk;
  582|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (582:21): [True: 0, False: 0]
  ------------------
  583|      0|                    heap.markFrom(thunk);
  584|      0|            }
  585|       |
  586|  3.01M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (586:40): [True: 3.01M, False: 19.7k]
  ------------------
  587|  3.01M|                heap.markFrom(sourceVal.second);
  588|  3.01M|            }
  589|       |
  590|       |            // Delete unreachable objects.
  591|  19.7k|            heap.sweep();
  592|  19.7k|        }
  593|  20.0M|        return r;
  594|  20.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10makeObjectINS1_16HeapSimpleObjectEJNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS5_4lessIS9_EENS5_9allocatorINS5_4pairIKS9_SB_EEEEEENS6_IS9_NS4_5FieldESD_NSE_INSF_ISG_SK_EEEEEENS5_4listIPNS0_3ASTENSE_ISQ_EEEEEEENS1_5ValueEDpT0_:
  667|  1.68M|    {
  668|  1.68M|        Value r;
  669|  1.68M|        r.t = Value::OBJECT;
  670|  1.68M|        r.v.h = makeHeap<T>(args...);
  671|  1.68M|        return r;
  672|  1.68M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_16HeapSimpleObjectEJRNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS5_4lessIS9_EENS5_9allocatorINS5_4pairIKS9_SB_EEEEEERNS6_IS9_NS4_5FieldESD_NSE_INSF_ISG_SL_EEEEEERNS5_4listIPNS0_3ASTENSE_ISS_EEEEEEEPT_DpOT0_:
  567|  1.68M|    {
  568|  1.68M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  569|  1.68M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (569:13): [True: 2.61k, False: 1.68M]
  ------------------
  570|       |            // Avoid the object we just made being collected.
  571|  2.61k|            heap.markFrom(r);
  572|       |
  573|       |            // Mark from the stack.
  574|  2.61k|            stack.mark(heap);
  575|       |
  576|       |            // Mark from the scratch register
  577|  2.61k|            heap.markFrom(scratch);
  578|       |
  579|       |            // Mark from cached imports
  580|  2.61k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (580:35): [True: 0, False: 2.61k]
  ------------------
  581|      0|                HeapThunk *thunk = pair.second->thunk;
  582|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (582:21): [True: 0, False: 0]
  ------------------
  583|      0|                    heap.markFrom(thunk);
  584|      0|            }
  585|       |
  586|   399k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (586:40): [True: 399k, False: 2.61k]
  ------------------
  587|   399k|                heap.markFrom(sourceVal.second);
  588|   399k|            }
  589|       |
  590|       |            // Delete unreachable objects.
  591|  2.61k|            heap.sweep();
  592|  2.61k|        }
  593|  1.68M|        return r;
  594|  1.68M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack9lookUpVarEPKNS0_10IdentifierE:
  259|   719M|    {
  260|   845M|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (260:40): [True: 845M, False: 0]
  ------------------
  261|   845M|            const auto &binds = stack[i].bindings;
  262|   845M|            auto it = binds.find(id);
  263|   845M|            if (it != binds.end()) {
  ------------------
  |  Branch (263:17): [True: 719M, False: 125M]
  ------------------
  264|   719M|                return it->second;
  265|   719M|            }
  266|   125M|            if (stack[i].isCall())
  ------------------
  |  Branch (266:17): [True: 0, False: 125M]
  ------------------
  267|      0|                break;
  268|   125M|        }
  269|      0|        return nullptr;
  270|   719M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack4sizeEv:
  253|   204M|    {
  254|   204M|        return stack.size();
  255|   204M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPKNS0_3ASTEEEEPT_DpOT0_:
  567|    198|    {
  568|    198|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  569|    198|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (569:13): [True: 0, False: 198]
  ------------------
  570|       |            // Avoid the object we just made being collected.
  571|      0|            heap.markFrom(r);
  572|       |
  573|       |            // Mark from the stack.
  574|      0|            stack.mark(heap);
  575|       |
  576|       |            // Mark from the scratch register
  577|      0|            heap.markFrom(scratch);
  578|       |
  579|       |            // Mark from cached imports
  580|      0|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (580:35): [True: 0, False: 0]
  ------------------
  581|      0|                HeapThunk *thunk = pair.second->thunk;
  582|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (582:21): [True: 0, False: 0]
  ------------------
  583|      0|                    heap.markFrom(thunk);
  584|      0|            }
  585|       |
  586|      0|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (586:40): [True: 0, False: 0]
  ------------------
  587|      0|                heap.markFrom(sourceVal.second);
  588|      0|            }
  589|       |
  590|       |            // Delete unreachable objects.
  591|      0|            heap.sweep();
  592|      0|        }
  593|    198|        return r;
  594|    198|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10findObjectEPKNS0_10IdentifierEPNS1_10HeapObjectEjRj:
  694|  1.60G|    {
  695|  1.60G|        if (auto *ext = dynamic_cast<HeapExtendedObject *>(curr)) {
  ------------------
  |  Branch (695:19): [True: 796M, False: 808M]
  ------------------
  696|   796M|            auto *r = findObject(f, ext->right, start_from, counter);
  697|   796M|            if (r)
  ------------------
  |  Branch (697:17): [True: 8.09M, False: 788M]
  ------------------
  698|  8.09M|                return r;
  699|   788M|            auto *l = findObject(f, ext->left, start_from, counter);
  700|   788M|            if (l)
  ------------------
  |  Branch (700:17): [True: 641M, False: 146M]
  ------------------
  701|   641M|                return l;
  702|   808M|        } else {
  703|   808M|            if (counter >= start_from) {
  ------------------
  |  Branch (703:17): [True: 32.4M, False: 775M]
  ------------------
  704|  32.4M|                if (auto *simp = dynamic_cast<HeapSimpleObject *>(curr)) {
  ------------------
  |  Branch (704:27): [True: 32.4M, False: 0]
  ------------------
  705|  32.4M|                    auto it = simp->fields.find(f);
  706|  32.4M|                    if (it != simp->fields.end()) {
  ------------------
  |  Branch (706:25): [True: 19.8M, False: 12.5M]
  ------------------
  707|  19.8M|                        return simp;
  708|  19.8M|                    }
  709|  32.4M|                } else if (auto *comp = dynamic_cast<HeapComprehensionObject *>(curr)) {
  ------------------
  |  Branch (709:34): [True: 0, False: 0]
  ------------------
  710|      0|                    auto it = comp->compValues.find(f);
  711|      0|                    if (it != comp->compValues.end()) {
  ------------------
  |  Branch (711:25): [True: 0, False: 0]
  ------------------
  712|      0|                        return comp;
  713|      0|                    }
  714|      0|                }
  715|  32.4M|            }
  716|   788M|            counter++;
  717|   788M|        }
  718|   935M|        return nullptr;
  719|  1.60G|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13callSourceValEPKNS0_3ASTEPNS1_9HeapThunkENSt3__16vectorIS7_NS8_9allocatorIS7_EEEE:
 1963|     39|    const AST *callSourceVal(const AST *ast, HeapThunk *sourceVal, std::vector<HeapThunk*> args) {
 1964|     39|        assert(sourceVal != nullptr);
 1965|      0|        assert(sourceVal->filled);
 1966|      0|        assert(sourceVal->content.t == Value::FUNCTION);
 1967|      0|        auto *func = static_cast<HeapClosure *>(sourceVal->content.v.h);
 1968|     39|        BindingFrame up_values = func->upValues;
 1969|    117|        for (size_t i = 0; i < args.size(); ++i) {
  ------------------
  |  Branch (1969:28): [True: 78, False: 39]
  ------------------
 1970|     78|            up_values.insert({func->params[i].id, args[i]});
 1971|     78|        }
 1972|     39|        stack.newCall(ast->location, func, func->self, func->offset, up_values);
 1973|     39|        return func->body;
 1974|     39|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10makeObjectINS1_18HeapExtendedObjectEJPNS1_10HeapObjectES6_EEENS1_5ValueEDpT0_:
  667|  1.24M|    {
  668|  1.24M|        Value r;
  669|  1.24M|        r.t = Value::OBJECT;
  670|  1.24M|        r.v.h = makeHeap<T>(args...);
  671|  1.24M|        return r;
  672|  1.24M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_18HeapExtendedObjectEJRPNS1_10HeapObjectES7_EEEPT_DpOT0_:
  567|  1.24M|    {
  568|  1.24M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  569|  1.24M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (569:13): [True: 1.71k, False: 1.24M]
  ------------------
  570|       |            // Avoid the object we just made being collected.
  571|  1.71k|            heap.markFrom(r);
  572|       |
  573|       |            // Mark from the stack.
  574|  1.71k|            stack.mark(heap);
  575|       |
  576|       |            // Mark from the scratch register
  577|  1.71k|            heap.markFrom(scratch);
  578|       |
  579|       |            // Mark from cached imports
  580|  1.71k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (580:35): [True: 0, False: 1.71k]
  ------------------
  581|      0|                HeapThunk *thunk = pair.second->thunk;
  582|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (582:21): [True: 0, False: 0]
  ------------------
  583|      0|                    heap.markFrom(thunk);
  584|      0|            }
  585|       |
  586|   262k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (586:40): [True: 262k, False: 1.71k]
  ------------------
  587|   262k|                heap.markFrom(sourceVal.second);
  588|   262k|            }
  589|       |
  590|       |            // Delete unreachable objects.
  591|  1.71k|            heap.sweep();
  592|  1.71k|        }
  593|  1.24M|        return r;
  594|  1.24M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8toStringERKNS0_13LocationRangeE:
 1874|   101k|    {
 1875|   101k|        return manifestJson(loc, false, U"");
 1876|   101k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11countLeavesEPNS1_10HeapObjectE:
  855|  7.99G|    {
  856|  7.99G|        if (auto *ext = dynamic_cast<HeapExtendedObject *>(obj)) {
  ------------------
  |  Branch (856:19): [True: 3.99G, False: 4.00G]
  ------------------
  857|  3.99G|            return countLeaves(ext->left) + countLeaves(ext->right);
  858|  4.00G|        } else {
  859|       |            // Must be a HeapLeafObject.
  860|  4.00G|            return 1;
  861|  4.00G|        }
  862|  7.99G|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11objectIndexERKNS0_13LocationRangeEPNS1_10HeapObjectEPKNS0_10IdentifierEj:
 1911|  16.3M|    {
 1912|  16.3M|        unsigned found_at = 0;
 1913|  16.3M|        HeapObject *self = obj;
 1914|  16.3M|        HeapLeafObject *found = findObject(f, obj, offset, found_at);
 1915|  16.3M|        if (found == nullptr) {
  ------------------
  |  Branch (1915:13): [True: 11, False: 16.3M]
  ------------------
 1916|     11|            throw makeError(loc, "field does not exist: " + encode_utf8(f->name));
 1917|     11|        }
 1918|  16.3M|        if (auto *simp = dynamic_cast<HeapSimpleObject *>(found)) {
  ------------------
  |  Branch (1918:19): [True: 16.3M, False: 0]
  ------------------
 1919|  16.3M|            auto it = simp->fields.find(f);
 1920|  16.3M|            const AST *body = it->second.body;
 1921|       |
 1922|  16.3M|            stack.newCall(loc, simp, self, found_at, simp->upValues);
 1923|  16.3M|            return body;
 1924|  16.3M|        } else {
 1925|       |            // If a HeapLeafObject is not HeapSimpleObject, it must be HeapComprehensionObject.
 1926|      0|            auto *comp = static_cast<HeapComprehensionObject *>(found);
 1927|      0|            auto it = comp->compValues.find(f);
 1928|      0|            auto *th = it->second;
 1929|      0|            BindingFrame binds = comp->upValues;
 1930|      0|            binds[comp->id] = th;
 1931|      0|            stack.newCall(loc, comp, self, found_at, binds);
 1932|      0|            return comp->value;
 1933|      0|        }
 1934|  16.3M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack26alreadyExecutingInvariantsEPNS1_10HeapObjectE:
  448|  12.5M|    {
  449|  3.76G|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (449:40): [True: 3.75G, False: 12.4M]
  ------------------
  450|  3.75G|            if (stack[i].kind == FRAME_INVARIANTS) {
  ------------------
  |  Branch (450:17): [True: 18.1M, False: 3.73G]
  ------------------
  451|  18.1M|                if (stack[i].self == self)
  ------------------
  |  Branch (451:21): [True: 31.9k, False: 18.0M]
  ------------------
  452|  31.9k|                    return true;
  453|  18.1M|            }
  454|  3.75G|        }
  455|  12.4M|        return false;
  456|  12.5M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack8newFrameIJNS1_9FrameKindENS0_13LocationRangeEEEEvDpT_:
  378|  12.4M|    {
  379|  12.4M|        stack.emplace_back(args...);
  380|  12.4M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter16objectInvariantsEPNS1_10HeapObjectES4_RjRNSt3__16vectorIPNS1_9HeapThunkENS6_9allocatorIS9_EEEE:
 1887|  39.8M|    {
 1888|  39.8M|        if (auto *ext = dynamic_cast<HeapExtendedObject *>(curr)) {
  ------------------
  |  Branch (1888:19): [True: 13.6M, False: 26.1M]
  ------------------
 1889|  13.6M|            objectInvariants(ext->right, self, counter, thunks);
 1890|  13.6M|            objectInvariants(ext->left, self, counter, thunks);
 1891|  26.1M|        } else {
 1892|  26.1M|            if (auto *simp = dynamic_cast<HeapSimpleObject *>(curr)) {
  ------------------
  |  Branch (1892:23): [True: 26.1M, False: 0]
  ------------------
 1893|  26.1M|                for (AST *assert : simp->asserts) {
  ------------------
  |  Branch (1893:34): [True: 335k, False: 26.1M]
  ------------------
 1894|   335k|                    auto *el_th = makeHeap<HeapThunk>(idInvariant, self, counter, assert);
 1895|   335k|                    el_th->upValues = simp->upValues;
 1896|   335k|                    thunks.push_back(el_th);
 1897|   335k|                }
 1898|  26.1M|            }
 1899|  26.1M|            counter++;
 1900|  26.1M|        }
 1901|  39.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRPNS0_3ASTEEEEPT_DpOT0_:
  567|   335k|    {
  568|   335k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  569|   335k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (569:13): [True: 561, False: 335k]
  ------------------
  570|       |            // Avoid the object we just made being collected.
  571|    561|            heap.markFrom(r);
  572|       |
  573|       |            // Mark from the stack.
  574|    561|            stack.mark(heap);
  575|       |
  576|       |            // Mark from the scratch register
  577|    561|            heap.markFrom(scratch);
  578|       |
  579|       |            // Mark from cached imports
  580|    561|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (580:35): [True: 0, False: 561]
  ------------------
  581|      0|                HeapThunk *thunk = pair.second->thunk;
  582|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (582:21): [True: 0, False: 0]
  ------------------
  583|      0|                    heap.markFrom(thunk);
  584|      0|            }
  585|       |
  586|  85.8k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (586:40): [True: 85.8k, False: 561]
  ------------------
  587|  85.8k|                heap.markFrom(sourceVal.second);
  588|  85.8k|            }
  589|       |
  590|       |            // Delete unreachable objects.
  591|    561|            heap.sweep();
  592|    561|        }
  593|   335k|        return r;
  594|   335k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter12manifestJsonERKNS0_13LocationRangeEbRKNSt3__112basic_stringIDiNS6_11char_traitsIDiEENS6_9allocatorIDiEEEE:
 3164|  5.14M|    {
 3165|       |        // Printing fields means evaluating and binding them, which can trigger
 3166|       |        // garbage collection.
 3167|       |
 3168|  5.14M|        UStringStream ss;
 3169|  5.14M|        switch (scratch.t) {
  ------------------
  |  Branch (3169:17): [True: 0, False: 5.14M]
  ------------------
 3170|  51.8k|            case Value::ARRAY: {
  ------------------
  |  Branch (3170:13): [True: 51.8k, False: 5.08M]
  ------------------
 3171|  51.8k|                HeapArray *arr = static_cast<HeapArray *>(scratch.v.h);
 3172|  51.8k|                if (arr->elements.size() == 0) {
  ------------------
  |  Branch (3172:21): [True: 7.28k, False: 44.6k]
  ------------------
 3173|  7.28k|                    ss << U"[ ]";
 3174|  44.6k|                } else {
 3175|  44.6k|                    const char32_t *prefix = multiline ? U"[\n" : U"[";
  ------------------
  |  Branch (3175:46): [True: 41.3k, False: 3.24k]
  ------------------
 3176|  44.6k|                    UString indent2 = multiline ? indent + U"   " : indent;
  ------------------
  |  Branch (3176:39): [True: 41.3k, False: 3.24k]
  ------------------
 3177|  4.54M|                    for (auto *thunk : arr->elements) {
  ------------------
  |  Branch (3177:38): [True: 4.54M, False: 44.6k]
  ------------------
 3178|  4.54M|                        LocationRange tloc = thunk->body == nullptr ? loc : thunk->body->location;
  ------------------
  |  Branch (3178:46): [True: 0, False: 4.54M]
  ------------------
 3179|  4.54M|                        if (thunk->filled) {
  ------------------
  |  Branch (3179:29): [True: 0, False: 4.54M]
  ------------------
 3180|      0|                            stack.newCall(loc, thunk, nullptr, 0, BindingFrame{});
 3181|       |                            // Keep arr alive when scratch is overwritten
 3182|      0|                            stack.top().val = scratch;
 3183|      0|                            scratch = thunk->content;
 3184|  4.54M|                        } else {
 3185|  4.54M|                            stack.newCall(loc, thunk, thunk->self, thunk->offset, thunk->upValues);
 3186|       |                            // Keep arr alive when scratch is overwritten
 3187|  4.54M|                            stack.top().val = scratch;
 3188|  4.54M|                            evaluate(thunk->body, stack.size());
 3189|  4.54M|                        }
 3190|  4.54M|                        auto element = manifestJson(tloc, multiline, indent2);
 3191|       |                        // Restore scratch
 3192|  4.54M|                        scratch = stack.top().val;
 3193|  4.54M|                        stack.pop();
 3194|  4.54M|                        ss << prefix << indent2 << element;
 3195|  4.54M|                        prefix = multiline ? U",\n" : U", ";
  ------------------
  |  Branch (3195:34): [True: 4.47M, False: 69.6k]
  ------------------
 3196|  4.54M|                    }
 3197|  44.6k|                    ss << (multiline ? U"\n" : U"") << indent << U"]";
  ------------------
  |  Branch (3197:28): [True: 34.2k, False: 10.4k]
  ------------------
 3198|  44.6k|                }
 3199|  51.8k|            } break;
 3200|       |
 3201|  54.3k|            case Value::BOOLEAN: ss << (scratch.v.b ? U"true" : U"false"); break;
  ------------------
  |  Branch (3201:13): [True: 54.3k, False: 5.08M]
  |  Branch (3201:41): [True: 14.6k, False: 39.6k]
  ------------------
 3202|       |
 3203|  4.67M|            case Value::NUMBER: ss << decode_utf8(jsonnet_unparse_number(scratch.v.d)); break;
  ------------------
  |  Branch (3203:13): [True: 4.67M, False: 466k]
  ------------------
 3204|       |
 3205|     20|            case Value::FUNCTION:
  ------------------
  |  Branch (3205:13): [True: 20, False: 5.14M]
  ------------------
 3206|     20|                throw makeError(loc, "couldn't manifest function in JSON output.");
 3207|       |
 3208|  1.53k|            case Value::NULL_TYPE: ss << U"null"; break;
  ------------------
  |  Branch (3208:13): [True: 1.53k, False: 5.13M]
  ------------------
 3209|       |
 3210|   266k|            case Value::OBJECT: {
  ------------------
  |  Branch (3210:13): [True: 266k, False: 4.87M]
  ------------------
 3211|   266k|                auto *obj = static_cast<HeapObject *>(scratch.v.h);
 3212|   266k|                runInvariants(loc, obj);
 3213|       |                // Using std::map has the useful side-effect of ordering the fields
 3214|       |                // alphabetically.
 3215|   266k|                std::map<UString, const Identifier *> fields;
 3216|   595k|                for (const auto &f : objectFields(obj, true)) {
  ------------------
  |  Branch (3216:36): [True: 595k, False: 266k]
  ------------------
 3217|   595k|                    fields[f->name] = f;
 3218|   595k|                }
 3219|   266k|                if (fields.size() == 0) {
  ------------------
  |  Branch (3219:21): [True: 24.9k, False: 241k]
  ------------------
 3220|  24.9k|                    ss << U"{ }";
 3221|   241k|                } else {
 3222|   241k|                    UString indent2 = multiline ? indent + U"   " : indent;
  ------------------
  |  Branch (3222:39): [True: 138k, False: 102k]
  ------------------
 3223|   241k|                    const char32_t *prefix = multiline ? U"{\n" : U"{";
  ------------------
  |  Branch (3223:46): [True: 138k, False: 102k]
  ------------------
 3224|   501k|                    for (const auto &f : fields) {
  ------------------
  |  Branch (3224:40): [True: 501k, False: 241k]
  ------------------
 3225|       |                        // pushes FRAME_CALL
 3226|   501k|                        const AST *body = objectIndex(loc, obj, f.second, 0);
 3227|   501k|                        stack.top().val = scratch;
 3228|   501k|                        evaluate(body, stack.size());
 3229|   501k|                        auto vstr = manifestJson(body->location, multiline, indent2);
 3230|       |                        // Reset scratch so that the object we're manifesting doesn't
 3231|       |                        // get GC'd.
 3232|   501k|                        scratch = stack.top().val;
 3233|   501k|                        stack.pop();
 3234|   501k|                        ss << prefix << indent2 << jsonnet_string_unparse(f.first, false) << U": "
 3235|   501k|                           << vstr;
 3236|   501k|                        prefix = multiline ? U",\n" : U", ";
  ------------------
  |  Branch (3236:34): [True: 274k, False: 226k]
  ------------------
 3237|   501k|                    }
 3238|   241k|                    ss << (multiline ? U"\n" : U"") << indent << U"}";
  ------------------
  |  Branch (3238:28): [True: 19.9k, False: 221k]
  ------------------
 3239|   241k|                }
 3240|   266k|            } break;
 3241|       |
 3242|  92.1k|            case Value::STRING: {
  ------------------
  |  Branch (3242:13): [True: 92.1k, False: 5.04M]
  ------------------
 3243|  92.1k|                const UString &str = static_cast<HeapString *>(scratch.v.h)->value;
 3244|  92.1k|                ss << jsonnet_string_unparse(str, false);
 3245|  92.1k|            } break;
 3246|  5.14M|        }
 3247|  4.99M|        return ss.str();
 3248|  5.14M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13runInvariantsERKNS0_13LocationRangeEPNS1_10HeapObjectE:
 1937|   266k|    {
 1938|   266k|        if (stack.alreadyExecutingInvariants(self))
  ------------------
  |  Branch (1938:13): [True: 31.8k, False: 234k]
  ------------------
 1939|  31.8k|            return;
 1940|       |
 1941|   234k|        unsigned counter = 0;
 1942|   234k|        unsigned initial_stack_size = stack.size();
 1943|   234k|        stack.newFrame(FRAME_INVARIANTS, loc);
 1944|   234k|        std::vector<HeapThunk *> &thunks = stack.top().thunks;
 1945|   234k|        objectInvariants(self, self, counter, thunks);
 1946|   234k|        if (thunks.size() == 0) {
  ------------------
  |  Branch (1946:13): [True: 218k, False: 16.3k]
  ------------------
 1947|   218k|            stack.pop();
 1948|   218k|            return;
 1949|   218k|        }
 1950|  16.3k|        HeapThunk *thunk = thunks[0];
 1951|  16.3k|        stack.top().elementId = 1;
 1952|  16.3k|        stack.top().self = self;
 1953|  16.3k|        stack.newCall(loc, thunk, thunk->self, thunk->offset, thunk->upValues);
 1954|  16.3k|        evaluate(thunk->body, initial_stack_size);
 1955|  16.3k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111InterpreterD2Ev:
  957|  3.81k|    {
  958|  3.81k|        for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (958:31): [True: 65, False: 3.81k]
  ------------------
  959|     65|            delete pair.second;
  960|     65|        }
  961|  3.81k|    }

_ZN7jsonnet8internal10TraceFrameC2ERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
   33|   354k|    {
   34|   354k|    }
_ZN7jsonnet8internal12RuntimeErrorC2ENSt3__16vectorINS0_10TraceFrameENS2_9allocatorIS4_EEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS5_IcEEEE:
   45|  2.09k|    {
   46|  2.09k|    }

_ZN2c43yml9CallbacksC2Ev:
   67|      2|{
   68|      2|}
_ZN2c43yml13get_callbacksEv:
  119|      2|{
  120|      2|    return s_default_callbacks;
  121|      2|}

